fix: load the claims plugin without the @opencode/plugin import #17

Merged
david merged 1 commits from fix/claims-plugin-load into main 2026-11-05 03:01:02 +00:00

1 Commits

Author SHA1 Message Date
david 62bb2eb93c fix: load the claims plugin without the @opencode/plugin import (#16)
A local plugin loaded by path cannot resolve bare package specifiers, so
`import { Plugin } from "@opencode/plugin"` made the plugin fail with an opaque
"Plugin failed to load".

Isolated by experiment:
  index.js, no imports          -> active
  index.ts, no imports          -> active
  index.ts, @opencode/plugin    -> failed
  index.ts, @opencode-ai/plugin -> failed

So it was never the TypeScript, the default export or the hook. Plugin.define is
an identity function in the runtime, so exporting the definition object directly
is equivalent. Registered status is now 'active'.
2026-11-04 18:59:58 -08:00