Skip to content

chore: updated for OpenCode v2 stable - #4

Merged
danyel117 merged 3 commits into
prevalentWare:mainfrom
Parithosh-Varma:chore/opencode-v2-stable
Oct 13, 2026
Merged

danyel117 merged 3 commits into
prevalentWare:mainfrom
Parithosh-Varma:chore/opencode-v2-stable

Conversation

@Parithosh-Varma

@Parithosh-Varma Parithosh-Varma commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Support stable OpenCode 2 with the current scheduler and keep-alive behavior while preserving the OpenCode 1 entrypoints.

Changes

  • Use exact @opencode/plugin, @opencode/client, @opencode/schema, and @opencode/theme 2.0.16 development types; remove residual preview imports.
  • Validate restored sessions against stable public directory and project identity.
  • Replace the unavailable plugin-context session.active() with its native idle barrier. Bound local waiting explicitly because the stable promise adapter does not forward request-option cancellation; reuse one pending native wait per session and stop local waiters on unload.
  • Use stable theme.text.base/muted, test actual RGBA colors, and align OpenTUI core/solid at 0.5.10.
  • Update stable installation docs and accurately document the pending V2 compaction integration.
  • Rebuild dist/server.js with the integrated ownership and keep-alive changes from Coordinate loop scheduling across OpenCode plugin instances #2/feat: add keep_alive so a background session's future survives its starting turn #3.

Validation

Moved prior node_modules aside and installed with bun install --frozen-lockfile before the full local gate:

  • lint and typecheck passed
  • 91 tests passed, including V1/V2 scheduling, ownership, persistence, keep-alive, active sidebar rendering, and palette registration
  • native idle tests use the real stable context shape without active(), including a pending wait that ignores cancellation
  • build and pack dry-run passed; runtime entrypoints are present in the package

The plugin does not yet integrate the stable V2 compaction hook; the ordinary context reminder remains implemented.

Parithosh-Varma and others added 3 commits September 25, 2026 09:26
Migrate V2 types from the preview alias to stable @opencode/plugin:
- devDeps: @opencode-ai/plugin-v2 (beta-18593 alias) -> @opencode/plugin 2.0.16,
  @opencode-ai/theme -> @opencode/theme 2.0.16, add @opencode/client 2.0.16
- src/server.ts, src/tui.tsx, test/tui-v2.test.ts: import V2/client types
  from @opencode/* instead of @opencode-ai/* preview packages
- tui sidebar: theme.text.default/subdued -> base/muted (stable token names)
- engines: declare opencode >=1.17.1 || >=2.0.0 (dual V1 + V2 support kept)
- README: OpenCode 2 preview section -> stable (install via plugin add)

Verified: bun run typecheck, bun run lint, bun test (51 pass),
bun run build, npm pack --dry-run.
@danyel117
danyel117 merged commit 9c3dbc9 into prevalentWare:main Oct 13, 2026
4 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