Skip to content

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 ​

Type Parameters ​

Type ParameterDefault typeDescription
TItemunknownWork item payload type of the enclosing lane.

Methods ​

canAddDependencies() ​

ts
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 ​

ParameterTypeDescription
enabled?booleanWhether the addDependencies tool is unlocked.

Returns ​

MutatePlanCapabilityBuilder<TItem>

New immutable plan mutation builder.


canSpawnTasks() ​

ts
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 ParameterDefault typeDescription
TNewItem-Spawned work item payload type validated by itemSchema.
TSigunknownSignal payload type for signal-correlated wakeup.

Parameters ​

ParameterTypeDescription
itemSchemaZodType<TNewItem>Zod schema validating spawned task items.
optionsSpawnTasksBuilderOptions<TNewItem, TSig>Spawn limits, patch, and wakeup options.

Returns ​

MutatePlanCapabilityBuilder<TNewItem>

New immutable plan mutation builder.


canUpdateTopologyContracts() ​

ts
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 ParameterDefault typeDescription
TPart extends stringstringLiteral partition identifier union of topology.

Parameters ​

ParameterTypeDescription
topologyMaybeBuilder<TopologyNode<TPart>>Target relational topology node or builder.

Returns ​

MutatePlanCapabilityBuilder<TItem>

New immutable plan mutation builder.


toAST() ​

ts
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 ​

MutatePlanCapabilityNode

Deeply frozen passive AST node.

Inherited from ​

AstBuilder.toAST

Released under the MIT License.