Repository navigation
Conversation
Fixes rtk-ai#1717 The OpenClaw plugin was discoverable in `plugins list` but the runtime never loaded, so before_tool_call did not intercept exec commands. Three root causes: 1. package.json missing `openclaw.extensions` — OpenClaw cannot determine the entry point without it. Added `"type": "module"` and the `openclaw.extensions` array pointing at `./index.ts`. 2. openclaw.plugin.json missing `activation.onStartup` — since OpenClaw 2026.6.x, omitting this field no longer startup-loads the plugin implicitly. Set to `true`. 3. Exit code 3 (ask) always triggered `requireApproval`, which blocks exec for up to 120s. After timeout the command is denied, making the plugin unusable in practice. Added `approvalMode` config field ("auto" | "ask", default "auto") so exit-3 rewrites apply silently unless the operator opts in to approvals. Tested on OpenClaw 2026.6.10 with RTK 0.43.0.
2 of 3 tasks
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. |
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! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1717
Problem
The OpenClaw plugin was discoverable in
plugins listbut the runtime never loaded, sobefore_tool_calldid not interceptexeccommands. Additionally, exit code 3 (ask) always triggeredrequireApproval, which blocks exec for up to 120s — after timeout the command is denied, making the plugin unusable in practice.Root causes
package.jsonmissingopenclaw.extensions— OpenClaw cannot determine the entry point without it.openclaw.plugin.jsonmissingactivation.onStartup— since OpenClaw 2026.6.x, omitting this field no longer startup-loads the plugin implicitly.requireApproval— 120s timeout makes this path unusable for automated agent workflows.Changes
package.json"type": "module""openclaw": { "extensions": ["./index.ts"] }openclaw.plugin.json"activation": { "onStartup": true }approvalModetoconfigSchema("auto" | "ask", default"auto")index.tsapprovalModeconfig field (default"auto")"auto"mode: rewrite applied silently (no approval prompt)"ask"mode: existingrequireApprovalbehavior preservedTesting
Tested on OpenClaw 2026.6.10 with RTK 0.43.0.
plugins inspect rtk-rewrite --runtimeshowsstatus: loaded,hookCount: 1before_tool_callhook fires and rewritesgit status→rtk git statusapprovalMode: "auto"(default) — no approval prompts, rewrites apply transparentlyapprovalMode: "ask"— approval card appears with allow-once/deny buttons