import { AIErrorCode } from "./error-code.type.mjs"; import { AIError, AIErrorOptions } from "./ai-error.mjs"; //#region ../ai/src/errors/agent-execution-error.d.ts /** * Base for agent runtime failures that aren't schema / tool / provider * problems — runtime-structural issues inside the trip loop or * authoring-time middleware misconfiguration. Two specialized * subclasses cover the two non-generic cases: * * - {@link AgentCancelledError} (`AGENT_CANCELLED`) — caller-driven * abort via `AbortSignal`. * - {@link AgentMaxTripsError} (`AGENT_MAX_TRIPS`) — trip loop hit * the `maxTrips` cap without a natural stop. * * Use the base class directly for anything else (unregistered tool * dispatch, authoring-time middleware validation, surprise * exceptions). The subclasses exist so consumers can branch on a * dedicated `instanceof` / category without inferring from `context` * flags or parsing the message. * * @example * if (result.error?.code === "AGENT_EXEC_FAILED") { * logger.warn("unexpected agent failure", result.error.context); * } */ declare class AgentExecutionError extends AIError { constructor(message: string, options?: AIErrorOptions, code?: AIErrorCode); } //#endregion export { AgentExecutionError }; //# sourceMappingURL=agent-execution-error.d.mts.map