Skip to content

Feat/opencode v2 migration - #89

Closed
JeanLucBou wants to merge 6 commits into
nigel-dev:mainfrom
JeanLucBou:feat/opencode-v2-migration
Closed

JeanLucBou wants to merge 6 commits into
nigel-dev:mainfrom
JeanLucBou:feat/opencode-v2-migration

Conversation

@JeanLucBou

Copy link
Copy Markdown

Summary

Brief description of the changes.

Changes

Testing

  • bun run build passes
  • bun test passes
  • Manual testing done (if applicable)

Notes

Any additional context or trade-offs worth mentioning.

- Replace @opencode-ai/plugin and @opencode-ai/sdk with @opencode/plugin and @opencode/client 2.x
- Rewrite entrypoint with Plugin.define/setup(ctx), tool and command transforms, session/tool hooks, event subscription and RPC toasts
- Migrate all 18 tools to V2 definitions returning { content }
- Migrate SDK client, monitor events, notifications, question relay and model tracking
- Add TUI part (src/tui.ts) and RPC contract (src/rpc.ts) for toast notifications
- Update tests, CI, docs and package exports for V2
- Generate and propagate a per-job server password (V2 serve always requires auth)
- Detect completion via session.execution.succeeded (serve never emits idle)
- Answer V2 question forms instead of posting prompts that do not unblock the tool
- Use resume:false for synthetic command/notification output (no model turn)
- Backfill pending permissions and reconcile finished sessions on SSE subscribe
- Treat shell command strings as commands, not paths, when evaluating policy
- Relay permission prompts through the control-center notifier, not the job server
- run vanilla plan jobs via 'opencode run' (TUI has no top-level -m flag)
- do not treat a vanished pane with no exit status as success
- bind the plugin location into mc_report and thread cwd through job state/reports
- allow valid plan transitions running -> creating_pr/completed
… TUI

- store pre_merge/pre_pr approvals in plan.json so mc_plan_approve works across processes\n- honor and consume persisted merge approvals in the reconciler\n- route orchestrator toasts through the global RPC toast channel\n- emit auto-status toasts on session.execution.succeeded in V2\n- document the separate cli.json entry required for TUI notifications\n- add regression tests for persisted supervisor approvals
@JeanLucBou JeanLucBou closed this Nov 8, 2026
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.

1 participant