@autobe/agent 0.20.0 → 0.22.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 (320) hide show
  1. package/lib/agent/src/AutoBeAgent.js +2 -2
  2. package/lib/agent/src/AutoBeAgent.js.map +1 -1
  3. package/lib/agent/src/AutoBeMockAgent.js +1 -0
  4. package/lib/agent/src/AutoBeMockAgent.js.map +1 -1
  5. package/lib/agent/src/constants/AutoBeConfigConstant.d.ts +3 -0
  6. package/lib/agent/src/{orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js → constants/AutoBeConfigConstant.js} +1 -1
  7. package/lib/agent/src/constants/AutoBeConfigConstant.js.map +1 -0
  8. package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +27 -26
  9. package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +1 -1
  10. package/lib/agent/src/context/AutoBeContext.d.ts +3 -2
  11. package/lib/agent/src/context/AutoBeTokenUsageComponent.js +4 -3
  12. package/lib/agent/src/context/AutoBeTokenUsageComponent.js.map +1 -1
  13. package/lib/agent/src/factory/consentFunctionCall.js +4 -4
  14. package/lib/agent/src/factory/consentFunctionCall.js.map +1 -1
  15. package/lib/agent/src/factory/createAutoBeContext.js +16 -11
  16. package/lib/agent/src/factory/createAutoBeContext.js.map +1 -1
  17. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js +1 -1
  18. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -1
  19. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +2 -2
  20. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
  21. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +1 -1
  22. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
  23. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +6 -6
  24. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +50 -8
  25. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
  26. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +4 -4
  27. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +6 -0
  28. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +4 -0
  29. package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.js +1 -1
  30. package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
  31. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +19 -1
  32. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
  33. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +3 -3
  34. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
  35. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +1 -1
  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/transformInterfaceGroupHistories.js.map +1 -1
  42. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +1 -1
  43. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
  44. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +2 -2
  45. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
  46. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +1 -1
  47. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
  48. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +1 -1
  49. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +2 -2
  50. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
  51. package/lib/agent/src/orchestrate/interface/orchestrateInterface.js +5 -1
  52. package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -1
  53. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +16 -10
  54. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
  55. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.d.ts +1 -1
  56. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js +3731 -228
  57. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  58. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js +5 -3
  59. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
  60. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +10 -0
  61. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +365 -0
  62. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +1 -0
  63. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +43 -63
  64. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  65. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +244 -176
  66. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
  67. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js +3466 -103
  68. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
  69. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +6 -1
  70. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +3672 -358
  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 +0 -38
  76. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +48 -101
  77. package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +29 -23
  78. package/lib/agent/src/orchestrate/interface/utils/JsonSchemaFactory.d.ts +9 -0
  79. package/lib/agent/src/orchestrate/interface/utils/JsonSchemaFactory.js +1385 -0
  80. package/lib/agent/src/orchestrate/interface/utils/JsonSchemaFactory.js.map +1 -0
  81. package/lib/agent/src/orchestrate/interface/utils/JsonSchemaNamingConvention.d.ts +5 -0
  82. package/lib/agent/src/orchestrate/interface/utils/JsonSchemaNamingConvention.js +78 -0
  83. package/lib/agent/src/orchestrate/interface/utils/JsonSchemaNamingConvention.js.map +1 -0
  84. package/lib/agent/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.d.ts +2 -0
  85. package/lib/agent/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.js +81 -0
  86. package/lib/agent/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.js.map +1 -0
  87. package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js.map +1 -1
  88. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +1 -1
  89. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
  90. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +1 -1
  91. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -1
  92. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +2 -2
  93. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
  94. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +1 -1
  95. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
  96. package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.d.ts +1 -1
  97. package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js +2 -2
  98. package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  99. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +1 -1
  100. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -1
  101. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +2 -2
  102. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
  103. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +6 -6
  104. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +22 -7
  105. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
  106. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -8
  107. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +13 -29
  108. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
  109. package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.d.ts +2 -2
  110. package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js +2 -8
  111. package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js.map +1 -1
  112. package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +6 -49
  113. package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -1
  114. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js +4 -2
  115. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
  116. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +5 -3
  117. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
  118. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +13 -6
  119. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +206 -118
  120. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
  121. package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts +2 -2
  122. package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js +2 -2
  123. package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -1
  124. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +2 -2
  125. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +24 -39
  126. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
  127. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +17 -0
  128. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +20 -0
  129. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +33 -73
  130. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.d.ts +5 -0
  131. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.js +3 -0
  132. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.js.map +1 -0
  133. package/{src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.ts → lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.d.ts} +3 -10
  134. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.js +3 -0
  135. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.js.map +1 -0
  136. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +40 -24
  137. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.d.ts +31 -0
  138. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js +86 -0
  139. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js.map +1 -0
  140. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteDto.d.ts +4 -0
  141. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteDto.js +55 -0
  142. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteDto.js.map +1 -0
  143. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteImportStatements.d.ts +2 -0
  144. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteImportStatements.js +20 -0
  145. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteImportStatements.js.map +1 -0
  146. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteInputType.d.ts +30 -0
  147. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteInputType.js +73 -0
  148. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteInputType.js.map +1 -0
  149. package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.d.ts +6 -2
  150. package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js +63 -69
  151. package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
  152. package/lib/agent/src/orchestrate/test/compile/completeTestCode.js +15 -14
  153. package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +1 -1
  154. package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js +1 -1
  155. package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -1
  156. package/lib/agent/src/orchestrate/test/compile/getTestImportStatements.d.ts +2 -0
  157. package/lib/agent/src/orchestrate/test/compile/getTestImportStatements.js +19 -0
  158. package/lib/agent/src/orchestrate/test/compile/getTestImportStatements.js.map +1 -0
  159. package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +1 -1
  160. package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.js +2 -0
  161. package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -1
  162. package/lib/agent/src/orchestrate/test/compile/getTestTemplateCode.d.ts +2 -0
  163. package/lib/agent/src/orchestrate/test/compile/getTestTemplateCode.js +21 -0
  164. package/lib/agent/src/orchestrate/test/compile/getTestTemplateCode.js.map +1 -0
  165. package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.d.ts +4 -2
  166. package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +40 -25
  167. package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
  168. package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +5 -4
  169. package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
  170. package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.d.ts +3 -1
  171. package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +137 -96
  172. package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
  173. package/lib/agent/src/orchestrate/test/orchestrateTest.js +6 -0
  174. package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -1
  175. package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.d.ts +1 -1
  176. package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js +126 -72
  177. package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  178. package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +54 -48
  179. package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  180. package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js +122 -43
  181. package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  182. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +48 -45
  183. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.d.ts +6 -0
  184. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.js +3 -0
  185. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.js.map +1 -0
  186. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +28 -1
  187. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.d.ts +1 -0
  188. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +13 -0
  189. package/lib/agent/src/orchestrate/test/utils/getReferenceIds.d.ts +5 -0
  190. package/lib/agent/src/orchestrate/test/utils/getReferenceIds.js +28 -0
  191. package/lib/agent/src/orchestrate/test/utils/getReferenceIds.js.map +1 -0
  192. package/lib/agent/src/structures/IAutoBeConfig.d.ts +2 -0
  193. package/lib/constants/AutoBeConfigConstant.d.ts +3 -0
  194. package/lib/constants/AutoBeSystemPromptConstant.d.ts +27 -26
  195. package/lib/context/AutoBeContext.d.ts +3 -2
  196. package/lib/index.mjs +13778 -3055
  197. package/lib/index.mjs.map +1 -1
  198. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +6 -0
  199. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +4 -0
  200. package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.d.ts +4 -0
  201. package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +1 -1
  202. package/lib/orchestrate/interface/orchestrateInterfaceComplement.d.ts +1 -1
  203. package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +10 -0
  204. package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +6 -1
  205. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.d.ts +60 -0
  206. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +0 -38
  207. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +48 -101
  208. package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +29 -23
  209. package/lib/orchestrate/interface/utils/JsonSchemaFactory.d.ts +9 -0
  210. package/lib/orchestrate/interface/utils/JsonSchemaNamingConvention.d.ts +5 -0
  211. package/lib/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.d.ts +2 -0
  212. package/lib/orchestrate/prisma/orchestratePrismaCorrect.d.ts +1 -1
  213. package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +6 -6
  214. package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -8
  215. package/lib/orchestrate/realize/internal/compileRealizeFiles.d.ts +2 -2
  216. package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +13 -6
  217. package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +2 -2
  218. package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +2 -2
  219. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +17 -0
  220. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +20 -0
  221. package/lib/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +33 -73
  222. package/lib/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.d.ts +5 -0
  223. package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.d.ts +36 -0
  224. package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +40 -24
  225. package/lib/orchestrate/realize/utils/getRealizeWriteCodeTemplate.d.ts +31 -0
  226. package/lib/orchestrate/realize/utils/getRealizeWriteDto.d.ts +4 -0
  227. package/lib/orchestrate/realize/utils/getRealizeWriteImportStatements.d.ts +2 -0
  228. package/lib/orchestrate/realize/utils/getRealizeWriteInputType.d.ts +30 -0
  229. package/lib/orchestrate/realize/utils/replaceImportStatements.d.ts +6 -2
  230. package/lib/orchestrate/test/compile/getTestImportStatements.d.ts +2 -0
  231. package/lib/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +1 -1
  232. package/lib/orchestrate/test/compile/getTestTemplateCode.d.ts +2 -0
  233. package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +4 -2
  234. package/lib/orchestrate/test/histories/transformTestWriteHistories.d.ts +3 -1
  235. package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +1 -1
  236. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +48 -45
  237. package/lib/orchestrate/test/structures/IAutoBeTestFunctionFailure.d.ts +6 -0
  238. package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +28 -1
  239. package/lib/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.d.ts +1 -0
  240. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +13 -0
  241. package/lib/orchestrate/test/utils/getReferenceIds.d.ts +5 -0
  242. package/lib/structures/IAutoBeConfig.d.ts +2 -0
  243. package/package.json +6 -6
  244. package/src/AutoBeAgent.ts +2 -0
  245. package/src/AutoBeMockAgent.ts +1 -0
  246. package/src/constants/AutoBeConfigConstant.ts +3 -0
  247. package/src/constants/AutoBeSystemPromptConstant.ts +27 -26
  248. package/src/context/AutoBeContext.ts +3 -0
  249. package/src/context/AutoBeTokenUsageComponent.ts +3 -3
  250. package/src/factory/consentFunctionCall.ts +2 -0
  251. package/src/factory/createAutoBeContext.ts +145 -135
  252. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +6 -0
  253. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.ts +4 -0
  254. package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +19 -1
  255. package/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.ts +39 -0
  256. package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +1 -4
  257. package/src/orchestrate/interface/orchestrateInterface.ts +15 -4
  258. package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +13 -5
  259. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +58 -19
  260. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +5 -1
  261. package/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.ts +95 -0
  262. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +11 -11
  263. package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +7 -3
  264. package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +33 -91
  265. package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +72 -95
  266. package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.ts +65 -0
  267. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +0 -39
  268. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +50 -104
  269. package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +31 -27
  270. package/src/orchestrate/interface/utils/JsonSchemaFactory.ts +171 -0
  271. package/src/orchestrate/interface/utils/JsonSchemaNamingConvention.ts +83 -0
  272. package/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.ts +90 -0
  273. package/src/orchestrate/interface/utils/validateAuthorizationSchema.ts +2 -2
  274. package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +1 -2
  275. package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +30 -15
  276. package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +27 -49
  277. package/src/orchestrate/realize/internal/compileRealizeFiles.ts +4 -11
  278. package/src/orchestrate/realize/orchestrateRealize.ts +19 -75
  279. package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +1 -1
  280. package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +114 -25
  281. package/src/orchestrate/realize/orchestrateRealizeScenario.ts +9 -5
  282. package/src/orchestrate/realize/orchestrateRealizeWrite.ts +11 -15
  283. package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +17 -0
  284. package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.ts +20 -0
  285. package/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.ts +40 -74
  286. package/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.ts +9 -0
  287. package/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.ts +45 -0
  288. package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +43 -27
  289. package/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.ts +97 -0
  290. package/src/orchestrate/realize/utils/getRealizeWriteDto.ts +64 -0
  291. package/src/orchestrate/realize/utils/getRealizeWriteImportStatements.ts +29 -0
  292. package/src/orchestrate/realize/utils/getRealizeWriteInputType.ts +82 -0
  293. package/src/orchestrate/realize/utils/replaceImportStatements.ts +101 -111
  294. package/src/orchestrate/test/compile/completeTestCode.ts +15 -26
  295. package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +3 -0
  296. package/src/orchestrate/test/compile/getTestImportStatements.ts +25 -0
  297. package/src/orchestrate/test/compile/getTestScenarioArtifacts.ts +6 -1
  298. package/src/orchestrate/test/compile/getTestTemplateCode.ts +25 -0
  299. package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +48 -36
  300. package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +6 -5
  301. package/src/orchestrate/test/histories/transformTestWriteHistories.ts +43 -4
  302. package/src/orchestrate/test/orchestrateTest.ts +6 -0
  303. package/src/orchestrate/test/orchestrateTestCorrect.ts +46 -11
  304. package/src/orchestrate/test/orchestrateTestScenario.ts +52 -48
  305. package/src/orchestrate/test/orchestrateTestWrite.ts +24 -6
  306. package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +49 -46
  307. package/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.ts +8 -0
  308. package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +28 -1
  309. package/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.ts +1 -0
  310. package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +14 -0
  311. package/src/orchestrate/test/utils/getReferenceIds.ts +25 -0
  312. package/src/structures/IAutoBeConfig.ts +3 -0
  313. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +0 -38
  314. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js.map +0 -1
  315. package/lib/agent/src/orchestrate/test/histories/transformTestHistories.d.ts +0 -3
  316. package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js +0 -75
  317. package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +0 -1
  318. package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +0 -38
  319. package/lib/orchestrate/test/histories/transformTestHistories.d.ts +0 -3
  320. package/src/orchestrate/test/histories/transformTestHistories.ts +0 -78
@@ -50,7 +50,7 @@ export async function orchestrateTestWrite<Model extends ILlmSchema.Model>(
50
50
  artifacts,
51
51
  event,
52
52
  };
53
- } catch {
53
+ } catch (error) {
54
54
  return null;
55
55
  }
56
56
  }),
@@ -73,7 +73,7 @@ async function process<Model extends ILlmSchema.Model>(
73
73
  };
74
74
  const { tokenUsage } = await ctx.conversate({
75
75
  source: "testWrite",
76
- histories: transformTestWriteHistories(scenario, artifacts),
76
+ histories: await transformTestWriteHistories(ctx, scenario, artifacts),
77
77
  controller: createController({
78
78
  model: ctx.model,
79
79
  artifacts,
@@ -85,16 +85,30 @@ async function process<Model extends ILlmSchema.Model>(
85
85
  promptCacheKey,
86
86
  message: "Create e2e test functions.",
87
87
  });
88
- if (pointer.value === null) throw new Error("Failed to create test code.");
88
+ if (pointer.value === null) {
89
+ ++progress.completed;
90
+ throw new Error("Failed to create test code.");
91
+ }
89
92
 
90
93
  const compiler: IAutoBeCompiler = await ctx.compiler();
91
- pointer.value.final = await compiler.typescript.beautify(pointer.value.final);
94
+ if (pointer.value.revise)
95
+ pointer.value.revise.final = await compiler.typescript.beautify(
96
+ pointer.value.revise.final,
97
+ );
98
+ else
99
+ pointer.value.draft = await compiler.typescript.beautify(
100
+ pointer.value.draft,
101
+ );
92
102
  return {
93
103
  type: "testWrite",
94
104
  id: v7(),
95
105
  created_at: new Date().toISOString(),
96
106
  location: `test/features/api/${pointer.value.domain}/${scenario.functionName}.ts`,
97
- ...pointer.value,
107
+ scenario: pointer.value.scenario,
108
+ domain: pointer.value.domain,
109
+ draft: pointer.value.draft,
110
+ review: pointer.value.revise?.review,
111
+ final: pointer.value.revise?.final,
98
112
  tokenUsage,
99
113
  completed: ++progress.completed,
100
114
  total: progress.total,
@@ -119,7 +133,11 @@ function createController<Model extends ILlmSchema.Model>(props: {
119
133
  execute: {
120
134
  write: (next) => {
121
135
  next.draft = completeTestCode(props.artifacts, next.draft);
122
- next.final = completeTestCode(props.artifacts, next.final);
136
+ if (next.revise)
137
+ next.revise.final = completeTestCode(
138
+ props.artifacts,
139
+ next.revise.final,
140
+ );
123
141
  props.build(next);
124
142
  },
125
143
  } satisfies IAutoBeTestWriteApplication,
@@ -4,16 +4,14 @@ export interface IAutoBeTestCorrectApplication {
4
4
  * generates corrected E2E test code.
5
5
  *
6
6
  * The AI executes this function to perform the complete error correction
7
- * workflow: error-free analysis → compilation error analysis draft
8
- * correction → code review → final corrected implementation. This multi-step
9
- * process ensures systematic error resolution while preserving original test
10
- * functionality and maintaining code quality.
7
+ * workflow: compilation error analysis → draft correction code review
8
+ * final corrected implementation. This multi-step process ensures systematic
9
+ * error resolution while preserving original test functionality and
10
+ * maintaining code quality.
11
11
  *
12
- * The corrector first analyzes the scenario without considering compilation
13
- * errors to understand the intended functionality, then incorporates
14
- * compilation diagnostics to identify specific issues, and finally produces
15
- * corrected code through iterative refinement with comprehensive review and
16
- * validation.
12
+ * The corrector analyzes compilation diagnostics to identify specific issues,
13
+ * develops correction strategies, and produces corrected code through
14
+ * iterative refinement with comprehensive review and validation.
17
15
  *
18
16
  * @param props Complete specification for error correction workflow including
19
17
  * analysis steps, draft implementation, review process, and final code
@@ -25,47 +23,30 @@ export interface IAutoBeTestCorrectApplication {
25
23
  export namespace IAutoBeTestCorrectApplication {
26
24
  export interface IProps {
27
25
  /**
28
- * Step 1: Initial analysis and understanding without compilation error
29
- * context.
30
- *
31
- * AI analyzes the original test scenario, business requirements, and
32
- * intended functionality without being influenced by compilation errors.
33
- * This clean analysis establishes a clear understanding of what the test
34
- * accomplishes, the expected business workflow, and the correct API
35
- * integration patterns.
36
- *
37
- * This step ensures that error correction doesn't lose sight of the
38
- * original test purpose and helps maintain the intended business logic
39
- * while addressing technical compilation issues. The AI develops a
40
- * comprehensive understanding of the test requirements before diving into
41
- * error-specific details.
42
- *
43
- * Workflow: Scenario understanding → Business logic analysis → Intended
44
- * functionality mapping
45
- */
46
- think_without_compile_error: string;
47
-
48
- /**
49
- * Step 2: Compilation error analysis and root cause identification.
26
+ * Step 1: Deep compilation error analysis and correction strategy.
27
+ *
28
+ * AI performs comprehensive analysis of compilation errors to develop
29
+ * targeted correction strategies. This step involves deep examination of
30
+ * error messages, identification of error patterns, understanding root
31
+ * causes, and planning systematic corrections.
50
32
  *
51
- * AI re-analyzes the scenario and implementation with full awareness of
52
- * compilation errors and diagnostic information. This step involves
53
- * systematic examination of error messages, identification of error
54
- * patterns, and understanding of how compilation issues relate to the
55
- * intended functionality.
33
+ * The AI examines each compilation diagnostic to understand where the
34
+ * implementation diverged from correct TypeScript usage, identifies the
35
+ * business logic intent behind the failed code, and formulates strategies
36
+ * to fix errors while preserving the original test purpose. This analysis
37
+ * correlates error patterns with code structure to ensure corrections
38
+ * address root causes rather than symptoms.
56
39
  *
57
- * The AI correlates compilation diagnostics with the original requirements
58
- * to understand where the implementation diverged from correct TypeScript
59
- * usage while maintaining the business logic intent. This analysis forms
60
- * the foundation for targeted error correction strategies.
40
+ * This deep analysis forms the foundation for all subsequent correction
41
+ * efforts, ensuring a methodical approach to resolving compilation issues.
61
42
  *
62
43
  * Workflow: Error diagnostic analysis → Root cause identification →
63
- * Correction strategy planning
44
+ * Correction strategy planning → Business logic preservation strategy
64
45
  */
65
- think_again_with_compile_error: string;
46
+ think: string;
66
47
 
67
48
  /**
68
- * Step 3: Draft corrected TypeScript E2E test code implementation.
49
+ * Step 2: Draft corrected TypeScript E2E test code implementation.
69
50
  *
70
51
  * AI generates the first corrected version of the test code based on error
71
52
  * analysis and correction strategies. This draft addresses all identified
@@ -86,7 +67,29 @@ export namespace IAutoBeTestCorrectApplication {
86
67
  draft: string;
87
68
 
88
69
  /**
89
- * Step 4: Code review and correction validation.
70
+ * Step 3-4: Review and finalization process.
71
+ *
72
+ * Encapsulates the review and final implementation phases into a single
73
+ * revision process. This structured approach ensures systematic validation
74
+ * and refinement of the corrected code through comprehensive review
75
+ * followed by production-ready implementation.
76
+ *
77
+ * The revision process maintains clear separation between review feedback
78
+ * and final deliverable while ensuring all corrections are properly
79
+ * validated and integrated.
80
+ */
81
+ revise: IReviseProps;
82
+ }
83
+
84
+ /**
85
+ * Revision properties for the final review and implementation phases.
86
+ *
87
+ * This interface encapsulates the final two steps of the error correction
88
+ * workflow, ensuring systematic review and production-ready code delivery.
89
+ */
90
+ export interface IReviseProps {
91
+ /**
92
+ * Step 3: Code review and correction validation.
90
93
  *
91
94
  * AI performs a comprehensive review of the corrected draft implementation,
92
95
  * validating that all compilation errors have been resolved and that the
@@ -105,7 +108,7 @@ export namespace IAutoBeTestCorrectApplication {
105
108
  review: string;
106
109
 
107
110
  /**
108
- * Step 5: Final production-ready corrected test code.
111
+ * Step 4: Final production-ready corrected test code.
109
112
  *
110
113
  * AI produces the final, polished version of the corrected test code
111
114
  * incorporating all review feedback and validation results. This code
@@ -119,7 +122,7 @@ export namespace IAutoBeTestCorrectApplication {
119
122
  * behaviors and user workflows.
120
123
  *
121
124
  * Workflow: Review integration → Final refinement → Production-ready
122
- * implementation This is the ultimate deliverable that will replace the
125
+ * implementation. This is the ultimate deliverable that will replace the
123
126
  * compilation-failed code.
124
127
  */
125
128
  final: string;
@@ -0,0 +1,8 @@
1
+ import { IAutoBeTypeScriptCompileResult } from "@autobe/interface";
2
+
3
+ import { IAutoBeTestFunction } from "./IAutoBeTestFunction";
4
+
5
+ export interface IAutoBeTestFunctionFailure {
6
+ function: IAutoBeTestFunction;
7
+ failure: IAutoBeTypeScriptCompileResult.IFailure;
8
+ }
@@ -32,6 +32,18 @@ export namespace IAutoBeTestScenarioApplication {
32
32
  *
33
33
  * Each scenario represents a specific test case for the same `path` and
34
34
  * `method`.
35
+ *
36
+ * IMPORTANT: Each scenario must be actually implementable. A scenario's
37
+ * implementability is determined by the existence of ALL APIs (endpoints)
38
+ * required to test it. This includes not only the primary endpoint being
39
+ * tested, but also ALL dependency endpoints needed for setup,
40
+ * authentication, and data preparation. If even one required dependency API
41
+ * is missing from the available operations, the scenario cannot be
42
+ * implemented and should not be generated.
43
+ *
44
+ * Example: A "test banned user login" scenario requires both a login API
45
+ * AND a ban user API. If the ban API doesn't exist, this scenario is not
46
+ * implementable regardless of database schema fields.
35
47
  */
36
48
  scenarios: IScenario[] & tags.MinItems<1>;
37
49
  }
@@ -42,6 +54,11 @@ export namespace IAutoBeTestScenarioApplication {
42
54
  * This interface defines a structured, user-centric test draft that includes
43
55
  * a descriptive function name, a detailed scenario draft, and logical
44
56
  * dependencies on other endpoints required for context or setup.
57
+ *
58
+ * CRITICAL: All referenced endpoints MUST exist in the provided API
59
+ * operations. Do NOT create scenarios for non-existent APIs, even if database
60
+ * schema fields suggest their existence. Test scenarios must be implementable
61
+ * with available APIs only.
45
62
  */
46
63
  export interface IScenario {
47
64
  /**
@@ -120,12 +137,22 @@ export namespace IAutoBeTestScenarioApplication {
120
137
  * authentication, resource creation, or data setup, that are relevant to
121
138
  * the test. This list is not a strict execution order — if ordering is
122
139
  * important, it must be described explicitly in the `purpose`.
140
+ *
141
+ * WARNING: Every endpoint referenced here MUST exist in the provided API
142
+ * operations. Do NOT reference endpoints that are not explicitly available,
143
+ * even if they seem logically necessary based on database schema or
144
+ * business logic.
123
145
  */
124
146
  dependencies: IDependencies[];
125
147
  }
126
148
 
127
149
  export interface IDependencies {
128
- /** Target API endpoint that this scenario depends on. */
150
+ /**
151
+ * Target API endpoint that this scenario depends on.
152
+ *
153
+ * This endpoint MUST exist in the available API operations list.
154
+ * Non-existent endpoints will cause test implementation failures.
155
+ */
129
156
  endpoint: AutoBeOpenApi.IEndpoint;
130
157
 
131
158
  /**
@@ -5,4 +5,5 @@ export interface IAutoBeTestScenarioArtifacts {
5
5
  sdk: Record<string, string>;
6
6
  dto: Record<string, string>;
7
7
  e2e: Record<string, string>;
8
+ template: string;
8
9
  }
@@ -60,6 +60,20 @@ export namespace IAutoBeTestWriteApplication {
60
60
  */
61
61
  draft: string;
62
62
 
63
+ /**
64
+ * Steps 4-5: Code review and final refinement process.
65
+ *
66
+ * Contains the iterative improvement workflow that transforms the initial
67
+ * draft into production-ready test code. This two-phase process ensures
68
+ * systematic quality enhancement through comprehensive review followed by
69
+ * targeted refinement based on identified issues.
70
+ *
71
+ * Workflow: Draft → Review analysis → Final implementation
72
+ */
73
+ revise: IReviseProps;
74
+ }
75
+
76
+ export interface IReviseProps {
63
77
  /**
64
78
  * Step 4: Code review and quality assessment.
65
79
  *
@@ -0,0 +1,25 @@
1
+ import { AutoBeOpenApi } from "@autobe/interface";
2
+ import { OpenApiTypeChecker } from "@samchon/openapi";
3
+
4
+ export const getReferenceIds = (props: {
5
+ document: AutoBeOpenApi.IDocument;
6
+ operation: AutoBeOpenApi.IOperation;
7
+ }): string[] => {
8
+ const result: Set<string> = new Set();
9
+ const emplace = (key: string) => {
10
+ if (key.endsWith("_id")) result.add(key);
11
+ };
12
+
13
+ props.operation.parameters.forEach((p) => emplace(p.name));
14
+ if (props.operation.requestBody) {
15
+ OpenApiTypeChecker.visit({
16
+ components: props.document.components,
17
+ schema: { $ref: props.operation.requestBody.typeName },
18
+ closure: (schema) => {
19
+ if (OpenApiTypeChecker.isObject(schema) === false) return;
20
+ for (const key of Object.keys(schema.properties ?? {})) emplace(key);
21
+ },
22
+ });
23
+ }
24
+ return Array.from(result);
25
+ };
@@ -16,6 +16,9 @@
16
16
  * @author Samchon
17
17
  */
18
18
  export interface IAutoBeConfig {
19
+ /** @default 4 */
20
+ retry?: number;
21
+
19
22
  /**
20
23
  * Language and cultural locale preference for AI agent communication.
21
24
  *
@@ -1,38 +0,0 @@
1
- import { AutoBeOpenApi, AutoBeRealizeAuthorization } from "@autobe/interface";
2
- export declare namespace IAutoBeRealizeScenarioApplication {
3
- interface IProps {
4
- /** The OpenAPI operation to be realized. */
5
- operation: AutoBeOpenApi.IOperation;
6
- /**
7
- * The name of the function to be generated.
8
- *
9
- * Derived from the Swagger path and method. The function name must be
10
- * written in snake_case. It serves as the entry point in both code
11
- * generation and test code.
12
- *
13
- * Once the function is generated, the function name and file name will be
14
- * the same. The generated file will be located at
15
- * `src/providers/${function_name}.ts`.
16
- */
17
- functionName: string;
18
- /** For example, `src/providers/${function_name}.ts`. */
19
- location: string;
20
- /**
21
- * List of scenario descriptions for test code generation.
22
- *
23
- * Each scenario describes the expected behavior of the function under
24
- * certain conditions. Used as a basis for TDD-style automated test
25
- * generation.
26
- */
27
- testScenarios: string[];
28
- /**
29
- * Optional decorator event for customizing code generation behavior.
30
- *
31
- * Provides additional metadata or instructions that can modify how the
32
- * function implementation is generated. Can include custom annotations,
33
- * middleware configurations, or special handling directives that affect the
34
- * final code output.
35
- */
36
- decoratorEvent?: AutoBeRealizeAuthorization;
37
- }
38
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"IAutoBeRealizeScenarioApplication.js","sourceRoot":"","sources":["../../../../../../src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- import { IAgenticaHistoryJson } from "@agentica/core";
2
- import { AutoBeState } from "../../../context/AutoBeState";
3
- export declare const transformTestHistories: (state: AutoBeState) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
@@ -1,75 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.transformTestHistories = void 0;
4
- const utils_1 = require("@autobe/utils");
5
- const uuid_1 = require("uuid");
6
- const transformTestHistories = (state) => {
7
- if (state.analyze === null)
8
- return [
9
- {
10
- id: (0, uuid_1.v7)(),
11
- created_at: new Date().toISOString(),
12
- type: "systemMessage",
13
- text: utils_1.StringUtil.trim `
14
- Requirement analysis is not yet completed.
15
- Don't call the any tool function,
16
- but say to process the requirement analysis.
17
- `,
18
- },
19
- ];
20
- else if (state.prisma === null)
21
- return [
22
- {
23
- id: (0, uuid_1.v7)(),
24
- created_at: new Date().toISOString(),
25
- type: "systemMessage",
26
- text: utils_1.StringUtil.trim `
27
- Prisma DB schema generation is not yet completed.
28
- Don't call the any tool function,
29
- but say to process the Prisma DB schema generation.
30
- `,
31
- },
32
- ];
33
- else if (state.analyze.step !== state.prisma.step)
34
- return [
35
- {
36
- id: (0, uuid_1.v7)(),
37
- created_at: new Date().toISOString(),
38
- type: "systemMessage",
39
- text: utils_1.StringUtil.trim `
40
- Prisma DB schema generation has not been updated
41
- for the latest requirement analysis.
42
- Don't call the any tool function,
43
- but say to re-process the Prisma DB schema generation.
44
- `,
45
- },
46
- ];
47
- else if (state.prisma.compiled.type !== "success")
48
- return [
49
- {
50
- id: (0, uuid_1.v7)(),
51
- created_at: new Date().toISOString(),
52
- type: "systemMessage",
53
- text: utils_1.StringUtil.trim `
54
- Prisma DB schema generation has not been updated
55
- for the latest requirement analysis.
56
- Don't call the any tool function,
57
- but say to re-process the Prisma DB schema generation.
58
- `,
59
- },
60
- ];
61
- return [
62
- {
63
- id: (0, uuid_1.v7)(),
64
- created_at: new Date().toISOString(),
65
- type: "systemMessage",
66
- text: utils_1.StringUtil.trim `
67
- Interface generation is not yet completed.
68
- Don't call the any tool function,
69
- but say to process the interface generation.
70
- `,
71
- },
72
- ];
73
- };
74
- exports.transformTestHistories = transformTestHistories;
75
- //# sourceMappingURL=transformTestHistories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transformTestHistories.js","sourceRoot":"","sources":["../../../../../../src/orchestrate/test/histories/transformTestHistories.ts"],"names":[],"mappings":";;;AACA,yCAA2C;AAC3C,+BAA0B;AAInB,MAAM,sBAAsB,GAAG,CACpC,KAAkB,EAGlB,EAAE;IACF,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI;QACxB,OAAO;YACL;gBACE,EAAE,EAAE,IAAA,SAAE,GAAE;gBACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACpC,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;;;SAIpB;aACF;SACF,CAAC;SACC,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI;QAC5B,OAAO;YACL;gBACE,EAAE,EAAE,IAAA,SAAE,GAAE;gBACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACpC,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;;;SAIpB;aACF;SACF,CAAC;SACC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,KAAK,CAAC,MAAM,CAAC,IAAI;QAC/C,OAAO;YACL;gBACE,EAAE,EAAE,IAAA,SAAE,GAAE;gBACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACpC,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;;;;SAKpB;aACF;SACF,CAAC;SACC,IAAI,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,KAAK,SAAS;QAC/C,OAAO;YACL;gBACE,EAAE,EAAE,IAAA,SAAE,GAAE;gBACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACpC,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;;;;SAKpB;aACF;SACF,CAAC;IACJ,OAAO;QACL;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;;;OAIpB;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAvEW,QAAA,sBAAsB,0BAuEjC"}
@@ -1,38 +0,0 @@
1
- import { AutoBeOpenApi, AutoBeRealizeAuthorization } from "@autobe/interface";
2
- export declare namespace IAutoBeRealizeScenarioApplication {
3
- interface IProps {
4
- /** The OpenAPI operation to be realized. */
5
- operation: AutoBeOpenApi.IOperation;
6
- /**
7
- * The name of the function to be generated.
8
- *
9
- * Derived from the Swagger path and method. The function name must be
10
- * written in snake_case. It serves as the entry point in both code
11
- * generation and test code.
12
- *
13
- * Once the function is generated, the function name and file name will be
14
- * the same. The generated file will be located at
15
- * `src/providers/${function_name}.ts`.
16
- */
17
- functionName: string;
18
- /** For example, `src/providers/${function_name}.ts`. */
19
- location: string;
20
- /**
21
- * List of scenario descriptions for test code generation.
22
- *
23
- * Each scenario describes the expected behavior of the function under
24
- * certain conditions. Used as a basis for TDD-style automated test
25
- * generation.
26
- */
27
- testScenarios: string[];
28
- /**
29
- * Optional decorator event for customizing code generation behavior.
30
- *
31
- * Provides additional metadata or instructions that can modify how the
32
- * function implementation is generated. Can include custom annotations,
33
- * middleware configurations, or special handling directives that affect the
34
- * final code output.
35
- */
36
- decoratorEvent?: AutoBeRealizeAuthorization;
37
- }
38
- }
@@ -1,3 +0,0 @@
1
- import { IAgenticaHistoryJson } from "@agentica/core";
2
- import { AutoBeState } from "../../../context/AutoBeState";
3
- export declare const transformTestHistories: (state: AutoBeState) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
@@ -1,78 +0,0 @@
1
- import { IAgenticaHistoryJson } from "@agentica/core";
2
- import { StringUtil } from "@autobe/utils";
3
- import { v7 } from "uuid";
4
-
5
- import { AutoBeState } from "../../../context/AutoBeState";
6
-
7
- export const transformTestHistories = (
8
- state: AutoBeState,
9
- ): Array<
10
- IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage
11
- > => {
12
- if (state.analyze === null)
13
- return [
14
- {
15
- id: v7(),
16
- created_at: new Date().toISOString(),
17
- type: "systemMessage",
18
- text: StringUtil.trim`
19
- Requirement analysis is not yet completed.
20
- Don't call the any tool function,
21
- but say to process the requirement analysis.
22
- `,
23
- },
24
- ];
25
- else if (state.prisma === null)
26
- return [
27
- {
28
- id: v7(),
29
- created_at: new Date().toISOString(),
30
- type: "systemMessage",
31
- text: StringUtil.trim`
32
- Prisma DB schema generation is not yet completed.
33
- Don't call the any tool function,
34
- but say to process the Prisma DB schema generation.
35
- `,
36
- },
37
- ];
38
- else if (state.analyze.step !== state.prisma.step)
39
- return [
40
- {
41
- id: v7(),
42
- created_at: new Date().toISOString(),
43
- type: "systemMessage",
44
- text: StringUtil.trim`
45
- Prisma DB schema generation has not been updated
46
- for the latest requirement analysis.
47
- Don't call the any tool function,
48
- but say to re-process the Prisma DB schema generation.
49
- `,
50
- },
51
- ];
52
- else if (state.prisma.compiled.type !== "success")
53
- return [
54
- {
55
- id: v7(),
56
- created_at: new Date().toISOString(),
57
- type: "systemMessage",
58
- text: StringUtil.trim`
59
- Prisma DB schema generation has not been updated
60
- for the latest requirement analysis.
61
- Don't call the any tool function,
62
- but say to re-process the Prisma DB schema generation.
63
- `,
64
- },
65
- ];
66
- return [
67
- {
68
- id: v7(),
69
- created_at: new Date().toISOString(),
70
- type: "systemMessage",
71
- text: StringUtil.trim`
72
- Interface generation is not yet completed.
73
- Don't call the any tool function,
74
- but say to process the interface generation.
75
- `,
76
- },
77
- ];
78
- };