feat: official OpenCode compatibility (sidebar, hooks, AGENTS.md, orchestration)#17
Merged
Conversation
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
injectWmuxBlock duplicated the source's trailing newline on every run, growing AGENTS.md by a blank line each wmux launch. Normalize the block's trailing whitespace; add regression tests for newline-terminated sources. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- pluginNeedsUpdate fails safe (reinstall) when source lacks a version marker - throttle message.part.updated active pings to avoid per-token CLI spawns - omit empty tool name; coerce '' to undefined so it doesn't clobber lastTool - bump plugin to v2 so installs refresh Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings wmux to full feature parity with OpenCode (SST
opencode, v1.2.6+), matching the existing Claude Code integration, via OpenCode's official plugin API rather than TUI scraping.resources/opencode-plugin/wmux.js, auto-installed to~/.config/opencode/plugin/wmux.js) translates OpenCode hooks/events intowmuxCLI calls. A new agent-agnosticagent.activitypipe method +applyExternalActivity()feed the same sidebar store/IPC Claude uses, so the UI is unchanged.tool.execute.after→wmux hook(parity with Claude PostToolUse).ensureOpencodeContext()writes the wmux CLI usage block into~/.config/opencode/AGENTS.md(marker-delimited, never clobbers user content, idempotent).launch-agent.jshonorsWMUX_AGENT_CMD=opencodeto spawnopencode runworkers in panes.wmux agent-activityverb (defaults surface to$WMUX_SURFACE_ID).Design + plan:
docs/superpowers/specs/2026-06-01-opencode-compatibility-design.md,docs/superpowers/plans/2026-06-01-opencode-compatibility.md.Verification
opencode run --print-logs); plugin dir isplugin/(singular) — verified against the binary; docs sayingplugins/are wrong for this build.tests/unit/agent-activity.test.ts,tests/unit/opencode-context.test.ts.WMUX !== '1'; all shell-outs useexecFile(no shell, no injection surface) and are fire-and-forget (can't crash OpenCode).Test Plan
opencodein a pane → sidebar shows tool activity and flips to idle onsession.idlegrep wmux:start ~/.config/opencode/AGENTS.mdandls ~/.config/opencode/plugin/wmux.jspresent after launch/wmux:orchestratewithWMUX_AGENT_CMD=opencodespawns anopencode runworker in a new paneNote: 5 pre-existing
pty-managertest failures are environmental (node-pty/conpty) and unrelated to this branch.🤖 Generated with Claude Code