Skip to content

feat: add OpenCode 2 command loop actions - #96

Merged
ByBrawe merged 26 commits into
mainfrom
feat-v2-action-runtime-20260814
Aug 14, 2026
Merged

feat: add OpenCode 2 command loop actions#96
ByBrawe merged 26 commits into
mainfrom
feat-v2-action-runtime-20260814

Conversation

@ByBrawe

@ByBrawe ByBrawe commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • add experimental OpenCode 2 command-action support for ordinary slash commands such as /review --quick
  • detect real session.command and session.shell capabilities separately; prompt-only hosts remain valid, while command loops are rejected with command-capability if command transport is unavailable
  • keep shell actions unsupported because the real @opencode-ai/plugin@next context currently exposes session.command but not session.shell
  • extend the V2 host contract and runtime adapter with normalized command transport using the verified { sessionID, id, arguments, ...optional } request shape; undefined optional fields are omitted before the real host call
  • wire command transport into the experimental plugin only when the host capability is present
  • generalize the idle-safe prompt scheduler to dispatch both prompt and command jobs with the same interval/max-runs/state-persist-before-transport semantics
  • keep /compact outside command transport because the shared V1 actionKind() treats it as the dedicated compact action before forced-command classification
  • add direct command runtime tests, adapter/composition tests, host-contract tests, and capability sentinel coverage
  • strengthen the V2 Lifecycle Contract so the new command tests run on Ubuntu and Windows
  • strengthen the real OpenCode 2 adapter gate to require sessionCommand=true from the actual @opencode-ai/plugin@next context while recording the available session method surface

Branch validation passed syntax, host contract, capability sentinel, and command runtime tests. During validation, two test/wiring issues were caught and fixed: a prompt-only subscribe fixture used the wrong event-subscription shape, and adapter requests carried undefined optional fields. The official PR gates now cover the corrected exact head. Temporary capability-probe 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:34

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.

@ByBrawe
ByBrawe merged commit d40207c into main Aug 14, 2026
12 checks passed
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