rag-lite-ts 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (310) hide show
  1. package/dist/{cli → cjs/cli}/indexer.js +1 -1
  2. package/dist/{cli → cjs/cli}/search.js +5 -10
  3. package/dist/{core → cjs/core}/binary-index-format.d.ts +28 -2
  4. package/dist/cjs/core/binary-index-format.js +291 -0
  5. package/dist/{core → cjs/core}/ingestion.d.ts +5 -1
  6. package/dist/{core → cjs/core}/ingestion.js +76 -9
  7. package/dist/{core → cjs/core}/model-validator.js +1 -1
  8. package/dist/{core → cjs/core}/reranking-strategies.js +4 -5
  9. package/dist/{core → cjs/core}/search.js +2 -1
  10. package/dist/{core → cjs/core}/types.d.ts +1 -1
  11. package/dist/{core → cjs/core}/vector-index.d.ts +4 -0
  12. package/dist/{core → cjs/core}/vector-index.js +10 -2
  13. package/dist/{file-processor.d.ts → cjs/file-processor.d.ts} +2 -0
  14. package/dist/{file-processor.js → cjs/file-processor.js} +20 -0
  15. package/dist/{index-manager.d.ts → cjs/index-manager.d.ts} +17 -1
  16. package/dist/{index-manager.js → cjs/index-manager.js} +148 -7
  17. package/dist/{multimodal → cjs/multimodal}/clip-embedder.js +71 -66
  18. package/dist/esm/api-errors.d.ts +90 -0
  19. package/dist/esm/api-errors.js +320 -0
  20. package/dist/esm/cli/indexer.d.ts +11 -0
  21. package/dist/esm/cli/indexer.js +471 -0
  22. package/dist/esm/cli/search.d.ts +7 -0
  23. package/dist/esm/cli/search.js +332 -0
  24. package/dist/esm/cli.d.ts +3 -0
  25. package/dist/esm/cli.js +529 -0
  26. package/dist/esm/config.d.ts +51 -0
  27. package/dist/esm/config.js +79 -0
  28. package/dist/esm/core/abstract-embedder.d.ts +125 -0
  29. package/dist/esm/core/abstract-embedder.js +264 -0
  30. package/dist/esm/core/actionable-error-messages.d.ts +60 -0
  31. package/dist/esm/core/actionable-error-messages.js +397 -0
  32. package/dist/esm/core/adapters.d.ts +93 -0
  33. package/dist/esm/core/adapters.js +139 -0
  34. package/dist/esm/core/batch-processing-optimizer.d.ts +155 -0
  35. package/dist/esm/core/batch-processing-optimizer.js +536 -0
  36. package/dist/esm/core/binary-index-format.d.ts +78 -0
  37. package/dist/esm/core/binary-index-format.js +291 -0
  38. package/dist/esm/core/chunker.d.ts +119 -0
  39. package/dist/esm/core/chunker.js +73 -0
  40. package/dist/esm/core/cli-database-utils.d.ts +53 -0
  41. package/dist/esm/core/cli-database-utils.js +239 -0
  42. package/dist/esm/core/config.d.ts +102 -0
  43. package/dist/esm/core/config.js +247 -0
  44. package/dist/esm/core/content-errors.d.ts +111 -0
  45. package/dist/esm/core/content-errors.js +362 -0
  46. package/dist/esm/core/content-manager.d.ts +335 -0
  47. package/dist/esm/core/content-manager.js +1476 -0
  48. package/dist/esm/core/content-performance-optimizer.d.ts +150 -0
  49. package/dist/esm/core/content-performance-optimizer.js +516 -0
  50. package/dist/esm/core/content-resolver.d.ts +104 -0
  51. package/dist/esm/core/content-resolver.js +285 -0
  52. package/dist/esm/core/cross-modal-search.d.ts +164 -0
  53. package/dist/esm/core/cross-modal-search.js +342 -0
  54. package/dist/esm/core/database-connection-manager.d.ts +109 -0
  55. package/dist/esm/core/database-connection-manager.js +310 -0
  56. package/dist/esm/core/db.d.ts +213 -0
  57. package/dist/esm/core/db.js +895 -0
  58. package/dist/esm/core/embedder-factory.d.ts +154 -0
  59. package/dist/esm/core/embedder-factory.js +311 -0
  60. package/dist/esm/core/error-handler.d.ts +112 -0
  61. package/dist/esm/core/error-handler.js +239 -0
  62. package/dist/esm/core/index.d.ts +59 -0
  63. package/dist/esm/core/index.js +69 -0
  64. package/dist/esm/core/ingestion.d.ts +202 -0
  65. package/dist/esm/core/ingestion.js +901 -0
  66. package/dist/esm/core/interfaces.d.ts +408 -0
  67. package/dist/esm/core/interfaces.js +106 -0
  68. package/dist/esm/core/lazy-dependency-loader.d.ts +147 -0
  69. package/dist/esm/core/lazy-dependency-loader.js +435 -0
  70. package/dist/esm/core/mode-detection-service.d.ts +150 -0
  71. package/dist/esm/core/mode-detection-service.js +565 -0
  72. package/dist/esm/core/mode-model-validator.d.ts +92 -0
  73. package/dist/esm/core/mode-model-validator.js +203 -0
  74. package/dist/esm/core/model-registry.d.ts +116 -0
  75. package/dist/esm/core/model-registry.js +411 -0
  76. package/dist/esm/core/model-validator.d.ts +217 -0
  77. package/dist/esm/core/model-validator.js +782 -0
  78. package/dist/esm/core/path-manager.d.ts +47 -0
  79. package/dist/esm/core/path-manager.js +71 -0
  80. package/dist/esm/core/raglite-paths.d.ts +121 -0
  81. package/dist/esm/core/raglite-paths.js +145 -0
  82. package/dist/esm/core/reranking-config.d.ts +42 -0
  83. package/dist/esm/core/reranking-config.js +147 -0
  84. package/dist/esm/core/reranking-factory.d.ts +92 -0
  85. package/dist/esm/core/reranking-factory.js +410 -0
  86. package/dist/esm/core/reranking-strategies.d.ts +310 -0
  87. package/dist/esm/core/reranking-strategies.js +650 -0
  88. package/dist/esm/core/resource-cleanup.d.ts +163 -0
  89. package/dist/esm/core/resource-cleanup.js +371 -0
  90. package/dist/esm/core/resource-manager.d.ts +212 -0
  91. package/dist/esm/core/resource-manager.js +564 -0
  92. package/dist/esm/core/search-pipeline.d.ts +111 -0
  93. package/dist/esm/core/search-pipeline.js +287 -0
  94. package/dist/esm/core/search.d.ts +141 -0
  95. package/dist/esm/core/search.js +320 -0
  96. package/dist/esm/core/streaming-operations.d.ts +145 -0
  97. package/dist/esm/core/streaming-operations.js +409 -0
  98. package/dist/esm/core/types.d.ts +66 -0
  99. package/dist/esm/core/types.js +6 -0
  100. package/dist/esm/core/universal-embedder.d.ts +177 -0
  101. package/dist/esm/core/universal-embedder.js +139 -0
  102. package/dist/esm/core/validation-messages.d.ts +99 -0
  103. package/dist/esm/core/validation-messages.js +334 -0
  104. package/dist/esm/core/vector-index.d.ts +72 -0
  105. package/dist/esm/core/vector-index.js +333 -0
  106. package/dist/esm/dom-polyfills.d.ts +6 -0
  107. package/dist/esm/dom-polyfills.js +37 -0
  108. package/dist/esm/factories/index.d.ts +27 -0
  109. package/dist/esm/factories/index.js +29 -0
  110. package/dist/esm/factories/ingestion-factory.d.ts +200 -0
  111. package/dist/esm/factories/ingestion-factory.js +477 -0
  112. package/dist/esm/factories/search-factory.d.ts +154 -0
  113. package/dist/esm/factories/search-factory.js +344 -0
  114. package/dist/esm/file-processor.d.ts +147 -0
  115. package/dist/esm/file-processor.js +963 -0
  116. package/dist/esm/index-manager.d.ts +116 -0
  117. package/dist/esm/index-manager.js +598 -0
  118. package/dist/esm/index.d.ts +75 -0
  119. package/dist/esm/index.js +110 -0
  120. package/dist/esm/indexer.d.ts +7 -0
  121. package/dist/esm/indexer.js +54 -0
  122. package/dist/esm/ingestion.d.ts +63 -0
  123. package/dist/esm/ingestion.js +124 -0
  124. package/dist/esm/mcp-server.d.ts +46 -0
  125. package/dist/esm/mcp-server.js +1820 -0
  126. package/dist/esm/multimodal/clip-embedder.d.ts +327 -0
  127. package/dist/esm/multimodal/clip-embedder.js +996 -0
  128. package/dist/esm/multimodal/index.d.ts +6 -0
  129. package/dist/esm/multimodal/index.js +6 -0
  130. package/dist/esm/preprocess.d.ts +19 -0
  131. package/dist/esm/preprocess.js +203 -0
  132. package/dist/esm/preprocessors/index.d.ts +17 -0
  133. package/dist/esm/preprocessors/index.js +38 -0
  134. package/dist/esm/preprocessors/mdx.d.ts +25 -0
  135. package/dist/esm/preprocessors/mdx.js +101 -0
  136. package/dist/esm/preprocessors/mermaid.d.ts +68 -0
  137. package/dist/esm/preprocessors/mermaid.js +329 -0
  138. package/dist/esm/preprocessors/registry.d.ts +56 -0
  139. package/dist/esm/preprocessors/registry.js +179 -0
  140. package/dist/esm/run-error-recovery-tests.d.ts +7 -0
  141. package/dist/esm/run-error-recovery-tests.js +101 -0
  142. package/dist/esm/search-standalone.d.ts +7 -0
  143. package/dist/esm/search-standalone.js +117 -0
  144. package/dist/esm/search.d.ts +99 -0
  145. package/dist/esm/search.js +177 -0
  146. package/dist/esm/test-utils.d.ts +18 -0
  147. package/dist/esm/test-utils.js +27 -0
  148. package/dist/esm/text/chunker.d.ts +33 -0
  149. package/dist/esm/text/chunker.js +279 -0
  150. package/dist/esm/text/embedder.d.ts +111 -0
  151. package/dist/esm/text/embedder.js +386 -0
  152. package/dist/esm/text/index.d.ts +8 -0
  153. package/dist/esm/text/index.js +9 -0
  154. package/dist/esm/text/preprocessors/index.d.ts +17 -0
  155. package/dist/esm/text/preprocessors/index.js +38 -0
  156. package/dist/esm/text/preprocessors/mdx.d.ts +25 -0
  157. package/dist/esm/text/preprocessors/mdx.js +101 -0
  158. package/dist/esm/text/preprocessors/mermaid.d.ts +68 -0
  159. package/dist/esm/text/preprocessors/mermaid.js +330 -0
  160. package/dist/esm/text/preprocessors/registry.d.ts +56 -0
  161. package/dist/esm/text/preprocessors/registry.js +180 -0
  162. package/dist/esm/text/reranker.d.ts +49 -0
  163. package/dist/esm/text/reranker.js +274 -0
  164. package/dist/esm/text/sentence-transformer-embedder.d.ts +96 -0
  165. package/dist/esm/text/sentence-transformer-embedder.js +340 -0
  166. package/dist/esm/text/tokenizer.d.ts +22 -0
  167. package/dist/esm/text/tokenizer.js +64 -0
  168. package/dist/esm/types.d.ts +83 -0
  169. package/dist/esm/types.js +3 -0
  170. package/dist/esm/utils/vector-math.d.ts +31 -0
  171. package/dist/esm/utils/vector-math.js +70 -0
  172. package/package.json +30 -12
  173. package/dist/core/binary-index-format.js +0 -122
  174. /package/dist/{api-errors.d.ts → cjs/api-errors.d.ts} +0 -0
  175. /package/dist/{api-errors.js → cjs/api-errors.js} +0 -0
  176. /package/dist/{cli → cjs/cli}/indexer.d.ts +0 -0
  177. /package/dist/{cli → cjs/cli}/search.d.ts +0 -0
  178. /package/dist/{cli.d.ts → cjs/cli.d.ts} +0 -0
  179. /package/dist/{cli.js → cjs/cli.js} +0 -0
  180. /package/dist/{config.d.ts → cjs/config.d.ts} +0 -0
  181. /package/dist/{config.js → cjs/config.js} +0 -0
  182. /package/dist/{core → cjs/core}/abstract-embedder.d.ts +0 -0
  183. /package/dist/{core → cjs/core}/abstract-embedder.js +0 -0
  184. /package/dist/{core → cjs/core}/actionable-error-messages.d.ts +0 -0
  185. /package/dist/{core → cjs/core}/actionable-error-messages.js +0 -0
  186. /package/dist/{core → cjs/core}/adapters.d.ts +0 -0
  187. /package/dist/{core → cjs/core}/adapters.js +0 -0
  188. /package/dist/{core → cjs/core}/batch-processing-optimizer.d.ts +0 -0
  189. /package/dist/{core → cjs/core}/batch-processing-optimizer.js +0 -0
  190. /package/dist/{core → cjs/core}/chunker.d.ts +0 -0
  191. /package/dist/{core → cjs/core}/chunker.js +0 -0
  192. /package/dist/{core → cjs/core}/cli-database-utils.d.ts +0 -0
  193. /package/dist/{core → cjs/core}/cli-database-utils.js +0 -0
  194. /package/dist/{core → cjs/core}/config.d.ts +0 -0
  195. /package/dist/{core → cjs/core}/config.js +0 -0
  196. /package/dist/{core → cjs/core}/content-errors.d.ts +0 -0
  197. /package/dist/{core → cjs/core}/content-errors.js +0 -0
  198. /package/dist/{core → cjs/core}/content-manager.d.ts +0 -0
  199. /package/dist/{core → cjs/core}/content-manager.js +0 -0
  200. /package/dist/{core → cjs/core}/content-performance-optimizer.d.ts +0 -0
  201. /package/dist/{core → cjs/core}/content-performance-optimizer.js +0 -0
  202. /package/dist/{core → cjs/core}/content-resolver.d.ts +0 -0
  203. /package/dist/{core → cjs/core}/content-resolver.js +0 -0
  204. /package/dist/{core → cjs/core}/cross-modal-search.d.ts +0 -0
  205. /package/dist/{core → cjs/core}/cross-modal-search.js +0 -0
  206. /package/dist/{core → cjs/core}/database-connection-manager.d.ts +0 -0
  207. /package/dist/{core → cjs/core}/database-connection-manager.js +0 -0
  208. /package/dist/{core → cjs/core}/db.d.ts +0 -0
  209. /package/dist/{core → cjs/core}/db.js +0 -0
  210. /package/dist/{core → cjs/core}/embedder-factory.d.ts +0 -0
  211. /package/dist/{core → cjs/core}/embedder-factory.js +0 -0
  212. /package/dist/{core → cjs/core}/error-handler.d.ts +0 -0
  213. /package/dist/{core → cjs/core}/error-handler.js +0 -0
  214. /package/dist/{core → cjs/core}/index.d.ts +0 -0
  215. /package/dist/{core → cjs/core}/index.js +0 -0
  216. /package/dist/{core → cjs/core}/interfaces.d.ts +0 -0
  217. /package/dist/{core → cjs/core}/interfaces.js +0 -0
  218. /package/dist/{core → cjs/core}/lazy-dependency-loader.d.ts +0 -0
  219. /package/dist/{core → cjs/core}/lazy-dependency-loader.js +0 -0
  220. /package/dist/{core → cjs/core}/mode-detection-service.d.ts +0 -0
  221. /package/dist/{core → cjs/core}/mode-detection-service.js +0 -0
  222. /package/dist/{core → cjs/core}/mode-model-validator.d.ts +0 -0
  223. /package/dist/{core → cjs/core}/mode-model-validator.js +0 -0
  224. /package/dist/{core → cjs/core}/model-registry.d.ts +0 -0
  225. /package/dist/{core → cjs/core}/model-registry.js +0 -0
  226. /package/dist/{core → cjs/core}/model-validator.d.ts +0 -0
  227. /package/dist/{core → cjs/core}/path-manager.d.ts +0 -0
  228. /package/dist/{core → cjs/core}/path-manager.js +0 -0
  229. /package/dist/{core → cjs/core}/raglite-paths.d.ts +0 -0
  230. /package/dist/{core → cjs/core}/raglite-paths.js +0 -0
  231. /package/dist/{core → cjs/core}/reranking-config.d.ts +0 -0
  232. /package/dist/{core → cjs/core}/reranking-config.js +0 -0
  233. /package/dist/{core → cjs/core}/reranking-factory.d.ts +0 -0
  234. /package/dist/{core → cjs/core}/reranking-factory.js +0 -0
  235. /package/dist/{core → cjs/core}/reranking-strategies.d.ts +0 -0
  236. /package/dist/{core → cjs/core}/resource-cleanup.d.ts +0 -0
  237. /package/dist/{core → cjs/core}/resource-cleanup.js +0 -0
  238. /package/dist/{core → cjs/core}/resource-manager.d.ts +0 -0
  239. /package/dist/{core → cjs/core}/resource-manager.js +0 -0
  240. /package/dist/{core → cjs/core}/search-pipeline.d.ts +0 -0
  241. /package/dist/{core → cjs/core}/search-pipeline.js +0 -0
  242. /package/dist/{core → cjs/core}/search.d.ts +0 -0
  243. /package/dist/{core → cjs/core}/streaming-operations.d.ts +0 -0
  244. /package/dist/{core → cjs/core}/streaming-operations.js +0 -0
  245. /package/dist/{core → cjs/core}/types.js +0 -0
  246. /package/dist/{core → cjs/core}/universal-embedder.d.ts +0 -0
  247. /package/dist/{core → cjs/core}/universal-embedder.js +0 -0
  248. /package/dist/{core → cjs/core}/validation-messages.d.ts +0 -0
  249. /package/dist/{core → cjs/core}/validation-messages.js +0 -0
  250. /package/dist/{dom-polyfills.d.ts → cjs/dom-polyfills.d.ts} +0 -0
  251. /package/dist/{dom-polyfills.js → cjs/dom-polyfills.js} +0 -0
  252. /package/dist/{factories → cjs/factories}/index.d.ts +0 -0
  253. /package/dist/{factories → cjs/factories}/index.js +0 -0
  254. /package/dist/{factories → cjs/factories}/ingestion-factory.d.ts +0 -0
  255. /package/dist/{factories → cjs/factories}/ingestion-factory.js +0 -0
  256. /package/dist/{factories → cjs/factories}/search-factory.d.ts +0 -0
  257. /package/dist/{factories → cjs/factories}/search-factory.js +0 -0
  258. /package/dist/{index.d.ts → cjs/index.d.ts} +0 -0
  259. /package/dist/{index.js → cjs/index.js} +0 -0
  260. /package/dist/{indexer.d.ts → cjs/indexer.d.ts} +0 -0
  261. /package/dist/{indexer.js → cjs/indexer.js} +0 -0
  262. /package/dist/{ingestion.d.ts → cjs/ingestion.d.ts} +0 -0
  263. /package/dist/{ingestion.js → cjs/ingestion.js} +0 -0
  264. /package/dist/{mcp-server.d.ts → cjs/mcp-server.d.ts} +0 -0
  265. /package/dist/{mcp-server.js → cjs/mcp-server.js} +0 -0
  266. /package/dist/{multimodal → cjs/multimodal}/clip-embedder.d.ts +0 -0
  267. /package/dist/{multimodal → cjs/multimodal}/index.d.ts +0 -0
  268. /package/dist/{multimodal → cjs/multimodal}/index.js +0 -0
  269. /package/dist/{preprocess.d.ts → cjs/preprocess.d.ts} +0 -0
  270. /package/dist/{preprocess.js → cjs/preprocess.js} +0 -0
  271. /package/dist/{preprocessors → cjs/preprocessors}/index.d.ts +0 -0
  272. /package/dist/{preprocessors → cjs/preprocessors}/index.js +0 -0
  273. /package/dist/{preprocessors → cjs/preprocessors}/mdx.d.ts +0 -0
  274. /package/dist/{preprocessors → cjs/preprocessors}/mdx.js +0 -0
  275. /package/dist/{preprocessors → cjs/preprocessors}/mermaid.d.ts +0 -0
  276. /package/dist/{preprocessors → cjs/preprocessors}/mermaid.js +0 -0
  277. /package/dist/{preprocessors → cjs/preprocessors}/registry.d.ts +0 -0
  278. /package/dist/{preprocessors → cjs/preprocessors}/registry.js +0 -0
  279. /package/dist/{run-error-recovery-tests.d.ts → cjs/run-error-recovery-tests.d.ts} +0 -0
  280. /package/dist/{run-error-recovery-tests.js → cjs/run-error-recovery-tests.js} +0 -0
  281. /package/dist/{search-standalone.d.ts → cjs/search-standalone.d.ts} +0 -0
  282. /package/dist/{search-standalone.js → cjs/search-standalone.js} +0 -0
  283. /package/dist/{search.d.ts → cjs/search.d.ts} +0 -0
  284. /package/dist/{search.js → cjs/search.js} +0 -0
  285. /package/dist/{test-utils.d.ts → cjs/test-utils.d.ts} +0 -0
  286. /package/dist/{test-utils.js → cjs/test-utils.js} +0 -0
  287. /package/dist/{text → cjs/text}/chunker.d.ts +0 -0
  288. /package/dist/{text → cjs/text}/chunker.js +0 -0
  289. /package/dist/{text → cjs/text}/embedder.d.ts +0 -0
  290. /package/dist/{text → cjs/text}/embedder.js +0 -0
  291. /package/dist/{text → cjs/text}/index.d.ts +0 -0
  292. /package/dist/{text → cjs/text}/index.js +0 -0
  293. /package/dist/{text → cjs/text}/preprocessors/index.d.ts +0 -0
  294. /package/dist/{text → cjs/text}/preprocessors/index.js +0 -0
  295. /package/dist/{text → cjs/text}/preprocessors/mdx.d.ts +0 -0
  296. /package/dist/{text → cjs/text}/preprocessors/mdx.js +0 -0
  297. /package/dist/{text → cjs/text}/preprocessors/mermaid.d.ts +0 -0
  298. /package/dist/{text → cjs/text}/preprocessors/mermaid.js +0 -0
  299. /package/dist/{text → cjs/text}/preprocessors/registry.d.ts +0 -0
  300. /package/dist/{text → cjs/text}/preprocessors/registry.js +0 -0
  301. /package/dist/{text → cjs/text}/reranker.d.ts +0 -0
  302. /package/dist/{text → cjs/text}/reranker.js +0 -0
  303. /package/dist/{text → cjs/text}/sentence-transformer-embedder.d.ts +0 -0
  304. /package/dist/{text → cjs/text}/sentence-transformer-embedder.js +0 -0
  305. /package/dist/{text → cjs/text}/tokenizer.d.ts +0 -0
  306. /package/dist/{text → cjs/text}/tokenizer.js +0 -0
  307. /package/dist/{types.d.ts → cjs/types.d.ts} +0 -0
  308. /package/dist/{types.js → cjs/types.js} +0 -0
  309. /package/dist/{utils → cjs/utils}/vector-math.d.ts +0 -0
  310. /package/dist/{utils → cjs/utils}/vector-math.js +0 -0
@@ -0,0 +1,411 @@
1
+ /**
2
+ * CORE MODULE — Model Registry for Chameleon Architecture
3
+ * Centralized registry of supported models with validation and compatibility checking
4
+ * Model-agnostic registry supporting both text and multimodal models
5
+ */
6
+ // =============================================================================
7
+ // MODEL REGISTRY
8
+ // =============================================================================
9
+ /**
10
+ * Registry of supported models with their metadata and capabilities
11
+ * This registry defines all models compatible with the Chameleon architecture
12
+ */
13
+ export const SUPPORTED_MODELS = {
14
+ // Text-only models (sentence-transformer type)
15
+ 'sentence-transformers/all-MiniLM-L6-v2': {
16
+ name: 'sentence-transformers/all-MiniLM-L6-v2',
17
+ type: 'sentence-transformer',
18
+ dimensions: 384,
19
+ version: '1.0.0',
20
+ supportedContentTypes: ['text'],
21
+ capabilities: {
22
+ supportsText: true,
23
+ supportsImages: false,
24
+ supportsBatchProcessing: true,
25
+ supportsMetadata: true,
26
+ maxBatchSize: 32,
27
+ maxTextLength: 512
28
+ },
29
+ requirements: {
30
+ transformersJsVersion: '>=2.6.0',
31
+ minimumMemory: 256, // MB
32
+ requiredFeatures: ['tokenizers'],
33
+ platformSupport: ['node', 'browser']
34
+ }
35
+ },
36
+ 'Xenova/all-mpnet-base-v2': {
37
+ name: 'Xenova/all-mpnet-base-v2',
38
+ type: 'sentence-transformer',
39
+ dimensions: 768,
40
+ version: '1.0.0',
41
+ supportedContentTypes: ['text'],
42
+ capabilities: {
43
+ supportsText: true,
44
+ supportsImages: false,
45
+ supportsBatchProcessing: true,
46
+ supportsMetadata: true,
47
+ maxBatchSize: 16,
48
+ maxTextLength: 512
49
+ },
50
+ requirements: {
51
+ transformersJsVersion: '>=2.6.0',
52
+ minimumMemory: 512, // MB
53
+ requiredFeatures: ['tokenizers'],
54
+ platformSupport: ['node', 'browser']
55
+ }
56
+ },
57
+ // Multimodal models (CLIP type)
58
+ // Fixed implementation: Reliable text and image embedding without fallback mechanisms
59
+ 'Xenova/clip-vit-base-patch32': {
60
+ name: 'Xenova/clip-vit-base-patch32',
61
+ type: 'clip',
62
+ dimensions: 512,
63
+ version: '1.0.0',
64
+ supportedContentTypes: ['text', 'image'],
65
+ capabilities: {
66
+ supportsText: true, // Fixed: Reliable text embedding using CLIPTextModelWithProjection
67
+ supportsImages: true, // Fixed: Reliable image embedding using CLIPVisionModelWithProjection
68
+ supportsBatchProcessing: true,
69
+ supportsMetadata: true,
70
+ supportsMultimodal: true, // True cross-modal search capabilities
71
+ maxBatchSize: 8,
72
+ maxTextLength: 77, // CLIP's token limit (tokenizer handles truncation)
73
+ supportedImageFormats: ['jpg', 'jpeg', 'png', 'webp', 'gif']
74
+ },
75
+ requirements: {
76
+ transformersJsVersion: '>=2.8.0',
77
+ minimumMemory: 1024, // MB
78
+ requiredFeatures: ['vision', 'tokenizers'],
79
+ platformSupport: ['node', 'browser']
80
+ }
81
+ },
82
+ 'Xenova/clip-vit-base-patch16': {
83
+ name: 'Xenova/clip-vit-base-patch16',
84
+ type: 'clip',
85
+ dimensions: 512,
86
+ version: '1.0.0',
87
+ supportedContentTypes: ['text', 'image'],
88
+ capabilities: {
89
+ supportsText: true, // Fixed: Reliable text embedding using CLIPTextModelWithProjection
90
+ supportsImages: true, // Fixed: Reliable image embedding using CLIPVisionModelWithProjection
91
+ supportsBatchProcessing: true,
92
+ supportsMetadata: true,
93
+ supportsMultimodal: true, // True cross-modal search capabilities
94
+ maxBatchSize: 4,
95
+ maxTextLength: 77, // CLIP's token limit (tokenizer handles truncation)
96
+ supportedImageFormats: ['jpg', 'jpeg', 'png', 'webp', 'gif']
97
+ },
98
+ requirements: {
99
+ transformersJsVersion: '>=2.8.0',
100
+ minimumMemory: 1536, // MB
101
+ requiredFeatures: ['vision', 'tokenizers'],
102
+ platformSupport: ['node', 'browser']
103
+ }
104
+ }
105
+ };
106
+ // =============================================================================
107
+ // MODEL REGISTRY OPERATIONS
108
+ // =============================================================================
109
+ /**
110
+ * Model registry class providing validation and model information services
111
+ * Enhanced with comprehensive validation and compatibility checking
112
+ */
113
+ export class ModelRegistry {
114
+ /**
115
+ * Gets model information for a given model name
116
+ * @param modelName - Name of the model
117
+ * @returns Model information or null if not supported
118
+ */
119
+ static getModelInfo(modelName) {
120
+ return SUPPORTED_MODELS[modelName] || null;
121
+ }
122
+ /**
123
+ * Validates a model name and returns compatibility information
124
+ * @param modelName - Name of the model to validate
125
+ * @returns Model validation result with errors, warnings, and suggestions
126
+ */
127
+ static validateModel(modelName) {
128
+ const modelInfo = this.getModelInfo(modelName);
129
+ if (!modelInfo) {
130
+ const suggestions = this.getSimilarModels(modelName);
131
+ return {
132
+ isValid: false,
133
+ errors: [`Model '${modelName}' is not supported`],
134
+ warnings: [],
135
+ suggestions: suggestions.length > 0
136
+ ? [`Did you mean: ${suggestions.join(', ')}?`]
137
+ : [`Available models: ${this.getSupportedModels().join(', ')}`]
138
+ };
139
+ }
140
+ const warnings = [];
141
+ const suggestions = [];
142
+ // Enhanced validation with detailed checks
143
+ this.validateModelRequirements(modelInfo, warnings, suggestions);
144
+ this.validateModelCapabilities(modelInfo, warnings, suggestions);
145
+ return {
146
+ isValid: true,
147
+ errors: [],
148
+ warnings,
149
+ suggestions
150
+ };
151
+ }
152
+ /**
153
+ * Validate model requirements and add warnings/suggestions
154
+ * @private
155
+ */
156
+ static validateModelRequirements(modelInfo, warnings, suggestions) {
157
+ // Memory requirements
158
+ if (modelInfo.requirements.minimumMemory) {
159
+ if (modelInfo.requirements.minimumMemory > 1024) {
160
+ warnings.push(`Model requires ${modelInfo.requirements.minimumMemory}MB memory`);
161
+ }
162
+ if (modelInfo.requirements.minimumMemory > 2048) {
163
+ suggestions.push('Consider using a smaller model variant for better performance');
164
+ }
165
+ }
166
+ // Platform support
167
+ if (modelInfo.requirements.platformSupport) {
168
+ const supportedPlatforms = modelInfo.requirements.platformSupport;
169
+ if (!supportedPlatforms.includes('browser')) {
170
+ warnings.push('Model may not work in browser environments');
171
+ }
172
+ if (!supportedPlatforms.includes('node')) {
173
+ warnings.push('Model may not work in Node.js environments');
174
+ }
175
+ }
176
+ // Feature requirements
177
+ if (modelInfo.requirements.requiredFeatures) {
178
+ const advancedFeatures = ['vision', 'zero-shot-image-classification', 'image-to-text'];
179
+ const hasAdvancedFeatures = modelInfo.requirements.requiredFeatures.some(feature => advancedFeatures.includes(feature));
180
+ if (hasAdvancedFeatures) {
181
+ warnings.push('Model requires advanced transformers.js features');
182
+ suggestions.push('Ensure you have the latest transformers.js version');
183
+ }
184
+ }
185
+ }
186
+ /**
187
+ * Validate model capabilities and add warnings/suggestions
188
+ * @private
189
+ */
190
+ static validateModelCapabilities(modelInfo, warnings, suggestions) {
191
+ // Batch size limitations
192
+ if (modelInfo.capabilities.maxBatchSize && modelInfo.capabilities.maxBatchSize < 8) {
193
+ warnings.push(`Model has limited batch size: ${modelInfo.capabilities.maxBatchSize}`);
194
+ suggestions.push('Use smaller batch sizes for optimal performance');
195
+ }
196
+ // Text length limitations
197
+ if (modelInfo.capabilities.maxTextLength && modelInfo.capabilities.maxTextLength < 256) {
198
+ warnings.push(`Model has limited text length: ${modelInfo.capabilities.maxTextLength} characters`);
199
+ suggestions.push('Long texts will be truncated by the tokenizer');
200
+ }
201
+ // Image format support
202
+ if (modelInfo.capabilities.supportsImages && modelInfo.capabilities.supportedImageFormats) {
203
+ const commonFormats = ['jpg', 'jpeg', 'png'];
204
+ const supportedCommon = commonFormats.filter(format => modelInfo.capabilities.supportedImageFormats.includes(format));
205
+ if (supportedCommon.length < commonFormats.length) {
206
+ const unsupported = commonFormats.filter(format => !supportedCommon.includes(format));
207
+ warnings.push(`Model may not support all common image formats. Unsupported: ${unsupported.join(', ')}`);
208
+ }
209
+ }
210
+ // Performance suggestions for specific model types
211
+ if (modelInfo.type === 'clip') {
212
+ // Highlight fixed CLIP implementation capabilities
213
+ if (modelInfo.capabilities.supportsMultimodal) {
214
+ suggestions.push('CLIP models now support reliable cross-modal search between text and images');
215
+ }
216
+ if (modelInfo.dimensions > 512) {
217
+ suggestions.push('Consider using clip-vit-base-patch32 for better performance');
218
+ }
219
+ if (modelInfo.name.includes('patch16')) {
220
+ suggestions.push('patch16 models are more accurate but slower than patch32');
221
+ }
222
+ }
223
+ if (modelInfo.type === 'sentence-transformer') {
224
+ if (modelInfo.dimensions > 768) {
225
+ suggestions.push('Consider using all-MiniLM-L6-v2 for faster processing');
226
+ }
227
+ }
228
+ }
229
+ /**
230
+ * Lists all supported models, optionally filtered by type
231
+ * @param modelType - Optional model type filter
232
+ * @returns Array of supported model names
233
+ */
234
+ static getSupportedModels(modelType) {
235
+ const allModels = Object.keys(SUPPORTED_MODELS);
236
+ if (!modelType) {
237
+ return allModels;
238
+ }
239
+ return allModels.filter(modelName => SUPPORTED_MODELS[modelName].type === modelType);
240
+ }
241
+ /**
242
+ * Gets models that support a specific content type
243
+ * @param contentType - Content type to filter by
244
+ * @returns Array of model names that support the content type
245
+ */
246
+ static getModelsByContentType(contentType) {
247
+ return Object.keys(SUPPORTED_MODELS).filter(modelName => SUPPORTED_MODELS[modelName].supportedContentTypes.includes(contentType));
248
+ }
249
+ /**
250
+ * Gets the default model for a given model type
251
+ * @param modelType - Model type to get default for
252
+ * @returns Default model name or null if no default available
253
+ */
254
+ static getDefaultModel(modelType) {
255
+ const models = this.getSupportedModels(modelType);
256
+ switch (modelType) {
257
+ case 'sentence-transformer':
258
+ return 'sentence-transformers/all-MiniLM-L6-v2';
259
+ case 'clip':
260
+ return 'Xenova/clip-vit-base-patch32';
261
+ default:
262
+ return models.length > 0 ? models[0] : null;
263
+ }
264
+ }
265
+ /**
266
+ * Checks if a model supports a specific content type
267
+ * @param modelName - Name of the model
268
+ * @param contentType - Content type to check
269
+ * @returns True if the model supports the content type
270
+ */
271
+ static supportsContentType(modelName, contentType) {
272
+ const modelInfo = this.getModelInfo(modelName);
273
+ return modelInfo ? modelInfo.supportedContentTypes.includes(contentType) : false;
274
+ }
275
+ /**
276
+ * Gets models similar to the given model name (for suggestions)
277
+ * @param modelName - Model name to find similar models for
278
+ * @returns Array of similar model names
279
+ */
280
+ static getSimilarModels(modelName) {
281
+ const allModels = Object.keys(SUPPORTED_MODELS);
282
+ const lowerModelName = modelName.toLowerCase();
283
+ // Simple similarity check based on common substrings
284
+ return allModels.filter(supportedModel => {
285
+ const lowerSupported = supportedModel.toLowerCase();
286
+ // Check for common keywords
287
+ const keywords = ['clip', 'mpnet', 'minilm', 'sentence', 'transformer'];
288
+ const modelKeywords = keywords.filter(keyword => lowerModelName.includes(keyword));
289
+ const supportedKeywords = keywords.filter(keyword => lowerSupported.includes(keyword));
290
+ // Return models that share at least one keyword
291
+ return modelKeywords.some(keyword => supportedKeywords.includes(keyword));
292
+ }).slice(0, 3); // Limit to 3 suggestions
293
+ }
294
+ /**
295
+ * Validates model compatibility with system requirements
296
+ * @param modelName - Name of the model to validate
297
+ * @param systemCapabilities - System capabilities to check against
298
+ * @returns Validation result with compatibility information
299
+ */
300
+ static validateSystemCompatibility(modelName, systemCapabilities) {
301
+ const modelInfo = this.getModelInfo(modelName);
302
+ if (!modelInfo) {
303
+ return {
304
+ isValid: false,
305
+ errors: [`Model '${modelName}' is not supported`],
306
+ warnings: [],
307
+ suggestions: []
308
+ };
309
+ }
310
+ const errors = [];
311
+ const warnings = [];
312
+ const suggestions = [];
313
+ // Check memory requirements
314
+ if (systemCapabilities.availableMemory && modelInfo.requirements.minimumMemory) {
315
+ if (systemCapabilities.availableMemory < modelInfo.requirements.minimumMemory) {
316
+ errors.push(`Insufficient memory: ${systemCapabilities.availableMemory}MB available, ` +
317
+ `${modelInfo.requirements.minimumMemory}MB required`);
318
+ // Suggest lighter models
319
+ const lighterModels = this.getSupportedModels(modelInfo.type).filter(name => {
320
+ const info = this.getModelInfo(name);
321
+ return info &&
322
+ info.requirements.minimumMemory &&
323
+ info.requirements.minimumMemory <= systemCapabilities.availableMemory;
324
+ });
325
+ if (lighterModels.length > 0) {
326
+ suggestions.push(`Consider lighter models: ${lighterModels.join(', ')}`);
327
+ }
328
+ }
329
+ }
330
+ // Check platform compatibility
331
+ if (systemCapabilities.platform && modelInfo.requirements.platformSupport) {
332
+ if (!modelInfo.requirements.platformSupport.includes(systemCapabilities.platform)) {
333
+ errors.push(`Platform '${systemCapabilities.platform}' not supported. ` +
334
+ `Supported platforms: ${modelInfo.requirements.platformSupport.join(', ')}`);
335
+ }
336
+ }
337
+ return {
338
+ isValid: errors.length === 0,
339
+ errors,
340
+ warnings,
341
+ suggestions
342
+ };
343
+ }
344
+ }
345
+ // =============================================================================
346
+ // UTILITY FUNCTIONS
347
+ // =============================================================================
348
+ /**
349
+ * Gets the model type for a given model name
350
+ * @param modelName - Name of the model
351
+ * @returns Model type or null if model not supported
352
+ */
353
+ export function getModelType(modelName) {
354
+ const modelInfo = ModelRegistry.getModelInfo(modelName);
355
+ return modelInfo ? modelInfo.type : null;
356
+ }
357
+ /**
358
+ * Gets the dimensions for a given model name
359
+ * @param modelName - Name of the model
360
+ * @returns Number of dimensions or null if model not supported
361
+ */
362
+ export function getModelDimensions(modelName) {
363
+ const modelInfo = ModelRegistry.getModelInfo(modelName);
364
+ return modelInfo ? modelInfo.dimensions : null;
365
+ }
366
+ /**
367
+ * Checks if a model is a text-only model
368
+ * @param modelName - Name of the model
369
+ * @returns True if the model only supports text
370
+ */
371
+ export function isTextOnlyModel(modelName) {
372
+ const modelInfo = ModelRegistry.getModelInfo(modelName);
373
+ return modelInfo ?
374
+ modelInfo.supportedContentTypes.length === 1 &&
375
+ modelInfo.supportedContentTypes[0] === 'text' :
376
+ false;
377
+ }
378
+ /**
379
+ * Checks if a model is a multimodal model
380
+ * @param modelName - Name of the model
381
+ * @returns True if the model supports multiple content types
382
+ */
383
+ export function isMultimodalModel(modelName) {
384
+ const modelInfo = ModelRegistry.getModelInfo(modelName);
385
+ return modelInfo ? modelInfo.supportedContentTypes.length > 1 : false;
386
+ }
387
+ /**
388
+ * Gets recommended batch size for a model
389
+ * @param modelName - Name of the model
390
+ * @returns Recommended batch size or default value
391
+ */
392
+ export function getRecommendedBatchSize(modelName) {
393
+ const modelInfo = ModelRegistry.getModelInfo(modelName);
394
+ return modelInfo?.capabilities.maxBatchSize || 8;
395
+ }
396
+ // =============================================================================
397
+ // CONSTANTS
398
+ // =============================================================================
399
+ /**
400
+ * Default model names for different types
401
+ */
402
+ export const DEFAULT_MODELS = {
403
+ 'sentence-transformer': 'sentence-transformers/all-MiniLM-L6-v2',
404
+ 'clip': 'Xenova/clip-vit-base-patch32'
405
+ };
406
+ // =============================================================================
407
+ // REMOVED IN v3.0.0: MODEL_TYPE_ALIASES
408
+ // =============================================================================
409
+ // Model type aliases have been removed as they were not used anywhere in the codebase.
410
+ // Use ModelType directly: 'sentence-transformer' or 'clip'
411
+ //# sourceMappingURL=model-registry.js.map
@@ -0,0 +1,217 @@
1
+ /**
2
+ * CORE MODULE — Model Validation and Compatibility System
3
+ * Comprehensive validation system for transformers.js compatibility and model support
4
+ * Provides detailed error messages and suggestions for unsupported models
5
+ */
6
+ import type { ModelValidationResult, ModelInfo, ModelType, TransformersCompatibilityError, ModelValidationError } from './universal-embedder.js';
7
+ /**
8
+ * Transformers.js version information and compatibility matrix
9
+ */
10
+ export interface TransformersJsInfo {
11
+ version: string;
12
+ supportedFeatures: readonly string[];
13
+ supportedModelTypes: readonly ModelType[];
14
+ knownIssues: readonly string[];
15
+ }
16
+ /**
17
+ * System capabilities for compatibility checking
18
+ */
19
+ export interface SystemCapabilities {
20
+ transformersJsVersion?: string;
21
+ availableMemory?: number;
22
+ platform?: 'node' | 'browser' | 'worker';
23
+ gpuSupport?: boolean;
24
+ supportedFeatures?: readonly string[];
25
+ }
26
+ /**
27
+ * Detailed validation result with comprehensive information
28
+ */
29
+ export interface DetailedValidationResult extends ModelValidationResult {
30
+ modelInfo?: ModelInfo;
31
+ systemCompatibility?: {
32
+ transformersJs: boolean;
33
+ memory: boolean;
34
+ platform: boolean;
35
+ features: boolean;
36
+ };
37
+ recommendations?: {
38
+ alternativeModels: string[];
39
+ systemUpgrades: string[];
40
+ configurationChanges: string[];
41
+ };
42
+ }
43
+ /**
44
+ * Compatibility matrix for different transformers.js versions
45
+ */
46
+ export declare const TRANSFORMERS_COMPATIBILITY_MATRIX: Record<string, TransformersJsInfo>;
47
+ /**
48
+ * Comprehensive model validator with transformers.js compatibility checking
49
+ */
50
+ export declare class ModelValidator {
51
+ private static currentTransformersVersion;
52
+ private static systemCapabilities;
53
+ /**
54
+ * Set the current transformers.js version for compatibility checking
55
+ * @param version - Current transformers.js version
56
+ */
57
+ static setTransformersVersion(version: string): void;
58
+ /**
59
+ * Set system capabilities for compatibility checking
60
+ * @param capabilities - System capabilities
61
+ */
62
+ static setSystemCapabilities(capabilities: SystemCapabilities): void;
63
+ /**
64
+ * Get the current transformers.js version
65
+ * @returns Current version or null if not set
66
+ */
67
+ static getTransformersVersion(): string | null;
68
+ /**
69
+ * Detect transformers.js version from the environment
70
+ * @returns Promise resolving to the detected version or null
71
+ */
72
+ static detectTransformersVersion(): Promise<string | null>;
73
+ /**
74
+ * Validate a model with comprehensive compatibility checking
75
+ * @param modelName - Name of the model to validate
76
+ * @param systemCapabilities - Optional system capabilities override
77
+ * @returns Detailed validation result
78
+ */
79
+ static validateModelDetailed(modelName: string, systemCapabilities?: SystemCapabilities): Promise<DetailedValidationResult>;
80
+ /**
81
+ * Validate transformers.js version compatibility for a model
82
+ * @param modelInfo - Model information
83
+ * @param transformersVersion - Transformers.js version to check
84
+ * @returns Validation result
85
+ */
86
+ static validateTransformersCompatibility(modelInfo: ModelInfo, transformersVersion?: string): ModelValidationResult;
87
+ /**
88
+ * Get all models compatible with a specific transformers.js version
89
+ * @param transformersVersion - Transformers.js version
90
+ * @returns Array of compatible model names
91
+ */
92
+ static getCompatibleModels(transformersVersion?: string): string[];
93
+ /**
94
+ * Get recommended models for a specific use case
95
+ * @param contentTypes - Required content types
96
+ * @param maxMemory - Maximum available memory in MB
97
+ * @param transformersVersion - Transformers.js version
98
+ * @returns Array of recommended model names
99
+ */
100
+ static getRecommendedModels(contentTypes: string[], maxMemory?: number, transformersVersion?: string): string[];
101
+ /**
102
+ * Check system compatibility for a model
103
+ */
104
+ private static checkSystemCompatibility;
105
+ /**
106
+ * Generate recommendations based on validation results
107
+ */
108
+ private static generateRecommendations;
109
+ /**
110
+ * Check version compatibility using semantic versioning
111
+ */
112
+ private static checkVersionCompatibility;
113
+ /**
114
+ * Get compatibility information for a transformers.js version
115
+ */
116
+ private static getCompatibilityInfo;
117
+ /**
118
+ * Get similar models for suggestions
119
+ */
120
+ static getSimilarModels(modelName: string): string[];
121
+ }
122
+ /**
123
+ * Enhanced ModelValidationError class with comprehensive error information
124
+ */
125
+ export declare class EnhancedModelValidationError extends Error implements ModelValidationError {
126
+ readonly modelName: string;
127
+ readonly availableModels: readonly string[];
128
+ readonly errorType: 'not_found' | 'incompatible' | 'unsupported_features';
129
+ readonly suggestions: readonly string[];
130
+ readonly troubleshootingSteps: readonly string[];
131
+ readonly name = "ModelValidationError";
132
+ constructor(modelName: string, availableModels: readonly string[], message: string, errorType?: 'not_found' | 'incompatible' | 'unsupported_features', suggestions?: readonly string[], troubleshootingSteps?: readonly string[]);
133
+ /**
134
+ * Get formatted error message with suggestions and troubleshooting steps
135
+ */
136
+ getFormattedMessage(): string;
137
+ /**
138
+ * Log the error with proper formatting
139
+ */
140
+ logError(): void;
141
+ }
142
+ /**
143
+ * Enhanced TransformersCompatibilityError class with version information
144
+ */
145
+ export declare class EnhancedTransformersCompatibilityError extends Error implements TransformersCompatibilityError {
146
+ readonly modelName: string;
147
+ readonly requiredVersion: string;
148
+ readonly currentVersion: string;
149
+ readonly upgradeInstructions: readonly string[];
150
+ readonly alternativeModels: readonly string[];
151
+ readonly name = "TransformersCompatibilityError";
152
+ constructor(modelName: string, requiredVersion: string, currentVersion: string, message: string, upgradeInstructions?: readonly string[], alternativeModels?: readonly string[]);
153
+ /**
154
+ * Get formatted error message with upgrade instructions
155
+ */
156
+ getFormattedMessage(): string;
157
+ /**
158
+ * Log the error with proper formatting
159
+ */
160
+ logError(): void;
161
+ }
162
+ /**
163
+ * Create a comprehensive model validation error with helpful information
164
+ * @param modelName - Name of the invalid model
165
+ * @param reason - Reason for validation failure
166
+ * @param errorType - Type of validation error
167
+ * @returns Enhanced ModelValidationError instance
168
+ */
169
+ export declare function createModelValidationError(modelName: string, reason: string, errorType?: 'not_found' | 'incompatible' | 'unsupported_features'): EnhancedModelValidationError;
170
+ /**
171
+ * Create a comprehensive transformers compatibility error with version information
172
+ * @param modelName - Name of the model
173
+ * @param requiredVersion - Required transformers.js version
174
+ * @param currentVersion - Current transformers.js version
175
+ * @returns Enhanced TransformersCompatibilityError instance
176
+ */
177
+ export declare function createTransformersCompatibilityError(modelName: string, requiredVersion: string, currentVersion: string): EnhancedTransformersCompatibilityError;
178
+ /**
179
+ * Initialize the model validator with system detection
180
+ * @returns Promise resolving to initialization success
181
+ */
182
+ export declare function initializeModelValidator(): Promise<boolean>;
183
+ /**
184
+ * Comprehensive model validation with detailed error reporting
185
+ * @param modelName - Name of the model to validate
186
+ * @param options - Validation options
187
+ * @returns Promise resolving to validation result or throws enhanced error
188
+ */
189
+ export declare function validateModelWithDetailedErrors(modelName: string, options?: {
190
+ checkTransformersVersion?: boolean;
191
+ systemCapabilities?: SystemCapabilities;
192
+ throwOnError?: boolean;
193
+ }): Promise<DetailedValidationResult>;
194
+ /**
195
+ * Validate model and provide user-friendly error messages
196
+ * @param modelName - Name of the model to validate
197
+ * @param options - Validation options
198
+ * @returns Promise resolving to true if valid, throws user-friendly error if not
199
+ */
200
+ export declare function validateModelOrThrow(modelName: string, options?: {
201
+ checkTransformersVersion?: boolean;
202
+ systemCapabilities?: SystemCapabilities;
203
+ logErrors?: boolean;
204
+ }): Promise<boolean>;
205
+ /**
206
+ * Minimum supported transformers.js version
207
+ */
208
+ export declare const MIN_TRANSFORMERS_VERSION = "2.6.0";
209
+ /**
210
+ * Recommended transformers.js version
211
+ */
212
+ export declare const RECOMMENDED_TRANSFORMERS_VERSION = "2.8.0";
213
+ /**
214
+ * Default system capabilities for validation
215
+ */
216
+ export declare const DEFAULT_SYSTEM_CAPABILITIES: SystemCapabilities;
217
+ //# sourceMappingURL=model-validator.d.ts.map