{"version":3,"sources":["../../../src/agents/parsers/errors.ts"],"names":["LinePrefixParserError","FrameworkError","isFatal","isRetryable","context","reason","Reason","NoDataReceived","InvalidTransition","NotStartNode","NotEndNode","AlreadyCompleted","InvalidSchema","constructor","message","errors","options"],"mappings":";;;;;;AA0BO,MAAMA,8BAA8BC,yBAAAA,CAAAA;EA1B3C;;;EA2BEC,OAAU,GAAA,IAAA;EACVC,WAAc,GAAA,IAAA;AACLC,EAAAA,OAAAA;AACAC,EAAAA,MAAAA;AAET,EAAA,OAAOC,MAAS,GAAA;IACdC,cAAgB,EAAA,gBAAA;IAChBC,iBAAmB,EAAA,mBAAA;IACnBC,YAAc,EAAA,cAAA;IACdC,UAAY,EAAA,YAAA;IACZC,gBAAkB,EAAA,kBAAA;IAClBC,aAAe,EAAA;AACjB,GAAA;EAEAC,WACEC,CAAAA,OAAAA,EACAC,QACAC,OAIA,EAAA;AACA,IAAMF,KAAAA,CAAAA,OAAAA,EAASC,QAAQC,OAAAA,CAAAA;AAEvB,IAAA,IAAA,CAAKZ,UAAUY,OAAQZ,CAAAA,OAAAA;AACvB,IAAA,IAAA,CAAKC,SAASW,OAAQX,CAAAA,MAAAA;AACxB;AACF","file":"errors.cjs","sourcesContent":["/**\n * Copyright 2025 IBM Corp.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FrameworkError, FrameworkErrorOptions } from \"@/errors.js\";\nimport { ValueOf } from \"@/internals/types.js\";\n\ninterface Context {\n  lines: string;\n  excludedLines: string;\n  finalState: Record<string, any>;\n  partialState: Record<string, any>;\n}\n\nexport class LinePrefixParserError extends FrameworkError {\n  isFatal = true;\n  isRetryable = true;\n  readonly context: Context;\n  readonly reason: ValueOf<typeof LinePrefixParserError.Reason>;\n\n  static Reason = {\n    NoDataReceived: \"NoDataReceived\",\n    InvalidTransition: \"InvalidTransition\",\n    NotStartNode: \"NotStartNode\",\n    NotEndNode: \"NotEndNode\",\n    AlreadyCompleted: \"AlreadyCompleted\",\n    InvalidSchema: \"InvalidSchema\",\n  } as const;\n\n  constructor(\n    message: string,\n    errors: Error[],\n    options: FrameworkErrorOptions & {\n      context: Context;\n      reason: ValueOf<typeof LinePrefixParserError.Reason>;\n    },\n  ) {\n    super(message, errors, options);\n\n    this.context = options.context;\n    this.reason = options.reason;\n  }\n}\n"]}