@autobe/agent 0.17.1 → 0.18.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 (693) hide show
  1. package/lib/AutoBeMockAgent.d.ts +5 -5
  2. package/lib/agent/src/AutoBeAgent.d.ts +52 -0
  3. package/lib/{AutoBeAgent.js → agent/src/AutoBeAgent.js} +29 -1
  4. package/lib/agent/src/AutoBeAgent.js.map +1 -0
  5. package/lib/agent/src/AutoBeAgentBase.d.ts +18 -0
  6. package/lib/agent/src/AutoBeAgentBase.js.map +1 -0
  7. package/lib/agent/src/AutoBeMockAgent.d.ts +15 -0
  8. package/lib/{AutoBeMockAgent.js → agent/src/AutoBeMockAgent.js} +34 -4
  9. package/lib/agent/src/AutoBeMockAgent.js.map +1 -0
  10. package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +34 -0
  11. package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +1 -0
  12. package/lib/agent/src/context/AutoBeContext.d.ts +41 -0
  13. package/lib/agent/src/context/AutoBeContext.js.map +1 -0
  14. package/lib/agent/src/context/AutoBeState.d.ts +8 -0
  15. package/lib/agent/src/context/AutoBeState.js.map +1 -0
  16. package/lib/agent/src/context/AutoBeTokenUsage.d.ts +173 -0
  17. package/lib/{context → agent/src/context}/AutoBeTokenUsage.js +7 -0
  18. package/lib/agent/src/context/AutoBeTokenUsage.js.map +1 -0
  19. package/lib/agent/src/context/AutoBeTokenUsageComponent.d.ts +116 -0
  20. package/lib/{context → agent/src/context}/AutoBeTokenUsageComponent.js +19 -2
  21. package/lib/agent/src/context/AutoBeTokenUsageComponent.js.map +1 -0
  22. package/lib/agent/src/context/IAutoBeApplication.d.ts +107 -0
  23. package/lib/agent/src/context/IAutoBeApplication.js.map +1 -0
  24. package/lib/agent/src/context/IAutoBeApplicationProps.d.ts +4 -0
  25. package/lib/agent/src/context/IAutoBeApplicationProps.js.map +1 -0
  26. package/lib/agent/src/context/IAutoBeApplicationResult.d.ts +4 -0
  27. package/lib/agent/src/context/IAutoBeApplicationResult.js.map +1 -0
  28. package/lib/agent/src/context/assertSchemaModel.d.ts +2 -0
  29. package/lib/agent/src/context/assertSchemaModel.js.map +1 -0
  30. package/lib/agent/src/factory/createAgenticaHistory.d.ts +7 -0
  31. package/lib/agent/src/factory/createAgenticaHistory.js.map +1 -0
  32. package/lib/agent/src/factory/createAutoBeApplication.d.ts +7 -0
  33. package/lib/agent/src/factory/createAutoBeApplication.js.map +1 -0
  34. package/lib/agent/src/factory/createAutoBeContext.d.ts +19 -0
  35. package/lib/{factory → agent/src/factory}/createAutoBeContext.js +90 -17
  36. package/lib/agent/src/factory/createAutoBeContext.js.map +1 -0
  37. package/lib/agent/src/factory/createAutoBeState.d.ts +3 -0
  38. package/lib/agent/src/factory/createAutoBeState.js.map +1 -0
  39. package/lib/agent/src/factory/getAutoBeGenerated.d.ts +4 -0
  40. package/lib/{factory → agent/src/factory}/getAutoBeGenerated.js +3 -3
  41. package/lib/agent/src/factory/getAutoBeGenerated.js.map +1 -0
  42. package/lib/agent/src/factory/getAutoBeRealizeGenerated.d.ts +7 -0
  43. package/lib/agent/src/factory/getAutoBeRealizeGenerated.js.map +1 -0
  44. package/lib/agent/src/factory/index.d.ts +1 -0
  45. package/lib/agent/src/factory/index.js.map +1 -0
  46. package/lib/agent/src/index.d.ts +6 -0
  47. package/lib/agent/src/index.js.map +1 -0
  48. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +4 -0
  49. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js +46 -0
  50. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js.map +1 -0
  51. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +4 -0
  52. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +30 -0
  53. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -0
  54. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +4 -0
  55. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +49 -0
  56. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -0
  57. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.d.ts +5 -0
  58. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js +64 -0
  59. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js.map +1 -0
  60. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +6 -0
  61. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +265 -0
  62. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -0
  63. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.d.ts +4 -0
  64. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +727 -0
  65. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -0
  66. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +8 -0
  67. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +242 -0
  68. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -0
  69. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +105 -0
  70. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.js +3 -0
  71. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.js.map +1 -0
  72. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +78 -0
  73. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.js +3 -0
  74. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.js.map +1 -0
  75. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +70 -0
  76. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.js +3 -0
  77. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.js.map +1 -0
  78. package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.d.ts +2 -0
  79. package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.js.map +1 -0
  80. package/lib/agent/src/orchestrate/index.d.ts +5 -0
  81. package/lib/agent/src/orchestrate/index.js.map +1 -0
  82. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.d.ts +3 -0
  83. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -0
  84. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +4 -0
  85. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +34 -0
  86. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -0
  87. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.d.ts +4 -0
  88. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +62 -0
  89. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -0
  90. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +5 -0
  91. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +49 -0
  92. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -0
  93. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.d.ts +3 -0
  94. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +28 -0
  95. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -0
  96. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.d.ts +4 -0
  97. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +51 -0
  98. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -0
  99. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.d.ts +5 -0
  100. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +35 -0
  101. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -0
  102. package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.d.ts +3 -0
  103. package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js.map +1 -0
  104. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.d.ts +4 -0
  105. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +28 -0
  106. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -0
  107. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +4 -0
  108. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +53 -0
  109. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -0
  110. package/lib/agent/src/orchestrate/interface/orchestrateInterface.d.ts +5 -0
  111. package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterface.js +7 -2
  112. package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -0
  113. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +4 -0
  114. package/lib/{orchestrate/interface/orchestrateInterfaceOperations.js → agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js} +227 -562
  115. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -0
  116. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.d.ts +4 -0
  117. package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceComplement.js +20 -32
  118. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -0
  119. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +5 -0
  120. package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceEndpoints.js +40 -41
  121. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -0
  122. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.d.ts +4 -0
  123. package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceGroups.js +15 -25
  124. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -0
  125. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.d.ts +4 -0
  126. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +1768 -0
  127. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -0
  128. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +5 -0
  129. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +1317 -0
  130. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -0
  131. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.d.ts +4 -0
  132. package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceSchemas.js +59 -71
  133. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -0
  134. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +7 -0
  135. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +467 -0
  136. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -0
  137. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.d.ts +47 -0
  138. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.js +3 -0
  139. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.js.map +1 -0
  140. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +55 -0
  141. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.js.map +1 -0
  142. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.d.ts +24 -0
  143. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.js.map +1 -0
  144. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +108 -0
  145. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.js.map +1 -0
  146. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +126 -0
  147. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js.map +1 -0
  148. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +96 -0
  149. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.js +3 -0
  150. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.js.map +1 -0
  151. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +75 -0
  152. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js.map +1 -0
  153. package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +91 -0
  154. package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.js +3 -0
  155. package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.js.map +1 -0
  156. package/lib/agent/src/orchestrate/interface/utils/OpenApiEndpointComparator.d.ts +6 -0
  157. package/lib/agent/src/orchestrate/interface/utils/OpenApiEndpointComparator.js.map +1 -0
  158. package/lib/agent/src/orchestrate/internal/IProgress.d.ts +4 -0
  159. package/lib/agent/src/orchestrate/internal/IProgress.js +3 -0
  160. package/lib/agent/src/orchestrate/internal/IProgress.js.map +1 -0
  161. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.d.ts +3 -0
  162. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -0
  163. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.d.ts +3 -0
  164. package/lib/{orchestrate → agent/src/orchestrate}/prisma/histories/transformPrismaCorrectHistories.js +1 -1
  165. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -0
  166. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.d.ts +8 -0
  167. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +59 -0
  168. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -0
  169. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +3 -0
  170. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +48 -0
  171. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -0
  172. package/lib/agent/src/orchestrate/prisma/orchestratePrisma.d.ts +5 -0
  173. package/lib/{orchestrate → agent/src/orchestrate}/prisma/orchestratePrisma.js +30 -13
  174. package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +1 -0
  175. package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.d.ts +5 -0
  176. package/lib/{orchestrate → agent/src/orchestrate}/prisma/orchestratePrismaComponent.js +43 -44
  177. package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -0
  178. package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.d.ts +4 -0
  179. package/lib/{orchestrate → agent/src/orchestrate}/prisma/orchestratePrismaCorrect.js +121 -83
  180. package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -0
  181. package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.d.ts +5 -0
  182. package/lib/{orchestrate/prisma/orchestratePrismaSchemas.js → agent/src/orchestrate/prisma/orchestratePrismaReview.js} +139 -248
  183. package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js.map +1 -0
  184. package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.d.ts +5 -0
  185. package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js +1625 -0
  186. package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -0
  187. package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.d.ts +121 -0
  188. package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.js.map +1 -0
  189. package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.d.ts +142 -0
  190. package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.js.map +1 -0
  191. package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.d.ts +105 -0
  192. package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.js +3 -0
  193. package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.js.map +1 -0
  194. package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.d.ts +99 -0
  195. package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.js.map +1 -0
  196. package/lib/agent/src/orchestrate/realize/ProviderCodeComparator.d.ts +5 -0
  197. package/lib/agent/src/orchestrate/realize/ProviderCodeComparator.js.map +1 -0
  198. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.d.ts +5 -0
  199. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +40 -0
  200. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -0
  201. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.d.ts +5 -0
  202. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +80 -0
  203. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -0
  204. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.d.ts +7 -0
  205. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.js.map +1 -0
  206. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +13 -0
  207. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +32 -0
  208. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -0
  209. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +11 -0
  210. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +160 -0
  211. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -0
  212. package/lib/agent/src/orchestrate/realize/internal/compile.d.ts +7 -0
  213. package/lib/agent/src/orchestrate/realize/internal/compile.js +61 -0
  214. package/lib/agent/src/orchestrate/realize/internal/compile.js.map +1 -0
  215. package/lib/agent/src/orchestrate/realize/orchestrateRealize.d.ts +5 -0
  216. package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +113 -0
  217. package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -0
  218. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.d.ts +10 -0
  219. package/lib/{orchestrate → agent/src/orchestrate}/realize/orchestrateRealizeAuthorization.js +84 -70
  220. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -0
  221. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.d.ts +4 -0
  222. package/lib/{orchestrate → agent/src/orchestrate}/realize/orchestrateRealizeAuthorizationCorrect.js +66 -52
  223. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -0
  224. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +9 -0
  225. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +351 -0
  226. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -0
  227. package/lib/{orchestrate/realize/orchestrateRealizePlanner.d.ts → agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts} +5 -3
  228. package/lib/{orchestrate/realize/orchestrateRealizePlanner.js → agent/src/orchestrate/realize/orchestrateRealizeScenario.js} +14 -24
  229. package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -0
  230. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +9 -0
  231. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +340 -0
  232. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -0
  233. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +92 -0
  234. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js.map +1 -0
  235. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +27 -0
  236. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js.map +1 -0
  237. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +345 -0
  238. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +1 -0
  239. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +56 -0
  240. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +1 -0
  241. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +2 -0
  242. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js.map +1 -0
  243. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.d.ts +79 -0
  244. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.js +3 -0
  245. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.js.map +1 -0
  246. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +38 -0
  247. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js +3 -0
  248. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js.map +1 -0
  249. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +276 -0
  250. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.js +3 -0
  251. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.js.map +1 -0
  252. package/lib/agent/src/orchestrate/realize/utils/AuthorizationFileSystem.d.ts +5 -0
  253. package/lib/agent/src/orchestrate/realize/utils/AuthorizationFileSystem.js.map +1 -0
  254. package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.d.ts +5 -0
  255. package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.js.map +1 -0
  256. package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.d.ts +4 -0
  257. package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js.map +1 -0
  258. package/lib/agent/src/orchestrate/realize/utils/InternalFileSystem.d.ts +8 -0
  259. package/lib/agent/src/orchestrate/realize/utils/InternalFileSystem.js.map +1 -0
  260. package/lib/agent/src/orchestrate/realize/utils/ProviderFileSystem.d.ts +3 -0
  261. package/lib/agent/src/orchestrate/realize/utils/ProviderFileSystem.js.map +1 -0
  262. package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.d.ts +4 -0
  263. package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/replaceImportStatements.js +1 -0
  264. package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js.map +1 -0
  265. package/lib/agent/src/orchestrate/test/compile/completeTestCode.d.ts +2 -0
  266. package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +1 -0
  267. package/lib/agent/src/orchestrate/test/compile/filterTestFileName.d.ts +1 -0
  268. package/lib/agent/src/orchestrate/test/compile/filterTestFileName.js.map +1 -0
  269. package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.d.ts +3 -0
  270. package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -0
  271. package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +5 -0
  272. package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -0
  273. package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestCorrectHistories.d.ts +1 -1
  274. package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -0
  275. package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestHistories.d.ts +1 -1
  276. package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +1 -0
  277. package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.d.ts +3 -0
  278. package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +56 -0
  279. package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -0
  280. package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestWriteHistories.d.ts +1 -1
  281. package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +179 -0
  282. package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -0
  283. package/lib/agent/src/orchestrate/test/orchestrateTest.d.ts +5 -0
  284. package/lib/{orchestrate → agent/src/orchestrate}/test/orchestrateTest.js +4 -4
  285. package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -0
  286. package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.d.ts +5 -0
  287. package/lib/{orchestrate → agent/src/orchestrate}/test/orchestrateTestCorrect.js +27 -43
  288. package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -0
  289. package/lib/agent/src/orchestrate/test/orchestrateTestScenario.d.ts +4 -0
  290. package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +858 -0
  291. package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -0
  292. package/lib/agent/src/orchestrate/test/orchestrateTestWrite.d.ts +5 -0
  293. package/lib/{orchestrate → agent/src/orchestrate}/test/orchestrateTestWrite.js +53 -54
  294. package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -0
  295. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +121 -0
  296. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +1 -0
  297. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunction.d.ts +8 -0
  298. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunction.js.map +1 -0
  299. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +134 -0
  300. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.js.map +1 -0
  301. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.d.ts +7 -0
  302. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.js.map +1 -0
  303. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +113 -0
  304. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +1 -0
  305. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteResult.d.ts +7 -0
  306. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +1 -0
  307. package/lib/agent/src/structures/IAutoBeConfig.d.ts +73 -0
  308. package/lib/agent/src/structures/IAutoBeConfig.js.map +1 -0
  309. package/lib/agent/src/structures/IAutoBeProps.d.ts +109 -0
  310. package/lib/agent/src/structures/IAutoBeProps.js.map +1 -0
  311. package/lib/agent/src/structures/IAutoBeVendor.d.ts +87 -0
  312. package/lib/agent/src/structures/IAutoBeVendor.js.map +1 -0
  313. package/lib/agent/src/utils/arrayToRecord.d.ts +17 -0
  314. package/lib/agent/src/utils/arrayToRecord.js.map +1 -0
  315. package/lib/agent/src/utils/backoffRetry.d.ts +22 -0
  316. package/lib/agent/src/utils/backoffRetry.js.map +1 -0
  317. package/lib/agent/src/utils/divideArray.d.ts +4 -0
  318. package/lib/agent/src/utils/divideArray.js.map +1 -0
  319. package/lib/agent/src/utils/emplaceMap.d.ts +1 -0
  320. package/lib/agent/src/utils/emplaceMap.js.map +1 -0
  321. package/lib/{orchestrate/realize/RealizePipe.d.ts → agent/src/utils/pipe.d.ts} +1 -1
  322. package/lib/agent/src/utils/pipe.js.map +1 -0
  323. package/lib/constants/AutoBeSystemPromptConstant.d.ts +18 -16
  324. package/lib/context/AutoBeContext.d.ts +16 -5
  325. package/lib/index.mjs +8876 -4277
  326. package/lib/index.mjs.map +1 -1
  327. package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.d.ts +153 -0
  328. package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.js +3 -0
  329. package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.js.map +1 -0
  330. package/lib/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +4 -0
  331. package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +4 -0
  332. package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +4 -0
  333. package/lib/orchestrate/analyze/orchestrateAnalyze.d.ts +0 -1
  334. package/lib/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +6 -0
  335. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.d.ts +4 -0
  336. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -12
  337. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +105 -0
  338. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +78 -0
  339. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +70 -0
  340. package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +4 -0
  341. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +2 -1
  342. package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.d.ts +5 -0
  343. package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +4 -0
  344. package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +4 -0
  345. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +1 -1
  346. package/lib/orchestrate/interface/orchestrateInterfaceGroups.d.ts +1 -1
  347. package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +5 -0
  348. package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +7 -0
  349. package/lib/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.d.ts +47 -0
  350. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.d.ts +2 -1
  351. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +6 -2
  352. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +96 -0
  353. package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +91 -0
  354. package/lib/orchestrate/internal/IProgress.d.ts +4 -0
  355. package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.d.ts +8 -0
  356. package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +1 -1
  357. package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -1
  358. package/lib/orchestrate/prisma/orchestratePrismaReview.d.ts +5 -0
  359. package/lib/orchestrate/prisma/orchestratePrismaSchemas.d.ts +1 -1
  360. package/lib/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.d.ts +2 -1
  361. package/lib/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.d.ts +105 -0
  362. package/lib/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.d.ts +43 -153
  363. package/lib/orchestrate/realize/histories/transformRealizeAuthorization.d.ts +5 -0
  364. package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.d.ts +5 -0
  365. package/lib/orchestrate/realize/histories/transformRealizeCoderHistories.d.ts +7 -0
  366. package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +13 -0
  367. package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +11 -0
  368. package/lib/orchestrate/realize/internal/compile.d.ts +7 -0
  369. package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +9 -0
  370. package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +91 -0
  371. package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +9 -0
  372. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +10 -3
  373. package/lib/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.d.ts +79 -0
  374. package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +38 -0
  375. package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +276 -0
  376. package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +4 -0
  377. package/lib/orchestrate/test/histories/transformTestHistories.d.ts +3 -0
  378. package/lib/orchestrate/test/histories/transformTestScenarioHistories.d.ts +3 -0
  379. package/lib/orchestrate/test/histories/transformTestWriteHistories.d.ts +8 -0
  380. package/lib/orchestrate/test/orchestrateTestScenario.d.ts +2 -2
  381. package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +25 -24
  382. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -1
  383. package/package.json +9 -9
  384. package/src/AutoBeAgent.ts +37 -3
  385. package/src/AutoBeMockAgent.ts +41 -11
  386. package/src/constants/AutoBeSystemPromptConstant.ts +18 -16
  387. package/src/context/AutoBeContext.ts +30 -4
  388. package/src/context/AutoBeTokenUsage.ts +8 -0
  389. package/src/context/AutoBeTokenUsageComponent.ts +20 -2
  390. package/src/factory/createAutoBeApplication.ts +3 -11
  391. package/src/factory/createAutoBeContext.ts +64 -1
  392. package/src/factory/getAutoBeGenerated.ts +3 -3
  393. package/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.ts +53 -0
  394. package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +34 -0
  395. package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +56 -0
  396. package/src/orchestrate/analyze/orchestrateAnalyze.ts +61 -80
  397. package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +89 -0
  398. package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +123 -0
  399. package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +51 -52
  400. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +108 -0
  401. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +85 -0
  402. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.ts +71 -0
  403. package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +40 -0
  404. package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +27 -0
  405. package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +45 -22
  406. package/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.ts +43 -0
  407. package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +63 -0
  408. package/src/orchestrate/interface/orchestrateInterface.ts +10 -2
  409. package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +106 -0
  410. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +27 -44
  411. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +28 -34
  412. package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +15 -32
  413. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +207 -103
  414. package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +84 -0
  415. package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +72 -82
  416. package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +143 -0
  417. package/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.ts +49 -0
  418. package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.ts +2 -1
  419. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +6 -2
  420. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +102 -0
  421. package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +98 -0
  422. package/src/orchestrate/internal/IProgress.ts +4 -0
  423. package/src/orchestrate/prisma/histories/transformPrismaReviewHistories.ts +66 -0
  424. package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +2 -2
  425. package/src/orchestrate/prisma/orchestratePrisma.ts +44 -15
  426. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +16 -33
  427. package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +96 -58
  428. package/src/orchestrate/prisma/orchestratePrismaReview.ts +118 -0
  429. package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +133 -139
  430. package/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.ts +2 -1
  431. package/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.ts +108 -0
  432. package/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.ts +43 -156
  433. package/src/orchestrate/realize/{transformRealizeAuthorization.ts → histories/transformRealizeAuthorization.ts} +14 -10
  434. package/src/orchestrate/realize/{transformRealizeAuthorizationCorrectHistories.ts → histories/transformRealizeAuthorizationCorrectHistories.ts} +9 -7
  435. package/src/orchestrate/realize/{transformRealizeCoderHistories.ts → histories/transformRealizeCoderHistories.ts} +6 -6
  436. package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +47 -0
  437. package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +184 -0
  438. package/src/orchestrate/realize/internal/compile.ts +84 -0
  439. package/src/orchestrate/realize/orchestrateRealize.ts +100 -9
  440. package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +45 -57
  441. package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +19 -41
  442. package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +118 -0
  443. package/src/orchestrate/realize/{orchestrateRealizePlanner.ts → orchestrateRealizeScenario.ts} +15 -15
  444. package/src/orchestrate/realize/orchestrateRealizeWrite.ts +120 -0
  445. package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +11 -3
  446. package/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.ts +81 -0
  447. package/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.ts +43 -0
  448. package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +282 -0
  449. package/src/orchestrate/realize/utils/replaceImportStatements.ts +3 -1
  450. package/src/orchestrate/test/experimental/orchestrateTestCorrect.ast +5 -9
  451. package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +23 -22
  452. package/src/orchestrate/test/{transformTestCorrectHistories.ts → histories/transformTestCorrectHistories.ts} +2 -2
  453. package/src/orchestrate/test/{transformTestHistories.ts → histories/transformTestHistories.ts} +1 -1
  454. package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +70 -0
  455. package/src/orchestrate/test/{transformTestWriteHistories.ts → histories/transformTestWriteHistories.ts} +3 -3
  456. package/src/orchestrate/test/orchestrateTest.ts +5 -6
  457. package/src/orchestrate/test/orchestrateTestCorrect.ts +32 -62
  458. package/src/orchestrate/test/orchestrateTestScenario.ts +95 -158
  459. package/src/orchestrate/test/orchestrateTestWrite.ts +48 -71
  460. package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +25 -24
  461. package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +3 -1
  462. package/lib/AutoBeAgent.js.map +0 -1
  463. package/lib/AutoBeAgentBase.js.map +0 -1
  464. package/lib/AutoBeMockAgent.js.map +0 -1
  465. package/lib/constants/AutoBeSystemPromptConstant.js.map +0 -1
  466. package/lib/context/AutoBeContext.js.map +0 -1
  467. package/lib/context/AutoBeState.js.map +0 -1
  468. package/lib/context/AutoBeTokenUsage.js.map +0 -1
  469. package/lib/context/AutoBeTokenUsageComponent.js.map +0 -1
  470. package/lib/context/IAutoBeApplication.js.map +0 -1
  471. package/lib/context/IAutoBeApplicationProps.js.map +0 -1
  472. package/lib/context/IAutoBeApplicationResult.js.map +0 -1
  473. package/lib/context/assertSchemaModel.js.map +0 -1
  474. package/lib/factory/createAgenticaHistory.js.map +0 -1
  475. package/lib/factory/createAutoBeApplication.js.map +0 -1
  476. package/lib/factory/createAutoBeContext.js.map +0 -1
  477. package/lib/factory/createAutoBeState.js.map +0 -1
  478. package/lib/factory/getAutoBeGenerated.js.map +0 -1
  479. package/lib/factory/getAutoBeRealizeGenerated.js.map +0 -1
  480. package/lib/factory/index.js.map +0 -1
  481. package/lib/index.js.map +0 -1
  482. package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.d.ts +0 -45
  483. package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js +0 -27
  484. package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js.map +0 -1
  485. package/lib/orchestrate/analyze/AutoBeAnalyzePointer.d.ts +0 -9
  486. package/lib/orchestrate/analyze/AutoBeAnalyzePointer.js +0 -3
  487. package/lib/orchestrate/analyze/AutoBeAnalyzePointer.js.map +0 -1
  488. package/lib/orchestrate/analyze/orchestrateAnalyze.js +0 -98
  489. package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +0 -1
  490. package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.d.ts +0 -5
  491. package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js +0 -561
  492. package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js.map +0 -1
  493. package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.d.ts +0 -12
  494. package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js +0 -395
  495. package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js.map +0 -1
  496. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +0 -347
  497. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +0 -1
  498. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.d.ts +0 -68
  499. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.js +0 -3
  500. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.js.map +0 -1
  501. package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.d.ts +0 -5
  502. package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js +0 -27
  503. package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js.map +0 -1
  504. package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.d.ts +0 -12
  505. package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js +0 -78
  506. package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js.map +0 -1
  507. package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.d.ts +0 -16
  508. package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js +0 -79
  509. package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js.map +0 -1
  510. package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +0 -1
  511. package/lib/orchestrate/index.js.map +0 -1
  512. package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +0 -1
  513. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +0 -62
  514. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +0 -1
  515. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +0 -28
  516. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +0 -1
  517. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +0 -28
  518. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +0 -1
  519. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +0 -28
  520. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +0 -1
  521. package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js.map +0 -1
  522. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +0 -28
  523. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +0 -1
  524. package/lib/orchestrate/interface/orchestrateInterface.js.map +0 -1
  525. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +0 -1
  526. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +0 -1
  527. package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +0 -1
  528. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +0 -1
  529. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +0 -1
  530. package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.js.map +0 -1
  531. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.js.map +0 -1
  532. package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.js.map +0 -1
  533. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js.map +0 -1
  534. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js.map +0 -1
  535. package/lib/orchestrate/interface/utils/OpenApiEndpointComparator.js.map +0 -1
  536. package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +0 -1
  537. package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +0 -1
  538. package/lib/orchestrate/prisma/histories/transformPrismaHistories.d.ts +0 -3
  539. package/lib/orchestrate/prisma/histories/transformPrismaHistories.js +0 -55
  540. package/lib/orchestrate/prisma/histories/transformPrismaHistories.js.map +0 -1
  541. package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +0 -48
  542. package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +0 -1
  543. package/lib/orchestrate/prisma/orchestratePrisma.js.map +0 -1
  544. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +0 -1
  545. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +0 -1
  546. package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +0 -1
  547. package/lib/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.js.map +0 -1
  548. package/lib/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.js.map +0 -1
  549. package/lib/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.js.map +0 -1
  550. package/lib/orchestrate/realize/ProviderCodeComparator.js.map +0 -1
  551. package/lib/orchestrate/realize/RealizePipe.js +0 -14
  552. package/lib/orchestrate/realize/RealizePipe.js.map +0 -1
  553. package/lib/orchestrate/realize/orchestrateRealize.js +0 -63
  554. package/lib/orchestrate/realize/orchestrateRealize.js.map +0 -1
  555. package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +0 -1
  556. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +0 -1
  557. package/lib/orchestrate/realize/orchestrateRealizeCoder.d.ts +0 -26
  558. package/lib/orchestrate/realize/orchestrateRealizeCoder.js +0 -420
  559. package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +0 -1
  560. package/lib/orchestrate/realize/orchestrateRealizePlanner.js.map +0 -1
  561. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js.map +0 -1
  562. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js.map +0 -1
  563. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +0 -1
  564. package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +0 -1
  565. package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js.map +0 -1
  566. package/lib/orchestrate/realize/transformRealizeAuthorization.d.ts +0 -4
  567. package/lib/orchestrate/realize/transformRealizeAuthorization.js +0 -39
  568. package/lib/orchestrate/realize/transformRealizeAuthorization.js.map +0 -1
  569. package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.d.ts +0 -5
  570. package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.js +0 -80
  571. package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.js.map +0 -1
  572. package/lib/orchestrate/realize/transformRealizeCoderHistories.d.ts +0 -7
  573. package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +0 -1
  574. package/lib/orchestrate/realize/utils/AuthorizationFileSystem.js.map +0 -1
  575. package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.js.map +0 -1
  576. package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js.map +0 -1
  577. package/lib/orchestrate/realize/utils/InternalFileSystem.js.map +0 -1
  578. package/lib/orchestrate/realize/utils/ProviderFileSystem.js.map +0 -1
  579. package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +0 -1
  580. package/lib/orchestrate/realize/writeCodeUntilCompilePassed.d.ts +0 -11
  581. package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js +0 -221
  582. package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js.map +0 -1
  583. package/lib/orchestrate/test/compile/completeTestCode.js.map +0 -1
  584. package/lib/orchestrate/test/compile/filterTestFileName.js.map +0 -1
  585. package/lib/orchestrate/test/compile/getTestExternalDeclarations.js.map +0 -1
  586. package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +0 -1
  587. package/lib/orchestrate/test/orchestrateTest.js.map +0 -1
  588. package/lib/orchestrate/test/orchestrateTestCorrect.js.map +0 -1
  589. package/lib/orchestrate/test/orchestrateTestScenario.js +0 -866
  590. package/lib/orchestrate/test/orchestrateTestScenario.js.map +0 -1
  591. package/lib/orchestrate/test/orchestrateTestWrite.js.map +0 -1
  592. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +0 -1
  593. package/lib/orchestrate/test/structures/IAutoBeTestFunction.js.map +0 -1
  594. package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.js.map +0 -1
  595. package/lib/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.js.map +0 -1
  596. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +0 -1
  597. package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +0 -1
  598. package/lib/orchestrate/test/transformTestCorrectHistories.js.map +0 -1
  599. package/lib/orchestrate/test/transformTestHistories.js.map +0 -1
  600. package/lib/orchestrate/test/transformTestScenarioHistories.d.ts +0 -3
  601. package/lib/orchestrate/test/transformTestScenarioHistories.js +0 -100
  602. package/lib/orchestrate/test/transformTestScenarioHistories.js.map +0 -1
  603. package/lib/orchestrate/test/transformTestWriteHistories.js +0 -178
  604. package/lib/orchestrate/test/transformTestWriteHistories.js.map +0 -1
  605. package/lib/structures/IAutoBeConfig.js.map +0 -1
  606. package/lib/structures/IAutoBeProps.js.map +0 -1
  607. package/lib/structures/IAutoBeVendor.js.map +0 -1
  608. package/lib/utils/arrayToRecord.js.map +0 -1
  609. package/lib/utils/backoffRetry.js.map +0 -1
  610. package/lib/utils/divideArray.js.map +0 -1
  611. package/lib/utils/emplaceMap.js.map +0 -1
  612. package/lib/utils/enforceToolCall.d.ts +0 -3
  613. package/lib/utils/enforceToolCall.js +0 -13
  614. package/lib/utils/enforceToolCall.js.map +0 -1
  615. package/lib/utils/forceRetry.d.ts +0 -1
  616. package/lib/utils/forceRetry.js +0 -26
  617. package/lib/utils/forceRetry.js.map +0 -1
  618. package/lib/utils/pipe.js.map +0 -1
  619. package/src/orchestrate/analyze/AutoBeAnalyzeFileSystem.ts +0 -58
  620. package/src/orchestrate/analyze/AutoBeAnalyzePointer.ts +0 -10
  621. package/src/orchestrate/analyze/orchestrateAnalyzeComposer.ts +0 -112
  622. package/src/orchestrate/analyze/orchestrateAnalyzeReviewer.ts +0 -131
  623. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.ts +0 -75
  624. package/src/orchestrate/analyze/transformAnalyzeReviewerHistories.ts +0 -31
  625. package/src/orchestrate/analyze/transformAnalyzeWriteHistories.ts +0 -94
  626. package/src/orchestrate/analyze/writeDocumentUntilReviewPassed.ts +0 -96
  627. package/src/orchestrate/prisma/histories/transformPrismaHistories.ts +0 -59
  628. package/src/orchestrate/realize/RealizePipe.ts +0 -39
  629. package/src/orchestrate/realize/orchestrateRealizeCoder.ts +0 -182
  630. package/src/orchestrate/realize/writeCodeUntilCompilePassed.ts +0 -308
  631. package/src/orchestrate/test/transformTestScenarioHistories.ts +0 -105
  632. package/src/utils/enforceToolCall.ts +0 -13
  633. package/src/utils/forceRetry.ts +0 -13
  634. /package/lib/{AutoBeAgentBase.js → agent/src/AutoBeAgentBase.js} +0 -0
  635. /package/lib/{constants → agent/src/constants}/AutoBeSystemPromptConstant.js +0 -0
  636. /package/lib/{context → agent/src/context}/AutoBeContext.js +0 -0
  637. /package/lib/{context → agent/src/context}/AutoBeState.js +0 -0
  638. /package/lib/{context → agent/src/context}/IAutoBeApplication.js +0 -0
  639. /package/lib/{context → agent/src/context}/IAutoBeApplicationProps.js +0 -0
  640. /package/lib/{context → agent/src/context}/IAutoBeApplicationResult.js +0 -0
  641. /package/lib/{context → agent/src/context}/assertSchemaModel.js +0 -0
  642. /package/lib/{factory → agent/src/factory}/createAgenticaHistory.js +0 -0
  643. /package/lib/{factory → agent/src/factory}/createAutoBeApplication.js +0 -0
  644. /package/lib/{factory → agent/src/factory}/createAutoBeState.js +0 -0
  645. /package/lib/{factory → agent/src/factory}/getAutoBeRealizeGenerated.js +0 -0
  646. /package/lib/{factory → agent/src/factory}/index.js +0 -0
  647. /package/lib/{index.js → agent/src/index.js} +0 -0
  648. /package/lib/{orchestrate → agent/src/orchestrate}/facade/transformFacadeStateMessage.js +0 -0
  649. /package/lib/{orchestrate → agent/src/orchestrate}/index.js +0 -0
  650. /package/lib/{orchestrate → agent/src/orchestrate}/interface/histories/transformInterfaceAssetHistories.js +0 -0
  651. /package/lib/{orchestrate → agent/src/orchestrate}/interface/histories/transformInterfacePrerequisiteHistories.js +0 -0
  652. /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceComplementApplication.js +0 -0
  653. /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceEndpointApplication.js +0 -0
  654. /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceGroupApplication.js +0 -0
  655. /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceOperationApplication.js +0 -0
  656. /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceSchemaApplication.js +0 -0
  657. /package/lib/{orchestrate → agent/src/orchestrate}/interface/utils/OpenApiEndpointComparator.js +0 -0
  658. /package/lib/{orchestrate → agent/src/orchestrate}/prisma/histories/transformPrismaComponentsHistories.js +0 -0
  659. /package/lib/{orchestrate → agent/src/orchestrate}/prisma/structures/IAutoBePrismaComponentApplication.js +0 -0
  660. /package/lib/{orchestrate → agent/src/orchestrate}/prisma/structures/IAutoBePrismaCorrectApplication.js +0 -0
  661. /package/lib/{orchestrate → agent/src/orchestrate}/prisma/structures/IAutoBePrismaSchemaApplication.js +0 -0
  662. /package/lib/{orchestrate → agent/src/orchestrate}/realize/ProviderCodeComparator.js +0 -0
  663. /package/lib/{orchestrate/realize → agent/src/orchestrate/realize/histories}/transformRealizeCoderHistories.js +0 -0
  664. /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeAuthorizationApplication.js +0 -0
  665. /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js +0 -0
  666. /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeCoderApplication.js +0 -0
  667. /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeCompile.js +0 -0
  668. /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeFailedSymbol.js +0 -0
  669. /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/AuthorizationFileSystem.js +0 -0
  670. /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/AutoBeRealizeAuthorizationFileSystem.js +0 -0
  671. /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js +0 -0
  672. /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/InternalFileSystem.js +0 -0
  673. /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/ProviderFileSystem.js +0 -0
  674. /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/completeTestCode.js +0 -0
  675. /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/filterTestFileName.js +0 -0
  676. /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/getTestExternalDeclarations.js +0 -0
  677. /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/getTestScenarioArtifacts.js +0 -0
  678. /package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestCorrectHistories.js +0 -0
  679. /package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestHistories.js +0 -0
  680. /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestCorrectApplication.js +0 -0
  681. /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestFunction.js +0 -0
  682. /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestScenarioApplication.js +0 -0
  683. /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestScenarioArtifacts.js +0 -0
  684. /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestWriteApplication.js +0 -0
  685. /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestWriteResult.js +0 -0
  686. /package/lib/{structures → agent/src/structures}/IAutoBeConfig.js +0 -0
  687. /package/lib/{structures → agent/src/structures}/IAutoBeProps.js +0 -0
  688. /package/lib/{structures → agent/src/structures}/IAutoBeVendor.js +0 -0
  689. /package/lib/{utils → agent/src/utils}/arrayToRecord.js +0 -0
  690. /package/lib/{utils → agent/src/utils}/backoffRetry.js +0 -0
  691. /package/lib/{utils → agent/src/utils}/divideArray.js +0 -0
  692. /package/lib/{utils → agent/src/utils}/emplaceMap.js +0 -0
  693. /package/lib/{utils → agent/src/utils}/pipe.js +0 -0
@@ -0,0 +1,1625 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
+ return new (P || (P = Promise))(function (resolve, reject) {
38
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
42
+ });
43
+ };
44
+ var __importDefault = (this && this.__importDefault) || function (mod) {
45
+ return (mod && mod.__esModule) ? mod : { "default": mod };
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.orchestratePrismaSchemas = orchestratePrismaSchemas;
49
+ const __typia_transform__isUniqueItems = __importStar(require("typia/lib/internal/_isUniqueItems.js"));
50
+ const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
51
+ const __typia_transform__llmApplicationFinalize = __importStar(require("typia/lib/internal/_llmApplicationFinalize.js"));
52
+ const typia_1 = __importDefault(require("typia"));
53
+ const assertSchemaModel_1 = require("../../context/assertSchemaModel");
54
+ const transformPrismaSchemaHistories_1 = require("./histories/transformPrismaSchemaHistories");
55
+ function orchestratePrismaSchemas(ctx, componentList) {
56
+ return __awaiter(this, void 0, void 0, function* () {
57
+ const start = new Date();
58
+ const total = componentList
59
+ .map((c) => c.tables.length)
60
+ .reduce((x, y) => x + y, 0);
61
+ const completed = { value: 0 };
62
+ return yield Promise.all(componentList.map((component) => __awaiter(this, void 0, void 0, function* () {
63
+ const otherTables = componentList
64
+ .filter((y) => component !== y)
65
+ .map((c) => c.tables)
66
+ .flat();
67
+ const event = yield process(ctx, {
68
+ component,
69
+ otherTables,
70
+ start,
71
+ total,
72
+ completed,
73
+ });
74
+ ctx.dispatch(event);
75
+ return event;
76
+ })));
77
+ });
78
+ }
79
+ function process(ctx, props) {
80
+ return __awaiter(this, void 0, void 0, function* () {
81
+ var _a, _b, _c, _d;
82
+ const pointer = {
83
+ value: null,
84
+ };
85
+ const { tokenUsage } = yield ctx.conversate({
86
+ source: "prismaSchemas",
87
+ histories: (0, transformPrismaSchemaHistories_1.transformPrismaSchemaHistories)((_b = (_a = ctx
88
+ .state()
89
+ .analyze) === null || _a === void 0 ? void 0 : _a.files.map((file) => ({ [file.filename]: file.content })).reduce((acc, cur) => {
90
+ return Object.assign(acc, cur);
91
+ }, {})) !== null && _b !== void 0 ? _b : {}, props.component, props.otherTables),
92
+ controller: createController(ctx, {
93
+ targetComponent: props.component,
94
+ otherTables: props.otherTables,
95
+ build: (next) => {
96
+ pointer.value = next;
97
+ },
98
+ }),
99
+ enforceFunctionCall: true,
100
+ message: "Make prisma schema file please",
101
+ });
102
+ if (pointer.value === null)
103
+ throw new Error("Unreachable code: Prisma Schema not generated");
104
+ return {
105
+ type: "prismaSchemas",
106
+ created_at: props.start.toISOString(),
107
+ plan: pointer.value.plan,
108
+ models: pointer.value.models,
109
+ file: {
110
+ filename: props.component.filename,
111
+ namespace: props.component.namespace,
112
+ models: pointer.value.models,
113
+ },
114
+ tokenUsage,
115
+ completed: (props.completed.value += props.component.tables.length),
116
+ total: props.total,
117
+ step: (_d = (_c = ctx.state().analyze) === null || _c === void 0 ? void 0 : _c.step) !== null && _d !== void 0 ? _d : 0,
118
+ };
119
+ });
120
+ }
121
+ function createController(ctx, props) {
122
+ (0, assertSchemaModel_1.assertSchemaModel)(ctx.model);
123
+ const validate = (input) => {
124
+ const result = (() => { const _io0 = input => "string" === typeof input.plan && (Array.isArray(input.models) && (1 <= input.models.length && input.models.every(elem => "object" === typeof elem && null !== elem && _io1(elem)))); const _io1 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "string" === typeof input.description && "boolean" === typeof input.material && ("object" === typeof input.primaryField && null !== input.primaryField && _io2(input.primaryField)) && (Array.isArray(input.foreignFields) && input.foreignFields.every(elem => "object" === typeof elem && null !== elem && _io3(elem))) && (Array.isArray(input.plainFields) && input.plainFields.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && (Array.isArray(input.uniqueIndexes) && input.uniqueIndexes.every(elem => "object" === typeof elem && null !== elem && _io6(elem))) && (Array.isArray(input.plainIndexes) && input.plainIndexes.every(elem => "object" === typeof elem && null !== elem && _io7(elem))) && (Array.isArray(input.ginIndexes) && input.ginIndexes.every(elem => "object" === typeof elem && null !== elem && _io8(elem))); const _io2 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description; const _io3 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description && ("object" === typeof input.relation && null !== input.relation && _io4(input.relation)) && "boolean" === typeof input.unique && "boolean" === typeof input.nullable; const _io4 = input => "string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) && "string" === typeof input.targetModel; const _io5 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && ("string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type) && "string" === typeof input.description && "boolean" === typeof input.nullable; const _io6 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)) && true === input.unique; const _io7 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)); const _io8 = input => "string" === typeof input.fieldName; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.plan || _report(_exceptionable, {
125
+ path: _path + ".plan",
126
+ expected: "string",
127
+ value: input.plan
128
+ }), (Array.isArray(input.models) || _report(_exceptionable, {
129
+ path: _path + ".models",
130
+ expected: "(Array<AutoBePrisma.IModel> & MinItems<1>)",
131
+ value: input.models
132
+ })) && ((1 <= input.models.length || _report(_exceptionable, {
133
+ path: _path + ".models",
134
+ expected: "Array<> & MinItems<1>",
135
+ value: input.models
136
+ })) && input.models.map((elem, _index9) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
137
+ path: _path + ".models[" + _index9 + "]",
138
+ expected: "AutoBePrisma.IModel",
139
+ value: elem
140
+ })) && _vo1(elem, _path + ".models[" + _index9 + "]", true && _exceptionable) || _report(_exceptionable, {
141
+ path: _path + ".models[" + _index9 + "]",
142
+ expected: "AutoBePrisma.IModel",
143
+ value: elem
144
+ })).every(flag => flag)) || _report(_exceptionable, {
145
+ path: _path + ".models",
146
+ expected: "(Array<AutoBePrisma.IModel> & MinItems<1>)",
147
+ value: input.models
148
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
149
+ path: _path + ".name",
150
+ expected: "string & SnakePattern",
151
+ value: input.name
152
+ })) || _report(_exceptionable, {
153
+ path: _path + ".name",
154
+ expected: "(string & SnakePattern)",
155
+ value: input.name
156
+ }), "string" === typeof input.description || _report(_exceptionable, {
157
+ path: _path + ".description",
158
+ expected: "string",
159
+ value: input.description
160
+ }), "boolean" === typeof input.material || _report(_exceptionable, {
161
+ path: _path + ".material",
162
+ expected: "boolean",
163
+ value: input.material
164
+ }), ("object" === typeof input.primaryField && null !== input.primaryField || _report(_exceptionable, {
165
+ path: _path + ".primaryField",
166
+ expected: "AutoBePrisma.IPrimaryField",
167
+ value: input.primaryField
168
+ })) && _vo2(input.primaryField, _path + ".primaryField", true && _exceptionable) || _report(_exceptionable, {
169
+ path: _path + ".primaryField",
170
+ expected: "AutoBePrisma.IPrimaryField",
171
+ value: input.primaryField
172
+ }), (Array.isArray(input.foreignFields) || _report(_exceptionable, {
173
+ path: _path + ".foreignFields",
174
+ expected: "Array<AutoBePrisma.IForeignField>",
175
+ value: input.foreignFields
176
+ })) && input.foreignFields.map((elem, _index10) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
177
+ path: _path + ".foreignFields[" + _index10 + "]",
178
+ expected: "AutoBePrisma.IForeignField",
179
+ value: elem
180
+ })) && _vo3(elem, _path + ".foreignFields[" + _index10 + "]", true && _exceptionable) || _report(_exceptionable, {
181
+ path: _path + ".foreignFields[" + _index10 + "]",
182
+ expected: "AutoBePrisma.IForeignField",
183
+ value: elem
184
+ })).every(flag => flag) || _report(_exceptionable, {
185
+ path: _path + ".foreignFields",
186
+ expected: "Array<AutoBePrisma.IForeignField>",
187
+ value: input.foreignFields
188
+ }), (Array.isArray(input.plainFields) || _report(_exceptionable, {
189
+ path: _path + ".plainFields",
190
+ expected: "Array<AutoBePrisma.IPlainField>",
191
+ value: input.plainFields
192
+ })) && input.plainFields.map((elem, _index11) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
193
+ path: _path + ".plainFields[" + _index11 + "]",
194
+ expected: "AutoBePrisma.IPlainField",
195
+ value: elem
196
+ })) && _vo5(elem, _path + ".plainFields[" + _index11 + "]", true && _exceptionable) || _report(_exceptionable, {
197
+ path: _path + ".plainFields[" + _index11 + "]",
198
+ expected: "AutoBePrisma.IPlainField",
199
+ value: elem
200
+ })).every(flag => flag) || _report(_exceptionable, {
201
+ path: _path + ".plainFields",
202
+ expected: "Array<AutoBePrisma.IPlainField>",
203
+ value: input.plainFields
204
+ }), (Array.isArray(input.uniqueIndexes) || _report(_exceptionable, {
205
+ path: _path + ".uniqueIndexes",
206
+ expected: "Array<AutoBePrisma.IUniqueIndex>",
207
+ value: input.uniqueIndexes
208
+ })) && input.uniqueIndexes.map((elem, _index12) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
209
+ path: _path + ".uniqueIndexes[" + _index12 + "]",
210
+ expected: "AutoBePrisma.IUniqueIndex",
211
+ value: elem
212
+ })) && _vo6(elem, _path + ".uniqueIndexes[" + _index12 + "]", true && _exceptionable) || _report(_exceptionable, {
213
+ path: _path + ".uniqueIndexes[" + _index12 + "]",
214
+ expected: "AutoBePrisma.IUniqueIndex",
215
+ value: elem
216
+ })).every(flag => flag) || _report(_exceptionable, {
217
+ path: _path + ".uniqueIndexes",
218
+ expected: "Array<AutoBePrisma.IUniqueIndex>",
219
+ value: input.uniqueIndexes
220
+ }), (Array.isArray(input.plainIndexes) || _report(_exceptionable, {
221
+ path: _path + ".plainIndexes",
222
+ expected: "Array<AutoBePrisma.IPlainIndex>",
223
+ value: input.plainIndexes
224
+ })) && input.plainIndexes.map((elem, _index13) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
225
+ path: _path + ".plainIndexes[" + _index13 + "]",
226
+ expected: "AutoBePrisma.IPlainIndex",
227
+ value: elem
228
+ })) && _vo7(elem, _path + ".plainIndexes[" + _index13 + "]", true && _exceptionable) || _report(_exceptionable, {
229
+ path: _path + ".plainIndexes[" + _index13 + "]",
230
+ expected: "AutoBePrisma.IPlainIndex",
231
+ value: elem
232
+ })).every(flag => flag) || _report(_exceptionable, {
233
+ path: _path + ".plainIndexes",
234
+ expected: "Array<AutoBePrisma.IPlainIndex>",
235
+ value: input.plainIndexes
236
+ }), (Array.isArray(input.ginIndexes) || _report(_exceptionable, {
237
+ path: _path + ".ginIndexes",
238
+ expected: "Array<AutoBePrisma.IGinIndex>",
239
+ value: input.ginIndexes
240
+ })) && input.ginIndexes.map((elem, _index14) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
241
+ path: _path + ".ginIndexes[" + _index14 + "]",
242
+ expected: "AutoBePrisma.IGinIndex",
243
+ value: elem
244
+ })) && _vo8(elem, _path + ".ginIndexes[" + _index14 + "]", true && _exceptionable) || _report(_exceptionable, {
245
+ path: _path + ".ginIndexes[" + _index14 + "]",
246
+ expected: "AutoBePrisma.IGinIndex",
247
+ value: elem
248
+ })).every(flag => flag) || _report(_exceptionable, {
249
+ path: _path + ".ginIndexes",
250
+ expected: "Array<AutoBePrisma.IGinIndex>",
251
+ value: input.ginIndexes
252
+ })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
253
+ path: _path + ".name",
254
+ expected: "string & SnakePattern",
255
+ value: input.name
256
+ })) || _report(_exceptionable, {
257
+ path: _path + ".name",
258
+ expected: "(string & SnakePattern)",
259
+ value: input.name
260
+ }), "uuid" === input.type || _report(_exceptionable, {
261
+ path: _path + ".type",
262
+ expected: "\"uuid\"",
263
+ value: input.type
264
+ }), "string" === typeof input.description || _report(_exceptionable, {
265
+ path: _path + ".description",
266
+ expected: "string",
267
+ value: input.description
268
+ })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
269
+ path: _path + ".name",
270
+ expected: "string & SnakePattern",
271
+ value: input.name
272
+ })) || _report(_exceptionable, {
273
+ path: _path + ".name",
274
+ expected: "(string & SnakePattern)",
275
+ value: input.name
276
+ }), "uuid" === input.type || _report(_exceptionable, {
277
+ path: _path + ".type",
278
+ expected: "\"uuid\"",
279
+ value: input.type
280
+ }), "string" === typeof input.description || _report(_exceptionable, {
281
+ path: _path + ".description",
282
+ expected: "string",
283
+ value: input.description
284
+ }), ("object" === typeof input.relation && null !== input.relation || _report(_exceptionable, {
285
+ path: _path + ".relation",
286
+ expected: "AutoBePrisma.IRelation",
287
+ value: input.relation
288
+ })) && _vo4(input.relation, _path + ".relation", true && _exceptionable) || _report(_exceptionable, {
289
+ path: _path + ".relation",
290
+ expected: "AutoBePrisma.IRelation",
291
+ value: input.relation
292
+ }), "boolean" === typeof input.unique || _report(_exceptionable, {
293
+ path: _path + ".unique",
294
+ expected: "boolean",
295
+ value: input.unique
296
+ }), "boolean" === typeof input.nullable || _report(_exceptionable, {
297
+ path: _path + ".nullable",
298
+ expected: "boolean",
299
+ value: input.nullable
300
+ })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
301
+ path: _path + ".name",
302
+ expected: "string & CamelPattern",
303
+ value: input.name
304
+ })) || _report(_exceptionable, {
305
+ path: _path + ".name",
306
+ expected: "(string & CamelPattern)",
307
+ value: input.name
308
+ }), "string" === typeof input.targetModel || _report(_exceptionable, {
309
+ path: _path + ".targetModel",
310
+ expected: "string",
311
+ value: input.targetModel
312
+ })].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
313
+ path: _path + ".name",
314
+ expected: "string & SnakePattern",
315
+ value: input.name
316
+ })) || _report(_exceptionable, {
317
+ path: _path + ".name",
318
+ expected: "(string & SnakePattern)",
319
+ value: input.name
320
+ }), "string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type || _report(_exceptionable, {
321
+ path: _path + ".type",
322
+ expected: "(\"boolean\" | \"datetime\" | \"double\" | \"int\" | \"string\" | \"uri\" | \"uuid\")",
323
+ value: input.type
324
+ }), "string" === typeof input.description || _report(_exceptionable, {
325
+ path: _path + ".description",
326
+ expected: "string",
327
+ value: input.description
328
+ }), "boolean" === typeof input.nullable || _report(_exceptionable, {
329
+ path: _path + ".nullable",
330
+ expected: "boolean",
331
+ value: input.nullable
332
+ })].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
333
+ path: _path + ".fieldNames",
334
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
335
+ value: input.fieldNames
336
+ })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
337
+ path: _path + ".fieldNames",
338
+ expected: "Array<> & MinItems<1>",
339
+ value: input.fieldNames
340
+ })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
341
+ path: _path + ".fieldNames",
342
+ expected: "Array<> & UniqueItems<true>",
343
+ value: input.fieldNames
344
+ })) && input.fieldNames.map((elem, _index15) => "string" === typeof elem || _report(_exceptionable, {
345
+ path: _path + ".fieldNames[" + _index15 + "]",
346
+ expected: "string",
347
+ value: elem
348
+ })).every(flag => flag)) || _report(_exceptionable, {
349
+ path: _path + ".fieldNames",
350
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
351
+ value: input.fieldNames
352
+ }), true === input.unique || _report(_exceptionable, {
353
+ path: _path + ".unique",
354
+ expected: "true",
355
+ value: input.unique
356
+ })].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
357
+ path: _path + ".fieldNames",
358
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
359
+ value: input.fieldNames
360
+ })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
361
+ path: _path + ".fieldNames",
362
+ expected: "Array<> & MinItems<1>",
363
+ value: input.fieldNames
364
+ })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
365
+ path: _path + ".fieldNames",
366
+ expected: "Array<> & UniqueItems<true>",
367
+ value: input.fieldNames
368
+ })) && input.fieldNames.map((elem, _index16) => "string" === typeof elem || _report(_exceptionable, {
369
+ path: _path + ".fieldNames[" + _index16 + "]",
370
+ expected: "string",
371
+ value: elem
372
+ })).every(flag => flag)) || _report(_exceptionable, {
373
+ path: _path + ".fieldNames",
374
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
375
+ value: input.fieldNames
376
+ })].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => ["string" === typeof input.fieldName || _report(_exceptionable, {
377
+ path: _path + ".fieldName",
378
+ expected: "string",
379
+ value: input.fieldName
380
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
381
+ if (false === __is(input)) {
382
+ errors = [];
383
+ _report = __typia_transform__validateReport._validateReport(errors);
384
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
385
+ path: _path + "",
386
+ expected: "IAutoBePrismaSchemaApplication.IProps",
387
+ value: input
388
+ })) && _vo0(input, _path + "", true) || _report(true, {
389
+ path: _path + "",
390
+ expected: "IAutoBePrismaSchemaApplication.IProps",
391
+ value: input
392
+ }))(input, "$input", true);
393
+ const success = 0 === errors.length;
394
+ return success ? {
395
+ success,
396
+ data: input
397
+ } : {
398
+ success,
399
+ errors,
400
+ data: input
401
+ };
402
+ }
403
+ return {
404
+ success: true,
405
+ data: input
406
+ };
407
+ }; })()(input);
408
+ if (result.success === false)
409
+ return result;
410
+ const actual = result.data.models;
411
+ const expected = props.targetComponent.tables;
412
+ const missed = expected.filter((x) => actual.some((a) => a.name === x) === false);
413
+ if (missed.length === 0)
414
+ return result;
415
+ ctx.dispatch({
416
+ type: "prismaInsufficient",
417
+ created_at: new Date().toISOString(),
418
+ component: props.targetComponent,
419
+ actual,
420
+ missed,
421
+ });
422
+ return {
423
+ success: false,
424
+ data: result.data,
425
+ errors: [
426
+ {
427
+ path: "$input.models",
428
+ value: result.data.models,
429
+ expected: `Array<AutoBePrisma.IModel>`,
430
+ description: [
431
+ "You missed some tables from the current domain's component.",
432
+ "",
433
+ "Look at the following details to fix the schemas. Never forget to",
434
+ "compose the `missed` tables at the next function calling.",
435
+ "",
436
+ "- filename: current domain's filename",
437
+ "- namespace: current domain's namespace",
438
+ "- expected: expected tables in the current domain",
439
+ "- actual: actual tables you made",
440
+ "- missed: tables you have missed, and you have to compose again",
441
+ "",
442
+ JSON.stringify({
443
+ filename: props.targetComponent.filename,
444
+ namespace: props.targetComponent.namespace,
445
+ expected,
446
+ actual,
447
+ missed,
448
+ }),
449
+ ].join("\n"),
450
+ },
451
+ ],
452
+ };
453
+ };
454
+ const application = collection[ctx.model === "chatgpt" ? "chatgpt" : "claude"](validate);
455
+ return {
456
+ protocol: "class",
457
+ name: "Prisma Generator",
458
+ application,
459
+ execute: {
460
+ makePrismaSchemaFile: (next) => {
461
+ props.build(next);
462
+ },
463
+ },
464
+ };
465
+ }
466
+ const collection = {
467
+ chatgpt: (validate) => (() => {
468
+ const application = {
469
+ model: "chatgpt",
470
+ options: {
471
+ reference: true,
472
+ strict: false,
473
+ separate: null
474
+ },
475
+ functions: [
476
+ {
477
+ name: "makePrismaSchemaFile",
478
+ parameters: {
479
+ description: " Properties containing the file\n\n------------------------------\n\nCurrent Type: {@link IAutoBePrismaSchemaApplication.IProps}",
480
+ type: "object",
481
+ properties: {
482
+ plan: {
483
+ description: "Strategic database design analysis and planning.\n\nAI analyzes the target component and business requirements to formulate a\ncomprehensive database design strategy. This planning phase is crucial\nfor creating well-structured, normalized schemas that align with business\nobjectives. The AI must define table structures, relationships, indexing\nstrategies, and data integrity constraints before proceeding to schema\nimplementation.\n\n**Key Considerations:**\n\n- **Assignment Validation**: Extract targetComponent.tables as the complete\n specification\n- **Table Count**: Must create exactly targetComponent.tables.length models\n- **Other Components**: Identify already-created tables for foreign key\n references only\n- **Normalization**: Strict adherence to 1NF, 2NF, 3NF principles\n- **Snapshot Architecture**: Design for historical data preservation and\n audit trails\n- **Junction Tables**: Plan M:N relationships with proper naming\n ({table1}_{table2})\n- **Materialized Views**: Identify needs for mv_ prefixed denormalized\n tables\n\nWorkflow: Component analysis \u2192 Strategic planning \u2192 Design rationale",
484
+ type: "string"
485
+ },
486
+ models: {
487
+ description: "Production-ready Prisma schema models generated based on the strategic\nplan.\n\nContains a structured Abstract Syntax Tree (AST) representation of all\ndatabase tables for the target component. Each model implements the\nplanned table structure, relationships, indexes, and constraints using\nthe AutoBePrisma.IModel interface. These models are designed to be\nproduction-ready from the initial generation, following all best\npractices and normalization principles.\n\n**Implementation Requirements:**\n\n- **Model Count**: Exactly matches targetComponent.tables.length (plus any\n junction tables)\n- **Table Names**: EXACT names from targetComponent.tables - no\n modifications allowed\n- **Primary Keys**: Always UUID type with field name \"id\"\n- **Foreign Keys**: Proper IRelation configurations for all relationships\n- **Business Fields**: Only raw data fields - no calculated or derived\n values\n- **Data Types**: Limited to: uuid, string, int, double, datetime, boolean,\n uri\n- **Relationships**: Correct patterns for 1:1, 1:N, and M:N relationships\n- **Indexes**:\n\n - UniqueIndexes: Business constraints and composite unique keys\n - PlainIndexes: Multi-column query optimization (never single FK indexes)\n - GinIndexes: Full-text search on appropriate string fields\n- **Materialized Views**: Tables prefixed with \"mv_\" have material flag set\n to true\n- **Documentation**: Comprehensive English descriptions with business\n context\n\n**Quality Standards:**\n\n- **Normalization**: Strict adherence to 3NF (Third Normal Form)\n- **No Denormalization**: Except in materialized views (mv_ tables)\n- **Referential Integrity**: All foreign keys reference valid existing\n tables\n- **Temporal Fields**: Consistent created_at, updated_at, deleted_at\n patterns\n- **Snapshot Support**: Proper historical data preservation where needed\n- **Performance Ready**: Optimized index strategy for expected query\n patterns\n\nThe generated models will undergo review by a separate specialized agent\nto ensure compliance with all requirements and best practices.\n\n\n@minItems 1",
488
+ type: "array",
489
+ items: {
490
+ $ref: "#/$defs/AutoBePrisma.IModel"
491
+ }
492
+ }
493
+ },
494
+ required: [
495
+ "plan",
496
+ "models"
497
+ ],
498
+ additionalProperties: false,
499
+ $defs: {
500
+ "AutoBePrisma.IModel": {
501
+ description: "Interface representing a single Prisma model (database table).\n\nBased on the uploaded schemas, models follow specific patterns:\n\n- Main business entities (e.g., shopping_sales, shopping_customers)\n- Snapshot/versioning entities for audit trails (e.g.,\n shopping_sale_snapshots)\n- Junction tables for M:N relationships (e.g.,\n shopping_cart_commodity_stocks)\n- Materialized views for performance (prefixed with mv_)\n\n### Description of {@link primaryField} property:\n\n> The primary key field of the model.\n> \n> In all uploaded schemas, primary keys are always UUID type with \"@\\id\"\n> directive. Usually named \"id\" and marked with \"@\\db.Uuid\" for PostgreSQL\n> mapping.",
502
+ type: "object",
503
+ properties: {
504
+ name: {
505
+ description: "Name of the Prisma model (database table name).\n\nMUST use snake_case naming convention. Examples: \"shopping_customers\",\n\"shopping_sale_snapshots\", \"bbs_articles\" Materialized views use \"mv_\"\nprefix: \"mv_shopping_sale_last_snapshots\"\n\n\n@pattern ^[a-z][a-z0-9_]*$",
506
+ type: "string"
507
+ },
508
+ description: {
509
+ description: "Detailed description explaining the business purpose and usage of the\nmodel.\n\nShould include:\n\n- Business context and purpose\n- Key relationships with other models\n- Important behavioral notes or constraints\n- References to related entities using \"{@\\link ModelName}\" syntax\n\n**IMPORTANT**: Description must be written in English. Example: \"Customer\ninformation, but not a person but a **connection** basis...\"",
510
+ type: "string"
511
+ },
512
+ material: {
513
+ description: "Indicates whether this model represents a materialized view for\nperformance optimization.\n\nMaterialized views are read-only computed tables that cache complex query\nresults. They're marked as \"@\\hidden\" in documentation and prefixed with\n\"mv_\" in naming. Examples: mv_shopping_sale_last_snapshots,\nmv_shopping_cart_commodity_prices",
514
+ type: "boolean"
515
+ },
516
+ primaryField: {
517
+ $ref: "#/$defs/AutoBePrisma.IPrimaryField"
518
+ },
519
+ foreignFields: {
520
+ description: "Array of foreign key fields that reference other models.\n\nThese establish relationships between models and include Prisma relation\ndirectives. Can be nullable (optional relationships) or required\n(mandatory relationships). May have unique constraints for 1:1\nrelationships.",
521
+ type: "array",
522
+ items: {
523
+ $ref: "#/$defs/AutoBePrisma.IForeignField"
524
+ }
525
+ },
526
+ plainFields: {
527
+ description: "Array of regular data fields that don't reference other models.\n\nInclude business data like names, descriptions, timestamps, flags,\namounts, etc. Common patterns: created_at, updated_at, deleted_at for\nsoft deletion and auditing.",
528
+ type: "array",
529
+ items: {
530
+ $ref: "#/$defs/AutoBePrisma.IPlainField"
531
+ }
532
+ },
533
+ uniqueIndexes: {
534
+ description: "Array of unique indexes for enforcing data integrity constraints.\n\nEnsure uniqueness across single or multiple columns. Examples: unique\nemail addresses, unique codes within a channel, unique combinations like\n(channel_id, nickname).",
535
+ type: "array",
536
+ items: {
537
+ $ref: "#/$defs/AutoBePrisma.IUniqueIndex"
538
+ }
539
+ },
540
+ plainIndexes: {
541
+ description: "Array of regular indexes for query performance optimization.\n\nSpeed up common query patterns like filtering by foreign keys, date\nranges, or frequently searched fields. Examples: indexes on created_at,\nforeign key fields, search fields.",
542
+ type: "array",
543
+ items: {
544
+ $ref: "#/$defs/AutoBePrisma.IPlainIndex"
545
+ }
546
+ },
547
+ ginIndexes: {
548
+ description: "Array of GIN (Generalized Inverted Index) indexes for full-text search.\n\nUsed specifically for PostgreSQL text search capabilities using trigram\noperations. Applied to text fields that need fuzzy matching or partial\ntext search. Examples: searching names, nicknames, titles, content\nbodies.",
549
+ type: "array",
550
+ items: {
551
+ $ref: "#/$defs/AutoBePrisma.IGinIndex"
552
+ }
553
+ }
554
+ },
555
+ required: [
556
+ "name",
557
+ "description",
558
+ "material",
559
+ "primaryField",
560
+ "foreignFields",
561
+ "plainFields",
562
+ "uniqueIndexes",
563
+ "plainIndexes",
564
+ "ginIndexes"
565
+ ]
566
+ },
567
+ "AutoBePrisma.IPrimaryField": {
568
+ description: "Interface representing the primary key field of a Prisma model.\n\nAll models in the uploaded schemas use UUID as primary key for better\ndistributed system compatibility and security (no sequential ID exposure).",
569
+ type: "object",
570
+ properties: {
571
+ name: {
572
+ description: "Name of the primary key field.\n\nMUST use snake_case naming convention. Consistently named \"id\" across all\nmodels in the uploaded schemas. Represents the unique identifier for each\nrecord in the table.\n\n\n@pattern ^[a-z][a-z0-9_]*$",
573
+ type: "string"
574
+ },
575
+ type: {
576
+ description: "Data type of the primary key field.\n\nAlways \"uuid\" in the uploaded schemas for better distributed system\nsupport and to avoid exposing sequential IDs that could reveal business\ninformation.",
577
+ type: "string",
578
+ "enum": [
579
+ "uuid"
580
+ ]
581
+ },
582
+ description: {
583
+ description: "Description of the primary key field's purpose.\n\nStandard description is \"Primary Key.\" across all models. Serves as the\nunique identifier for the model instance.\n\n**IMPORTANT**: Description must be written in English.",
584
+ type: "string"
585
+ }
586
+ },
587
+ required: [
588
+ "name",
589
+ "type",
590
+ "description"
591
+ ]
592
+ },
593
+ "AutoBePrisma.IForeignField": {
594
+ description: "Interface representing a foreign key field that establishes relationships\nbetween models.\n\nForeign keys create associations between models, enabling relational data\nmodeling. They can represent 1:1, 1:N, or participate in M:N relationships\nthrough junction tables.\n\n### Description of {@link relation} property:\n\n> Prisma relation configuration defining the association details.\n> \n> Specifies how this foreign key connects to the target model, including\n> relation name, target model, and target field. This configuration is used\n> to generate the appropriate Prisma relation directive in the schema.",
595
+ type: "object",
596
+ properties: {
597
+ name: {
598
+ description: "Name of the foreign key field.\n\nMUST use snake_case naming convention. Follows convention:\n\"{target_model_name_without_prefix}_id\" Examples: \"shopping_customer_id\",\n\"bbs_article_id\", \"attachment_file_id\" For self-references: \"parent_id\"\n(e.g., in hierarchical structures)\n\n\n@pattern ^[a-z][a-z0-9_]*$",
599
+ type: "string"
600
+ },
601
+ type: {
602
+ description: "Data type of the foreign key field.\n\nAlways \"uuid\" to match the primary key type of referenced models. Ensures\nreferential integrity and consistency across the schema.",
603
+ type: "string",
604
+ "enum": [
605
+ "uuid"
606
+ ]
607
+ },
608
+ description: {
609
+ description: "Description explaining the purpose and target of this foreign key\nrelationship.\n\nShould reference the target model using format: \"Target model's {@\\link\nModelName.id}\" Examples: \"Belonged customer's {@\\link\nshopping_customers.id}\" May include additional context about the\nrelationship's business meaning.\n\n**IMPORTANT**: Description must be written in English.",
610
+ type: "string"
611
+ },
612
+ relation: {
613
+ $ref: "#/$defs/AutoBePrisma.IRelation"
614
+ },
615
+ unique: {
616
+ description: "Whether this foreign key has a unique constraint.\n\nTrue: Creates a 1:1 relationship (e.g., user profile, order publish\ndetails) false: Allows 1:N relationship (e.g., customer to multiple\norders) Used for enforcing business rules about relationship\ncardinality.",
617
+ type: "boolean"
618
+ },
619
+ nullable: {
620
+ description: "Whether this foreign key can be null (optional relationship).\n\nTrue: Relationship is optional, foreign key can be null false:\nRelationship is required, foreign key cannot be null Reflects business\nrules about mandatory vs optional associations.",
621
+ type: "boolean"
622
+ }
623
+ },
624
+ required: [
625
+ "name",
626
+ "type",
627
+ "description",
628
+ "relation",
629
+ "unique",
630
+ "nullable"
631
+ ]
632
+ },
633
+ "AutoBePrisma.IRelation": {
634
+ description: "Interface representing a Prisma relation configuration between models.\n\nThis interface defines how foreign key fields establish relationships with\ntheir target models. It provides the necessary information for Prisma to\ngenerate appropriate relation directives (@relation) in the schema,\nenabling proper relational data modeling and ORM functionality.\n\nThe relation configuration is essential for:\n\n- Generating correct Prisma relation syntax\n- Establishing bidirectional relationships between models\n- Enabling proper type-safe querying through Prisma client\n- Supporting complex relationship patterns (1:1, 1:N, M:N)",
635
+ type: "object",
636
+ properties: {
637
+ name: {
638
+ description: "Name of the relation property in the Prisma model.\n\nThis becomes the property name used to access the related model instance\nthrough the Prisma client. Should be descriptive and reflect the business\nrelationship being modeled.\n\nExamples:\n\n- \"customer\" for shopping_customer_id field\n- \"channel\" for shopping_channel_id field\n- \"parent\" for parent_id field in hierarchical structures\n- \"snapshot\" for versioning relationships\n- \"article\" for bbs_article_id field\n\nNaming convention: camelCase, descriptive of the relationship's business\nmeaning\n\n\n@pattern ^[a-z][a-zA-Z0-9]*$",
639
+ type: "string"
640
+ },
641
+ targetModel: {
642
+ description: "Name of the target model being referenced by this relation.\n\nMust exactly match an existing model name in the schema. This is used by\nPrisma to establish the foreign key constraint and generate the\nappropriate relation mapping.\n\nExamples:\n\n- \"shopping_customers\" for customer relationships\n- \"shopping_channels\" for channel relationships\n- \"bbs_articles\" for article relationships\n- \"attachment_files\" for file attachments\n\nThe target model should exist in the same schema or be accessible through\nthe Prisma schema configuration.",
643
+ type: "string"
644
+ }
645
+ },
646
+ required: [
647
+ "name",
648
+ "targetModel"
649
+ ]
650
+ },
651
+ "AutoBePrisma.IPlainField": {
652
+ description: "Interface representing a regular data field that stores business\ninformation.\n\nThese fields contain the actual business data like names, amounts,\ntimestamps, flags, descriptions, and other domain-specific information.",
653
+ type: "object",
654
+ properties: {
655
+ name: {
656
+ description: "Name of the field in the database table.\n\nMUST use snake_case naming convention. Common patterns from uploaded\nschemas:\n\n- Timestamps: created_at, updated_at, deleted_at, opened_at, closed_at\n- Identifiers: code, name, nickname, title\n- Business data: value, quantity, price, volume, balance\n- Flags: primary, required, exclusive, secret, multiplicative\n\n\n@pattern ^[a-z][a-z0-9_]*$",
657
+ type: "string"
658
+ },
659
+ type: {
660
+ description: "Data type of the field for Prisma schema generation.\n\nMaps to appropriate Prisma/PostgreSQL types:\n\n- Boolean: Boolean flags and yes/no values\n- Int: Integer numbers, quantities, sequences\n- Double: Decimal numbers, prices, monetary values, percentages\n- String: Text data, names, descriptions, codes\n- Uri: URL/URI fields for links and references\n- Uuid: UUID fields (for non-foreign-key UUIDs)\n- Datetime: Timestamp fields with date and time",
661
+ type: "string",
662
+ "enum": [
663
+ "string",
664
+ "boolean",
665
+ "uuid",
666
+ "uri",
667
+ "int",
668
+ "double",
669
+ "datetime"
670
+ ]
671
+ },
672
+ description: {
673
+ description: "Description explaining the business purpose and usage of this field.\n\nShould clearly explain:\n\n- What business concept this field represents\n- Valid values or constraints if applicable\n- How it relates to business processes\n- Any special behavioral notes\n\n**IMPORTANT**: Description must be written in English. Example: \"Amount\nof cash payment.\" or \"Whether the unit is required or not.\"",
674
+ type: "string"
675
+ },
676
+ nullable: {
677
+ description: "Whether this field can contain null values.\n\nTrue: Field is optional and can be null (e.g., middle name, description)\nfalse: Field is required and cannot be null (e.g., creation timestamp,\nname) Reflects business rules about mandatory vs optional data.",
678
+ type: "boolean"
679
+ }
680
+ },
681
+ required: [
682
+ "name",
683
+ "type",
684
+ "description",
685
+ "nullable"
686
+ ]
687
+ },
688
+ "AutoBePrisma.IUniqueIndex": {
689
+ description: "Interface representing a unique index constraint on one or more fields.\n\nUnique indexes enforce data integrity by ensuring no duplicate values exist\nfor the specified field combination. Essential for business rules that\nrequire uniqueness like email addresses, codes, or composite keys.",
690
+ type: "object",
691
+ properties: {
692
+ fieldNames: {
693
+ description: "Array of field names that together form the unique constraint.\n\nCan be single field (e.g., [\"email\"]) or composite (e.g., [\"channel_id\",\n\"code\"]). All field names must exist in the model. Order matters for\ncomposite indexes. Examples: [\"code\"], [\"shopping_channel_id\",\n\"nickname\"], [\"email\"]\n\n\n@minItems 1\n@uniqueItems",
694
+ type: "array",
695
+ items: {
696
+ type: "string"
697
+ }
698
+ },
699
+ unique: {
700
+ description: "Explicit marker indicating this is a unique index.\n\nAlways true to distinguish from regular indexes. Used by code generator\nto emit \"@@unique\" directive in Prisma schema instead of \"@@index\".",
701
+ type: "boolean",
702
+ "enum": [
703
+ true
704
+ ]
705
+ }
706
+ },
707
+ required: [
708
+ "fieldNames",
709
+ "unique"
710
+ ]
711
+ },
712
+ "AutoBePrisma.IPlainIndex": {
713
+ description: "Interface representing a regular (non-unique) index for query performance.\n\nRegular indexes speed up database queries by creating optimized data\nstructures for common search patterns. Essential for foreign keys, date\nranges, and frequently filtered fields.",
714
+ type: "object",
715
+ properties: {
716
+ fieldNames: {
717
+ description: "Array of field names to include in the performance index.\n\nCan be single field (e.g., [\"created_at\"]) or composite (e.g.,\n[\"customer_id\", \"created_at\"]). All field names must exist in the model.\nOrder matters for composite indexes and should match common query\npatterns. Examples: [\"created_at\"], [\"shopping_customer_id\",\n\"created_at\"], [\"ip\"]\n\n\n@minItems 1\n@uniqueItems",
718
+ type: "array",
719
+ items: {
720
+ type: "string"
721
+ }
722
+ }
723
+ },
724
+ required: [
725
+ "fieldNames"
726
+ ]
727
+ },
728
+ "AutoBePrisma.IGinIndex": {
729
+ description: "Interface representing a GIN (Generalized Inverted Index) for full-text\nsearch.\n\nGIN indexes enable advanced PostgreSQL text search capabilities including\nfuzzy matching and partial text search using trigram operations. Essential\nfor user-facing search features on text content.",
730
+ type: "object",
731
+ properties: {
732
+ fieldName: {
733
+ description: "Name of the text field to index for full-text search capabilities.\n\nMust be a string field in the model that contains searchable text.\nExamples from uploaded schemas: \"nickname\", \"title\", \"body\", \"name\" Used\nwith PostgreSQL gin_trgm_ops for trigram-based fuzzy text search.",
734
+ type: "string"
735
+ }
736
+ },
737
+ required: [
738
+ "fieldName"
739
+ ]
740
+ }
741
+ }
742
+ },
743
+ description: "Generates comprehensive Prisma schema files based on detailed requirements\nanalysis.\n\nCreates multiple organized schema files following enterprise patterns\nincluding proper domain separation, relationship modeling, snapshot\npatterns, inheritance, materialized views, and comprehensive documentation.\nThe generated schemas implement best practices for scalability,\nmaintainability, and data integrity.",
744
+ validate: (() => { const _io0 = input => "string" === typeof input.plan && (Array.isArray(input.models) && (1 <= input.models.length && input.models.every(elem => "object" === typeof elem && null !== elem && _io1(elem)))); const _io1 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "string" === typeof input.description && "boolean" === typeof input.material && ("object" === typeof input.primaryField && null !== input.primaryField && _io2(input.primaryField)) && (Array.isArray(input.foreignFields) && input.foreignFields.every(elem => "object" === typeof elem && null !== elem && _io3(elem))) && (Array.isArray(input.plainFields) && input.plainFields.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && (Array.isArray(input.uniqueIndexes) && input.uniqueIndexes.every(elem => "object" === typeof elem && null !== elem && _io6(elem))) && (Array.isArray(input.plainIndexes) && input.plainIndexes.every(elem => "object" === typeof elem && null !== elem && _io7(elem))) && (Array.isArray(input.ginIndexes) && input.ginIndexes.every(elem => "object" === typeof elem && null !== elem && _io8(elem))); const _io2 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description; const _io3 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description && ("object" === typeof input.relation && null !== input.relation && _io4(input.relation)) && "boolean" === typeof input.unique && "boolean" === typeof input.nullable; const _io4 = input => "string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) && "string" === typeof input.targetModel; const _io5 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && ("string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type) && "string" === typeof input.description && "boolean" === typeof input.nullable; const _io6 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)) && true === input.unique; const _io7 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)); const _io8 = input => "string" === typeof input.fieldName; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.plan || _report(_exceptionable, {
745
+ path: _path + ".plan",
746
+ expected: "string",
747
+ value: input.plan
748
+ }), (Array.isArray(input.models) || _report(_exceptionable, {
749
+ path: _path + ".models",
750
+ expected: "(Array<AutoBePrisma.IModel> & MinItems<1>)",
751
+ value: input.models
752
+ })) && ((1 <= input.models.length || _report(_exceptionable, {
753
+ path: _path + ".models",
754
+ expected: "Array<> & MinItems<1>",
755
+ value: input.models
756
+ })) && input.models.map((elem, _index9) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
757
+ path: _path + ".models[" + _index9 + "]",
758
+ expected: "AutoBePrisma.IModel",
759
+ value: elem
760
+ })) && _vo1(elem, _path + ".models[" + _index9 + "]", true && _exceptionable) || _report(_exceptionable, {
761
+ path: _path + ".models[" + _index9 + "]",
762
+ expected: "AutoBePrisma.IModel",
763
+ value: elem
764
+ })).every(flag => flag)) || _report(_exceptionable, {
765
+ path: _path + ".models",
766
+ expected: "(Array<AutoBePrisma.IModel> & MinItems<1>)",
767
+ value: input.models
768
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
769
+ path: _path + ".name",
770
+ expected: "string & SnakePattern",
771
+ value: input.name
772
+ })) || _report(_exceptionable, {
773
+ path: _path + ".name",
774
+ expected: "(string & SnakePattern)",
775
+ value: input.name
776
+ }), "string" === typeof input.description || _report(_exceptionable, {
777
+ path: _path + ".description",
778
+ expected: "string",
779
+ value: input.description
780
+ }), "boolean" === typeof input.material || _report(_exceptionable, {
781
+ path: _path + ".material",
782
+ expected: "boolean",
783
+ value: input.material
784
+ }), ("object" === typeof input.primaryField && null !== input.primaryField || _report(_exceptionable, {
785
+ path: _path + ".primaryField",
786
+ expected: "AutoBePrisma.IPrimaryField",
787
+ value: input.primaryField
788
+ })) && _vo2(input.primaryField, _path + ".primaryField", true && _exceptionable) || _report(_exceptionable, {
789
+ path: _path + ".primaryField",
790
+ expected: "AutoBePrisma.IPrimaryField",
791
+ value: input.primaryField
792
+ }), (Array.isArray(input.foreignFields) || _report(_exceptionable, {
793
+ path: _path + ".foreignFields",
794
+ expected: "Array<AutoBePrisma.IForeignField>",
795
+ value: input.foreignFields
796
+ })) && input.foreignFields.map((elem, _index10) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
797
+ path: _path + ".foreignFields[" + _index10 + "]",
798
+ expected: "AutoBePrisma.IForeignField",
799
+ value: elem
800
+ })) && _vo3(elem, _path + ".foreignFields[" + _index10 + "]", true && _exceptionable) || _report(_exceptionable, {
801
+ path: _path + ".foreignFields[" + _index10 + "]",
802
+ expected: "AutoBePrisma.IForeignField",
803
+ value: elem
804
+ })).every(flag => flag) || _report(_exceptionable, {
805
+ path: _path + ".foreignFields",
806
+ expected: "Array<AutoBePrisma.IForeignField>",
807
+ value: input.foreignFields
808
+ }), (Array.isArray(input.plainFields) || _report(_exceptionable, {
809
+ path: _path + ".plainFields",
810
+ expected: "Array<AutoBePrisma.IPlainField>",
811
+ value: input.plainFields
812
+ })) && input.plainFields.map((elem, _index11) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
813
+ path: _path + ".plainFields[" + _index11 + "]",
814
+ expected: "AutoBePrisma.IPlainField",
815
+ value: elem
816
+ })) && _vo5(elem, _path + ".plainFields[" + _index11 + "]", true && _exceptionable) || _report(_exceptionable, {
817
+ path: _path + ".plainFields[" + _index11 + "]",
818
+ expected: "AutoBePrisma.IPlainField",
819
+ value: elem
820
+ })).every(flag => flag) || _report(_exceptionable, {
821
+ path: _path + ".plainFields",
822
+ expected: "Array<AutoBePrisma.IPlainField>",
823
+ value: input.plainFields
824
+ }), (Array.isArray(input.uniqueIndexes) || _report(_exceptionable, {
825
+ path: _path + ".uniqueIndexes",
826
+ expected: "Array<AutoBePrisma.IUniqueIndex>",
827
+ value: input.uniqueIndexes
828
+ })) && input.uniqueIndexes.map((elem, _index12) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
829
+ path: _path + ".uniqueIndexes[" + _index12 + "]",
830
+ expected: "AutoBePrisma.IUniqueIndex",
831
+ value: elem
832
+ })) && _vo6(elem, _path + ".uniqueIndexes[" + _index12 + "]", true && _exceptionable) || _report(_exceptionable, {
833
+ path: _path + ".uniqueIndexes[" + _index12 + "]",
834
+ expected: "AutoBePrisma.IUniqueIndex",
835
+ value: elem
836
+ })).every(flag => flag) || _report(_exceptionable, {
837
+ path: _path + ".uniqueIndexes",
838
+ expected: "Array<AutoBePrisma.IUniqueIndex>",
839
+ value: input.uniqueIndexes
840
+ }), (Array.isArray(input.plainIndexes) || _report(_exceptionable, {
841
+ path: _path + ".plainIndexes",
842
+ expected: "Array<AutoBePrisma.IPlainIndex>",
843
+ value: input.plainIndexes
844
+ })) && input.plainIndexes.map((elem, _index13) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
845
+ path: _path + ".plainIndexes[" + _index13 + "]",
846
+ expected: "AutoBePrisma.IPlainIndex",
847
+ value: elem
848
+ })) && _vo7(elem, _path + ".plainIndexes[" + _index13 + "]", true && _exceptionable) || _report(_exceptionable, {
849
+ path: _path + ".plainIndexes[" + _index13 + "]",
850
+ expected: "AutoBePrisma.IPlainIndex",
851
+ value: elem
852
+ })).every(flag => flag) || _report(_exceptionable, {
853
+ path: _path + ".plainIndexes",
854
+ expected: "Array<AutoBePrisma.IPlainIndex>",
855
+ value: input.plainIndexes
856
+ }), (Array.isArray(input.ginIndexes) || _report(_exceptionable, {
857
+ path: _path + ".ginIndexes",
858
+ expected: "Array<AutoBePrisma.IGinIndex>",
859
+ value: input.ginIndexes
860
+ })) && input.ginIndexes.map((elem, _index14) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
861
+ path: _path + ".ginIndexes[" + _index14 + "]",
862
+ expected: "AutoBePrisma.IGinIndex",
863
+ value: elem
864
+ })) && _vo8(elem, _path + ".ginIndexes[" + _index14 + "]", true && _exceptionable) || _report(_exceptionable, {
865
+ path: _path + ".ginIndexes[" + _index14 + "]",
866
+ expected: "AutoBePrisma.IGinIndex",
867
+ value: elem
868
+ })).every(flag => flag) || _report(_exceptionable, {
869
+ path: _path + ".ginIndexes",
870
+ expected: "Array<AutoBePrisma.IGinIndex>",
871
+ value: input.ginIndexes
872
+ })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
873
+ path: _path + ".name",
874
+ expected: "string & SnakePattern",
875
+ value: input.name
876
+ })) || _report(_exceptionable, {
877
+ path: _path + ".name",
878
+ expected: "(string & SnakePattern)",
879
+ value: input.name
880
+ }), "uuid" === input.type || _report(_exceptionable, {
881
+ path: _path + ".type",
882
+ expected: "\"uuid\"",
883
+ value: input.type
884
+ }), "string" === typeof input.description || _report(_exceptionable, {
885
+ path: _path + ".description",
886
+ expected: "string",
887
+ value: input.description
888
+ })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
889
+ path: _path + ".name",
890
+ expected: "string & SnakePattern",
891
+ value: input.name
892
+ })) || _report(_exceptionable, {
893
+ path: _path + ".name",
894
+ expected: "(string & SnakePattern)",
895
+ value: input.name
896
+ }), "uuid" === input.type || _report(_exceptionable, {
897
+ path: _path + ".type",
898
+ expected: "\"uuid\"",
899
+ value: input.type
900
+ }), "string" === typeof input.description || _report(_exceptionable, {
901
+ path: _path + ".description",
902
+ expected: "string",
903
+ value: input.description
904
+ }), ("object" === typeof input.relation && null !== input.relation || _report(_exceptionable, {
905
+ path: _path + ".relation",
906
+ expected: "AutoBePrisma.IRelation",
907
+ value: input.relation
908
+ })) && _vo4(input.relation, _path + ".relation", true && _exceptionable) || _report(_exceptionable, {
909
+ path: _path + ".relation",
910
+ expected: "AutoBePrisma.IRelation",
911
+ value: input.relation
912
+ }), "boolean" === typeof input.unique || _report(_exceptionable, {
913
+ path: _path + ".unique",
914
+ expected: "boolean",
915
+ value: input.unique
916
+ }), "boolean" === typeof input.nullable || _report(_exceptionable, {
917
+ path: _path + ".nullable",
918
+ expected: "boolean",
919
+ value: input.nullable
920
+ })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
921
+ path: _path + ".name",
922
+ expected: "string & CamelPattern",
923
+ value: input.name
924
+ })) || _report(_exceptionable, {
925
+ path: _path + ".name",
926
+ expected: "(string & CamelPattern)",
927
+ value: input.name
928
+ }), "string" === typeof input.targetModel || _report(_exceptionable, {
929
+ path: _path + ".targetModel",
930
+ expected: "string",
931
+ value: input.targetModel
932
+ })].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
933
+ path: _path + ".name",
934
+ expected: "string & SnakePattern",
935
+ value: input.name
936
+ })) || _report(_exceptionable, {
937
+ path: _path + ".name",
938
+ expected: "(string & SnakePattern)",
939
+ value: input.name
940
+ }), "string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type || _report(_exceptionable, {
941
+ path: _path + ".type",
942
+ expected: "(\"boolean\" | \"datetime\" | \"double\" | \"int\" | \"string\" | \"uri\" | \"uuid\")",
943
+ value: input.type
944
+ }), "string" === typeof input.description || _report(_exceptionable, {
945
+ path: _path + ".description",
946
+ expected: "string",
947
+ value: input.description
948
+ }), "boolean" === typeof input.nullable || _report(_exceptionable, {
949
+ path: _path + ".nullable",
950
+ expected: "boolean",
951
+ value: input.nullable
952
+ })].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
953
+ path: _path + ".fieldNames",
954
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
955
+ value: input.fieldNames
956
+ })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
957
+ path: _path + ".fieldNames",
958
+ expected: "Array<> & MinItems<1>",
959
+ value: input.fieldNames
960
+ })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
961
+ path: _path + ".fieldNames",
962
+ expected: "Array<> & UniqueItems<true>",
963
+ value: input.fieldNames
964
+ })) && input.fieldNames.map((elem, _index15) => "string" === typeof elem || _report(_exceptionable, {
965
+ path: _path + ".fieldNames[" + _index15 + "]",
966
+ expected: "string",
967
+ value: elem
968
+ })).every(flag => flag)) || _report(_exceptionable, {
969
+ path: _path + ".fieldNames",
970
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
971
+ value: input.fieldNames
972
+ }), true === input.unique || _report(_exceptionable, {
973
+ path: _path + ".unique",
974
+ expected: "true",
975
+ value: input.unique
976
+ })].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
977
+ path: _path + ".fieldNames",
978
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
979
+ value: input.fieldNames
980
+ })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
981
+ path: _path + ".fieldNames",
982
+ expected: "Array<> & MinItems<1>",
983
+ value: input.fieldNames
984
+ })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
985
+ path: _path + ".fieldNames",
986
+ expected: "Array<> & UniqueItems<true>",
987
+ value: input.fieldNames
988
+ })) && input.fieldNames.map((elem, _index16) => "string" === typeof elem || _report(_exceptionable, {
989
+ path: _path + ".fieldNames[" + _index16 + "]",
990
+ expected: "string",
991
+ value: elem
992
+ })).every(flag => flag)) || _report(_exceptionable, {
993
+ path: _path + ".fieldNames",
994
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
995
+ value: input.fieldNames
996
+ })].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => ["string" === typeof input.fieldName || _report(_exceptionable, {
997
+ path: _path + ".fieldName",
998
+ expected: "string",
999
+ value: input.fieldName
1000
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
1001
+ if (false === __is(input)) {
1002
+ errors = [];
1003
+ _report = __typia_transform__validateReport._validateReport(errors);
1004
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
1005
+ path: _path + "",
1006
+ expected: "IAutoBePrismaSchemaApplication.IProps",
1007
+ value: input
1008
+ })) && _vo0(input, _path + "", true) || _report(true, {
1009
+ path: _path + "",
1010
+ expected: "IAutoBePrismaSchemaApplication.IProps",
1011
+ value: input
1012
+ }))(input, "$input", true);
1013
+ const success = 0 === errors.length;
1014
+ return success ? {
1015
+ success,
1016
+ data: input
1017
+ } : {
1018
+ success,
1019
+ errors,
1020
+ data: input
1021
+ };
1022
+ }
1023
+ return {
1024
+ success: true,
1025
+ data: input
1026
+ };
1027
+ }; })()
1028
+ }
1029
+ ]
1030
+ };
1031
+ __typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
1032
+ validate: {
1033
+ makePrismaSchemaFile: validate,
1034
+ },
1035
+ }), { equals: false }));
1036
+ return application;
1037
+ })(),
1038
+ claude: (validate) => (() => {
1039
+ const application = {
1040
+ model: "claude",
1041
+ options: {
1042
+ reference: true,
1043
+ separate: null
1044
+ },
1045
+ functions: [
1046
+ {
1047
+ name: "makePrismaSchemaFile",
1048
+ parameters: {
1049
+ description: " Properties containing the file\n\n------------------------------\n\nCurrent Type: {@link IAutoBePrismaSchemaApplication.IProps}",
1050
+ type: "object",
1051
+ properties: {
1052
+ plan: {
1053
+ description: "Strategic database design analysis and planning.\n\nAI analyzes the target component and business requirements to formulate a\ncomprehensive database design strategy. This planning phase is crucial\nfor creating well-structured, normalized schemas that align with business\nobjectives. The AI must define table structures, relationships, indexing\nstrategies, and data integrity constraints before proceeding to schema\nimplementation.\n\n**Key Considerations:**\n\n- **Assignment Validation**: Extract targetComponent.tables as the complete\n specification\n- **Table Count**: Must create exactly targetComponent.tables.length models\n- **Other Components**: Identify already-created tables for foreign key\n references only\n- **Normalization**: Strict adherence to 1NF, 2NF, 3NF principles\n- **Snapshot Architecture**: Design for historical data preservation and\n audit trails\n- **Junction Tables**: Plan M:N relationships with proper naming\n ({table1}_{table2})\n- **Materialized Views**: Identify needs for mv_ prefixed denormalized\n tables\n\nWorkflow: Component analysis \u2192 Strategic planning \u2192 Design rationale",
1054
+ type: "string"
1055
+ },
1056
+ models: {
1057
+ description: "Production-ready Prisma schema models generated based on the strategic\nplan.\n\nContains a structured Abstract Syntax Tree (AST) representation of all\ndatabase tables for the target component. Each model implements the\nplanned table structure, relationships, indexes, and constraints using\nthe AutoBePrisma.IModel interface. These models are designed to be\nproduction-ready from the initial generation, following all best\npractices and normalization principles.\n\n**Implementation Requirements:**\n\n- **Model Count**: Exactly matches targetComponent.tables.length (plus any\n junction tables)\n- **Table Names**: EXACT names from targetComponent.tables - no\n modifications allowed\n- **Primary Keys**: Always UUID type with field name \"id\"\n- **Foreign Keys**: Proper IRelation configurations for all relationships\n- **Business Fields**: Only raw data fields - no calculated or derived\n values\n- **Data Types**: Limited to: uuid, string, int, double, datetime, boolean,\n uri\n- **Relationships**: Correct patterns for 1:1, 1:N, and M:N relationships\n- **Indexes**:\n\n - UniqueIndexes: Business constraints and composite unique keys\n - PlainIndexes: Multi-column query optimization (never single FK indexes)\n - GinIndexes: Full-text search on appropriate string fields\n- **Materialized Views**: Tables prefixed with \"mv_\" have material flag set\n to true\n- **Documentation**: Comprehensive English descriptions with business\n context\n\n**Quality Standards:**\n\n- **Normalization**: Strict adherence to 3NF (Third Normal Form)\n- **No Denormalization**: Except in materialized views (mv_ tables)\n- **Referential Integrity**: All foreign keys reference valid existing\n tables\n- **Temporal Fields**: Consistent created_at, updated_at, deleted_at\n patterns\n- **Snapshot Support**: Proper historical data preservation where needed\n- **Performance Ready**: Optimized index strategy for expected query\n patterns\n\nThe generated models will undergo review by a separate specialized agent\nto ensure compliance with all requirements and best practices.",
1058
+ type: "array",
1059
+ items: {
1060
+ $ref: "#/$defs/AutoBePrisma.IModel"
1061
+ },
1062
+ minItems: 1
1063
+ }
1064
+ },
1065
+ required: [
1066
+ "plan",
1067
+ "models"
1068
+ ],
1069
+ additionalProperties: false,
1070
+ $defs: {
1071
+ "AutoBePrisma.IModel": {
1072
+ description: "Interface representing a single Prisma model (database table).\n\nBased on the uploaded schemas, models follow specific patterns:\n\n- Main business entities (e.g., shopping_sales, shopping_customers)\n- Snapshot/versioning entities for audit trails (e.g.,\n shopping_sale_snapshots)\n- Junction tables for M:N relationships (e.g.,\n shopping_cart_commodity_stocks)\n- Materialized views for performance (prefixed with mv_)",
1073
+ type: "object",
1074
+ properties: {
1075
+ name: {
1076
+ description: "Name of the Prisma model (database table name).\n\nMUST use snake_case naming convention. Examples: \"shopping_customers\",\n\"shopping_sale_snapshots\", \"bbs_articles\" Materialized views use \"mv_\"\nprefix: \"mv_shopping_sale_last_snapshots\"",
1077
+ type: "string",
1078
+ pattern: "^[a-z][a-z0-9_]*$"
1079
+ },
1080
+ description: {
1081
+ description: "Detailed description explaining the business purpose and usage of the\nmodel.\n\nShould include:\n\n- Business context and purpose\n- Key relationships with other models\n- Important behavioral notes or constraints\n- References to related entities using \"{@\\link ModelName}\" syntax\n\n**IMPORTANT**: Description must be written in English. Example: \"Customer\ninformation, but not a person but a **connection** basis...\"",
1082
+ type: "string"
1083
+ },
1084
+ material: {
1085
+ description: "Indicates whether this model represents a materialized view for\nperformance optimization.\n\nMaterialized views are read-only computed tables that cache complex query\nresults. They're marked as \"@\\hidden\" in documentation and prefixed with\n\"mv_\" in naming. Examples: mv_shopping_sale_last_snapshots,\nmv_shopping_cart_commodity_prices",
1086
+ type: "boolean"
1087
+ },
1088
+ primaryField: {
1089
+ description: "The primary key field of the model.\n\nIn all uploaded schemas, primary keys are always UUID type with \"@\\id\"\ndirective. Usually named \"id\" and marked with \"@\\db.Uuid\" for PostgreSQL\nmapping.",
1090
+ $ref: "#/$defs/AutoBePrisma.IPrimaryField"
1091
+ },
1092
+ foreignFields: {
1093
+ description: "Array of foreign key fields that reference other models.\n\nThese establish relationships between models and include Prisma relation\ndirectives. Can be nullable (optional relationships) or required\n(mandatory relationships). May have unique constraints for 1:1\nrelationships.",
1094
+ type: "array",
1095
+ items: {
1096
+ $ref: "#/$defs/AutoBePrisma.IForeignField"
1097
+ }
1098
+ },
1099
+ plainFields: {
1100
+ description: "Array of regular data fields that don't reference other models.\n\nInclude business data like names, descriptions, timestamps, flags,\namounts, etc. Common patterns: created_at, updated_at, deleted_at for\nsoft deletion and auditing.",
1101
+ type: "array",
1102
+ items: {
1103
+ $ref: "#/$defs/AutoBePrisma.IPlainField"
1104
+ }
1105
+ },
1106
+ uniqueIndexes: {
1107
+ description: "Array of unique indexes for enforcing data integrity constraints.\n\nEnsure uniqueness across single or multiple columns. Examples: unique\nemail addresses, unique codes within a channel, unique combinations like\n(channel_id, nickname).",
1108
+ type: "array",
1109
+ items: {
1110
+ $ref: "#/$defs/AutoBePrisma.IUniqueIndex"
1111
+ }
1112
+ },
1113
+ plainIndexes: {
1114
+ description: "Array of regular indexes for query performance optimization.\n\nSpeed up common query patterns like filtering by foreign keys, date\nranges, or frequently searched fields. Examples: indexes on created_at,\nforeign key fields, search fields.",
1115
+ type: "array",
1116
+ items: {
1117
+ $ref: "#/$defs/AutoBePrisma.IPlainIndex"
1118
+ }
1119
+ },
1120
+ ginIndexes: {
1121
+ description: "Array of GIN (Generalized Inverted Index) indexes for full-text search.\n\nUsed specifically for PostgreSQL text search capabilities using trigram\noperations. Applied to text fields that need fuzzy matching or partial\ntext search. Examples: searching names, nicknames, titles, content\nbodies.",
1122
+ type: "array",
1123
+ items: {
1124
+ $ref: "#/$defs/AutoBePrisma.IGinIndex"
1125
+ }
1126
+ }
1127
+ },
1128
+ required: [
1129
+ "name",
1130
+ "description",
1131
+ "material",
1132
+ "primaryField",
1133
+ "foreignFields",
1134
+ "plainFields",
1135
+ "uniqueIndexes",
1136
+ "plainIndexes",
1137
+ "ginIndexes"
1138
+ ]
1139
+ },
1140
+ "AutoBePrisma.IPrimaryField": {
1141
+ description: "Interface representing the primary key field of a Prisma model.\n\nAll models in the uploaded schemas use UUID as primary key for better\ndistributed system compatibility and security (no sequential ID exposure).",
1142
+ type: "object",
1143
+ properties: {
1144
+ name: {
1145
+ description: "Name of the primary key field.\n\nMUST use snake_case naming convention. Consistently named \"id\" across all\nmodels in the uploaded schemas. Represents the unique identifier for each\nrecord in the table.",
1146
+ type: "string",
1147
+ pattern: "^[a-z][a-z0-9_]*$"
1148
+ },
1149
+ type: {
1150
+ description: "Data type of the primary key field.\n\nAlways \"uuid\" in the uploaded schemas for better distributed system\nsupport and to avoid exposing sequential IDs that could reveal business\ninformation.",
1151
+ "const": "uuid"
1152
+ },
1153
+ description: {
1154
+ description: "Description of the primary key field's purpose.\n\nStandard description is \"Primary Key.\" across all models. Serves as the\nunique identifier for the model instance.\n\n**IMPORTANT**: Description must be written in English.",
1155
+ type: "string"
1156
+ }
1157
+ },
1158
+ required: [
1159
+ "name",
1160
+ "type",
1161
+ "description"
1162
+ ]
1163
+ },
1164
+ "AutoBePrisma.IForeignField": {
1165
+ description: "Interface representing a foreign key field that establishes relationships\nbetween models.\n\nForeign keys create associations between models, enabling relational data\nmodeling. They can represent 1:1, 1:N, or participate in M:N relationships\nthrough junction tables.",
1166
+ type: "object",
1167
+ properties: {
1168
+ name: {
1169
+ description: "Name of the foreign key field.\n\nMUST use snake_case naming convention. Follows convention:\n\"{target_model_name_without_prefix}_id\" Examples: \"shopping_customer_id\",\n\"bbs_article_id\", \"attachment_file_id\" For self-references: \"parent_id\"\n(e.g., in hierarchical structures)",
1170
+ type: "string",
1171
+ pattern: "^[a-z][a-z0-9_]*$"
1172
+ },
1173
+ type: {
1174
+ description: "Data type of the foreign key field.\n\nAlways \"uuid\" to match the primary key type of referenced models. Ensures\nreferential integrity and consistency across the schema.",
1175
+ "const": "uuid"
1176
+ },
1177
+ description: {
1178
+ description: "Description explaining the purpose and target of this foreign key\nrelationship.\n\nShould reference the target model using format: \"Target model's {@\\link\nModelName.id}\" Examples: \"Belonged customer's {@\\link\nshopping_customers.id}\" May include additional context about the\nrelationship's business meaning.\n\n**IMPORTANT**: Description must be written in English.",
1179
+ type: "string"
1180
+ },
1181
+ relation: {
1182
+ description: "Prisma relation configuration defining the association details.\n\nSpecifies how this foreign key connects to the target model, including\nrelation name, target model, and target field. This configuration is used\nto generate the appropriate Prisma relation directive in the schema.",
1183
+ $ref: "#/$defs/AutoBePrisma.IRelation"
1184
+ },
1185
+ unique: {
1186
+ description: "Whether this foreign key has a unique constraint.\n\nTrue: Creates a 1:1 relationship (e.g., user profile, order publish\ndetails) false: Allows 1:N relationship (e.g., customer to multiple\norders) Used for enforcing business rules about relationship\ncardinality.",
1187
+ type: "boolean"
1188
+ },
1189
+ nullable: {
1190
+ description: "Whether this foreign key can be null (optional relationship).\n\nTrue: Relationship is optional, foreign key can be null false:\nRelationship is required, foreign key cannot be null Reflects business\nrules about mandatory vs optional associations.",
1191
+ type: "boolean"
1192
+ }
1193
+ },
1194
+ required: [
1195
+ "name",
1196
+ "type",
1197
+ "description",
1198
+ "relation",
1199
+ "unique",
1200
+ "nullable"
1201
+ ]
1202
+ },
1203
+ "AutoBePrisma.IRelation": {
1204
+ description: "Interface representing a Prisma relation configuration between models.\n\nThis interface defines how foreign key fields establish relationships with\ntheir target models. It provides the necessary information for Prisma to\ngenerate appropriate relation directives (@relation) in the schema,\nenabling proper relational data modeling and ORM functionality.\n\nThe relation configuration is essential for:\n\n- Generating correct Prisma relation syntax\n- Establishing bidirectional relationships between models\n- Enabling proper type-safe querying through Prisma client\n- Supporting complex relationship patterns (1:1, 1:N, M:N)",
1205
+ type: "object",
1206
+ properties: {
1207
+ name: {
1208
+ description: "Name of the relation property in the Prisma model.\n\nThis becomes the property name used to access the related model instance\nthrough the Prisma client. Should be descriptive and reflect the business\nrelationship being modeled.\n\nExamples:\n\n- \"customer\" for shopping_customer_id field\n- \"channel\" for shopping_channel_id field\n- \"parent\" for parent_id field in hierarchical structures\n- \"snapshot\" for versioning relationships\n- \"article\" for bbs_article_id field\n\nNaming convention: camelCase, descriptive of the relationship's business\nmeaning",
1209
+ type: "string",
1210
+ pattern: "^[a-z][a-zA-Z0-9]*$"
1211
+ },
1212
+ targetModel: {
1213
+ description: "Name of the target model being referenced by this relation.\n\nMust exactly match an existing model name in the schema. This is used by\nPrisma to establish the foreign key constraint and generate the\nappropriate relation mapping.\n\nExamples:\n\n- \"shopping_customers\" for customer relationships\n- \"shopping_channels\" for channel relationships\n- \"bbs_articles\" for article relationships\n- \"attachment_files\" for file attachments\n\nThe target model should exist in the same schema or be accessible through\nthe Prisma schema configuration.",
1214
+ type: "string"
1215
+ }
1216
+ },
1217
+ required: [
1218
+ "name",
1219
+ "targetModel"
1220
+ ]
1221
+ },
1222
+ "AutoBePrisma.IPlainField": {
1223
+ description: "Interface representing a regular data field that stores business\ninformation.\n\nThese fields contain the actual business data like names, amounts,\ntimestamps, flags, descriptions, and other domain-specific information.",
1224
+ type: "object",
1225
+ properties: {
1226
+ name: {
1227
+ description: "Name of the field in the database table.\n\nMUST use snake_case naming convention. Common patterns from uploaded\nschemas:\n\n- Timestamps: created_at, updated_at, deleted_at, opened_at, closed_at\n- Identifiers: code, name, nickname, title\n- Business data: value, quantity, price, volume, balance\n- Flags: primary, required, exclusive, secret, multiplicative",
1228
+ type: "string",
1229
+ pattern: "^[a-z][a-z0-9_]*$"
1230
+ },
1231
+ type: {
1232
+ description: "Data type of the field for Prisma schema generation.\n\nMaps to appropriate Prisma/PostgreSQL types:\n\n- Boolean: Boolean flags and yes/no values\n- Int: Integer numbers, quantities, sequences\n- Double: Decimal numbers, prices, monetary values, percentages\n- String: Text data, names, descriptions, codes\n- Uri: URL/URI fields for links and references\n- Uuid: UUID fields (for non-foreign-key UUIDs)\n- Datetime: Timestamp fields with date and time",
1233
+ oneOf: [
1234
+ {
1235
+ "const": "string"
1236
+ },
1237
+ {
1238
+ "const": "boolean"
1239
+ },
1240
+ {
1241
+ "const": "uuid"
1242
+ },
1243
+ {
1244
+ "const": "uri"
1245
+ },
1246
+ {
1247
+ "const": "int"
1248
+ },
1249
+ {
1250
+ "const": "double"
1251
+ },
1252
+ {
1253
+ "const": "datetime"
1254
+ }
1255
+ ]
1256
+ },
1257
+ description: {
1258
+ description: "Description explaining the business purpose and usage of this field.\n\nShould clearly explain:\n\n- What business concept this field represents\n- Valid values or constraints if applicable\n- How it relates to business processes\n- Any special behavioral notes\n\n**IMPORTANT**: Description must be written in English. Example: \"Amount\nof cash payment.\" or \"Whether the unit is required or not.\"",
1259
+ type: "string"
1260
+ },
1261
+ nullable: {
1262
+ description: "Whether this field can contain null values.\n\nTrue: Field is optional and can be null (e.g., middle name, description)\nfalse: Field is required and cannot be null (e.g., creation timestamp,\nname) Reflects business rules about mandatory vs optional data.",
1263
+ type: "boolean"
1264
+ }
1265
+ },
1266
+ required: [
1267
+ "name",
1268
+ "type",
1269
+ "description",
1270
+ "nullable"
1271
+ ]
1272
+ },
1273
+ "AutoBePrisma.IUniqueIndex": {
1274
+ description: "Interface representing a unique index constraint on one or more fields.\n\nUnique indexes enforce data integrity by ensuring no duplicate values exist\nfor the specified field combination. Essential for business rules that\nrequire uniqueness like email addresses, codes, or composite keys.",
1275
+ type: "object",
1276
+ properties: {
1277
+ fieldNames: {
1278
+ description: "Array of field names that together form the unique constraint.\n\nCan be single field (e.g., [\"email\"]) or composite (e.g., [\"channel_id\",\n\"code\"]). All field names must exist in the model. Order matters for\ncomposite indexes. Examples: [\"code\"], [\"shopping_channel_id\",\n\"nickname\"], [\"email\"]",
1279
+ type: "array",
1280
+ items: {
1281
+ type: "string"
1282
+ },
1283
+ minItems: 1,
1284
+ uniqueItems: true
1285
+ },
1286
+ unique: {
1287
+ description: "Explicit marker indicating this is a unique index.\n\nAlways true to distinguish from regular indexes. Used by code generator\nto emit \"@@unique\" directive in Prisma schema instead of \"@@index\".",
1288
+ "const": true
1289
+ }
1290
+ },
1291
+ required: [
1292
+ "fieldNames",
1293
+ "unique"
1294
+ ]
1295
+ },
1296
+ "AutoBePrisma.IPlainIndex": {
1297
+ description: "Interface representing a regular (non-unique) index for query performance.\n\nRegular indexes speed up database queries by creating optimized data\nstructures for common search patterns. Essential for foreign keys, date\nranges, and frequently filtered fields.",
1298
+ type: "object",
1299
+ properties: {
1300
+ fieldNames: {
1301
+ description: "Array of field names to include in the performance index.\n\nCan be single field (e.g., [\"created_at\"]) or composite (e.g.,\n[\"customer_id\", \"created_at\"]). All field names must exist in the model.\nOrder matters for composite indexes and should match common query\npatterns. Examples: [\"created_at\"], [\"shopping_customer_id\",\n\"created_at\"], [\"ip\"]",
1302
+ type: "array",
1303
+ items: {
1304
+ type: "string"
1305
+ },
1306
+ minItems: 1,
1307
+ uniqueItems: true
1308
+ }
1309
+ },
1310
+ required: [
1311
+ "fieldNames"
1312
+ ]
1313
+ },
1314
+ "AutoBePrisma.IGinIndex": {
1315
+ description: "Interface representing a GIN (Generalized Inverted Index) for full-text\nsearch.\n\nGIN indexes enable advanced PostgreSQL text search capabilities including\nfuzzy matching and partial text search using trigram operations. Essential\nfor user-facing search features on text content.",
1316
+ type: "object",
1317
+ properties: {
1318
+ fieldName: {
1319
+ description: "Name of the text field to index for full-text search capabilities.\n\nMust be a string field in the model that contains searchable text.\nExamples from uploaded schemas: \"nickname\", \"title\", \"body\", \"name\" Used\nwith PostgreSQL gin_trgm_ops for trigram-based fuzzy text search.",
1320
+ type: "string"
1321
+ }
1322
+ },
1323
+ required: [
1324
+ "fieldName"
1325
+ ]
1326
+ }
1327
+ }
1328
+ },
1329
+ description: "Generates comprehensive Prisma schema files based on detailed requirements\nanalysis.\n\nCreates multiple organized schema files following enterprise patterns\nincluding proper domain separation, relationship modeling, snapshot\npatterns, inheritance, materialized views, and comprehensive documentation.\nThe generated schemas implement best practices for scalability,\nmaintainability, and data integrity.",
1330
+ validate: (() => { const _io0 = input => "string" === typeof input.plan && (Array.isArray(input.models) && (1 <= input.models.length && input.models.every(elem => "object" === typeof elem && null !== elem && _io1(elem)))); const _io1 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "string" === typeof input.description && "boolean" === typeof input.material && ("object" === typeof input.primaryField && null !== input.primaryField && _io2(input.primaryField)) && (Array.isArray(input.foreignFields) && input.foreignFields.every(elem => "object" === typeof elem && null !== elem && _io3(elem))) && (Array.isArray(input.plainFields) && input.plainFields.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && (Array.isArray(input.uniqueIndexes) && input.uniqueIndexes.every(elem => "object" === typeof elem && null !== elem && _io6(elem))) && (Array.isArray(input.plainIndexes) && input.plainIndexes.every(elem => "object" === typeof elem && null !== elem && _io7(elem))) && (Array.isArray(input.ginIndexes) && input.ginIndexes.every(elem => "object" === typeof elem && null !== elem && _io8(elem))); const _io2 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description; const _io3 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description && ("object" === typeof input.relation && null !== input.relation && _io4(input.relation)) && "boolean" === typeof input.unique && "boolean" === typeof input.nullable; const _io4 = input => "string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) && "string" === typeof input.targetModel; const _io5 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && ("string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type) && "string" === typeof input.description && "boolean" === typeof input.nullable; const _io6 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)) && true === input.unique; const _io7 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)); const _io8 = input => "string" === typeof input.fieldName; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.plan || _report(_exceptionable, {
1331
+ path: _path + ".plan",
1332
+ expected: "string",
1333
+ value: input.plan
1334
+ }), (Array.isArray(input.models) || _report(_exceptionable, {
1335
+ path: _path + ".models",
1336
+ expected: "(Array<AutoBePrisma.IModel> & MinItems<1>)",
1337
+ value: input.models
1338
+ })) && ((1 <= input.models.length || _report(_exceptionable, {
1339
+ path: _path + ".models",
1340
+ expected: "Array<> & MinItems<1>",
1341
+ value: input.models
1342
+ })) && input.models.map((elem, _index9) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1343
+ path: _path + ".models[" + _index9 + "]",
1344
+ expected: "AutoBePrisma.IModel",
1345
+ value: elem
1346
+ })) && _vo1(elem, _path + ".models[" + _index9 + "]", true && _exceptionable) || _report(_exceptionable, {
1347
+ path: _path + ".models[" + _index9 + "]",
1348
+ expected: "AutoBePrisma.IModel",
1349
+ value: elem
1350
+ })).every(flag => flag)) || _report(_exceptionable, {
1351
+ path: _path + ".models",
1352
+ expected: "(Array<AutoBePrisma.IModel> & MinItems<1>)",
1353
+ value: input.models
1354
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1355
+ path: _path + ".name",
1356
+ expected: "string & SnakePattern",
1357
+ value: input.name
1358
+ })) || _report(_exceptionable, {
1359
+ path: _path + ".name",
1360
+ expected: "(string & SnakePattern)",
1361
+ value: input.name
1362
+ }), "string" === typeof input.description || _report(_exceptionable, {
1363
+ path: _path + ".description",
1364
+ expected: "string",
1365
+ value: input.description
1366
+ }), "boolean" === typeof input.material || _report(_exceptionable, {
1367
+ path: _path + ".material",
1368
+ expected: "boolean",
1369
+ value: input.material
1370
+ }), ("object" === typeof input.primaryField && null !== input.primaryField || _report(_exceptionable, {
1371
+ path: _path + ".primaryField",
1372
+ expected: "AutoBePrisma.IPrimaryField",
1373
+ value: input.primaryField
1374
+ })) && _vo2(input.primaryField, _path + ".primaryField", true && _exceptionable) || _report(_exceptionable, {
1375
+ path: _path + ".primaryField",
1376
+ expected: "AutoBePrisma.IPrimaryField",
1377
+ value: input.primaryField
1378
+ }), (Array.isArray(input.foreignFields) || _report(_exceptionable, {
1379
+ path: _path + ".foreignFields",
1380
+ expected: "Array<AutoBePrisma.IForeignField>",
1381
+ value: input.foreignFields
1382
+ })) && input.foreignFields.map((elem, _index10) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1383
+ path: _path + ".foreignFields[" + _index10 + "]",
1384
+ expected: "AutoBePrisma.IForeignField",
1385
+ value: elem
1386
+ })) && _vo3(elem, _path + ".foreignFields[" + _index10 + "]", true && _exceptionable) || _report(_exceptionable, {
1387
+ path: _path + ".foreignFields[" + _index10 + "]",
1388
+ expected: "AutoBePrisma.IForeignField",
1389
+ value: elem
1390
+ })).every(flag => flag) || _report(_exceptionable, {
1391
+ path: _path + ".foreignFields",
1392
+ expected: "Array<AutoBePrisma.IForeignField>",
1393
+ value: input.foreignFields
1394
+ }), (Array.isArray(input.plainFields) || _report(_exceptionable, {
1395
+ path: _path + ".plainFields",
1396
+ expected: "Array<AutoBePrisma.IPlainField>",
1397
+ value: input.plainFields
1398
+ })) && input.plainFields.map((elem, _index11) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1399
+ path: _path + ".plainFields[" + _index11 + "]",
1400
+ expected: "AutoBePrisma.IPlainField",
1401
+ value: elem
1402
+ })) && _vo5(elem, _path + ".plainFields[" + _index11 + "]", true && _exceptionable) || _report(_exceptionable, {
1403
+ path: _path + ".plainFields[" + _index11 + "]",
1404
+ expected: "AutoBePrisma.IPlainField",
1405
+ value: elem
1406
+ })).every(flag => flag) || _report(_exceptionable, {
1407
+ path: _path + ".plainFields",
1408
+ expected: "Array<AutoBePrisma.IPlainField>",
1409
+ value: input.plainFields
1410
+ }), (Array.isArray(input.uniqueIndexes) || _report(_exceptionable, {
1411
+ path: _path + ".uniqueIndexes",
1412
+ expected: "Array<AutoBePrisma.IUniqueIndex>",
1413
+ value: input.uniqueIndexes
1414
+ })) && input.uniqueIndexes.map((elem, _index12) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1415
+ path: _path + ".uniqueIndexes[" + _index12 + "]",
1416
+ expected: "AutoBePrisma.IUniqueIndex",
1417
+ value: elem
1418
+ })) && _vo6(elem, _path + ".uniqueIndexes[" + _index12 + "]", true && _exceptionable) || _report(_exceptionable, {
1419
+ path: _path + ".uniqueIndexes[" + _index12 + "]",
1420
+ expected: "AutoBePrisma.IUniqueIndex",
1421
+ value: elem
1422
+ })).every(flag => flag) || _report(_exceptionable, {
1423
+ path: _path + ".uniqueIndexes",
1424
+ expected: "Array<AutoBePrisma.IUniqueIndex>",
1425
+ value: input.uniqueIndexes
1426
+ }), (Array.isArray(input.plainIndexes) || _report(_exceptionable, {
1427
+ path: _path + ".plainIndexes",
1428
+ expected: "Array<AutoBePrisma.IPlainIndex>",
1429
+ value: input.plainIndexes
1430
+ })) && input.plainIndexes.map((elem, _index13) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1431
+ path: _path + ".plainIndexes[" + _index13 + "]",
1432
+ expected: "AutoBePrisma.IPlainIndex",
1433
+ value: elem
1434
+ })) && _vo7(elem, _path + ".plainIndexes[" + _index13 + "]", true && _exceptionable) || _report(_exceptionable, {
1435
+ path: _path + ".plainIndexes[" + _index13 + "]",
1436
+ expected: "AutoBePrisma.IPlainIndex",
1437
+ value: elem
1438
+ })).every(flag => flag) || _report(_exceptionable, {
1439
+ path: _path + ".plainIndexes",
1440
+ expected: "Array<AutoBePrisma.IPlainIndex>",
1441
+ value: input.plainIndexes
1442
+ }), (Array.isArray(input.ginIndexes) || _report(_exceptionable, {
1443
+ path: _path + ".ginIndexes",
1444
+ expected: "Array<AutoBePrisma.IGinIndex>",
1445
+ value: input.ginIndexes
1446
+ })) && input.ginIndexes.map((elem, _index14) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1447
+ path: _path + ".ginIndexes[" + _index14 + "]",
1448
+ expected: "AutoBePrisma.IGinIndex",
1449
+ value: elem
1450
+ })) && _vo8(elem, _path + ".ginIndexes[" + _index14 + "]", true && _exceptionable) || _report(_exceptionable, {
1451
+ path: _path + ".ginIndexes[" + _index14 + "]",
1452
+ expected: "AutoBePrisma.IGinIndex",
1453
+ value: elem
1454
+ })).every(flag => flag) || _report(_exceptionable, {
1455
+ path: _path + ".ginIndexes",
1456
+ expected: "Array<AutoBePrisma.IGinIndex>",
1457
+ value: input.ginIndexes
1458
+ })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1459
+ path: _path + ".name",
1460
+ expected: "string & SnakePattern",
1461
+ value: input.name
1462
+ })) || _report(_exceptionable, {
1463
+ path: _path + ".name",
1464
+ expected: "(string & SnakePattern)",
1465
+ value: input.name
1466
+ }), "uuid" === input.type || _report(_exceptionable, {
1467
+ path: _path + ".type",
1468
+ expected: "\"uuid\"",
1469
+ value: input.type
1470
+ }), "string" === typeof input.description || _report(_exceptionable, {
1471
+ path: _path + ".description",
1472
+ expected: "string",
1473
+ value: input.description
1474
+ })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1475
+ path: _path + ".name",
1476
+ expected: "string & SnakePattern",
1477
+ value: input.name
1478
+ })) || _report(_exceptionable, {
1479
+ path: _path + ".name",
1480
+ expected: "(string & SnakePattern)",
1481
+ value: input.name
1482
+ }), "uuid" === input.type || _report(_exceptionable, {
1483
+ path: _path + ".type",
1484
+ expected: "\"uuid\"",
1485
+ value: input.type
1486
+ }), "string" === typeof input.description || _report(_exceptionable, {
1487
+ path: _path + ".description",
1488
+ expected: "string",
1489
+ value: input.description
1490
+ }), ("object" === typeof input.relation && null !== input.relation || _report(_exceptionable, {
1491
+ path: _path + ".relation",
1492
+ expected: "AutoBePrisma.IRelation",
1493
+ value: input.relation
1494
+ })) && _vo4(input.relation, _path + ".relation", true && _exceptionable) || _report(_exceptionable, {
1495
+ path: _path + ".relation",
1496
+ expected: "AutoBePrisma.IRelation",
1497
+ value: input.relation
1498
+ }), "boolean" === typeof input.unique || _report(_exceptionable, {
1499
+ path: _path + ".unique",
1500
+ expected: "boolean",
1501
+ value: input.unique
1502
+ }), "boolean" === typeof input.nullable || _report(_exceptionable, {
1503
+ path: _path + ".nullable",
1504
+ expected: "boolean",
1505
+ value: input.nullable
1506
+ })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
1507
+ path: _path + ".name",
1508
+ expected: "string & CamelPattern",
1509
+ value: input.name
1510
+ })) || _report(_exceptionable, {
1511
+ path: _path + ".name",
1512
+ expected: "(string & CamelPattern)",
1513
+ value: input.name
1514
+ }), "string" === typeof input.targetModel || _report(_exceptionable, {
1515
+ path: _path + ".targetModel",
1516
+ expected: "string",
1517
+ value: input.targetModel
1518
+ })].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1519
+ path: _path + ".name",
1520
+ expected: "string & SnakePattern",
1521
+ value: input.name
1522
+ })) || _report(_exceptionable, {
1523
+ path: _path + ".name",
1524
+ expected: "(string & SnakePattern)",
1525
+ value: input.name
1526
+ }), "string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type || _report(_exceptionable, {
1527
+ path: _path + ".type",
1528
+ expected: "(\"boolean\" | \"datetime\" | \"double\" | \"int\" | \"string\" | \"uri\" | \"uuid\")",
1529
+ value: input.type
1530
+ }), "string" === typeof input.description || _report(_exceptionable, {
1531
+ path: _path + ".description",
1532
+ expected: "string",
1533
+ value: input.description
1534
+ }), "boolean" === typeof input.nullable || _report(_exceptionable, {
1535
+ path: _path + ".nullable",
1536
+ expected: "boolean",
1537
+ value: input.nullable
1538
+ })].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
1539
+ path: _path + ".fieldNames",
1540
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1541
+ value: input.fieldNames
1542
+ })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
1543
+ path: _path + ".fieldNames",
1544
+ expected: "Array<> & MinItems<1>",
1545
+ value: input.fieldNames
1546
+ })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
1547
+ path: _path + ".fieldNames",
1548
+ expected: "Array<> & UniqueItems<true>",
1549
+ value: input.fieldNames
1550
+ })) && input.fieldNames.map((elem, _index15) => "string" === typeof elem || _report(_exceptionable, {
1551
+ path: _path + ".fieldNames[" + _index15 + "]",
1552
+ expected: "string",
1553
+ value: elem
1554
+ })).every(flag => flag)) || _report(_exceptionable, {
1555
+ path: _path + ".fieldNames",
1556
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1557
+ value: input.fieldNames
1558
+ }), true === input.unique || _report(_exceptionable, {
1559
+ path: _path + ".unique",
1560
+ expected: "true",
1561
+ value: input.unique
1562
+ })].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
1563
+ path: _path + ".fieldNames",
1564
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1565
+ value: input.fieldNames
1566
+ })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
1567
+ path: _path + ".fieldNames",
1568
+ expected: "Array<> & MinItems<1>",
1569
+ value: input.fieldNames
1570
+ })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
1571
+ path: _path + ".fieldNames",
1572
+ expected: "Array<> & UniqueItems<true>",
1573
+ value: input.fieldNames
1574
+ })) && input.fieldNames.map((elem, _index16) => "string" === typeof elem || _report(_exceptionable, {
1575
+ path: _path + ".fieldNames[" + _index16 + "]",
1576
+ expected: "string",
1577
+ value: elem
1578
+ })).every(flag => flag)) || _report(_exceptionable, {
1579
+ path: _path + ".fieldNames",
1580
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1581
+ value: input.fieldNames
1582
+ })].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => ["string" === typeof input.fieldName || _report(_exceptionable, {
1583
+ path: _path + ".fieldName",
1584
+ expected: "string",
1585
+ value: input.fieldName
1586
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
1587
+ if (false === __is(input)) {
1588
+ errors = [];
1589
+ _report = __typia_transform__validateReport._validateReport(errors);
1590
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
1591
+ path: _path + "",
1592
+ expected: "IAutoBePrismaSchemaApplication.IProps",
1593
+ value: input
1594
+ })) && _vo0(input, _path + "", true) || _report(true, {
1595
+ path: _path + "",
1596
+ expected: "IAutoBePrismaSchemaApplication.IProps",
1597
+ value: input
1598
+ }))(input, "$input", true);
1599
+ const success = 0 === errors.length;
1600
+ return success ? {
1601
+ success,
1602
+ data: input
1603
+ } : {
1604
+ success,
1605
+ errors,
1606
+ data: input
1607
+ };
1608
+ }
1609
+ return {
1610
+ success: true,
1611
+ data: input
1612
+ };
1613
+ }; })()
1614
+ }
1615
+ ]
1616
+ };
1617
+ __typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
1618
+ validate: {
1619
+ makePrismaSchemaFile: validate,
1620
+ },
1621
+ }), { equals: false }));
1622
+ return application;
1623
+ })(),
1624
+ };
1625
+ //# sourceMappingURL=orchestratePrismaSchemas.js.map