kcode_kennedy_orchestration/
lib.rs1#![forbid(unsafe_code)]
2
3mod prompts;
4mod services;
5mod worker;
6
7use std::sync::Arc;
8
9pub use kcode_kennedy_sessions::{AgentMode, RuntimeModel, Service as SessionService, Session};
10pub use prompts::Manuals;
11pub use services::{Api, ApiError, LocalServices, data_url, telegram_caption_for};
12pub use worker::{Orchestrator, SessionRuntime, TurnCompletion, persist_record};
13
14#[derive(Clone, Debug)]
15pub struct Config {
16 pub user_root_node_id: String,
17 pub kennedy_root_node_id: String,
18 pub telegram_max_media_bytes: usize,
19 pub runtime_model: RuntimeModel,
20}
21
22pub fn build(config: Config, api: Api, sessions: SessionService) -> Arc<Orchestrator> {
23 Arc::new(Orchestrator::new(config, api, sessions))
24}
25
26pub async fn run(worker: Arc<Orchestrator>) -> anyhow::Result<()> {
27 worker.run().await
28}