vv-agent 0.4.7

VectorVein agent runtime, SDK, CLI, tools, and workspace backends
Documentation
use crate::runtime::backends::{
    DistributedBackend, InlineBackend, RuntimeExecutionBackend, ThreadBackend,
};

#[derive(Debug, Clone, Default)]
pub enum ExecutionMode {
    #[default]
    Inline,
    Threaded {
        max_workers: usize,
    },
    Distributed(DistributedBackend),
}

impl From<ExecutionMode> for RuntimeExecutionBackend {
    fn from(mode: ExecutionMode) -> Self {
        match mode {
            ExecutionMode::Inline => Self::Inline(InlineBackend),
            ExecutionMode::Threaded { max_workers } => {
                Self::Thread(ThreadBackend::new(max_workers))
            }
            ExecutionMode::Distributed(backend) => Self::Distributed(backend),
        }
    }
}