Skip to content

fix: correct OpenCode 2 command transport - #97

Open
ByBrawe wants to merge 14 commits into
mainfrom
feat-v2-compact-runtime-20260814
Open

fix: correct OpenCode 2 command transport#97
ByBrawe wants to merge 14 commits into
mainfrom
feat-v2-compact-runtime-20260814

Conversation

@ByBrawe

@ByBrawe ByBrawe commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • fix the OpenCode 2 command transport introduced in feat: add OpenCode 2 command loop actions #96: the real @opencode-ai/plugin@next wrapper treats id as an optional msg_... message ID, not the slash-command name
  • send command names through the verified command field instead, using { sessionID, command, arguments? }
  • update the host contract, runtime adapter, and idle-safe prompt/command scheduler to use the corrected request shape and reject the old { id: "review" } shape
  • omit id entirely from command-loop dispatches
  • strengthen command runtime, host-contract, and adapter/composition tests with exact request-shape assertions
  • strengthen the real OpenCode 2 adapter probe so it creates a real session and invokes an intentionally missing command through the command field; the official gate requires the host error Command not found: <sentinel>, which would fail differently if id were used again
  • real-host probing also confirmed that session.command({ command: "compact" }) returns Command not found: compact, and the empty command registry contains no compact entry, so /compact remains deliberately unsupported in the V2 runtime
  • shell actions also remain deliberately unsupported because the real plugin context currently exposes no session.shell

Branch validation passed syntax, V2 host/command/adapter contracts, the complete existing test suite, git diff --check, and the real @opencode-ai/plugin@next command-field probe. Temporary validation workflow was removed before this PR. Package version remains 0.5.28.

Copilot AI lite review requested due to automatic review settings August 14, 2026 13:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants