Skip to main content

soma_config/
python_runner_profile.rs

1use serde::{Deserialize, Serialize};
2
3/// Python provider execution mode.
4#[derive(Debug, Clone, Copy, Serialize, Deserialize, Default, PartialEq, Eq)]
5#[serde(rename_all = "kebab-case")]
6pub enum PythonRunnerMode {
7    /// Spawn one bounded interpreter for each catalog or invocation request.
8    #[default]
9    OneShot,
10    /// Reuse one supervised interpreter per active Python provider.
11    Persistent,
12}
13
14/// Ambient-authority posture for persistent Python workers.
15#[derive(Debug, Clone, Copy, Serialize, Deserialize, Default, PartialEq, Eq)]
16#[serde(rename_all = "kebab-case")]
17pub enum PythonExecutionProfile {
18    Disabled,
19    #[default]
20    Trusted,
21    Brokered,
22}
23
24#[cfg(test)]
25#[path = "python_runner_profile_tests.rs"]
26mod tests;