Repository navigation
Port four plugins to OpenCode V2 (format-on-save, git-tools, inbox, session) - #237
Merged
Merged
Conversation
…affold - Canonicalize branch + sitrep into utils/ and vendor them back into plugins-claude/session byte-for-byte (previously unmanaged copies that could drift silently; now covered by sync --check). - sync.sh manifest becomes target-aware (NEEDS_CLAUDE / NEEDS_OPENCODE); --check covers plugins-opencode drift with the same CI gate. - New validate-opencode.sh (separate from the Claude/Copilot-specific validate-plugins.sh) wired into CI + validate-all.sh parity. - plugins-opencode/ scaffold: inbox (RPC + server + TUI stub proving the install shape) and session (server stub); vendored scripts in place. - tests/opencode: sync target-awareness/drift, validator clean/dirty fixtures. Refs #236
…aude hook Config-only port: OpenCode's built-in formatter replaces the PostToolUse hook. The snippet mirrors the hook's dispatch table exactly (same tools, flags, extension set) so cross-harness edits produce no second diff; the prettier built-in's extension set is narrowed to drop its .md/.toml collision with rumdl/taplo. test-format-on-save-parity.sh parses both the hook's case block and the jsonc and fails on any drift in either direction (39 checks). Refs #236
Port git-wait + ship skills with OpenCode-only edits: skill-relative script paths (base dir is provided at load), Claude frontmatter dropped, $ARGUMENTS wording generalized. /ship command door passes arguments through. Ships as a config snippet (skills array + commands), no code. sync.sh OpenCode manifest now supports nested keys so scripts vendor into each skill's own dir (private base dir pattern). tests/opencode: git-tools port fidelity suite (27 checks: vendored copies byte-identical, no Claude leakage, ship's 9 steps intact, body diff vs Claude original modulo intended edits); sync fixture updated. Refs #236
utils/inbox gains an optional `blocking` field on questions (--blocking, default false, backfilled via NORMALIZE). Question semantics unchanged: notify-on-stop's count-questions contract holds (149 existing inbox tests green). Server plugin: agent-toolkit.inbox RPC (snapshot/triage) implemented over the vendored CLI so all harnesses share one state file; fs.watch on the state dir emits debounced `changed` events; session.created drops one keyed instruction hint (replaces the Claude hook loop); registers inbox:questions/decisions/followups/show commands. Answer feedback: synthetic message (resume) or instruction entry (stay parked), best-effort. TUI plugin: home.footer.status flag, sidebar open-questions block, /inbox triage panel (answer/acknowledge/refresh, zero model tokens), attention.notify on blocking questions + native form/permission stops. Snapshot-on-mount seeds the store (RPC events are live-only). Verified live against opencode 2.2.6: plugin loads, RPC snapshot/triage round-trip through the HTTP API, commands register. TS typechecks against @opencode/plugin 2.2.7 (tsc --noEmit clean). tests: inbox blocking suite (10), core module node suite (10), existing suites untouched and green. Refs #236
Canonicalize spine.md into utils/ and vendor it back into plugins-claude/session byte-for-byte (proven via git show | cmp); sync.sh gains util:dir destination syntax and renders markdown for the opencode target through utils/opencode-port.py — the single-source Claude→OpenCode harness mapping (EnterWorktree→worktree_create/ session_move, ExitWorktree→session_move/worktree_remove, EnterPlanMode→ plan agent, AskUserQuestion→question tool, subagent_type→agent, Workflow script→orchestrate_build, rename-session→session_rename, slash doors). sync also carries the exec bit through rendered vendoring. Five session skills ported via utils/port-session-skills.py (re-runnable; test-session-port.sh fails if the tree diverges from porter(original)). orchestrate-core.ts is a pure port of the Claude Workflow script's deterministic half (tier bump, wave/dependency skip, output-block parse as retry trigger, 3-attempt escalation, findings dedupe/split, capped semaphore); src/index.ts wires it to ctx.session children as the orchestrate_build tool and registers the five slash doors. Model tiers fuzzy-match ctx.model.list() with options.modelTiers override. Live-verified on opencode 2.2.6: plugin loads, all five skills discovered, all five door commands registered; TS typechecks clean. tests: session-core node suite (25: bump/parse/validate/planWave/ findings/semaphore/prompts), session port fidelity (65: leakage grep, porter-output equality, byte-identical vendored scripts, rendered spine == opencode-port output), sync suite extended for util:dir + rendered markdown drift (21). Full repo suite 956 green; Claude/Copilot trees byte-for-byte unchanged. Refs #236
Session plugin: - orchestrate_build: a throwing review child no longer kills the whole run (each reviewer task is guarded; a failed reviewer reports a 'not reviewed' concern instead of discarding all Execute work — parity with the Claude workflow's null-agent tolerance). - ctx.session.wait gets a deadline (options.childTimeoutMs, default 45m) so a child stuck on a permission/form can't hang the parent turn. - perChunk now echoes resolvedModel so tier-resolution no-ops are visible. - Re-review merge extracted to orchestrate-core.mergeReReview (+3 tests). Session port fidelity (reviewer-found content bugs): - session-orchestrate now vendors reference/spine.md (it instructs 'Run reference/spine.md Phase 0' — the file was missing). - Porter maps the spine's Claude worktree.symlinkDirectories/.claude/ settings.local.json provisioning procedure to OpenCode's manual symlink flow (worktree config only takes 'directory'), fixes the orchestrate skill's false 'provisions deps, switches the session in' parenthetical, maps bare `Agent` tool references → subagent tool (general-purpose→general, Plan→plan), and replaces the false per-wave-progress claim with the honest single-result wording. - Deleted orphaned plugins-opencode/session/scripts/ copies (manifest moved to per-skill dirs in M4; nothing vendored there anymore). Inbox plugin: - Footer slot now seeds the store (events are live-only; previously it stayed empty until the first inbox write). - Session hint also seeds on session.execution.started so sessions that predate plugin install learn the CLI path (keyed put is idempotent). - Event subscription loop wrapped (no unhandled rejection on abort/error). - form/permission pings filtered to the current session; panel triage errors surfaced in-panel instead of silently keeping stale rows. utils/inbox: update gains --blocking/--no-blocking (question-only) so a parked question can be escalated without --new; vendored copies re-synced. sync.sh: --check now detects exec-bit drift both ways (git tracks it; a bad merge dropping +x no longer false-passes); sync applies canonical modes (0644 / +x) instead of inheriting mktemp 0600. Tests: sync exec-bit drift + repair (5), session-port reference/ cross-check + expanded leak greps + porter-split guard (+9), session-core mergeReReview (+3), inbox update blocking semantics (+3), format-parity parser hardened (non-fmt_ arms fail loudly, multi-invocation functions fail loudly). Full suite 976 green; live-verified enum validation and cli_failed error path against opencode 2.2.6. Refs #236
This was referenced Nov 11, 2026
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.
Implements #236. Pure-addition third harness:
plugins-opencode/joinsplugins-claude/andplugins-copilot/.What ships (one commit per milestone)
sync.shmanifest becomes target-aware (NEEDS_CLAUDE/NEEDS_OPENCODE, nested keys,util:dirdestinations, markdown rendered throughutils/opencode-port.py); newvalidate-opencode.shwired into CI;branch/sitrep/spine.mdcanonicalized intoutils/and vendored byte-identically back into the Claude plugin (they were unmanaged copies that could drift silently).formattersnippet mirroring the Claude hook's dispatch table (same tools, flags, extension set). A parity test parses both sides and fails CI on drift in either direction.git-wait+shipskills ported (skill-relative script paths, per-skill vendoring),/shipcommand door. Ships as a config snippet, no code.fs.watch→changedevents, session hint via keyed instruction entry, four read commands) + TUI plugin (footer flag, sidebar,/inboxtriage panel, attention pings on blocking questions / forms / permissions).utils/inboxgains an optionalblockingfield on questions (--blocking,update --blocking/--no-blocking, default false, backfilled) — additive, question-only, notify-on-stop's count-questions contract test-pinned.EnterWorktree→worktree_create/session_move,EnterPlanMode→planagent,AskUserQuestion→questiontool,Workflowscript→orchestrate_buildtool, etc.).orchestrate_buildis a faithful port of the Claude workflow script's deterministic half (waves, dependency skip, 3-attempt escalation, review/auto-fix cap 2) wired to OpenCode child sessions; five slash doors registered by the plugin.Agent-tool mapping bugs, TUI footer seeding, resumed-session hint, wait deadline, and more).Verification
validate-opencode,validate-plugins, shell lint, CI-parity all green; both TS plugins typecheck against@opencode/plugin2.2.7.cli_failedpath), all commands and skills register.git diff ab80a81~1 HEAD -- plugins-claude plugins-copilotshows only the two vendoredinboxcopies (the additiveblockingfield). Copilot untouched; Claude copies of canonicalized utils are byte-for-byte unchanged.Refs #236