2025-12-30 21:25:46 -08:00
|
|
|
{
|
|
|
|
|
"name": "@plannotator/opencode",
|
2026-08-10 17:00:33 -07:00
|
|
|
"version": "0.26.8",
|
2026-06-04 18:14:05 -07:00
|
|
|
"type": "module",
|
2025-12-30 21:25:46 -08:00
|
|
|
"description": "Plannotator plugin for OpenCode - interactive plan review with visual annotation",
|
|
|
|
|
"author": "backnotprop",
|
2026-02-12 09:55:14 -08:00
|
|
|
"license": "MIT OR Apache-2.0",
|
2025-12-30 21:25:46 -08:00
|
|
|
"repository": {
|
|
|
|
|
"type": "git",
|
|
|
|
|
"url": "git+https://github.com/backnotprop/plannotator.git",
|
|
|
|
|
"directory": "apps/opencode-plugin"
|
|
|
|
|
},
|
|
|
|
|
"homepage": "https://github.com/backnotprop/plannotator",
|
|
|
|
|
"bugs": {
|
|
|
|
|
"url": "https://github.com/backnotprop/plannotator/issues"
|
|
|
|
|
},
|
|
|
|
|
"keywords": [
|
|
|
|
|
"opencode",
|
|
|
|
|
"opencode-plugin",
|
|
|
|
|
"plannotator",
|
|
|
|
|
"plan-review",
|
|
|
|
|
"ai-agent",
|
|
|
|
|
"coding-agent"
|
|
|
|
|
],
|
2026-08-04 20:56:33 -04:00
|
|
|
"//": "OpenCode 1 loads main, while OpenCode 2 loads exports[.]. Do not add ./server: OpenCode 1 checks it before main and would load the V2 adapter.",
|
2026-01-06 14:25:19 -08:00
|
|
|
"main": "dist/index.js",
|
2026-08-04 20:56:33 -04:00
|
|
|
"exports": {
|
|
|
|
|
".": "./dist/server.js"
|
|
|
|
|
},
|
2025-12-30 21:25:46 -08:00
|
|
|
"files": [
|
2026-01-06 14:25:19 -08:00
|
|
|
"dist",
|
2026-01-12 19:36:09 -08:00
|
|
|
"commands",
|
2026-01-15 10:04:26 -08:00
|
|
|
"README.md",
|
|
|
|
|
"plannotator.html",
|
|
|
|
|
"review-editor.html"
|
2025-12-30 21:25:46 -08:00
|
|
|
],
|
|
|
|
|
"scripts": {
|
2026-08-04 20:56:33 -04:00
|
|
|
"build": "mkdir -p dist && cp ../hook/dist/index.html ./plannotator.html && cp ../review/dist/index.html ./review-editor.html && bun build embedded.ts --outfile dist/embedded.js --target bun --external @opencode-ai/plugin && bun build index.ts --outfile dist/index.js --target node && bun build server.ts --outfile dist/server.js --target node --external @opencode-ai/plugin",
|
|
|
|
|
"smoke:v2": "bun fixtures/v2-installed-smoke.ts",
|
2026-04-15 18:22:55 +03:00
|
|
|
"postinstall": "mkdir -p ${XDG_CONFIG_HOME:-$HOME/.config}/opencode/commands && cp ./commands/*.md ${XDG_CONFIG_HOME:-$HOME/.config}/opencode/commands/ 2>/dev/null || true",
|
2025-12-30 21:25:46 -08:00
|
|
|
"prepublishOnly": "bun run build"
|
|
|
|
|
},
|
2026-02-21 14:16:21 -06:00
|
|
|
"devDependencies": {
|
fix(opencode): drop runtime dependency on prerelease plugin nightly (#1199)
* fix(opencode): drop runtime dependency on prerelease plugin nightly
`@opencode-ai/plugin` was a runtime dependency pinned to the exact nightly
0.0.0-next-16775, so every `npm install @plannotator/opencode` resolved a
prerelease snapshot sitting inside npm's 72h unpublish window and pulled
95MB across 101 packages (effect@4.0.0-beta.101 alone is 47MB). None of it
is executed by OpenCode 1 users.
The only runtime use was `Plugin.define`, which is an identity function
(`export function define(plugin) { return plugin; }`, verified identical
across 0.0.0-next-16775, next-16600, next-16797 and stable 1.18.13). The
import is now type-only and the plugin is a plain object literal checked
with `satisfies Plugin.Plugin`. OpenCode 2's loader validation is purely
structural (`Schema.Struct({ id: String, setup: function })` in its
supervisor), so an object literal satisfies it.
The package moves to devDependencies. Built `dist/index.js` and
`dist/embedded.js` are byte-identical to the pre-change build;
`dist/server.js` differs only by the dropped import and the two
`Plugin.define(...)` wrapper lines.
* docs(opencode): explain why the V2 logReady callback is empty
The old one-liner read as an unfinished TODO. The empty function is
correct: OpenCode 2's server-plugin Context exposes no `log` or `tui`
domain, `@opencode-ai/client` has no `tui` namespace and zero `/tui/*`
routes (checked on 0.0.0-next-16775 and next-16797), and `createV2Client`'s
`app.log` bottoms out in `console.error`, the same stderr stream
`handleServerReady` already writes to. Wiring it would print the session
URL twice in remote mode and add a stray line locally. V1 targets
`client.app.log` and `client.tui.showToast`, which are HTTP surfaces
distinct from stderr, so V1 never repeats itself. `tui.toast.show` exists
in V2 only as a subscribe-only event and on the separate
`@opencode-ai/plugin/tui` context, a different plugin kind in a different
process, so a real toast needs an upstream OpenCode API.
Comment only, no behavior change.
2026-08-04 20:38:28 -07:00
|
|
|
"@opencode-ai/plugin": "0.0.0-next-16775",
|
2026-03-15 19:38:22 -07:00
|
|
|
"@plannotator/server": "workspace:*",
|
|
|
|
|
"@plannotator/shared": "workspace:*"
|
2025-12-30 21:25:46 -08:00
|
|
|
},
|
2026-08-04 22:06:05 -07:00
|
|
|
"engines": {
|
2025-12-30 21:25:46 -08:00
|
|
|
"bun": ">=1.0.0"
|
|
|
|
|
}
|
|
|
|
|
}
|