{"version":3,"file":"exceptions.mjs","names":[],"sources":["../../../../../src/batteries/specialists/caption/transformers_js/exceptions.ts"],"sourcesContent":["/**\n * Battery-scoped exception constructors for the transformers.js Caption specialist adapter.\n *\n * @module @nhtio/adk/batteries/specialists/caption/transformers_js/exceptions\n *\n * @remarks\n * Battery-scoped exception classes for the transformers.js (`@huggingface/transformers`) Caption\n * (image-to-text) adapter, minted via `createException` from `@nhtio/adk/factories`. Categories mirror\n * the embeddings/STT specialist batteries one-to-one — only the engine-specific failure differs.\n */\n\nimport { createException } from '@nhtio/adk/factories'\n\n/**\n * Thrown when the resolved adapter options fail validation against\n * `transformersJsCaptionOptionsSchema` — e.g. a missing/empty `model` or an unknown option key.\n * Fatal: config bugs fail loud, not at describe time.\n */\nexport const E_INVALID_TRANSFORMERS_JS_CAPTION_OPTIONS = createException<[string]>(\n  'E_INVALID_TRANSFORMERS_JS_CAPTION_OPTIONS',\n  'Invalid transformers.js Caption adapter options: %s',\n  'E_INVALID_TRANSFORMERS_JS_CAPTION_OPTIONS',\n  529,\n  true\n)\n\n/**\n * Thrown when the transformers.js pipeline fails to load (e.g. the `@huggingface/transformers` peer\n * is not installed), the `image-to-text` call throws, or the result is malformed/empty (a captioner\n * that returns no text is an engine failure, not a valid empty caption). Non-fatal. Printf arg:\n * `[detail]`.\n */\nexport const E_TRANSFORMERS_JS_CAPTION_ENGINE_ERROR = createException<[string]>(\n  'E_TRANSFORMERS_JS_CAPTION_ENGINE_ERROR',\n  'transformers.js Caption engine error: %s',\n  'E_TRANSFORMERS_JS_CAPTION_ENGINE_ERROR',\n  502,\n  false\n)\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,IAAa,4CAA4C,gBACvD,6CACA,uDACA,6CACA,KACA,IACF;;;;;;;AAQA,IAAa,yCAAyC,gBACpD,0CACA,4CACA,0CACA,KACA,KACF"}