fix: issue with shell calls

This commit is contained in:
2026-05-31 12:03:05 -05:00
parent fe85adfa53
commit 3f0d9a80c7
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -125,7 +125,7 @@ function buildCommonTools(ctx: ToolContext, outputSchema?: JsonSchema): Tool<any
tools.push(SetOutputTool(ctx, outputSchema));
}
if (ctx.payload.shell === "restricted") {
if (ctx.payload.shell !== "disabled") {
tools.push(ShellTool(ctx));
tools.push(KillBackgroundTool(ctx));
}
+1 -1
View File
@@ -99,7 +99,7 @@ function getShellInstructions(
case "restricted":
return `### Shell commands\n\nUse the \`${t("shell")}\` MCP tool for all shell command execution. This tool provides a secure environment with filtered credentials. Do NOT use any native shell tool — it is disabled for security. For long-running processes, use \`shell({ command, background: true })\`. Use \`${t("kill_background")}\` to stop background processes.`;
case "enabled":
return `### Shell commands\n\nUse your native shell tool for shell command execution.`;
return `### Shell commands\n\nUse the \`${t("shell")}\` MCP tool for all shell command execution (unrestricted environment, credentials available).`;
default: {
const _exhaustive: never = shell;
return _exhaustive satisfies never;