Skip to content

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

Closed
aldrinleal wants to merge 1 commit into
rtk-ai:masterfrom
aldrinleal:fix/openclaw-plugin-extensions
Closed

aldrinleal wants to merge 1 commit into
rtk-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 <[email protected]>
@CLAassistant

CLAassistant commented Apr 11, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@rtk-release-bot

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale due to 90 days of inactivity. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. Your contribution is very much appreciated — we're sorry we haven't been able to review it yet.

@rtk-release-bot rtk-release-bot Bot added the stale label Sep 3, 2026
@rtk-release-bot

Copy link
Copy Markdown
Contributor

Closing this pull request after a prolonged period of inactivity. If this is still relevant, please ask for it to be reopened. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants