wigolo
wigolo copied to clipboard
opencode: verify/finish MCP wiring or remove from the agent list (unverified format, no instructions handler, unmarketed)
Surfaced while fixing the antigravity agent-support bug (#155). opencode is the inverse case: it's offered by the CLI but only partially built and unverified.
Current state
- In
KNOWN_AGENT_IDS(src/cli/tui/flags-types.ts) →--agents=opencodeis accepted and it shows up in the "Valid:" list on a bad--agentsvalue. - Has a detection descriptor (
src/cli/tui/agents.ts) →detectAgents()returns it; configPath~/.config/opencode/config.json. - In
JSON_SPECS(src/cli/tui/config-writer.ts) →applyConfigswrites{ command: 'npx', args: ['-y','wigolo'], type: 'local' }at key pathmcp.wigolo. - No registry handler (
src/cli/agents/has noopencode.ts) →init's instructions loop hitsif (!handler) continueand silently skips the instructions block. - Not marketed anywhere (absent from README, site,
llms.txt).
Concerns to verify against real OpenCode
- Config format looks wrong. OpenCode's documented MCP schema expects
commandas an array ("command": ["npx","-y","wigolo"]) plus"enabled": true, whereas wigolo writes acommandstring + separateargs(themcpServers-style shape). If so, the config wigolo writes won't load in OpenCode. - Config filename/path. OpenCode typically reads
opencode.json(project) or~/.config/opencode/opencode.json, not~/.config/opencode/config.json. Confirm the correct location. - No instructions layer (the silent-skip). Either add an
opencodeHandler(registry) or accept MCP-only with no instructions.
Options
- Finish it: add an
opencode.tsregistry handler (or a config-writer branch) that writes the correct OpenCode schema to the correct file, verify end-to-end against a real OpenCode install, then add it to the marketed agent list. - Remove it: drop
opencodefromKNOWN_AGENT_IDS, the detection descriptor, and theAgentIdtype until it's verified — so the CLI stops offering an agent it can't correctly wire.
Notes
- The consistency guard added in #155 (
tests/unit/cli/agents/agent-support-consistency.test.ts) currently PASSES for opencode (it has a config-writer path) — it guards seam presence, not format correctness. Whichever option is chosen, keep that test green. - Related dead code (separate cleanup): the per-agent registry handlers each define an
installMcpthat nothing calls; the live MCP writer isconfig-writer.ts. Worth removing the vestigialinstallMcpto avoid future confusion.
I opened #204 with a focused OpenCode integration fix. It writes the documented global schema, migrates the owned legacy entry safely, and adds precise uninstall, status, backup, and failure-path coverage. The targeted suite, lint, build, and a real OpenCode MCP smoke check are passing.