feat(v1.0): remove legacy MCP mode and complete Phase 10 migration
This commit completes the Phase 10 migration to MCP-only architecture by removing all legacy mode code paths and configuration options. **Breaking Changes:** - Removed `McpMode` enum from configuration system - Removed `mode` setting from `[mcp]` config section - MCP architecture is now always enabled (no option to disable) **Code Changes:** - Simplified `McpSettings` struct (now a placeholder for future options) - Updated `McpClientFactory` to remove legacy mode branching - Always use MCP architecture with automatic fallback to local client - Added test infrastructure: `MockProvider` and `MockMcpClient` in test_utils **Documentation:** - Created comprehensive v0.x → v1.0 migration guide - Added CHANGELOG_v1.0.md with detailed technical changes - Documented common issues (cloud model 404s, timeouts, API key setup) - Included rollback procedures and troubleshooting steps **Testing:** - All 29 tests passing - Fixed agent tests to use new mock implementations - Updated factory test to reflect new behavior This completes the 10-phase migration plan documented in .agents/new_phases.md, establishing Owlen as a production-ready MCP-only TUI application. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -143,3 +143,45 @@ impl McpClient for LocalMcpClient {
|
||||
self.server.call_tool(call).await
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub mod test_utils {
|
||||
use super::*;
|
||||
|
||||
/// Mock MCP client for testing
|
||||
pub struct MockMcpClient;
|
||||
|
||||
impl MockMcpClient {
|
||||
pub fn new() -> Self {
|
||||
Self
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl McpClient for MockMcpClient {
|
||||
async fn list_tools(&self) -> Result<Vec<McpToolDescriptor>> {
|
||||
Ok(vec![McpToolDescriptor {
|
||||
name: "mock_tool".to_string(),
|
||||
description: "A mock tool for testing".to_string(),
|
||||
input_schema: serde_json::json!({
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"query": {"type": "string"}
|
||||
}
|
||||
}),
|
||||
requires_network: false,
|
||||
requires_filesystem: vec![],
|
||||
}])
|
||||
}
|
||||
|
||||
async fn call_tool(&self, call: McpToolCall) -> Result<McpToolResponse> {
|
||||
Ok(McpToolResponse {
|
||||
name: call.name,
|
||||
success: true,
|
||||
output: serde_json::json!({"result": "mock result"}),
|
||||
metadata: HashMap::new(),
|
||||
duration_ms: 10,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user