mirror of
https://github.com/lukaszraczylo/harness-sync.git
synced 2026-10-17 01:17:35 +00:00
fix(adapters): ground native schemas, merge-not-replace, add goose/cagent/zed
- common/mcp.go: MCPStyle enum + BuildMCPMapStyled for claude/crush/opencode/zed dialects - common/jsonmerge.go: MergeJSONKeys (JSON-first, JSONC fallback) preserves user keys; fix: try plain json.Unmarshal before StripJSONComments to avoid mangling URLs with // - common/yamlmerge.go: MergeYAMLKeys for YAML configs (goose) - common/blocks.go: add ProvidersAsMap for opencode map-shaped provider key - claudecode: merge settings.json (preserves hooks/permissions/env); MCPClaudeStyle (no type field) - crush: fix mcp key (was mcpServers); MCPCrushStyle entries include type field; merge crush.json; fix import key mcp - kilo: drop providers key (kilo has none); MCPOpencodeStyle (local/remote); merge kilo.json - opencode: fix provider (singular map) + model (not default_model); MCPOpencodeStyle; merge jsonc; fix import key mcp - goose: new adapter — YAML merge, extensions map, splitProviderModel, import reconstructs MCP from extensions - cagent: new adapter — renders starter default.yaml, import returns empty - zed: new adapter — merge settings.json, context_servers (MCPZedStyle) + agent.default_model - docs: append Grounded harness schemas section to design spec
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package zed
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/lukaszraczylo/harness-sync/internal/adapter"
|
||||
"github.com/lukaszraczylo/harness-sync/internal/adapter/common"
|
||||
)
|
||||
|
||||
func importFrom(home string) (*adapter.ImportResult, error) {
|
||||
cfgPath := filepath.Join(home, ".config", "zed", "settings.json")
|
||||
// context_servers entries use source:"custom" for stdio; the MCP command
|
||||
// field maps directly to canonical MCPServer.Command.
|
||||
servers, err := common.ImportMCPFromJSONFile(cfgPath, "context_servers")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &adapter.ImportResult{MCP: servers}, nil
|
||||
}
|
||||
Reference in New Issue
Block a user