refactor: remove legacy responder + agent_ux, add Gitea integration tests
Legacy removal: - DELETE src/brain/responder.rs (900 lines) — replaced by orchestrator - DELETE src/agent_ux.rs (184 lines) — UX moved to transport bridges - EXTRACT chat_blocking() to src/brain/chat.rs (standalone utility) - sync.rs: uses ConversationRegistry directly (no responder) - main.rs: holds ToolRegistry + Personality directly (no Responder wrapper) - research.rs: progress updates via tracing (no AgentProgress) Gitea integration testing: - docker-compose: added Gitea service with healthcheck - bootstrap-gitea.sh: creates admin, org, mirrors 6 real repos from src.sunbeam.pt (sol, cli, proxy, storybook, admin-ui, mistralai-client-rs) - PAT provisioning for SDK testing without Vault - code_index/gitea.rs: fixed directory listing (direct API calls instead of SDK's single-object parser), proper base64 file decoding New integration tests: - Gitea: list_repos, get_repo, get_file, directory listing, code indexing - Web search: SearXNG query with result verification - Conversation registry: lifecycle + send_message round-trip - Evaluator: rule matching (DM, own message) - gRPC bridge: event filtering, tool call mapping, thinking→status
This commit is contained in:
17
src/main.rs
17
src/main.rs
@@ -1,4 +1,3 @@
|
||||
mod agent_ux;
|
||||
mod agents;
|
||||
mod archive;
|
||||
mod brain;
|
||||
@@ -39,7 +38,6 @@ use conversations::ConversationRegistry;
|
||||
use memory::schema::create_index_if_not_exists as create_memory_index;
|
||||
use brain::evaluator::Evaluator;
|
||||
use brain::personality::Personality;
|
||||
use brain::responder::Responder;
|
||||
use config::Config;
|
||||
use sync::AppState;
|
||||
use tools::ToolRegistry;
|
||||
@@ -212,12 +210,8 @@ async fn main() -> anyhow::Result<()> {
|
||||
));
|
||||
let indexer = Arc::new(Indexer::new(os_client.clone(), config.clone()));
|
||||
let evaluator = Arc::new(Evaluator::new(config.clone(), system_prompt_text.clone()));
|
||||
let responder = Arc::new(Responder::new(
|
||||
config.clone(),
|
||||
personality,
|
||||
tool_registry,
|
||||
os_client.clone(),
|
||||
));
|
||||
let tools = tool_registry; // already Arc<ToolRegistry>
|
||||
// personality is already Arc<Personality>
|
||||
|
||||
// Start background flush task
|
||||
let _flush_handle = indexer.start_flush_task();
|
||||
@@ -235,7 +229,8 @@ async fn main() -> anyhow::Result<()> {
|
||||
config: config.clone(),
|
||||
indexer,
|
||||
evaluator,
|
||||
responder,
|
||||
tools: tools.clone(),
|
||||
personality,
|
||||
conversations,
|
||||
agent_registry,
|
||||
conversation_registry,
|
||||
@@ -313,14 +308,14 @@ async fn main() -> anyhow::Result<()> {
|
||||
.unwrap_or_default();
|
||||
let orch = Arc::new(orchestrator::Orchestrator::new(
|
||||
config.clone(),
|
||||
state.responder.tools(),
|
||||
tools.clone(),
|
||||
state.mistral.clone(),
|
||||
state.conversation_registry.clone(),
|
||||
system_prompt_text.clone(),
|
||||
));
|
||||
let grpc_state = std::sync::Arc::new(grpc::GrpcState {
|
||||
config: config.clone(),
|
||||
tools: state.responder.tools(),
|
||||
tools: tools.clone(),
|
||||
store: store.clone(),
|
||||
mistral: state.mistral.clone(),
|
||||
matrix: Some(matrix_client.clone()),
|
||||
|
||||
Reference in New Issue
Block a user