OptionalbinaryOverride the binary (absolute path or PATH name).
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).
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.
OptionaltimeoutKill the CLI 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 SIGKILL — 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.