Method InspectAsync
- Namespace
- IntentSharp.Targets
- Assembly
- IntentSharp.dll
InspectAsync(TargetCommand, TargetContext, CancellationToken)
Reads a command the model planned, without running it, and reports what it would do: the entities it touches, its operations, the parameters it uses, the values of the target's own subjects, and the target's own refusals. The runtime checks the result against the rule files, and a refusal here always applies, whatever a rule file allows.
ValueTask<TargetInspection> InspectAsync(TargetCommand command, TargetContext context, CancellationToken ct = default)
Parameters
commandTargetCommandThe planned command.
contextTargetContextThe operation's context, with the current Description.
ctCancellationTokenCancels the call.
Returns
- ValueTask<TargetInspection>
What the command would do.
Remarks
Called on every planning attempt, while the model's reply is checked, and the runtime waits for it there without yielding, so it should only read the command: it should not need I/O.