Repository navigation
Releases
v1.2.1 - Revert to 2026-09-02
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
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
Fixed
- V2 host
Expected object:2.0.4hybrid was function withid/setup/effect, butopencode2'sPluginModuleexpectsdefaultto beobject(Expected object at ["default"]) sofailed to load plugin. Changedexport defaultto{id, setup: v2Setup, effect: v2Setup}object for V2.DailyLogbookPlugin(V1 function) kept as named export. - Note:
2.0.5isopencode2-only.opencode1.18.27 V1 will getTypeErrorfor2.0.5, use2.0.3for V1.
Verified
npx eslint .0,npx tsc --noEmit0,bun test85 pass,dist 24.0KB
Full Changelog: v2.0.4...v2.0.5
v2.0.4 - support both subscribe styles
Fixed
- V2 host E2E:
v2Setuponly handledsubscribe({signal})=>AsyncIterable(promise) soopencode2 v0.0.0-beta-18999withsubscribe("session.idle")=>Stream(effect) stayed idle. Madev2Setuptry both viaresolveV2Iterable/trySubscribeEffect/isAsyncIterable/runV2EventLoopextracted to keep complexity <20. tryCreateV2Pluginnow 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 --noEmit0,bun test85 pass,dist 24.13KB.
Full Changelog: v2.0.3...v2.0.4
v2.0.3 - refactor complexity 20
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.js23.43 KB に再ビルド
Verified
npx eslint .0npx tsc --noEmit0bun test85 passbun run build23.43 KB
Full Changelog: v2.0.2...v2.0.3
v2.0.2 - hybrid default for V1/V2
Fixed
- opencode2 check failed:
opencode2 plugin updatefailed withFailed to check Server plugin "opencode-autopilot-logbook": Plugin must export a default definition with an id and an effect or setup function.because cacheddist/index.jshas nonode_modules/@opencode-ai/pluginsoisBetaPluginAvailable()returnedfalseand default stayed as V1 function withoutid.- Changed
defaultto hybrid:DailyLogbookPluginfunction withid/setup/effectattached, so stable1.18.27calls it as function and betaopencode2seesid/setupand passes validation. DailyLogbookPluginV2kept as plain{id, setup}.
- Changed
E2E
bun test85 pass,dist 25.32 KBopencode2 plugin listshowsopencode-autopilot-logbookunderplugins,plugin updatecheck should now pass.
Full Changelog: v2.0.1...v2.0.2
v2.0.1 - fix beta ESM-only detection
Fixed
-
beta ESM-only:
@opencode-ai/plugin@betais ESM-only (exports "."has onlyimport), sorequire("@opencode-ai/plugin")fails withNo "exports" main definedanddefaultfell back to V1 even on beta. AddedisBetaPluginAvailable()that checkspackage.jsonversion viafileURLToPath(import.meta.url)+existsSync/readFileSync(candidates:dist/../node_modules,../../node_modules,cwd/node_modules) — ifversionincludesbeta→ return V2. Fallback tocreateRequirefor stable CJS. -
tryCreateV2Pluginnow documents ESM fallback plain object is accepted by beta host (Plugin.defineis identity).
E2E (beta)
npx @opencode-ai/cli@beta --version→opencode2 v0.0.0-beta-18999handleV2IdleEvent(flatget/context/create/prompt,ctx.location.directory,consolesink) andv2Setup(ctx.event.subscribe({signal}) => AsyncIterable+event.data.sessionID) verified via mockctx(seebun /tmp/beta-e2e-v2setup.mjs— both PASS)bun test85 pass on stable1.18.27(^1.0.0),dist 26.50 KBdefaultisV2 (smapira.daily-logbook)on beta,V1 functionon stable — verified viabun /tmp/test-v2.mjs
Full Changelog: v2.0.0...v2.0.1
v2.0.0 - BREAKING: v2 dual support
BREAKING: v2 dual support
This release adds dual V1/V2 compatibility for opencode-autopilot-logbook.
BREAKING
- V2 Plugin API:
DailyLogbookPlugin(V1) kept, plusPlugin.define({ id: "smapira.daily-logbook", setup(ctx) })for V2. Seedaily-logbook.tsAPI table forevent.data.sessionIDvsproperties,ctx.session.get({sessionID})vspath:{id},ctx.app.log→console.ctx.app.logdoes not exist in V2 (ctx.appis{name,version,channel}only) → replaced withconsole.warn/errorviaAppLogSinkctx.location.directoryreplacesdirectory- promise
subscribe({signal}) => AsyncIterablevs effectsubscribe(type):Stream
Added
DailyLogbookPluginV2+handleV2IdleEvent(testable extraction). Falls back to plain object on stable 1.18.x sobun teststays green;Plugin.defineon@opencode-ai/plugin@beta.AppLogSinkabstraction, 4 new V2 tests (85 pass total), 25.40KB bundle
Changed
package.jsonstays on^1.0.0onmain; switch tobetaon beta branch:npm i -D @opencode-ai/plugin@beta+npx opencode@beta- README: new
## Compatibilitysection (V1 stable / V2 beta dual support) withplugins: [{ package }]example .gitignore: keepdist/index.jstracked 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