feat: Agent Adapter Interface (Task 7)
- AgentAdapter trait: register, heartbeat, execute, submit_receipt, deregister - AdapterRunner: lifecycle management (start with health check, heartbeat loop, graceful stop) - AdapterInstanceConfig: per-adapter config (type, work_dir, model, capabilities, env, connection) - Config integration: adapters field in Config + config.example.toml - 3 tests: config extraction, runner lifecycle, fake execute 22/22 tests pass.
This commit is contained in:
parent
f60f028f96
commit
1dacd17231
4 changed files with 315 additions and 1 deletions
|
|
@ -1,11 +1,15 @@
|
|||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::adapters::AdapterInstanceConfig;
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct Config {
|
||||
pub server: ServerConfig,
|
||||
pub forgejo: ForgejoConfig,
|
||||
pub matrix: MatrixConfig,
|
||||
pub orchestrator: OrchestratorConfig,
|
||||
#[serde(default)]
|
||||
pub adapters: Vec<AdapterInstanceConfig>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
|
|
@ -63,6 +67,7 @@ impl Default for Config {
|
|||
task_timeout_secs: 1800,
|
||||
default_max_retries: 2,
|
||||
},
|
||||
adapters: vec![],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue