Plexus
Plexus copied to clipboard
Support OpenCode
What
Add OpenCode (https://github.com/anomalyco/opencode) as a built-in agent in Plexus so it can be detected and synced like the other agents.
Paths
OpenCode keeps its global config at ~/.config/opencode/:
- Skills:
~/.config/opencode/skills/<name>/SKILL.md(Anthropic SKILL.md; frontmatter onlyname/description/license/compatibility/metadata`) - Instruction file:
~/.config/opencode/AGENTS.md - MCP:
~/.config/opencode/opencode.jsonunder themcpkey (NOTmcpServers), with alocal/remoteshape (commandarray,environment,url,headers)
Detection
Detect via the opencode command on PATH.
Notes
- OpenCode's MCP shape differs from the other JSON agents (
mcpkey,local/remotetype,commandas an array,environmentinstead ofenv), so it needs a dedicated adapter for partial-write and a dedicated import reader.
Implemented in d43e311.
- Added
opencodeas a built-in agent with config root~/.config/opencode:- Skills:
~/.config/opencode/skills/<name> - Instruction file:
~/.config/opencode/AGENTS.md - MCP:
~/.config/opencode/opencode.jsonunder themcpkey
- Skills:
- Dedicated adapter (
packages/core/src/agents/adapters/opencode.ts) for the OpenCode MCP shape (local/remote,commandarray,environment), with partial-write that preserves other config keys. - Import reader handles the
mcpkey for native MCP discovery. - Unit tests in
opencode.test.ts(partial-write + local/remote import) anddetect.test.ts(CLI detection + paths).