Summary
On an Intel Mac, opencode-mem@2.22.0 still reports that the pinned onnxruntime-node binding is missing when invoked through OpenCode, even though the exact file exists and both Node and Bun can load it successfully outside the plugin tool call.
This appears different from #158 and #184: in those reports the x64 artifact was actually absent. Here the direct onnxruntime-node@1.22.0 artifact is present and loadable after a clean plugin-cache reinstall.
Environment
- macOS 13.3, Intel
x86_64 (darwin/x64)
- OpenCode 1.18.9
- Bun 1.3.14
- Node.js v22.19.0
- opencode-mem 2.22.0
- Local embedding model:
Xenova/nomic-embed-text-v1
Steps to reproduce
-
Configure the plugin as opencode-mem@2.22.0.
-
Completely exit OpenCode.
-
Remove only the plugin caches:
rm -rf ~/.cache/opencode/packages/opencode-mem ~/.cache/opencode/packages/opencode-mem@latest ~/.cache/opencode/packages/opencode-mem@2.22.0
-
Start OpenCode and allow it to reinstall the plugin.
-
Completely exit and start OpenCode again after installation is complete.
-
Invoke the memory tool in add or search mode.
Actual behavior
Both add and search fail with:
Local embedding native binding missing for darwin/x64 at ~/.cache/opencode/packages/opencode-mem@2.22.0/node_modules/onnxruntime-node/bin/napi-v6/darwin/x64/onnxruntime_binding.node. On Intel Mac (darwin/x64), onnxruntime-node@1.24+ ships without an x64 binding; opencode-mem pins 1.22.0. If this persists after updating, clear OpenCode's plugin cache (~/.cache/opencode/packages/opencode-mem@*) and reinstall, or configure remote embeddings via embeddingApiUrl + embeddingApiKey.
The old OpenCode serve --service process was also explicitly terminated before repeating the test in a new OpenCode conversation, with the same result.
Binding verification
The exact path reported as missing exists:
onnxruntime-node version: 1.22.0
binding size: 226664 bytes
file type: Mach-O 64-bit bundle x86_64
permissions: 0644
From the freshly installed plugin directory, all of the following succeed under both Node and Bun:
require.resolve("onnxruntime-node")
require("onnxruntime-node")
prepareOnnxruntimeForTransformers()
They resolve to the direct package at:
node_modules/onnxruntime-node/dist/index.js
The plugin's standalone prepareOnnxruntimeForTransformers() check succeeds, but the same OpenCode process reports the binding as missing when the registered memory tool initializes embeddings.
Expected behavior
The local embedding model should initialize using the bundled direct onnxruntime-node@1.22.0 x64 binding, and memory add/search should work.
Related
PR #198 added the direct dependency, resolver shim, and fail-fast check. Its Intel Mac real-device test-plan items appear to have remained unchecked, so this may be an OpenCode plugin-runtime path or initialization-context difference that is not covered by the standalone resolver tests.
Summary
On an Intel Mac,
opencode-mem@2.22.0still reports that the pinnedonnxruntime-nodebinding is missing when invoked through OpenCode, even though the exact file exists and both Node and Bun can load it successfully outside the plugin tool call.This appears different from #158 and #184: in those reports the x64 artifact was actually absent. Here the direct
onnxruntime-node@1.22.0artifact is present and loadable after a clean plugin-cache reinstall.Environment
x86_64(darwin/x64)Xenova/nomic-embed-text-v1Steps to reproduce
Configure the plugin as
opencode-mem@2.22.0.Completely exit OpenCode.
Remove only the plugin caches:
Start OpenCode and allow it to reinstall the plugin.
Completely exit and start OpenCode again after installation is complete.
Invoke the
memorytool inaddorsearchmode.Actual behavior
Both
addandsearchfail with:The old OpenCode
serve --serviceprocess was also explicitly terminated before repeating the test in a new OpenCode conversation, with the same result.Binding verification
The exact path reported as missing exists:
From the freshly installed plugin directory, all of the following succeed under both Node and Bun:
They resolve to the direct package at:
The plugin's standalone
prepareOnnxruntimeForTransformers()check succeeds, but the same OpenCode process reports the binding as missing when the registeredmemorytool initializes embeddings.Expected behavior
The local embedding model should initialize using the bundled direct
onnxruntime-node@1.22.0x64 binding, andmemory add/searchshould work.Related
PR #198 added the direct dependency, resolver shim, and fail-fast check. Its Intel Mac real-device test-plan items appear to have remained unchecked, so this may be an OpenCode plugin-runtime path or initialization-context difference that is not covered by the standalone resolver tests.