Skip to content

v0.1.1 — Plugin Load Fix

Latest

Choose a tag to compare

@R3dy R3dy released this 12 Aug 21:57
· 37 commits to main since this release

Fix

OpenCode's plugin loader requires id in the default PluginModule export for file/path plugins (no package.json name fallback, unlike npm plugins). ADR-009 shipped { server } without id, producing:

Path plugin file:///... must export id

What broke

All 6 plugin hooks were dead in the host OpenCode environment — the plugin failed to load on every session. The brain-loop (issue #22's headline feature) was non-functional. Manual MCP tools worked (configured separately), but auto-recall, auto-capture, evaluateDelta, system-prompt injection, compacting hygiene, and decay scheduling never fired.

The fix

Added id: "realmemory" to the pluginModule object in src/plugin-entry.ts:

const pluginModule = {
  id: "realmemory",
  server: realmemoryPlugin,
};

Verification

Verified via testing harness (opencode run --print-logs --log-level DEBUG):

  • session.created → auto-recall (5 memories) + decay — ✅ firing
  • chat.message → auto-recall (1 memory) + classifyIntent — ✅ firing
  • session.idle → evaluateDelta — ✅ firing (preference_compliance metric recorded)
  • No failed to load plugin error

Full Changelog: v0.1.0...v0.1.1