Anchorage API reference
    Preparing search index...

    Runtime and policy options for an agent CLI connector.

    interface AgentCliConnectorOptions {
        binaryPath?: string;
        exec?: AgentCliExec;
        id?: string;
        idempotencyKey?: boolean;
        maxOutputBytes?: number;
        policies?: ConnectorPolicies;
        rateLimit?: string;
        requiresApproval?: boolean;
        timeoutMs?: number;
    }
    Index

    Properties

    binaryPath?: string

    Override the binary (absolute path or PATH name).

    Spawn implementation; defaults to node:child_process.

    id?: string

    Connector id override (running two differently-configured instances).

    idempotencyKey?: boolean

    Require 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.

    maxOutputBytes?: number

    Cap 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.

    Passed through to createConnector (audit, stores, evaluators).

    rateLimit?: string

    Manifest rate limit, e.g. '10/hour'. Requires policies.rateLimitStore.

    requiresApproval?: boolean

    Agent CLIs are approval-gated by default (they execute arbitrary actions on the host). Opt out only for sandboxed/read-only setups.

    timeoutMs?: number

    Kill 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.