#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub(crate) enum OrchestratorRoute {
RustInternal,
NonRust,
FallbackBash,
}
pub(crate) const NON_RUST_RUNTIMES: &[&str] = &[
"compose",
"go",
"javascript",
"llm",
"node",
"open_interpreter",
"polyglot",
"python",
"rust",
"shell",
"system",
];
pub(crate) const NON_RUST_PROCESS_TYPES: &[&str] = &[
"compose",
"polyglot",
];
pub(crate) fn classify_orchestrator_route(runtime: &str, process_type: &str) -> OrchestratorRoute {
if runtime == "rust" && process_type == "internal_reference" {
OrchestratorRoute::RustInternal
} else if NON_RUST_RUNTIMES.contains(&runtime) || NON_RUST_PROCESS_TYPES.contains(&process_type) {
OrchestratorRoute::NonRust
} else {
OrchestratorRoute::FallbackBash
}
}