Skip to content
docsv0.12.0

InvocationPlanBuilder

Construye un {@see InvocationPlan} HONESTO para un tool+canal+wiring dado (ADR#13 P13.1). "Honesto" significa: cada paso de {@see InvocationStepKind::inspectionOrder()} describe lo que {@see \Milpa\ToolRuntime\ToolRegistry::call()} REALMENTE haría con estos datos estáticos — incluyendo los pasos que nunca disparan (Dormant), los que no aplican por falta de wiring (Skipped), y los que solo pueden decidirse en runtime (Conditional). Este builder SOLO lee estado — nunca invoca `call()`, nunca muta nada. `call()` permanece byte-idéntico.

InvocationPlanBuilder::__construct()

public function __construct(Milpa\ToolRuntime\PolicyGate $policyGate):

Parameters

Parameters of __construct()
NameTypeDescription
$policyGateMilpa\ToolRuntime\PolicyGate

InvocationPlanBuilder::build()

public function build(Milpa\ToolRuntime\ToolDefinition $tool, Milpa\ToolRuntime\Contracts\ToolContext $ctx, Milpa\ToolRuntime\Inspection\RegistryWiring $wiring): Milpa\ToolRuntime\Inspection\InvocationPlan

Walks every station in inspection order and asks what it would do with this call. Nothing is executed and nothing is dispatched: the answer comes from the channel policy, the tool's own declaration, and what the host actually wired. That is the point — the plan has to be safe to ask for on a mutating operation, or it would only be usable where it is not needed.

Parameters

Parameters of build()
NameTypeDescription
$toolMilpa\ToolRuntime\ToolDefinition
$ctxMilpa\ToolRuntime\Contracts\ToolContext
$wiringMilpa\ToolRuntime\Inspection\RegistryWiring