Skip to content

fix(openclaw): fix plugin install — add openclaw.extensions, document --dangerously-force-unsafe-install#1236

Open
aldrinleal wants to merge 1 commit intortk-ai:masterfrom
aldrinleal:fix/openclaw-plugin-extensions
Open

fix(openclaw): fix plugin install — add openclaw.extensions, document --dangerously-force-unsafe-install#1236
aldrinleal wants to merge 1 commit intortk-ai:masterfrom
aldrinleal:fix/openclaw-plugin-extensions

Conversation

@aldrinleal
Copy link
Copy Markdown

Problem

Running openclaw plugins install ./openclaw (from the repo root) fails with two errors:

package.json missing openclaw.extensions; update the plugin package to include openclaw.extensions
  (for example ["./dist/index.js"])

And even after that is fixed, the install is blocked because the plugin uses child_process:

Plugin "rtk-rewrite" installation blocked: dangerous code patterns detected:
  Shell command execution detected (child_process) (openclaw/index.ts:19)

Fix

1. Add openclaw.extensions to package.json

OpenClaw requires this field to locate the plugin entry point. Since OpenClaw handles TypeScript natively, ./index.ts works directly — no build step needed.

2. Update README.md install instructions

  • Clarify the command must be run from the repository root, not inside openclaw/
  • Document that --dangerously-force-unsafe-install is required (the plugin shells out to rtk rewrite via child_process)
  • Explain why this flag is safe to use

Verified

$ openclaw plugins install ./openclaw --dangerously-force-unsafe-install
WARNING: Plugin "rtk-rewrite" contains dangerous code patterns: Shell command execution detected (child_process)
WARNING: Plugin "rtk-rewrite" installation forced despite dangerous code patterns via --dangerously-force-unsafe-install
Installing to /home/.../.openclaw/extensions/rtk-rewrite…
Installed plugin: rtk-rewrite
Restart the gateway to load plugins.

🤖 Generated with Claude Code

… --dangerously-force-unsafe-install

Without `openclaw.extensions` in package.json, `openclaw plugins install`
fails with:

  package.json missing openclaw.extensions; update the plugin package
  to include openclaw.extensions (for example ["./dist/index.js"])

OpenClaw requires this field to locate the plugin entry point.
Points to `./index.ts` since OpenClaw handles TypeScript natively.

Also, the plugin shells out via `child_process` to call `rtk rewrite`,
which triggers OpenClaw's safety check. The README now documents that
`--dangerously-force-unsafe-install` is required and explains why it
is safe to use here.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants