@autobe/agent 0.17.1 → 0.19.1

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 (727) hide show
  1. package/lib/AutoBeMockAgent.d.ts +2 -10
  2. package/lib/agent/src/AutoBeAgent.d.ts +52 -0
  3. package/lib/{AutoBeAgent.js → agent/src/AutoBeAgent.js} +34 -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 +7 -0
  8. package/lib/{AutoBeMockAgent.js → agent/src/AutoBeMockAgent.js} +40 -5
  9. package/lib/agent/src/AutoBeMockAgent.js.map +1 -0
  10. package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +28 -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 +117 -0
  20. package/lib/{context → agent/src/context}/AutoBeTokenUsageComponent.js +33 -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/consentFunctionCall.d.ts +10 -0
  31. package/lib/agent/src/factory/consentFunctionCall.js +212 -0
  32. package/lib/agent/src/factory/consentFunctionCall.js.map +1 -0
  33. package/lib/agent/src/factory/createAgenticaHistory.d.ts +7 -0
  34. package/lib/{factory → agent/src/factory}/createAgenticaHistory.js +1 -0
  35. package/lib/agent/src/factory/createAgenticaHistory.js.map +1 -0
  36. package/lib/agent/src/factory/createAutoBeApplication.d.ts +7 -0
  37. package/lib/agent/src/factory/createAutoBeApplication.js.map +1 -0
  38. package/lib/agent/src/factory/createAutoBeContext.d.ts +19 -0
  39. package/lib/agent/src/factory/createAutoBeContext.js +271 -0
  40. package/lib/agent/src/factory/createAutoBeContext.js.map +1 -0
  41. package/lib/agent/src/factory/createAutoBeState.d.ts +3 -0
  42. package/lib/agent/src/factory/createAutoBeState.js.map +1 -0
  43. package/lib/agent/src/factory/getAutoBeGenerated.d.ts +4 -0
  44. package/lib/{factory → agent/src/factory}/getAutoBeGenerated.js +3 -3
  45. package/lib/agent/src/factory/getAutoBeGenerated.js.map +1 -0
  46. package/lib/agent/src/factory/getAutoBeRealizeGenerated.d.ts +7 -0
  47. package/lib/agent/src/factory/getAutoBeRealizeGenerated.js.map +1 -0
  48. package/lib/agent/src/factory/index.d.ts +1 -0
  49. package/lib/agent/src/factory/index.js.map +1 -0
  50. package/lib/agent/src/index.d.ts +6 -0
  51. package/lib/agent/src/index.js.map +1 -0
  52. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +6 -0
  53. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js +46 -0
  54. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js.map +1 -0
  55. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +4 -0
  56. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +30 -0
  57. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -0
  58. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +6 -0
  59. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +61 -0
  60. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -0
  61. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.d.ts +5 -0
  62. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js +69 -0
  63. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js.map +1 -0
  64. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +5 -0
  65. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +265 -0
  66. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -0
  67. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.d.ts +4 -0
  68. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +714 -0
  69. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -0
  70. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +8 -0
  71. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +244 -0
  72. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -0
  73. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +105 -0
  74. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.js +3 -0
  75. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.js.map +1 -0
  76. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +78 -0
  77. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.js +3 -0
  78. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.js.map +1 -0
  79. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +70 -0
  80. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.js +3 -0
  81. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.js.map +1 -0
  82. package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.d.ts +2 -0
  83. package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.js.map +1 -0
  84. package/lib/agent/src/orchestrate/index.d.ts +5 -0
  85. package/lib/agent/src/orchestrate/index.js.map +1 -0
  86. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.d.ts +3 -0
  87. package/lib/{orchestrate → agent/src/orchestrate}/interface/histories/transformInterfaceAssetHistories.js +1 -0
  88. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -0
  89. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +4 -0
  90. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +34 -0
  91. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -0
  92. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.d.ts +4 -0
  93. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +62 -0
  94. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -0
  95. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +5 -0
  96. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +41 -0
  97. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -0
  98. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.d.ts +3 -0
  99. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +28 -0
  100. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -0
  101. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.d.ts +4 -0
  102. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +51 -0
  103. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -0
  104. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.d.ts +5 -0
  105. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +35 -0
  106. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -0
  107. package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.d.ts +3 -0
  108. package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js.map +1 -0
  109. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.d.ts +4 -0
  110. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +28 -0
  111. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -0
  112. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +4 -0
  113. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +59 -0
  114. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -0
  115. package/lib/agent/src/orchestrate/interface/orchestrateInterface.d.ts +5 -0
  116. package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterface.js +34 -9
  117. package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -0
  118. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +4 -0
  119. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +1731 -0
  120. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -0
  121. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.d.ts +4 -0
  122. package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceComplement.js +42 -36
  123. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -0
  124. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +5 -0
  125. package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceEndpoints.js +40 -41
  126. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -0
  127. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.d.ts +4 -0
  128. package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceGroups.js +24 -38
  129. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -0
  130. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.d.ts +4 -0
  131. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +1774 -0
  132. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -0
  133. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +4 -0
  134. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +1328 -0
  135. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -0
  136. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.d.ts +4 -0
  137. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js +561 -0
  138. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -0
  139. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +7 -0
  140. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +473 -0
  141. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -0
  142. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.d.ts +47 -0
  143. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.js +3 -0
  144. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.js.map +1 -0
  145. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +93 -0
  146. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.js.map +1 -0
  147. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.d.ts +24 -0
  148. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.js.map +1 -0
  149. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +108 -0
  150. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.js.map +1 -0
  151. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +171 -0
  152. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js.map +1 -0
  153. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +132 -0
  154. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.js +3 -0
  155. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.js.map +1 -0
  156. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +107 -0
  157. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js.map +1 -0
  158. package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +85 -0
  159. package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.js +3 -0
  160. package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.js.map +1 -0
  161. package/lib/agent/src/orchestrate/interface/utils/OpenApiEndpointComparator.d.ts +6 -0
  162. package/lib/agent/src/orchestrate/interface/utils/OpenApiEndpointComparator.js.map +1 -0
  163. package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +7 -0
  164. package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js +35 -0
  165. package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js.map +1 -0
  166. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.d.ts +3 -0
  167. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +79 -0
  168. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -0
  169. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.d.ts +3 -0
  170. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +52 -0
  171. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -0
  172. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.d.ts +8 -0
  173. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +59 -0
  174. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -0
  175. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +3 -0
  176. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +48 -0
  177. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -0
  178. package/lib/agent/src/orchestrate/prisma/orchestratePrisma.d.ts +5 -0
  179. package/lib/{orchestrate → agent/src/orchestrate}/prisma/orchestratePrisma.js +40 -14
  180. package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +1 -0
  181. package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.d.ts +4 -0
  182. package/lib/{orchestrate → agent/src/orchestrate}/prisma/orchestratePrismaComponent.js +43 -48
  183. package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -0
  184. package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.d.ts +4 -0
  185. package/lib/{orchestrate → agent/src/orchestrate}/prisma/orchestratePrismaCorrect.js +154 -83
  186. package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -0
  187. package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.d.ts +5 -0
  188. package/lib/{orchestrate/prisma/orchestratePrismaSchemas.js → agent/src/orchestrate/prisma/orchestratePrismaReview.js} +180 -248
  189. package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js.map +1 -0
  190. package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.d.ts +5 -0
  191. package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js +1662 -0
  192. package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -0
  193. package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.d.ts +121 -0
  194. package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.js.map +1 -0
  195. package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.d.ts +142 -0
  196. package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.js.map +1 -0
  197. package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.d.ts +105 -0
  198. package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.js +3 -0
  199. package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.js.map +1 -0
  200. package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.d.ts +99 -0
  201. package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.js.map +1 -0
  202. package/lib/agent/src/orchestrate/realize/ProviderCodeComparator.d.ts +5 -0
  203. package/lib/agent/src/orchestrate/realize/ProviderCodeComparator.js.map +1 -0
  204. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.d.ts +5 -0
  205. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +40 -0
  206. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -0
  207. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.d.ts +5 -0
  208. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +80 -0
  209. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -0
  210. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +14 -0
  211. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +32 -0
  212. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -0
  213. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +3 -0
  214. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +278 -0
  215. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -0
  216. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +14 -0
  217. package/lib/{orchestrate/realize/transformRealizeCoderHistories.js → agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js} +31 -92
  218. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -0
  219. package/lib/agent/src/orchestrate/realize/internal/compile.d.ts +7 -0
  220. package/lib/agent/src/orchestrate/realize/internal/compile.js +44 -0
  221. package/lib/agent/src/orchestrate/realize/internal/compile.js.map +1 -0
  222. package/lib/agent/src/orchestrate/realize/orchestrateRealize.d.ts +5 -0
  223. package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +130 -0
  224. package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -0
  225. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.d.ts +10 -0
  226. package/lib/{orchestrate → agent/src/orchestrate}/realize/orchestrateRealizeAuthorization.js +84 -70
  227. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -0
  228. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.d.ts +4 -0
  229. package/lib/{orchestrate → agent/src/orchestrate}/realize/orchestrateRealizeAuthorizationCorrect.js +66 -52
  230. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -0
  231. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +16 -0
  232. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +352 -0
  233. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -0
  234. package/lib/{orchestrate/realize/orchestrateRealizePlanner.d.ts → agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts} +5 -3
  235. package/lib/{orchestrate/realize/orchestrateRealizePlanner.js → agent/src/orchestrate/realize/orchestrateRealizeScenario.js} +14 -24
  236. package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -0
  237. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +14 -0
  238. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +345 -0
  239. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -0
  240. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +92 -0
  241. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js.map +1 -0
  242. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +27 -0
  243. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js.map +1 -0
  244. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +79 -0
  245. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.js +3 -0
  246. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.js.map +1 -0
  247. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +38 -0
  248. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js +3 -0
  249. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js.map +1 -0
  250. package/lib/{orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts → agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts} +22 -88
  251. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.js +3 -0
  252. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.js.map +1 -0
  253. package/lib/agent/src/orchestrate/realize/utils/AuthorizationFileSystem.d.ts +5 -0
  254. package/lib/agent/src/orchestrate/realize/utils/AuthorizationFileSystem.js.map +1 -0
  255. package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.d.ts +5 -0
  256. package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.js.map +1 -0
  257. package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.d.ts +4 -0
  258. package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js.map +1 -0
  259. package/lib/agent/src/orchestrate/realize/utils/InternalFileSystem.d.ts +8 -0
  260. package/lib/agent/src/orchestrate/realize/utils/InternalFileSystem.js.map +1 -0
  261. package/lib/agent/src/orchestrate/realize/utils/ProviderFileSystem.d.ts +3 -0
  262. package/lib/agent/src/orchestrate/realize/utils/ProviderFileSystem.js.map +1 -0
  263. package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.d.ts +4 -0
  264. package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/replaceImportStatements.js +6 -1
  265. package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js.map +1 -0
  266. package/lib/agent/src/orchestrate/test/compile/completeTestCode.d.ts +2 -0
  267. package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +1 -0
  268. package/lib/agent/src/orchestrate/test/compile/filterTestFileName.d.ts +1 -0
  269. package/lib/agent/src/orchestrate/test/compile/filterTestFileName.js.map +1 -0
  270. package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.d.ts +3 -0
  271. package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -0
  272. package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +5 -0
  273. package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -0
  274. package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestCorrectHistories.d.ts +1 -1
  275. package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +34 -0
  276. package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -0
  277. package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestHistories.d.ts +1 -1
  278. package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +1 -0
  279. package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.d.ts +4 -0
  280. package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +101 -0
  281. package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -0
  282. package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestWriteHistories.d.ts +1 -1
  283. package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +179 -0
  284. package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -0
  285. package/lib/agent/src/orchestrate/test/orchestrateTest.d.ts +5 -0
  286. package/lib/{orchestrate → agent/src/orchestrate}/test/orchestrateTest.js +16 -4
  287. package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -0
  288. package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.d.ts +5 -0
  289. package/lib/{orchestrate → agent/src/orchestrate}/test/orchestrateTestCorrect.js +31 -47
  290. package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -0
  291. package/lib/agent/src/orchestrate/test/orchestrateTestScenario.d.ts +4 -0
  292. package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +961 -0
  293. package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -0
  294. package/lib/agent/src/orchestrate/test/orchestrateTestWrite.d.ts +5 -0
  295. package/lib/{orchestrate → agent/src/orchestrate}/test/orchestrateTestWrite.js +53 -54
  296. package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -0
  297. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +122 -0
  298. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +1 -0
  299. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunction.d.ts +8 -0
  300. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunction.js.map +1 -0
  301. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +134 -0
  302. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.js.map +1 -0
  303. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.d.ts +7 -0
  304. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.js.map +1 -0
  305. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
  306. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.js +3 -0
  307. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.js.map +1 -0
  308. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +113 -0
  309. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +1 -0
  310. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteResult.d.ts +7 -0
  311. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +1 -0
  312. package/lib/agent/src/structures/IAutoBeConfig.d.ts +73 -0
  313. package/lib/agent/src/structures/IAutoBeConfig.js.map +1 -0
  314. package/lib/agent/src/structures/IAutoBeProps.d.ts +109 -0
  315. package/lib/agent/src/structures/IAutoBeProps.js.map +1 -0
  316. package/lib/agent/src/structures/IAutoBeVendor.d.ts +87 -0
  317. package/lib/agent/src/structures/IAutoBeVendor.js.map +1 -0
  318. package/lib/agent/src/utils/arrayToRecord.d.ts +17 -0
  319. package/lib/agent/src/utils/arrayToRecord.js.map +1 -0
  320. package/lib/agent/src/utils/backoffRetry.d.ts +22 -0
  321. package/lib/agent/src/utils/backoffRetry.js.map +1 -0
  322. package/lib/agent/src/utils/divideArray.d.ts +4 -0
  323. package/lib/agent/src/utils/divideArray.js.map +1 -0
  324. package/lib/agent/src/utils/emplaceMap.d.ts +1 -0
  325. package/lib/agent/src/utils/emplaceMap.js.map +1 -0
  326. package/lib/agent/src/utils/predicateStateMessage.d.ts +4 -0
  327. package/lib/agent/src/utils/predicateStateMessage.js +87 -0
  328. package/lib/agent/src/utils/predicateStateMessage.js.map +1 -0
  329. package/lib/constants/AutoBeSystemPromptConstant.d.ts +24 -28
  330. package/lib/context/AutoBeContext.d.ts +16 -5
  331. package/lib/context/AutoBeTokenUsageComponent.d.ts +1 -0
  332. package/lib/factory/consentFunctionCall.d.ts +10 -0
  333. package/lib/index.mjs +11323 -5336
  334. package/lib/index.mjs.map +1 -1
  335. package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.d.ts +153 -0
  336. package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.js +3 -0
  337. package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.js.map +1 -0
  338. package/lib/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +6 -0
  339. package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +4 -0
  340. package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +6 -0
  341. package/lib/orchestrate/analyze/orchestrateAnalyze.d.ts +0 -1
  342. package/lib/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +5 -0
  343. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.d.ts +4 -0
  344. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -12
  345. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +105 -0
  346. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +78 -0
  347. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +70 -0
  348. package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +4 -0
  349. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +2 -1
  350. package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.d.ts +5 -0
  351. package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +4 -0
  352. package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +4 -0
  353. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +1 -1
  354. package/lib/orchestrate/interface/orchestrateInterfaceGroups.d.ts +2 -2
  355. package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +4 -0
  356. package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +7 -0
  357. package/lib/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.d.ts +47 -0
  358. package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +38 -0
  359. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.d.ts +2 -1
  360. package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +16 -16
  361. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +64 -15
  362. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +132 -0
  363. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +46 -14
  364. package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +85 -0
  365. package/lib/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +7 -0
  366. package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.d.ts +8 -0
  367. package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +1 -1
  368. package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -2
  369. package/lib/orchestrate/prisma/orchestratePrismaReview.d.ts +5 -0
  370. package/lib/orchestrate/prisma/orchestratePrismaSchemas.d.ts +1 -1
  371. package/lib/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.d.ts +2 -1
  372. package/lib/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.d.ts +105 -0
  373. package/lib/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.d.ts +43 -153
  374. package/lib/orchestrate/realize/histories/transformRealizeAuthorization.d.ts +5 -0
  375. package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.d.ts +5 -0
  376. package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +14 -0
  377. package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +3 -0
  378. package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +14 -0
  379. package/lib/orchestrate/realize/internal/compile.d.ts +7 -0
  380. package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +16 -0
  381. package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +91 -0
  382. package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +14 -0
  383. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +10 -3
  384. package/lib/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +79 -0
  385. package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +38 -0
  386. package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +279 -0
  387. package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +4 -0
  388. package/lib/orchestrate/test/histories/transformTestHistories.d.ts +3 -0
  389. package/lib/orchestrate/test/histories/transformTestScenarioHistories.d.ts +4 -0
  390. package/lib/orchestrate/test/histories/transformTestWriteHistories.d.ts +8 -0
  391. package/lib/orchestrate/test/orchestrateTestScenario.d.ts +2 -2
  392. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +6 -5
  393. package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +25 -24
  394. package/lib/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
  395. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -1
  396. package/lib/utils/predicateStateMessage.d.ts +4 -0
  397. package/package.json +9 -9
  398. package/src/AutoBeAgent.ts +51 -3
  399. package/src/AutoBeMockAgent.ts +44 -16
  400. package/src/constants/AutoBeSystemPromptConstant.ts +24 -28
  401. package/src/context/AutoBeContext.ts +30 -4
  402. package/src/context/AutoBeTokenUsage.ts +8 -0
  403. package/src/context/AutoBeTokenUsageComponent.ts +40 -2
  404. package/src/factory/consentFunctionCall.ts +128 -0
  405. package/src/factory/createAgenticaHistory.ts +1 -0
  406. package/src/factory/createAutoBeApplication.ts +3 -11
  407. package/src/factory/createAutoBeContext.ts +149 -1
  408. package/src/factory/getAutoBeGenerated.ts +3 -3
  409. package/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.ts +60 -0
  410. package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +34 -0
  411. package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +78 -0
  412. package/src/orchestrate/analyze/orchestrateAnalyze.ts +66 -80
  413. package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +89 -0
  414. package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +99 -0
  415. package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +53 -52
  416. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +108 -0
  417. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +85 -0
  418. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.ts +71 -0
  419. package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +1 -0
  420. package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +40 -0
  421. package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +17 -0
  422. package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +45 -22
  423. package/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.ts +43 -0
  424. package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +69 -0
  425. package/src/orchestrate/interface/orchestrateInterface.ts +57 -10
  426. package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +209 -0
  427. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +27 -44
  428. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +28 -34
  429. package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +18 -48
  430. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +216 -107
  431. package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +101 -0
  432. package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +180 -96
  433. package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +145 -0
  434. package/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.ts +49 -0
  435. package/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.ts +39 -0
  436. package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.ts +2 -1
  437. package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +16 -16
  438. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +67 -15
  439. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +139 -0
  440. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +47 -14
  441. package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +92 -0
  442. package/src/orchestrate/interface/utils/validateAuthorizationSchema.ts +41 -0
  443. package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +9 -16
  444. package/src/orchestrate/prisma/histories/transformPrismaReviewHistories.ts +66 -0
  445. package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +2 -2
  446. package/src/orchestrate/prisma/orchestratePrisma.ts +55 -17
  447. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +19 -49
  448. package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +96 -58
  449. package/src/orchestrate/prisma/orchestratePrismaReview.ts +124 -0
  450. package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +133 -139
  451. package/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.ts +2 -1
  452. package/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.ts +108 -0
  453. package/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.ts +43 -156
  454. package/src/orchestrate/realize/histories/transformRealizeAuthorization.ts +48 -0
  455. package/src/orchestrate/realize/{transformRealizeAuthorizationCorrectHistories.ts → histories/transformRealizeAuthorizationCorrectHistories.ts} +28 -30
  456. package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +49 -0
  457. package/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.ts +285 -0
  458. package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +184 -0
  459. package/src/orchestrate/realize/internal/compile.ts +67 -0
  460. package/src/orchestrate/realize/orchestrateRealize.ts +125 -30
  461. package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +45 -57
  462. package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +19 -41
  463. package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +122 -0
  464. package/src/orchestrate/realize/{orchestrateRealizePlanner.ts → orchestrateRealizeScenario.ts} +15 -15
  465. package/src/orchestrate/realize/orchestrateRealizeWrite.ts +128 -0
  466. package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +11 -3
  467. package/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.ts +81 -0
  468. package/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.ts +43 -0
  469. package/src/orchestrate/realize/structures/{IAutoBeRealizeCoderApplication.ts → IAutoBeRealizeWriteApplication.ts} +22 -95
  470. package/src/orchestrate/realize/utils/replaceImportStatements.ts +10 -1
  471. package/src/orchestrate/test/experimental/orchestrateTestCorrect.ast +5 -9
  472. package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +23 -22
  473. package/src/orchestrate/test/{transformTestCorrectHistories.ts → histories/transformTestCorrectHistories.ts} +2 -2
  474. package/src/orchestrate/test/{transformTestHistories.ts → histories/transformTestHistories.ts} +1 -1
  475. package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +121 -0
  476. package/src/orchestrate/test/{transformTestWriteHistories.ts → histories/transformTestWriteHistories.ts} +3 -3
  477. package/src/orchestrate/test/orchestrateTest.ts +17 -6
  478. package/src/orchestrate/test/orchestrateTestCorrect.ts +32 -62
  479. package/src/orchestrate/test/orchestrateTestScenario.ts +241 -168
  480. package/src/orchestrate/test/orchestrateTestWrite.ts +48 -71
  481. package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +6 -5
  482. package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +25 -24
  483. package/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.ts +7 -0
  484. package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +3 -1
  485. package/src/utils/predicateStateMessage.ts +107 -0
  486. package/lib/AutoBeAgent.js.map +0 -1
  487. package/lib/AutoBeAgentBase.js.map +0 -1
  488. package/lib/AutoBeMockAgent.js.map +0 -1
  489. package/lib/constants/AutoBeSystemPromptConstant.js.map +0 -1
  490. package/lib/context/AutoBeContext.js.map +0 -1
  491. package/lib/context/AutoBeState.js.map +0 -1
  492. package/lib/context/AutoBeTokenUsage.js.map +0 -1
  493. package/lib/context/AutoBeTokenUsageComponent.js.map +0 -1
  494. package/lib/context/IAutoBeApplication.js.map +0 -1
  495. package/lib/context/IAutoBeApplicationProps.js.map +0 -1
  496. package/lib/context/IAutoBeApplicationResult.js.map +0 -1
  497. package/lib/context/assertSchemaModel.js.map +0 -1
  498. package/lib/factory/createAgenticaHistory.js.map +0 -1
  499. package/lib/factory/createAutoBeApplication.js.map +0 -1
  500. package/lib/factory/createAutoBeContext.js +0 -141
  501. package/lib/factory/createAutoBeContext.js.map +0 -1
  502. package/lib/factory/createAutoBeState.js.map +0 -1
  503. package/lib/factory/getAutoBeGenerated.js.map +0 -1
  504. package/lib/factory/getAutoBeRealizeGenerated.js.map +0 -1
  505. package/lib/factory/index.js.map +0 -1
  506. package/lib/index.js.map +0 -1
  507. package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.d.ts +0 -45
  508. package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js +0 -27
  509. package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js.map +0 -1
  510. package/lib/orchestrate/analyze/AutoBeAnalyzePointer.d.ts +0 -9
  511. package/lib/orchestrate/analyze/AutoBeAnalyzePointer.js +0 -3
  512. package/lib/orchestrate/analyze/AutoBeAnalyzePointer.js.map +0 -1
  513. package/lib/orchestrate/analyze/orchestrateAnalyze.js +0 -98
  514. package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +0 -1
  515. package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.d.ts +0 -5
  516. package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js +0 -561
  517. package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js.map +0 -1
  518. package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.d.ts +0 -12
  519. package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js +0 -395
  520. package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js.map +0 -1
  521. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +0 -347
  522. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +0 -1
  523. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.d.ts +0 -68
  524. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.js +0 -3
  525. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.js.map +0 -1
  526. package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.d.ts +0 -5
  527. package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js +0 -27
  528. package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js.map +0 -1
  529. package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.d.ts +0 -12
  530. package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js +0 -78
  531. package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js.map +0 -1
  532. package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.d.ts +0 -16
  533. package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js +0 -79
  534. package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js.map +0 -1
  535. package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +0 -1
  536. package/lib/orchestrate/index.js.map +0 -1
  537. package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +0 -1
  538. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +0 -62
  539. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +0 -1
  540. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +0 -28
  541. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +0 -1
  542. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +0 -28
  543. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +0 -1
  544. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +0 -28
  545. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +0 -1
  546. package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js.map +0 -1
  547. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +0 -28
  548. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +0 -1
  549. package/lib/orchestrate/interface/orchestrateInterface.js.map +0 -1
  550. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +0 -1
  551. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +0 -1
  552. package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +0 -1
  553. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +0 -1643
  554. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +0 -1
  555. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js +0 -411
  556. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +0 -1
  557. package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.js.map +0 -1
  558. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.js.map +0 -1
  559. package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.js.map +0 -1
  560. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js.map +0 -1
  561. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js.map +0 -1
  562. package/lib/orchestrate/interface/utils/OpenApiEndpointComparator.js.map +0 -1
  563. package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +0 -85
  564. package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +0 -1
  565. package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +0 -52
  566. package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +0 -1
  567. package/lib/orchestrate/prisma/histories/transformPrismaHistories.d.ts +0 -3
  568. package/lib/orchestrate/prisma/histories/transformPrismaHistories.js +0 -55
  569. package/lib/orchestrate/prisma/histories/transformPrismaHistories.js.map +0 -1
  570. package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +0 -48
  571. package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +0 -1
  572. package/lib/orchestrate/prisma/orchestratePrisma.js.map +0 -1
  573. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +0 -1
  574. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +0 -1
  575. package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +0 -1
  576. package/lib/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.js.map +0 -1
  577. package/lib/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.js.map +0 -1
  578. package/lib/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.js.map +0 -1
  579. package/lib/orchestrate/realize/ProviderCodeComparator.js.map +0 -1
  580. package/lib/orchestrate/realize/RealizePipe.d.ts +0 -5
  581. package/lib/orchestrate/realize/RealizePipe.js +0 -14
  582. package/lib/orchestrate/realize/RealizePipe.js.map +0 -1
  583. package/lib/orchestrate/realize/orchestrateRealize.js +0 -63
  584. package/lib/orchestrate/realize/orchestrateRealize.js.map +0 -1
  585. package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +0 -1
  586. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +0 -1
  587. package/lib/orchestrate/realize/orchestrateRealizeCoder.d.ts +0 -26
  588. package/lib/orchestrate/realize/orchestrateRealizeCoder.js +0 -420
  589. package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +0 -1
  590. package/lib/orchestrate/realize/orchestrateRealizePlanner.js.map +0 -1
  591. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js.map +0 -1
  592. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js.map +0 -1
  593. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js +0 -3
  594. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +0 -1
  595. package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +0 -56
  596. package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.js +0 -3
  597. package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +0 -1
  598. package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +0 -2
  599. package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js +0 -5
  600. package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js.map +0 -1
  601. package/lib/orchestrate/realize/transformRealizeAuthorization.d.ts +0 -4
  602. package/lib/orchestrate/realize/transformRealizeAuthorization.js +0 -39
  603. package/lib/orchestrate/realize/transformRealizeAuthorization.js.map +0 -1
  604. package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.d.ts +0 -5
  605. package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.js +0 -80
  606. package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.js.map +0 -1
  607. package/lib/orchestrate/realize/transformRealizeCoderHistories.d.ts +0 -7
  608. package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +0 -1
  609. package/lib/orchestrate/realize/utils/AuthorizationFileSystem.js.map +0 -1
  610. package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.js.map +0 -1
  611. package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js.map +0 -1
  612. package/lib/orchestrate/realize/utils/InternalFileSystem.js.map +0 -1
  613. package/lib/orchestrate/realize/utils/ProviderFileSystem.js.map +0 -1
  614. package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +0 -1
  615. package/lib/orchestrate/realize/writeCodeUntilCompilePassed.d.ts +0 -11
  616. package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js +0 -221
  617. package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js.map +0 -1
  618. package/lib/orchestrate/test/compile/completeTestCode.js.map +0 -1
  619. package/lib/orchestrate/test/compile/filterTestFileName.js.map +0 -1
  620. package/lib/orchestrate/test/compile/getTestExternalDeclarations.js.map +0 -1
  621. package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +0 -1
  622. package/lib/orchestrate/test/orchestrateTest.js.map +0 -1
  623. package/lib/orchestrate/test/orchestrateTestCorrect.js.map +0 -1
  624. package/lib/orchestrate/test/orchestrateTestScenario.js +0 -866
  625. package/lib/orchestrate/test/orchestrateTestScenario.js.map +0 -1
  626. package/lib/orchestrate/test/orchestrateTestWrite.js.map +0 -1
  627. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +0 -1
  628. package/lib/orchestrate/test/structures/IAutoBeTestFunction.js.map +0 -1
  629. package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.js.map +0 -1
  630. package/lib/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.js.map +0 -1
  631. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +0 -1
  632. package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +0 -1
  633. package/lib/orchestrate/test/transformTestCorrectHistories.js +0 -34
  634. package/lib/orchestrate/test/transformTestCorrectHistories.js.map +0 -1
  635. package/lib/orchestrate/test/transformTestHistories.js.map +0 -1
  636. package/lib/orchestrate/test/transformTestScenarioHistories.d.ts +0 -3
  637. package/lib/orchestrate/test/transformTestScenarioHistories.js +0 -100
  638. package/lib/orchestrate/test/transformTestScenarioHistories.js.map +0 -1
  639. package/lib/orchestrate/test/transformTestWriteHistories.js +0 -178
  640. package/lib/orchestrate/test/transformTestWriteHistories.js.map +0 -1
  641. package/lib/structures/IAutoBeConfig.js.map +0 -1
  642. package/lib/structures/IAutoBeProps.js.map +0 -1
  643. package/lib/structures/IAutoBeVendor.js.map +0 -1
  644. package/lib/utils/arrayToRecord.js.map +0 -1
  645. package/lib/utils/backoffRetry.js.map +0 -1
  646. package/lib/utils/divideArray.js.map +0 -1
  647. package/lib/utils/emplaceMap.js.map +0 -1
  648. package/lib/utils/enforceToolCall.d.ts +0 -3
  649. package/lib/utils/enforceToolCall.js +0 -13
  650. package/lib/utils/enforceToolCall.js.map +0 -1
  651. package/lib/utils/forceRetry.d.ts +0 -1
  652. package/lib/utils/forceRetry.js +0 -26
  653. package/lib/utils/forceRetry.js.map +0 -1
  654. package/lib/utils/pipe.d.ts +0 -5
  655. package/lib/utils/pipe.js +0 -14
  656. package/lib/utils/pipe.js.map +0 -1
  657. package/src/orchestrate/analyze/AutoBeAnalyzeFileSystem.ts +0 -58
  658. package/src/orchestrate/analyze/AutoBeAnalyzePointer.ts +0 -10
  659. package/src/orchestrate/analyze/orchestrateAnalyzeComposer.ts +0 -112
  660. package/src/orchestrate/analyze/orchestrateAnalyzeReviewer.ts +0 -131
  661. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.ts +0 -75
  662. package/src/orchestrate/analyze/transformAnalyzeReviewerHistories.ts +0 -31
  663. package/src/orchestrate/analyze/transformAnalyzeWriteHistories.ts +0 -94
  664. package/src/orchestrate/analyze/writeDocumentUntilReviewPassed.ts +0 -96
  665. package/src/orchestrate/prisma/histories/transformPrismaHistories.ts +0 -59
  666. package/src/orchestrate/realize/RealizePipe.ts +0 -39
  667. package/src/orchestrate/realize/orchestrateRealizeCoder.ts +0 -182
  668. package/src/orchestrate/realize/structures/IAutoBeRealizeCompile.ts +0 -70
  669. package/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.ts +0 -2
  670. package/src/orchestrate/realize/transformRealizeAuthorization.ts +0 -44
  671. package/src/orchestrate/realize/transformRealizeCoderHistories.ts +0 -248
  672. package/src/orchestrate/realize/writeCodeUntilCompilePassed.ts +0 -308
  673. package/src/orchestrate/test/transformTestScenarioHistories.ts +0 -105
  674. package/src/utils/enforceToolCall.ts +0 -13
  675. package/src/utils/forceRetry.ts +0 -13
  676. package/src/utils/pipe.ts +0 -39
  677. /package/lib/{AutoBeAgentBase.js → agent/src/AutoBeAgentBase.js} +0 -0
  678. /package/lib/{constants → agent/src/constants}/AutoBeSystemPromptConstant.js +0 -0
  679. /package/lib/{context → agent/src/context}/AutoBeContext.js +0 -0
  680. /package/lib/{context → agent/src/context}/AutoBeState.js +0 -0
  681. /package/lib/{context → agent/src/context}/IAutoBeApplication.js +0 -0
  682. /package/lib/{context → agent/src/context}/IAutoBeApplicationProps.js +0 -0
  683. /package/lib/{context → agent/src/context}/IAutoBeApplicationResult.js +0 -0
  684. /package/lib/{context → agent/src/context}/assertSchemaModel.js +0 -0
  685. /package/lib/{factory → agent/src/factory}/createAutoBeApplication.js +0 -0
  686. /package/lib/{factory → agent/src/factory}/createAutoBeState.js +0 -0
  687. /package/lib/{factory → agent/src/factory}/getAutoBeRealizeGenerated.js +0 -0
  688. /package/lib/{factory → agent/src/factory}/index.js +0 -0
  689. /package/lib/{index.js → agent/src/index.js} +0 -0
  690. /package/lib/{orchestrate → agent/src/orchestrate}/facade/transformFacadeStateMessage.js +0 -0
  691. /package/lib/{orchestrate → agent/src/orchestrate}/index.js +0 -0
  692. /package/lib/{orchestrate → agent/src/orchestrate}/interface/histories/transformInterfacePrerequisiteHistories.js +0 -0
  693. /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceComplementApplication.js +0 -0
  694. /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceEndpointApplication.js +0 -0
  695. /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceGroupApplication.js +0 -0
  696. /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceOperationApplication.js +0 -0
  697. /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceSchemaApplication.js +0 -0
  698. /package/lib/{orchestrate → agent/src/orchestrate}/interface/utils/OpenApiEndpointComparator.js +0 -0
  699. /package/lib/{orchestrate → agent/src/orchestrate}/prisma/structures/IAutoBePrismaComponentApplication.js +0 -0
  700. /package/lib/{orchestrate → agent/src/orchestrate}/prisma/structures/IAutoBePrismaCorrectApplication.js +0 -0
  701. /package/lib/{orchestrate → agent/src/orchestrate}/prisma/structures/IAutoBePrismaSchemaApplication.js +0 -0
  702. /package/lib/{orchestrate → agent/src/orchestrate}/realize/ProviderCodeComparator.js +0 -0
  703. /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeAuthorizationApplication.js +0 -0
  704. /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js +0 -0
  705. /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/AuthorizationFileSystem.js +0 -0
  706. /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/AutoBeRealizeAuthorizationFileSystem.js +0 -0
  707. /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js +0 -0
  708. /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/InternalFileSystem.js +0 -0
  709. /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/ProviderFileSystem.js +0 -0
  710. /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/completeTestCode.js +0 -0
  711. /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/filterTestFileName.js +0 -0
  712. /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/getTestExternalDeclarations.js +0 -0
  713. /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/getTestScenarioArtifacts.js +0 -0
  714. /package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestHistories.js +0 -0
  715. /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestCorrectApplication.js +0 -0
  716. /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestFunction.js +0 -0
  717. /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestScenarioApplication.js +0 -0
  718. /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestScenarioArtifacts.js +0 -0
  719. /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestWriteApplication.js +0 -0
  720. /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestWriteResult.js +0 -0
  721. /package/lib/{structures → agent/src/structures}/IAutoBeConfig.js +0 -0
  722. /package/lib/{structures → agent/src/structures}/IAutoBeProps.js +0 -0
  723. /package/lib/{structures → agent/src/structures}/IAutoBeVendor.js +0 -0
  724. /package/lib/{utils → agent/src/utils}/arrayToRecord.js +0 -0
  725. /package/lib/{utils → agent/src/utils}/backoffRetry.js +0 -0
  726. /package/lib/{utils → agent/src/utils}/divideArray.js +0 -0
  727. /package/lib/{utils → agent/src/utils}/emplaceMap.js +0 -0
@@ -48,10 +48,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
48
48
  exports.orchestratePrismaCorrect = orchestratePrismaCorrect;
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
53
  const transformPrismaCorrectHistories_1 = require("./histories/transformPrismaCorrectHistories");
56
54
  function orchestratePrismaCorrect(ctx, application, life = 4) {
57
55
  const unique = new Set();
@@ -63,11 +61,11 @@ function orchestratePrismaCorrect(ctx, application, life = 4) {
63
61
  return true;
64
62
  });
65
63
  application.files = application.files.filter((f) => f.models.length !== 0);
66
- return step(ctx, application, life);
64
+ return iterate(ctx, application, life);
67
65
  }
68
- function step(ctx, application, life) {
66
+ function iterate(ctx, application, life) {
69
67
  return __awaiter(this, void 0, void 0, function* () {
70
- var _a, _b, _c, _d, _e;
68
+ var _a, _b;
71
69
  const compiler = yield ctx.compiler();
72
70
  const result = yield compiler.prisma.validate(application);
73
71
  if (result.success)
@@ -86,61 +84,97 @@ function step(ctx, application, life) {
86
84
  step: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
87
85
  created_at: new Date().toISOString(),
88
86
  });
87
+ const next = yield process(ctx, result);
88
+ return iterate(ctx, next.correction, life - 1);
89
+ });
90
+ }
91
+ function process(ctx_1, failure_1) {
92
+ return __awaiter(this, arguments, void 0, function* (ctx, failure, capacity = 8) {
93
+ const count = getTableCount(failure);
94
+ if (count <= capacity)
95
+ return execute(ctx, failure);
96
+ let correction = failure.data;
97
+ const volume = Math.ceil(count / capacity);
98
+ const plannings = [];
99
+ const models = {};
100
+ let i = 0;
101
+ while (i++ < volume && failure.errors.length !== 0) {
102
+ const next = yield execute(ctx, Object.assign(Object.assign({}, failure), { errors: (() => {
103
+ var _a;
104
+ const unique = new Set();
105
+ const errors = [];
106
+ for (const err of failure.errors) {
107
+ unique.add((_a = err.table) !== null && _a !== void 0 ? _a : null);
108
+ if (unique.size > capacity)
109
+ break;
110
+ else
111
+ errors.push(err);
112
+ }
113
+ return errors;
114
+ })() }));
115
+ plannings.push(next.planning);
116
+ for (const m of next.models)
117
+ models[m.name] = m;
118
+ const compiler = yield ctx.compiler();
119
+ const result = yield compiler.prisma.validate(next.correction);
120
+ correction = next.correction;
121
+ if (result.success === true)
122
+ break;
123
+ else
124
+ failure = result;
125
+ }
126
+ return {
127
+ planning: plannings.join("\n\n"),
128
+ models: Object.values(models),
129
+ correction,
130
+ };
131
+ });
132
+ }
133
+ function execute(ctx, failure) {
134
+ return __awaiter(this, void 0, void 0, function* () {
135
+ var _a, _b;
136
+ // PREPARE AGENTICA
89
137
  const pointer = {
90
138
  value: null,
91
139
  };
92
- const agentica = new core_1.MicroAgentica({
93
- model: ctx.model,
94
- vendor: ctx.vendor,
95
- config: Object.assign(Object.assign({}, ((_c = ctx.config) !== null && _c !== void 0 ? _c : {})), { executor: {
96
- describe: null,
97
- } }),
98
- histories: (0, transformPrismaCorrectHistories_1.transformPrismaCorrectHistories)(result),
99
- controllers: [
100
- createApplication({
101
- model: ctx.model,
102
- build: (next) => {
103
- pointer.value = next;
104
- },
105
- }),
106
- ],
107
- });
108
- (0, enforceToolCall_1.enforceToolCall)(agentica);
109
- // REQUEST CORRECTION
110
- yield agentica
111
- .conversate("Resolve the compilation errors in the provided Prisma schema files.")
112
- .finally(() => {
113
- const tokenUsage = agentica.getTokenUsage().aggregate;
114
- ctx.usage().record(tokenUsage, ["prisma"]);
140
+ const { tokenUsage } = yield ctx.conversate({
141
+ source: "prismaCorrect",
142
+ histories: (0, transformPrismaCorrectHistories_1.transformPrismaCorrectHistories)(failure),
143
+ controller: createController({
144
+ model: ctx.model,
145
+ build: (next) => {
146
+ pointer.value = next;
147
+ },
148
+ }),
149
+ enforceFunctionCall: true,
150
+ message: "Resolve the compilation errors in the provided Prisma schema files.",
115
151
  });
116
- if (pointer.value === null) {
117
- console.error("Unreachable error: PrismaCompilerAgent.pointer.value is null");
118
- return result; // unreachable
119
- }
152
+ if (pointer.value === null)
153
+ throw new Error("Unreachable error: PrismaCompilerAgent.pointer.value is null");
120
154
  const correction = {
121
- files: application.files.map((file) => ({
155
+ files: failure.data.files.map((file) => ({
122
156
  filename: file.filename,
123
157
  namespace: file.namespace,
124
158
  models: file.models.map((model) => {
125
- const newbie = pointer.value.models.find((m) => m.name === model.name);
159
+ var _a;
160
+ const newbie = (_a = pointer.value) === null || _a === void 0 ? void 0 : _a.models.find((m) => m.name === model.name);
126
161
  return newbie !== null && newbie !== void 0 ? newbie : model;
127
162
  }),
128
163
  })),
129
164
  };
130
165
  ctx.dispatch({
131
166
  type: "prismaCorrect",
132
- failure: result,
133
- correction,
167
+ failure,
134
168
  planning: pointer.value.planning,
135
- step: (_e = (_d = ctx.state().analyze) === null || _d === void 0 ? void 0 : _d.step) !== null && _e !== void 0 ? _e : 0,
169
+ correction: correction,
170
+ tokenUsage,
171
+ step: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
136
172
  created_at: new Date().toISOString(),
137
173
  });
138
- return step(ctx, {
139
- files: correction.files,
140
- }, life - 1);
174
+ return Object.assign(Object.assign({}, pointer.value), { correction });
141
175
  });
142
176
  }
143
- function createApplication(props) {
177
+ function createController(props) {
144
178
  (0, assertSchemaModel_1.assertSchemaModel)(props.model);
145
179
  const application = collection[props.model];
146
180
  return {
@@ -154,6 +188,10 @@ function createApplication(props) {
154
188
  },
155
189
  };
156
190
  }
191
+ const getTableCount = (failure) => {
192
+ const unique = new Set(failure.errors.map((error) => { var _a; return (_a = error.table) !== null && _a !== void 0 ? _a : null; }));
193
+ return unique.size;
194
+ };
157
195
  const claude = {
158
196
  model: "claude",
159
197
  options: {
@@ -190,18 +228,32 @@ const claude = {
190
228
  type: "object",
191
229
  properties: {
192
230
  name: {
193
- 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\"",
231
+ 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\"",
194
232
  type: "string",
195
233
  pattern: "^[a-z][a-z0-9_]*$"
196
234
  },
197
235
  description: {
198
- 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...\"",
236
+ 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...\"",
199
237
  type: "string"
200
238
  },
201
239
  material: {
202
240
  description: "Indicates whether this model represents a materialized view for\nperformance optimization.\n\nMaterialized views are read-only computed tables that cache complex query\nresults. They're marked as \"@\\hidden\" in documentation and prefixed with\n\"mv_\" in naming. Examples: mv_shopping_sale_last_snapshots,\nmv_shopping_cart_commodity_prices",
203
241
  type: "boolean"
204
242
  },
243
+ stance: {
244
+ description: "Specifies the architectural stance of this model within the database\nsystem.\n\nThis property defines how the table positions itself in relation to other\ntables and what role it plays in the overall data architecture,\nparticularly for API endpoint generation and business logic\norganization.\n\n## Values:\n\n### `\"primary\"` - Main Business Entity\n\nTables that represent core business concepts and serve as the primary\nsubjects of user operations. These tables typically warrant independent\nCRUD API endpoints since users directly interact with these entities.\n\n**Key principle**: If users need to independently create, search, filter,\nor manage entities regardless of their parent context, the table should\nbe primary stance.\n\n**API Requirements:**\n\n- Independent creation endpoints (POST /articles, POST /comments)\n- Search and filtering capabilities across all instances\n- Direct update and delete operations\n- List/pagination endpoints for browsing\n\n**Why `bbs_article_comments` is primary, not subsidiary:**\n\nAlthough comments belong to articles, they require independent\nmanagement:\n\n- **Search across articles**: \"Find all comments by user X across all\n articles\"\n- **Moderation workflows**: \"List all pending comments for review\"\n- **User activity**: \"Show all comments made by this user\"\n- **Independent operations**: Users edit/delete their comments directly\n- **Notification systems**: \"Alert when any comment is posted\"\n\nIf comments were subsidiary, these operations would be impossible or\nrequire inefficient nested queries through parent articles.\n\n**Characteristics:**\n\n- Represents tangible business concepts that users manage\n- Serves as reference points for other tables\n- Requires comprehensive API operations (CREATE, READ, UPDATE, DELETE)\n- Forms the backbone of the application's business logic\n\n**Examples:**\n\n- `bbs_articles` - Forum posts that users create, edit, and manage\n- `bbs_article_comments` - User comments that require independent\n management\n\n### `\"subsidiary\"` - Supporting/Dependent Entity\n\nTables that exist to support primary entities but are not independently\nmanaged by users. These tables are typically managed through their parent\nentities and may not need standalone API endpoints.\n\n**Characteristics:**\n\n- Depends on primary or snapshot entities for context\n- Often managed indirectly through parent entity operations\n- May have limited or no independent API operations\n- Provides supporting data or relationships\n\n**Examples:**\n\n- `bbs_article_snapshot_files` - Files attached to article snapshots\n- `bbs_article_snapshot_tags` - Tags associated with article snapshots\n- `bbs_article_comment_snapshot_files` - Files attached to comment\n snapshots\n\n### `\"snapshot\"` - Historical/Versioning Entity\n\nTables that capture point-in-time states of primary entities for audit\ntrails, version control, or historical tracking. These tables record\nchanges but are rarely modified directly by users.\n\n**Characteristics:**\n\n- Captures historical states of primary entities\n- Typically append-only (rarely updated or deleted)\n- Referenced for audit trails and change tracking\n- Usually read-only from user perspective\n\n**Examples:**\n\n- `bbs_article_snapshots` - Historical states of articles\n- `bbs_article_comment_snapshots` - Comment modification history\n\n## API Generation Guidelines:\n\nThe stance property guides automatic API endpoint generation:\n\n- **`\"primary\"`** \u2192 Generate full CRUD endpoints based on business\n requirements\n- **`\"subsidiary\"`** \u2192 Evaluate carefully; often managed through parent\n entities\n- **`\"snapshot\"`** \u2192 Typically read-only endpoints for historical data\n access",
245
+ oneOf: [
246
+ {
247
+ "const": "primary"
248
+ },
249
+ {
250
+ "const": "subsidiary"
251
+ },
252
+ {
253
+ "const": "snapshot"
254
+ }
255
+ ]
256
+ },
205
257
  primaryField: {
206
258
  description: "The primary key field of the model.\n\nIn all uploaded schemas, primary keys are always UUID type with \"@\\id\"\ndirective. Usually named \"id\" and marked with \"@\\db.Uuid\" for PostgreSQL\nmapping.",
207
259
  $ref: "#/$defs/AutoBePrisma.IPrimaryField"
@@ -246,6 +298,7 @@ const claude = {
246
298
  "name",
247
299
  "description",
248
300
  "material",
301
+ "stance",
249
302
  "primaryField",
250
303
  "foreignFields",
251
304
  "plainFields",
@@ -259,7 +312,7 @@ const claude = {
259
312
  type: "object",
260
313
  properties: {
261
314
  name: {
262
- 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.",
315
+ 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.",
263
316
  type: "string",
264
317
  pattern: "^[a-z][a-z0-9_]*$"
265
318
  },
@@ -268,7 +321,7 @@ const claude = {
268
321
  "const": "uuid"
269
322
  },
270
323
  description: {
271
- 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.",
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.\n\n**IMPORTANT**: Description must be written in English.",
272
325
  type: "string"
273
326
  }
274
327
  },
@@ -283,7 +336,7 @@ const claude = {
283
336
  type: "object",
284
337
  properties: {
285
338
  name: {
286
- 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)",
339
+ 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)",
287
340
  type: "string",
288
341
  pattern: "^[a-z][a-z0-9_]*$"
289
342
  },
@@ -292,7 +345,7 @@ const claude = {
292
345
  "const": "uuid"
293
346
  },
294
347
  description: {
295
- 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.",
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.\n\n**IMPORTANT**: Description must be written in English.",
296
349
  type: "string"
297
350
  },
298
351
  relation: {
@@ -324,7 +377,7 @@ const claude = {
324
377
  name: {
325
378
  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",
326
379
  type: "string",
327
- pattern: "^[a-zA-Z_][a-zA-Z0-9_]*$"
380
+ pattern: "^[a-z][a-zA-Z0-9]*$"
328
381
  },
329
382
  targetModel: {
330
383
  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.",
@@ -341,7 +394,7 @@ const claude = {
341
394
  type: "object",
342
395
  properties: {
343
396
  name: {
344
- 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",
397
+ 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",
345
398
  type: "string",
346
399
  pattern: "^[a-z][a-z0-9_]*$"
347
400
  },
@@ -372,7 +425,7 @@ const claude = {
372
425
  ]
373
426
  },
374
427
  description: {
375
- 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.\"",
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\n\n**IMPORTANT**: Description must be written in English. Example: \"Amount\nof cash payment.\" or \"Whether the unit is required or not.\"",
376
429
  type: "string"
377
430
  },
378
431
  nullable: {
@@ -444,7 +497,7 @@ const claude = {
444
497
  }
445
498
  },
446
499
  description: "Fixes validation errors in specific AutoBePrisma models while preserving\nALL existing business logic and model descriptions.\n\n## Core Rules\n\n1. Fix ONLY validation errors in provided models - never remove business\n descriptions\n2. Apply minimal changes to error models only - preserve original design\n intent\n3. Return ONLY corrected models - unchanged models remain in original schema\n4. Maintain referential integrity with unchanged models\n\n## Targeted Scope\n\n- Process ONLY models with validation errors from IError[] array\n- Exclude models without errors from processing and output\n- Minimize context usage by returning corrected models only\n- Preserve unchanged models in their original state\n\n## Fix Strategy\n\n- Resolve validation errors within specific models only\n- Fix field duplications, invalid references, and type mismatches\n- Update cross-model references without modifying target models\n- Ensure naming conventions and index rules compliance in corrected models",
447
- validate: (() => { const _io0 = input => "string" === typeof input.planning && (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.planning || _report(_exceptionable, {
500
+ validate: (() => { const _io0 = input => "string" === typeof input.planning && (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 && ("primary" === input.stance || "subsidiary" === input.stance || "snapshot" === input.stance) && ("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.planning || _report(_exceptionable, {
448
501
  path: _path + ".planning",
449
502
  expected: "string",
450
503
  value: input.planning
@@ -466,11 +519,11 @@ const claude = {
466
519
  value: input.models
467
520
  })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
468
521
  path: _path + ".name",
469
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
522
+ expected: "string & SnakePattern",
470
523
  value: input.name
471
524
  })) || _report(_exceptionable, {
472
525
  path: _path + ".name",
473
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
526
+ expected: "(string & SnakePattern)",
474
527
  value: input.name
475
528
  }), "string" === typeof input.description || _report(_exceptionable, {
476
529
  path: _path + ".description",
@@ -480,6 +533,10 @@ const claude = {
480
533
  path: _path + ".material",
481
534
  expected: "boolean",
482
535
  value: input.material
536
+ }), "primary" === input.stance || "subsidiary" === input.stance || "snapshot" === input.stance || _report(_exceptionable, {
537
+ path: _path + ".stance",
538
+ expected: "(\"primary\" | \"snapshot\" | \"subsidiary\")",
539
+ value: input.stance
483
540
  }), ("object" === typeof input.primaryField && null !== input.primaryField || _report(_exceptionable, {
484
541
  path: _path + ".primaryField",
485
542
  expected: "AutoBePrisma.IPrimaryField",
@@ -570,11 +627,11 @@ const claude = {
570
627
  value: input.ginIndexes
571
628
  })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
572
629
  path: _path + ".name",
573
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
630
+ expected: "string & SnakePattern",
574
631
  value: input.name
575
632
  })) || _report(_exceptionable, {
576
633
  path: _path + ".name",
577
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
634
+ expected: "(string & SnakePattern)",
578
635
  value: input.name
579
636
  }), "uuid" === input.type || _report(_exceptionable, {
580
637
  path: _path + ".type",
@@ -586,11 +643,11 @@ const claude = {
586
643
  value: input.description
587
644
  })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
588
645
  path: _path + ".name",
589
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
646
+ expected: "string & SnakePattern",
590
647
  value: input.name
591
648
  })) || _report(_exceptionable, {
592
649
  path: _path + ".name",
593
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
650
+ expected: "(string & SnakePattern)",
594
651
  value: input.name
595
652
  }), "uuid" === input.type || _report(_exceptionable, {
596
653
  path: _path + ".type",
@@ -616,13 +673,13 @@ const claude = {
616
673
  path: _path + ".nullable",
617
674
  expected: "boolean",
618
675
  value: input.nullable
619
- })].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, {
676
+ })].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, {
620
677
  path: _path + ".name",
621
- expected: "string & Pattern<\"^[a-zA-Z_][a-zA-Z0-9_]*$\">",
678
+ expected: "string & CamelPattern",
622
679
  value: input.name
623
680
  })) || _report(_exceptionable, {
624
681
  path: _path + ".name",
625
- expected: "(string & Pattern<\"^[a-zA-Z_][a-zA-Z0-9_]*$\">)",
682
+ expected: "(string & CamelPattern)",
626
683
  value: input.name
627
684
  }), "string" === typeof input.targetModel || _report(_exceptionable, {
628
685
  path: _path + ".targetModel",
@@ -630,11 +687,11 @@ const claude = {
630
687
  value: input.targetModel
631
688
  })].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
632
689
  path: _path + ".name",
633
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
690
+ expected: "string & SnakePattern",
634
691
  value: input.name
635
692
  })) || _report(_exceptionable, {
636
693
  path: _path + ".name",
637
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
694
+ expected: "(string & SnakePattern)",
638
695
  value: input.name
639
696
  }), "string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type || _report(_exceptionable, {
640
697
  path: _path + ".type",
@@ -765,17 +822,26 @@ const collection = {
765
822
  type: "object",
766
823
  properties: {
767
824
  name: {
768
- 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_]*$",
825
+ 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_]*$",
769
826
  type: "string"
770
827
  },
771
828
  description: {
772
- 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...\"",
829
+ 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...\"",
773
830
  type: "string"
774
831
  },
775
832
  material: {
776
833
  description: "Indicates whether this model represents a materialized view for\nperformance optimization.\n\nMaterialized views are read-only computed tables that cache complex query\nresults. They're marked as \"@\\hidden\" in documentation and prefixed with\n\"mv_\" in naming. Examples: mv_shopping_sale_last_snapshots,\nmv_shopping_cart_commodity_prices",
777
834
  type: "boolean"
778
835
  },
836
+ stance: {
837
+ description: "Specifies the architectural stance of this model within the database\nsystem.\n\nThis property defines how the table positions itself in relation to other\ntables and what role it plays in the overall data architecture,\nparticularly for API endpoint generation and business logic\norganization.\n\n## Values:\n\n### `\"primary\"` - Main Business Entity\n\nTables that represent core business concepts and serve as the primary\nsubjects of user operations. These tables typically warrant independent\nCRUD API endpoints since users directly interact with these entities.\n\n**Key principle**: If users need to independently create, search, filter,\nor manage entities regardless of their parent context, the table should\nbe primary stance.\n\n**API Requirements:**\n\n- Independent creation endpoints (POST /articles, POST /comments)\n- Search and filtering capabilities across all instances\n- Direct update and delete operations\n- List/pagination endpoints for browsing\n\n**Why `bbs_article_comments` is primary, not subsidiary:**\n\nAlthough comments belong to articles, they require independent\nmanagement:\n\n- **Search across articles**: \"Find all comments by user X across all\n articles\"\n- **Moderation workflows**: \"List all pending comments for review\"\n- **User activity**: \"Show all comments made by this user\"\n- **Independent operations**: Users edit/delete their comments directly\n- **Notification systems**: \"Alert when any comment is posted\"\n\nIf comments were subsidiary, these operations would be impossible or\nrequire inefficient nested queries through parent articles.\n\n**Characteristics:**\n\n- Represents tangible business concepts that users manage\n- Serves as reference points for other tables\n- Requires comprehensive API operations (CREATE, READ, UPDATE, DELETE)\n- Forms the backbone of the application's business logic\n\n**Examples:**\n\n- `bbs_articles` - Forum posts that users create, edit, and manage\n- `bbs_article_comments` - User comments that require independent\n management\n\n### `\"subsidiary\"` - Supporting/Dependent Entity\n\nTables that exist to support primary entities but are not independently\nmanaged by users. These tables are typically managed through their parent\nentities and may not need standalone API endpoints.\n\n**Characteristics:**\n\n- Depends on primary or snapshot entities for context\n- Often managed indirectly through parent entity operations\n- May have limited or no independent API operations\n- Provides supporting data or relationships\n\n**Examples:**\n\n- `bbs_article_snapshot_files` - Files attached to article snapshots\n- `bbs_article_snapshot_tags` - Tags associated with article snapshots\n- `bbs_article_comment_snapshot_files` - Files attached to comment\n snapshots\n\n### `\"snapshot\"` - Historical/Versioning Entity\n\nTables that capture point-in-time states of primary entities for audit\ntrails, version control, or historical tracking. These tables record\nchanges but are rarely modified directly by users.\n\n**Characteristics:**\n\n- Captures historical states of primary entities\n- Typically append-only (rarely updated or deleted)\n- Referenced for audit trails and change tracking\n- Usually read-only from user perspective\n\n**Examples:**\n\n- `bbs_article_snapshots` - Historical states of articles\n- `bbs_article_comment_snapshots` - Comment modification history\n\n## API Generation Guidelines:\n\nThe stance property guides automatic API endpoint generation:\n\n- **`\"primary\"`** \u2192 Generate full CRUD endpoints based on business\n requirements\n- **`\"subsidiary\"`** \u2192 Evaluate carefully; often managed through parent\n entities\n- **`\"snapshot\"`** \u2192 Typically read-only endpoints for historical data\n access",
838
+ type: "string",
839
+ "enum": [
840
+ "primary",
841
+ "subsidiary",
842
+ "snapshot"
843
+ ]
844
+ },
779
845
  primaryField: {
780
846
  $ref: "#/$defs/AutoBePrisma.IPrimaryField"
781
847
  },
@@ -819,6 +885,7 @@ const collection = {
819
885
  "name",
820
886
  "description",
821
887
  "material",
888
+ "stance",
822
889
  "primaryField",
823
890
  "foreignFields",
824
891
  "plainFields",
@@ -832,7 +899,7 @@ const collection = {
832
899
  type: "object",
833
900
  properties: {
834
901
  name: {
835
- 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_]*$",
902
+ 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_]*$",
836
903
  type: "string"
837
904
  },
838
905
  type: {
@@ -843,7 +910,7 @@ const collection = {
843
910
  ]
844
911
  },
845
912
  description: {
846
- 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.",
913
+ 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.",
847
914
  type: "string"
848
915
  }
849
916
  },
@@ -858,7 +925,7 @@ const collection = {
858
925
  type: "object",
859
926
  properties: {
860
927
  name: {
861
- 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_]*$",
928
+ 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_]*$",
862
929
  type: "string"
863
930
  },
864
931
  type: {
@@ -869,7 +936,7 @@ const collection = {
869
936
  ]
870
937
  },
871
938
  description: {
872
- 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.",
939
+ 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.",
873
940
  type: "string"
874
941
  },
875
942
  relation: {
@@ -898,7 +965,7 @@ const collection = {
898
965
  type: "object",
899
966
  properties: {
900
967
  name: {
901
- 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_]*$",
968
+ 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]*$",
902
969
  type: "string"
903
970
  },
904
971
  targetModel: {
@@ -916,7 +983,7 @@ const collection = {
916
983
  type: "object",
917
984
  properties: {
918
985
  name: {
919
- 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_]*$",
986
+ 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_]*$",
920
987
  type: "string"
921
988
  },
922
989
  type: {
@@ -933,7 +1000,7 @@ const collection = {
933
1000
  ]
934
1001
  },
935
1002
  description: {
936
- 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.\"",
1003
+ 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.\"",
937
1004
  type: "string"
938
1005
  },
939
1006
  nullable: {
@@ -1004,7 +1071,7 @@ const collection = {
1004
1071
  }
1005
1072
  },
1006
1073
  description: "Fixes validation errors in specific AutoBePrisma models while preserving\nALL existing business logic and model descriptions.\n\n## Core Rules\n\n1. Fix ONLY validation errors in provided models - never remove business\n descriptions\n2. Apply minimal changes to error models only - preserve original design\n intent\n3. Return ONLY corrected models - unchanged models remain in original schema\n4. Maintain referential integrity with unchanged models\n\n## Targeted Scope\n\n- Process ONLY models with validation errors from IError[] array\n- Exclude models without errors from processing and output\n- Minimize context usage by returning corrected models only\n- Preserve unchanged models in their original state\n\n## Fix Strategy\n\n- Resolve validation errors within specific models only\n- Fix field duplications, invalid references, and type mismatches\n- Update cross-model references without modifying target models\n- Ensure naming conventions and index rules compliance in corrected models",
1007
- validate: (() => { const _io0 = input => "string" === typeof input.planning && (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.planning || _report(_exceptionable, {
1074
+ validate: (() => { const _io0 = input => "string" === typeof input.planning && (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 && ("primary" === input.stance || "subsidiary" === input.stance || "snapshot" === input.stance) && ("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.planning || _report(_exceptionable, {
1008
1075
  path: _path + ".planning",
1009
1076
  expected: "string",
1010
1077
  value: input.planning
@@ -1026,11 +1093,11 @@ const collection = {
1026
1093
  value: input.models
1027
1094
  })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1028
1095
  path: _path + ".name",
1029
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1096
+ expected: "string & SnakePattern",
1030
1097
  value: input.name
1031
1098
  })) || _report(_exceptionable, {
1032
1099
  path: _path + ".name",
1033
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1100
+ expected: "(string & SnakePattern)",
1034
1101
  value: input.name
1035
1102
  }), "string" === typeof input.description || _report(_exceptionable, {
1036
1103
  path: _path + ".description",
@@ -1040,6 +1107,10 @@ const collection = {
1040
1107
  path: _path + ".material",
1041
1108
  expected: "boolean",
1042
1109
  value: input.material
1110
+ }), "primary" === input.stance || "subsidiary" === input.stance || "snapshot" === input.stance || _report(_exceptionable, {
1111
+ path: _path + ".stance",
1112
+ expected: "(\"primary\" | \"snapshot\" | \"subsidiary\")",
1113
+ value: input.stance
1043
1114
  }), ("object" === typeof input.primaryField && null !== input.primaryField || _report(_exceptionable, {
1044
1115
  path: _path + ".primaryField",
1045
1116
  expected: "AutoBePrisma.IPrimaryField",
@@ -1130,11 +1201,11 @@ const collection = {
1130
1201
  value: input.ginIndexes
1131
1202
  })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1132
1203
  path: _path + ".name",
1133
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1204
+ expected: "string & SnakePattern",
1134
1205
  value: input.name
1135
1206
  })) || _report(_exceptionable, {
1136
1207
  path: _path + ".name",
1137
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1208
+ expected: "(string & SnakePattern)",
1138
1209
  value: input.name
1139
1210
  }), "uuid" === input.type || _report(_exceptionable, {
1140
1211
  path: _path + ".type",
@@ -1146,11 +1217,11 @@ const collection = {
1146
1217
  value: input.description
1147
1218
  })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1148
1219
  path: _path + ".name",
1149
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1220
+ expected: "string & SnakePattern",
1150
1221
  value: input.name
1151
1222
  })) || _report(_exceptionable, {
1152
1223
  path: _path + ".name",
1153
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1224
+ expected: "(string & SnakePattern)",
1154
1225
  value: input.name
1155
1226
  }), "uuid" === input.type || _report(_exceptionable, {
1156
1227
  path: _path + ".type",
@@ -1176,13 +1247,13 @@ const collection = {
1176
1247
  path: _path + ".nullable",
1177
1248
  expected: "boolean",
1178
1249
  value: input.nullable
1179
- })].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, {
1250
+ })].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, {
1180
1251
  path: _path + ".name",
1181
- expected: "string & Pattern<\"^[a-zA-Z_][a-zA-Z0-9_]*$\">",
1252
+ expected: "string & CamelPattern",
1182
1253
  value: input.name
1183
1254
  })) || _report(_exceptionable, {
1184
1255
  path: _path + ".name",
1185
- expected: "(string & Pattern<\"^[a-zA-Z_][a-zA-Z0-9_]*$\">)",
1256
+ expected: "(string & CamelPattern)",
1186
1257
  value: input.name
1187
1258
  }), "string" === typeof input.targetModel || _report(_exceptionable, {
1188
1259
  path: _path + ".targetModel",
@@ -1190,11 +1261,11 @@ const collection = {
1190
1261
  value: input.targetModel
1191
1262
  })].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1192
1263
  path: _path + ".name",
1193
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1264
+ expected: "string & SnakePattern",
1194
1265
  value: input.name
1195
1266
  })) || _report(_exceptionable, {
1196
1267
  path: _path + ".name",
1197
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1268
+ expected: "(string & SnakePattern)",
1198
1269
  value: input.name
1199
1270
  }), "string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type || _report(_exceptionable, {
1200
1271
  path: _path + ".type",