{"version":3,"file":"outbound-policy-error.mjs","names":[],"sources":["../../../../../../../ai/src/errors/outbound-policy-error.ts"],"sourcesContent":["import { AIError, type AIErrorOptions } from \"./ai-error\";\nimport type { ErrorCategory } from \"./error-category.type\";\n\n/**\n * A server-side outbound request (attachment fetch, URL skill manifest,\n * RAG loader, …) was blocked by the shared `OutboundPolicy` before it\n * left the process — a disallowed scheme, a host outside the allowlist, a\n * private / loopback / link-local / cloud-metadata address resolved after\n * DNS, an oversized body, or a timeout.\n *\n * This is the framework's SSRF / resource-exhaustion guard surfacing: the\n * request was refused on purpose, not a provider failure. `context`\n * carries the offending `url` / `host` / `reason` for logs.\n *\n * @example\n * if (error instanceof OutboundPolicyError) {\n *   logger.warn(\"blocked outbound fetch\", { context: error.context });\n * }\n */\nexport class OutboundPolicyError extends AIError {\n  public static readonly defaultCategory: ErrorCategory = \"validation\";\n\n  public constructor(message: string, options?: AIErrorOptions) {\n    super(\"OUTBOUND_POLICY_BLOCKED\", message, options);\n    this.name = \"OutboundPolicyError\";\n  }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBA,IAAa,sBAAb,cAAyC,QAAQ;;yBACS;;CAExD,AAAO,YAAY,SAAiB,SAA0B;EAC5D,MAAM,2BAA2B,SAAS,OAAO;EACjD,KAAK,OAAO;CACd;AACF"}