Skip to content

OpenCode wrapper exports factory, hooks never run #20

@oritwoen

Description

@oritwoen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions