@autobe/agent 0.19.1 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/lib/agent/src/AutoBeAgent.js +3 -2
  2. package/lib/agent/src/AutoBeAgent.js.map +1 -1
  3. package/lib/agent/src/AutoBeMockAgent.js +4 -3
  4. package/lib/agent/src/AutoBeMockAgent.js.map +1 -1
  5. package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +12 -11
  6. package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +1 -1
  7. package/lib/agent/src/context/AutoBeContext.d.ts +3 -2
  8. package/lib/agent/src/factory/consentFunctionCall.js +3 -2
  9. package/lib/agent/src/factory/consentFunctionCall.js.map +1 -1
  10. package/lib/agent/src/factory/createAutoBeContext.js +11 -6
  11. package/lib/agent/src/factory/createAutoBeContext.js.map +1 -1
  12. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +6 -0
  13. package/lib/agent/src/orchestrate/analyze/histories/{transformAnalyzeReviewerHistories.js → transformAnalyzeReviewHistories.js} +24 -29
  14. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -0
  15. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +12 -9
  16. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
  17. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +31 -29
  18. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
  19. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js +19 -5
  20. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
  21. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +7 -1
  22. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +9 -6
  23. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
  24. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +11 -9
  25. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
  26. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -4
  27. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +5 -1
  28. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
  29. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js +45 -46
  30. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -1
  31. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +13 -13
  32. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
  33. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +31 -30
  34. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
  35. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +23 -22
  36. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
  37. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.d.ts +4 -0
  38. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +33 -0
  39. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -0
  40. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +2 -2
  41. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +27 -26
  42. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
  43. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +13 -12
  44. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
  45. package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js +4 -4
  46. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +11 -10
  47. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
  48. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +32 -31
  49. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
  50. package/lib/agent/src/orchestrate/interface/orchestrateInterface.js +3 -1
  51. package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -1
  52. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +28 -24
  53. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
  54. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js +2 -0
  55. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  56. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js +11 -5
  57. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
  58. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +10 -0
  59. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +365 -0
  60. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +1 -0
  61. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js +2 -0
  62. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
  63. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +80 -54
  64. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  65. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +1635 -1180
  66. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
  67. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js +30 -24
  68. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
  69. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +2 -5
  70. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +178 -0
  71. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -1
  72. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.d.ts +60 -0
  73. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js +3 -0
  74. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js.map +1 -0
  75. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +38 -0
  76. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +78 -0
  77. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +54 -54
  78. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
  79. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +18 -29
  80. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -1
  81. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +37 -34
  82. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
  83. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +38 -25
  84. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
  85. package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js +3 -1
  86. package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +1 -1
  87. package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js +2 -0
  88. package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  89. package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js +3 -0
  90. package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  91. package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js +19 -9
  92. package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
  93. package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js +28 -21
  94. package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
  95. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +24 -21
  96. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -1
  97. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +58 -56
  98. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
  99. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +17 -13
  100. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
  101. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +12 -3
  102. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -1
  103. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +35 -30
  104. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
  105. package/lib/{orchestrate/realize/internal/compile.d.ts → agent/src/orchestrate/realize/internal/compileRealizeFiles.d.ts} +1 -1
  106. package/lib/agent/src/orchestrate/realize/internal/{compile.js → compileRealizeFiles.js} +6 -6
  107. package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js.map +1 -0
  108. package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +26 -12
  109. package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -1
  110. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js +9 -3
  111. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
  112. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +3 -1
  113. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
  114. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +2 -6
  115. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +12 -8
  116. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
  117. package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -66
  118. package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js +2 -2
  119. package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -1
  120. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +3 -6
  121. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +25 -21
  122. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
  123. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +2 -2
  124. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +7 -2
  125. package/lib/agent/src/orchestrate/test/compile/completeTestCode.js +13 -10
  126. package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +1 -1
  127. package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js +1 -1
  128. package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -1
  129. package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.d.ts +3 -1
  130. package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +44 -27
  131. package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
  132. package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +63 -60
  133. package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
  134. package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.d.ts +3 -1
  135. package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +118 -96
  136. package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
  137. package/lib/agent/src/orchestrate/test/orchestrateTest.js +6 -5
  138. package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -1
  139. package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js +17 -8
  140. package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  141. package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +30 -18
  142. package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  143. package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js +18 -18
  144. package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  145. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +2 -2
  146. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +28 -1
  147. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -2
  148. package/lib/agent/src/utils/executeCachedBatch.d.ts +1 -0
  149. package/lib/agent/src/utils/executeCachedBatch.js +23 -0
  150. package/lib/agent/src/utils/executeCachedBatch.js.map +1 -0
  151. package/lib/constants/AutoBeSystemPromptConstant.d.ts +12 -11
  152. package/lib/context/AutoBeContext.d.ts +3 -2
  153. package/lib/index.mjs +3265 -1702
  154. package/lib/index.mjs.map +1 -1
  155. package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +6 -0
  156. package/lib/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +7 -1
  157. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -4
  158. package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.d.ts +4 -0
  159. package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +10 -0
  160. package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +2 -5
  161. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.d.ts +60 -0
  162. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +38 -0
  163. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +78 -0
  164. package/lib/{agent/src/orchestrate/realize/internal/compile.d.ts → orchestrate/realize/internal/compileRealizeFiles.d.ts} +1 -1
  165. package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +2 -6
  166. package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -66
  167. package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +3 -6
  168. package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +2 -2
  169. package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +7 -2
  170. package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +3 -1
  171. package/lib/orchestrate/test/histories/transformTestWriteHistories.d.ts +3 -1
  172. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +2 -2
  173. package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +28 -1
  174. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -2
  175. package/lib/utils/executeCachedBatch.d.ts +1 -0
  176. package/package.json +7 -7
  177. package/src/AutoBeAgent.ts +4 -3
  178. package/src/AutoBeMockAgent.ts +5 -4
  179. package/src/constants/AutoBeSystemPromptConstant.ts +12 -11
  180. package/src/context/AutoBeContext.ts +3 -0
  181. package/src/factory/consentFunctionCall.ts +4 -3
  182. package/src/factory/createAutoBeContext.ts +11 -7
  183. package/src/orchestrate/analyze/histories/{transformAnalyzeReviewerHistories.ts → transformAnalyzeReviewHistories.ts} +23 -30
  184. package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +13 -10
  185. package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +60 -61
  186. package/src/orchestrate/analyze/orchestrateAnalyze.ts +20 -13
  187. package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +20 -9
  188. package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +13 -11
  189. package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +10 -5
  190. package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +47 -48
  191. package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +14 -14
  192. package/src/orchestrate/interface/histories/transformInterfaceComplementHistories.ts +31 -30
  193. package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +20 -19
  194. package/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.ts +39 -0
  195. package/src/orchestrate/interface/histories/transformInterfaceGroupHistories.ts +3 -3
  196. package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +23 -22
  197. package/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.ts +12 -11
  198. package/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.ts +5 -5
  199. package/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts +11 -10
  200. package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +31 -30
  201. package/src/orchestrate/interface/orchestrateInterface.ts +4 -2
  202. package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +36 -29
  203. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +2 -0
  204. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +18 -10
  205. package/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.ts +95 -0
  206. package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +2 -0
  207. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +53 -50
  208. package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +120 -10
  209. package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +47 -23
  210. package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +85 -1
  211. package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.ts +65 -0
  212. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +39 -0
  213. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +82 -1
  214. package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +57 -55
  215. package/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.ts +19 -30
  216. package/src/orchestrate/prisma/histories/transformPrismaReviewHistories.ts +38 -35
  217. package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +36 -23
  218. package/src/orchestrate/prisma/orchestratePrisma.ts +4 -2
  219. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +2 -0
  220. package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +3 -0
  221. package/src/orchestrate/prisma/orchestratePrismaReview.ts +26 -13
  222. package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +25 -17
  223. package/src/orchestrate/realize/histories/transformRealizeAuthorization.ts +24 -21
  224. package/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.ts +42 -40
  225. package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +17 -13
  226. package/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.ts +14 -5
  227. package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +35 -30
  228. package/src/orchestrate/realize/internal/{compile.ts → compileRealizeFiles.ts} +15 -11
  229. package/src/orchestrate/realize/orchestrateRealize.ts +59 -40
  230. package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +19 -10
  231. package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +3 -0
  232. package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +10 -10
  233. package/src/orchestrate/realize/orchestrateRealizeScenario.ts +7 -77
  234. package/src/orchestrate/realize/orchestrateRealizeWrite.ts +24 -23
  235. package/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.ts +6 -2
  236. package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +10 -5
  237. package/src/orchestrate/test/compile/completeTestCode.ts +17 -13
  238. package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +2 -0
  239. package/src/orchestrate/test/experimental/transformTestCorrectHistories.ast +4 -4
  240. package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +50 -37
  241. package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +62 -57
  242. package/src/orchestrate/test/histories/transformTestWriteHistories.ts +27 -7
  243. package/src/orchestrate/test/orchestrateTest.ts +7 -9
  244. package/src/orchestrate/test/orchestrateTestCorrect.ts +39 -25
  245. package/src/orchestrate/test/orchestrateTestScenario.ts +28 -21
  246. package/src/orchestrate/test/orchestrateTestWrite.ts +17 -18
  247. package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +3 -3
  248. package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +28 -1
  249. package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +2 -2
  250. package/src/utils/executeCachedBatch.ts +15 -0
  251. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +0 -6
  252. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js.map +0 -1
  253. package/lib/agent/src/orchestrate/realize/internal/compile.js.map +0 -1
  254. package/lib/agent/src/orchestrate/test/histories/transformTestHistories.d.ts +0 -3
  255. package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js +0 -74
  256. package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +0 -1
  257. package/lib/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +0 -6
  258. package/lib/orchestrate/test/histories/transformTestHistories.d.ts +0 -3
  259. package/src/orchestrate/test/histories/transformTestHistories.ts +0 -77
@@ -0,0 +1,6 @@
1
+ import { IAgenticaHistoryJson } from "@agentica/core";
2
+ import { AutoBeAnalyzeScenarioEvent } from "@autobe/interface";
3
+ import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
4
+ import { ILlmSchema } from "@samchon/openapi";
5
+ import { AutoBeContext } from "../../../context/AutoBeContext";
6
+ export declare const transformAnalyzeReviewHistories: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, scenario: AutoBeAnalyzeScenarioEvent, allFiles: AutoBeAnalyzeFile[], myFile: AutoBeAnalyzeFile) => Array<IAgenticaHistoryJson.IUserMessage | IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
@@ -2,4 +2,10 @@ import { AutoBeAnalyzeReviewEvent, AutoBeAnalyzeScenarioEvent, AutoBeProgressEve
2
2
  import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
3
3
  import { ILlmSchema } from "@samchon/openapi";
4
4
  import { AutoBeContext } from "../../context/AutoBeContext";
5
- export declare const orchestrateAnalyzeReview: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, scenario: AutoBeAnalyzeScenarioEvent, otherFiles: AutoBeAnalyzeFile[], myFile: AutoBeAnalyzeFile, progress: AutoBeProgressEventBase) => Promise<AutoBeAnalyzeReviewEvent>;
5
+ export declare const orchestrateAnalyzeReview: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
6
+ scenario: AutoBeAnalyzeScenarioEvent;
7
+ allFiles: AutoBeAnalyzeFile[];
8
+ myFile: AutoBeAnalyzeFile;
9
+ progress: AutoBeProgressEventBase;
10
+ promptCacheKey: string;
11
+ }) => Promise<AutoBeAnalyzeReviewEvent>;
@@ -1,8 +1,10 @@
1
- import { AutoBeAnalyzeScenarioEvent, AutoBeAnalyzeWriteEvent } from "@autobe/interface";
1
+ import { AutoBeAnalyzeScenarioEvent, AutoBeAnalyzeWriteEvent, AutoBeProgressEventBase } from "@autobe/interface";
2
2
  import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
3
3
  import { ILlmSchema } from "@samchon/openapi";
4
4
  import { AutoBeContext } from "../../context/AutoBeContext";
5
- export declare const orchestrateAnalyzeWrite: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, scenario: AutoBeAnalyzeScenarioEvent, file: AutoBeAnalyzeFile.Scenario, progress: {
6
- total: number;
7
- completed: number;
5
+ export declare const orchestrateAnalyzeWrite: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
6
+ scenario: AutoBeAnalyzeScenarioEvent;
7
+ file: AutoBeAnalyzeFile.Scenario;
8
+ progress: AutoBeProgressEventBase;
9
+ promptCacheKey: string;
8
10
  }) => Promise<AutoBeAnalyzeWriteEvent>;
@@ -0,0 +1,4 @@
1
+ import { IAgenticaHistoryJson } from "@agentica/core";
2
+ import { AutoBeOpenApi } from "@autobe/interface";
3
+ import { AutoBeState } from "../../../context/AutoBeState";
4
+ export declare const transformInterfaceEndpointsReviewHistories: (state: AutoBeState, endpoints: AutoBeOpenApi.IEndpoint[]) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
@@ -0,0 +1,10 @@
1
+ import { IAgenticaController } from "@agentica/core";
2
+ import { AutoBeOpenApi } from "@autobe/interface";
3
+ import { ILlmSchema } from "@samchon/openapi";
4
+ import { AutoBeContext } from "../../context/AutoBeContext";
5
+ import { IAutoBeInterfaceEndpointsReviewApplication } from "./structures/IAutoBeInterfaceEndpointsReviewApplication";
6
+ export declare function orchestrateInterfaceEndpointsReview<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, endpoints: AutoBeOpenApi.IEndpoint[], message?: string): Promise<AutoBeOpenApi.IEndpoint[]>;
7
+ export declare function createController<Model extends ILlmSchema.Model>(props: {
8
+ model: Model;
9
+ build: (props: IAutoBeInterfaceEndpointsReviewApplication.IProps) => void;
10
+ }): IAgenticaController.IClass<Model>;
@@ -1,7 +1,4 @@
1
- import { AutoBeOpenApi } from "@autobe/interface";
1
+ import { AutoBeOpenApi, AutoBeProgressEventBase } from "@autobe/interface";
2
2
  import { ILlmSchema } from "@samchon/openapi";
3
3
  import { AutoBeContext } from "../../context/AutoBeContext";
4
- export declare function orchestrateInterfaceSchemasReview<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, operations: AutoBeOpenApi.IOperation[], schemas: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>, progress: {
5
- total: number;
6
- completed: number;
7
- }): Promise<Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>>;
4
+ export declare function orchestrateInterfaceSchemasReview<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, operations: AutoBeOpenApi.IOperation[], schemas: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>, progress: AutoBeProgressEventBase): Promise<Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>>;
@@ -0,0 +1,60 @@
1
+ import { AutoBeOpenApi } from "@autobe/interface";
2
+ /**
3
+ * Interface for reviewing and refining API endpoints through holistic analysis.
4
+ *
5
+ * This application performs comprehensive review of all endpoints generated
6
+ * through divide-and-conquer strategy, ensuring consistency, eliminating
7
+ * redundancy, and preventing over-engineering across the entire API surface.
8
+ */
9
+ export interface IAutoBeInterfaceEndpointsReviewApplication {
10
+ /**
11
+ * Reviews and refines the complete collection of API endpoints.
12
+ *
13
+ * This method consolidates all endpoints generated independently by different
14
+ * groups and performs holistic review to:
15
+ * - Ensure naming consistency across all endpoints
16
+ * - Remove duplicate or overlapping endpoints
17
+ * - Eliminate over-engineered solutions
18
+ * - Standardize path structures and HTTP methods
19
+ * - Verify REST API design principles
20
+ *
21
+ * The review process examines the entire API as a cohesive system rather
22
+ * than individual endpoints, ensuring the final API is intuitive, maintainable,
23
+ * and follows best practices.
24
+ *
25
+ * @param next - The review results and refined endpoint collection
26
+ */
27
+ reviewEndpoints(next: IAutoBeInterfaceEndpointsReviewApplication.IProps): void;
28
+ }
29
+ export declare namespace IAutoBeInterfaceEndpointsReviewApplication {
30
+ interface IProps {
31
+ /**
32
+ * Comprehensive review analysis of all collected endpoints.
33
+ *
34
+ * Contains detailed findings from the holistic review including:
35
+ * - Identified inconsistencies in naming conventions
36
+ * - Duplicate endpoints that serve the same purpose
37
+ * - Over-engineered solutions that add unnecessary complexity
38
+ * - Violations of REST API design principles
39
+ * - Recommendations for improvement and standardization
40
+ *
41
+ * The review provides actionable feedback for creating a clean,
42
+ * consistent, and maintainable API structure.
43
+ */
44
+ review: string;
45
+ /**
46
+ * Refined collection of API endpoints after review and cleanup.
47
+ *
48
+ * The final optimized set of endpoints after:
49
+ * - Removing duplicates and redundant endpoints
50
+ * - Standardizing naming conventions across all paths
51
+ * - Simplifying over-engineered solutions
52
+ * - Ensuring consistent REST patterns
53
+ * - Aligning HTTP methods with their semantic meanings
54
+ *
55
+ * This collection represents the production-ready API structure
56
+ * that balances functionality with simplicity and maintainability.
57
+ */
58
+ endpoints: AutoBeOpenApi.IEndpoint[];
59
+ }
60
+ }
@@ -85,6 +85,44 @@ export declare namespace IAutoBeInterfaceOperationApplication {
85
85
  * ```
86
86
  */
87
87
  interface IOperation extends Omit<AutoBeOpenApi.IOperation, "authorizationRole" | "authorizationType"> {
88
+ /**
89
+ * Prisma schema models relevant to this operation.
90
+ *
91
+ * Contains the complete Prisma schema definitions for all entities involved
92
+ * in this operation, including their fields, relations, and database
93
+ * constraints. This enables comprehensive validation and schema-aware
94
+ * operation design.
95
+ *
96
+ * The schema information serves multiple critical purposes:
97
+ *
98
+ * - **Field Verification**: Ensures all referenced fields actually exist in
99
+ * the database schema and have the correct types
100
+ * - **Relationship Validation**: Confirms that entity relationships are
101
+ * properly defined and can support the operation's data access patterns
102
+ * - **Soft-Delete Detection**: For DELETE operations, identifies whether
103
+ * entities have soft-delete fields (deleted_at, is_deleted, etc.) to
104
+ * determine if the operation should perform logical deletion instead of
105
+ * physical removal
106
+ * - **Constraint Awareness**: Understands unique constraints, required
107
+ * fields, and default values to generate accurate request/response
108
+ * schemas
109
+ *
110
+ * Example content might include:
111
+ *
112
+ * ```prisma
113
+ * model User {
114
+ * id String @id @default(uuid())
115
+ * email String @unique
116
+ * name String
117
+ * deleted_at DateTime? // Indicates soft-delete capability
118
+ * posts Post[]
119
+ * }
120
+ * ```
121
+ *
122
+ * This schema context ensures operations are fully aligned with the actual
123
+ * database structure and business logic requirements.
124
+ */
125
+ prisma_schemas: string;
88
126
  /**
89
127
  * Authorization roles required to access this API operation.
90
128
  *
@@ -128,5 +128,83 @@ export declare namespace IAutoBeInterfaceOperationsReviewApplication {
128
128
  * ```
129
129
  */
130
130
  interface IOperation extends Omit<AutoBeOpenApi.IOperation, "authorizationType"> {
131
+ /**
132
+ * Prisma schema models relevant to this operation.
133
+ *
134
+ * Contains the complete Prisma schema definitions for all entities involved
135
+ * in this operation, including their fields, relations, and database
136
+ * constraints. This enables comprehensive validation and schema-aware
137
+ * operation design.
138
+ *
139
+ * The schema information serves multiple critical purposes:
140
+ *
141
+ * - **Field Verification**: Ensures all referenced fields actually exist in
142
+ * the database schema and have the correct types
143
+ * - **Relationship Validation**: Confirms that entity relationships are
144
+ * properly defined and can support the operation's data access patterns
145
+ * - **Soft-Delete Detection**: For DELETE operations, identifies whether
146
+ * entities have soft-delete fields (deleted_at, is_deleted, etc.) to
147
+ * determine if the operation should perform logical deletion instead of
148
+ * physical removal
149
+ * - **Constraint Awareness**: Understands unique constraints, required
150
+ * fields, and default values to generate accurate request/response
151
+ * schemas
152
+ *
153
+ * Example content might include:
154
+ *
155
+ * ```prisma
156
+ * model User {
157
+ * id String @id @default(uuid())
158
+ * email String @unique
159
+ * name String
160
+ * deleted_at DateTime? // Indicates soft-delete capability
161
+ * posts Post[]
162
+ * }
163
+ * ```
164
+ *
165
+ * This schema context ensures operations are fully aligned with the actual
166
+ * database structure and business logic requirements.
167
+ */
168
+ prisma_schemas: string;
169
+ /**
170
+ * Primary Prisma model name for this operation.
171
+ *
172
+ * Identifies the main database table/model that this operation targets.
173
+ * This must match exactly with the Prisma model name defined in the schema.
174
+ * When soft deletion is specified, this model name indicates which table
175
+ * should be soft-deleted.
176
+ *
177
+ * For example:
178
+ * - In a "GET /users/:id" operation, this would be "User"
179
+ * - In a "POST /articles" operation, this would be "Article"
180
+ * - In a "DELETE /comments/:id" with soft delete, this specifies the "Comment" model to soft-delete
181
+ *
182
+ * This property is essential for:
183
+ * - Determining the primary entity for CRUD operations
184
+ * - Identifying which table to apply soft deletion to
185
+ * - Validating operations against the correct Prisma model
186
+ * - Generating appropriate database queries and validations
187
+ */
188
+ model_name: string;
189
+ /**
190
+ * Soft delete column name for the Prisma models.
191
+ *
192
+ * Specifies the column name used for soft deletion in the database tables
193
+ * associated with this operation. When set to a non-null value, it indicates
194
+ * that the related entities support soft deletion through this column
195
+ * (typically a timestamp field like `deleted_at` or `deletedAt`).
196
+ *
197
+ * When null, it means the entities involved in this operation use hard
198
+ * deletion or don't support deletion at all. This information is crucial
199
+ * for generating appropriate CRUD operations and ensuring data integrity
200
+ * policies are correctly implemented.
201
+ *
202
+ * Common soft delete patterns:
203
+ * - `"deleted_at"`: Records deletion timestamp
204
+ * - `"deletedAt"`: Camel-cased deletion timestamp
205
+ * - `"is_deleted"`: Boolean flag for deletion status
206
+ * - `null`: No soft deletion (hard delete only)
207
+ */
208
+ soft_delete_column: string | null;
131
209
  }
132
210
  }
@@ -1,7 +1,7 @@
1
1
  import { AutoBeRealizeAuthorization, AutoBeRealizeFunction, IAutoBeTypeScriptCompileResult } from "@autobe/interface";
2
2
  import { ILlmSchema } from "@samchon/openapi";
3
3
  import { AutoBeContext } from "../../../context/AutoBeContext";
4
- export declare function compile<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
4
+ export declare function compileRealizeFiles<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
5
5
  authorizations: AutoBeRealizeAuthorization[];
6
6
  functions: AutoBeRealizeFunction[];
7
7
  }): Promise<IAutoBeTypeScriptCompileResult>;
@@ -1,4 +1,4 @@
1
- import { AutoBeRealizeAuthorization, AutoBeRealizeCorrectEvent, IAutoBeTypeScriptCompileResult } from "@autobe/interface";
1
+ import { AutoBeProgressEventBase, AutoBeRealizeAuthorization, AutoBeRealizeCorrectEvent, IAutoBeTypeScriptCompileResult } from "@autobe/interface";
2
2
  import { ILlmSchema } from "@samchon/openapi";
3
3
  import { AutoBeContext } from "../../context/AutoBeContext";
4
4
  import { IAutoBeRealizeScenarioApplication } from "./structures/IAutoBeRealizeScenarioApplication";
@@ -8,9 +8,5 @@ export declare function orchestrateRealizeCorrect<Model extends ILlmSchema.Model
8
8
  scenario: IAutoBeRealizeScenarioApplication.IProps;
9
9
  code: string;
10
10
  diagnostic: IAutoBeTypeScriptCompileResult.IDiagnostic;
11
- progress: IProgress;
11
+ progress: AutoBeProgressEventBase;
12
12
  }): Promise<AutoBeRealizeCorrectEvent>;
13
- export interface IProgress {
14
- total: number;
15
- completed: number;
16
- }
@@ -2,72 +2,6 @@ import { AutoBeOpenApi, AutoBeRealizeAuthorization } from "@autobe/interface";
2
2
  import { ILlmSchema } from "@samchon/openapi";
3
3
  import { AutoBeContext } from "../../context/AutoBeContext";
4
4
  import { IAutoBeRealizeScenarioApplication } from "./structures/IAutoBeRealizeScenarioApplication";
5
- export interface IAutoBeRealizeScenario {
6
- /**
7
- * The name of the function to be generated.
8
- *
9
- * Derived from the Swagger path and method. The function name must be written
10
- * in snake_case. It serves as the entry point in both code generation and
11
- * test code.
12
- *
13
- * Once the function is generated, the function name and file name will be the
14
- * same. The generated file will be located at
15
- * `src/providers/${function_name}.ts`.
16
- */
17
- functionName: string;
18
- /**
19
- * Definition of path and query parameters extracted from the OpenAPI spec.
20
- *
21
- * Includes input values passed via URL path or query string. Used for type
22
- * definitions, validation, and function signature construction.
23
- */
24
- parameters: AutoBeOpenApi.IParameter[];
25
- /**
26
- * Schema definition for the request body input.
27
- *
28
- * Extracted from the requestBody section of Swagger. Represents the input
29
- * data passed in the body (e.g., JSON). Used for generating function
30
- * arguments or DTOs.
31
- */
32
- inputSchema: AutoBeOpenApi.IRequestBody | null;
33
- /**
34
- * Schema definition for the response body.
35
- *
36
- * Extracted from the responses section of Swagger. Used to define the return
37
- * type and expected output in test code.
38
- */
39
- outputSchema: AutoBeOpenApi.IResponseBody | null;
40
- /**
41
- * Natural language description of the function’s purpose.
42
- *
43
- * Extracted from the summary or description field of Swagger. Used for code
44
- * documentation, test scenario generation, and conveying function intent.
45
- */
46
- description: string;
47
- /**
48
- * HTTP method information.
49
- *
50
- * Extracted from the Swagger operation method. Used to define the request
51
- * type during code and test generation.
52
- */
53
- method: "get" | "post" | "put" | "delete" | "patch";
54
- /**
55
- * List of scenario descriptions for test code generation.
56
- *
57
- * Each scenario describes the expected behavior of the function under certain
58
- * conditions. Used as a basis for TDD-style automated test generation.
59
- */
60
- testScenarios: string[];
61
- /**
62
- * Optional decorator event for customizing code generation behavior.
63
- *
64
- * Provides additional metadata or instructions that can modify how the
65
- * function implementation is generated. Can include custom annotations,
66
- * middleware configurations, or special handling directives that affect the
67
- * final code output.
68
- */
69
- decoratorEvent?: AutoBeRealizeAuthorization;
70
- }
71
5
  /**
72
6
  * Generates a planning result that defines what kind of function should be
73
7
  * created, based solely on the provided Swagger (OpenAPI) operation — without
@@ -1,4 +1,4 @@
1
- import { AutoBeRealizeAuthorization, AutoBeRealizeWriteEvent } from "@autobe/interface";
1
+ import { AutoBeProgressEventBase, AutoBeRealizeAuthorization, AutoBeRealizeWriteEvent } from "@autobe/interface";
2
2
  import { ILlmSchema } from "@samchon/openapi";
3
3
  import { AutoBeContext } from "../../context/AutoBeContext";
4
4
  import { IAutoBeRealizeScenarioApplication } from "./structures/IAutoBeRealizeScenarioApplication";
@@ -6,9 +6,6 @@ export declare function orchestrateRealizeWrite<Model extends ILlmSchema.Model>(
6
6
  totalAuthorizations: AutoBeRealizeAuthorization[];
7
7
  authorization: AutoBeRealizeAuthorization | null;
8
8
  scenario: IAutoBeRealizeScenarioApplication.IProps;
9
- progress: IProgress;
9
+ progress: AutoBeProgressEventBase;
10
+ promptCacheKey: string;
10
11
  }): Promise<AutoBeRealizeWriteEvent>;
11
- export interface IProgress {
12
- total: number;
13
- completed: number;
14
- }
@@ -1,4 +1,4 @@
1
- import { AutoBeOpenApi, AutoBeRealizeAuthorization } from "@autobe/interface";
1
+ import { AutoBeOpenApi, AutoBeRealizeAuthorization, AutoBeTestFile } from "@autobe/interface";
2
2
  export declare namespace IAutoBeRealizeScenarioApplication {
3
3
  interface IProps {
4
4
  /** The OpenAPI operation to be realized. */
@@ -24,7 +24,7 @@ export declare namespace IAutoBeRealizeScenarioApplication {
24
24
  * certain conditions. Used as a basis for TDD-style automated test
25
25
  * generation.
26
26
  */
27
- testScenarios: string[];
27
+ testFiles: AutoBeTestFile[];
28
28
  /**
29
29
  * Optional decorator event for customizing code generation behavior.
30
30
  *
@@ -17,13 +17,16 @@ export declare namespace IAutoBeRealizeWriteApplication {
17
17
  * 📋 STEP 1 - PRISMA SCHEMA VERIFICATION:
18
18
  *
19
19
  * DO:
20
+ *
20
21
  * - Examine the actual Prisma schema model definition
21
22
  * - List EVERY field that exists in the model with exact types
22
23
  * - Explicitly note fields that DO NOT exist
23
24
  *
24
25
  * DO NOT:
26
+ *
25
27
  * - Assume common fields exist without verification
26
- * - Use fields like deleted_at, created_by, updated_by, is_deleted, is_active without checking
28
+ * - Use fields like deleted_at, created_by, updated_by, is_deleted, is_active
29
+ * without checking
27
30
  *
28
31
  * 📋 STEP 2 - FIELD INVENTORY:
29
32
  *
@@ -171,10 +174,12 @@ export declare namespace IAutoBeRealizeWriteApplication {
171
174
  * Import rules:
172
175
  *
173
176
  * DO NOT:
177
+ *
174
178
  * - Add any new import statements manually
175
179
  * - Write import statements directly (this causes compile errors)
176
180
  *
177
- * Note: All necessary imports are provided globally or by the system automatically.
181
+ * Note: All necessary imports are provided globally or by the system
182
+ * automatically.
178
183
  *
179
184
  * ✅ Requirements:
180
185
  *
@@ -1,4 +1,6 @@
1
1
  import { IAgenticaHistoryJson } from "@agentica/core";
2
2
  import { IAutoBeTypeScriptCompileResult } from "@autobe/interface";
3
+ import { ILlmSchema } from "@samchon/openapi";
4
+ import { AutoBeContext } from "../../../context/AutoBeContext";
3
5
  import { IAutoBeTestFunction } from "../structures/IAutoBeTestFunction";
4
- export declare const transformTestCorrectHistories: (func: IAutoBeTestFunction, failure: IAutoBeTypeScriptCompileResult.IFailure) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
6
+ export declare const transformTestCorrectHistories: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, func: IAutoBeTestFunction, failure: IAutoBeTypeScriptCompileResult.IFailure) => Promise<Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>>;
@@ -1,7 +1,9 @@
1
1
  import { IAgenticaHistoryJson } from "@agentica/core";
2
2
  import { AutoBeTestScenario } from "@autobe/interface";
3
+ import { ILlmSchema } from "@samchon/openapi";
4
+ import { AutoBeContext } from "../../../context/AutoBeContext";
3
5
  import { IAutoBeTestScenarioArtifacts } from "../structures/IAutoBeTestScenarioArtifacts";
4
- export declare function transformTestWriteHistories(scenario: AutoBeTestScenario, artifacts: IAutoBeTestScenarioArtifacts): Array<IAgenticaHistoryJson.ISystemMessage>;
6
+ export declare function transformTestWriteHistories<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, scenario: AutoBeTestScenario, artifacts: IAutoBeTestScenarioArtifacts): Promise<Array<IAgenticaHistoryJson.ISystemMessage | IAgenticaHistoryJson.IAssistantMessage>>;
5
7
  export declare namespace transformTestWriteHistories {
6
8
  function structures(artifacts: IAutoBeTestScenarioArtifacts): string;
7
9
  function functional(artifacts: IAutoBeTestScenarioArtifacts): string;
@@ -67,8 +67,8 @@ export declare namespace IAutoBeTestCorrectApplication {
67
67
  * AI generates the first corrected version of the test code based on error
68
68
  * analysis and correction strategies. This draft addresses all identified
69
69
  * compilation errors while preserving the original business logic and test
70
- * workflow. The code is compilation-error-free and follows all
71
- * established conventions.
70
+ * workflow. The code is compilation-error-free and follows all established
71
+ * conventions.
72
72
  *
73
73
  * The implementation incorporates lessons learned from error analysis to
74
74
  * produce properly typed, syntactically correct code that maintains the
@@ -28,6 +28,18 @@ export declare namespace IAutoBeTestScenarioApplication {
28
28
  *
29
29
  * Each scenario represents a specific test case for the same `path` and
30
30
  * `method`.
31
+ *
32
+ * IMPORTANT: Each scenario must be actually implementable. A scenario's
33
+ * implementability is determined by the existence of ALL APIs (endpoints)
34
+ * required to test it. This includes not only the primary endpoint being
35
+ * tested, but also ALL dependency endpoints needed for setup,
36
+ * authentication, and data preparation. If even one required dependency API
37
+ * is missing from the available operations, the scenario cannot be
38
+ * implemented and should not be generated.
39
+ *
40
+ * Example: A "test banned user login" scenario requires both a login API
41
+ * AND a ban user API. If the ban API doesn't exist, this scenario is not
42
+ * implementable regardless of database schema fields.
31
43
  */
32
44
  scenarios: IScenario[] & tags.MinItems<1>;
33
45
  }
@@ -37,6 +49,11 @@ export declare namespace IAutoBeTestScenarioApplication {
37
49
  * This interface defines a structured, user-centric test draft that includes
38
50
  * a descriptive function name, a detailed scenario draft, and logical
39
51
  * dependencies on other endpoints required for context or setup.
52
+ *
53
+ * CRITICAL: All referenced endpoints MUST exist in the provided API
54
+ * operations. Do NOT create scenarios for non-existent APIs, even if database
55
+ * schema fields suggest their existence. Test scenarios must be implementable
56
+ * with available APIs only.
40
57
  */
41
58
  interface IScenario {
42
59
  /**
@@ -113,11 +130,21 @@ export declare namespace IAutoBeTestScenarioApplication {
113
130
  * authentication, resource creation, or data setup, that are relevant to
114
131
  * the test. This list is not a strict execution order — if ordering is
115
132
  * important, it must be described explicitly in the `purpose`.
133
+ *
134
+ * WARNING: Every endpoint referenced here MUST exist in the provided API
135
+ * operations. Do NOT reference endpoints that are not explicitly available,
136
+ * even if they seem logically necessary based on database schema or
137
+ * business logic.
116
138
  */
117
139
  dependencies: IDependencies[];
118
140
  }
119
141
  interface IDependencies {
120
- /** Target API endpoint that this scenario depends on. */
142
+ /**
143
+ * Target API endpoint that this scenario depends on.
144
+ *
145
+ * This endpoint MUST exist in the available API operations list.
146
+ * Non-existent endpoints will cause test implementation failures.
147
+ */
121
148
  endpoint: AutoBeOpenApi.IEndpoint;
122
149
  /**
123
150
  * A concise explanation of why this API call is relevant or required for
@@ -32,8 +32,8 @@ export declare namespace IAutoBeTestWriteApplication {
32
32
  *
33
33
  * AI determines the appropriate domain category based on the scenario
34
34
  * analysis. This classification drives file structure, test categorization,
35
- * and logical grouping. The domain must be a single, lowercase word that
36
- * represents the primary API resource.
35
+ * and logical grouping. The domain must be a single, lowercase word in
36
+ * snake_case format that represents the primary API resource.
37
37
  *
38
38
  * Workflow: Scenario analysis → Domain identification → Test organization
39
39
  * structure
@@ -0,0 +1 @@
1
+ export declare const executeCachedBatch: <T>(tasks: Array<(user: string) => Promise<T>>, promptCacheKey?: string) => Promise<T[]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobe/agent",
3
- "version": "0.19.1",
3
+ "version": "0.21.0",
4
4
  "description": "AI backend server code generator",
5
5
  "main": "lib/index.js",
6
6
  "author": "Wrtn Technologies",
@@ -20,15 +20,15 @@
20
20
  "README.md"
21
21
  ],
22
22
  "dependencies": {
23
- "@agentica/core": "^0.32.1",
23
+ "@agentica/core": "0.32.3-dev.3",
24
24
  "@prisma/internals": "^6.7.0",
25
25
  "@samchon/openapi": "^4.7.1",
26
26
  "openai": "^5.12.2",
27
27
  "tstl": "^3.0.0",
28
- "typia": "^9.7.1",
28
+ "typia": "^9.7.2",
29
29
  "uuid": "^11.1.0",
30
- "@autobe/interface": "^0.19.1",
31
- "@autobe/utils": "^0.19.1"
30
+ "@autobe/utils": "^0.21.0",
31
+ "@autobe/interface": "^0.21.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@rollup/plugin-json": "^6.1.0",
@@ -40,8 +40,8 @@
40
40
  "ts-node": "^10.9.2",
41
41
  "ts-patch": "^3.3.0",
42
42
  "typescript": "~5.9.2",
43
- "@autobe/filesystem": "^0.19.1",
44
- "@autobe/compiler": "^0.19.1"
43
+ "@autobe/filesystem": "^0.21.0",
44
+ "@autobe/compiler": "^0.21.0"
45
45
  },
46
46
  "keywords": [
47
47
  "ai",
@@ -13,7 +13,7 @@ import {
13
13
  } from "@autobe/interface";
14
14
  import { ILlmSchema } from "@samchon/openapi";
15
15
  import { Semaphore, Singleton } from "tstl";
16
- import { v4 } from "uuid";
16
+ import { v7 } from "uuid";
17
17
 
18
18
  import { AutoBeAgentBase } from "./AutoBeAgentBase";
19
19
  import { AutoBeContext } from "./context/AutoBeContext";
@@ -202,7 +202,7 @@ export class AutoBeAgent<Model extends ILlmSchema.Model>
202
202
  this.agentica_.on("assistantMessage", async (message) => {
203
203
  const start = new Date();
204
204
  const history: AutoBeAssistantMessageHistory = {
205
- id: v4(),
205
+ id: v7(),
206
206
  type: "assistantMessage",
207
207
  text: await message.join(),
208
208
  created_at: start.toISOString(),
@@ -212,6 +212,7 @@ export class AutoBeAgent<Model extends ILlmSchema.Model>
212
212
  this.histories_.push(history);
213
213
  this.dispatch({
214
214
  type: "assistantMessage",
215
+ id: history.id,
215
216
  text: history.text,
216
217
  created_at: history.created_at,
217
218
  }).catch(() => {});
@@ -253,7 +254,7 @@ export class AutoBeAgent<Model extends ILlmSchema.Model>
253
254
  ): Promise<AutoBeHistory[]> {
254
255
  const index: number = this.histories_.length;
255
256
  const userMessageHistory: AutoBeUserMessageHistory = {
256
- id: v4(),
257
+ id: v7(),
257
258
  type: "userMessage",
258
259
  contents:
259
260
  typeof content === "string"
@@ -11,7 +11,7 @@ import {
11
11
  IAutoBePlaygroundReplay,
12
12
  } from "@autobe/interface";
13
13
  import { Singleton, randint, sleep_for } from "tstl";
14
- import { v4 } from "uuid";
14
+ import { v7 } from "uuid";
15
15
 
16
16
  import { AutoBeAgentBase } from "./AutoBeAgentBase";
17
17
  import { AutoBeState } from "./context/AutoBeState";
@@ -50,7 +50,7 @@ export class AutoBeMockAgent extends AutoBeAgentBase implements IAutoBeAgent {
50
50
  ): Promise<AutoBeHistory[]> {
51
51
  // THE USER-MESSAGE
52
52
  const userMessage: AutoBeUserMessageHistory = {
53
- id: v4(),
53
+ id: v7(),
54
54
  type: "userMessage",
55
55
  contents:
56
56
  typeof content === "string"
@@ -72,7 +72,7 @@ export class AutoBeMockAgent extends AutoBeAgentBase implements IAutoBeAgent {
72
72
  if (state.realize !== null) {
73
73
  await sleep_for(2_000);
74
74
  const assistantMessage: AutoBeAssistantMessageHistory = {
75
- id: v4(),
75
+ id: v7(),
76
76
  type: "assistantMessage",
77
77
  text: [
78
78
  "AutoBE has successfully realized the application.",
@@ -94,7 +94,7 @@ export class AutoBeMockAgent extends AutoBeAgentBase implements IAutoBeAgent {
94
94
  if (snapshots === null) {
95
95
  this.histories_.push(userMessage);
96
96
  this.histories_.push({
97
- id: v4(),
97
+ id: v7(),
98
98
  type: "assistantMessage",
99
99
  text: [
100
100
  "The histories are prepared until current state.",
@@ -175,6 +175,7 @@ const sleepMap: Record<AutoBeEvent.Type, number> = {
175
175
  interfaceStart: 1_000,
176
176
  interfaceGroups: 1_000,
177
177
  interfaceEndpoints: 1_000,
178
+ interfaceEndpointsReview: 1_000,
178
179
  interfaceOperations: 400,
179
180
  interfaceOperationsReview: 400,
180
181
  interfaceAuthorization: 400,