kcode-kennedy-orchestration 0.1.0

Typed orchestration and session-control runtime for Kennedy
Documentation
#![forbid(unsafe_code)]

mod prompts;
mod services;
mod worker;

use std::{path::PathBuf, sync::Arc};

pub use kcode_kennedy_sessions::{AgentMode, RuntimeModel, Service as SessionService, Session};
pub use prompts::Manuals;
pub use services::{Api, ApiError, LocalServices, data_url, telegram_caption_for};
pub use worker::{Orchestrator, SessionRuntime, TurnCompletion, persist_record};

#[derive(Clone, Debug)]
pub struct Config {
    pub system_prompts_directory: PathBuf,
    pub user_root_node_id: String,
    pub kennedy_root_node_id: String,
    pub telegram_max_media_bytes: usize,
    pub runtime_model: RuntimeModel,
}

pub fn build(config: Config, api: Api, sessions: SessionService) -> Arc<Orchestrator> {
    Arc::new(Orchestrator::new(config, api, sessions))
}

pub async fn run(worker: Arc<Orchestrator>) -> anyhow::Result<()> {
    worker.run().await
}