Skip to content

Interface: ForkCapabilityNode<TParentIn, TReq, TChildIn, TChildOut, THandle> ​

Defined in: ast/fork-capability-node.ts:39

Passive AST node representing a downward child fork capability tool ($cap.fork(toolName, childExecutable, $f => ...)).

Spawns an isolated child scope branch when invoked by the parent agent, executes childExecutable over mapInput(parentInput, req), and commits or reconciles the child scope upon completion.

Type Parameters ​

Type ParameterDefault typeDescription
TParentInunknownParent actor input payload type.
TRequnknownValidated fork tool request payload type.
TChildInunknownChild executable input payload type.
TChildOutunknownChild executable output payload type.
THandleunknownRuntime handle type of the active BranchableScope.

Properties ​

PropertyModifierTypeDescriptionDefined in
childExecutablereadonly| AgentNode<TChildIn, TChildOut, THandle> | LoopNode<TChildIn, TChildOut, THandle, string>Child agent or loop executable invoked inside the forked child isolation scope.ast/fork-capability-node.ts:51
historyModereadonly"shared-prefix-only" | "clone-transcript"Transcript history sharing mode ('shared-prefix-only' default or 'clone-transcript').ast/fork-capability-node.ts:55
mapInputreadonlyBivariantCallback<[parentInput: TParentIn, req: TReq], TChildIn>Synchronous mapper projecting (parentInput, req) into the child executable's input TChildIn.ast/fork-capability-node.ts:59
modelRouting?readonlyForkModelRoutingConfig<TParentIn, TReq>Optional dynamic model routing configuration for child forks.ast/fork-capability-node.ts:61
requestSchemareadonlyZodType<TReq>Zod schema validating the parent agent's fork tool call arguments.ast/fork-capability-node.ts:57
toolNamereadonlystringTool name exposed to the parent agent for invoking this downward fork.ast/fork-capability-node.ts:49
typereadonly"harness:fork-capability"Discriminant identifying a downward fork capability AST node.ast/fork-capability-node.ts:47

Released under the MIT License.