OptionalbinaryOverride the binary (absolute path or PATH name).
OptionalcwdWorking directory every call runs in: the workspace the CLI may modify,
derived from trusted host configuration. When set, cwd leaves the
model's input schema, and a cwd in the call's input is dropped by
validation rather than reaching the spawn. When omitted, the model may
choose the directory through its input. A present value must be a
non-empty string.
OptionalexecSpawn implementation; defaults to node:child_process.
OptionalidConnector id override (running two differently-configured instances).
OptionalidempotencyRequire callers to supply a per-call idempotency key; replays return the
stored result instead of re-spawning the CLI. Requires
policies.idempotencyStore. When the store exposes a numeric
pendingTtlMs (D1IdempotencyStore), construction throws unless it
exceeds timeoutMs — a shorter TTL lets a still-running invocation be
taken over as stale and spawned a second time.
OptionalmaxCap on retained stdout/stderr per stream in the default exec (node's
child_process) — a runaway CLI must not balloon memory unbounded.
Counted in actual UTF-8 encoded BYTES (not JS string length / UTF-16
code units — a naive char-length cap over-counts non-Latin1 output and
can cut mid-codepoint). The TAIL is kept, cut on a codepoint boundary,
and truncation is marked (the agent's final answer text arrives last).
Ignored when exec is injected. Default 1 MiB (1 048 576). Must be a
non-negative safe integer (0 retains nothing): NaN/Infinity satisfy no
eviction comparison, so a malformed cap silently DISARMS the bound —
construction throws instead, even alongside an injected exec.
OptionalpoliciesPassed through to createConnector (audit, stores, evaluators). A
requireEgressEnforcement member here throws the construction TypeError
createAgentCliConnector describes.
OptionalrateManifest rate limit, e.g. '10/hour'. Requires policies.rateLimitStore.
OptionalrequiresAgent CLIs are approval-gated by default (they execute arbitrary actions on the host). Opt out only for sandboxed/read-only setups.
OptionaltimeoutTerminate the CLI process tree after this long. Default 600000 (10 min — agent tasks run long). Must be an integer in [1, 2^31-1]: setTimeout treats NaN and negatives as 0 and clamps beyond-2^31-1 delays to 1ms — either way an instant termination — and a NaN additionally passes the pendingTtlMs guard below vacuously. Construction throws on a malformed value.
Runtime and policy options for an agent CLI connector.