Skip to content

Plugin: avoid vendored OpenClaw fallbacks#87

Open
huntharo wants to merge 1 commit into
mainfrom
codex/stop-installing-openclaw
Open

Plugin: avoid vendored OpenClaw fallbacks#87
huntharo wants to merge 1 commit into
mainfrom
codex/stop-installing-openclaw

Conversation

@huntharo
Copy link
Copy Markdown
Contributor

@huntharo huntharo commented Apr 9, 2026

Summary

I fixed the packaged-install Discord compatibility path that was still resolving runtime fallbacks from the extension's own vendored node_modules/openclaw copy instead of the host OpenClaw runtime.

  • I moved openclaw out of peerDependencies and into devDependencies so the plugin no longer advertises OpenClaw as something to install alongside the extension at runtime.
  • I hardened the compat resolver to prefer the real host OpenClaw process location, including a require.main fallback for packaged installs.
  • I explicitly reject extension-local OpenClaw roots under ~/.openclaw/extensions/... so Discord fallback imports cannot accidentally bind to a vendored package tree.
  • I added regression tests for the require.main host fallback and for rejecting extension-local vendored openclaw copies.

Testing

  • bun node_modules/vitest/vitest.mjs run -- src/openclaw-sdk-compat.test.ts src/controller.test.ts
  • bun node_modules/typescript/bin/tsc --noEmit

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