Interface: MutatePlanCapabilityBuilder<TItem>
Defined in: builders/mutate-plan-capability-builder.ts:16
Fluent sub-builder for dynamic lane plan and topology contract mutation capabilities ($cap.mutatePlan($m => ...)).
Enables spawnTasks, addDependencies, and updatePartitionContract orchestration tools on the owning agent.
Extends
AstBuilder<MutatePlanCapabilityNode<TItem>>
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TItem | unknown | Work item payload type of the enclosing lane. |
Methods
canAddDependencies()
canAddDependencies(enabled?): MutatePlanCapabilityBuilder<TItem>;Defined in: builders/mutate-plan-capability-builder.ts:45
Enables or disables the addDependencies tool for adding dependency edges between existing lane items.
Cycle detection is enforced dynamically by the lane scheduler whenever addDependencies is called.
Parameters
| Parameter | Type | Description |
|---|---|---|
enabled? | boolean | Whether the addDependencies tool is unlocked. |
Returns
MutatePlanCapabilityBuilder<TItem>
New immutable plan mutation builder.
canSpawnTasks()
canSpawnTasks<TNewItem, TSig>(itemSchema, options): MutatePlanCapabilityBuilder<TNewItem>;Defined in: builders/mutate-plan-capability-builder.ts:31
Enables the spawnTasks tool for enqueuing stacked prerequisite work items into the active lane.
Validates that options.maxSpawnedPerRun >= 1 and options.maxPrerequisiteDepth >= 1.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TNewItem | - | Spawned work item payload type validated by itemSchema. |
TSig | unknown | Signal payload type for signal-correlated wakeup. |
Parameters
| Parameter | Type | Description |
|---|---|---|
itemSchema | ZodType<TNewItem> | Zod schema validating spawned task items. |
options | SpawnTasksBuilderOptions<TNewItem, TSig> | Spawn limits, patch, and wakeup options. |
Returns
MutatePlanCapabilityBuilder<TNewItem>
New immutable plan mutation builder.
canUpdateTopologyContracts()
canUpdateTopologyContracts<TPart>(topology): MutatePlanCapabilityBuilder<TItem>;Defined in: builders/mutate-plan-capability-builder.ts:58
Enables the updatePartitionContract tool for updating the per-run CoW contract overlay of topology.
Increments the mutated partition's contract epoch and invalidates downstream transitive dependents.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TPart extends string | string | Literal partition identifier union of topology. |
Parameters
| Parameter | Type | Description |
|---|---|---|
topology | MaybeBuilder<TopologyNode<TPart>> | Target relational topology node or builder. |
Returns
MutatePlanCapabilityBuilder<TItem>
New immutable plan mutation builder.
toAST()
toAST(): MutatePlanCapabilityNode;Defined in: ast/ast-builder.ts:20
Compiles the current builder configuration into a deeply frozen passive AST node.
Validates required builder invariants at compilation time and returns an immutable plain-object AST representation containing zero execution methods.
Returns
Deeply frozen passive AST node.