Skip to content

fix(plugin): restore plugin load under OpenCode 1.18.4#9

Merged
JRedeker merged 1 commit into
trunkfrom
fix/plugin-loader-compat
Jul 23, 2026
Merged

fix(plugin): restore plugin load under OpenCode 1.18.4#9
JRedeker merged 1 commit into
trunkfrom
fix/plugin-loader-compat

Conversation

@JRedeker

Copy link
Copy Markdown
Contributor

OpenCode 1.18.4's loader iterates Object.values(entryModule) and throws "Plugin export is not a function" for any non-function export. The exported VISION_PLUGIN_TOOL_NAMES object broke plugin load.

Fix: move constants to a data-only sibling module (tool-names.ts), import without re-export. index.ts now exports functions only.

typecheck clean; 19/19 tests pass.

OpenCode 1.18.4's plugin loader iterates Object.values(entryModule) and
throws "Plugin export is not a function" for any export that is not a
function or { server } object. The exported VISION_PLUGIN_TOOL_NAMES
object tripped this, so the plugin failed to load.

Move the constants to a data-only sibling module (tool-names.ts),
import into index.ts without re-export, and repoint the parity test.
index.ts now exports functions only. typecheck clean; 19/19 tests pass.
@JRedeker
JRedeker merged commit 7db2925 into trunk Jul 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant