Skip to content

Releases

v1.2.1 - Revert to 2026-09-02

Choose a tag to compare

@smapira smapira released this 04 Sep 11:59
Immutable release. Only release title and notes can be modified.

Revert main to 2cc1c7b (2026-09-02 v1.2.0) which is the last known good before v2 breakage. v2.0.0-2.0.11 are deprecated.

  • Revert to feat: add usage statistics via {{ usage }} (1.2.0)
  • Bump to 1.2.1 for re-release
  • dist 16.54KB, 81 pass

v2.0.9 — V1/V2 hybrid and Orca shared delegation

Choose a tag to compare

@smapira smapira released this 03 Sep 19:36
Immutable release. Only release title and notes can be modified.

2.0.9 — fix: V1/V2 hybrid and Orca shared delegation (2026-09-04)

Fixed

  • V1 host mis-dispatch fix: Orca shared plugins on opencode 1.18.x with ctxKeys 9 now delegate to V1 DailyLogbookPlugin (isV1Host detection, Skipping v2)
  • Hybrid default restored: Object.assign hybrid so V1 callable and V2 object checks both pass
  • Cache self-detection: README Verify (9 places) + scripts/complete-uninstall.sh v5 (7 places) + verify-diagnostic-logs.ts

dist 32.35KB, bun test 85 pass

v2.0.5 - make default object for V2 host

Choose a tag to compare

@smapira smapira released this 03 Sep 15:13
Immutable release. Only release title and notes can be modified.

Fixed

  • V2 host Expected object: 2.0.4 hybrid was function with id/setup/effect, but opencode2's PluginModule expects default to be object (Expected object at ["default"]) so failed to load plugin. Changed export default to {id, setup: v2Setup, effect: v2Setup} object for V2. DailyLogbookPlugin (V1 function) kept as named export.
  • Note: 2.0.5 is opencode2-only. opencode 1.18.27 V1 will get TypeError for 2.0.5, use 2.0.3 for V1.

Verified

  • npx eslint . 0, npx tsc --noEmit 0, bun test 85 pass, dist 24.0KB

Full Changelog: v2.0.4...v2.0.5

v2.0.4 - support both subscribe styles

Choose a tag to compare

@smapira smapira released this 03 Sep 14:45
Immutable release. Only release title and notes can be modified.

Fixed

  • V2 host E2E: v2Setup only handled subscribe({signal})=>AsyncIterable (promise) so opencode2 v0.0.0-beta-18999 with subscribe("session.idle")=>Stream (effect) stayed idle. Made v2Setup try both via resolveV2Iterable/trySubscribeEffect/isAsyncIterable/runV2EventLoop extracted to keep complexity <20.
  • tryCreateV2Plugin now tries both "@opencode-ai/plugin" (setup) and "@opencode-ai/plugin/effect" (effect) defines, fallback is {id, setup, effect} so both hosts pass.
  • Verified: mock effect and promise both PASS, npx eslint . 0, npx tsc --noEmit 0, bun test 85 pass, dist 24.13KB.

Full Changelog: v2.0.3...v2.0.4

v2.0.3 - refactor complexity 20

Choose a tag to compare

@smapira smapira released this 03 Sep 14:36
Immutable release. Only release title and notes can be modified.

Changed

  • eslint 準拠リファクタ: eslint.config.mjs を globals + complexity:20 に更新。daily-logbook.ts の複雑度違反 3件 (getUsageStats 29, event 27, handleV2IdleEvent 56) を解消。getUsageStats をヘルパーに抽出、event/handleV2IdleEvent の重複 170行を generateDailyLogbookCore + SessionAdapter に集約し各関数を 20 以下に。
    • package.json に globals@^17.12.0 追加
    • dist/index.js 23.43 KB に再ビルド

Verified

  • npx eslint . 0
  • npx tsc --noEmit 0
  • bun test 85 pass
  • bun run build 23.43 KB

Full Changelog: v2.0.2...v2.0.3

v2.0.2 - hybrid default for V1/V2

Choose a tag to compare

@smapira smapira released this 03 Sep 13:01
Immutable release. Only release title and notes can be modified.

Fixed

  • opencode2 check failed: opencode2 plugin update failed with Failed to check Server plugin "opencode-autopilot-logbook": Plugin must export a default definition with an id and an effect or setup function. because cached dist/index.js has no node_modules/@opencode-ai/plugin so isBetaPluginAvailable() returned false and default stayed as V1 function without id.
    • Changed default to hybrid: DailyLogbookPlugin function with id/setup/effect attached, so stable 1.18.27 calls it as function and beta opencode2 sees id/setup and passes validation.
    • DailyLogbookPluginV2 kept as plain {id, setup}.

E2E

  • bun test 85 pass, dist 25.32 KB
  • opencode2 plugin list shows opencode-autopilot-logbook under plugins, plugin update check should now pass.

Full Changelog: v2.0.1...v2.0.2

v2.0.1 - fix beta ESM-only detection

Choose a tag to compare

@smapira smapira released this 03 Sep 12:27
Immutable release. Only release title and notes can be modified.

Fixed

  • beta ESM-only: @opencode-ai/plugin@beta is ESM-only (exports "." has only import), so require("@opencode-ai/plugin") fails with No "exports" main defined and default fell back to V1 even on beta. Added isBetaPluginAvailable() that checks package.json version via fileURLToPath(import.meta.url) + existsSync/readFileSync (candidates: dist/../node_modules, ../../node_modules, cwd/node_modules) — if version includes beta → return V2. Fallback to createRequire for stable CJS.

  • tryCreateV2Plugin now documents ESM fallback plain object is accepted by beta host (Plugin.define is identity).

E2E (beta)

  • npx @opencode-ai/cli@beta --version → opencode2 v0.0.0-beta-18999
  • handleV2IdleEvent (flat get/context/create/prompt, ctx.location.directory, console sink) and v2Setup (ctx.event.subscribe({signal}) => AsyncIterable + event.data.sessionID) verified via mock ctx (see bun /tmp/beta-e2e-v2setup.mjs — both PASS)
  • bun test 85 pass on stable 1.18.27 (^1.0.0), dist 26.50 KB
  • default is V2 (smapira.daily-logbook) on beta, V1 function on stable — verified via bun /tmp/test-v2.mjs

Full Changelog: v2.0.0...v2.0.1

v2.0.0 - BREAKING: v2 dual support

Choose a tag to compare

@smapira smapira released this 03 Sep 11:32
Immutable release. Only release title and notes can be modified.

BREAKING: v2 dual support

This release adds dual V1/V2 compatibility for opencode-autopilot-logbook.

BREAKING

  • V2 Plugin API: DailyLogbookPlugin (V1) kept, plus Plugin.define({ id: "smapira.daily-logbook", setup(ctx) }) for V2. See daily-logbook.ts API table for event.data.sessionID vs properties, ctx.session.get({sessionID}) vs path:{id}, ctx.app.log → console.
    • ctx.app.log does not exist in V2 (ctx.app is {name,version,channel} only) → replaced with console.warn/error via AppLogSink
    • ctx.location.directory replaces directory
    • promise subscribe({signal}) => AsyncIterable vs effect subscribe(type):Stream

Added

  • DailyLogbookPluginV2 + handleV2IdleEvent (testable extraction). Falls back to plain object on stable 1.18.x so bun test stays green; Plugin.define on @opencode-ai/plugin@beta.
  • AppLogSink abstraction, 4 new V2 tests (85 pass total), 25.40KB bundle

Changed

  • package.json stays on ^1.0.0 on main; switch to beta on beta branch: npm i -D @opencode-ai/plugin@beta + npx opencode@beta
  • README: new ## Compatibility section (V1 stable / V2 beta dual support) with plugins: [{ package }] example
  • .gitignore: keep dist/index.js tracked for npm publish

Migration

npm i -D @opencode-ai/plugin@beta  # beta branch only
npx opencode@beta --version
opencode --standalone  # beta
# opencode.json: { "plugins": [{ "package": "opencode-autopilot-logbook" }] }

See CHANGELOG.md and documents/plans/dev/20260903_v2-compat.md for full migration notes. During beta the V2 API may still break.

Full Changelog: v1.2.0...v2.0.0