Skip to content

Type Alias: ToolRunner

ToolRunner = (cmd, args, opts?) => Promise<ToolRunResult>

Defined in: packages/aiui-util/src/vault.ts:65

The one process seam, injectable for tests: run cmd args… capturing stdout/stderr, resolving even on a non-zero exit (backends distinguish "not found" from real failure by inspecting code + stderr themselves). input, when given, is written to stdin EXACTLY as-is and then closed — no trailing newline is ever appended (see the byte-exactness notes below).

Parameters

cmd

string

args

string[]

opts?

input?

string

Returns

Promise<ToolRunResult>