- 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
21 lines
503 B
Rust
21 lines
503 B
Rust
use std::sync::Arc;
|
|
use axum::{
|
|
http::StatusCode,
|
|
response::{IntoResponse, Response},
|
|
routing::post,
|
|
Json, Router,
|
|
};
|
|
|
|
use crate::AppState;
|
|
|
|
pub fn router(state: Arc<AppState>) -> Router {
|
|
Router::new()
|
|
.route("/chat", post(chat))
|
|
.with_state(state)
|
|
}
|
|
|
|
async fn chat() -> Result<Json<serde_json::Value>, Response> {
|
|
// Chat endpoint removed — LLM runs on workers only
|
|
Err((StatusCode::GONE, "Chat endpoint removed. LLM runs on workers.").into_response())
|
|
}
|