Skip to content
docsv0.12.0

InvocationPlan

What would happen if this tool were invoked with this context — decided without invoking it. Answers the question a dry-run cannot: not "did it work" but "which guards stand between the * call and the effect, which of them are live right now, and which are present but dormant". The plan is the artifact `coa` renders when someone asks why a call was refused, or why one they expected to be refused went through. `schemaVersion` is here because this shape is consumed by tooling outside the process; changing a field without bumping it breaks a reader that has no way to notice.

InvocationPlan::__construct()

public function __construct(string $schemaVersion, string $operation, string $channel, array $context, array $assumptions, array $wiring, array $steps):

Parameters

Parameters of __construct()
NameTypeDescription
$schemaVersionstring
$operationstring
$channelstring
$contextarray{actor: ?string, scopes: list<string>, mode: string}
$assumptionslist<string>
$wiringarray{rateLimiter: string, dispatcher: string, ruleProvider: string}
$stepslist<InvocationStep>

InvocationPlan::toArray()

public function toArray(): array

Flattens the plan for whatever is going to render or ship it. Enums become their string values here rather than at the edges, so a JSON reader and a terminal renderer cannot disagree about what a step is called.