feat(opencode): complete Phase 4 - MCP sync module

Add mcp/opencode.rs with format conversion between CC Switch and OpenCode:
- stdio ↔ local type conversion
- command+args ↔ command array format
- env ↔ environment field mapping
- sse/http ↔ remote type conversion

Public API:
- sync_enabled_to_opencode: Batch sync all enabled servers
- sync_single_server_to_opencode: Sync individual server
- remove_server_from_opencode: Remove from live config
- import_from_opencode: Import servers from OpenCode config

Also fix test files to include new opencode field in McpApps struct.
All 4 unit tests pass for format conversion.
This commit is contained in:
Jason
2026-01-15 16:11:25 +08:00
parent a30d72bb68
commit 7ea2c3452b
6 changed files with 428 additions and 0 deletions

View File

@@ -88,6 +88,7 @@ command = "say"
claude: false,
codex: true,
gemini: false,
opencode: false,
},
description: None,
homepage: None,