@autobe/agent 0.24.2 → 0.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (297) hide show
  1. package/lib/AutoBeAgent.js +11 -1
  2. package/lib/AutoBeAgent.js.map +1 -1
  3. package/lib/AutoBeMockAgent.js +1 -0
  4. package/lib/AutoBeMockAgent.js.map +1 -1
  5. package/lib/constants/AutoBeSystemPromptConstant.d.ts +21 -21
  6. package/lib/context/IAutoBeApplication.d.ts +101 -6
  7. package/lib/context/IAutoBeApplicationProps.d.ts +6 -2
  8. package/lib/factory/createAgenticaHistory.js +1 -1
  9. package/lib/factory/createAgenticaHistory.js.map +1 -1
  10. package/lib/factory/createAutoBeApplication.js +80 -90
  11. package/lib/factory/createAutoBeApplication.js.map +1 -1
  12. package/lib/factory/createAutoBeContext.js +6 -5
  13. package/lib/factory/createAutoBeContext.js.map +1 -1
  14. package/lib/index.mjs +3914 -2594
  15. package/lib/index.mjs.map +1 -1
  16. package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js +5 -1
  17. package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -1
  18. package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +1 -1
  19. package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +18 -3
  20. package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
  21. package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +5 -1
  22. package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +19 -7
  23. package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
  24. package/lib/orchestrate/analyze/orchestrateAnalyze.js +3 -2
  25. package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
  26. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.d.ts +1 -1
  27. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +2 -2
  28. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
  29. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +1 -0
  30. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +2 -2
  31. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
  32. package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.js +1 -1
  33. package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.js.map +1 -1
  34. package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +36 -23
  35. package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js.map +1 -1
  36. package/lib/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.d.ts +22 -42
  37. package/lib/orchestrate/facade/transformFacadeStateMessage.js +1 -1
  38. package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
  39. package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js +2 -1
  40. package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -1
  41. package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +5 -1
  42. package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +20 -7
  43. package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
  44. package/lib/orchestrate/interface/histories/transformInterfaceCommonPrerequisiteHistories.d.ts +3 -0
  45. package/lib/orchestrate/interface/histories/{transformInterfacePrerequisiteHistories.js → transformInterfaceCommonPrerequisiteHistories.js} +4 -4
  46. package/lib/orchestrate/interface/histories/transformInterfaceCommonPrerequisiteHistories.js.map +1 -0
  47. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.d.ts +6 -1
  48. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +31 -23
  49. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
  50. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +6 -1
  51. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +22 -6
  52. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
  53. package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +1 -1
  54. package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -1
  55. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.d.ts +4 -1
  56. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +27 -6
  57. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
  58. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.d.ts +5 -1
  59. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +21 -5
  60. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
  61. package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +1 -1
  62. package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
  63. package/lib/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.d.ts +3 -0
  64. package/lib/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.js +102 -0
  65. package/lib/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.js.map +1 -0
  66. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.d.ts +5 -1
  67. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +20 -4
  68. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
  69. package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +2 -2
  70. package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
  71. package/lib/orchestrate/interface/orchestrateInterface.js +45 -11
  72. package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
  73. package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +1 -1
  74. package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js +277 -37
  75. package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
  76. package/lib/orchestrate/interface/orchestrateInterfaceComplement.d.ts +4 -1
  77. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +69 -70
  78. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  79. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +6 -1
  80. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +28 -13
  81. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
  82. package/lib/orchestrate/interface/orchestrateInterfaceGroups.d.ts +4 -1
  83. package/lib/orchestrate/interface/orchestrateInterfaceGroups.js +11 -8
  84. package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
  85. package/lib/orchestrate/interface/orchestrateInterfaceOperations.d.ts +5 -1
  86. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +36 -21
  87. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  88. package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js +260 -29
  89. package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
  90. package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.d.ts +5 -0
  91. package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js +713 -0
  92. package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js.map +1 -0
  93. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.d.ts +5 -1
  94. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js +83 -53
  95. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
  96. package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.js +41 -7
  97. package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -1
  98. package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +0 -38
  99. package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +6 -10
  100. package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisitesApplication.d.ts +52 -0
  101. package/lib/orchestrate/{common/structures/IAutoBeCommonCorrectDateApplication.js → interface/structures/IAutoBeInterfacePrerequisitesApplication.js} +1 -1
  102. package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisitesApplication.js.map +1 -0
  103. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +0 -33
  104. package/lib/orchestrate/interface/utils/JsonSchemaFactory.d.ts +6 -2
  105. package/lib/orchestrate/interface/utils/JsonSchemaFactory.js +105 -5
  106. package/lib/orchestrate/interface/utils/JsonSchemaFactory.js.map +1 -1
  107. package/lib/orchestrate/interface/utils/JsonSchemaValidator.js +20 -1
  108. package/lib/orchestrate/interface/utils/JsonSchemaValidator.js.map +1 -1
  109. package/lib/orchestrate/interface/utils/OperationValidator.d.ts +3 -4
  110. package/lib/orchestrate/interface/utils/OperationValidator.js +1 -1
  111. package/lib/orchestrate/interface/utils/OperationValidator.js.map +1 -1
  112. package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.d.ts +4 -1
  113. package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +19 -8
  114. package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
  115. package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js +1 -1
  116. package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
  117. package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +6 -1
  118. package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +20 -6
  119. package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
  120. package/lib/orchestrate/prisma/orchestratePrisma.js +3 -3
  121. package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -1
  122. package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -1
  123. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +6 -3
  124. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  125. package/lib/orchestrate/prisma/orchestratePrismaSchemas.d.ts +1 -1
  126. package/lib/orchestrate/prisma/orchestratePrismaSchemas.js +12 -6
  127. package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
  128. package/lib/orchestrate/{common/histories/transformCommonCorrectDateHistories.d.ts → realize/histories/transformRealizeCorrectCastingHistories.d.ts} +1 -2
  129. package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.js +32 -0
  130. package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.js.map +1 -0
  131. package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js +14 -22
  132. package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
  133. package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +6 -6
  134. package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js +8 -2
  135. package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
  136. package/lib/orchestrate/realize/internal/compileRealizeFiles.js +1 -2
  137. package/lib/orchestrate/realize/internal/compileRealizeFiles.js.map +1 -1
  138. package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.d.ts +2 -1
  139. package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.js +119 -42
  140. package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.js.map +1 -1
  141. package/lib/orchestrate/realize/orchestrateRealize.js +82 -52
  142. package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
  143. package/lib/orchestrate/realize/orchestrateRealizeCorrect.js +128 -88
  144. package/lib/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
  145. package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +2 -1
  146. package/lib/orchestrate/realize/orchestrateRealizeWrite.js +117 -54
  147. package/lib/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
  148. package/lib/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +52 -26
  149. package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +44 -34
  150. package/lib/orchestrate/realize/utils/InternalFileSystem.js +1 -1
  151. package/lib/orchestrate/realize/utils/InternalFileSystem.js.map +1 -1
  152. package/lib/orchestrate/realize/utils/generateRealizeScenario.js +1 -5
  153. package/lib/orchestrate/realize/utils/generateRealizeScenario.js.map +1 -1
  154. package/lib/orchestrate/realize/utils/getRealizeWriteCodeTemplate.d.ts +8 -3
  155. package/lib/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js +44 -17
  156. package/lib/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js.map +1 -1
  157. package/lib/orchestrate/realize/utils/getRealizeWriteImportStatements.d.ts +4 -1
  158. package/lib/orchestrate/realize/utils/getRealizeWriteImportStatements.js +24 -9
  159. package/lib/orchestrate/realize/utils/getRealizeWriteImportStatements.js.map +1 -1
  160. package/lib/orchestrate/realize/utils/printErrorHints.d.ts +8 -0
  161. package/lib/orchestrate/realize/utils/printErrorHints.js +48 -0
  162. package/lib/orchestrate/realize/utils/printErrorHints.js.map +1 -0
  163. package/lib/orchestrate/realize/utils/replaceImportStatements.d.ts +1 -0
  164. package/lib/orchestrate/realize/utils/replaceImportStatements.js +93 -53
  165. package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
  166. package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +5 -1
  167. package/lib/orchestrate/test/histories/transformTestCorrectHistories.js +11 -7
  168. package/lib/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
  169. package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.js +1 -1
  170. package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.js.map +1 -1
  171. package/lib/orchestrate/test/histories/transformTestScenarioHistories.d.ts +7 -1
  172. package/lib/orchestrate/test/histories/transformTestScenarioHistories.js +35 -96
  173. package/lib/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
  174. package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.d.ts +6 -3
  175. package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js +33 -77
  176. package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js.map +1 -1
  177. package/lib/orchestrate/test/histories/transformTestWriteHistories.d.ts +5 -1
  178. package/lib/orchestrate/test/histories/transformTestWriteHistories.js +111 -94
  179. package/lib/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
  180. package/lib/orchestrate/test/orchestrateTest.js +20 -14
  181. package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
  182. package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +4 -1
  183. package/lib/orchestrate/test/orchestrateTestCorrect.js +81 -50
  184. package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  185. package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js +31 -13
  186. package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js.map +1 -1
  187. package/lib/orchestrate/test/orchestrateTestScenario.d.ts +1 -1
  188. package/lib/orchestrate/test/orchestrateTestScenario.js +18 -7
  189. package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  190. package/lib/orchestrate/test/orchestrateTestScenarioReview.d.ts +5 -1
  191. package/lib/orchestrate/test/orchestrateTestScenarioReview.js +20 -12
  192. package/lib/orchestrate/test/orchestrateTestScenarioReview.js.map +1 -1
  193. package/lib/orchestrate/test/orchestrateTestWrite.d.ts +4 -1
  194. package/lib/orchestrate/test/orchestrateTestWrite.js +46 -25
  195. package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  196. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +9 -5
  197. package/lib/orchestrate/test/structures/IAutoBeTestCorrectInvalidRequestApplication.d.ts +8 -2
  198. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +11 -7
  199. package/lib/orchestrate/test/utils/getPrerequisites.d.ts +5 -0
  200. package/lib/orchestrate/test/utils/getPrerequisites.js +36 -0
  201. package/lib/orchestrate/test/utils/getPrerequisites.js.map +1 -0
  202. package/lib/orchestrate/test/utils/getReferenceIds.js +1 -1
  203. package/lib/orchestrate/test/utils/getReferenceIds.js.map +1 -1
  204. package/package.json +5 -5
  205. package/src/AutoBeAgent.ts +17 -1
  206. package/src/AutoBeMockAgent.ts +1 -0
  207. package/src/constants/AutoBeSystemPromptConstant.ts +21 -21
  208. package/src/context/IAutoBeApplication.ts +101 -6
  209. package/src/context/IAutoBeApplicationProps.ts +6 -2
  210. package/src/factory/createAgenticaHistory.ts +11 -5
  211. package/src/factory/createAutoBeContext.ts +6 -5
  212. package/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.ts +5 -1
  213. package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +16 -0
  214. package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +22 -7
  215. package/src/orchestrate/analyze/orchestrateAnalyze.ts +3 -2
  216. package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +2 -1
  217. package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +3 -2
  218. package/src/orchestrate/common/orchestrateCommonCorrectCasting.ts +2 -2
  219. package/src/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.ts +25 -45
  220. package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +2 -1
  221. package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +23 -9
  222. package/src/orchestrate/interface/histories/{transformInterfacePrerequisiteHistories.ts → transformInterfaceCommonPrerequisiteHistories.ts} +1 -1
  223. package/src/orchestrate/interface/histories/transformInterfaceComplementHistories.ts +33 -24
  224. package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +26 -9
  225. package/src/orchestrate/interface/histories/transformInterfaceGroupHistories.ts +30 -6
  226. package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +24 -7
  227. package/src/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.ts +118 -0
  228. package/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts +23 -6
  229. package/src/orchestrate/interface/orchestrateInterface.ts +65 -20
  230. package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +22 -12
  231. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +34 -47
  232. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +40 -28
  233. package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +9 -3
  234. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +51 -35
  235. package/src/orchestrate/interface/orchestrateInterfacePrerequisites.ts +274 -0
  236. package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +52 -33
  237. package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +1 -1
  238. package/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.ts +0 -39
  239. package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +6 -10
  240. package/src/orchestrate/interface/structures/IAutoBeInterfacePrerequisitesApplication.ts +58 -0
  241. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +0 -34
  242. package/src/orchestrate/interface/utils/JsonSchemaFactory.ts +92 -4
  243. package/src/orchestrate/interface/utils/JsonSchemaValidator.ts +19 -1
  244. package/src/orchestrate/interface/utils/OperationValidator.ts +9 -7
  245. package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +20 -6
  246. package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +24 -9
  247. package/src/orchestrate/prisma/orchestratePrisma.ts +7 -3
  248. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +5 -1
  249. package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +15 -10
  250. package/src/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.ts +44 -0
  251. package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +13 -24
  252. package/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.ts +6 -6
  253. package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +6 -4
  254. package/src/orchestrate/realize/internal/compileRealizeFiles.ts +1 -5
  255. package/src/orchestrate/realize/orchestRateRealizeCorrectCasting.ts +102 -16
  256. package/src/orchestrate/realize/orchestrateRealize.ts +121 -81
  257. package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +50 -7
  258. package/src/orchestrate/realize/orchestrateRealizeWrite.ts +14 -4
  259. package/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.ts +54 -29
  260. package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +46 -35
  261. package/src/orchestrate/realize/utils/InternalFileSystem.ts +1 -1
  262. package/src/orchestrate/realize/utils/generateRealizeScenario.ts +1 -5
  263. package/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.ts +54 -22
  264. package/src/orchestrate/realize/utils/getRealizeWriteImportStatements.ts +28 -16
  265. package/src/orchestrate/realize/utils/printErrorHints.ts +55 -0
  266. package/src/orchestrate/realize/utils/replaceImportStatements.ts +99 -97
  267. package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +14 -7
  268. package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +50 -115
  269. package/src/orchestrate/test/histories/transformTestScenarioReviewHistories.ts +41 -111
  270. package/src/orchestrate/test/histories/transformTestWriteHistories.ts +35 -12
  271. package/src/orchestrate/test/orchestrateTest.ts +19 -13
  272. package/src/orchestrate/test/orchestrateTestCorrect.ts +71 -51
  273. package/src/orchestrate/test/orchestrateTestCorrectInvalidRequest.ts +13 -1
  274. package/src/orchestrate/test/orchestrateTestScenario.ts +27 -17
  275. package/src/orchestrate/test/orchestrateTestScenarioReview.ts +32 -19
  276. package/src/orchestrate/test/orchestrateTestWrite.ts +20 -10
  277. package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +9 -228
  278. package/src/orchestrate/test/structures/IAutoBeTestCorrectInvalidRequestApplication.ts +8 -2
  279. package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +11 -78
  280. package/src/orchestrate/test/utils/getPrerequisites.ts +51 -0
  281. package/src/orchestrate/test/utils/getReferenceIds.ts +2 -1
  282. package/lib/orchestrate/common/histories/transformCommonCorrectDateHistories.js +0 -48
  283. package/lib/orchestrate/common/histories/transformCommonCorrectDateHistories.js.map +0 -1
  284. package/lib/orchestrate/common/structures/IAutoBeCommonCorrectDateApplication.d.ts +0 -35
  285. package/lib/orchestrate/common/structures/IAutoBeCommonCorrectDateApplication.js.map +0 -1
  286. package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.d.ts +0 -3
  287. package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js.map +0 -1
  288. package/lib/orchestrate/interface/utils/OpenApiEndpointComparator.d.ts +0 -6
  289. package/lib/orchestrate/interface/utils/OpenApiEndpointComparator.js +0 -22
  290. package/lib/orchestrate/interface/utils/OpenApiEndpointComparator.js.map +0 -1
  291. package/lib/orchestrate/realize/orchestrateRealizeCorrectDate.d.ts +0 -4
  292. package/lib/orchestrate/realize/orchestrateRealizeCorrectDate.js +0 -540
  293. package/lib/orchestrate/realize/orchestrateRealizeCorrectDate.js.map +0 -1
  294. package/src/orchestrate/common/histories/transformCommonCorrectDateHistories.ts +0 -60
  295. package/src/orchestrate/common/structures/IAutoBeCommonCorrectDateApplication.ts +0 -40
  296. package/src/orchestrate/interface/utils/OpenApiEndpointComparator.ts +0 -23
  297. package/src/orchestrate/realize/orchestrateRealizeCorrectDate.ts +0 -372
@@ -1 +1 @@
1
- {"version":3,"file":"transformTestWriteHistories.js","sourceRoot":"","sources":["../../../../src/orchestrate/test/histories/transformTestWriteHistories.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAiBA,kEA6FC;AA5GD,yCAAqE;AACrE,8CAK0B;AAC1B,kDAA0B;AAC1B,+BAA0B;AAI1B,wFAAqF;AAGrF,SAAsB,2BAA2B,CAG/C,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AC;aACpB,IAAI,CAAC,IAAI,CAAC;;;QAGX,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC;;KAEhC,CAAC;IACJ,CAAC;IAVe,sCAAU,aAUzB,CAAA;IAED,SAAgB,UAAU,CAAC,SAAuC;QAChE,MAAM,QAAQ,GAAsB,IAAA,gCAAwB,EAC1D,SAAS,CAAC,QAAQ,CACnB,CAAC;QACF,MAAM,GAAG,GAA4B,uBAAa,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QACzE,OAAO,kBAAU,CAAC,IAAI,CAAA;;;QAGlB,GAAG,CAAC,MAAM;aACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACT,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAC/D,KAAK,CACN,CACF;aACA,IAAI,CAAC,IAAI,CAAC;;;QAGX,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC;;KAEhC,CAAC;IACJ,CAAC;IApBe,sCAAU,aAoBzB,CAAA;AACH,CAAC,EAlCgB,2BAA2B,2CAA3B,2BAA2B,QAkC3C"}
1
+ {"version":3,"file":"transformTestWriteHistories.js","sourceRoot":"","sources":["../../../../src/orchestrate/test/histories/transformTestWriteHistories.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAkBA,kEA4GC;AA5HD,yCAAqE;AACrE,8CAK0B;AAC1B,+BAAiC;AACjC,kDAA0B;AAC1B,+BAA0B;AAI1B,wFAAqF;AAGrF,SAAsB,2BAA2B,CAG/C,GAAyB,EACzB,KAIC;;QAMD,OAAO;YACL;gBACE,EAAE,EAAE,IAAA,SAAE,GAAE;gBACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACpC,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,YAAY,CAAC,GAAG,EA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Q,CACnB,CAAC;QACF,MAAM,GAAG,GAA4B,uBAAa,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QACzE,OAAO,kBAAU,CAAC,IAAI,CAAA;;;QAGlB,GAAG,CAAC,MAAM;aACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACT,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAC/D,KAAK,CACN,CACF;aACA,IAAI,CAAC,IAAI,CAAC;;;QAGX,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC;;KAEhC,CAAC;IACJ,CAAC;IApBe,sCAAU,aAoBzB,CAAA;AACH,CAAC,EAlCgB,2BAA2B,2CAA3B,2BAA2B,QAkC3C;AAED,MAAM,YAAY,GAAG,IAAI,gBAAS,CAAC,GAAG,EAAE,CACtC,yt8JAAsC,OAAO,CAC3C,wBAAwB,EACxB,IAAI,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAqD,CACpE,CACF,CAAC"}
@@ -32,7 +32,7 @@ const orchestrateTest = (ctx) => (props) => __awaiter(void 0, void 0, void 0, fu
32
32
  type: "testStart",
33
33
  id: (0, uuid_1.v7)(),
34
34
  created_at: start.toISOString(),
35
- reason: props.reason,
35
+ reason: props.instruction,
36
36
  step: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
37
37
  });
38
38
  // CHECK OPERATIONS
@@ -47,25 +47,31 @@ const orchestrateTest = (ctx) => (props) => __awaiter(void 0, void 0, void 0, fu
47
47
  "please check if the Interface agent is called.",
48
48
  });
49
49
  // PLAN
50
- const scenarios = yield (0, orchestrateTestScenario_1.orchestrateTestScenario)(ctx);
50
+ const scenarios = yield (0, orchestrateTestScenario_1.orchestrateTestScenario)(ctx, props.instruction);
51
51
  if (scenarios.length === 0)
52
52
  throw new Error("No scenarios generated. Please check the logs.");
53
53
  // TEST CODE
54
- const written = yield (0, orchestrateTestWrite_1.orchestrateTestWrite)(ctx, scenarios);
54
+ const written = yield (0, orchestrateTestWrite_1.orchestrateTestWrite)(ctx, {
55
+ instruction: props.instruction,
56
+ scenarios,
57
+ });
55
58
  if (written.length === 0)
56
59
  throw new Error("No test code written. Please check the logs.");
57
- const corrects = yield (0, orchestrateTestCorrect_1.orchestrateTestCorrect)(ctx, written.map((w) => {
58
- var _a;
59
- return ({
60
- scenario: w.scenario,
61
- artifacts: w.artifacts,
62
- location: w.event.location,
63
- script: (_a = w.event.final) !== null && _a !== void 0 ? _a : w.event.draft,
64
- });
65
- }));
60
+ const corrects = yield (0, orchestrateTestCorrect_1.orchestrateTestCorrect)(ctx, {
61
+ instruction: props.instruction,
62
+ functions: written.map((w) => {
63
+ var _a;
64
+ return ({
65
+ scenario: w.scenario,
66
+ artifacts: w.artifacts,
67
+ location: w.event.location,
68
+ script: (_a = w.event.final) !== null && _a !== void 0 ? _a : w.event.draft,
69
+ });
70
+ }),
71
+ });
66
72
  // DO COMPILE
67
73
  const compiler = yield ctx.compiler();
68
- const compiled = yield compiler.typescript.compile({
74
+ const compileResult = yield compiler.typescript.compile({
69
75
  files: Object.fromEntries([
70
76
  ...Object.entries(yield ctx.files({
71
77
  dbms: "sqlite",
@@ -78,7 +84,7 @@ const orchestrateTest = (ctx) => (props) => __awaiter(void 0, void 0, void 0, fu
78
84
  id: (0, uuid_1.v7)(),
79
85
  created_at: new Date().toISOString(),
80
86
  files: corrects.map((s) => s.file),
81
- compiled,
87
+ compiled: compileResult,
82
88
  step: (_f = (_e = ctx.state().interface) === null || _e === void 0 ? void 0 : _e.step) !== null && _f !== void 0 ? _f : 0,
83
89
  elapsed: new Date().getTime() - start.getTime(),
84
90
  });
@@ -1 +1 @@
1
-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EAAE,IAAA,SAAE,GAAE;QACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACpC,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QAClC,QAAQ,EAAE,aAAa;QACvB,IAAI,EAAE,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,SAAS,0CAAE,IAAI,mCAAI,CAAC;QACtC,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,OAAO,EAAE;KAChD,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAzFS,QAAA,eAAe,mBAyFxB"}
@@ -2,4 +2,7 @@ import { AutoBeTestValidateEvent } from "@autobe/interface";
2
2
  import { ILlmSchema } from "@samchon/openapi";
3
3
  import { AutoBeContext } from "../../context/AutoBeContext";
4
4
  import { IAutoBeTestFunction } from "./structures/IAutoBeTestFunction";
5
- export declare const orchestrateTestCorrect: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, writeResults: IAutoBeTestFunction[]) => Promise<AutoBeTestValidateEvent[]>;
5
+ export declare const orchestrateTestCorrect: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
6
+ instruction: string;
7
+ functions: IAutoBeTestFunction[];
8
+ }) => Promise<AutoBeTestValidateEvent[]>;
@@ -58,8 +58,8 @@ const completeTestCode_1 = require("./compile/completeTestCode");
58
58
  const transformTestCorrectHistories_1 = require("./histories/transformTestCorrectHistories");
59
59
  const transformTestValidateEvent_1 = require("./histories/transformTestValidateEvent");
60
60
  const orchestrateTestCorrectInvalidRequest_1 = require("./orchestrateTestCorrectInvalidRequest");
61
- const orchestrateTestCorrect = (ctx, writeResults) => __awaiter(void 0, void 0, void 0, function* () {
62
- const result = yield (0, executeCachedBatch_1.executeCachedBatch)(writeResults.map((w) => (promptCacheKey) => __awaiter(void 0, void 0, void 0, function* () {
61
+ const orchestrateTestCorrect = (ctx, props) => __awaiter(void 0, void 0, void 0, function* () {
62
+ const result = yield (0, executeCachedBatch_1.executeCachedBatch)(props.functions.map((w) => (promptCacheKey) => __awaiter(void 0, void 0, void 0, function* () {
63
63
  try {
64
64
  const compile = (script) => compileTestFile(ctx, Object.assign(Object.assign({}, w), { script }));
65
65
  const x = yield (0, orchestrateTestCorrectInvalidRequest_1.orchestrateTestCorrectInvalidRequest)(ctx, compile, w);
@@ -88,7 +88,13 @@ const orchestrateTestCorrect = (ctx, writeResults) => __awaiter(void 0, void 0,
88
88
  },
89
89
  script: (event) => event.file.content,
90
90
  }, x.file.content);
91
- return yield predicate(ctx, (0, transformTestValidateEvent_1.transformTestValidateEvent)(y, w.artifacts), [], y, promptCacheKey, ctx.retry);
91
+ return yield predicate(ctx, {
92
+ function: (0, transformTestValidateEvent_1.transformTestValidateEvent)(y, w.artifacts),
93
+ failures: [],
94
+ validate: y,
95
+ promptCacheKey,
96
+ instruction: props.instruction,
97
+ }, ctx.retry);
92
98
  }
93
99
  catch (_a) {
94
100
  return null;
@@ -116,34 +122,38 @@ const compileTestFile = (ctx, func) => __awaiter(void 0, void 0, void 0, functio
116
122
  step: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
117
123
  };
118
124
  });
119
- const predicate = (ctx, content, failures, event, promptCacheKey, life) => __awaiter(void 0, void 0, void 0, function* () {
120
- if (event.result.type === "failure")
121
- ctx.dispatch(event);
122
- return event.result.type === "failure"
123
- ? yield correct(ctx, content, failures, event, promptCacheKey, life - 1)
124
- : event;
125
+ const predicate = (ctx, props, life) => __awaiter(void 0, void 0, void 0, function* () {
126
+ if (props.validate.result.type === "failure")
127
+ ctx.dispatch(props.validate);
128
+ return props.validate.result.type === "failure"
129
+ ? yield correct(ctx, props, life - 1)
130
+ : props.validate;
125
131
  });
126
- const correct = (ctx, content, failures, validate, promptCacheKey, life) => __awaiter(void 0, void 0, void 0, function* () {
127
- var _a, _b, _c, _d, _e, _f;
128
- if (validate.result.type !== "failure")
129
- return validate;
132
+ const correct = (ctx, props, life) => __awaiter(void 0, void 0, void 0, function* () {
133
+ var _a, _b, _c, _d, _e, _f, _g;
134
+ if (props.validate.result.type !== "failure")
135
+ return props.validate;
130
136
  else if (life < 0)
131
- return validate;
137
+ return props.validate;
132
138
  const pointer = {
133
139
  value: null,
134
140
  };
135
141
  const { tokenUsage } = yield ctx.conversate({
136
142
  source: "testCorrect",
137
- histories: yield (0, transformTestCorrectHistories_1.transformTestCorrectHistories)(ctx, content, [
138
- ...failures,
139
- {
140
- function: content,
141
- failure: validate.result,
142
- },
143
- ]),
143
+ histories: yield (0, transformTestCorrectHistories_1.transformTestCorrectHistories)(ctx, {
144
+ instruction: props.instruction,
145
+ function: props.function,
146
+ failures: [
147
+ ...props.failures,
148
+ {
149
+ function: props.function,
150
+ failure: props.validate.result,
151
+ },
152
+ ],
153
+ }),
144
154
  controller: createController({
145
155
  model: ctx.model,
146
- failure: validate.result,
156
+ failure: props.validate.result,
147
157
  build: (next) => {
148
158
  pointer.value = next;
149
159
  },
@@ -155,39 +165,46 @@ const correct = (ctx, content, failures, validate, promptCacheKey, life) => __aw
155
165
  You don't need to explain me anything, but just fix it immediately
156
166
  without any hesitation, explanation, and questions.
157
167
  `,
158
- promptCacheKey,
168
+ promptCacheKey: props.promptCacheKey,
159
169
  });
160
170
  if (pointer.value === null)
161
171
  throw new Error("Failed to correct test code.");
162
- pointer.value.revise.final = yield (0, completeTestCode_1.completeTestCode)(ctx, content.artifacts, pointer.value.revise.final);
163
- pointer.value.draft = yield (0, completeTestCode_1.completeTestCode)(ctx, content.artifacts, pointer.value.draft);
172
+ if (pointer.value.revise.final)
173
+ pointer.value.revise.final = yield (0, completeTestCode_1.completeTestCode)(ctx, props.function.artifacts, pointer.value.revise.final);
174
+ pointer.value.draft = yield (0, completeTestCode_1.completeTestCode)(ctx, props.function.artifacts, pointer.value.draft);
164
175
  ctx.dispatch({
165
176
  type: "testCorrect",
166
177
  id: (0, uuid_1.v7)(),
167
178
  created_at: new Date().toISOString(),
168
- file: validate.file,
169
- result: validate.result,
179
+ file: props.validate.file,
180
+ result: props.validate.result,
170
181
  tokenUsage,
171
182
  step: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
172
183
  think: pointer.value.think,
173
184
  draft: pointer.value.draft,
174
185
  review: (_c = pointer.value.revise) === null || _c === void 0 ? void 0 : _c.review,
175
- final: (_d = pointer.value.revise) === null || _d === void 0 ? void 0 : _d.final,
186
+ final: (_e = (_d = pointer.value.revise) === null || _d === void 0 ? void 0 : _d.final) !== null && _e !== void 0 ? _e : undefined,
176
187
  });
177
- const newContent = Object.assign(Object.assign({}, content), { script: (_f = (_e = pointer.value.revise) === null || _e === void 0 ? void 0 : _e.final) !== null && _f !== void 0 ? _f : pointer.value.draft });
178
- const newValidate = yield compileTestFile(ctx, newContent);
179
- return predicate(ctx, newContent, [
180
- ...failures,
181
- {
182
- function: content,
183
- failure: validate.result,
184
- },
185
- ], newValidate, promptCacheKey, life);
188
+ const newFunction = Object.assign(Object.assign({}, props.function), { script: (_g = (_f = pointer.value.revise) === null || _f === void 0 ? void 0 : _f.final) !== null && _g !== void 0 ? _g : pointer.value.draft });
189
+ const newValidate = yield compileTestFile(ctx, newFunction);
190
+ return predicate(ctx, {
191
+ function: newFunction,
192
+ failures: [
193
+ ...props.failures,
194
+ {
195
+ function: props.function,
196
+ failure: props.validate.result,
197
+ },
198
+ ],
199
+ validate: newValidate,
200
+ promptCacheKey: props.promptCacheKey,
201
+ instruction: props.instruction,
202
+ }, life);
186
203
  });
187
204
  const createController = (props) => {
188
205
  (0, assertSchemaModel_1.assertSchemaModel)(props.model);
189
206
  const validate = (input) => {
190
- const result = (() => { const _io0 = input => "string" === typeof input.think && "string" === typeof input.draft && ("object" === typeof input.revise && null !== input.revise && _io1(input.revise)); const _io1 = input => "string" === typeof input.review && "string" === typeof input.final; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.think || _report(_exceptionable, {
207
+ const result = (() => { const _io0 = input => "string" === typeof input.think && "string" === typeof input.draft && ("object" === typeof input.revise && null !== input.revise && _io1(input.revise)); const _io1 = input => "string" === typeof input.review && (null === input.final || "string" === typeof input.final); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.think || _report(_exceptionable, {
191
208
  path: _path + ".think",
192
209
  expected: "string",
193
210
  value: input.think
@@ -207,9 +224,9 @@ const createController = (props) => {
207
224
  path: _path + ".review",
208
225
  expected: "string",
209
226
  value: input.review
210
- }), "string" === typeof input.final || _report(_exceptionable, {
227
+ }), null === input.final || "string" === typeof input.final || _report(_exceptionable, {
211
228
  path: _path + ".final",
212
- expected: "string",
229
+ expected: "(null | string)",
213
230
  value: input.final
214
231
  })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
215
232
  if (false === __is(input)) {
@@ -318,8 +335,15 @@ const collection = {
318
335
  type: "string"
319
336
  },
320
337
  final: {
321
- description: "Step 4: Final production-ready corrected test code.\n\nAI produces the final, polished version of the corrected test code\nincorporating all review feedback and validation results. This code\nrepresents the completed error correction, guaranteed to compile\nsuccessfully while preserving all original test functionality and\nbusiness logic.\n\nThe final implementation resolves all compilation issues, maintains\nstrict type safety, follows all established conventions, and delivers a\nproduction-ready test that accurately validates the intended API\nbehaviors and user workflows.\n\nWorkflow: Review integration \u2192 Final refinement \u2192 Production-ready\nimplementation. This is the ultimate deliverable that will replace the\ncompilation-failed code.",
322
- type: "string"
338
+ description: "Step 4: Final production-ready corrected test code.\n\nAI produces the final, polished version of the corrected test code\nincorporating all review feedback and validation results. This code\nrepresents the completed error correction, guaranteed to compile\nsuccessfully while preserving all original test functionality and\nbusiness logic. When the draft correction already perfectly resolves all\nissues with no problems found during review, this value can be null,\nindicating no further refinement was necessary.\n\nThe final implementation resolves all compilation issues, maintains\nstrict type safety, follows all established conventions, and delivers a\nproduction-ready test that accurately validates the intended API\nbehaviors and user workflows. A null value signifies the draft correction\nwas already optimal and requires no modifications.\n\nWorkflow: Review integration \u2192 Final refinement \u2192 Production-ready\nimplementation (or null if draft needs no changes). This is the ultimate\ndeliverable that will replace the compilation-failed code when provided,\notherwise the draft correction is used as-is.",
339
+ anyOf: [
340
+ {
341
+ type: "null"
342
+ },
343
+ {
344
+ type: "string"
345
+ }
346
+ ]
323
347
  }
324
348
  },
325
349
  required: [
@@ -330,7 +354,7 @@ const collection = {
330
354
  }
331
355
  },
332
356
  description: "Main entry point for AI Function Call - analyzes compilation errors and\ngenerates corrected E2E test code.\n\nThe AI executes this function to perform the complete error correction\nworkflow: compilation error analysis \u2192 draft correction \u2192 code review \u2192\nfinal corrected implementation. This multi-step process ensures systematic\nerror resolution while preserving original test functionality and\nmaintaining code quality.\n\nThe corrector analyzes compilation diagnostics to identify specific issues,\ndevelops correction strategies, and produces corrected code through\niterative refinement with comprehensive review and validation.",
333
- validate: (() => { const _io0 = input => "string" === typeof input.think && "string" === typeof input.draft && ("object" === typeof input.revise && null !== input.revise && _io1(input.revise)); const _io1 = input => "string" === typeof input.review && "string" === typeof input.final; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.think || _report(_exceptionable, {
357
+ validate: (() => { const _io0 = input => "string" === typeof input.think && "string" === typeof input.draft && ("object" === typeof input.revise && null !== input.revise && _io1(input.revise)); const _io1 = input => "string" === typeof input.review && (null === input.final || "string" === typeof input.final); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.think || _report(_exceptionable, {
334
358
  path: _path + ".think",
335
359
  expected: "string",
336
360
  value: input.think
@@ -350,9 +374,9 @@ const collection = {
350
374
  path: _path + ".review",
351
375
  expected: "string",
352
376
  value: input.review
353
- }), "string" === typeof input.final || _report(_exceptionable, {
377
+ }), null === input.final || "string" === typeof input.final || _report(_exceptionable, {
354
378
  path: _path + ".final",
355
- expected: "string",
379
+ expected: "(null | string)",
356
380
  value: input.final
357
381
  })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
358
382
  if (false === __is(input)) {
@@ -435,8 +459,15 @@ const collection = {
435
459
  type: "string"
436
460
  },
437
461
  final: {
438
- description: "Step 4: Final production-ready corrected test code.\n\nAI produces the final, polished version of the corrected test code\nincorporating all review feedback and validation results. This code\nrepresents the completed error correction, guaranteed to compile\nsuccessfully while preserving all original test functionality and\nbusiness logic.\n\nThe final implementation resolves all compilation issues, maintains\nstrict type safety, follows all established conventions, and delivers a\nproduction-ready test that accurately validates the intended API\nbehaviors and user workflows.\n\nWorkflow: Review integration \u2192 Final refinement \u2192 Production-ready\nimplementation. This is the ultimate deliverable that will replace the\ncompilation-failed code.",
439
- type: "string"
462
+ description: "Step 4: Final production-ready corrected test code.\n\nAI produces the final, polished version of the corrected test code\nincorporating all review feedback and validation results. This code\nrepresents the completed error correction, guaranteed to compile\nsuccessfully while preserving all original test functionality and\nbusiness logic. When the draft correction already perfectly resolves all\nissues with no problems found during review, this value can be null,\nindicating no further refinement was necessary.\n\nThe final implementation resolves all compilation issues, maintains\nstrict type safety, follows all established conventions, and delivers a\nproduction-ready test that accurately validates the intended API\nbehaviors and user workflows. A null value signifies the draft correction\nwas already optimal and requires no modifications.\n\nWorkflow: Review integration \u2192 Final refinement \u2192 Production-ready\nimplementation (or null if draft needs no changes). This is the ultimate\ndeliverable that will replace the compilation-failed code when provided,\notherwise the draft correction is used as-is.",
463
+ oneOf: [
464
+ {
465
+ type: "null"
466
+ },
467
+ {
468
+ type: "string"
469
+ }
470
+ ]
440
471
  }
441
472
  },
442
473
  required: [
@@ -447,7 +478,7 @@ const collection = {
447
478
  }
448
479
  },
449
480
  description: "Main entry point for AI Function Call - analyzes compilation errors and\ngenerates corrected E2E test code.\n\nThe AI executes this function to perform the complete error correction\nworkflow: compilation error analysis \u2192 draft correction \u2192 code review \u2192\nfinal corrected implementation. This multi-step process ensures systematic\nerror resolution while preserving original test functionality and\nmaintaining code quality.\n\nThe corrector analyzes compilation diagnostics to identify specific issues,\ndevelops correction strategies, and produces corrected code through\niterative refinement with comprehensive review and validation.",
450
- validate: (() => { const _io0 = input => "string" === typeof input.think && "string" === typeof input.draft && ("object" === typeof input.revise && null !== input.revise && _io1(input.revise)); const _io1 = input => "string" === typeof input.review && "string" === typeof input.final; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.think || _report(_exceptionable, {
481
+ validate: (() => { const _io0 = input => "string" === typeof input.think && "string" === typeof input.draft && ("object" === typeof input.revise && null !== input.revise && _io1(input.revise)); const _io1 = input => "string" === typeof input.review && (null === input.final || "string" === typeof input.final); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.think || _report(_exceptionable, {
451
482
  path: _path + ".think",
452
483
  expected: "string",
453
484
  value: input.think
@@ -467,9 +498,9 @@ const collection = {
467
498
  path: _path + ".review",
468
499
  expected: "string",
469
500
  value: input.review
470
- }), "string" === typeof input.final || _report(_exceptionable, {
501
+ }), null === input.final || "string" === typeof input.final || _report(_exceptionable, {
471
502
  path: _path + ".final",
472
- expected: "string",
503
+ expected: "(null | string)",
473
504
  value: input.final
474
505
  })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
475
506
  if (false === __is(input)) {
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrateTestCorrect.js","sourceRoot":"","sources":["../../../src/orchestrate/test/orchestrateTestCorrect.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,yCAA2C;AAG3C,kDAA0B;AAC1B,+BAA0B;AAG1B,uEAAoE;AACpE,uEAAoE;AACpE,+FAA4F;AAC5F,iEAA8D;AAC9D,6FAA0F;AAC1F,uFAAoF;AACpF,iGAA8F;AAKvF,MAAM,sBAAsB,GAAG,CACpC,GAAyB,EACzB,YAAmC,EACC,EAAE;IACtC,MAAM,MAAM,GACV,MAAM,IAAA,uCAAkB,EACtB,YAAY,CAAC,GAA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L,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,SAAS;QACf,WAAW;QACX,OAAO,EAAE;YACP,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;gBAChB,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACpB,CAAC;SACsC;KAC1C,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG;IACjB,OAAO,EAAE,CAAC,QAAmB,EAAE,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uHACiC;YAC9D,QAAQ,EAAE;gBACR,OAAO,EAAE,QAAQ;aAClB;SACF;;QAAC;IACJ,MAAM,EAAE,CAAC,QAAmB,EAAE,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uHACiC;YAC7D,QAAQ,EAAE;gBACR,OAAO,EAAE,QAAQ;aAClB;SACF;;QAAC;CACL,CAAC"}
@@ -51,6 +51,7 @@ const utils_1 = require("@autobe/utils");
51
51
  const typia_1 = __importDefault(require("typia"));
52
52
  const uuid_1 = require("uuid");
53
53
  const assertSchemaModel_1 = require("../../context/assertSchemaModel");
54
+ const completeTestCode_1 = require("./compile/completeTestCode");
54
55
  const transformTestCorrectInvalidRequestHistories_1 = require("./histories/transformTestCorrectInvalidRequestHistories");
55
56
  const orchestrateTestCorrectInvalidRequest = (ctx, compile, write) => __awaiter(void 0, void 0, void 0, function* () {
56
57
  const event = yield compile(write.script);
@@ -65,7 +66,7 @@ const predicate = (ctx, compile, write, event, life) => __awaiter(void 0, void 0
65
66
  return event;
66
67
  });
67
68
  const correct = (ctx, compile, write, event, life) => __awaiter(void 0, void 0, void 0, function* () {
68
- var _a, _b, _c, _d, _e, _f;
69
+ var _a, _b, _c, _d, _e, _f, _g;
69
70
  if (event.result.type !== "failure")
70
71
  return event;
71
72
  else if (life < 0)
@@ -97,6 +98,9 @@ const correct = (ctx, compile, write, event, life) => __awaiter(void 0, void 0,
97
98
  throw new Error("Failed to correct test code.");
98
99
  else if (pointer.value === false)
99
100
  return event; // other's responsibility
101
+ if (pointer.value.revise.final)
102
+ pointer.value.revise.final = yield (0, completeTestCode_1.completeTestCode)(ctx, write.artifacts, pointer.value.revise.final);
103
+ pointer.value.draft = yield (0, completeTestCode_1.completeTestCode)(ctx, write.artifacts, pointer.value.draft);
100
104
  ctx.dispatch({
101
105
  type: "testCorrect",
102
106
  id: (0, uuid_1.v7)(),
@@ -112,13 +116,13 @@ const correct = (ctx, compile, write, event, life) => __awaiter(void 0, void 0,
112
116
  think: pointer.value.think,
113
117
  draft: pointer.value.draft,
114
118
  review: (_c = pointer.value.revise) === null || _c === void 0 ? void 0 : _c.review,
115
- final: (_d = pointer.value.revise) === null || _d === void 0 ? void 0 : _d.final,
119
+ final: (_e = (_d = pointer.value.revise) === null || _d === void 0 ? void 0 : _d.final) !== null && _e !== void 0 ? _e : undefined,
116
120
  });
117
121
  const newWrite = {
118
122
  artifacts: write.artifacts,
119
123
  scenario: write.scenario,
120
124
  location: write.location,
121
- script: (_f = (_e = pointer.value.revise) === null || _e === void 0 ? void 0 : _e.final) !== null && _f !== void 0 ? _f : pointer.value.draft,
125
+ script: (_g = (_f = pointer.value.revise) === null || _f === void 0 ? void 0 : _f.final) !== null && _g !== void 0 ? _g : pointer.value.draft,
122
126
  };
123
127
  const newEvent = yield compile(newWrite.script);
124
128
  return yield predicate(ctx, compile, newWrite, newEvent, life - 1);
@@ -183,8 +187,15 @@ const collection = {
183
187
  type: "string"
184
188
  },
185
189
  final: {
186
- description: "Final corrected code.\n\nThe complete, cleaned test code with all invalid API request sections\nremoved, ready for compilation.\n\nThis code must:\n\n- Compile without TypeScript errors\n- Contain only valid business logic tests\n- Have no `as any` or similar type violations\n- Maintain the original file structure\n- Be production-ready E2E test code",
187
- type: "string"
190
+ description: "Final corrected code.\n\nThe complete, cleaned test code with all invalid API request sections\nremoved, ready for compilation. When the draft already successfully\nremoves all problematic code with no additional issues found during\nreview, this value can be null, indicating the draft deletion was\nsufficient and requires no further changes.\n\nThis code must:\n\n- Compile without TypeScript errors\n- Contain only valid business logic tests\n- Have no `as any` or similar type violations\n- Maintain the original file structure\n- Be production-ready E2E test code\n\nA null value indicates the draft successfully removed all invalid code\nand needs no additional modifications.",
191
+ anyOf: [
192
+ {
193
+ type: "null"
194
+ },
195
+ {
196
+ type: "string"
197
+ }
198
+ ]
188
199
  }
189
200
  },
190
201
  required: [
@@ -195,7 +206,7 @@ const collection = {
195
206
  }
196
207
  },
197
208
  description: "Rewrite function to remove code containing invalid type API requests.\n\nThis function is called when the agent detects code that attempts to send\nAPI requests with deliberately wrong types, causing TypeScript compilation\nerrors. The agent will remove the problematic code sections while\npreserving valid test code.\n\nCommon patterns that trigger this function:\n\n- TestValidator.error calls testing type violations\n- Missing required fields with type assertions\n- Wrong type assignments with satisfies operator\n- Nested type violations in complex objects\n- Partial type testing with invalid structures\n\nThe rationale for deletion:\n\n- Type validation is the server's responsibility, not E2E tests\n- TypeScript compiler should enforce type safety at compile time\n- Invalid type testing breaks the entire test suite compilation\n- E2E tests should focus on business logic, not type system violations",
198
- validate: (() => { const _io0 = input => "string" === typeof input.think && "string" === typeof input.draft && ("object" === typeof input.revise && null !== input.revise && _io1(input.revise)); const _io1 = input => "string" === typeof input.review && "string" === typeof input.final; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.think || _report(_exceptionable, {
209
+ validate: (() => { const _io0 = input => "string" === typeof input.think && "string" === typeof input.draft && ("object" === typeof input.revise && null !== input.revise && _io1(input.revise)); const _io1 = input => "string" === typeof input.review && (null === input.final || "string" === typeof input.final); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.think || _report(_exceptionable, {
199
210
  path: _path + ".think",
200
211
  expected: "string",
201
212
  value: input.think
@@ -215,9 +226,9 @@ const collection = {
215
226
  path: _path + ".review",
216
227
  expected: "string",
217
228
  value: input.review
218
- }), "string" === typeof input.final || _report(_exceptionable, {
229
+ }), null === input.final || "string" === typeof input.final || _report(_exceptionable, {
219
230
  path: _path + ".final",
220
- expected: "string",
231
+ expected: "(null | string)",
221
232
  value: input.final
222
233
  })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
223
234
  if (false === __is(input)) {
@@ -323,8 +334,15 @@ const collection = {
323
334
  type: "string"
324
335
  },
325
336
  final: {
326
- description: "Final corrected code.\n\nThe complete, cleaned test code with all invalid API request sections\nremoved, ready for compilation.\n\nThis code must:\n\n- Compile without TypeScript errors\n- Contain only valid business logic tests\n- Have no `as any` or similar type violations\n- Maintain the original file structure\n- Be production-ready E2E test code",
327
- type: "string"
337
+ description: "Final corrected code.\n\nThe complete, cleaned test code with all invalid API request sections\nremoved, ready for compilation. When the draft already successfully\nremoves all problematic code with no additional issues found during\nreview, this value can be null, indicating the draft deletion was\nsufficient and requires no further changes.\n\nThis code must:\n\n- Compile without TypeScript errors\n- Contain only valid business logic tests\n- Have no `as any` or similar type violations\n- Maintain the original file structure\n- Be production-ready E2E test code\n\nA null value indicates the draft successfully removed all invalid code\nand needs no additional modifications.",
338
+ oneOf: [
339
+ {
340
+ type: "null"
341
+ },
342
+ {
343
+ type: "string"
344
+ }
345
+ ]
328
346
  }
329
347
  },
330
348
  required: [
@@ -335,7 +353,7 @@ const collection = {
335
353
  }
336
354
  },
337
355
  description: "Rewrite function to remove code containing invalid type API requests.\n\nThis function is called when the agent detects code that attempts to send\nAPI requests with deliberately wrong types, causing TypeScript compilation\nerrors. The agent will remove the problematic code sections while\npreserving valid test code.\n\nCommon patterns that trigger this function:\n\n- TestValidator.error calls testing type violations\n- Missing required fields with type assertions\n- Wrong type assignments with satisfies operator\n- Nested type violations in complex objects\n- Partial type testing with invalid structures\n\nThe rationale for deletion:\n\n- Type validation is the server's responsibility, not E2E tests\n- TypeScript compiler should enforce type safety at compile time\n- Invalid type testing breaks the entire test suite compilation\n- E2E tests should focus on business logic, not type system violations",
338
- validate: (() => { const _io0 = input => "string" === typeof input.think && "string" === typeof input.draft && ("object" === typeof input.revise && null !== input.revise && _io1(input.revise)); const _io1 = input => "string" === typeof input.review && "string" === typeof input.final; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.think || _report(_exceptionable, {
356
+ validate: (() => { const _io0 = input => "string" === typeof input.think && "string" === typeof input.draft && ("object" === typeof input.revise && null !== input.revise && _io1(input.revise)); const _io1 = input => "string" === typeof input.review && (null === input.final || "string" === typeof input.final); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.think || _report(_exceptionable, {
339
357
  path: _path + ".think",
340
358
  expected: "string",
341
359
  value: input.think
@@ -355,9 +373,9 @@ const collection = {
355
373
  path: _path + ".review",
356
374
  expected: "string",
357
375
  value: input.review
358
- }), "string" === typeof input.final || _report(_exceptionable, {
376
+ }), null === input.final || "string" === typeof input.final || _report(_exceptionable, {
359
377
  path: _path + ".final",
360
- expected: "string",
378
+ expected: "(null | string)",
361
379
  value: input.final
362
380
  })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
363
381
  if (false === __is(input)) {
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrateTestCorrectInvalidRequest.js","sourceRoot":"","sources":["../../../src/orchestrate/test/orchestrateTestCorrectInvalidRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,yCAA2C;AAG3C,kDAA0B;AAC1B,+BAA0B;AAG1B,uEAAoE;AACpE,yHAAsH;AAM/G,MAAM,oCAAoC,GAAG,CAGlD,GAAyB,EACzB,OAAwB,EACxB,KAA0B,EACQ,EAAE;IACpC,MAAM,KAAK,GAA4B,MAAM,OAAO,CAAC,KAAK,CAAC,M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AC,QAAQ,CACe,CAAC;IAClE,OAAO;QACL,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,uBAAuB;QAC7B,WAAW;QACX,OAAO,EAAE;YACP,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;gBAChB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnB,CAAC;YACD,MAAM,EAAE,GAAG,EAAE;gBACX,KAAK,CAAC,MAAM,EAAE,CAAC;YACjB,CAAC;SACoD;KACxD,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG;IACjB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAGJ;IACH,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAGH;CACJ,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import { AutoBeTestScenario } from "@autobe/interface";
2
2
  import { ILlmSchema } from "@samchon/openapi";
3
3
  import { AutoBeContext } from "../../context/AutoBeContext";
4
- export declare function orchestrateTestScenario<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>): Promise<AutoBeTestScenario[]>;
4
+ export declare function orchestrateTestScenario<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, instruction: string, capacity?: number): Promise<AutoBeTestScenario[]>;
@@ -58,8 +58,8 @@ const divideArray_1 = require("../../utils/divideArray");
58
58
  const executeCachedBatch_1 = require("../../utils/executeCachedBatch");
59
59
  const transformTestScenarioHistories_1 = require("./histories/transformTestScenarioHistories");
60
60
  const orchestrateTestScenarioReview_1 = require("./orchestrateTestScenarioReview");
61
- function orchestrateTestScenario(ctx) {
62
- return __awaiter(this, void 0, void 0, function* () {
61
+ function orchestrateTestScenario(ctx_1, instruction_1) {
62
+ return __awaiter(this, arguments, void 0, function* (ctx, instruction, capacity = 4 /* AutoBeConfigConstant.INTERFACE_CAPACITY */) {
63
63
  var _a;
64
64
  const document = (_a = ctx.state().interface) === null || _a === void 0 ? void 0 : _a.document;
65
65
  if (document === undefined) {
@@ -68,7 +68,7 @@ function orchestrateTestScenario(ctx) {
68
68
  const dict = new tstl_1.HashMap(document.operations.map((op) => new tstl_1.Pair({
69
69
  path: op.path,
70
70
  method: op.method,
71
- }, op)), utils_1.AutoBeEndpointComparator.hashCode, utils_1.AutoBeEndpointComparator.equals);
71
+ }, op)), utils_1.AutoBeOpenApiEndpointComparator.hashCode, utils_1.AutoBeOpenApiEndpointComparator.equals);
72
72
  const endpointNotFound = [
73
73
  `You have to select one of the endpoints below`,
74
74
  "",
@@ -92,7 +92,7 @@ function orchestrateTestScenario(ctx) {
92
92
  do {
93
93
  const matrix = (0, divideArray_1.divideArray)({
94
94
  array: include,
95
- capacity: 4,
95
+ capacity: capacity !== null && capacity !== void 0 ? capacity : 4 /* AutoBeConfigConstant.INTERFACE_CAPACITY */,
96
96
  });
97
97
  yield (0, executeCachedBatch_1.executeCachedBatch)(matrix.map((include) => (promptCacheKey) => __awaiter(this, void 0, void 0, function* () {
98
98
  exclude.push(...(yield divideAndConquer(ctx, {
@@ -104,6 +104,7 @@ function orchestrateTestScenario(ctx) {
104
104
  progress,
105
105
  reviewProgress,
106
106
  promptCacheKey,
107
+ instruction,
107
108
  })));
108
109
  })));
109
110
  include = include.filter((op) => {
@@ -136,7 +137,13 @@ const divideAndConquer = (ctx, props) => __awaiter(void 0, void 0, void 0, funct
136
137
  try {
137
138
  const { tokenUsage } = yield ctx.conversate({
138
139
  source: "testScenarios",
139
- histories: (0, transformTestScenarioHistories_1.transformTestScenarioHistories)(ctx.state(), props.document, props.include, props.exclude),
140
+ histories: (0, transformTestScenarioHistories_1.transformTestScenarioHistories)({
141
+ state: ctx.state(),
142
+ document: props.document,
143
+ include: props.include,
144
+ exclude: props.exclude,
145
+ instruction: props.instruction,
146
+ }),
140
147
  controller: createController({
141
148
  model: ctx.model,
142
149
  endpointNotFound: props.endpointNotFound,
@@ -175,7 +182,11 @@ const divideAndConquer = (ctx, props) => __awaiter(void 0, void 0, void 0, funct
175
182
  step: (_d = (_c = ctx.state().interface) === null || _c === void 0 ? void 0 : _c.step) !== null && _d !== void 0 ? _d : 0,
176
183
  created_at: new Date().toISOString(),
177
184
  });
178
- return yield (0, orchestrateTestScenarioReview_1.orchestrateTestScenarioReview)(ctx, pointer.value, props.reviewProgress);
185
+ return yield (0, orchestrateTestScenarioReview_1.orchestrateTestScenarioReview)(ctx, {
186
+ instruction: props.instruction,
187
+ groups: pointer.value,
188
+ progress: props.reviewProgress,
189
+ });
179
190
  }
180
191
  catch (_e) {
181
192
  return [];
@@ -465,7 +476,7 @@ function createController(props) {
465
476
  },
466
477
  };
467
478
  }
468
- const uniqueScenarioGroups = (groups) => new tstl_1.HashMap(groups.map((g) => new tstl_1.Pair(g.endpoint, g)), utils_1.AutoBeEndpointComparator.hashCode, utils_1.AutoBeEndpointComparator.equals)
479
+ const uniqueScenarioGroups = (groups) => new tstl_1.HashMap(groups.map((g) => new tstl_1.Pair(g.endpoint, g)), utils_1.AutoBeOpenApiEndpointComparator.hashCode, utils_1.AutoBeOpenApiEndpointComparator.equals)
469
480
  .toJSON()
470
481
  .map((it) => it.second);
471
482
  const collection = {