Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/core / agentResultWire

Function: agentResultWire()

ts
function agentResultWire(result, fallbackMessage): WireError;

Defined in: packages/core/src/engine/ctx.ts:419

Projects a settled AgentResult's error to its wire form, carrying the engine-decided abort class in data. AgentError itself has no data field, so without this every projection past the terminal entry (the run-level outcome.error, thrown AgentCallError wires, dropped items) would keep only the message text and lose the typed class (v1.9.0 follow-up review).

Parameters

ParameterType
resultAgentResult<unknown>
fallbackMessagestring

Returns

WireError