This commit is contained in:
@@ -62,6 +62,7 @@ export interface ToolContext {
|
||||
allowedCommands?: string[]; // Bash ツールで許可するコマンド名一覧 (省略時は DEFAULT_ALLOWED_COMMANDS)
|
||||
bashUnrestricted?: boolean; // true: skip the command whitelist (bwrap/exec is chosen by bashSandbox, not this)
|
||||
bashSandbox?: 'auto' | 'always' | 'off'; // サンドボックス機構の選択 (config.safety.bashSandbox 由来)
|
||||
bashAllowNetwork?: boolean; // true: bwrap サンドボックスで host network を許可 (--unshare-net を外す。config.safety.bashAllowNetwork 由来)
|
||||
skillCatalog?: import('../skills.js').SkillCatalog;
|
||||
toolsConfig?: ToolsConfig;
|
||||
searchFilter?: SearchFilterConfig; // AppConfig.searchFilter (トップレベル)
|
||||
@@ -1007,6 +1008,7 @@ async function executeBash(input: Record<string, unknown>, ctx: ToolContext): Pr
|
||||
}
|
||||
const result: SandboxedBashResult = await executeSandboxedBash(
|
||||
command, ctx.workspacePath, timeoutSec, BASH_MAX_BUFFER_BYTES, ctx.abortSignal, skillBinds,
|
||||
ctx.bashAllowNetwork === true,
|
||||
);
|
||||
const out = result.isError ? result.output : capOutput(result.output, 'stdout');
|
||||
logBashHistory(ctx.workspacePath, command, result.isError, Date.now() - startedAt, {
|
||||
|
||||
Reference in New Issue
Block a user