Skip to content

Fix Windows plugin loader interop for opencode 1.3.17#16

Open
bhaktatejas922 wants to merge 2 commits intomainfrom
fix/issue-10-windows-loader
Open

Fix Windows plugin loader interop for opencode 1.3.17#16
bhaktatejas922 wants to merge 2 commits intomainfrom
fix/issue-10-windows-loader

Conversation

@bhaktatejas922
Copy link
Copy Markdown
Contributor

@bhaktatejas922 bhaktatejas922 commented May 1, 2026

Summary

  • avoid MorphSDK's aggregate root ESM entrypoint in the plugin runtime load path
  • use the edge SDK entry for fast apply/compact and the WarpGrep client-only entry for search
  • pass a plugin-local WarpGrep provider so local search avoids the SDK LocalRipgrepProvider import that statically named-imports CJS @vscode/ripgrep
  • add a focused loader-compatibility regression test guarding these entrypoints

Closes #10.

Tests

  • bun test
  • bun run typecheck
  • bun run build
  • bun -e "const m = await import('./dist/index.js'); if (typeof m.default !== 'function') throw new Error('default export is not a function'); console.log('ok')"
  • rg -n "from "@morphllm/morphsdk"|import \{ rgPath \}|@vercel/oidc|getVercelOidcToken|LocalRipgrepProvider" dist/index.js index.ts (no matches)
  • HOME=$tmp_home XDG_CONFIG_HOME=$tmp_home/.config npx -y opencode-ai@1.3.17 debug config --print-logs --log-level DEBUG (temporary config, local plugin path)
  • bun run ci

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.

Plugin fails to load in opencode 1.3.17 on Windows (ESM/CJS interop issues)

1 participant