Skip to content

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

PropertyModifierTypeDescriptionDefined in
approvalGate?readonlyApprovalGateApproval gate — invoked when a tool's needsApproval resolves to true.packages/tools/src/executor/executor.ts:98
cancellationGraceMs?readonlynumberHard-kill grace window (ms) for tools that ignore ctx.signal. Default 50.packages/tools/src/executor/executor.ts:113
dataFlowGuard?readonlyDataFlowGuardOptional 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) => voidAudit emitter override. Defaults to the global registry.packages/tools/src/executor/executor.ts:96
imperativeBudgetMs?readonlynumberOverride 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?readonlyreadonly ImperativePattern[]Pluggable imperative patterns override.packages/tools/src/executor/executor.ts:115
maxParallelTools?readonlynumberCap on parallel tool calls per batch. Defaults to 8.packages/tools/src/executor/executor.ts:94
memoryGuardFactory?readonly(tier) => | MemoryModificationGuard | nullOptional 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?readonlyMemoryRegionReaderOptional 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
registryreadonlyToolRegistry-packages/tools/src/executor/executor.ts:92
repair?readonlyToolRepairHookTool repair hook (single-round).packages/tools/src/executor/executor.ts:100
sandboxResolver?readonly(policy) => Sandbox | nullOptional 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?readonlySecretResolverHookSecrets resolver injected from the agent runtime.packages/tools/src/executor/executor.ts:108
spill?readonlySpillWriterOptional spill writer for the 'spill-to-file' truncation strategy.packages/tools/src/executor/executor.ts:106
streamingEventQueueDepth?readonlynumberDefault streaming queue depth. Default 256.packages/tools/src/executor/executor.ts:134
streamingSink?readonly(event) => voidSink 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?readonlyResultSummarizerOptional summarizer for the 'summarize' truncation strategy.packages/tools/src/executor/executor.ts:104
tokenCounter?readonlyTokenCounterPer-provider token counter used by the truncation pipeline.packages/tools/src/executor/executor.ts:102