@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
@@ -45,148 +45,75 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
45
45
  return (mod && mod.__esModule) ? mod : { "default": mod };
46
46
  };
47
47
  Object.defineProperty(exports, "__esModule", { value: true });
48
- exports.orchestratePrismaSchemas = orchestratePrismaSchemas;
48
+ exports.orchestratePrismaReview = orchestratePrismaReview;
49
49
  const __typia_transform__isUniqueItems = __importStar(require("typia/lib/internal/_isUniqueItems.js"));
50
50
  const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
51
- const core_1 = require("@agentica/core");
52
51
  const typia_1 = __importDefault(require("typia"));
53
52
  const assertSchemaModel_1 = require("../../context/assertSchemaModel");
54
- const enforceToolCall_1 = require("../../utils/enforceToolCall");
55
- const forceRetry_1 = require("../../utils/forceRetry");
56
- const transformPrismaSchemaHistories_1 = require("./histories/transformPrismaSchemaHistories");
57
- function orchestratePrismaSchemas(ctx, components) {
53
+ const transformPrismaReviewHistories_1 = require("./histories/transformPrismaReviewHistories");
54
+ function orchestratePrismaReview(ctx, application, schemas, componentList) {
58
55
  return __awaiter(this, void 0, void 0, function* () {
59
- const start = new Date();
60
- const total = components
61
- .map((c) => c.tables.length)
62
- .reduce((x, y) => x + y, 0);
63
- let completed = 0;
64
- return yield Promise.all(components.map((comp) => __awaiter(this, void 0, void 0, function* () {
65
- var _a, _b;
66
- const targetComponent = comp;
67
- const otherComponents = components.filter((y) => comp !== y);
68
- const result = yield (0, forceRetry_1.forceRetry)(() => process(ctx, targetComponent, otherComponents));
69
- const event = {
70
- type: "prismaSchemas",
71
- created_at: start.toISOString(),
72
- thinking: result.thinking,
73
- draft: result.draft,
74
- review: result.review,
75
- final: result.final,
76
- file: {
77
- filename: comp.filename,
78
- namespace: comp.namespace,
79
- models: result.models,
80
- },
81
- completed: (completed += comp.tables.length),
82
- total,
83
- step: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
84
- };
85
- ctx.dispatch(event);
86
- return event;
87
- })));
56
+ const progress = {
57
+ completed: 0,
58
+ total: componentList.length,
59
+ };
60
+ return yield Promise.all(componentList.map((component) => step(ctx, application, schemas, component, progress)));
88
61
  });
89
62
  }
90
- function process(ctx, targetComponent, otherComponents) {
63
+ function step(ctx, application, schemas, component, progress) {
91
64
  return __awaiter(this, void 0, void 0, function* () {
92
- var _a;
65
+ var _a, _b, _c, _d;
66
+ const start = new Date();
93
67
  const pointer = {
94
68
  value: null,
95
69
  };
96
- const agentica = new core_1.MicroAgentica({
97
- model: ctx.model,
98
- vendor: ctx.vendor,
99
- config: Object.assign(Object.assign({}, ((_a = ctx.config) !== null && _a !== void 0 ? _a : {})), { executor: {
100
- describe: null,
101
- } }),
102
- histories: (0, transformPrismaSchemaHistories_1.transformPrismaSchemaHistories)(ctx.state().analyze.files, targetComponent, otherComponents),
103
- controllers: [
104
- createApplication(ctx, {
105
- targetComponent,
106
- otherComponents,
107
- build: (next) => {
108
- pointer.value = next;
109
- },
110
- }),
111
- ],
112
- });
113
- (0, enforceToolCall_1.enforceToolCall)(agentica);
114
- yield agentica.conversate("Make prisma schema file please").finally(() => {
115
- const tokenUsage = agentica.getTokenUsage().aggregate;
116
- ctx.usage().record(tokenUsage, ["prisma"]);
70
+ const { tokenUsage } = yield ctx.conversate({
71
+ source: "prismaReview",
72
+ histories: (0, transformPrismaReviewHistories_1.transformPrismaReviewHistories)({
73
+ analysis: (_b = (_a = ctx
74
+ .state()
75
+ .analyze) === null || _a === void 0 ? void 0 : _a.files.map((file) => ({ [file.filename]: file.content })).reduce((acc, cur) => {
76
+ return Object.assign(acc, cur);
77
+ }, {})) !== null && _b !== void 0 ? _b : {},
78
+ application,
79
+ schemas,
80
+ component,
81
+ }),
82
+ controller: createController(ctx, {
83
+ build: (next) => {
84
+ pointer.value = next;
85
+ },
86
+ }),
87
+ enforceFunctionCall: true,
88
+ message: "Please review the Prisma schema file.",
117
89
  });
118
90
  if (pointer.value === null)
119
- throw new Error("Unreachable code: Prisma Schema not generated");
120
- return pointer.value;
91
+ throw new Error("Failed to review the Prisma schema.");
92
+ const event = {
93
+ type: "prismaReview",
94
+ created_at: start.toISOString(),
95
+ filename: component.filename,
96
+ review: pointer.value.review,
97
+ plan: pointer.value.plan,
98
+ modifications: pointer.value.modifications,
99
+ tokenUsage,
100
+ completed: ++progress.completed,
101
+ total: progress.total,
102
+ step: (_d = (_c = ctx.state().analyze) === null || _c === void 0 ? void 0 : _c.step) !== null && _d !== void 0 ? _d : 0,
103
+ };
104
+ ctx.dispatch(event);
105
+ return event;
121
106
  });
122
107
  }
123
- function createApplication(ctx, props) {
108
+ function createController(ctx, props) {
124
109
  (0, assertSchemaModel_1.assertSchemaModel)(ctx.model);
125
110
  const application = collection[ctx.model];
126
- // application.functions[0].validate = (
127
- // input: unknown,
128
- // ): IValidation<IMakePrismaSchemaFileProps> => {
129
- // const result: IValidation<IMakePrismaSchemaFileProps> =
130
- // typia.validate<IMakePrismaSchemaFileProps>(input);
131
- // if (result.success === false) return result;
132
- // const everyModels: AutoBePrisma.IModel[] = result.data.models;
133
- // result.data.models = result.data.models.filter((m) =>
134
- // props.otherComponents.every((oc) => oc.tables.includes(m.name) === false),
135
- // );
136
- // const expected: string[] = props.targetComponent.tables;
137
- // const actual: string[] = result.data.models.map((m) => m.name);
138
- // const missed: string[] = expected.filter(
139
- // (x) => actual.includes(x) === false,
140
- // );
141
- // if (missed.length === 0) return result;
142
- // ctx.dispatch({
143
- // type: "prismaInsufficient",
144
- // created_at: new Date().toISOString(),
145
- // component: props.targetComponent,
146
- // actual: everyModels,
147
- // missed,
148
- // tablesToCreate: result.data.tablesToCreate,
149
- // validationReview: result.data.validationReview,
150
- // confirmedTables: result.data.confirmedTables,
151
- // });
152
- // return {
153
- // success: false,
154
- // data: result.data,
155
- // errors: [
156
- // {
157
- // path: "$input.file.models",
158
- // value: result.data.models,
159
- // expected: `Array<AutoBePrisma.IModel>`,
160
- // description: [
161
- // "You missed some tables from the current domain's component.",
162
- // "",
163
- // "Look at the following details to fix the schemas. Never forget to",
164
- // "compose the `missed` tables at the next function calling.",
165
- // "",
166
- // "- filename: current domain's filename",
167
- // "- namespace: current domain's namespace",
168
- // "- expected: expected tables in the current domain",
169
- // "- actual: actual tables you made",
170
- // "- missed: tables you have missed, and you have to compose again",
171
- // "",
172
- // JSON.stringify({
173
- // filename: props.targetComponent.filename,
174
- // namespace: props.targetComponent.namespace,
175
- // expected,
176
- // actual,
177
- // missed,
178
- // }),
179
- // ].join("\n"),
180
- // },
181
- // ],
182
- // };
183
- // };
184
111
  return {
185
112
  protocol: "class",
186
- name: "Prisma Generator",
113
+ name: "Prisma Schema Review",
187
114
  application,
188
115
  execute: {
189
- makePrismaSchemaFile: (next) => {
116
+ reviewSchemaFile: (next) => {
190
117
  props.build(next);
191
118
  },
192
119
  },
@@ -200,29 +127,21 @@ const claude = {
200
127
  },
201
128
  functions: [
202
129
  {
203
- name: "makePrismaSchemaFile",
130
+ name: "reviewSchemaFile",
204
131
  parameters: {
205
- description: " Properties containing the file\n\n------------------------------\n\nCurrent Type: {@link IAutoBePrismaSchemaApplication.IProps}",
132
+ description: "Current Type: {@link IAutoBePrismaReviewApplication.IProps}",
206
133
  type: "object",
207
134
  properties: {
208
- thinking: {
209
- description: "Step 1: 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",
210
- type: "string"
211
- },
212
- draft: {
213
- description: "Step 2: Initial Prisma schema code implementation.\n\nAI generates the first working version of the Prisma schema based on the\nstrategic plan. This draft must be syntactically correct Prisma Schema\nLanguage (PSL) code that implements all planned tables, relationships,\nand constraints. The schema should follow Prisma conventions while\nincorporating enterprise patterns like snapshot tables and materialized\nviews.\n\n**Implementation Requirements:**\n\n- **Exact Table Names**: Use EXACT names from targetComponent.tables (NO\n CHANGES)\n- **Valid PSL Syntax**: Proper model blocks, field definitions, and\n directives\n- **Primary Keys**: Always UUID type with `@id` directive\n- **Foreign Keys**: UUID type following {target_model}_id naming pattern\n- **Data Types**: uuid, string, int, double, datetime, boolean, uri (no\n pre-calculated fields)\n- **Relationships**: Proper `@relation` directives for 1:1, 1:N, M:N\n patterns\n- **Descriptions**: Follow format with requirements mapping and business\n purpose\n- **NO Prohibited Fields**: No totals, cached values, aggregates in regular\n tables\n\nWorkflow: Strategic plan \u2192 PSL implementation \u2192 Functional schema code",
214
- type: "string"
215
- },
216
135
  review: {
217
- description: "Step 3: Schema code review and quality assessment.\n\nAI performs a thorough review of the draft schema implementation,\nexamining multiple quality dimensions to ensure production readiness.\nThis review process identifies issues, suggests improvements, and\nvalidates compliance with best practices.\n\n**Review Dimensions:**\n\n**Syntax & Compilation:**\n\n- Prisma schema syntax errors and invalid directives\n- Model naming matches targetComponent.tables EXACTLY\n- Field type appropriateness (uuid for keys, no calculated fields)\n- Relationship definition correctness (`@relation` syntax)\n\n**Database Design Quality:**\n\n- **Normalization Compliance**:\n\n - 1NF: Atomic values, no repeating groups\n - 2NF: No partial dependencies on composite keys\n - 3NF: No transitive dependencies\n- **Prohibited Fields Check**: No pre-calculated totals, cached values, or\n aggregates in regular tables\n- **Snapshot Pattern**: Proper implementation for audit trails\n- **Junction Tables**: Correct naming ({table1}_{table2}) and structure\n\n**Index Strategy Validation:**\n\n- NO single foreign key indexes (Prisma auto-creates these)\n- Composite indexes for query patterns\n- Unique indexes for business constraints\n- GIN indexes for full-text search fields\n\n**Description Quality:**\n\n- Models include: requirement mapping, business purpose, relationships,\n behaviors\n- Fields include: requirement aspect, business meaning, normalization\n rationale\n\nWorkflow: Draft schema \u2192 Systematic analysis \u2192 Specific improvements",
136
+ description: "Comprehensive review analysis of the proposed schema modifications.\n\nContains the AI agent's detailed evaluation of the schema changes,\nincluding validation of normalization compliance, relationship integrity,\nindex optimization, and business requirement alignment. The review\nidentifies potential issues and confirms adherence to best practices.\n\n**Review Dimensions:**\n\n- **Normalization Validation**: Confirms 3NF compliance and proper data\n structure\n- **Relationship Integrity**: Validates foreign key references and\n cardinality\n- **Performance Optimization**: Reviews indexing strategy and query\n patterns\n- **Business Logic Alignment**: Ensures schema supports all use cases\n- **Naming Conventions**: Verifies consistent naming patterns\n- **Data Type Consistency**: Confirms appropriate field types\n- **Temporal Field Handling**: Validates audit trail implementation\n\n**Example:**\n\n \"After reviewing the schema modifications:\n 1. All tables properly implement UUID primary keys\n 2. Foreign key relationships correctly reference existing models\n 3. Composite indexes optimize for common query patterns\n 4. Snapshot tables include proper temporal fields\n 5. Materialized views (mv_) contain appropriate denormalization\n The schema follows all best practices and is ready for implementation.\"",
218
137
  type: "string"
219
138
  },
220
- final: {
221
- description: "Step 4: Final production-ready Prisma schema code.\n\nAI produces the final, polished version of the Prisma schema\nincorporating all review feedback. This code represents the completed\nschema implementation, ready for database migration and production\ndeployment. All identified issues must be resolved, and the schema must\nmeet enterprise-grade quality standards.\n\n**Final Schema Characteristics:**\n\n- **Complete Coverage**: All targetComponent.tables implemented with exact\n names\n- **Zero Errors**: Valid PSL syntax, no compilation warnings\n- **Proper Relationships**: All foreign keys reference existing tables\n correctly\n- **Optimized Indexes**: Strategic indexes without redundant foreign key\n indexes\n- **Full Normalization**: Strict 3NF compliance, denormalization only in\n mv_ tables\n- **Enterprise Documentation**: Complete descriptions with business context\n- **Audit Support**: Proper snapshot patterns and temporal fields\n (created_at, updated_at, deleted_at)\n- **Type Safety**: Consistent use of UUID for all keys, appropriate field\n types\n\nWorkflow: Review feedback \u2192 Schema refinement \u2192 Production-ready PSL code",
139
+ plan: {
140
+ description: "Strategic database design plan that guided the schema creation.\n\nContains the original planning document that outlines the database\narchitecture strategy, including table structures, relationships,\nnormalization approach, and business requirement mapping. This plan\nserves as the blueprint for validating the implemented schema.\n\n**Planning Components:**\n\n- **Business Requirements**: Mapping of business needs to database\n structures\n- **Table Design**: Entity definitions and attribute specifications\n- **Relationship Strategy**: Cardinality and referential integrity planning\n- **Normalization Approach**: Application of 1NF, 2NF, 3NF principles\n- **Performance Considerations**: Index strategy and query optimization\n- **Snapshot Architecture**: Temporal data handling and audit requirements\n- **Materialized Views**: Denormalization strategy for performance\n\n**Example:**\n\n \"Database Design Strategy:\n Component: Sales Domain\n Tables: shopping_sales, shopping_sale_snapshots, shopping_sale_units\n\n Design Approach:\n - Normalize product catalog to 3NF for data integrity\n - Implement snapshot pattern for price history tracking\n - Create composite indexes for product search queries\n - Use materialized views for sales analytics dashboards\"",
222
141
  type: "string"
223
142
  },
224
- models: {
225
- description: "Step 5: Structured AST representation of the Prisma schema models.\n\nAI transforms the final Prisma schema code into a structured Abstract\nSyntax Tree (AST) representation using the AutoBePrisma.IModel interface.\nThis involves critical reinterpretation and reclassification of the final\ncode to conform to AST constraints.\n\n**CRITICAL: Reinterpretation & Post-Processing Required**\n\nThe AI-generated final code may not directly map to valid AST structures\ndue to:\n\n- Complex Prisma directives that need decomposition\n- Field attributes that require reclassification\n- Implicit relationships that need explicit AST representation\n- Schema-level constructs that must be distributed to models\n\n**Required Post-Processing Steps:**\n\n1. **Field Reclassification**: Separate fields into primary, foreign, and\n plain categories\n2. **Relationship Extraction**: Convert `@relation` directives to IRelation\n structures\n3. **Index Decomposition**: Parse `@@index`, `@@unique` into appropriate\n index arrays\n4. **Type Normalization**: Map Prisma types to AST type enum values\n5. **Constraint Resolution**: Convert schema constraints to AST properties\n\n**AST Structure Requirements:**\n\n- **Model Array**: Each table from targetComponent.tables as IModel\n- **Primary Field**: Always UUID type with name \"id\"\n- **Foreign Fields**: Proper IRelation configurations for all relationships\n- **Plain Fields**: Business fields with correct types (no calculated\n fields)\n- **Indexes**:\n\n - UniqueIndexes: Business constraints and composite unique keys\n - PlainIndexes: Query optimization (no single foreign key indexes)\n - GinIndexes: Full-text search on string fields\n- **Material Flag**: true only for mv_ prefixed tables\n\n**Relationship Patterns in AST:**\n\n- 1:1: Foreign field with unique: true\n- 1:N: Foreign field with unique: false\n- M:N: Separate junction table model with composite indexes\n\nWorkflow: Final PSL code \u2192 Reinterpretation \u2192 AST transformation \u2192\nStructured models\n\nThis structured representation serves as the ultimate deliverable for\nprogrammatic schema generation and manipulation.",
143
+ modifications: {
144
+ description: "Array of Prisma models that have been modified based on review feedback.\n\nContains ONLY the models that required changes, not the entire schema.\nEach model represents a complete table definition with all fields,\nrelationships, indexes, and documentation. These modifications will be\napplied to the models to produce the final implementation.\n\n**Model Requirements:**\n\n- **Complete Models**: Each entry must be a complete model definition\n- **Targeted Changes**: Only includes models that need modifications\n- **AST Compliance**: Follows AutoBePrisma.IModel interface structure\n- **Relationship Integrity**: All foreign keys reference valid models\n- **Index Optimization**: Strategic indexes without redundancy\n- **Documentation**: Comprehensive English descriptions\n\n**Notes:**\n\n- Models not included in this array remain unchanged from the models\n- The final schema merges these modifications with the original models\n- All modifications must resolve issues identified in the review",
226
145
  type: "array",
227
146
  items: {
228
147
  $ref: "#/$defs/AutoBePrisma.IModel"
@@ -230,11 +149,9 @@ const claude = {
230
149
  }
231
150
  },
232
151
  required: [
233
- "thinking",
234
- "draft",
235
152
  "review",
236
- "final",
237
- "models"
153
+ "plan",
154
+ "modifications"
238
155
  ],
239
156
  additionalProperties: false,
240
157
  $defs: {
@@ -243,12 +160,12 @@ const claude = {
243
160
  type: "object",
244
161
  properties: {
245
162
  name: {
246
- description: "Name of the Prisma model (database table name).\n\nShould follow snake_case convention with domain prefix. Examples:\n\"shopping_customers\", \"shopping_sale_snapshots\", \"bbs_articles\"\nMaterialized views use \"mv_\" prefix: \"mv_shopping_sale_last_snapshots\"",
163
+ 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\"",
247
164
  type: "string",
248
165
  pattern: "^[a-z][a-z0-9_]*$"
249
166
  },
250
167
  description: {
251
- 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 Example:\n \"Customer information, but not a person but a **connection** basis...\"",
168
+ 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...\"",
252
169
  type: "string"
253
170
  },
254
171
  material: {
@@ -312,7 +229,7 @@ const claude = {
312
229
  type: "object",
313
230
  properties: {
314
231
  name: {
315
- description: "Name of the primary key field.\n\nConsistently named \"id\" across all models in the uploaded schemas.\nRepresents the unique identifier for each record in the table.",
232
+ 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.",
316
233
  type: "string",
317
234
  pattern: "^[a-z][a-z0-9_]*$"
318
235
  },
@@ -321,7 +238,7 @@ const claude = {
321
238
  "const": "uuid"
322
239
  },
323
240
  description: {
324
- 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.",
241
+ 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.",
325
242
  type: "string"
326
243
  }
327
244
  },
@@ -336,7 +253,7 @@ const claude = {
336
253
  type: "object",
337
254
  properties: {
338
255
  name: {
339
- description: "Name of the foreign key field.\n\nFollows convention: \"{target_model_name_without_prefix}_id\" Examples:\n\"shopping_customer_id\", \"bbs_article_id\", \"attachment_file_id\" For\nself-references: \"parent_id\" (e.g., in hierarchical structures)",
256
+ 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)",
340
257
  type: "string",
341
258
  pattern: "^[a-z][a-z0-9_]*$"
342
259
  },
@@ -345,7 +262,7 @@ const claude = {
345
262
  "const": "uuid"
346
263
  },
347
264
  description: {
348
- 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.",
265
+ 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.",
349
266
  type: "string"
350
267
  },
351
268
  relation: {
@@ -377,7 +294,7 @@ const claude = {
377
294
  name: {
378
295
  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",
379
296
  type: "string",
380
- pattern: "^[a-zA-Z_][a-zA-Z0-9_]*$"
297
+ pattern: "^[a-z][a-zA-Z0-9]*$"
381
298
  },
382
299
  targetModel: {
383
300
  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.",
@@ -394,7 +311,7 @@ const claude = {
394
311
  type: "object",
395
312
  properties: {
396
313
  name: {
397
- description: "Name of the field in the database table.\n\nShould use snake_case convention. Common patterns from uploaded schemas:\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",
314
+ 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",
398
315
  type: "string",
399
316
  pattern: "^[a-z][a-z0-9_]*$"
400
317
  },
@@ -425,7 +342,7 @@ const claude = {
425
342
  ]
426
343
  },
427
344
  description: {
428
- 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 Example: \"Amount of cash payment.\" or\n \"Whether the unit is required or not.\"",
345
+ 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.\"",
429
346
  type: "string"
430
347
  },
431
348
  nullable: {
@@ -496,46 +413,38 @@ const claude = {
496
413
  }
497
414
  }
498
415
  },
499
- 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.",
500
- validate: (() => { const _io0 = input => "string" === typeof input.thinking && "string" === typeof input.draft && "string" === typeof input.review && "string" === typeof input.final && (Array.isArray(input.models) && 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-zA-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.thinking || _report(_exceptionable, {
501
- path: _path + ".thinking",
502
- expected: "string",
503
- value: input.thinking
504
- }), "string" === typeof input.draft || _report(_exceptionable, {
505
- path: _path + ".draft",
506
- expected: "string",
507
- value: input.draft
508
- }), "string" === typeof input.review || _report(_exceptionable, {
416
+ description: "Reviews and validates Prisma schema modifications to ensure compliance with\ndatabase design best practices and business requirements.\n\nPerforms comprehensive validation of proposed schema changes including\nnormalization compliance, relationship integrity, performance optimization,\nand business logic alignment. The review process ensures all modifications\nmaintain data consistency and follow enterprise-level database standards.",
417
+ validate: (() => { const _io0 = input => "string" === typeof input.review && "string" === typeof input.plan && (Array.isArray(input.modifications) && input.modifications.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.review || _report(_exceptionable, {
509
418
  path: _path + ".review",
510
419
  expected: "string",
511
420
  value: input.review
512
- }), "string" === typeof input.final || _report(_exceptionable, {
513
- path: _path + ".final",
421
+ }), "string" === typeof input.plan || _report(_exceptionable, {
422
+ path: _path + ".plan",
514
423
  expected: "string",
515
- value: input.final
516
- }), (Array.isArray(input.models) || _report(_exceptionable, {
517
- path: _path + ".models",
424
+ value: input.plan
425
+ }), (Array.isArray(input.modifications) || _report(_exceptionable, {
426
+ path: _path + ".modifications",
518
427
  expected: "Array<AutoBePrisma.IModel>",
519
- value: input.models
520
- })) && input.models.map((elem, _index9) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
521
- path: _path + ".models[" + _index9 + "]",
428
+ value: input.modifications
429
+ })) && input.modifications.map((elem, _index9) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
430
+ path: _path + ".modifications[" + _index9 + "]",
522
431
  expected: "AutoBePrisma.IModel",
523
432
  value: elem
524
- })) && _vo1(elem, _path + ".models[" + _index9 + "]", true && _exceptionable) || _report(_exceptionable, {
525
- path: _path + ".models[" + _index9 + "]",
433
+ })) && _vo1(elem, _path + ".modifications[" + _index9 + "]", true && _exceptionable) || _report(_exceptionable, {
434
+ path: _path + ".modifications[" + _index9 + "]",
526
435
  expected: "AutoBePrisma.IModel",
527
436
  value: elem
528
437
  })).every(flag => flag) || _report(_exceptionable, {
529
- path: _path + ".models",
438
+ path: _path + ".modifications",
530
439
  expected: "Array<AutoBePrisma.IModel>",
531
- value: input.models
440
+ value: input.modifications
532
441
  })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
533
442
  path: _path + ".name",
534
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
443
+ expected: "string & SnakePattern",
535
444
  value: input.name
536
445
  })) || _report(_exceptionable, {
537
446
  path: _path + ".name",
538
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
447
+ expected: "(string & SnakePattern)",
539
448
  value: input.name
540
449
  }), "string" === typeof input.description || _report(_exceptionable, {
541
450
  path: _path + ".description",
@@ -635,11 +544,11 @@ const claude = {
635
544
  value: input.ginIndexes
636
545
  })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
637
546
  path: _path + ".name",
638
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
547
+ expected: "string & SnakePattern",
639
548
  value: input.name
640
549
  })) || _report(_exceptionable, {
641
550
  path: _path + ".name",
642
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
551
+ expected: "(string & SnakePattern)",
643
552
  value: input.name
644
553
  }), "uuid" === input.type || _report(_exceptionable, {
645
554
  path: _path + ".type",
@@ -651,11 +560,11 @@ const claude = {
651
560
  value: input.description
652
561
  })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
653
562
  path: _path + ".name",
654
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
563
+ expected: "string & SnakePattern",
655
564
  value: input.name
656
565
  })) || _report(_exceptionable, {
657
566
  path: _path + ".name",
658
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
567
+ expected: "(string & SnakePattern)",
659
568
  value: input.name
660
569
  }), "uuid" === input.type || _report(_exceptionable, {
661
570
  path: _path + ".type",
@@ -681,13 +590,13 @@ const claude = {
681
590
  path: _path + ".nullable",
682
591
  expected: "boolean",
683
592
  value: input.nullable
684
- })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-zA-Z_][a-zA-Z0-9_]*$").test(input.name) || _report(_exceptionable, {
593
+ })].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, {
685
594
  path: _path + ".name",
686
- expected: "string & Pattern<\"^[a-zA-Z_][a-zA-Z0-9_]*$\">",
595
+ expected: "string & CamelPattern",
687
596
  value: input.name
688
597
  })) || _report(_exceptionable, {
689
598
  path: _path + ".name",
690
- expected: "(string & Pattern<\"^[a-zA-Z_][a-zA-Z0-9_]*$\">)",
599
+ expected: "(string & CamelPattern)",
691
600
  value: input.name
692
601
  }), "string" === typeof input.targetModel || _report(_exceptionable, {
693
602
  path: _path + ".targetModel",
@@ -695,11 +604,11 @@ const claude = {
695
604
  value: input.targetModel
696
605
  })].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
697
606
  path: _path + ".name",
698
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
607
+ expected: "string & SnakePattern",
699
608
  value: input.name
700
609
  })) || _report(_exceptionable, {
701
610
  path: _path + ".name",
702
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
611
+ expected: "(string & SnakePattern)",
703
612
  value: input.name
704
613
  }), "string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type || _report(_exceptionable, {
705
614
  path: _path + ".type",
@@ -767,11 +676,11 @@ const claude = {
767
676
  _report = __typia_transform__validateReport._validateReport(errors);
768
677
  ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
769
678
  path: _path + "",
770
- expected: "IAutoBePrismaSchemaApplication.IProps",
679
+ expected: "IAutoBePrismaReviewApplication.IProps",
771
680
  value: input
772
681
  })) && _vo0(input, _path + "", true) || _report(true, {
773
682
  path: _path + "",
774
- expected: "IAutoBePrismaSchemaApplication.IProps",
683
+ expected: "IAutoBePrismaReviewApplication.IProps",
775
684
  value: input
776
685
  }))(input, "$input", true);
777
686
  const success = 0 === errors.length;
@@ -802,29 +711,21 @@ const collection = {
802
711
  },
803
712
  functions: [
804
713
  {
805
- name: "makePrismaSchemaFile",
714
+ name: "reviewSchemaFile",
806
715
  parameters: {
807
- description: " Properties containing the file\n\n------------------------------\n\nCurrent Type: {@link IAutoBePrismaSchemaApplication.IProps}",
716
+ description: "Current Type: {@link IAutoBePrismaReviewApplication.IProps}",
808
717
  type: "object",
809
718
  properties: {
810
- thinking: {
811
- description: "Step 1: 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",
812
- type: "string"
813
- },
814
- draft: {
815
- description: "Step 2: Initial Prisma schema code implementation.\n\nAI generates the first working version of the Prisma schema based on the\nstrategic plan. This draft must be syntactically correct Prisma Schema\nLanguage (PSL) code that implements all planned tables, relationships,\nand constraints. The schema should follow Prisma conventions while\nincorporating enterprise patterns like snapshot tables and materialized\nviews.\n\n**Implementation Requirements:**\n\n- **Exact Table Names**: Use EXACT names from targetComponent.tables (NO\n CHANGES)\n- **Valid PSL Syntax**: Proper model blocks, field definitions, and\n directives\n- **Primary Keys**: Always UUID type with `@id` directive\n- **Foreign Keys**: UUID type following {target_model}_id naming pattern\n- **Data Types**: uuid, string, int, double, datetime, boolean, uri (no\n pre-calculated fields)\n- **Relationships**: Proper `@relation` directives for 1:1, 1:N, M:N\n patterns\n- **Descriptions**: Follow format with requirements mapping and business\n purpose\n- **NO Prohibited Fields**: No totals, cached values, aggregates in regular\n tables\n\nWorkflow: Strategic plan \u2192 PSL implementation \u2192 Functional schema code",
816
- type: "string"
817
- },
818
719
  review: {
819
- description: "Step 3: Schema code review and quality assessment.\n\nAI performs a thorough review of the draft schema implementation,\nexamining multiple quality dimensions to ensure production readiness.\nThis review process identifies issues, suggests improvements, and\nvalidates compliance with best practices.\n\n**Review Dimensions:**\n\n**Syntax & Compilation:**\n\n- Prisma schema syntax errors and invalid directives\n- Model naming matches targetComponent.tables EXACTLY\n- Field type appropriateness (uuid for keys, no calculated fields)\n- Relationship definition correctness (`@relation` syntax)\n\n**Database Design Quality:**\n\n- **Normalization Compliance**:\n\n - 1NF: Atomic values, no repeating groups\n - 2NF: No partial dependencies on composite keys\n - 3NF: No transitive dependencies\n- **Prohibited Fields Check**: No pre-calculated totals, cached values, or\n aggregates in regular tables\n- **Snapshot Pattern**: Proper implementation for audit trails\n- **Junction Tables**: Correct naming ({table1}_{table2}) and structure\n\n**Index Strategy Validation:**\n\n- NO single foreign key indexes (Prisma auto-creates these)\n- Composite indexes for query patterns\n- Unique indexes for business constraints\n- GIN indexes for full-text search fields\n\n**Description Quality:**\n\n- Models include: requirement mapping, business purpose, relationships,\n behaviors\n- Fields include: requirement aspect, business meaning, normalization\n rationale\n\nWorkflow: Draft schema \u2192 Systematic analysis \u2192 Specific improvements",
720
+ description: "Comprehensive review analysis of the proposed schema modifications.\n\nContains the AI agent's detailed evaluation of the schema changes,\nincluding validation of normalization compliance, relationship integrity,\nindex optimization, and business requirement alignment. The review\nidentifies potential issues and confirms adherence to best practices.\n\n**Review Dimensions:**\n\n- **Normalization Validation**: Confirms 3NF compliance and proper data\n structure\n- **Relationship Integrity**: Validates foreign key references and\n cardinality\n- **Performance Optimization**: Reviews indexing strategy and query\n patterns\n- **Business Logic Alignment**: Ensures schema supports all use cases\n- **Naming Conventions**: Verifies consistent naming patterns\n- **Data Type Consistency**: Confirms appropriate field types\n- **Temporal Field Handling**: Validates audit trail implementation\n\n**Example:**\n\n \"After reviewing the schema modifications:\n 1. All tables properly implement UUID primary keys\n 2. Foreign key relationships correctly reference existing models\n 3. Composite indexes optimize for common query patterns\n 4. Snapshot tables include proper temporal fields\n 5. Materialized views (mv_) contain appropriate denormalization\n The schema follows all best practices and is ready for implementation.\"",
820
721
  type: "string"
821
722
  },
822
- final: {
823
- description: "Step 4: Final production-ready Prisma schema code.\n\nAI produces the final, polished version of the Prisma schema\nincorporating all review feedback. This code represents the completed\nschema implementation, ready for database migration and production\ndeployment. All identified issues must be resolved, and the schema must\nmeet enterprise-grade quality standards.\n\n**Final Schema Characteristics:**\n\n- **Complete Coverage**: All targetComponent.tables implemented with exact\n names\n- **Zero Errors**: Valid PSL syntax, no compilation warnings\n- **Proper Relationships**: All foreign keys reference existing tables\n correctly\n- **Optimized Indexes**: Strategic indexes without redundant foreign key\n indexes\n- **Full Normalization**: Strict 3NF compliance, denormalization only in\n mv_ tables\n- **Enterprise Documentation**: Complete descriptions with business context\n- **Audit Support**: Proper snapshot patterns and temporal fields\n (created_at, updated_at, deleted_at)\n- **Type Safety**: Consistent use of UUID for all keys, appropriate field\n types\n\nWorkflow: Review feedback \u2192 Schema refinement \u2192 Production-ready PSL code",
723
+ plan: {
724
+ description: "Strategic database design plan that guided the schema creation.\n\nContains the original planning document that outlines the database\narchitecture strategy, including table structures, relationships,\nnormalization approach, and business requirement mapping. This plan\nserves as the blueprint for validating the implemented schema.\n\n**Planning Components:**\n\n- **Business Requirements**: Mapping of business needs to database\n structures\n- **Table Design**: Entity definitions and attribute specifications\n- **Relationship Strategy**: Cardinality and referential integrity planning\n- **Normalization Approach**: Application of 1NF, 2NF, 3NF principles\n- **Performance Considerations**: Index strategy and query optimization\n- **Snapshot Architecture**: Temporal data handling and audit requirements\n- **Materialized Views**: Denormalization strategy for performance\n\n**Example:**\n\n \"Database Design Strategy:\n Component: Sales Domain\n Tables: shopping_sales, shopping_sale_snapshots, shopping_sale_units\n\n Design Approach:\n - Normalize product catalog to 3NF for data integrity\n - Implement snapshot pattern for price history tracking\n - Create composite indexes for product search queries\n - Use materialized views for sales analytics dashboards\"",
824
725
  type: "string"
825
726
  },
826
- models: {
827
- description: "Step 5: Structured AST representation of the Prisma schema models.\n\nAI transforms the final Prisma schema code into a structured Abstract\nSyntax Tree (AST) representation using the AutoBePrisma.IModel interface.\nThis involves critical reinterpretation and reclassification of the final\ncode to conform to AST constraints.\n\n**CRITICAL: Reinterpretation & Post-Processing Required**\n\nThe AI-generated final code may not directly map to valid AST structures\ndue to:\n\n- Complex Prisma directives that need decomposition\n- Field attributes that require reclassification\n- Implicit relationships that need explicit AST representation\n- Schema-level constructs that must be distributed to models\n\n**Required Post-Processing Steps:**\n\n1. **Field Reclassification**: Separate fields into primary, foreign, and\n plain categories\n2. **Relationship Extraction**: Convert `@relation` directives to IRelation\n structures\n3. **Index Decomposition**: Parse `@@index`, `@@unique` into appropriate\n index arrays\n4. **Type Normalization**: Map Prisma types to AST type enum values\n5. **Constraint Resolution**: Convert schema constraints to AST properties\n\n**AST Structure Requirements:**\n\n- **Model Array**: Each table from targetComponent.tables as IModel\n- **Primary Field**: Always UUID type with name \"id\"\n- **Foreign Fields**: Proper IRelation configurations for all relationships\n- **Plain Fields**: Business fields with correct types (no calculated\n fields)\n- **Indexes**:\n\n - UniqueIndexes: Business constraints and composite unique keys\n - PlainIndexes: Query optimization (no single foreign key indexes)\n - GinIndexes: Full-text search on string fields\n- **Material Flag**: true only for mv_ prefixed tables\n\n**Relationship Patterns in AST:**\n\n- 1:1: Foreign field with unique: true\n- 1:N: Foreign field with unique: false\n- M:N: Separate junction table model with composite indexes\n\nWorkflow: Final PSL code \u2192 Reinterpretation \u2192 AST transformation \u2192\nStructured models\n\nThis structured representation serves as the ultimate deliverable for\nprogrammatic schema generation and manipulation.",
727
+ modifications: {
728
+ description: "Array of Prisma models that have been modified based on review feedback.\n\nContains ONLY the models that required changes, not the entire schema.\nEach model represents a complete table definition with all fields,\nrelationships, indexes, and documentation. These modifications will be\napplied to the models to produce the final implementation.\n\n**Model Requirements:**\n\n- **Complete Models**: Each entry must be a complete model definition\n- **Targeted Changes**: Only includes models that need modifications\n- **AST Compliance**: Follows AutoBePrisma.IModel interface structure\n- **Relationship Integrity**: All foreign keys reference valid models\n- **Index Optimization**: Strategic indexes without redundancy\n- **Documentation**: Comprehensive English descriptions\n\n**Notes:**\n\n- Models not included in this array remain unchanged from the models\n- The final schema merges these modifications with the original models\n- All modifications must resolve issues identified in the review",
828
729
  type: "array",
829
730
  items: {
830
731
  $ref: "#/$defs/AutoBePrisma.IModel"
@@ -832,11 +733,9 @@ const collection = {
832
733
  }
833
734
  },
834
735
  required: [
835
- "thinking",
836
- "draft",
837
736
  "review",
838
- "final",
839
- "models"
737
+ "plan",
738
+ "modifications"
840
739
  ],
841
740
  additionalProperties: false,
842
741
  $defs: {
@@ -845,11 +744,11 @@ const collection = {
845
744
  type: "object",
846
745
  properties: {
847
746
  name: {
848
- description: "Name of the Prisma model (database table name).\n\nShould follow snake_case convention with domain prefix. Examples:\n\"shopping_customers\", \"shopping_sale_snapshots\", \"bbs_articles\"\nMaterialized views use \"mv_\" prefix: \"mv_shopping_sale_last_snapshots\"\n\n\n@pattern ^[a-z][a-z0-9_]*$",
747
+ 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_]*$",
849
748
  type: "string"
850
749
  },
851
750
  description: {
852
- 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 Example:\n \"Customer information, but not a person but a **connection** basis...\"",
751
+ 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...\"",
853
752
  type: "string"
854
753
  },
855
754
  material: {
@@ -912,7 +811,7 @@ const collection = {
912
811
  type: "object",
913
812
  properties: {
914
813
  name: {
915
- description: "Name of the primary key field.\n\nConsistently named \"id\" across all models in the uploaded schemas.\nRepresents the unique identifier for each record in the table.\n\n\n@pattern ^[a-z][a-z0-9_]*$",
814
+ 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_]*$",
916
815
  type: "string"
917
816
  },
918
817
  type: {
@@ -923,7 +822,7 @@ const collection = {
923
822
  ]
924
823
  },
925
824
  description: {
926
- 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.",
825
+ 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.",
927
826
  type: "string"
928
827
  }
929
828
  },
@@ -938,7 +837,7 @@ const collection = {
938
837
  type: "object",
939
838
  properties: {
940
839
  name: {
941
- description: "Name of the foreign key field.\n\nFollows convention: \"{target_model_name_without_prefix}_id\" Examples:\n\"shopping_customer_id\", \"bbs_article_id\", \"attachment_file_id\" For\nself-references: \"parent_id\" (e.g., in hierarchical structures)\n\n\n@pattern ^[a-z][a-z0-9_]*$",
840
+ 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_]*$",
942
841
  type: "string"
943
842
  },
944
843
  type: {
@@ -949,7 +848,7 @@ const collection = {
949
848
  ]
950
849
  },
951
850
  description: {
952
- 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.",
851
+ 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.",
953
852
  type: "string"
954
853
  },
955
854
  relation: {
@@ -978,7 +877,7 @@ const collection = {
978
877
  type: "object",
979
878
  properties: {
980
879
  name: {
981
- 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-zA-Z_][a-zA-Z0-9_]*$",
880
+ 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]*$",
982
881
  type: "string"
983
882
  },
984
883
  targetModel: {
@@ -996,7 +895,7 @@ const collection = {
996
895
  type: "object",
997
896
  properties: {
998
897
  name: {
999
- description: "Name of the field in the database table.\n\nShould use snake_case convention. Common patterns from uploaded schemas:\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_]*$",
898
+ 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_]*$",
1000
899
  type: "string"
1001
900
  },
1002
901
  type: {
@@ -1013,7 +912,7 @@ const collection = {
1013
912
  ]
1014
913
  },
1015
914
  description: {
1016
- 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 Example: \"Amount of cash payment.\" or\n \"Whether the unit is required or not.\"",
915
+ 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.\"",
1017
916
  type: "string"
1018
917
  },
1019
918
  nullable: {
@@ -1083,46 +982,38 @@ const collection = {
1083
982
  }
1084
983
  }
1085
984
  },
1086
- 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.",
1087
- validate: (() => { const _io0 = input => "string" === typeof input.thinking && "string" === typeof input.draft && "string" === typeof input.review && "string" === typeof input.final && (Array.isArray(input.models) && 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-zA-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.thinking || _report(_exceptionable, {
1088
- path: _path + ".thinking",
1089
- expected: "string",
1090
- value: input.thinking
1091
- }), "string" === typeof input.draft || _report(_exceptionable, {
1092
- path: _path + ".draft",
1093
- expected: "string",
1094
- value: input.draft
1095
- }), "string" === typeof input.review || _report(_exceptionable, {
985
+ description: "Reviews and validates Prisma schema modifications to ensure compliance with\ndatabase design best practices and business requirements.\n\nPerforms comprehensive validation of proposed schema changes including\nnormalization compliance, relationship integrity, performance optimization,\nand business logic alignment. The review process ensures all modifications\nmaintain data consistency and follow enterprise-level database standards.",
986
+ validate: (() => { const _io0 = input => "string" === typeof input.review && "string" === typeof input.plan && (Array.isArray(input.modifications) && input.modifications.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.review || _report(_exceptionable, {
1096
987
  path: _path + ".review",
1097
988
  expected: "string",
1098
989
  value: input.review
1099
- }), "string" === typeof input.final || _report(_exceptionable, {
1100
- path: _path + ".final",
990
+ }), "string" === typeof input.plan || _report(_exceptionable, {
991
+ path: _path + ".plan",
1101
992
  expected: "string",
1102
- value: input.final
1103
- }), (Array.isArray(input.models) || _report(_exceptionable, {
1104
- path: _path + ".models",
993
+ value: input.plan
994
+ }), (Array.isArray(input.modifications) || _report(_exceptionable, {
995
+ path: _path + ".modifications",
1105
996
  expected: "Array<AutoBePrisma.IModel>",
1106
- value: input.models
1107
- })) && input.models.map((elem, _index9) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1108
- path: _path + ".models[" + _index9 + "]",
997
+ value: input.modifications
998
+ })) && input.modifications.map((elem, _index9) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
999
+ path: _path + ".modifications[" + _index9 + "]",
1109
1000
  expected: "AutoBePrisma.IModel",
1110
1001
  value: elem
1111
- })) && _vo1(elem, _path + ".models[" + _index9 + "]", true && _exceptionable) || _report(_exceptionable, {
1112
- path: _path + ".models[" + _index9 + "]",
1002
+ })) && _vo1(elem, _path + ".modifications[" + _index9 + "]", true && _exceptionable) || _report(_exceptionable, {
1003
+ path: _path + ".modifications[" + _index9 + "]",
1113
1004
  expected: "AutoBePrisma.IModel",
1114
1005
  value: elem
1115
1006
  })).every(flag => flag) || _report(_exceptionable, {
1116
- path: _path + ".models",
1007
+ path: _path + ".modifications",
1117
1008
  expected: "Array<AutoBePrisma.IModel>",
1118
- value: input.models
1009
+ value: input.modifications
1119
1010
  })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1120
1011
  path: _path + ".name",
1121
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1012
+ expected: "string & SnakePattern",
1122
1013
  value: input.name
1123
1014
  })) || _report(_exceptionable, {
1124
1015
  path: _path + ".name",
1125
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1016
+ expected: "(string & SnakePattern)",
1126
1017
  value: input.name
1127
1018
  }), "string" === typeof input.description || _report(_exceptionable, {
1128
1019
  path: _path + ".description",
@@ -1222,11 +1113,11 @@ const collection = {
1222
1113
  value: input.ginIndexes
1223
1114
  })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1224
1115
  path: _path + ".name",
1225
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1116
+ expected: "string & SnakePattern",
1226
1117
  value: input.name
1227
1118
  })) || _report(_exceptionable, {
1228
1119
  path: _path + ".name",
1229
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1120
+ expected: "(string & SnakePattern)",
1230
1121
  value: input.name
1231
1122
  }), "uuid" === input.type || _report(_exceptionable, {
1232
1123
  path: _path + ".type",
@@ -1238,11 +1129,11 @@ const collection = {
1238
1129
  value: input.description
1239
1130
  })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1240
1131
  path: _path + ".name",
1241
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1132
+ expected: "string & SnakePattern",
1242
1133
  value: input.name
1243
1134
  })) || _report(_exceptionable, {
1244
1135
  path: _path + ".name",
1245
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1136
+ expected: "(string & SnakePattern)",
1246
1137
  value: input.name
1247
1138
  }), "uuid" === input.type || _report(_exceptionable, {
1248
1139
  path: _path + ".type",
@@ -1268,13 +1159,13 @@ const collection = {
1268
1159
  path: _path + ".nullable",
1269
1160
  expected: "boolean",
1270
1161
  value: input.nullable
1271
- })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-zA-Z_][a-zA-Z0-9_]*$").test(input.name) || _report(_exceptionable, {
1162
+ })].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, {
1272
1163
  path: _path + ".name",
1273
- expected: "string & Pattern<\"^[a-zA-Z_][a-zA-Z0-9_]*$\">",
1164
+ expected: "string & CamelPattern",
1274
1165
  value: input.name
1275
1166
  })) || _report(_exceptionable, {
1276
1167
  path: _path + ".name",
1277
- expected: "(string & Pattern<\"^[a-zA-Z_][a-zA-Z0-9_]*$\">)",
1168
+ expected: "(string & CamelPattern)",
1278
1169
  value: input.name
1279
1170
  }), "string" === typeof input.targetModel || _report(_exceptionable, {
1280
1171
  path: _path + ".targetModel",
@@ -1282,11 +1173,11 @@ const collection = {
1282
1173
  value: input.targetModel
1283
1174
  })].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1284
1175
  path: _path + ".name",
1285
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1176
+ expected: "string & SnakePattern",
1286
1177
  value: input.name
1287
1178
  })) || _report(_exceptionable, {
1288
1179
  path: _path + ".name",
1289
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1180
+ expected: "(string & SnakePattern)",
1290
1181
  value: input.name
1291
1182
  }), "string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type || _report(_exceptionable, {
1292
1183
  path: _path + ".type",
@@ -1354,11 +1245,11 @@ const collection = {
1354
1245
  _report = __typia_transform__validateReport._validateReport(errors);
1355
1246
  ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
1356
1247
  path: _path + "",
1357
- expected: "IAutoBePrismaSchemaApplication.IProps",
1248
+ expected: "IAutoBePrismaReviewApplication.IProps",
1358
1249
  value: input
1359
1250
  })) && _vo0(input, _path + "", true) || _report(true, {
1360
1251
  path: _path + "",
1361
- expected: "IAutoBePrismaSchemaApplication.IProps",
1252
+ expected: "IAutoBePrismaReviewApplication.IProps",
1362
1253
  value: input
1363
1254
  }))(input, "$input", true);
1364
1255
  const success = 0 === errors.length;
@@ -1384,4 +1275,4 @@ const collection = {
1384
1275
  deepseek: claude,
1385
1276
  "3.1": claude,
1386
1277
  };
1387
- //# sourceMappingURL=orchestratePrismaSchemas.js.map
1278
+ //# sourceMappingURL=orchestratePrismaReview.js.map