@autobe/agent 0.18.0 → 0.20.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 (341) hide show
  1. package/lib/AutoBeMockAgent.d.ts +2 -10
  2. package/lib/agent/src/AutoBeAgent.js +8 -2
  3. package/lib/agent/src/AutoBeAgent.js.map +1 -1
  4. package/lib/agent/src/AutoBeMockAgent.d.ts +2 -10
  5. package/lib/agent/src/AutoBeMockAgent.js +10 -5
  6. package/lib/agent/src/AutoBeMockAgent.js.map +1 -1
  7. package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +23 -29
  8. package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +1 -1
  9. package/lib/agent/src/context/AutoBeContext.d.ts +1 -0
  10. package/lib/agent/src/context/AutoBeTokenUsageComponent.d.ts +1 -0
  11. package/lib/agent/src/context/AutoBeTokenUsageComponent.js +14 -0
  12. package/lib/agent/src/context/AutoBeTokenUsageComponent.js.map +1 -1
  13. package/lib/agent/src/factory/consentFunctionCall.d.ts +10 -0
  14. package/lib/agent/src/factory/consentFunctionCall.js +213 -0
  15. package/lib/agent/src/factory/consentFunctionCall.js.map +1 -0
  16. package/lib/agent/src/factory/createAgenticaHistory.js +1 -0
  17. package/lib/agent/src/factory/createAgenticaHistory.js.map +1 -1
  18. package/lib/agent/src/factory/createAutoBeContext.js +79 -19
  19. package/lib/agent/src/factory/createAutoBeContext.js.map +1 -1
  20. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +6 -0
  21. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js +41 -0
  22. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -0
  23. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +12 -9
  24. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
  25. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +3 -1
  26. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +45 -31
  27. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
  28. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js +25 -6
  29. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
  30. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +8 -3
  31. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +15 -12
  32. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
  33. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +33 -44
  34. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
  35. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -4
  36. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +10 -4
  37. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
  38. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +16 -16
  39. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +5 -5
  40. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js +45 -45
  41. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -1
  42. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +14 -14
  43. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
  44. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +31 -30
  45. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
  46. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +24 -31
  47. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
  48. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +4 -4
  49. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
  50. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +27 -26
  51. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
  52. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +13 -12
  53. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
  54. package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js +4 -4
  55. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +11 -10
  56. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
  57. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +36 -29
  58. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
  59. package/lib/agent/src/orchestrate/interface/orchestrateInterface.js +31 -9
  60. package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -1
  61. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +2 -2
  62. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +1571 -1144
  63. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
  64. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js +24 -4
  65. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  66. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js +6 -2
  67. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
  68. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.d.ts +2 -2
  69. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js +12 -14
  70. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
  71. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +103 -71
  72. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  73. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +2 -3
  74. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +147 -116
  75. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
  76. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js +401 -233
  77. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
  78. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +2 -5
  79. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +362 -178
  80. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -1
  81. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +38 -0
  82. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +16 -16
  83. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +97 -14
  84. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +75 -1
  85. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +46 -14
  86. package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +18 -24
  87. package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +7 -0
  88. package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js +35 -0
  89. package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js.map +1 -0
  90. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +60 -66
  91. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
  92. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +19 -30
  93. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -1
  94. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +38 -35
  95. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
  96. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +39 -26
  97. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
  98. package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js +15 -4
  99. package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +1 -1
  100. package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -2
  101. package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js +7 -9
  102. package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  103. package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js +38 -2
  104. package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  105. package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js +61 -10
  106. package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
  107. package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js +68 -24
  108. package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
  109. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +24 -21
  110. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -1
  111. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +59 -57
  112. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
  113. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +1 -0
  114. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +17 -13
  115. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
  116. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +3 -0
  117. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +287 -0
  118. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -0
  119. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -2
  120. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +46 -49
  121. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
  122. package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.d.ts +7 -0
  123. package/lib/agent/src/orchestrate/realize/internal/{compile.js → compileRealizeFiles.js} +12 -29
  124. package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js.map +1 -0
  125. package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +76 -45
  126. package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -1
  127. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js +15 -9
  128. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
  129. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +9 -7
  130. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
  131. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +9 -6
  132. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +25 -20
  133. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
  134. package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -66
  135. package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -1
  136. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +8 -6
  137. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +36 -27
  138. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
  139. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +3 -3
  140. package/lib/agent/src/orchestrate/{internal/IProgress.js → realize/structures/IAutoBeRealizeCorrectApplication.js} +1 -1
  141. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.js.map +1 -0
  142. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +19 -16
  143. package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js +5 -1
  144. package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
  145. package/lib/agent/src/orchestrate/test/compile/completeTestCode.js +13 -10
  146. package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +1 -1
  147. package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +17 -16
  148. package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
  149. package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js +33 -32
  150. package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +1 -1
  151. package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.d.ts +2 -1
  152. package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +97 -49
  153. package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
  154. package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +3 -3
  155. package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
  156. package/lib/agent/src/orchestrate/test/orchestrateTest.js +17 -4
  157. package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -1
  158. package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js +18 -9
  159. package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  160. package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +138 -23
  161. package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  162. package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js +17 -17
  163. package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  164. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +7 -6
  165. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +1 -1
  166. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
  167. package/lib/agent/src/orchestrate/{realize/structures/IAutoBeRealizeCoderApplication.js → test/structures/IAutoBeTestScenarioAuthorizationRole.js} +1 -1
  168. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.js.map +1 -0
  169. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -2
  170. package/lib/agent/src/utils/executeCachedBatch.d.ts +1 -0
  171. package/lib/agent/src/utils/executeCachedBatch.js +23 -0
  172. package/lib/agent/src/utils/executeCachedBatch.js.map +1 -0
  173. package/lib/agent/src/utils/predicateStateMessage.d.ts +4 -0
  174. package/lib/agent/src/utils/predicateStateMessage.js +87 -0
  175. package/lib/agent/src/utils/predicateStateMessage.js.map +1 -0
  176. package/lib/constants/AutoBeSystemPromptConstant.d.ts +23 -29
  177. package/lib/context/AutoBeContext.d.ts +1 -0
  178. package/lib/context/AutoBeTokenUsageComponent.d.ts +1 -0
  179. package/lib/factory/consentFunctionCall.d.ts +10 -0
  180. package/lib/index.mjs +4799 -2637
  181. package/lib/index.mjs.map +1 -1
  182. package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +6 -0
  183. package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +3 -1
  184. package/lib/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +8 -3
  185. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -4
  186. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +16 -16
  187. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +5 -5
  188. package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +2 -2
  189. package/lib/orchestrate/interface/orchestrateInterfaceGroups.d.ts +2 -2
  190. package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +2 -3
  191. package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +2 -5
  192. package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +38 -0
  193. package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +16 -16
  194. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +97 -14
  195. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +75 -1
  196. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +46 -14
  197. package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +18 -24
  198. package/lib/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +7 -0
  199. package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -2
  200. package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +1 -0
  201. package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +3 -0
  202. package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -2
  203. package/lib/orchestrate/realize/internal/compileRealizeFiles.d.ts +7 -0
  204. package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +9 -6
  205. package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -66
  206. package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +8 -6
  207. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +3 -3
  208. package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +19 -16
  209. package/lib/orchestrate/test/histories/transformTestScenarioHistories.d.ts +2 -1
  210. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +7 -6
  211. package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +1 -1
  212. package/lib/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
  213. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -2
  214. package/lib/utils/executeCachedBatch.d.ts +1 -0
  215. package/lib/utils/predicateStateMessage.d.ts +4 -0
  216. package/package.json +6 -6
  217. package/src/AutoBeAgent.ts +18 -3
  218. package/src/AutoBeMockAgent.ts +13 -15
  219. package/src/constants/AutoBeSystemPromptConstant.ts +23 -29
  220. package/src/context/AutoBeContext.ts +1 -0
  221. package/src/context/AutoBeTokenUsageComponent.ts +20 -0
  222. package/src/factory/consentFunctionCall.ts +129 -0
  223. package/src/factory/createAgenticaHistory.ts +1 -0
  224. package/src/factory/createAutoBeContext.ts +108 -20
  225. package/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.ts +53 -0
  226. package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +13 -10
  227. package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +68 -47
  228. package/src/orchestrate/analyze/orchestrateAnalyze.ts +33 -21
  229. package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +21 -10
  230. package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +18 -40
  231. package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +15 -8
  232. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +16 -16
  233. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +5 -5
  234. package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +47 -47
  235. package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +14 -14
  236. package/src/orchestrate/interface/histories/transformInterfaceComplementHistories.ts +31 -30
  237. package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +20 -29
  238. package/src/orchestrate/interface/histories/transformInterfaceGroupHistories.ts +3 -3
  239. package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +23 -22
  240. package/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.ts +12 -11
  241. package/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.ts +5 -5
  242. package/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts +11 -10
  243. package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +37 -30
  244. package/src/orchestrate/interface/orchestrateInterface.ts +53 -12
  245. package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +142 -32
  246. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +2 -0
  247. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +13 -9
  248. package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +8 -19
  249. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +82 -74
  250. package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +51 -32
  251. package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +174 -56
  252. package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +149 -63
  253. package/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.ts +39 -0
  254. package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +16 -16
  255. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +101 -14
  256. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +77 -1
  257. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +47 -14
  258. package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +18 -24
  259. package/src/orchestrate/interface/utils/validateAuthorizationSchema.ts +41 -0
  260. package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +61 -66
  261. package/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.ts +19 -30
  262. package/src/orchestrate/prisma/histories/transformPrismaReviewHistories.ts +38 -35
  263. package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +36 -23
  264. package/src/orchestrate/prisma/orchestratePrisma.ts +17 -6
  265. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +8 -19
  266. package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +3 -0
  267. package/src/orchestrate/prisma/orchestratePrismaReview.ts +37 -18
  268. package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +25 -17
  269. package/src/orchestrate/realize/histories/transformRealizeAuthorization.ts +24 -21
  270. package/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.ts +57 -59
  271. package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +20 -14
  272. package/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.ts +294 -0
  273. package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +62 -57
  274. package/src/orchestrate/realize/internal/compileRealizeFiles.ts +71 -0
  275. package/src/orchestrate/realize/orchestrateRealize.ts +109 -86
  276. package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +22 -13
  277. package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +3 -0
  278. package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +28 -24
  279. package/src/orchestrate/realize/orchestrateRealizeScenario.ts +0 -74
  280. package/src/orchestrate/realize/orchestrateRealizeWrite.ts +37 -28
  281. package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +3 -3
  282. package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +19 -16
  283. package/src/orchestrate/realize/utils/replaceImportStatements.ts +7 -0
  284. package/src/orchestrate/test/compile/completeTestCode.ts +17 -13
  285. package/src/orchestrate/test/experimental/transformTestCorrectHistories.ast +4 -4
  286. package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +17 -16
  287. package/src/orchestrate/test/histories/transformTestHistories.ts +35 -34
  288. package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +116 -60
  289. package/src/orchestrate/test/histories/transformTestWriteHistories.ts +3 -3
  290. package/src/orchestrate/test/orchestrateTest.ts +18 -8
  291. package/src/orchestrate/test/orchestrateTestCorrect.ts +34 -24
  292. package/src/orchestrate/test/orchestrateTestScenario.ts +179 -36
  293. package/src/orchestrate/test/orchestrateTestWrite.ts +18 -19
  294. package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +7 -6
  295. package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +1 -1
  296. package/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.ts +7 -0
  297. package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +2 -2
  298. package/src/utils/executeCachedBatch.ts +15 -0
  299. package/src/utils/predicateStateMessage.ts +107 -0
  300. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +0 -4
  301. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js +0 -46
  302. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js.map +0 -1
  303. package/lib/agent/src/orchestrate/internal/IProgress.d.ts +0 -4
  304. package/lib/agent/src/orchestrate/internal/IProgress.js.map +0 -1
  305. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.d.ts +0 -7
  306. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.js +0 -213
  307. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.js.map +0 -1
  308. package/lib/agent/src/orchestrate/realize/internal/compile.d.ts +0 -7
  309. package/lib/agent/src/orchestrate/realize/internal/compile.js.map +0 -1
  310. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +0 -345
  311. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +0 -1
  312. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +0 -56
  313. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.js +0 -3
  314. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +0 -1
  315. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +0 -2
  316. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js +0 -5
  317. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js.map +0 -1
  318. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.js +0 -3
  319. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.js.map +0 -1
  320. package/lib/agent/src/utils/pipe.d.ts +0 -5
  321. package/lib/agent/src/utils/pipe.js +0 -14
  322. package/lib/agent/src/utils/pipe.js.map +0 -1
  323. package/lib/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +0 -4
  324. package/lib/orchestrate/internal/IProgress.d.ts +0 -4
  325. package/lib/orchestrate/realize/histories/transformRealizeCoderHistories.d.ts +0 -7
  326. package/lib/orchestrate/realize/internal/compile.d.ts +0 -7
  327. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +0 -345
  328. package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +0 -56
  329. package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +0 -2
  330. package/lib/utils/pipe.d.ts +0 -5
  331. package/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.ts +0 -53
  332. package/src/orchestrate/internal/IProgress.ts +0 -4
  333. package/src/orchestrate/realize/histories/transformRealizeCoderHistories.ts +0 -248
  334. package/src/orchestrate/realize/internal/compile.ts +0 -84
  335. package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +0 -358
  336. package/src/orchestrate/realize/structures/IAutoBeRealizeCompile.ts +0 -70
  337. package/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.ts +0 -2
  338. package/src/utils/pipe.ts +0 -39
  339. /package/lib/agent/src/orchestrate/realize/structures/{IAutoBeRealizeReviewApplication.d.ts → IAutoBeRealizeCorrectApplication.d.ts} +0 -0
  340. /package/lib/orchestrate/realize/structures/{IAutoBeRealizeReviewApplication.d.ts → IAutoBeRealizeCorrectApplication.d.ts} +0 -0
  341. /package/src/orchestrate/realize/structures/{IAutoBeRealizeReviewApplication.ts → IAutoBeRealizeCorrectApplication.ts} +0 -0
@@ -49,43 +49,63 @@ exports.orchestrateInterfaceSchemasReview = orchestrateInterfaceSchemasReview;
49
49
  const __typia_transform__accessExpressionAsString = __importStar(require("typia/lib/internal/_accessExpressionAsString.js"));
50
50
  const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
51
51
  const __typia_transform__llmApplicationFinalize = __importStar(require("typia/lib/internal/_llmApplicationFinalize.js"));
52
+ const OpenApiV3_1Emender_1 = require("@samchon/openapi/lib/converters/OpenApiV3_1Emender");
52
53
  const typia_1 = __importDefault(require("typia"));
54
+ const uuid_1 = require("uuid");
55
+ const assertSchemaModel_1 = require("../../context/assertSchemaModel");
53
56
  const transformInterfaceSchemasReviewHistories_1 = require("./histories/transformInterfaceSchemasReviewHistories");
57
+ const validateAuthorizationSchema_1 = require("./utils/validateAuthorizationSchema");
54
58
  function orchestrateInterfaceSchemasReview(ctx, operations, schemas, progress) {
55
59
  return __awaiter(this, void 0, void 0, function* () {
56
- var _a, _b;
57
- const pointer = {
58
- value: null,
59
- };
60
- const { tokenUsage } = yield ctx.conversate({
61
- source: "interfaceSchemasReview",
62
- controller: createController({
63
- model: ctx.model,
64
- pointer,
65
- schemas,
66
- }),
67
- histories: (0, transformInterfaceSchemasReviewHistories_1.transformInterfaceSchemasReviewHistories)(ctx.state(), operations, schemas),
68
- enforceFunctionCall: true,
69
- message: "Review type schemas.",
70
- });
71
- if (pointer.value === null)
72
- throw new Error("Failed to extract review information.");
73
- ctx.dispatch({
74
- type: "interfaceSchemasReview",
75
- schemas: schemas,
76
- review: pointer.value.review,
77
- plan: pointer.value.plan,
78
- content: pointer.value.content,
79
- tokenUsage,
80
- step: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
81
- total: progress.total,
82
- completed: ++progress.completed,
83
- created_at: new Date().toISOString(),
84
- });
85
- return pointer.value.content;
60
+ var _a, _b, _c;
61
+ try {
62
+ const pointer = {
63
+ value: null,
64
+ };
65
+ const { tokenUsage } = yield ctx.conversate({
66
+ source: "interfaceSchemasReview",
67
+ controller: createController({
68
+ model: ctx.model,
69
+ pointer,
70
+ operations,
71
+ schemas,
72
+ }),
73
+ histories: (0, transformInterfaceSchemasReviewHistories_1.transformInterfaceSchemasReviewHistories)(ctx.state(), operations, schemas),
74
+ enforceFunctionCall: true,
75
+ message: "Review type schemas.",
76
+ });
77
+ if (pointer.value === null) {
78
+ console.error("Failed to extract review information.");
79
+ ++progress.completed;
80
+ return {};
81
+ }
82
+ const content = (_a = OpenApiV3_1Emender_1.OpenApiV3_1Emender.convertComponents({
83
+ schemas: pointer.value.content,
84
+ }).schemas) !== null && _a !== void 0 ? _a : {};
85
+ ctx.dispatch({
86
+ type: "interfaceSchemasReview",
87
+ id: (0, uuid_1.v7)(),
88
+ schemas: schemas,
89
+ review: pointer.value.review,
90
+ plan: pointer.value.plan,
91
+ content,
92
+ tokenUsage,
93
+ step: (_c = (_b = ctx.state().analyze) === null || _b === void 0 ? void 0 : _b.step) !== null && _c !== void 0 ? _c : 0,
94
+ total: progress.total,
95
+ completed: ++progress.completed,
96
+ created_at: new Date().toISOString(),
97
+ });
98
+ return content;
99
+ }
100
+ catch (error) {
101
+ console.error("Error occurred during interface schemas review:", error);
102
+ ++progress.completed;
103
+ return {};
104
+ }
86
105
  });
87
106
  }
88
107
  function createController(props) {
108
+ (0, assertSchemaModel_1.assertSchemaModel)(props.model);
89
109
  const validate = (next) => {
90
110
  const result = (() => { const _io0 = input => "string" === typeof input.review && "string" === typeof input.plan && ("object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) && _io1(input.content)); const _io1 = input => Object.keys(input).every(key => {
91
111
  const value = input[key];
@@ -156,24 +176,192 @@ function createController(props) {
156
176
  if (result.success === false)
157
177
  return result;
158
178
  const errors = [];
159
- if (Object.keys(result.data.content).length === 0) {
160
- console.log();
161
- console.log();
162
- console.log();
163
- console.log(JSON.stringify(Object.assign({ schemas: props.schemas }, result.data), null, 2));
164
- errors.push({
165
- path: `$input.content`,
166
- expected: `Content must not be empty. If it's at a level that can't be fixed, please create a schema instead to meet the requirements.`,
167
- value: result.data.content,
179
+ (0, validateAuthorizationSchema_1.validateAuthorizationSchema)({
180
+ errors,
181
+ schemas: result.data.content,
182
+ path: "$input.content",
183
+ });
184
+ Object.entries(result.data.content).forEach(([tagName, jsonDescriptive]) => {
185
+ var _a;
186
+ const index = props.operations.find((op) => {
187
+ var _a;
188
+ return ((_a = op.responseBody) === null || _a === void 0 ? void 0 : _a.typeName) === tagName &&
189
+ op.method === "patch" &&
190
+ op.name === "index";
168
191
  });
169
- }
170
- if (errors.length > 0) {
192
+ // The index API should return the `IPage<T>` type.
193
+ if (index) {
194
+ // First check if the schema has the correct object structure
195
+ if (!("type" in jsonDescriptive) ||
196
+ jsonDescriptive.type !== "object") {
197
+ errors.push({
198
+ path: `$input.content.${tagName}`,
199
+ expected: `{ type: "object", properties: { ... } }`,
200
+ value: jsonDescriptive,
201
+ description: `IPage schema must have type: "object". Found: ${JSON.stringify(jsonDescriptive)}`,
202
+ });
203
+ }
204
+ else if (!("properties" in jsonDescriptive)) {
205
+ errors.push({
206
+ path: `$input.content.${tagName}`,
207
+ expected: `Schema with "properties" field`,
208
+ value: jsonDescriptive,
209
+ description: `IPage schema must have a "properties" field containing "pagination" and "data" properties.`,
210
+ });
211
+ }
212
+ else if ((() => { const _io0 = input => "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && _io1(input.properties) && (null !== input.additionalProperties && (undefined === input.additionalProperties || false === input.additionalProperties || "object" === typeof input.additionalProperties && null !== input.additionalProperties && _iu1(input.additionalProperties))) && (Array.isArray(input.required) && input.required.every(elem => "string" === typeof elem)) && "object" === input.type; const _io1 = input => Object.keys(input).every(key => {
213
+ const value = input[key];
214
+ if (undefined === value)
215
+ return true;
216
+ return "object" === typeof value && null !== value && _io2(value);
217
+ }); const _io2 = input => "string" === typeof input.description; const _io3 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io4 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io5 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input["const"] || "number" === typeof input["const"] || "boolean" === typeof input["const"]; const _io7 = input => "boolean" === input.type; const _io8 = input => "object" === typeof input.items && null !== input.items && _iu1(input.items) && (undefined === input.uniqueItems || "boolean" === typeof input.uniqueItems) && (undefined === input.minItems || "number" === typeof input.minItems && (Math.floor(input.minItems) === input.minItems && 0 <= input.minItems && input.minItems <= 18446744073709552000)) && (undefined === input.maxItems || "number" === typeof input.maxItems && (Math.floor(input.maxItems) === input.maxItems && 0 <= input.maxItems && input.maxItems <= 18446744073709552000)) && "array" === input.type; const _io9 = input => "string" === typeof input.$ref; const _io10 = input => Array.isArray(input.oneOf) && input.oneOf.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)) && (undefined === input.discriminator || "object" === typeof input.discriminator && null !== input.discriminator && _io12(input.discriminator)); const _io11 = input => "null" === input.type; const _io12 = input => "string" === typeof input.propertyName && (undefined === input.mapping || "object" === typeof input.mapping && null !== input.mapping && false === Array.isArray(input.mapping) && _io13(input.mapping)); const _io13 = input => Object.keys(input).every(key => {
218
+ const value = input[key];
219
+ if (undefined === value)
220
+ return true;
221
+ return "string" === typeof value;
222
+ }); const _iu0 = input => (() => {
223
+ if ("number" === input.type)
224
+ return _io4(input);
225
+ else if ("integer" === input.type)
226
+ return _io3(input);
227
+ else if ("string" === input.type)
228
+ return _io5(input);
229
+ else if (undefined !== input["const"])
230
+ return _io6(input);
231
+ else if ("null" === input.type)
232
+ return _io11(input);
233
+ else if ("boolean" === input.type)
234
+ return _io7(input);
235
+ else if ("array" === input.type)
236
+ return _io8(input);
237
+ else if ("object" === input.type)
238
+ return _io0(input);
239
+ else if (undefined !== input.$ref)
240
+ return _io9(input);
241
+ else
242
+ return false;
243
+ })(); const _iu1 = input => (() => {
244
+ if ("number" === input.type)
245
+ return _io4(input);
246
+ else if ("integer" === input.type)
247
+ return _io3(input);
248
+ else if ("string" === input.type)
249
+ return _io5(input);
250
+ else if (undefined !== input["const"])
251
+ return _io6(input);
252
+ else if ("null" === input.type)
253
+ return _io11(input);
254
+ else if ("boolean" === input.type)
255
+ return _io7(input);
256
+ else if ("array" === input.type)
257
+ return _io8(input);
258
+ else if ("object" === input.type)
259
+ return _io0(input);
260
+ else if (undefined !== input.$ref)
261
+ return _io9(input);
262
+ else if (undefined !== input.oneOf)
263
+ return _io10(input);
264
+ else
265
+ return false;
266
+ })(); return input => "object" === typeof input && null !== input && _io0(input); })()(jsonDescriptive)) {
267
+ (_a = jsonDescriptive.properties) !== null && _a !== void 0 ? _a : (jsonDescriptive.properties = {});
268
+ // Check pagination property
269
+ const pagination = jsonDescriptive.properties["pagination"];
270
+ if (!pagination || !("$ref" in pagination)) {
271
+ errors.push({
272
+ path: `$input.content.${tagName}.properties.pagination`,
273
+ expected: `{ $ref: "#/components/schemas/IPage.IPagination" }`,
274
+ value: pagination,
275
+ description: `IPage must have a "pagination" property with $ref to IPage.IPagination.`,
276
+ });
277
+ }
278
+ // Check data property
279
+ const data = jsonDescriptive.properties["data"];
280
+ if (!(() => { const _io0 = input => "object" === typeof input.items && null !== input.items && _iu1(input.items) && (undefined === input.uniqueItems || "boolean" === typeof input.uniqueItems) && (undefined === input.minItems || "number" === typeof input.minItems && (Math.floor(input.minItems) === input.minItems && 0 <= input.minItems && input.minItems <= 18446744073709552000)) && (undefined === input.maxItems || "number" === typeof input.maxItems && (Math.floor(input.maxItems) === input.maxItems && 0 <= input.maxItems && input.maxItems <= 18446744073709552000)) && "array" === input.type; const _io1 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io2 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io3 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io4 = input => "string" === typeof input["const"] || "number" === typeof input["const"] || "boolean" === typeof input["const"]; const _io5 = input => "boolean" === input.type; const _io6 = input => "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && _io7(input.properties) && (null !== input.additionalProperties && (undefined === input.additionalProperties || false === input.additionalProperties || "object" === typeof input.additionalProperties && null !== input.additionalProperties && _iu1(input.additionalProperties))) && (Array.isArray(input.required) && input.required.every(elem => "string" === typeof elem)) && "object" === input.type; const _io7 = input => Object.keys(input).every(key => {
281
+ const value = input[key];
282
+ if (undefined === value)
283
+ return true;
284
+ return "object" === typeof value && null !== value && _io8(value);
285
+ }); const _io8 = input => "string" === typeof input.description; const _io9 = input => "string" === typeof input.$ref; const _io10 = input => Array.isArray(input.oneOf) && input.oneOf.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)) && (undefined === input.discriminator || "object" === typeof input.discriminator && null !== input.discriminator && _io12(input.discriminator)); const _io11 = input => "null" === input.type; const _io12 = input => "string" === typeof input.propertyName && (undefined === input.mapping || "object" === typeof input.mapping && null !== input.mapping && false === Array.isArray(input.mapping) && _io13(input.mapping)); const _io13 = input => Object.keys(input).every(key => {
286
+ const value = input[key];
287
+ if (undefined === value)
288
+ return true;
289
+ return "string" === typeof value;
290
+ }); const _iu0 = input => (() => {
291
+ if ("number" === input.type)
292
+ return _io2(input);
293
+ else if ("integer" === input.type)
294
+ return _io1(input);
295
+ else if ("string" === input.type)
296
+ return _io3(input);
297
+ else if (undefined !== input["const"])
298
+ return _io4(input);
299
+ else if ("null" === input.type)
300
+ return _io11(input);
301
+ else if ("boolean" === input.type)
302
+ return _io5(input);
303
+ else if ("array" === input.type)
304
+ return _io0(input);
305
+ else if ("object" === input.type)
306
+ return _io6(input);
307
+ else if (undefined !== input.$ref)
308
+ return _io9(input);
309
+ else
310
+ return false;
311
+ })(); const _iu1 = input => (() => {
312
+ if ("number" === input.type)
313
+ return _io2(input);
314
+ else if ("integer" === input.type)
315
+ return _io1(input);
316
+ else if ("string" === input.type)
317
+ return _io3(input);
318
+ else if (undefined !== input["const"])
319
+ return _io4(input);
320
+ else if ("null" === input.type)
321
+ return _io11(input);
322
+ else if ("boolean" === input.type)
323
+ return _io5(input);
324
+ else if ("array" === input.type)
325
+ return _io0(input);
326
+ else if ("object" === input.type)
327
+ return _io6(input);
328
+ else if (undefined !== input.$ref)
329
+ return _io9(input);
330
+ else if (undefined !== input.oneOf)
331
+ return _io10(input);
332
+ else
333
+ return false;
334
+ })(); return input => "object" === typeof input && null !== input && _io0(input); })()(data)) {
335
+ errors.push({
336
+ path: `$input.content.${tagName}.properties.data`,
337
+ expected: `AutoBeOpenApi.IJsonSchema.IArray`,
338
+ value: data,
339
+ description: `The 'data' property must be an array for the index operation.`,
340
+ });
341
+ }
342
+ else {
343
+ // Check if array items have proper type reference (not 'any')
344
+ const arraySchema = data;
345
+ if (!arraySchema.items ||
346
+ !("$ref" in arraySchema.items) ||
347
+ arraySchema.items.$ref === "#/components/schemas/any") {
348
+ errors.push({
349
+ path: `$input.content.${tagName}.properties.data.items`,
350
+ expected: `Reference to a specific type (e.g., $ref to ISummary type)`,
351
+ value: arraySchema.items,
352
+ description: `The 'data' array must have a specific item type, not 'any[]'. Use a proper type reference like '{Entity}.ISummary' for paginated results.`,
353
+ });
354
+ }
355
+ }
356
+ }
357
+ }
358
+ });
359
+ if (errors.length !== 0)
171
360
  return {
172
361
  success: false,
173
362
  errors,
174
- data: result.data,
363
+ data: next,
175
364
  };
176
- }
177
365
  return result;
178
366
  };
179
367
  const application = collection[props.model === "chatgpt" ? "chatgpt" : "claude"](validate);
@@ -188,159 +376,158 @@ function createController(props) {
188
376
  },
189
377
  };
190
378
  }
191
- const claude = (validate) => (() => {
192
- const application = {
193
- model: "claude",
194
- options: {
195
- reference: true,
196
- separate: null
197
- },
198
- functions: [
199
- {
200
- name: "review",
201
- parameters: {
202
- description: " Contains review findings, improvement plan, and enhanced\nschemas\n\n------------------------------\n\nDescription of the current {@link IAutoBeInterfaceSchemasReviewApplication.IProps} type:\n\n> Schema review and enhancement parameters for the review function.\n> \n> When the review function is called, these properties must be populated to\n> complete the schema validation and improvement process. The LLM uses this\n> interface to understand what outputs are required.",
203
- type: "object",
204
- properties: {
205
- review: {
206
- description: "Issues and problems found during schema analysis.\n\nIMPORTANT: Only document problems that need fixing. Do NOT include:\n\n- Positive feedback about what's already correct\n- Compliments about well-structured schemas\n- Confirmation that certain aspects meet standards\n\nFocus exclusively on issues organized by severity:\n\n- CRITICAL: Security vulnerabilities (exposed passwords, missing auth\n boundaries)\n- HIGH: Missing required variants, incorrect type mappings\n- MEDIUM: Missing format specifications, incomplete relationships\n- LOW: Documentation improvements, style consistency\n\nEach issue must include the specific schema name and what needs to be\nfixed. If there are no issues at all, simply state: \"No issues found.\"",
207
- type: "string"
208
- },
209
- plan: {
210
- description: "Action plan for addressing identified issues.\n\nMust specify concrete fixes categorized by priority:\n\n- For perfect schemas: \"No improvements required. All schemas meet AutoBE\n standards.\"\n- For fixable issues: List each fix with operation path and exact change\n- For critical problems: Describe how schemas were recreated or corrected\n\nNever leave this empty. Always provide a clear plan even if no changes\nare needed. The plan documents what was done to produce the content\nfield.",
211
- type: "string"
212
- },
213
- content: {
214
- description: "Final validated and enhanced schemas ready for production use.\n\nCRITICAL REQUIREMENTS:\n\n- MUST NEVER be an empty object {}\n- MUST contain valid OpenAPI schema definitions\n- MUST include all entities that were in the original input\n- If original schemas have critical issues, MUST contain fixed versions\n- If entity names are wrong, MUST contain renamed correct versions\n- If schemas are missing variants, MUST include the created variants\n\nFORBIDDEN:\n\n- Empty object {} will cause all schemas to be deleted\n- Returning undefined or null\n- Including explanations or excuses in schema descriptions\n- Leaving broken schemas unfixed\n\nWhen original schemas are beyond repair, recreate them properly based on\nentity names and context. This field becomes the final schemas used by\nthe system, so it must always contain complete, valid schemas.",
215
- $ref: "#/$defs/RecordstringAutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema"
216
- }
217
- },
218
- required: [
219
- "review",
220
- "plan",
221
- "content"
222
- ],
223
- additionalProperties: false,
224
- $defs: {
225
- "RecordstringAutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema": {
226
- description: "Construct a type with a set of properties K of type T",
227
- type: "object",
228
- properties: {},
229
- required: [],
230
- additionalProperties: {
231
- $ref: "#/$defs/AutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema"
379
+ const collection = {
380
+ chatgpt: (validate) => (() => {
381
+ const application = {
382
+ model: "chatgpt",
383
+ options: {
384
+ reference: true,
385
+ strict: false,
386
+ separate: null
387
+ },
388
+ functions: [
389
+ {
390
+ name: "review",
391
+ parameters: {
392
+ description: " Contains review findings, improvement plan, and enhanced\nschemas\n\n------------------------------\n\nDescription of the current {@link IAutoBeInterfaceSchemasReviewApplication.IProps} type:\n\n> Schema review and enhancement parameters for the review function.\n> \n> When the review function is called, these properties must be populated to\n> complete the schema validation and improvement process. The LLM uses this\n> interface to understand what outputs are required.\n\n### Description of {@link content} property:\n\n> Final validated and enhanced schemas ready for production use.\n> \n> DO:\n> - Include valid OpenAPI schema definitions\n> - Include all entities that were in the original input\n> - Provide fixed versions if original schemas have issues\n> - Rename entities correctly if names are wrong\n> - Include created variants if schemas are missing them\n> \n> DO NOT:\n> - Return an empty object {} (this will delete all schemas)\n> - Return undefined or null\n> - Include explanations or excuses in schema descriptions\n> - Leave broken schemas unfixed\n> \n> When original schemas are beyond repair, recreate them properly based on\n> entity names and context. This field becomes the final schemas used by\n> the system, so it must always contain complete, valid schemas.",
393
+ type: "object",
394
+ properties: {
395
+ review: {
396
+ description: "Issues and problems found during schema analysis.\n\nDO: Document only problems that need fixing.\nDO NOT: Include positive feedback, compliments, or confirmations\n\nFocus exclusively on issues organized by severity:\n\nSeverity levels:\n- Security vulnerabilities (exposed passwords, missing auth boundaries)\n- Missing required variants, incorrect type mappings\n- Missing format specifications, incomplete relationships\n- Documentation improvements, style consistency\n\nEach issue must include the specific schema name and what needs to be\nfixed. If there are no issues at all, simply state: \"No issues found.\"",
397
+ type: "string"
398
+ },
399
+ plan: {
400
+ description: "Action plan for addressing identified issues.\n\nMust specify concrete fixes categorized by priority:\n\n- For perfect schemas: \"No improvements required. All schemas meet AutoBE\n standards.\"\n- For fixable issues: List each fix with operation path and exact change\n- For critical problems: Describe how schemas were recreated or corrected\n\nNever leave this empty. Always provide a clear plan even if no changes\nare needed. The plan documents what was done to produce the content\nfield.",
401
+ type: "string"
402
+ },
403
+ content: {
404
+ $ref: "#/$defs/RecordstringAutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema"
232
405
  }
233
406
  },
234
- "AutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema": {
235
- description: "Descriptive type schema info.\n\n`AutoBeOpenApi.IJsonSchemaDescriptive` is a type schema info of the OpenAPI\nGenerative, but it has a `description` property which is required.\n\n`AutoBeOpenApi.IJsonSchemaDescriptive` basically follows the JSON schema\nspecification of OpenAPI v3.1, but a little bit shrunk to remove ambiguous\nand duplicated expressions of OpenAPI v3.1 for the convenience, clarity,\nand AI generation.\n\nCRITICAL INSTRUCTIONS FOR OPTIMAL AI GENERATION:\n\nWhen creating descriptions for components, types, and properties:\n\n1. ALWAYS refer to and incorporate the description comments from the\n corresponding Prisma DB schema tables and columns. The descriptions\n should match the style, level of detail, and terminology used in the\n Prisma schema.\n2. ALL descriptions MUST be organized into MULTIPLE PARAGRAPHS separated by\n line breaks. Single-paragraph descriptions should be avoided.\n3. Descriptions should comprehensively cover:\n\n - The purpose and business meaning of the type or property\n - Relationships to other entities\n - Validation rules, constraints, and edge cases\n - Usage context and examples when helpful\n4. For each property of an object type, ensure its description reflects the\n corresponding column description in the Prisma DB schema, maintaining\n the same level of detail and terminology\n5. Descriptions should be so detailed and clear that anyone reading them can\n fully understand the type or property without needing to reference any\n other documentation",
236
- type: "object",
237
- properties: {
238
- description: {
239
- description: "Description about the type.\n\nCRITICAL: This description MUST be extensively detailed and MUST\nreference and align with the description comments from the\ncorresponding Prisma DB schema tables and columns.\n\nThe description MUST be organized into MULTIPLE PARAGRAPHS (separated\nby line breaks) based on different aspects of the type:\n\n- The purpose and business meaning of the type\n- Relationships to other entities in the system\n- Validation rules, constraints, and edge cases\n- Usage context and examples when helpful\n\nThis structured approach improves readability and helps readers better\nunderstand the type's various characteristics and use cases. The\ndescription should be so comprehensive that anyone reading it can fully\nunderstand the type without needing to reference other documentation.\n\n> MUST be written in English. Never use other languages.",
240
- type: "string"
407
+ required: [
408
+ "review",
409
+ "plan",
410
+ "content"
411
+ ],
412
+ additionalProperties: false,
413
+ $defs: {
414
+ "RecordstringAutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema": {
415
+ description: "Construct a type with a set of properties K of type T",
416
+ type: "object",
417
+ properties: {},
418
+ required: [],
419
+ additionalProperties: {
420
+ $ref: "#/$defs/AutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema"
241
421
  }
242
422
  },
243
- required: [
244
- "description"
245
- ]
423
+ "AutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema": {
424
+ description: "Descriptive type schema info.\n\n`AutoBeOpenApi.IJsonSchemaDescriptive` is a type schema info of the OpenAPI\nGenerative, but it has a `description` property which is required.\n\n`AutoBeOpenApi.IJsonSchemaDescriptive` basically follows the JSON schema\nspecification of OpenAPI v3.1, but a little bit shrunk to remove ambiguous\nand duplicated expressions of OpenAPI v3.1 for the convenience, clarity,\nand AI generation.\n\nCRITICAL INSTRUCTIONS FOR OPTIMAL AI GENERATION:\n\nWhen creating descriptions for components, types, and properties:\n\n1. ALWAYS refer to and incorporate the description comments from the\n corresponding Prisma DB schema tables and columns. The descriptions\n should match the style, level of detail, and terminology used in the\n Prisma schema.\n2. ALL descriptions MUST be organized into MULTIPLE PARAGRAPHS separated by\n line breaks. Single-paragraph descriptions should be avoided.\n3. Descriptions should comprehensively cover:\n\n - The purpose and business meaning of the type or property\n - Relationships to other entities\n - Validation rules, constraints, and edge cases\n - Usage context and examples when helpful\n4. For each property of an object type, ensure its description reflects the\n corresponding column description in the Prisma DB schema, maintaining\n the same level of detail and terminology\n5. Descriptions should be so detailed and clear that anyone reading them can\n fully understand the type or property without needing to reference any\n other documentation",
425
+ type: "object",
426
+ properties: {
427
+ description: {
428
+ description: "Description about the type.\n\nCRITICAL: This description MUST be extensively detailed and MUST\nreference and align with the description comments from the\ncorresponding Prisma DB schema tables and columns.\n\nThe description MUST be organized into MULTIPLE PARAGRAPHS (separated\nby line breaks) based on different aspects of the type:\n\n- The purpose and business meaning of the type\n- Relationships to other entities in the system\n- Validation rules, constraints, and edge cases\n- Usage context and examples when helpful\n\nThis structured approach improves readability and helps readers better\nunderstand the type's various characteristics and use cases. The\ndescription should be so comprehensive that anyone reading it can fully\nunderstand the type without needing to reference other documentation.\n\n> MUST be written in English. Never use other languages.",
429
+ type: "string"
430
+ }
431
+ },
432
+ required: [
433
+ "description"
434
+ ]
435
+ }
246
436
  }
247
- }
248
- },
249
- description: "Analyzes and improves OpenAPI schema definitions.\n\nThis function receives schema definitions and performs comprehensive review\nand enhancement. It identifies issues, creates an improvement plan, and\nproduces refined schemas that meet quality standards.\n\nThe function populates three key outputs:\n\n- A detailed review of findings organized by severity\n- An actionable plan for improvements\n- Enhanced schemas with all issues resolved",
250
- validate: (() => { const _io0 = input => "string" === typeof input.review && "string" === typeof input.plan && ("object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) && _io1(input.content)); const _io1 = input => Object.keys(input).every(key => {
251
- const value = input[key];
252
- if (undefined === value)
253
- return true;
254
- return "object" === typeof value && null !== value && _io2(value);
255
- }); const _io2 = input => "string" === typeof input.description; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
256
- path: _path + ".review",
257
- expected: "string",
258
- value: input.review
259
- }), "string" === typeof input.plan || _report(_exceptionable, {
260
- path: _path + ".plan",
261
- expected: "string",
262
- value: input.plan
263
- }), ("object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) || _report(_exceptionable, {
264
- path: _path + ".content",
265
- expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>",
266
- value: input.content
267
- })) && _vo1(input.content, _path + ".content", true && _exceptionable) || _report(_exceptionable, {
268
- path: _path + ".content",
269
- expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>",
270
- value: input.content
271
- })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
437
+ },
438
+ description: "Analyzes and improves OpenAPI schema definitions.\n\nThis function receives schema definitions and performs comprehensive review\nand enhancement. It identifies issues, creates an improvement plan, and\nproduces refined schemas that meet quality standards.\n\nThe function populates three key outputs:\n\n- A detailed review of findings organized by severity\n- An actionable plan for improvements\n- Enhanced schemas with all issues resolved",
439
+ validate: (() => { const _io0 = input => "string" === typeof input.review && "string" === typeof input.plan && ("object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) && _io1(input.content)); const _io1 = input => Object.keys(input).every(key => {
272
440
  const value = input[key];
273
441
  if (undefined === value)
274
442
  return true;
275
- return ("object" === typeof value && null !== value || _report(_exceptionable, {
276
- path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
277
- expected: "AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>",
278
- value: value
279
- })) && _vo2(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || _report(_exceptionable, {
280
- path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
281
- expected: "AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>",
282
- value: value
283
- });
284
- }).every(flag => flag)].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
285
- path: _path + ".description",
286
- expected: "string",
287
- value: input.description
288
- })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
289
- if (false === __is(input)) {
290
- errors = [];
291
- _report = __typia_transform__validateReport._validateReport(errors);
292
- ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
293
- path: _path + "",
294
- expected: "IAutoBeInterfaceSchemasReviewApplication.IProps",
295
- value: input
296
- })) && _vo0(input, _path + "", true) || _report(true, {
297
- path: _path + "",
298
- expected: "IAutoBeInterfaceSchemasReviewApplication.IProps",
299
- value: input
300
- }))(input, "$input", true);
301
- const success = 0 === errors.length;
302
- return success ? {
303
- success,
304
- data: input
305
- } : {
306
- success,
307
- errors,
443
+ return "object" === typeof value && null !== value && _io2(value);
444
+ }); const _io2 = input => "string" === typeof input.description; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
445
+ path: _path + ".review",
446
+ expected: "string",
447
+ value: input.review
448
+ }), "string" === typeof input.plan || _report(_exceptionable, {
449
+ path: _path + ".plan",
450
+ expected: "string",
451
+ value: input.plan
452
+ }), ("object" === typeof input.content && null !== input.content && false === Array.isArray(input.content) || _report(_exceptionable, {
453
+ path: _path + ".content",
454
+ expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>",
455
+ value: input.content
456
+ })) && _vo1(input.content, _path + ".content", true && _exceptionable) || _report(_exceptionable, {
457
+ path: _path + ".content",
458
+ expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>",
459
+ value: input.content
460
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
461
+ const value = input[key];
462
+ if (undefined === value)
463
+ return true;
464
+ return ("object" === typeof value && null !== value || _report(_exceptionable, {
465
+ path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
466
+ expected: "AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>",
467
+ value: value
468
+ })) && _vo2(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || _report(_exceptionable, {
469
+ path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
470
+ expected: "AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>",
471
+ value: value
472
+ });
473
+ }).every(flag => flag)].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
474
+ path: _path + ".description",
475
+ expected: "string",
476
+ value: input.description
477
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
478
+ if (false === __is(input)) {
479
+ errors = [];
480
+ _report = __typia_transform__validateReport._validateReport(errors);
481
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
482
+ path: _path + "",
483
+ expected: "IAutoBeInterfaceSchemasReviewApplication.IProps",
484
+ value: input
485
+ })) && _vo0(input, _path + "", true) || _report(true, {
486
+ path: _path + "",
487
+ expected: "IAutoBeInterfaceSchemasReviewApplication.IProps",
488
+ value: input
489
+ }))(input, "$input", true);
490
+ const success = 0 === errors.length;
491
+ return success ? {
492
+ success,
493
+ data: input
494
+ } : {
495
+ success,
496
+ errors,
497
+ data: input
498
+ };
499
+ }
500
+ return {
501
+ success: true,
308
502
  data: input
309
503
  };
310
- }
311
- return {
312
- success: true,
313
- data: input
314
- };
315
- }; })()
316
- }
317
- ]
318
- };
319
- __typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
320
- validate: {
321
- review: validate,
322
- },
323
- }), { equals: false }));
324
- return application;
325
- })();
326
- const collection = {
327
- chatgpt: (validate) => (() => {
504
+ }; })()
505
+ }
506
+ ]
507
+ };
508
+ __typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
509
+ validate: {
510
+ review: validate,
511
+ },
512
+ }), { equals: false }));
513
+ return application;
514
+ })(),
515
+ claude: (validate) => (() => {
328
516
  const application = {
329
- model: "chatgpt",
517
+ model: "claude",
330
518
  options: {
331
519
  reference: true,
332
- strict: false,
333
520
  separate: null
334
521
  },
335
522
  functions: [
336
523
  {
337
524
  name: "review",
338
525
  parameters: {
339
- description: " Contains review findings, improvement plan, and enhanced\nschemas\n\n------------------------------\n\nDescription of the current {@link IAutoBeInterfaceSchemasReviewApplication.IProps} type:\n\n> Schema review and enhancement parameters for the review function.\n> \n> When the review function is called, these properties must be populated to\n> complete the schema validation and improvement process. The LLM uses this\n> interface to understand what outputs are required.\n\n### Description of {@link content} property:\n\n> Final validated and enhanced schemas ready for production use.\n> \n> CRITICAL REQUIREMENTS:\n> \n> - MUST NEVER be an empty object {}\n> - MUST contain valid OpenAPI schema definitions\n> - MUST include all entities that were in the original input\n> - If original schemas have critical issues, MUST contain fixed versions\n> - If entity names are wrong, MUST contain renamed correct versions\n> - If schemas are missing variants, MUST include the created variants\n> \n> FORBIDDEN:\n> \n> - Empty object {} will cause all schemas to be deleted\n> - Returning undefined or null\n> - Including explanations or excuses in schema descriptions\n> - Leaving broken schemas unfixed\n> \n> When original schemas are beyond repair, recreate them properly based on\n> entity names and context. This field becomes the final schemas used by\n> the system, so it must always contain complete, valid schemas.",
526
+ description: " Contains review findings, improvement plan, and enhanced\nschemas\n\n------------------------------\n\nDescription of the current {@link IAutoBeInterfaceSchemasReviewApplication.IProps} type:\n\n> Schema review and enhancement parameters for the review function.\n> \n> When the review function is called, these properties must be populated to\n> complete the schema validation and improvement process. The LLM uses this\n> interface to understand what outputs are required.",
340
527
  type: "object",
341
528
  properties: {
342
529
  review: {
343
- description: "Issues and problems found during schema analysis.\n\nIMPORTANT: Only document problems that need fixing. Do NOT include:\n\n- Positive feedback about what's already correct\n- Compliments about well-structured schemas\n- Confirmation that certain aspects meet standards\n\nFocus exclusively on issues organized by severity:\n\n- CRITICAL: Security vulnerabilities (exposed passwords, missing auth\n boundaries)\n- HIGH: Missing required variants, incorrect type mappings\n- MEDIUM: Missing format specifications, incomplete relationships\n- LOW: Documentation improvements, style consistency\n\nEach issue must include the specific schema name and what needs to be\nfixed. If there are no issues at all, simply state: \"No issues found.\"",
530
+ description: "Issues and problems found during schema analysis.\n\nDO: Document only problems that need fixing.\nDO NOT: Include positive feedback, compliments, or confirmations\n\nFocus exclusively on issues organized by severity:\n\nSeverity levels:\n- Security vulnerabilities (exposed passwords, missing auth boundaries)\n- Missing required variants, incorrect type mappings\n- Missing format specifications, incomplete relationships\n- Documentation improvements, style consistency\n\nEach issue must include the specific schema name and what needs to be\nfixed. If there are no issues at all, simply state: \"No issues found.\"",
344
531
  type: "string"
345
532
  },
346
533
  plan: {
@@ -348,6 +535,7 @@ const collection = {
348
535
  type: "string"
349
536
  },
350
537
  content: {
538
+ description: "Final validated and enhanced schemas ready for production use.\n\nDO:\n- Include valid OpenAPI schema definitions\n- Include all entities that were in the original input\n- Provide fixed versions if original schemas have issues\n- Rename entities correctly if names are wrong\n- Include created variants if schemas are missing them\n\nDO NOT:\n- Return an empty object {} (this will delete all schemas)\n- Return undefined or null\n- Include explanations or excuses in schema descriptions\n- Leave broken schemas unfixed\n\nWhen original schemas are beyond repair, recreate them properly based on\nentity names and context. This field becomes the final schemas used by\nthe system, so it must always contain complete, valid schemas.",
351
539
  $ref: "#/$defs/RecordstringAutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema"
352
540
  }
353
541
  },
@@ -459,9 +647,5 @@ const collection = {
459
647
  }), { equals: false }));
460
648
  return application;
461
649
  })(),
462
- claude,
463
- llama: claude,
464
- deepseek: claude,
465
- "3.1": claude,
466
650
  };
467
651
  //# sourceMappingURL=orchestrateInterfaceSchemasReview.js.map