Skip to content

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

Open
odedindi wants to merge 1 commit intocode-yeongyu:devfrom
odedindi:fix/add-server-export
Open

fix(package): add ./server export for OpenCode-Go plugin compatibility#2988
odedindi wants to merge 1 commit intocode-yeongyu:devfrom
odedindi:fix/add-server-export

Conversation

@odedindi
Copy link
Copy Markdown

@odedindi odedindi commented Mar 31, 2026

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

Summary

Changes

Screenshots

Before After

Testing

bun run typecheck
bun test

Related Issues


Summary by cubic

Add exports["./server"] to package.json so OpenCode-Go resolves the server entry correctly and avoids the containment check error. Fixes #2966.

Written for commit 28b0a75. Summary will update on new commits.

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 code-yeongyu#2966
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 31, 2026

All contributors have signed the CLA. Thank you! ✅
Posted by the CLA Assistant Lite bot.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Safe configuration change to package.json exports to fix tool compatibility; no logic changes or impact on existing entry points.

@odedindi
Copy link
Copy Markdown
Author

odedindi commented Apr 3, 2026

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Apr 3, 2026
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.

[Bug]: package.json "main" field missing "./" prefix breaks OpenCode-Go plugin loading

1 participant