OpenCode expects the default export to be a plugin function with shape (input) => Promise<hooks>. The obsxa-opencode wrapper was exporting createObsxaPlugin itself as default, which is a factory returning a plugin function. This means OpenCode calls the factory with pluginInput, gets back a function instead of hooks, and no hooks execute.
Symptoms:
- plugin loads without startup errors
~/.local/share/obsxa/obsxa.db stays empty or near-empty during sessions
- observations from
chat.message and tool.execute.after are never persisted
Expected behavior:
- wrapper default export is an instantiated plugin (
createObsxaPlugin())
- OpenCode invokes that plugin and receives hook handlers
- observations persist to obsxa database during normal sessions
OpenCode expects the default export to be a plugin function with shape
(input) => Promise<hooks>. Theobsxa-opencodewrapper was exportingcreateObsxaPluginitself as default, which is a factory returning a plugin function. This means OpenCode calls the factory withpluginInput, gets back a function instead of hooks, and no hooks execute.Symptoms:
~/.local/share/obsxa/obsxa.dbstays empty or near-empty during sessionschat.messageandtool.execute.afterare never persistedExpected behavior:
createObsxaPlugin())