Type Alias: ApplyActionResponse
@kortexya/reasoninglayer / Actions / ApplyActionResponse
Type Alias: ApplyActionResponse
ApplyActionResponse = {
outcome:"applied";sideEffectsDispatched:number;sideEffectsFailed:number; } | {missing:string[];outcome:"suspended"; } | {outcome:"rejected";reason:string; } | {outcome:"rolled_back";reason:string; }
Defined in: src/types/actions.ts:165
Outcome of applying an action.
Type Declaration
{ outcome: "applied"; sideEffectsDispatched: number; sideEffectsFailed: number; }
outcome
outcome:
"applied"
The action applied successfully.
sideEffectsDispatched
sideEffectsDispatched:
number
Number of side-effects delivered successfully.
sideEffectsFailed
sideEffectsFailed:
number
Number of side-effects whose delivery failed (apply still succeeded).
{ missing: string[]; outcome: "suspended"; }
missing
missing:
string[]
Names of the unbound required parameters.
outcome
outcome:
"suspended"
The action is waiting for required inputs to be bound.
{ outcome: "rejected"; reason: string; }
outcome
outcome:
"rejected"
The action was rejected before applying.
reason
reason:
string
Human-readable reason.
{ outcome: "rolled_back"; reason: string; }
outcome
outcome:
"rolled_back"
The action applied then rolled back.
reason
reason:
string
Human-readable cause.
Remarks
Tagged discriminated union with outcome as the discriminant. The wire
shape (ApplyActionResponse) uses the same discriminant with snake_case
fields (side_effects_dispatched, side_effects_failed).