Skip to content

Interface: SpeculateCapabilityNode<TParentIn, TReq, TChildIn, TChildOut, THandle, TCrossReport, TVerdict> ​

Defined in: ast/speculate-capability-node.ts:102

Passive AST node representing a parallel speculative tournament capability ($cap.speculate(toolName, $s => ...)).

Forks $B$ isolated branch scopes in parallel, executes workerExecutable across mapBranches, runs crossVerifier, arbitrates or verifies the winner, and optionally refines the winning branch before committing.

Type Parameters ​

Type ParameterDefault typeDescription
TParentInunknownParent actor input payload type.
TRequnknownValidated speculation tool request payload type.
TChildInunknownBranch worker input payload type.
TChildOutunknownBranch worker output payload type.
THandleunknownRuntime handle type of the active BranchableScope.
TCrossReportunknownCross-verifier report payload type.
TVerdictunknownArbiter agent structured verdict payload type.

Properties ​

PropertyModifierTypeDescriptionDefined in
arbiterreadonlySpeculateArbiterConfig<THandle, TVerdict>Arbiter agent and decision resolver invoked on contested or multi-survivor tournaments.ast/speculate-capability-node.ts:130
branchCountreadonlynumberNumber of parallel speculative branches $B \ge 2$.ast/speculate-capability-node.ts:122
crossVerifier?readonlyCrossVerifierASTNode<THandle, Record<string, unknown>, TCrossReport>Optional cross-verifier AST node executed across surviving candidate branches before arbitration.ast/speculate-capability-node.ts:126
mapBranchesreadonlyBivariantCallback<[parentInput: TParentIn, req: TReq], readonly TChildIn[]>Synchronous mapper producing $B$ branch inputs from (parentInput, req).ast/speculate-capability-node.ts:124
refineWinnerWhen?readonlySpeculateRefineWinnerConfig<TParentIn, TChildIn, TChildOut, THandle, TVerdict, unknown>Optional post-arbitration winner refinement configuration.ast/speculate-capability-node.ts:132
requestSchemareadonlyZodType<TReq>Zod schema validating the parent agent's speculation tool call arguments.ast/speculate-capability-node.ts:116
toolNamereadonlystringTool name exposed to the parent agent for launching the tournament.ast/speculate-capability-node.ts:114
typereadonly"harness:speculate-capability"Discriminant identifying a speculative tournament capability AST node.ast/speculate-capability-node.ts:112
verifyWinnerWith?readonlySpeculateVerifyWinnerConfig<TChildIn, TChildOut, THandle, unknown, unknown>Optional sole-survivor evaluator configuration when 1 branch completes uncontested.ast/speculate-capability-node.ts:128
workerExecutablereadonly| AgentNode<TChildIn, TChildOut, THandle> | LoopNode<TChildIn, TChildOut, THandle, string>Worker agent or loop executed in parallel across all $B$ tournament branches.ast/speculate-capability-node.ts:118

Released under the MIT License.