Graphorin API reference v0.4.0
Graphorin API reference / @graphorin/tools / / ExecutorOptions
Interface: ExecutorOptions
Defined in: packages/tools/src/executor/executor.ts:91
Options accepted by createToolExecutor.
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
approvalGate? | readonly | ApprovalGate | Approval gate — invoked when a tool's needsApproval resolves to true. | packages/tools/src/executor/executor.ts:98 |
cancellationGraceMs? | readonly | number | Hard-kill grace window (ms) for tools that ignore ctx.signal. Default 50. | packages/tools/src/executor/executor.ts:113 |
dataFlowGuard? | readonly | DataFlowGuard | Optional provenance / data-flow guard (P1-3). When present, the executor consults it as a sink gate before running any side-effecting / external-stateful tool (so untrusted content cannot reach an exfiltration/mutation sink ungated) and records the provenance of every successful output for downstream sink checks. The agent runtime supplies the implementation (@graphorin/security's taint engine threaded through a per-run ledger); when absent, both steps are skipped (zero overhead, feature off). Because every in-script code-mode tool call also flows through executeOne, the same guard composes with code-mode automatically (P1-2). | packages/tools/src/executor/executor.ts:171 |
emitAudit? | readonly | (event) => void | Audit emitter override. Defaults to the global registry. | packages/tools/src/executor/executor.ts:96 |
imperativeBudgetMs? | readonly | number | Override for the imperative-pattern scan budget (ms). The scanner returns null (= timed out, strip-pass skipped) when it exceeds this budget; the production default of 5 ms is sufficient on hot paths but can flake on cold-start CI runners where V8 JIT warm-up + shared-CPU jitter routinely pushes the first scan above 5 ms. Tests that need deterministic strip behaviour on noisy runners can raise this to e.g. 250 ms. Defaults to 5 ms (production-safe). | packages/tools/src/executor/executor.ts:126 |
imperativePatterns? | readonly | readonly ImperativePattern[] | Pluggable imperative patterns override. | packages/tools/src/executor/executor.ts:115 |
maxParallelTools? | readonly | number | Cap on parallel tool calls per batch. Defaults to 8. | packages/tools/src/executor/executor.ts:94 |
memoryGuardFactory? | readonly | (tier) => | MemoryModificationGuard | null | Optional memory-modification guard factory. Returns a MemoryModificationGuard per the tool's memoryGuardTier. The agent runtime supplies the implementation (createGuard(...) from @graphorin/security/guard); when absent, the guard step is skipped (audit-only baseline). | packages/tools/src/executor/executor.ts:150 |
memoryRegionReader? | readonly | MemoryRegionReader | Optional memory-region reader the guard uses to hash the pre/post snapshots. The agent runtime supplies the implementation (backed by the @graphorin/memory tier APIs). | packages/tools/src/executor/executor.ts:158 |
registry | readonly | ToolRegistry | - | packages/tools/src/executor/executor.ts:92 |
repair? | readonly | ToolRepairHook | Tool repair hook (single-round). | packages/tools/src/executor/executor.ts:100 |
sandboxResolver? | readonly | (policy) => Sandbox | null | Optional sandbox-dispatch resolver. Returns the Sandbox implementation to use for a given resolved policy, OR null to run the tool inline (the default for kind: 'none' policies). Skill loaders / agent runtimes inject this when sandbox-bundled code (skills, MCP-derived tools) needs out-of-process execution. | packages/tools/src/executor/executor.ts:142 |
secretResolver? | readonly | SecretResolverHook | Secrets resolver injected from the agent runtime. | packages/tools/src/executor/executor.ts:108 |
spill? | readonly | SpillWriter | Optional spill writer for the 'spill-to-file' truncation strategy. | packages/tools/src/executor/executor.ts:106 |
streamingEventQueueDepth? | readonly | number | Default streaming queue depth. Default 256. | packages/tools/src/executor/executor.ts:134 |
streamingSink? | readonly | (event) => void | Sink for tool execution events; the agent runtime forwards these into agent.stream(...). Receives every tool.execute.* variant emitted by the executor (start, progress, partial, end, error). | packages/tools/src/executor/executor.ts:132 |
summarizer? | readonly | ResultSummarizer | Optional summarizer for the 'summarize' truncation strategy. | packages/tools/src/executor/executor.ts:104 |
tokenCounter? | readonly | TokenCounter | Per-provider token counter used by the truncation pipeline. | packages/tools/src/executor/executor.ts:102 |