mirror of
https://github.com/moltbot/moltbot.git
synced 2026-03-30 01:06:11 +00:00
fix(nodes): remove redundant rawCommand from system.run.prepare
The nodes tool was passing rawCommand: formatExecCommand(command) to system.run.prepare, which produced the full formatted argv string (e.g. 'powershell -Command "echo hello"'). However, validateSystemRunCommandConsistency() recognizes shell wrappers like powershell/bash and extracts the inner command as the 'inferred' value (e.g. 'echo hello'). This caused a rawCommand vs inferred mismatch, breaking all nodes run commands with shell wrappers. The fix removes the explicit rawCommand parameter, letting the validation correctly infer the command text from the argv array. Fixes #33080
This commit is contained in:
@@ -18,7 +18,6 @@ import {
|
||||
import { parseDurationMs } from "../../cli/parse-duration.js";
|
||||
import type { OpenClawConfig } from "../../config/config.js";
|
||||
import { parsePreparedSystemRunPayload } from "../../infra/system-run-approval-context.js";
|
||||
import { formatExecCommand } from "../../infra/system-run-command.js";
|
||||
import { imageMimeFromFormat } from "../../media/mime.js";
|
||||
import type { GatewayMessageChannel } from "../../utils/message-channel.js";
|
||||
import { resolveSessionAgentId } from "../agent-scope.js";
|
||||
@@ -651,7 +650,6 @@ export function createNodesTool(options?: {
|
||||
command: "system.run.prepare",
|
||||
params: {
|
||||
command,
|
||||
rawCommand: formatExecCommand(command),
|
||||
cwd,
|
||||
agentId,
|
||||
sessionKey,
|
||||
|
||||
Reference in New Issue
Block a user