openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
16 lines (15 loc) • 705 B
JavaScript
import { i as collectNestedErrorCandidates } from "./error-coercion-hDrHOSGy.mjs";
//#region src/agents/agent-run-terminal-error.ts
/** Carries a canonical terminal outcome when an embedded attempt exits by throwing. */
var AgentRunTerminalOutcomeError = class extends Error {
constructor(e, t) {
super(e instanceof Error ? e.message : String(e), { cause: e });
this.name = "AgentRunTerminalOutcomeError";
this.terminalOutcome = t;
}
};
function findAgentRunTerminalOutcome(e) {
for (const t of collectNestedErrorCandidates(e)) if (t instanceof AgentRunTerminalOutcomeError) return t.terminalOutcome;
}
//#endregion
export { findAgentRunTerminalOutcome as n, AgentRunTerminalOutcomeError as t };