Skip to content

Commit 750b077

Browse files
author
clap [bot]
committed
fix: suppress dist-patch warning when native plugin covers all tools
When the before_tool_call plugin is installed, it intercepts read/write/edit along with all other tool calls. Dist patches for file tools are fully redundant in this case. Update distPatched to treat plugin as equivalent, and show a clearer success message distinguishing plugin vs patch coverage.
1 parent 3a14c85 commit 750b077

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

cmd/rampart/cli/doctor.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -896,14 +896,20 @@ func doctorFileToolPatches(emit emitFn) (warnings int) {
896896

897897
// Check if OpenClaw uses bundled dist files (#204).
898898
if openclawUsesBundledDist() {
899-
distPatched := openclawDistPatched()
899+
// With the native plugin, before_tool_call intercepts all tools including
900+
// read/write/edit — dist patches are fully redundant.
901+
distPatched := openclawDistPatched() || pluginInstalled
900902
webFetchPatched := openclawWebFetchPatched() || pluginInstalled
901903
browserPatched := openclawBrowserPatched() || pluginInstalled
902904
messagePatched := openclawMessagePatched() || pluginInstalled
903905
execPatched := openclawExecPatched() || pluginInstalled
904906

905907
if distPatched && webFetchPatched && browserPatched && messagePatched && execPatched {
906-
emit("Tool patches", "ok", "All OpenClaw tools patched (read/write/edit + web_fetch + browser + message + exec)")
908+
if pluginInstalled {
909+
emit("Tool patches", "ok", "All OpenClaw tools covered (native plugin: read/write/edit + web_fetch + browser + message + exec)")
910+
} else {
911+
emit("Tool patches", "ok", "All OpenClaw tools patched (read/write/edit + web_fetch + browser + message + exec)")
912+
}
907913
return 0
908914
}
909915

0 commit comments

Comments
 (0)