@typia/utils 12.0.2 → 13.0.0-dev.20260425

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 (602) hide show
  1. package/lib/_virtual/ArrayUtil.mjs +4 -0
  2. package/lib/_virtual/ArrayUtil.mjs.map +1 -0
  3. package/lib/_virtual/EndpointUtil.mjs +4 -0
  4. package/lib/_virtual/EndpointUtil.mjs.map +1 -0
  5. package/lib/_virtual/HttpError.mjs +4 -0
  6. package/lib/_virtual/HttpError.mjs.map +1 -0
  7. package/lib/_virtual/HttpLlm.mjs +4 -0
  8. package/lib/_virtual/HttpLlm.mjs.map +1 -0
  9. package/lib/_virtual/HttpLlmApplicationComposer.mjs +4 -0
  10. package/lib/_virtual/HttpLlmApplicationComposer.mjs.map +1 -0
  11. package/lib/_virtual/HttpLlmFunctionFetcher.mjs +4 -0
  12. package/lib/_virtual/HttpLlmFunctionFetcher.mjs.map +1 -0
  13. package/lib/_virtual/HttpMigrateApplicationComposer.mjs +4 -0
  14. package/lib/_virtual/HttpMigrateApplicationComposer.mjs.map +1 -0
  15. package/lib/_virtual/HttpMigrateRouteAccessor.mjs +4 -0
  16. package/lib/_virtual/HttpMigrateRouteAccessor.mjs.map +1 -0
  17. package/lib/_virtual/HttpMigrateRouteComposer.mjs +4 -0
  18. package/lib/_virtual/HttpMigrateRouteComposer.mjs.map +1 -0
  19. package/lib/_virtual/HttpMigrateRouteFetcher.mjs +4 -0
  20. package/lib/_virtual/HttpMigrateRouteFetcher.mjs.map +1 -0
  21. package/lib/_virtual/HttpMigration.mjs +4 -0
  22. package/lib/_virtual/HttpMigration.mjs.map +1 -0
  23. package/lib/_virtual/IOpenApiValidatorContext.mjs +4 -0
  24. package/lib/_virtual/IOpenApiValidatorContext.mjs.map +1 -0
  25. package/lib/_virtual/JsonDescriptor.mjs +4 -0
  26. package/lib/_virtual/JsonDescriptor.mjs.map +1 -0
  27. package/lib/_virtual/LlmDescriptionInverter.mjs +4 -0
  28. package/lib/_virtual/LlmDescriptionInverter.mjs.map +1 -0
  29. package/lib/_virtual/LlmJson.mjs +4 -0
  30. package/lib/_virtual/LlmJson.mjs.map +1 -0
  31. package/lib/_virtual/LlmParametersComposer.mjs +4 -0
  32. package/lib/_virtual/LlmParametersComposer.mjs.map +1 -0
  33. package/lib/_virtual/LlmSchemaConverter.mjs +4 -0
  34. package/lib/_virtual/LlmSchemaConverter.mjs.map +1 -0
  35. package/lib/_virtual/LlmTypeChecker.mjs +4 -0
  36. package/lib/_virtual/LlmTypeChecker.mjs.map +1 -0
  37. package/lib/_virtual/MapUtil.mjs +4 -0
  38. package/lib/_virtual/MapUtil.mjs.map +1 -0
  39. package/lib/_virtual/NamingConvention.mjs +4 -0
  40. package/lib/_virtual/NamingConvention.mjs.map +1 -0
  41. package/lib/_virtual/OpenApiArrayValidator.mjs +4 -0
  42. package/lib/_virtual/OpenApiArrayValidator.mjs.map +1 -0
  43. package/lib/_virtual/OpenApiBooleanValidator.mjs +4 -0
  44. package/lib/_virtual/OpenApiBooleanValidator.mjs.map +1 -0
  45. package/lib/_virtual/OpenApiConstantValidator.mjs +4 -0
  46. package/lib/_virtual/OpenApiConstantValidator.mjs.map +1 -0
  47. package/lib/_virtual/OpenApiConstraintShifter.mjs +4 -0
  48. package/lib/_virtual/OpenApiConstraintShifter.mjs.map +1 -0
  49. package/lib/_virtual/OpenApiConverter.mjs +4 -0
  50. package/lib/_virtual/OpenApiConverter.mjs.map +1 -0
  51. package/lib/_virtual/OpenApiExclusiveEmender.mjs +4 -0
  52. package/lib/_virtual/OpenApiExclusiveEmender.mjs.map +1 -0
  53. package/lib/_virtual/OpenApiIntegerValidator.mjs +4 -0
  54. package/lib/_virtual/OpenApiIntegerValidator.mjs.map +1 -0
  55. package/lib/_virtual/OpenApiNumberValidator.mjs +4 -0
  56. package/lib/_virtual/OpenApiNumberValidator.mjs.map +1 -0
  57. package/lib/_virtual/OpenApiObjectValidator.mjs +4 -0
  58. package/lib/_virtual/OpenApiObjectValidator.mjs.map +1 -0
  59. package/lib/_virtual/OpenApiOneOfValidator.mjs +4 -0
  60. package/lib/_virtual/OpenApiOneOfValidator.mjs.map +1 -0
  61. package/lib/_virtual/OpenApiSchemaNamingRule.mjs +4 -0
  62. package/lib/_virtual/OpenApiSchemaNamingRule.mjs.map +1 -0
  63. package/lib/_virtual/OpenApiStationValidator.mjs +4 -0
  64. package/lib/_virtual/OpenApiStationValidator.mjs.map +1 -0
  65. package/lib/_virtual/OpenApiStringValidator.mjs +4 -0
  66. package/lib/_virtual/OpenApiStringValidator.mjs.map +1 -0
  67. package/lib/_virtual/OpenApiTupleValidator.mjs +4 -0
  68. package/lib/_virtual/OpenApiTupleValidator.mjs.map +1 -0
  69. package/lib/_virtual/OpenApiTypeChecker.mjs +4 -0
  70. package/lib/_virtual/OpenApiTypeChecker.mjs.map +1 -0
  71. package/lib/_virtual/OpenApiTypeCheckerBase.mjs +4 -0
  72. package/lib/_virtual/OpenApiTypeCheckerBase.mjs.map +1 -0
  73. package/lib/_virtual/OpenApiV3Downgrader.mjs +4 -0
  74. package/lib/_virtual/OpenApiV3Downgrader.mjs.map +1 -0
  75. package/lib/_virtual/OpenApiV3TypeChecker.mjs +4 -0
  76. package/lib/_virtual/OpenApiV3TypeChecker.mjs.map +1 -0
  77. package/lib/_virtual/OpenApiV3Upgrader.mjs +4 -0
  78. package/lib/_virtual/OpenApiV3Upgrader.mjs.map +1 -0
  79. package/lib/_virtual/OpenApiV3_1Downgrader.mjs +4 -0
  80. package/lib/_virtual/OpenApiV3_1Downgrader.mjs.map +1 -0
  81. package/lib/_virtual/OpenApiV3_1TypeChecker.mjs +4 -0
  82. package/lib/_virtual/OpenApiV3_1TypeChecker.mjs.map +1 -0
  83. package/lib/_virtual/OpenApiV3_1Upgrader.mjs +4 -0
  84. package/lib/_virtual/OpenApiV3_1Upgrader.mjs.map +1 -0
  85. package/lib/_virtual/OpenApiV3_2Upgrader.mjs +4 -0
  86. package/lib/_virtual/OpenApiV3_2Upgrader.mjs.map +1 -0
  87. package/lib/_virtual/OpenApiValidator.mjs +4 -0
  88. package/lib/_virtual/OpenApiValidator.mjs.map +1 -0
  89. package/lib/_virtual/Singleton.mjs +4 -0
  90. package/lib/_virtual/Singleton.mjs.map +1 -0
  91. package/lib/_virtual/StringUtil.mjs +4 -0
  92. package/lib/_virtual/StringUtil.mjs.map +1 -0
  93. package/lib/_virtual/SwaggerV2Downgrader.mjs +4 -0
  94. package/lib/_virtual/SwaggerV2Downgrader.mjs.map +1 -0
  95. package/lib/_virtual/SwaggerV2TypeChecker.mjs +4 -0
  96. package/lib/_virtual/SwaggerV2TypeChecker.mjs.map +1 -0
  97. package/lib/_virtual/SwaggerV2Upgrader.mjs +4 -0
  98. package/lib/_virtual/SwaggerV2Upgrader.mjs.map +1 -0
  99. package/lib/_virtual/_commonjsHelpers.mjs +6 -0
  100. package/lib/_virtual/_commonjsHelpers.mjs.map +1 -0
  101. package/lib/_virtual/_isBigintString.mjs +4 -0
  102. package/lib/_virtual/_isBigintString.mjs.map +1 -0
  103. package/lib/_virtual/_isFormatByte.mjs +4 -0
  104. package/lib/_virtual/_isFormatByte.mjs.map +1 -0
  105. package/lib/_virtual/_isFormatDate.mjs +4 -0
  106. package/lib/_virtual/_isFormatDate.mjs.map +1 -0
  107. package/lib/_virtual/_isFormatDateTime.mjs +4 -0
  108. package/lib/_virtual/_isFormatDateTime.mjs.map +1 -0
  109. package/lib/_virtual/_isFormatDuration.mjs +4 -0
  110. package/lib/_virtual/_isFormatDuration.mjs.map +1 -0
  111. package/lib/_virtual/_isFormatEmail.mjs +4 -0
  112. package/lib/_virtual/_isFormatEmail.mjs.map +1 -0
  113. package/lib/_virtual/_isFormatHostname.mjs +4 -0
  114. package/lib/_virtual/_isFormatHostname.mjs.map +1 -0
  115. package/lib/_virtual/_isFormatIdnEmail.mjs +4 -0
  116. package/lib/_virtual/_isFormatIdnEmail.mjs.map +1 -0
  117. package/lib/_virtual/_isFormatIdnHostname.mjs +4 -0
  118. package/lib/_virtual/_isFormatIdnHostname.mjs.map +1 -0
  119. package/lib/_virtual/_isFormatIpv4.mjs +4 -0
  120. package/lib/_virtual/_isFormatIpv4.mjs.map +1 -0
  121. package/lib/_virtual/_isFormatIpv6.mjs +4 -0
  122. package/lib/_virtual/_isFormatIpv6.mjs.map +1 -0
  123. package/lib/_virtual/_isFormatIri.mjs +4 -0
  124. package/lib/_virtual/_isFormatIri.mjs.map +1 -0
  125. package/lib/_virtual/_isFormatIriReference.mjs +4 -0
  126. package/lib/_virtual/_isFormatIriReference.mjs.map +1 -0
  127. package/lib/_virtual/_isFormatJsonPointer.mjs +4 -0
  128. package/lib/_virtual/_isFormatJsonPointer.mjs.map +1 -0
  129. package/lib/_virtual/_isFormatPassword.mjs +4 -0
  130. package/lib/_virtual/_isFormatPassword.mjs.map +1 -0
  131. package/lib/_virtual/_isFormatRegex.mjs +4 -0
  132. package/lib/_virtual/_isFormatRegex.mjs.map +1 -0
  133. package/lib/_virtual/_isFormatRelativeJsonPointer.mjs +4 -0
  134. package/lib/_virtual/_isFormatRelativeJsonPointer.mjs.map +1 -0
  135. package/lib/_virtual/_isFormatTime.mjs +4 -0
  136. package/lib/_virtual/_isFormatTime.mjs.map +1 -0
  137. package/lib/_virtual/_isFormatUri.mjs +4 -0
  138. package/lib/_virtual/_isFormatUri.mjs.map +1 -0
  139. package/lib/_virtual/_isFormatUriReference.mjs +4 -0
  140. package/lib/_virtual/_isFormatUriReference.mjs.map +1 -0
  141. package/lib/_virtual/_isFormatUriTemplate.mjs +4 -0
  142. package/lib/_virtual/_isFormatUriTemplate.mjs.map +1 -0
  143. package/lib/_virtual/_isFormatUrl.mjs +4 -0
  144. package/lib/_virtual/_isFormatUrl.mjs.map +1 -0
  145. package/lib/_virtual/_isFormatUuid.mjs +4 -0
  146. package/lib/_virtual/_isFormatUuid.mjs.map +1 -0
  147. package/lib/_virtual/_isUniqueItems.mjs +4 -0
  148. package/lib/_virtual/_isUniqueItems.mjs.map +1 -0
  149. package/lib/_virtual/coerceLlmArguments.mjs +4 -0
  150. package/lib/_virtual/coerceLlmArguments.mjs.map +1 -0
  151. package/lib/_virtual/dedent.mjs +4 -0
  152. package/lib/_virtual/dedent.mjs.map +1 -0
  153. package/lib/_virtual/index.mjs +4 -0
  154. package/lib/_virtual/index.mjs.map +1 -0
  155. package/lib/_virtual/index2.mjs +4 -0
  156. package/lib/_virtual/index2.mjs.map +1 -0
  157. package/lib/_virtual/index3.mjs +4 -0
  158. package/lib/_virtual/index3.mjs.map +1 -0
  159. package/lib/_virtual/index4.mjs +4 -0
  160. package/lib/_virtual/index4.mjs.map +1 -0
  161. package/lib/_virtual/index5.mjs +4 -0
  162. package/lib/_virtual/index5.mjs.map +1 -0
  163. package/lib/_virtual/parseLenientJson.mjs +4 -0
  164. package/lib/_virtual/parseLenientJson.mjs.map +1 -0
  165. package/lib/_virtual/stringifyValidationFailure.mjs +4 -0
  166. package/lib/_virtual/stringifyValidationFailure.mjs.map +1 -0
  167. package/lib/converters/LlmSchemaConverter.js +149 -51
  168. package/lib/converters/LlmSchemaConverter.js.map +1 -1
  169. package/lib/converters/LlmSchemaConverter.mjs +5 -511
  170. package/lib/converters/LlmSchemaConverter.mjs.map +1 -1
  171. package/lib/converters/LlmSchemaConverter2.mjs +551 -0
  172. package/lib/converters/LlmSchemaConverter2.mjs.map +1 -0
  173. package/lib/converters/OpenApiConverter.js.map +1 -1
  174. package/lib/converters/OpenApiConverter.mjs +5 -146
  175. package/lib/converters/OpenApiConverter.mjs.map +1 -1
  176. package/lib/converters/OpenApiConverter2.mjs +167 -0
  177. package/lib/converters/OpenApiConverter2.mjs.map +1 -0
  178. package/lib/converters/index.mjs +7 -3
  179. package/lib/converters/index.mjs.map +1 -1
  180. package/lib/converters/index2.mjs +37 -0
  181. package/lib/converters/index2.mjs.map +1 -0
  182. package/lib/converters/internal/LlmDescriptionInverter.js.map +1 -1
  183. package/lib/converters/internal/LlmDescriptionInverter.mjs +5 -138
  184. package/lib/converters/internal/LlmDescriptionInverter.mjs.map +1 -1
  185. package/lib/converters/internal/LlmDescriptionInverter2.mjs +153 -0
  186. package/lib/converters/internal/LlmDescriptionInverter2.mjs.map +1 -0
  187. package/lib/converters/internal/LlmParametersComposer.js +14 -17
  188. package/lib/converters/internal/LlmParametersComposer.js.map +1 -1
  189. package/lib/converters/internal/LlmParametersComposer.mjs +5 -39
  190. package/lib/converters/internal/LlmParametersComposer.mjs.map +1 -1
  191. package/lib/converters/internal/LlmParametersComposer2.mjs +48 -0
  192. package/lib/converters/internal/LlmParametersComposer2.mjs.map +1 -0
  193. package/lib/converters/internal/OpenApiConstraintShifter.js.map +1 -1
  194. package/lib/converters/internal/OpenApiConstraintShifter.mjs +5 -99
  195. package/lib/converters/internal/OpenApiConstraintShifter.mjs.map +1 -1
  196. package/lib/converters/internal/OpenApiConstraintShifter2.mjs +115 -0
  197. package/lib/converters/internal/OpenApiConstraintShifter2.mjs.map +1 -0
  198. package/lib/converters/internal/OpenApiExclusiveEmender.js.map +1 -1
  199. package/lib/converters/internal/OpenApiExclusiveEmender.mjs +6 -33
  200. package/lib/converters/internal/OpenApiExclusiveEmender.mjs.map +1 -1
  201. package/lib/converters/internal/OpenApiExclusiveEmender2.mjs +43 -0
  202. package/lib/converters/internal/OpenApiExclusiveEmender2.mjs.map +1 -0
  203. package/lib/converters/internal/OpenApiV3Downgrader.js +2 -1
  204. package/lib/converters/internal/OpenApiV3Downgrader.js.map +1 -1
  205. package/lib/converters/internal/OpenApiV3Downgrader.mjs +5 -299
  206. package/lib/converters/internal/OpenApiV3Downgrader.mjs.map +1 -1
  207. package/lib/converters/internal/OpenApiV3Downgrader2.mjs +247 -0
  208. package/lib/converters/internal/OpenApiV3Downgrader2.mjs.map +1 -0
  209. package/lib/converters/internal/OpenApiV3Upgrader.js +58 -67
  210. package/lib/converters/internal/OpenApiV3Upgrader.js.map +1 -1
  211. package/lib/converters/internal/OpenApiV3Upgrader.mjs +5 -367
  212. package/lib/converters/internal/OpenApiV3Upgrader.mjs.map +1 -1
  213. package/lib/converters/internal/OpenApiV3Upgrader2.mjs +308 -0
  214. package/lib/converters/internal/OpenApiV3Upgrader2.mjs.map +1 -0
  215. package/lib/converters/internal/OpenApiV3_1Downgrader.js.map +1 -1
  216. package/lib/converters/internal/OpenApiV3_1Downgrader.mjs +5 -236
  217. package/lib/converters/internal/OpenApiV3_1Downgrader.mjs.map +1 -1
  218. package/lib/converters/internal/OpenApiV3_1Downgrader2.mjs +203 -0
  219. package/lib/converters/internal/OpenApiV3_1Downgrader2.mjs.map +1 -0
  220. package/lib/converters/internal/OpenApiV3_1Upgrader.js +68 -70
  221. package/lib/converters/internal/OpenApiV3_1Upgrader.js.map +1 -1
  222. package/lib/converters/internal/OpenApiV3_1Upgrader.mjs +5 -564
  223. package/lib/converters/internal/OpenApiV3_1Upgrader.mjs.map +1 -1
  224. package/lib/converters/internal/OpenApiV3_1Upgrader2.mjs +435 -0
  225. package/lib/converters/internal/OpenApiV3_1Upgrader2.mjs.map +1 -0
  226. package/lib/converters/internal/OpenApiV3_2Upgrader.js +57 -63
  227. package/lib/converters/internal/OpenApiV3_2Upgrader.js.map +1 -1
  228. package/lib/converters/internal/OpenApiV3_2Upgrader.mjs +5 -240
  229. package/lib/converters/internal/OpenApiV3_2Upgrader.mjs.map +1 -1
  230. package/lib/converters/internal/OpenApiV3_2Upgrader2.mjs +211 -0
  231. package/lib/converters/internal/OpenApiV3_2Upgrader2.mjs.map +1 -0
  232. package/lib/converters/internal/SwaggerV2Downgrader.js +44 -56
  233. package/lib/converters/internal/SwaggerV2Downgrader.js.map +1 -1
  234. package/lib/converters/internal/SwaggerV2Downgrader.mjs +5 -352
  235. package/lib/converters/internal/SwaggerV2Downgrader.mjs.map +1 -1
  236. package/lib/converters/internal/SwaggerV2Downgrader2.mjs +297 -0
  237. package/lib/converters/internal/SwaggerV2Downgrader2.mjs.map +1 -0
  238. package/lib/converters/internal/SwaggerV2Upgrader.js +52 -63
  239. package/lib/converters/internal/SwaggerV2Upgrader.js.map +1 -1
  240. package/lib/converters/internal/SwaggerV2Upgrader.mjs +5 -421
  241. package/lib/converters/internal/SwaggerV2Upgrader.mjs.map +1 -1
  242. package/lib/converters/internal/SwaggerV2Upgrader2.mjs +378 -0
  243. package/lib/converters/internal/SwaggerV2Upgrader2.mjs.map +1 -0
  244. package/lib/http/HttpError.js.map +1 -1
  245. package/lib/http/HttpError.mjs +6 -74
  246. package/lib/http/HttpError.mjs.map +1 -1
  247. package/lib/http/HttpError2.mjs +81 -0
  248. package/lib/http/HttpError2.mjs.map +1 -0
  249. package/lib/http/HttpLlm.js +5 -4
  250. package/lib/http/HttpLlm.js.map +1 -1
  251. package/lib/http/HttpLlm.mjs +5 -96
  252. package/lib/http/HttpLlm.mjs.map +1 -1
  253. package/lib/http/HttpLlm2.mjs +115 -0
  254. package/lib/http/HttpLlm2.mjs.map +1 -0
  255. package/lib/http/HttpMigration.js.map +1 -1
  256. package/lib/http/HttpMigration.mjs +5 -49
  257. package/lib/http/HttpMigration.mjs.map +1 -1
  258. package/lib/http/HttpMigration2.mjs +66 -0
  259. package/lib/http/HttpMigration2.mjs.map +1 -0
  260. package/lib/http/index.mjs +7 -3
  261. package/lib/http/index.mjs.map +1 -1
  262. package/lib/http/index2.mjs +36 -0
  263. package/lib/http/index2.mjs.map +1 -0
  264. package/lib/http/internal/HttpLlmApplicationComposer.js +12 -13
  265. package/lib/http/internal/HttpLlmApplicationComposer.js.map +1 -1
  266. package/lib/http/internal/HttpLlmApplicationComposer.mjs +5 -301
  267. package/lib/http/internal/HttpLlmApplicationComposer.mjs.map +1 -1
  268. package/lib/http/internal/HttpLlmApplicationComposer2.mjs +309 -0
  269. package/lib/http/internal/HttpLlmApplicationComposer2.mjs.map +1 -0
  270. package/lib/http/internal/HttpLlmFunctionFetcher.js.map +1 -1
  271. package/lib/http/internal/HttpLlmFunctionFetcher.mjs +5 -21
  272. package/lib/http/internal/HttpLlmFunctionFetcher.mjs.map +1 -1
  273. package/lib/http/internal/HttpLlmFunctionFetcher2.mjs +36 -0
  274. package/lib/http/internal/HttpLlmFunctionFetcher2.mjs.map +1 -0
  275. package/lib/http/internal/HttpMigrateApplicationComposer.js.map +1 -1
  276. package/lib/http/internal/HttpMigrateApplicationComposer.mjs +5 -44
  277. package/lib/http/internal/HttpMigrateApplicationComposer.mjs.map +1 -1
  278. package/lib/http/internal/HttpMigrateApplicationComposer2.mjs +59 -0
  279. package/lib/http/internal/HttpMigrateApplicationComposer2.mjs.map +1 -0
  280. package/lib/http/internal/HttpMigrateRouteAccessor.js.map +1 -1
  281. package/lib/http/internal/HttpMigrateRouteAccessor.mjs +5 -103
  282. package/lib/http/internal/HttpMigrateRouteAccessor.mjs.map +1 -1
  283. package/lib/http/internal/HttpMigrateRouteAccessor2.mjs +121 -0
  284. package/lib/http/internal/HttpMigrateRouteAccessor2.mjs.map +1 -0
  285. package/lib/http/internal/HttpMigrateRouteComposer.js +35 -54
  286. package/lib/http/internal/HttpMigrateRouteComposer.js.map +1 -1
  287. package/lib/http/internal/HttpMigrateRouteComposer.mjs +5 -381
  288. package/lib/http/internal/HttpMigrateRouteComposer.mjs.map +1 -1
  289. package/lib/http/internal/HttpMigrateRouteComposer2.mjs +384 -0
  290. package/lib/http/internal/HttpMigrateRouteComposer2.mjs.map +1 -0
  291. package/lib/http/internal/HttpMigrateRouteFetcher.js +7 -6
  292. package/lib/http/internal/HttpMigrateRouteFetcher.js.map +1 -1
  293. package/lib/http/internal/HttpMigrateRouteFetcher.mjs +5 -171
  294. package/lib/http/internal/HttpMigrateRouteFetcher.mjs.map +1 -1
  295. package/lib/http/internal/HttpMigrateRouteFetcher2.mjs +192 -0
  296. package/lib/http/internal/HttpMigrateRouteFetcher2.mjs.map +1 -0
  297. package/lib/index.mjs +7 -19
  298. package/lib/index.mjs.map +1 -1
  299. package/lib/index2.mjs +38 -0
  300. package/lib/index2.mjs.map +1 -0
  301. package/lib/utils/ArrayUtil.js.map +1 -1
  302. package/lib/utils/ArrayUtil.mjs +6 -26
  303. package/lib/utils/ArrayUtil.mjs.map +1 -1
  304. package/lib/utils/ArrayUtil2.mjs +40 -0
  305. package/lib/utils/ArrayUtil2.mjs.map +1 -0
  306. package/lib/utils/LlmJson.js.map +1 -1
  307. package/lib/utils/LlmJson.mjs +5 -160
  308. package/lib/utils/LlmJson.mjs.map +1 -1
  309. package/lib/utils/LlmJson2.mjs +172 -0
  310. package/lib/utils/LlmJson2.mjs.map +1 -0
  311. package/lib/utils/MapUtil.js.map +1 -1
  312. package/lib/utils/MapUtil.mjs +6 -13
  313. package/lib/utils/MapUtil.mjs.map +1 -1
  314. package/lib/utils/MapUtil2.mjs +27 -0
  315. package/lib/utils/MapUtil2.mjs.map +1 -0
  316. package/lib/utils/NamingConvention.js.map +1 -1
  317. package/lib/utils/NamingConvention.mjs +6 -196
  318. package/lib/utils/NamingConvention.mjs.map +1 -1
  319. package/lib/utils/NamingConvention2.mjs +210 -0
  320. package/lib/utils/NamingConvention2.mjs.map +1 -0
  321. package/lib/utils/Singleton.d.ts +6 -1
  322. package/lib/utils/Singleton.js +0 -1
  323. package/lib/utils/Singleton.js.map +1 -1
  324. package/lib/utils/Singleton.mjs +6 -16
  325. package/lib/utils/Singleton.mjs.map +1 -1
  326. package/lib/utils/Singleton2.mjs +28 -0
  327. package/lib/utils/Singleton2.mjs.map +1 -0
  328. package/lib/utils/StringUtil.js +6 -9
  329. package/lib/utils/StringUtil.js.map +1 -1
  330. package/lib/utils/StringUtil.mjs +6 -11
  331. package/lib/utils/StringUtil.mjs.map +1 -1
  332. package/lib/utils/StringUtil2.mjs +25 -0
  333. package/lib/utils/StringUtil2.mjs.map +1 -0
  334. package/lib/utils/dedent.js.map +1 -1
  335. package/lib/utils/dedent.mjs +6 -48
  336. package/lib/utils/dedent.mjs.map +1 -1
  337. package/lib/utils/dedent2.mjs +62 -0
  338. package/lib/utils/dedent2.mjs.map +1 -0
  339. package/lib/utils/index.mjs +7 -7
  340. package/lib/utils/index.mjs.map +1 -1
  341. package/lib/utils/index2.mjs +44 -0
  342. package/lib/utils/index2.mjs.map +1 -0
  343. package/lib/utils/internal/EndpointUtil.js.map +1 -1
  344. package/lib/utils/internal/EndpointUtil.mjs +5 -34
  345. package/lib/utils/internal/EndpointUtil.mjs.map +1 -1
  346. package/lib/utils/internal/EndpointUtil2.mjs +49 -0
  347. package/lib/utils/internal/EndpointUtil2.mjs.map +1 -0
  348. package/lib/utils/internal/JsonDescriptor.js +18 -25
  349. package/lib/utils/internal/JsonDescriptor.js.map +1 -1
  350. package/lib/utils/internal/JsonDescriptor.mjs +5 -45
  351. package/lib/utils/internal/JsonDescriptor.mjs.map +1 -1
  352. package/lib/utils/internal/JsonDescriptor2.mjs +64 -0
  353. package/lib/utils/internal/JsonDescriptor2.mjs.map +1 -0
  354. package/lib/utils/internal/OpenApiTypeCheckerBase.js +15 -9
  355. package/lib/utils/internal/OpenApiTypeCheckerBase.js.map +1 -1
  356. package/lib/utils/internal/OpenApiTypeCheckerBase.mjs +5 -581
  357. package/lib/utils/internal/OpenApiTypeCheckerBase.mjs.map +1 -1
  358. package/lib/utils/internal/OpenApiTypeCheckerBase2.mjs +539 -0
  359. package/lib/utils/internal/OpenApiTypeCheckerBase2.mjs.map +1 -0
  360. package/lib/utils/internal/coerceLlmArguments.js +18 -4
  361. package/lib/utils/internal/coerceLlmArguments.js.map +1 -1
  362. package/lib/utils/internal/coerceLlmArguments.mjs +5 -245
  363. package/lib/utils/internal/coerceLlmArguments.mjs.map +1 -1
  364. package/lib/utils/internal/coerceLlmArguments2.mjs +276 -0
  365. package/lib/utils/internal/coerceLlmArguments2.mjs.map +1 -0
  366. package/lib/utils/internal/parseLenientJson.js.map +1 -1
  367. package/lib/utils/internal/parseLenientJson.mjs +6 -803
  368. package/lib/utils/internal/parseLenientJson.mjs.map +1 -1
  369. package/lib/utils/internal/parseLenientJson2.mjs +815 -0
  370. package/lib/utils/internal/parseLenientJson2.mjs.map +1 -0
  371. package/lib/utils/internal/stringifyValidationFailure.js.map +1 -1
  372. package/lib/utils/internal/stringifyValidationFailure.mjs +5 -315
  373. package/lib/utils/internal/stringifyValidationFailure.mjs.map +1 -1
  374. package/lib/utils/internal/stringifyValidationFailure2.mjs +333 -0
  375. package/lib/utils/internal/stringifyValidationFailure2.mjs.map +1 -0
  376. package/lib/validators/LlmTypeChecker.js +4 -3
  377. package/lib/validators/LlmTypeChecker.js.map +1 -1
  378. package/lib/validators/LlmTypeChecker.mjs +5 -297
  379. package/lib/validators/LlmTypeChecker.mjs.map +1 -1
  380. package/lib/validators/LlmTypeChecker2.mjs +323 -0
  381. package/lib/validators/LlmTypeChecker2.mjs.map +1 -0
  382. package/lib/validators/OpenApiTypeChecker.js.map +1 -1
  383. package/lib/validators/OpenApiTypeChecker.mjs +5 -215
  384. package/lib/validators/OpenApiTypeChecker.mjs.map +1 -1
  385. package/lib/validators/OpenApiTypeChecker2.mjs +219 -0
  386. package/lib/validators/OpenApiTypeChecker2.mjs.map +1 -0
  387. package/lib/validators/OpenApiV3TypeChecker.js.map +1 -1
  388. package/lib/validators/OpenApiV3TypeChecker.mjs +6 -27
  389. package/lib/validators/OpenApiV3TypeChecker.mjs.map +1 -1
  390. package/lib/validators/OpenApiV3TypeChecker2.mjs +41 -0
  391. package/lib/validators/OpenApiV3TypeChecker2.mjs.map +1 -0
  392. package/lib/validators/OpenApiV3_1TypeChecker.js.map +1 -1
  393. package/lib/validators/OpenApiV3_1TypeChecker.mjs +6 -31
  394. package/lib/validators/OpenApiV3_1TypeChecker.mjs.map +1 -1
  395. package/lib/validators/OpenApiV3_1TypeChecker2.mjs +45 -0
  396. package/lib/validators/OpenApiV3_1TypeChecker2.mjs.map +1 -0
  397. package/lib/validators/OpenApiValidator.js.map +1 -1
  398. package/lib/validators/OpenApiValidator.mjs +5 -72
  399. package/lib/validators/OpenApiValidator.mjs.map +1 -1
  400. package/lib/validators/OpenApiValidator2.mjs +83 -0
  401. package/lib/validators/OpenApiValidator2.mjs.map +1 -0
  402. package/lib/validators/SwaggerV2TypeChecker.js.map +1 -1
  403. package/lib/validators/SwaggerV2TypeChecker.mjs +6 -28
  404. package/lib/validators/SwaggerV2TypeChecker.mjs.map +1 -1
  405. package/lib/validators/SwaggerV2TypeChecker2.mjs +42 -0
  406. package/lib/validators/SwaggerV2TypeChecker2.mjs.map +1 -0
  407. package/lib/validators/functional/_isBigintString.js.map +1 -1
  408. package/lib/validators/functional/_isBigintString.mjs +6 -10
  409. package/lib/validators/functional/_isBigintString.mjs.map +1 -1
  410. package/lib/validators/functional/_isBigintString2.mjs +25 -0
  411. package/lib/validators/functional/_isBigintString2.mjs.map +1 -0
  412. package/lib/validators/functional/_isFormatByte.js.map +1 -1
  413. package/lib/validators/functional/_isFormatByte.mjs +6 -6
  414. package/lib/validators/functional/_isFormatByte.mjs.map +1 -1
  415. package/lib/validators/functional/_isFormatByte2.mjs +21 -0
  416. package/lib/validators/functional/_isFormatByte2.mjs.map +1 -0
  417. package/lib/validators/functional/_isFormatDate.js.map +1 -1
  418. package/lib/validators/functional/_isFormatDate.mjs +6 -3
  419. package/lib/validators/functional/_isFormatDate.mjs.map +1 -1
  420. package/lib/validators/functional/_isFormatDate2.mjs +18 -0
  421. package/lib/validators/functional/_isFormatDate2.mjs.map +1 -0
  422. package/lib/validators/functional/_isFormatDateTime.js.map +1 -1
  423. package/lib/validators/functional/_isFormatDateTime.mjs +6 -3
  424. package/lib/validators/functional/_isFormatDateTime.mjs.map +1 -1
  425. package/lib/validators/functional/_isFormatDateTime2.mjs +18 -0
  426. package/lib/validators/functional/_isFormatDateTime2.mjs.map +1 -0
  427. package/lib/validators/functional/_isFormatDuration.js.map +1 -1
  428. package/lib/validators/functional/_isFormatDuration.mjs +6 -3
  429. package/lib/validators/functional/_isFormatDuration.mjs.map +1 -1
  430. package/lib/validators/functional/_isFormatDuration2.mjs +18 -0
  431. package/lib/validators/functional/_isFormatDuration2.mjs.map +1 -0
  432. package/lib/validators/functional/_isFormatEmail.js.map +1 -1
  433. package/lib/validators/functional/_isFormatEmail.mjs +6 -3
  434. package/lib/validators/functional/_isFormatEmail.mjs.map +1 -1
  435. package/lib/validators/functional/_isFormatEmail2.mjs +18 -0
  436. package/lib/validators/functional/_isFormatEmail2.mjs.map +1 -0
  437. package/lib/validators/functional/_isFormatHostname.js.map +1 -1
  438. package/lib/validators/functional/_isFormatHostname.mjs +6 -3
  439. package/lib/validators/functional/_isFormatHostname.mjs.map +1 -1
  440. package/lib/validators/functional/_isFormatHostname2.mjs +18 -0
  441. package/lib/validators/functional/_isFormatHostname2.mjs.map +1 -0
  442. package/lib/validators/functional/_isFormatIdnEmail.js.map +1 -1
  443. package/lib/validators/functional/_isFormatIdnEmail.mjs +6 -3
  444. package/lib/validators/functional/_isFormatIdnEmail.mjs.map +1 -1
  445. package/lib/validators/functional/_isFormatIdnEmail2.mjs +18 -0
  446. package/lib/validators/functional/_isFormatIdnEmail2.mjs.map +1 -0
  447. package/lib/validators/functional/_isFormatIdnHostname.js.map +1 -1
  448. package/lib/validators/functional/_isFormatIdnHostname.mjs +6 -3
  449. package/lib/validators/functional/_isFormatIdnHostname.mjs.map +1 -1
  450. package/lib/validators/functional/_isFormatIdnHostname2.mjs +18 -0
  451. package/lib/validators/functional/_isFormatIdnHostname2.mjs.map +1 -0
  452. package/lib/validators/functional/_isFormatIpv4.js.map +1 -1
  453. package/lib/validators/functional/_isFormatIpv4.mjs +6 -3
  454. package/lib/validators/functional/_isFormatIpv4.mjs.map +1 -1
  455. package/lib/validators/functional/_isFormatIpv42.mjs +18 -0
  456. package/lib/validators/functional/_isFormatIpv42.mjs.map +1 -0
  457. package/lib/validators/functional/_isFormatIpv6.js.map +1 -1
  458. package/lib/validators/functional/_isFormatIpv6.mjs +6 -3
  459. package/lib/validators/functional/_isFormatIpv6.mjs.map +1 -1
  460. package/lib/validators/functional/_isFormatIpv62.mjs +18 -0
  461. package/lib/validators/functional/_isFormatIpv62.mjs.map +1 -0
  462. package/lib/validators/functional/_isFormatIri.js.map +1 -1
  463. package/lib/validators/functional/_isFormatIri.mjs +6 -3
  464. package/lib/validators/functional/_isFormatIri.mjs.map +1 -1
  465. package/lib/validators/functional/_isFormatIri2.mjs +18 -0
  466. package/lib/validators/functional/_isFormatIri2.mjs.map +1 -0
  467. package/lib/validators/functional/_isFormatIriReference.js.map +1 -1
  468. package/lib/validators/functional/_isFormatIriReference.mjs +6 -3
  469. package/lib/validators/functional/_isFormatIriReference.mjs.map +1 -1
  470. package/lib/validators/functional/_isFormatIriReference2.mjs +18 -0
  471. package/lib/validators/functional/_isFormatIriReference2.mjs.map +1 -0
  472. package/lib/validators/functional/_isFormatJsonPointer.js.map +1 -1
  473. package/lib/validators/functional/_isFormatJsonPointer.mjs +6 -3
  474. package/lib/validators/functional/_isFormatJsonPointer.mjs.map +1 -1
  475. package/lib/validators/functional/_isFormatJsonPointer2.mjs +18 -0
  476. package/lib/validators/functional/_isFormatJsonPointer2.mjs.map +1 -0
  477. package/lib/validators/functional/_isFormatPassword.js.map +1 -1
  478. package/lib/validators/functional/_isFormatPassword.mjs +6 -2
  479. package/lib/validators/functional/_isFormatPassword.mjs.map +1 -1
  480. package/lib/validators/functional/_isFormatPassword2.mjs +17 -0
  481. package/lib/validators/functional/_isFormatPassword2.mjs.map +1 -0
  482. package/lib/validators/functional/_isFormatRegex.js.map +1 -1
  483. package/lib/validators/functional/_isFormatRegex.mjs +6 -10
  484. package/lib/validators/functional/_isFormatRegex.mjs.map +1 -1
  485. package/lib/validators/functional/_isFormatRegex2.mjs +25 -0
  486. package/lib/validators/functional/_isFormatRegex2.mjs.map +1 -0
  487. package/lib/validators/functional/_isFormatRelativeJsonPointer.js.map +1 -1
  488. package/lib/validators/functional/_isFormatRelativeJsonPointer.mjs +6 -3
  489. package/lib/validators/functional/_isFormatRelativeJsonPointer.mjs.map +1 -1
  490. package/lib/validators/functional/_isFormatRelativeJsonPointer2.mjs +18 -0
  491. package/lib/validators/functional/_isFormatRelativeJsonPointer2.mjs.map +1 -0
  492. package/lib/validators/functional/_isFormatTime.js.map +1 -1
  493. package/lib/validators/functional/_isFormatTime.mjs +6 -3
  494. package/lib/validators/functional/_isFormatTime.mjs.map +1 -1
  495. package/lib/validators/functional/_isFormatTime2.mjs +18 -0
  496. package/lib/validators/functional/_isFormatTime2.mjs.map +1 -0
  497. package/lib/validators/functional/_isFormatUri.js.map +1 -1
  498. package/lib/validators/functional/_isFormatUri.mjs +6 -4
  499. package/lib/validators/functional/_isFormatUri.mjs.map +1 -1
  500. package/lib/validators/functional/_isFormatUri2.mjs +19 -0
  501. package/lib/validators/functional/_isFormatUri2.mjs.map +1 -0
  502. package/lib/validators/functional/_isFormatUriReference.js.map +1 -1
  503. package/lib/validators/functional/_isFormatUriReference.mjs +6 -3
  504. package/lib/validators/functional/_isFormatUriReference.mjs.map +1 -1
  505. package/lib/validators/functional/_isFormatUriReference2.mjs +18 -0
  506. package/lib/validators/functional/_isFormatUriReference2.mjs.map +1 -0
  507. package/lib/validators/functional/_isFormatUriTemplate.js.map +1 -1
  508. package/lib/validators/functional/_isFormatUriTemplate.mjs +6 -3
  509. package/lib/validators/functional/_isFormatUriTemplate.mjs.map +1 -1
  510. package/lib/validators/functional/_isFormatUriTemplate2.mjs +18 -0
  511. package/lib/validators/functional/_isFormatUriTemplate2.mjs.map +1 -0
  512. package/lib/validators/functional/_isFormatUrl.js.map +1 -1
  513. package/lib/validators/functional/_isFormatUrl.mjs +6 -3
  514. package/lib/validators/functional/_isFormatUrl.mjs.map +1 -1
  515. package/lib/validators/functional/_isFormatUrl2.mjs +18 -0
  516. package/lib/validators/functional/_isFormatUrl2.mjs.map +1 -0
  517. package/lib/validators/functional/_isFormatUuid.js.map +1 -1
  518. package/lib/validators/functional/_isFormatUuid.mjs +6 -3
  519. package/lib/validators/functional/_isFormatUuid.mjs.map +1 -1
  520. package/lib/validators/functional/_isFormatUuid2.mjs +18 -0
  521. package/lib/validators/functional/_isFormatUuid2.mjs.map +1 -0
  522. package/lib/validators/functional/_isUniqueItems.js.map +1 -1
  523. package/lib/validators/functional/_isUniqueItems.mjs +6 -136
  524. package/lib/validators/functional/_isUniqueItems.mjs.map +1 -1
  525. package/lib/validators/functional/_isUniqueItems2.mjs +151 -0
  526. package/lib/validators/functional/_isUniqueItems2.mjs.map +1 -0
  527. package/lib/validators/index.d.ts +1 -0
  528. package/lib/validators/index.js +0 -1
  529. package/lib/validators/index.js.map +1 -1
  530. package/lib/validators/index.mjs +7 -6
  531. package/lib/validators/index.mjs.map +1 -1
  532. package/lib/validators/index2.mjs +45 -0
  533. package/lib/validators/index2.mjs.map +1 -0
  534. package/lib/validators/internal/IOpenApiValidatorContext.mjs +6 -0
  535. package/lib/validators/internal/IOpenApiValidatorContext.mjs.map +1 -1
  536. package/lib/validators/internal/IOpenApiValidatorContext2.mjs +14 -0
  537. package/lib/validators/internal/IOpenApiValidatorContext2.mjs.map +1 -0
  538. package/lib/validators/internal/OpenApiArrayValidator.js.map +1 -1
  539. package/lib/validators/internal/OpenApiArrayValidator.mjs +5 -44
  540. package/lib/validators/internal/OpenApiArrayValidator.mjs.map +1 -1
  541. package/lib/validators/internal/OpenApiArrayValidator2.mjs +45 -0
  542. package/lib/validators/internal/OpenApiArrayValidator2.mjs.map +1 -0
  543. package/lib/validators/internal/OpenApiBooleanValidator.js.map +1 -1
  544. package/lib/validators/internal/OpenApiBooleanValidator.mjs +6 -7
  545. package/lib/validators/internal/OpenApiBooleanValidator.mjs.map +1 -1
  546. package/lib/validators/internal/OpenApiBooleanValidator2.mjs +21 -0
  547. package/lib/validators/internal/OpenApiBooleanValidator2.mjs.map +1 -0
  548. package/lib/validators/internal/OpenApiConstantValidator.js.map +1 -1
  549. package/lib/validators/internal/OpenApiConstantValidator.mjs +6 -7
  550. package/lib/validators/internal/OpenApiConstantValidator.mjs.map +1 -1
  551. package/lib/validators/internal/OpenApiConstantValidator2.mjs +21 -0
  552. package/lib/validators/internal/OpenApiConstantValidator2.mjs.map +1 -0
  553. package/lib/validators/internal/OpenApiIntegerValidator.js.map +1 -1
  554. package/lib/validators/internal/OpenApiIntegerValidator.mjs +6 -45
  555. package/lib/validators/internal/OpenApiIntegerValidator.mjs.map +1 -1
  556. package/lib/validators/internal/OpenApiIntegerValidator2.mjs +44 -0
  557. package/lib/validators/internal/OpenApiIntegerValidator2.mjs.map +1 -0
  558. package/lib/validators/internal/OpenApiNumberValidator.js.map +1 -1
  559. package/lib/validators/internal/OpenApiNumberValidator.mjs +6 -45
  560. package/lib/validators/internal/OpenApiNumberValidator.mjs.map +1 -1
  561. package/lib/validators/internal/OpenApiNumberValidator2.mjs +44 -0
  562. package/lib/validators/internal/OpenApiNumberValidator2.mjs.map +1 -0
  563. package/lib/validators/internal/OpenApiObjectValidator.js +6 -12
  564. package/lib/validators/internal/OpenApiObjectValidator.js.map +1 -1
  565. package/lib/validators/internal/OpenApiObjectValidator.mjs +5 -65
  566. package/lib/validators/internal/OpenApiObjectValidator.mjs.map +1 -1
  567. package/lib/validators/internal/OpenApiObjectValidator2.mjs +65 -0
  568. package/lib/validators/internal/OpenApiObjectValidator2.mjs.map +1 -0
  569. package/lib/validators/internal/OpenApiOneOfValidator.js +20 -20
  570. package/lib/validators/internal/OpenApiOneOfValidator.js.map +1 -1
  571. package/lib/validators/internal/OpenApiOneOfValidator.mjs +5 -207
  572. package/lib/validators/internal/OpenApiOneOfValidator.mjs.map +1 -1
  573. package/lib/validators/internal/OpenApiOneOfValidator2.mjs +196 -0
  574. package/lib/validators/internal/OpenApiOneOfValidator2.mjs.map +1 -0
  575. package/lib/validators/internal/OpenApiSchemaNamingRule.js.map +1 -1
  576. package/lib/validators/internal/OpenApiSchemaNamingRule.mjs +5 -118
  577. package/lib/validators/internal/OpenApiSchemaNamingRule.mjs.map +1 -1
  578. package/lib/validators/internal/OpenApiSchemaNamingRule2.mjs +134 -0
  579. package/lib/validators/internal/OpenApiSchemaNamingRule2.mjs.map +1 -0
  580. package/lib/validators/internal/OpenApiStationValidator.js +2 -1
  581. package/lib/validators/internal/OpenApiStationValidator.js.map +1 -1
  582. package/lib/validators/internal/OpenApiStationValidator.mjs +5 -104
  583. package/lib/validators/internal/OpenApiStationValidator.mjs.map +1 -1
  584. package/lib/validators/internal/OpenApiStationValidator2.mjs +86 -0
  585. package/lib/validators/internal/OpenApiStationValidator2.mjs.map +1 -0
  586. package/lib/validators/internal/OpenApiStringValidator.js.map +1 -1
  587. package/lib/validators/internal/OpenApiStringValidator.mjs +5 -82
  588. package/lib/validators/internal/OpenApiStringValidator.mjs.map +1 -1
  589. package/lib/validators/internal/OpenApiStringValidator2.mjs +105 -0
  590. package/lib/validators/internal/OpenApiStringValidator2.mjs.map +1 -0
  591. package/lib/validators/internal/OpenApiTupleValidator.js.map +1 -1
  592. package/lib/validators/internal/OpenApiTupleValidator.mjs +5 -43
  593. package/lib/validators/internal/OpenApiTupleValidator.mjs.map +1 -1
  594. package/lib/validators/internal/OpenApiTupleValidator2.mjs +43 -0
  595. package/lib/validators/internal/OpenApiTupleValidator2.mjs.map +1 -0
  596. package/package.json +8 -9
  597. package/src/converters/LlmSchemaConverter.ts +152 -33
  598. package/src/converters/internal/OpenApiV3_1Upgrader.ts +7 -4
  599. package/src/utils/Singleton.ts +0 -1
  600. package/src/utils/internal/OpenApiTypeCheckerBase.ts +2 -0
  601. package/src/utils/internal/coerceLlmArguments.ts +21 -3
  602. package/src/validators/index.ts +0 -1
@@ -1,300 +1,8 @@
1
- import { MapUtil } from '../utils/MapUtil.mjs';
2
- import { OpenApiTypeCheckerBase } from '../utils/internal/OpenApiTypeCheckerBase.mjs';
1
+ import { getDefaultExportFromCjs } from '../_virtual/_commonjsHelpers.mjs';
2
+ import { __require as requireLlmTypeChecker } from './LlmTypeChecker2.mjs';
3
3
 
4
- /**
5
- * Type checker for LLM function calling schema.
6
- *
7
- * `LlmTypeChecker` is a type checker of {@link ILlmSchema}, the type schema for
8
- * LLM (Large Language Model) function calling.
9
- *
10
- * This checker provides type guard functions for validating schema types, and
11
- * operators for traversing and comparing schemas.
12
- *
13
- * @author Jeongho Nam - https://github.com/samchon
14
- */
15
- var LlmTypeChecker;
16
- (function (LlmTypeChecker) {
17
- /* -----------------------------------------------------------
18
- TYPE CHECKERS
19
- ----------------------------------------------------------- */
20
- /**
21
- * Test whether the schema is a null type.
22
- *
23
- * @param schema Target schema
24
- * @returns Whether null type or not
25
- */
26
- LlmTypeChecker.isNull = (schema) => schema.type === "null";
27
- /**
28
- * Test whether the schema is an unknown type.
29
- *
30
- * @param schema Target schema
31
- * @returns Whether unknown type or not
32
- */
33
- LlmTypeChecker.isUnknown = (schema) => schema.type === undefined &&
34
- !LlmTypeChecker.isAnyOf(schema) &&
35
- !LlmTypeChecker.isReference(schema);
36
- /**
37
- * Test whether the schema is a boolean type.
38
- *
39
- * @param schema Target schema
40
- * @returns Whether boolean type or not
41
- */
42
- LlmTypeChecker.isBoolean = (schema) => schema.type === "boolean";
43
- /**
44
- * Test whether the schema is an integer type.
45
- *
46
- * @param schema Target schema
47
- * @returns Whether integer type or not
48
- */
49
- LlmTypeChecker.isInteger = (schema) => schema.type === "integer";
50
- /**
51
- * Test whether the schema is a number type.
52
- *
53
- * @param schema Target schema
54
- * @returns Whether number type or not
55
- */
56
- LlmTypeChecker.isNumber = (schema) => schema.type === "number";
57
- /**
58
- * Test whether the schema is a string type.
59
- *
60
- * @param schema Target schema
61
- * @returns Whether string type or not
62
- */
63
- LlmTypeChecker.isString = (schema) => schema.type === "string";
64
- /**
65
- * Test whether the schema is an array type.
66
- *
67
- * @param schema Target schema
68
- * @returns Whether array type or not
69
- */
70
- LlmTypeChecker.isArray = (schema) => schema.type === "array" &&
71
- schema.items !== undefined;
72
- /**
73
- * Test whether the schema is an object type.
74
- *
75
- * @param schema Target schema
76
- * @returns Whether object type or not
77
- */
78
- LlmTypeChecker.isObject = (schema) => schema.type === "object";
79
- /**
80
- * Test whether the schema is a reference type.
81
- *
82
- * @param schema Target schema
83
- * @returns Whether reference type or not
84
- */
85
- LlmTypeChecker.isReference = (schema) => schema.$ref !== undefined;
86
- /**
87
- * Test whether the schema is a union type.
88
- *
89
- * @param schema Target schema
90
- * @returns Whether union type or not
91
- */
92
- LlmTypeChecker.isAnyOf = (schema) => schema.anyOf !== undefined;
93
- /* -----------------------------------------------------------
94
- OPERATORS
95
- ----------------------------------------------------------- */
96
- /**
97
- * Visit every nested schemas.
98
- *
99
- * Visit every nested schemas of the target, and apply the `props.closure`
100
- * function.
101
- *
102
- * Here is the list of occurring nested visitings:
103
- *
104
- * - {@link ILlmSchema.IAnyOf.anyOf}
105
- * - {@link ILlmSchema.IReference}
106
- * - {@link ILlmSchema.IObject.properties}
107
- * - {@link ILlmSchema.IArray.items}
108
- *
109
- * @param props Properties for visiting
110
- */
111
- LlmTypeChecker.visit = (props) => {
112
- const already = new Set();
113
- const refAccessor = props.refAccessor ?? "$input.$defs";
114
- const next = (schema, accessor) => {
115
- props.closure(schema, accessor);
116
- if (LlmTypeChecker.isReference(schema)) {
117
- const key = schema.$ref.split("#/$defs/").pop();
118
- if (already.has(key) === true)
119
- return;
120
- already.add(key);
121
- const found = props.$defs?.[key];
122
- if (found !== undefined)
123
- next(found, `${refAccessor}[${key}]`);
124
- }
125
- else if (LlmTypeChecker.isAnyOf(schema))
126
- schema.anyOf.forEach((s, i) => next(s, `${accessor}.anyOf[${i}]`));
127
- else if (LlmTypeChecker.isObject(schema)) {
128
- for (const [key, value] of Object.entries(schema.properties))
129
- next(value, `${accessor}.properties[${JSON.stringify(key)}]`);
130
- if (typeof schema.additionalProperties === "object" &&
131
- schema.additionalProperties !== null)
132
- next(schema.additionalProperties, `${accessor}.additionalProperties`);
133
- }
134
- else if (LlmTypeChecker.isArray(schema))
135
- next(schema.items, `${accessor}.items`);
136
- };
137
- next(props.schema, props.accessor ?? "$input.schemas");
138
- };
139
- /**
140
- * Test whether the `x` schema covers the `y` schema.
141
- *
142
- * @param props Properties for testing
143
- * @returns Whether the `x` schema covers the `y` schema
144
- */
145
- LlmTypeChecker.covers = (props) => coverStation({
146
- $defs: props.$defs,
147
- x: props.x,
148
- y: props.y,
149
- visited: new Map(),
150
- });
151
- const coverStation = (p) => {
152
- const cache = p.visited.get(p.x)?.get(p.y);
153
- if (cache !== undefined)
154
- return cache;
155
- // FOR RECURSIVE CASE
156
- const nested = MapUtil.take(p.visited, p.x, () => new Map());
157
- nested.set(p.y, true);
158
- // COMPUTE IT
159
- const result = coverSchema(p);
160
- nested.set(p.y, result);
161
- return result;
162
- };
163
- const coverSchema = (p) => {
164
- // CHECK EQUALITY
165
- if (p.x === p.y)
166
- return true;
167
- else if (LlmTypeChecker.isReference(p.x) && LlmTypeChecker.isReference(p.y) && p.x.$ref === p.y.$ref)
168
- return true;
169
- // COMPARE WITH FLATTENING
170
- const alpha = flatSchema(p.$defs, p.x);
171
- const beta = flatSchema(p.$defs, p.y);
172
- if (alpha.some((x) => LlmTypeChecker.isUnknown(x)))
173
- return true;
174
- else if (beta.some((x) => LlmTypeChecker.isUnknown(x)))
175
- return false;
176
- return beta.every((b) => alpha.some((a) => coverEscapedSchema({
177
- $defs: p.$defs,
178
- visited: p.visited,
179
- x: a,
180
- y: b,
181
- })));
182
- };
183
- const coverEscapedSchema = (p) => {
184
- // CHECK EQUALITY
185
- if (p.x === p.y)
186
- return true;
187
- else if (LlmTypeChecker.isUnknown(p.x))
188
- return true;
189
- else if (LlmTypeChecker.isUnknown(p.y))
190
- return false;
191
- else if (LlmTypeChecker.isNull(p.x))
192
- return LlmTypeChecker.isNull(p.y);
193
- // ATOMIC CASE
194
- else if (LlmTypeChecker.isBoolean(p.x))
195
- return LlmTypeChecker.isBoolean(p.y) && coverBoolean(p.x, p.y);
196
- else if (LlmTypeChecker.isInteger(p.x))
197
- return LlmTypeChecker.isInteger(p.y) && coverInteger(p.x, p.y);
198
- else if (LlmTypeChecker.isNumber(p.x))
199
- return LlmTypeChecker.isNumber(p.y) && coverNumber(p.x, p.y);
200
- else if (LlmTypeChecker.isString(p.x))
201
- return LlmTypeChecker.isString(p.y) && coverString(p.x, p.y);
202
- // INSTANCE CASE
203
- else if (LlmTypeChecker.isArray(p.x))
204
- return (LlmTypeChecker.isArray(p.y) &&
205
- coverArray({
206
- $defs: p.$defs,
207
- visited: p.visited,
208
- x: p.x,
209
- y: p.y,
210
- }));
211
- else if (LlmTypeChecker.isObject(p.x))
212
- return (LlmTypeChecker.isObject(p.y) &&
213
- coverObject({
214
- $defs: p.$defs,
215
- visited: p.visited,
216
- x: p.x,
217
- y: p.y,
218
- }));
219
- else if (LlmTypeChecker.isReference(p.x))
220
- return LlmTypeChecker.isReference(p.y) && p.x.$ref === p.y.$ref;
221
- return false;
222
- };
223
- const coverArray = (p) => {
224
- if (!(p.x.minItems === undefined ||
225
- (p.y.minItems !== undefined && p.x.minItems <= p.y.minItems)))
226
- return false;
227
- else if (!(p.x.maxItems === undefined ||
228
- (p.y.maxItems !== undefined && p.x.maxItems >= p.y.maxItems)))
229
- return false;
230
- return coverStation({
231
- $defs: p.$defs,
232
- visited: p.visited,
233
- x: p.x.items,
234
- y: p.y.items,
235
- });
236
- };
237
- const coverObject = (p) => {
238
- if (!p.x.additionalProperties && !!p.y.additionalProperties)
239
- return false;
240
- else if (!!p.x.additionalProperties &&
241
- !!p.y.additionalProperties &&
242
- ((typeof p.x.additionalProperties === "object" &&
243
- p.y.additionalProperties === true) ||
244
- (typeof p.x.additionalProperties === "object" &&
245
- typeof p.y.additionalProperties === "object" &&
246
- !coverStation({
247
- $defs: p.$defs,
248
- visited: p.visited,
249
- x: p.x.additionalProperties,
250
- y: p.y.additionalProperties,
251
- }))))
252
- return false;
253
- return Object.entries(p.y.properties ?? {}).every(([key, b]) => {
254
- const a = p.x.properties?.[key];
255
- if (a === undefined)
256
- return false;
257
- else if ((p.x.required?.includes(key) ?? false) === true &&
258
- (p.y.required?.includes(key) ?? false) === false)
259
- return false;
260
- return coverStation({
261
- $defs: p.$defs,
262
- visited: p.visited,
263
- x: a,
264
- y: b,
265
- });
266
- });
267
- };
268
- const coverBoolean = (x, y) => {
269
- if (!!x.enum?.length)
270
- return !!y.enum?.length && y.enum.every((v) => x.enum.includes(v));
271
- return true;
272
- };
273
- const coverInteger = (x, y) => {
274
- if (!!x.enum?.length)
275
- return !!y.enum?.length && y.enum.every((v) => x.enum.includes(v));
276
- return OpenApiTypeCheckerBase.coverInteger(x, y);
277
- };
278
- const coverNumber = (x, y) => {
279
- if (!!x.enum?.length)
280
- return !!y.enum?.length && y.enum.every((v) => x.enum.includes(v));
281
- return OpenApiTypeCheckerBase.coverNumber(x, y);
282
- };
283
- const coverString = (x, y) => {
284
- if (!!x.enum?.length)
285
- return !!y.enum?.length && y.enum.every((v) => x.enum.includes(v));
286
- return OpenApiTypeCheckerBase.coverString(x, y);
287
- };
288
- const flatSchema = ($defs, schema) => {
289
- schema = escapeReference($defs, schema);
290
- if (LlmTypeChecker.isAnyOf(schema))
291
- return schema.anyOf.map((v) => flatSchema($defs, v)).flat();
292
- return [schema];
293
- };
294
- const escapeReference = ($defs, schema) => LlmTypeChecker.isReference(schema)
295
- ? escapeReference($defs, $defs[schema.$ref.replace("#/$defs/", "")])
296
- : schema;
297
- })(LlmTypeChecker || (LlmTypeChecker = {}));
4
+ var LlmTypeCheckerExports = requireLlmTypeChecker();
5
+ var LlmTypeChecker = /*@__PURE__*/getDefaultExportFromCjs(LlmTypeCheckerExports);
298
6
 
299
- export { LlmTypeChecker };
7
+ export { LlmTypeChecker as default };
300
8
  //# sourceMappingURL=LlmTypeChecker.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"LlmTypeChecker.mjs","sources":["../../src/validators/LlmTypeChecker.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAKA;;;;;;;;;;AAUG;AACG,IAAW;AAAjB,CAAA,UAAiB,cAAc,EAAA;AAC7B;;AAE8D;AAC9D;;;;;AAKG;IACU,cAAA,CAAA,MAAM,GAAG,CAAC,MAAkB,KACtC,MAA2B,CAAC,IAAI,KAAK,MAAM;AAE9C;;;;;AAKG;IACU,cAAA,CAAA,SAA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gB,cAAc,KAAd,cAAc,GAAA,EAAA,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"LlmTypeChecker.mjs","sources":["LlmTypeChecker.js?commonjs-entry"],"sourcesContent":["import { getDefaultExportFromCjs } from \"\u0000commonjsHelpers.js\";\nimport { __require as requireLlmTypeChecker } from \"/home/samchon/github/samchon/typia@next/packages/utils/lib/validators/LlmTypeChecker.js\";\nvar LlmTypeCheckerExports = requireLlmTypeChecker();\nexport { LlmTypeCheckerExports as __moduleExports };\nexport default /*@__PURE__*/getDefaultExportFromCjs(LlmTypeCheckerExports);"],"names":[],"mappings":";;;AAEA,IAAI,qBAAqB,GAAG,qBAAqB,EAAE;AAEnD,qBAAe,aAAa,uBAAuB,CAAC,qBAAqB,CAAC;;;;"}
@@ -0,0 +1,323 @@
1
+ import { __exports as LlmTypeChecker } from '../_virtual/LlmTypeChecker.mjs';
2
+ import { __require as requireMapUtil } from '../utils/MapUtil2.mjs';
3
+ import { __require as requireOpenApiTypeCheckerBase } from '../utils/internal/OpenApiTypeCheckerBase2.mjs';
4
+
5
+ var hasRequiredLlmTypeChecker;
6
+
7
+ function requireLlmTypeChecker () {
8
+ if (hasRequiredLlmTypeChecker) return LlmTypeChecker;
9
+ hasRequiredLlmTypeChecker = 1;
10
+ Object.defineProperty(LlmTypeChecker, "__esModule", { value: true });
11
+ LlmTypeChecker.LlmTypeChecker = void 0;
12
+ const MapUtil_1 = requireMapUtil();
13
+ const OpenApiTypeCheckerBase_1 = requireOpenApiTypeCheckerBase();
14
+ /**
15
+ * Type checker for LLM function calling schema.
16
+ *
17
+ * `LlmTypeChecker` is a type checker of {@link ILlmSchema}, the type schema for
18
+ * LLM (Large Language Model) function calling.
19
+ *
20
+ * This checker provides type guard functions for validating schema types, and
21
+ * operators for traversing and comparing schemas.
22
+ *
23
+ * @author Jeongho Nam - https://github.com/samchon
24
+ */
25
+ var LlmTypeChecker$1;
26
+ (function (LlmTypeChecker) {
27
+ /* -----------------------------------------------------------
28
+ TYPE CHECKERS
29
+ ----------------------------------------------------------- */
30
+ /**
31
+ * Test whether the schema is a null type.
32
+ *
33
+ * @param schema Target schema
34
+ * @returns Whether null type or not
35
+ */
36
+ LlmTypeChecker.isNull = (schema) => schema.type === "null";
37
+ /**
38
+ * Test whether the schema is an unknown type.
39
+ *
40
+ * @param schema Target schema
41
+ * @returns Whether unknown type or not
42
+ */
43
+ LlmTypeChecker.isUnknown = (schema) => schema.type === undefined &&
44
+ !LlmTypeChecker.isAnyOf(schema) &&
45
+ !LlmTypeChecker.isReference(schema);
46
+ /**
47
+ * Test whether the schema is a boolean type.
48
+ *
49
+ * @param schema Target schema
50
+ * @returns Whether boolean type or not
51
+ */
52
+ LlmTypeChecker.isBoolean = (schema) => schema.type === "boolean";
53
+ /**
54
+ * Test whether the schema is an integer type.
55
+ *
56
+ * @param schema Target schema
57
+ * @returns Whether integer type or not
58
+ */
59
+ LlmTypeChecker.isInteger = (schema) => schema.type === "integer";
60
+ /**
61
+ * Test whether the schema is a number type.
62
+ *
63
+ * @param schema Target schema
64
+ * @returns Whether number type or not
65
+ */
66
+ LlmTypeChecker.isNumber = (schema) => schema.type === "number";
67
+ /**
68
+ * Test whether the schema is a string type.
69
+ *
70
+ * @param schema Target schema
71
+ * @returns Whether string type or not
72
+ */
73
+ LlmTypeChecker.isString = (schema) => schema.type === "string";
74
+ /**
75
+ * Test whether the schema is an array type.
76
+ *
77
+ * @param schema Target schema
78
+ * @returns Whether array type or not
79
+ */
80
+ LlmTypeChecker.isArray = (schema) => schema.type === "array" &&
81
+ schema.items !== undefined;
82
+ /**
83
+ * Test whether the schema is an object type.
84
+ *
85
+ * @param schema Target schema
86
+ * @returns Whether object type or not
87
+ */
88
+ LlmTypeChecker.isObject = (schema) => schema.type === "object";
89
+ /**
90
+ * Test whether the schema is a reference type.
91
+ *
92
+ * @param schema Target schema
93
+ * @returns Whether reference type or not
94
+ */
95
+ LlmTypeChecker.isReference = (schema) => schema.$ref !== undefined;
96
+ /**
97
+ * Test whether the schema is a union type.
98
+ *
99
+ * @param schema Target schema
100
+ * @returns Whether union type or not
101
+ */
102
+ LlmTypeChecker.isAnyOf = (schema) => schema.anyOf !== undefined;
103
+ /* -----------------------------------------------------------
104
+ OPERATORS
105
+ ----------------------------------------------------------- */
106
+ /**
107
+ * Visit every nested schemas.
108
+ *
109
+ * Visit every nested schemas of the target, and apply the `props.closure`
110
+ * function.
111
+ *
112
+ * Here is the list of occurring nested visitings:
113
+ *
114
+ * - {@link ILlmSchema.IAnyOf.anyOf}
115
+ * - {@link ILlmSchema.IReference}
116
+ * - {@link ILlmSchema.IObject.properties}
117
+ * - {@link ILlmSchema.IArray.items}
118
+ *
119
+ * @param props Properties for visiting
120
+ */
121
+ LlmTypeChecker.visit = (props) => {
122
+ var _a, _b;
123
+ const already = new Set();
124
+ const refAccessor = (_a = props.refAccessor) !== null && _a !== void 0 ? _a : "$input.$defs";
125
+ const next = (schema, accessor) => {
126
+ var _a;
127
+ props.closure(schema, accessor);
128
+ if (LlmTypeChecker.isReference(schema)) {
129
+ const key = schema.$ref.split("#/$defs/").pop();
130
+ if (already.has(key) === true)
131
+ return;
132
+ already.add(key);
133
+ const found = (_a = props.$defs) === null || _a === void 0 ? void 0 : _a[key];
134
+ if (found !== undefined)
135
+ next(found, `${refAccessor}[${key}]`);
136
+ }
137
+ else if (LlmTypeChecker.isAnyOf(schema))
138
+ schema.anyOf.forEach((s, i) => next(s, `${accessor}.anyOf[${i}]`));
139
+ else if (LlmTypeChecker.isObject(schema)) {
140
+ for (const [key, value] of Object.entries(schema.properties))
141
+ next(value, `${accessor}.properties[${JSON.stringify(key)}]`);
142
+ if (typeof schema.additionalProperties === "object" &&
143
+ schema.additionalProperties !== null)
144
+ next(schema.additionalProperties, `${accessor}.additionalProperties`);
145
+ }
146
+ else if (LlmTypeChecker.isArray(schema))
147
+ next(schema.items, `${accessor}.items`);
148
+ };
149
+ next(props.schema, (_b = props.accessor) !== null && _b !== void 0 ? _b : "$input.schemas");
150
+ };
151
+ /**
152
+ * Test whether the `x` schema covers the `y` schema.
153
+ *
154
+ * @param props Properties for testing
155
+ * @returns Whether the `x` schema covers the `y` schema
156
+ */
157
+ LlmTypeChecker.covers = (props) => coverStation({
158
+ $defs: props.$defs,
159
+ x: props.x,
160
+ y: props.y,
161
+ visited: new Map(),
162
+ });
163
+ const coverStation = (p) => {
164
+ var _a;
165
+ const cache = (_a = p.visited.get(p.x)) === null || _a === void 0 ? void 0 : _a.get(p.y);
166
+ if (cache !== undefined)
167
+ return cache;
168
+ // FOR RECURSIVE CASE
169
+ const nested = MapUtil_1.MapUtil.take(p.visited, p.x, () => new Map());
170
+ nested.set(p.y, true);
171
+ // COMPUTE IT
172
+ const result = coverSchema(p);
173
+ nested.set(p.y, result);
174
+ return result;
175
+ };
176
+ const coverSchema = (p) => {
177
+ // CHECK EQUALITY
178
+ if (p.x === p.y)
179
+ return true;
180
+ else if (LlmTypeChecker.isReference(p.x) && LlmTypeChecker.isReference(p.y) && p.x.$ref === p.y.$ref)
181
+ return true;
182
+ // COMPARE WITH FLATTENING
183
+ const alpha = flatSchema(p.$defs, p.x);
184
+ const beta = flatSchema(p.$defs, p.y);
185
+ if (alpha.some((x) => LlmTypeChecker.isUnknown(x)))
186
+ return true;
187
+ else if (beta.some((x) => LlmTypeChecker.isUnknown(x)))
188
+ return false;
189
+ return beta.every((b) => alpha.some((a) => coverEscapedSchema({
190
+ $defs: p.$defs,
191
+ visited: p.visited,
192
+ x: a,
193
+ y: b,
194
+ })));
195
+ };
196
+ const coverEscapedSchema = (p) => {
197
+ // CHECK EQUALITY
198
+ if (p.x === p.y)
199
+ return true;
200
+ else if (LlmTypeChecker.isUnknown(p.x))
201
+ return true;
202
+ else if (LlmTypeChecker.isUnknown(p.y))
203
+ return false;
204
+ else if (LlmTypeChecker.isNull(p.x))
205
+ return LlmTypeChecker.isNull(p.y);
206
+ // ATOMIC CASE
207
+ else if (LlmTypeChecker.isBoolean(p.x))
208
+ return LlmTypeChecker.isBoolean(p.y) && coverBoolean(p.x, p.y);
209
+ else if (LlmTypeChecker.isInteger(p.x))
210
+ return LlmTypeChecker.isInteger(p.y) && coverInteger(p.x, p.y);
211
+ else if (LlmTypeChecker.isNumber(p.x))
212
+ return LlmTypeChecker.isNumber(p.y) && coverNumber(p.x, p.y);
213
+ else if (LlmTypeChecker.isString(p.x))
214
+ return LlmTypeChecker.isString(p.y) && coverString(p.x, p.y);
215
+ // INSTANCE CASE
216
+ else if (LlmTypeChecker.isArray(p.x))
217
+ return (LlmTypeChecker.isArray(p.y) &&
218
+ coverArray({
219
+ $defs: p.$defs,
220
+ visited: p.visited,
221
+ x: p.x,
222
+ y: p.y,
223
+ }));
224
+ else if (LlmTypeChecker.isObject(p.x))
225
+ return (LlmTypeChecker.isObject(p.y) &&
226
+ coverObject({
227
+ $defs: p.$defs,
228
+ visited: p.visited,
229
+ x: p.x,
230
+ y: p.y,
231
+ }));
232
+ else if (LlmTypeChecker.isReference(p.x))
233
+ return LlmTypeChecker.isReference(p.y) && p.x.$ref === p.y.$ref;
234
+ return false;
235
+ };
236
+ const coverArray = (p) => {
237
+ if (!(p.x.minItems === undefined ||
238
+ (p.y.minItems !== undefined && p.x.minItems <= p.y.minItems)))
239
+ return false;
240
+ else if (!(p.x.maxItems === undefined ||
241
+ (p.y.maxItems !== undefined && p.x.maxItems >= p.y.maxItems)))
242
+ return false;
243
+ return coverStation({
244
+ $defs: p.$defs,
245
+ visited: p.visited,
246
+ x: p.x.items,
247
+ y: p.y.items,
248
+ });
249
+ };
250
+ const coverObject = (p) => {
251
+ var _a;
252
+ if (!p.x.additionalProperties && !!p.y.additionalProperties)
253
+ return false;
254
+ else if (!!p.x.additionalProperties &&
255
+ !!p.y.additionalProperties &&
256
+ ((typeof p.x.additionalProperties === "object" &&
257
+ p.y.additionalProperties === true) ||
258
+ (typeof p.x.additionalProperties === "object" &&
259
+ typeof p.y.additionalProperties === "object" &&
260
+ !coverStation({
261
+ $defs: p.$defs,
262
+ visited: p.visited,
263
+ x: p.x.additionalProperties,
264
+ y: p.y.additionalProperties,
265
+ }))))
266
+ return false;
267
+ return Object.entries((_a = p.y.properties) !== null && _a !== void 0 ? _a : {}).every(([key, b]) => {
268
+ var _a, _b, _c;
269
+ var _d, _e;
270
+ const a = (_a = p.x.properties) === null || _a === void 0 ? void 0 : _a[key];
271
+ if (a === undefined)
272
+ return false;
273
+ else if (((_d = (_b = p.x.required) === null || _b === void 0 ? void 0 : _b.includes(key)) !== null && _d !== void 0 ? _d : false) === true &&
274
+ ((_e = (_c = p.y.required) === null || _c === void 0 ? void 0 : _c.includes(key)) !== null && _e !== void 0 ? _e : false) === false)
275
+ return false;
276
+ return coverStation({
277
+ $defs: p.$defs,
278
+ visited: p.visited,
279
+ x: a,
280
+ y: b,
281
+ });
282
+ });
283
+ };
284
+ const coverBoolean = (x, y) => {
285
+ var _a, _b;
286
+ if (!!((_a = x.enum) === null || _a === void 0 ? void 0 : _a.length))
287
+ return !!((_b = y.enum) === null || _b === void 0 ? void 0 : _b.length) && y.enum.every((v) => x.enum.includes(v));
288
+ return true;
289
+ };
290
+ const coverInteger = (x, y) => {
291
+ var _a, _b;
292
+ if (!!((_a = x.enum) === null || _a === void 0 ? void 0 : _a.length))
293
+ return !!((_b = y.enum) === null || _b === void 0 ? void 0 : _b.length) && y.enum.every((v) => x.enum.includes(v));
294
+ return OpenApiTypeCheckerBase_1.OpenApiTypeCheckerBase.coverInteger(x, y);
295
+ };
296
+ const coverNumber = (x, y) => {
297
+ var _a, _b;
298
+ if (!!((_a = x.enum) === null || _a === void 0 ? void 0 : _a.length))
299
+ return !!((_b = y.enum) === null || _b === void 0 ? void 0 : _b.length) && y.enum.every((v) => x.enum.includes(v));
300
+ return OpenApiTypeCheckerBase_1.OpenApiTypeCheckerBase.coverNumber(x, y);
301
+ };
302
+ const coverString = (x, y) => {
303
+ var _a, _b;
304
+ if (!!((_a = x.enum) === null || _a === void 0 ? void 0 : _a.length))
305
+ return !!((_b = y.enum) === null || _b === void 0 ? void 0 : _b.length) && y.enum.every((v) => x.enum.includes(v));
306
+ return OpenApiTypeCheckerBase_1.OpenApiTypeCheckerBase.coverString(x, y);
307
+ };
308
+ const flatSchema = ($defs, schema) => {
309
+ schema = escapeReference($defs, schema);
310
+ if (LlmTypeChecker.isAnyOf(schema))
311
+ return schema.anyOf.map((v) => flatSchema($defs, v)).flat();
312
+ return [schema];
313
+ };
314
+ const escapeReference = ($defs, schema) => LlmTypeChecker.isReference(schema)
315
+ ? escapeReference($defs, $defs[schema.$ref.replace("#/$defs/", "")])
316
+ : schema;
317
+ })(LlmTypeChecker$1 || (LlmTypeChecker.LlmTypeChecker = LlmTypeChecker$1 = {}));
318
+
319
+ return LlmTypeChecker;
320
+ }
321
+
322
+ export { requireLlmTypeChecker as __require };
323
+ //# sourceMappingURL=LlmTypeChecker2.mjs.map