[ahma_core] Extract agent loop and connection manager to core/mcp daemon#261
Merged
Conversation
- Move agent execution loop from ahma_tui to ahma_core::agent (Phase 1) - Move connection manager and discovery from ahma_tui to ahma_mcp::mcp_client (Phase 2) - Wire routing of external tool calls (::) directly into AhmaMcpService - Implement dynamic directory/project auto-scoping in Sandbox when no roots are received - Clean up deprecated documentation and fix collapsible_if and too_many_arguments clippy lints
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements Phase 1 and Phase 2 of the Control Plane Redesign plan:
1. Extract Agent Harness to Core (Phase 1)
execute_agent_turnloop and LLM communication out ofahma_tui/src/llm_bridge.rsintoahma_core/src/agent.rs.push_tool_message_with_hints, etc.).2. Move MCP Client Management to Daemon (Phase 2)
McpConnectionManagerout ofahma_tui/src/mcp_connections.rsintoahma_mcp/src/mcp_client.rs.mcp.jsonIDE client config discovery to the daemon.ahma servetool call dispatch (AhmaMcpService).ahma_mcp/tests/external_mcp_routing_test.rs.3. Sandbox Project Auto-Scoping Fallback
ahma_mcp/src/sandbox/core.rs(checking for.git,Cargo.toml, etc.) when noroots/listrequest is received from the client.4. Code Quality
harness-epoch.md,plan.md,refactor-ideas.md).