fix(package): add ./server export for OpenCode-Go plugin compatibility

OpenCode-Go's resolveExportPath checks exports["./server"] before
falling back to the main field. Without this entry, fs.realpathSync
resolves the entry path relative to CWD instead of the package
directory, triggering a containment security check failure:

  ERROR path=oh-my-opencode error=Plugin resolved server entry outside plugin directory

Fixes #2966
This commit is contained in:
Oded Winberger
2026-03-31 22:10:30 +02:00
parent 33c8b7f675
commit 28b0a75705
+1
View File
@@ -18,6 +18,7 @@
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
"./server": "./dist/index.js",
"./schema.json": "./dist/oh-my-opencode.schema.json"
},
"scripts": {