refactor: server no longer runs agent loop or LLM

- Remove agent_loop from server (was ~400 lines) — server dispatches to workers
- AgentManager simplified to pure dispatcher (send_event → worker)
- Remove LLM config requirement from server (workers bring their own via config.yaml)
- Remove process_feedback, build_feedback_tools from server
- Remove chat API endpoint (LLM on workers only)
- Remove service proxy (services run on workers)
- Worker reads LLM config from its own config.yaml
- ws_worker.rs handles WorkerToServer::Update messages (DB + broadcast)
- Verified locally: tori server + tori worker connect and register
This commit is contained in:
2026-04-06 13:18:21 +01:00
parent dfedb6dd45
commit decabc0e8a
9 changed files with 380 additions and 997 deletions

View File

@@ -28,7 +28,9 @@ pub struct AppState {
#[derive(Debug, Clone, Deserialize)]
pub struct Config {
pub llm: LlmConfig,
/// LLM config is optional on the server — workers bring their own.
#[serde(default)]
pub llm: Option<LlmConfig>,
pub server: ServerConfig,
pub database: DatabaseConfig,
#[serde(default)]