Function: createForkCapabilityBuilder()
ts
function createForkCapabilityBuilder<TParentIn, TChildIn, TChildOut, THandle>(toolName, childExecutable): ForkCapabilityBuilder<TParentIn, unknown, TChildIn, TChildOut, THandle>;Defined in: builders/create-fork-capability-builder.ts:24
Creates a fluent ForkCapabilityBuilder for $cap.fork(toolName, childExecutable, $f => ...).
Validates that toolName is non-empty and initializes historyMode to 'shared-prefix-only'.
Type Parameters
Parameters
| Parameter | Type | Description |
|---|---|---|
toolName | string | Tool name exposed to the parent agent. |
childExecutable | MaybeBuilder< | AgentNode<TChildIn, TChildOut, THandle> | LoopNode<TChildIn, TChildOut, THandle, string>> | Child agent or loop. |
Returns
ForkCapabilityBuilder<TParentIn, unknown, TChildIn, TChildOut, THandle>
Frozen fork capability builder.