@autobe/agent 0.25.0 → 0.25.2

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 (199) 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/AutoBeConfigConstant.d.ts +1 -1
  6. package/lib/constants/AutoBeSystemPromptConstant.d.ts +13 -13
  7. package/lib/factory/createAutoBeContext.js +32 -3
  8. package/lib/factory/createAutoBeContext.js.map +1 -1
  9. package/lib/index.mjs +2585 -1009
  10. package/lib/index.mjs.map +1 -1
  11. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +8 -8
  12. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +2 -2
  13. package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.js +1 -1
  14. package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.js.map +1 -1
  15. package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +36 -23
  16. package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js.map +1 -1
  17. package/lib/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.d.ts +22 -42
  18. package/lib/orchestrate/interface/histories/transformInterfaceCommonPrerequisiteHistories.d.ts +3 -0
  19. package/lib/orchestrate/interface/histories/{transformInterfacePrerequisiteHistories.js → transformInterfaceCommonPrerequisiteHistories.js} +4 -4
  20. package/lib/orchestrate/interface/histories/transformInterfaceCommonPrerequisiteHistories.js.map +1 -0
  21. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +2 -2
  22. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
  23. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +3 -3
  24. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
  25. package/lib/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.d.ts +3 -0
  26. package/lib/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.js +102 -0
  27. package/lib/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.js.map +1 -0
  28. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +1 -1
  29. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
  30. package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +2 -2
  31. package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
  32. package/lib/orchestrate/interface/orchestrateInterface.js +25 -9
  33. package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
  34. package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js +278 -47
  35. package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
  36. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +96 -70
  37. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  38. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +3 -3
  39. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
  40. package/lib/orchestrate/interface/orchestrateInterfaceGroups.js +2 -2
  41. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +29 -30
  42. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  43. package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js +278 -47
  44. package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
  45. package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.d.ts +5 -0
  46. package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js +713 -0
  47. package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js.map +1 -0
  48. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js +88 -42
  49. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
  50. package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.js +82 -14
  51. package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -1
  52. package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +0 -38
  53. package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +6 -10
  54. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +3 -3
  55. package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisitesApplication.d.ts +52 -0
  56. package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisitesApplication.js +3 -0
  57. package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisitesApplication.js.map +1 -0
  58. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +0 -33
  59. package/lib/orchestrate/interface/utils/JsonSchemaFactory.d.ts +6 -2
  60. package/lib/orchestrate/interface/utils/JsonSchemaFactory.js +114 -9
  61. package/lib/orchestrate/interface/utils/JsonSchemaFactory.js.map +1 -1
  62. package/lib/orchestrate/interface/utils/JsonSchemaValidator.js +46 -3
  63. package/lib/orchestrate/interface/utils/JsonSchemaValidator.js.map +1 -1
  64. package/lib/orchestrate/interface/utils/OperationValidator.d.ts +3 -4
  65. package/lib/orchestrate/interface/utils/OperationValidator.js +1 -1
  66. package/lib/orchestrate/interface/utils/OperationValidator.js.map +1 -1
  67. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +8 -8
  68. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +20 -20
  69. package/lib/orchestrate/prisma/orchestratePrismaReview.js +20 -20
  70. package/lib/orchestrate/prisma/orchestratePrismaSchemas.js +30 -30
  71. package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.js +9 -10
  72. package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.js.map +1 -1
  73. package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js +14 -22
  74. package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
  75. package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +6 -6
  76. package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js +8 -2
  77. package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
  78. package/lib/orchestrate/realize/internal/compileRealizeFiles.js +1 -2
  79. package/lib/orchestrate/realize/internal/compileRealizeFiles.js.map +1 -1
  80. package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.d.ts +2 -1
  81. package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.js +103 -40
  82. package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.js.map +1 -1
  83. package/lib/orchestrate/realize/orchestrateRealize.js +79 -45
  84. package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
  85. package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js +16 -16
  86. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +12 -12
  87. package/lib/orchestrate/realize/orchestrateRealizeCorrect.js +117 -87
  88. package/lib/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
  89. package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +2 -1
  90. package/lib/orchestrate/realize/orchestrateRealizeWrite.js +117 -54
  91. package/lib/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
  92. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +21 -13
  93. package/lib/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +52 -26
  94. package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +44 -34
  95. package/lib/orchestrate/realize/utils/InternalFileSystem.js +1 -1
  96. package/lib/orchestrate/realize/utils/InternalFileSystem.js.map +1 -1
  97. package/lib/orchestrate/realize/utils/getRealizeWriteCodeTemplate.d.ts +8 -3
  98. package/lib/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js +44 -17
  99. package/lib/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js.map +1 -1
  100. package/lib/orchestrate/realize/utils/getRealizeWriteImportStatements.d.ts +4 -1
  101. package/lib/orchestrate/realize/utils/getRealizeWriteImportStatements.js +24 -9
  102. package/lib/orchestrate/realize/utils/getRealizeWriteImportStatements.js.map +1 -1
  103. package/lib/orchestrate/realize/utils/printErrorHints.d.ts +8 -0
  104. package/lib/orchestrate/realize/utils/printErrorHints.js +48 -0
  105. package/lib/orchestrate/realize/utils/printErrorHints.js.map +1 -0
  106. package/lib/orchestrate/realize/utils/replaceImportStatements.d.ts +1 -0
  107. package/lib/orchestrate/realize/utils/replaceImportStatements.js +93 -55
  108. package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
  109. package/lib/orchestrate/test/histories/transformTestCorrectHistories.js +1 -1
  110. package/lib/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
  111. package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.js +1 -1
  112. package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.js.map +1 -1
  113. package/lib/orchestrate/test/histories/transformTestScenarioHistories.js +10 -79
  114. package/lib/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
  115. package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js +15 -65
  116. package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js.map +1 -1
  117. package/lib/orchestrate/test/histories/transformTestWriteHistories.js +1 -1
  118. package/lib/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
  119. package/lib/orchestrate/test/orchestrateTestCorrect.js +32 -17
  120. package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  121. package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js +31 -13
  122. package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js.map +1 -1
  123. package/lib/orchestrate/test/orchestrateTestScenario.d.ts +1 -1
  124. package/lib/orchestrate/test/orchestrateTestScenario.js +5 -5
  125. package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  126. package/lib/orchestrate/test/orchestrateTestScenarioReview.js +1 -1
  127. package/lib/orchestrate/test/orchestrateTestScenarioReview.js.map +1 -1
  128. package/lib/orchestrate/test/orchestrateTestWrite.js +37 -21
  129. package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  130. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +9 -5
  131. package/lib/orchestrate/test/structures/IAutoBeTestCorrectInvalidRequestApplication.d.ts +8 -2
  132. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +11 -7
  133. package/lib/orchestrate/test/utils/getPrerequisites.d.ts +5 -0
  134. package/lib/orchestrate/test/utils/getPrerequisites.js +36 -0
  135. package/lib/orchestrate/test/utils/getPrerequisites.js.map +1 -0
  136. package/lib/orchestrate/test/utils/getReferenceIds.js +1 -1
  137. package/lib/orchestrate/test/utils/getReferenceIds.js.map +1 -1
  138. package/package.json +5 -5
  139. package/src/AutoBeAgent.ts +17 -1
  140. package/src/AutoBeMockAgent.ts +1 -0
  141. package/src/constants/AutoBeConfigConstant.ts +1 -1
  142. package/src/constants/AutoBeSystemPromptConstant.ts +13 -13
  143. package/src/factory/createAutoBeContext.ts +33 -3
  144. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +2 -2
  145. package/src/orchestrate/common/orchestrateCommonCorrectCasting.ts +2 -2
  146. package/src/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.ts +25 -45
  147. package/src/orchestrate/interface/histories/{transformInterfacePrerequisiteHistories.ts → transformInterfaceCommonPrerequisiteHistories.ts} +1 -1
  148. package/src/orchestrate/interface/histories/transformInterfaceGroupHistories.ts +4 -2
  149. package/src/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.ts +118 -0
  150. package/src/orchestrate/interface/orchestrateInterface.ts +43 -17
  151. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +12 -33
  152. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +5 -5
  153. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +7 -6
  154. package/src/orchestrate/interface/orchestrateInterfacePrerequisites.ts +274 -0
  155. package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +1 -1
  156. package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +1 -1
  157. package/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.ts +0 -39
  158. package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +6 -10
  159. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +4 -5
  160. package/src/orchestrate/interface/structures/IAutoBeInterfacePrerequisitesApplication.ts +58 -0
  161. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +0 -34
  162. package/src/orchestrate/interface/utils/JsonSchemaFactory.ts +92 -4
  163. package/src/orchestrate/interface/utils/JsonSchemaValidator.ts +49 -3
  164. package/src/orchestrate/interface/utils/OperationValidator.ts +9 -7
  165. package/src/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.ts +9 -10
  166. package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +13 -24
  167. package/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.ts +6 -6
  168. package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +6 -4
  169. package/src/orchestrate/realize/internal/compileRealizeFiles.ts +1 -5
  170. package/src/orchestrate/realize/orchestRateRealizeCorrectCasting.ts +84 -17
  171. package/src/orchestrate/realize/orchestrateRealize.ts +123 -74
  172. package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +33 -6
  173. package/src/orchestrate/realize/orchestrateRealizeWrite.ts +14 -4
  174. package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +21 -13
  175. package/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.ts +54 -29
  176. package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +46 -35
  177. package/src/orchestrate/realize/utils/InternalFileSystem.ts +1 -1
  178. package/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.ts +54 -22
  179. package/src/orchestrate/realize/utils/getRealizeWriteImportStatements.ts +28 -16
  180. package/src/orchestrate/realize/utils/printErrorHints.ts +55 -0
  181. package/src/orchestrate/realize/utils/replaceImportStatements.ts +99 -102
  182. package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +18 -91
  183. package/src/orchestrate/test/histories/transformTestScenarioReviewHistories.ts +17 -90
  184. package/src/orchestrate/test/orchestrateTestCorrect.ts +7 -6
  185. package/src/orchestrate/test/orchestrateTestCorrectInvalidRequest.ts +13 -1
  186. package/src/orchestrate/test/orchestrateTestScenario.ts +12 -6
  187. package/src/orchestrate/test/orchestrateTestScenarioReview.ts +3 -3
  188. package/src/orchestrate/test/orchestrateTestWrite.ts +7 -6
  189. package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +9 -228
  190. package/src/orchestrate/test/structures/IAutoBeTestCorrectInvalidRequestApplication.ts +8 -2
  191. package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +11 -78
  192. package/src/orchestrate/test/utils/getPrerequisites.ts +51 -0
  193. package/src/orchestrate/test/utils/getReferenceIds.ts +2 -1
  194. package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.d.ts +0 -3
  195. package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js.map +0 -1
  196. package/lib/orchestrate/interface/utils/OpenApiEndpointComparator.d.ts +0 -6
  197. package/lib/orchestrate/interface/utils/OpenApiEndpointComparator.js +0 -22
  198. package/lib/orchestrate/interface/utils/OpenApiEndpointComparator.js.map +0 -1
  199. package/src/orchestrate/interface/utils/OpenApiEndpointComparator.ts +0 -23
@@ -93,7 +93,7 @@ function orchestrateTestWrite(ctx, props) {
93
93
  }
94
94
  function process(ctx, props) {
95
95
  return __awaiter(this, void 0, void 0, function* () {
96
- var _a, _b, _c, _d;
96
+ var _a, _b, _c, _d, _e;
97
97
  const { scenario, artifacts, progress, promptCacheKey } = props;
98
98
  const pointer = {
99
99
  value: null,
@@ -120,7 +120,8 @@ function process(ctx, props) {
120
120
  ++progress.completed;
121
121
  throw new Error("Failed to create test code.");
122
122
  }
123
- pointer.value.revise.final = yield (0, completeTestCode_1.completeTestCode)(ctx, artifacts, pointer.value.revise.final);
123
+ if (pointer.value.revise.final)
124
+ pointer.value.revise.final = yield (0, completeTestCode_1.completeTestCode)(ctx, artifacts, pointer.value.revise.final);
124
125
  pointer.value.draft = yield (0, completeTestCode_1.completeTestCode)(ctx, artifacts, pointer.value.draft);
125
126
  return {
126
127
  type: "testWrite",
@@ -131,11 +132,11 @@ function process(ctx, props) {
131
132
  domain: pointer.value.domain,
132
133
  draft: pointer.value.draft,
133
134
  review: (_a = pointer.value.revise) === null || _a === void 0 ? void 0 : _a.review,
134
- final: (_b = pointer.value.revise) === null || _b === void 0 ? void 0 : _b.final,
135
+ final: (_c = (_b = pointer.value.revise) === null || _b === void 0 ? void 0 : _b.final) !== null && _c !== void 0 ? _c : undefined,
135
136
  tokenUsage,
136
137
  completed: ++progress.completed,
137
138
  total: progress.total,
138
- step: (_d = (_c = ctx.state().interface) === null || _c === void 0 ? void 0 : _c.step) !== null && _d !== void 0 ? _d : 0,
139
+ step: (_e = (_d = ctx.state().interface) === null || _d === void 0 ? void 0 : _d.step) !== null && _e !== void 0 ? _e : 0,
139
140
  };
140
141
  });
141
142
  }
@@ -179,7 +180,7 @@ const claude = {
179
180
  type: "string"
180
181
  },
181
182
  revise: {
182
- description: "Steps 4-5: Code review and final refinement process.\n\nContains the iterative improvement workflow that transforms the initial\ndraft into production-ready test code. The review phase identifies issues\nto fix or code to delete, followed by the final phase that produces\nthe polished, production-ready test implementation.\n\nWorkflow: Draft \u2192 Review analysis \u2192 Final implementation",
183
+ description: "Steps 4-5: Code review and final refinement process.\n\nContains the iterative improvement workflow that transforms the initial\ndraft into production-ready test code. The review phase identifies issues\nto fix or code to delete, followed by the final phase that produces the\npolished, production-ready test implementation.\n\nWorkflow: Draft \u2192 Review analysis \u2192 Final implementation",
183
184
  $ref: "#/$defs/IAutoBeTestWriteApplication.IReviseProps"
184
185
  }
185
186
  },
@@ -199,8 +200,15 @@ const claude = {
199
200
  type: "string"
200
201
  },
201
202
  final: {
202
- description: "Step 5: Final production-ready test code.\n\nAI produces the final, polished version of the test code incorporating\nall review feedback. This code represents the completed test\nimplementation, ready for production deployment.\n\n**\uD83D\uDEA8 CRITICAL: APPLY ALL FIXES AND DELETIONS FROM REVIEW \uD83D\uDEA8**\n\n- FIX all correctable issues identified in review\n- DELETE all prohibited code identified in review\n- If review found type error tests, they MUST be deleted in final\n- If review found code to DELETE, final MUST be different from draft\n\nAll identified issues must be resolved, and the code must meet the\nhighest quality standards.\n\nWorkflow: Review feedback \u2192 Apply FIXES \u2192 Apply DELETIONS \u2192\nProduction-ready implementation\n\nThis is the ultimate deliverable that will be used in the actual test\nsuite.",
203
- type: "string"
203
+ description: "Step 5: Final production-ready test code.\n\nAI produces the final, polished version of the test code incorporating\nall review feedback. This code represents the completed test\nimplementation, ready for production deployment. When the draft code is\nalready perfect with no issues found during review, this value can be\nnull, indicating no revisions were necessary.\n\n**\uD83D\uDEA8 CRITICAL: APPLY ALL FIXES AND DELETIONS FROM REVIEW \uD83D\uDEA8**\n\n- FIX all correctable issues identified in review\n- DELETE all prohibited code identified in review\n- If review found type error tests, they MUST be deleted in final\n- If review found code to DELETE, final MUST be different from draft\n- If review finds NO issues requiring changes, set to null\n\nAll identified issues must be resolved, and the code must meet the\nhighest quality standards. A null value indicates the draft code already\nmeets all requirements without modification.\n\nWorkflow: Review feedback \u2192 Apply FIXES \u2192 Apply DELETIONS \u2192\nProduction-ready implementation (or null if no changes needed)\n\nThis is the ultimate deliverable that will be used in the actual test\nsuite when provided, otherwise the draft is used as-is.",
204
+ oneOf: [
205
+ {
206
+ type: "null"
207
+ },
208
+ {
209
+ type: "string"
210
+ }
211
+ ]
204
212
  }
205
213
  },
206
214
  required: [
@@ -211,7 +219,7 @@ const claude = {
211
219
  }
212
220
  },
213
221
  description: "Main entry point for AI Function Call - generates complete E2E test code.\n\nThe AI executes this function to perform the entire test generation\nworkflow: scenario analysis \u2192 draft implementation \u2192 code review \u2192 final\ncode production. This structured approach ensures high-quality,\ncompilation-error-free test code.",
214
- validate: (() => { const _io0 = input => "string" === typeof input.scenario && "string" === typeof input.domain && "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.scenario || _report(_exceptionable, {
222
+ validate: (() => { const _io0 = input => "string" === typeof input.scenario && "string" === typeof input.domain && "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.scenario || _report(_exceptionable, {
215
223
  path: _path + ".scenario",
216
224
  expected: "string",
217
225
  value: input.scenario
@@ -235,9 +243,9 @@ const claude = {
235
243
  path: _path + ".review",
236
244
  expected: "string",
237
245
  value: input.review
238
- }), "string" === typeof input.final || _report(_exceptionable, {
246
+ }), null === input.final || "string" === typeof input.final || _report(_exceptionable, {
239
247
  path: _path + ".final",
240
- expected: "string",
248
+ expected: "(null | string)",
241
249
  value: input.final
242
250
  })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
243
251
  if (false === __is(input)) {
@@ -282,7 +290,7 @@ const collection = {
282
290
  {
283
291
  name: "write",
284
292
  parameters: {
285
- description: " Complete specification for test generation including scenario,\ndomain, and implementation steps\n\n------------------------------\n\nCurrent Type: {@link IAutoBeTestWriteApplication.IProps}\n\n### Description of {@link revise} property:\n\n> Steps 4-5: Code review and final refinement process.\n> \n> Contains the iterative improvement workflow that transforms the initial\n> draft into production-ready test code. The review phase identifies issues\n> to fix or code to delete, followed by the final phase that produces\n> the polished, production-ready test implementation.\n> \n> Workflow: Draft \u2192 Review analysis \u2192 Final implementation",
293
+ description: " Complete specification for test generation including scenario,\ndomain, and implementation steps\n\n------------------------------\n\nCurrent Type: {@link IAutoBeTestWriteApplication.IProps}\n\n### Description of {@link revise} property:\n\n> Steps 4-5: Code review and final refinement process.\n> \n> Contains the iterative improvement workflow that transforms the initial\n> draft into production-ready test code. The review phase identifies issues\n> to fix or code to delete, followed by the final phase that produces the\n> polished, production-ready test implementation.\n> \n> Workflow: Draft \u2192 Review analysis \u2192 Final implementation",
286
294
  type: "object",
287
295
  properties: {
288
296
  scenario: {
@@ -317,8 +325,15 @@ const collection = {
317
325
  type: "string"
318
326
  },
319
327
  final: {
320
- description: "Step 5: Final production-ready test code.\n\nAI produces the final, polished version of the test code incorporating\nall review feedback. This code represents the completed test\nimplementation, ready for production deployment.\n\n**\uD83D\uDEA8 CRITICAL: APPLY ALL FIXES AND DELETIONS FROM REVIEW \uD83D\uDEA8**\n\n- FIX all correctable issues identified in review\n- DELETE all prohibited code identified in review\n- If review found type error tests, they MUST be deleted in final\n- If review found code to DELETE, final MUST be different from draft\n\nAll identified issues must be resolved, and the code must meet the\nhighest quality standards.\n\nWorkflow: Review feedback \u2192 Apply FIXES \u2192 Apply DELETIONS \u2192\nProduction-ready implementation\n\nThis is the ultimate deliverable that will be used in the actual test\nsuite.",
321
- type: "string"
328
+ description: "Step 5: Final production-ready test code.\n\nAI produces the final, polished version of the test code incorporating\nall review feedback. This code represents the completed test\nimplementation, ready for production deployment. When the draft code is\nalready perfect with no issues found during review, this value can be\nnull, indicating no revisions were necessary.\n\n**\uD83D\uDEA8 CRITICAL: APPLY ALL FIXES AND DELETIONS FROM REVIEW \uD83D\uDEA8**\n\n- FIX all correctable issues identified in review\n- DELETE all prohibited code identified in review\n- If review found type error tests, they MUST be deleted in final\n- If review found code to DELETE, final MUST be different from draft\n- If review finds NO issues requiring changes, set to null\n\nAll identified issues must be resolved, and the code must meet the\nhighest quality standards. A null value indicates the draft code already\nmeets all requirements without modification.\n\nWorkflow: Review feedback \u2192 Apply FIXES \u2192 Apply DELETIONS \u2192\nProduction-ready implementation (or null if no changes needed)\n\nThis is the ultimate deliverable that will be used in the actual test\nsuite when provided, otherwise the draft is used as-is.",
329
+ anyOf: [
330
+ {
331
+ type: "null"
332
+ },
333
+ {
334
+ type: "string"
335
+ }
336
+ ]
322
337
  }
323
338
  },
324
339
  required: [
@@ -329,7 +344,7 @@ const collection = {
329
344
  }
330
345
  },
331
346
  description: "Main entry point for AI Function Call - generates complete E2E test code.\n\nThe AI executes this function to perform the entire test generation\nworkflow: scenario analysis \u2192 draft implementation \u2192 code review \u2192 final\ncode production. This structured approach ensures high-quality,\ncompilation-error-free test code.",
332
- validate: (() => { const _io0 = input => "string" === typeof input.scenario && "string" === typeof input.domain && "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.scenario || _report(_exceptionable, {
347
+ validate: (() => { const _io0 = input => "string" === typeof input.scenario && "string" === typeof input.domain && "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.scenario || _report(_exceptionable, {
333
348
  path: _path + ".scenario",
334
349
  expected: "string",
335
350
  value: input.scenario
@@ -353,9 +368,9 @@ const collection = {
353
368
  path: _path + ".review",
354
369
  expected: "string",
355
370
  value: input.review
356
- }), "string" === typeof input.final || _report(_exceptionable, {
371
+ }), null === input.final || "string" === typeof input.final || _report(_exceptionable, {
357
372
  path: _path + ".final",
358
- expected: "string",
373
+ expected: "(null | string)",
359
374
  value: input.final
360
375
  })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
361
376
  if (false === __is(input)) {
@@ -426,14 +441,15 @@ const collection = {
426
441
  },
427
442
  final: {
428
443
  type: "string",
429
- description: "Step 5: Final production-ready test code.\n\nAI produces the final, polished version of the test code incorporating\nall review feedback. This code represents the completed test\nimplementation, ready for production deployment.\n\n**\uD83D\uDEA8 CRITICAL: APPLY ALL FIXES AND DELETIONS FROM REVIEW \uD83D\uDEA8**\n\n- FIX all correctable issues identified in review\n- DELETE all prohibited code identified in review\n- If review found type error tests, they MUST be deleted in final\n- If review found code to DELETE, final MUST be different from draft\n\nAll identified issues must be resolved, and the code must meet the\nhighest quality standards.\n\nWorkflow: Review feedback \u2192 Apply FIXES \u2192 Apply DELETIONS \u2192\nProduction-ready implementation\n\nThis is the ultimate deliverable that will be used in the actual test\nsuite."
444
+ nullable: true,
445
+ description: "Step 5: Final production-ready test code.\n\nAI produces the final, polished version of the test code incorporating\nall review feedback. This code represents the completed test\nimplementation, ready for production deployment. When the draft code is\nalready perfect with no issues found during review, this value can be\nnull, indicating no revisions were necessary.\n\n**\uD83D\uDEA8 CRITICAL: APPLY ALL FIXES AND DELETIONS FROM REVIEW \uD83D\uDEA8**\n\n- FIX all correctable issues identified in review\n- DELETE all prohibited code identified in review\n- If review found type error tests, they MUST be deleted in final\n- If review found code to DELETE, final MUST be different from draft\n- If review finds NO issues requiring changes, set to null\n\nAll identified issues must be resolved, and the code must meet the\nhighest quality standards. A null value indicates the draft code already\nmeets all requirements without modification.\n\nWorkflow: Review feedback \u2192 Apply FIXES \u2192 Apply DELETIONS \u2192\nProduction-ready implementation (or null if no changes needed)\n\nThis is the ultimate deliverable that will be used in the actual test\nsuite when provided, otherwise the draft is used as-is."
430
446
  }
431
447
  },
432
448
  required: [
433
449
  "review",
434
450
  "final"
435
451
  ],
436
- description: "Steps 4-5: Code review and final refinement process.\n\nContains the iterative improvement workflow that transforms the initial\ndraft into production-ready test code. The review phase identifies issues\nto fix or code to delete, followed by the final phase that produces\nthe polished, production-ready test implementation.\n\nWorkflow: Draft \u2192 Review analysis \u2192 Final implementation\n\n------------------------------\n\nCurrent Type: {@link IAutoBeTestWriteApplication.IReviseProps}",
452
+ description: "Steps 4-5: Code review and final refinement process.\n\nContains the iterative improvement workflow that transforms the initial\ndraft into production-ready test code. The review phase identifies issues\nto fix or code to delete, followed by the final phase that produces the\npolished, production-ready test implementation.\n\nWorkflow: Draft \u2192 Review analysis \u2192 Final implementation\n\n------------------------------\n\nCurrent Type: {@link IAutoBeTestWriteApplication.IReviseProps}",
437
453
  additionalProperties: false
438
454
  }
439
455
  },
@@ -447,7 +463,7 @@ const collection = {
447
463
  additionalProperties: false
448
464
  },
449
465
  description: "Main entry point for AI Function Call - generates complete E2E test code.\n\nThe AI executes this function to perform the entire test generation\nworkflow: scenario analysis \u2192 draft implementation \u2192 code review \u2192 final\ncode production. This structured approach ensures high-quality,\ncompilation-error-free test code.",
450
- validate: (() => { const _io0 = input => "string" === typeof input.scenario && "string" === typeof input.domain && "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.scenario || _report(_exceptionable, {
466
+ validate: (() => { const _io0 = input => "string" === typeof input.scenario && "string" === typeof input.domain && "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.scenario || _report(_exceptionable, {
451
467
  path: _path + ".scenario",
452
468
  expected: "string",
453
469
  value: input.scenario
@@ -471,9 +487,9 @@ const collection = {
471
487
  path: _path + ".review",
472
488
  expected: "string",
473
489
  value: input.review
474
- }), "string" === typeof input.final || _report(_exceptionable, {
490
+ }), null === input.final || "string" === typeof input.final || _report(_exceptionable, {
475
491
  path: _path + ".final",
476
- expected: "string",
492
+ expected: "(null | string)",
477
493
  value: input.final
478
494
  })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
479
495
  if (false === __is(input)) {
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrateTestWrite.js","sourceRoot":"","sources":["../../../src/orchestrate/test/orchestrateTestWrite.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,oDAwCC;;AAtDD,kDAA0B;AAC1B,uEAAoE;AACpE,+BAA0B;AAG1B,uEAAoE;AACpE,uEAAoE;AACpE,iEAA8D;AAC9D,iFAA8E;AAC9E,yFAAsF;AAKtF,SAAsB,oBAAoB,CACxC,GAAyB,EACzB,KAGC;;QAED,MAAM,QAAQ,GAA4B;YACxC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;YAC7B,SAAS,EAAE,CAAC;SACb,CAAC;QACF,MAAM,MAAM,GAAyC,MAAM,IAAA,uCAAkB;QAC3E;;;;WAIG;QACH,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAO,cAAc,EAAE,EAAE;YACzD,IAAI,CAAC;gBACH,MAAM,SAAS,GACb,MAAM,IAAA,mDAAwB,EAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;gBAChD,MAAM,KAAK,GAAyB,MAAM,OAAO,CAAC,GAAG,EAAE;oBACrD,QAAQ;oBACR,SAAS;oBACT,QAAQ;oBACR,cAAc;oBACd,WAAW,EAAE,KAAK,CAAC,WAAW;iBAC/B,CAAC,CAAC;gBACH,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;gBACpB,OAAO;oBACL,QAAQ;oBACR,SAAS;oBACT,KAAK;iBACN,CAAC;YACJ,CAAC;YAAC,WAAM,CAAC;gBACP,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC,CAAA,CAAC,CACH,CAAC;QACF,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC;IAC1C,CAAC;CAAA;AA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,CAAC;IAE/B,MAAM,WAAW,GAA2B,UAAU,CACpD,KAAK,CAAC,KAAK,CACwD,CAAC;IACtE,OAAO;QACL,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,kBAAkB;QACxB,WAAW;QACX,OAAO,EAAE;YACP,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE;gBACd,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACpB,CAAC;SACoC;KACxC,CAAC;AACJ,CAAC;AAED,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAiE,CAAC;AAC9E,MAAM,UAAU,GAAG;IACjB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAiE;IACxE,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;IACb,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA6D;CACnE,CAAC"}
@@ -109,17 +109,21 @@ export declare namespace IAutoBeTestCorrectApplication {
109
109
  * incorporating all review feedback and validation results. This code
110
110
  * represents the completed error correction, guaranteed to compile
111
111
  * successfully while preserving all original test functionality and
112
- * business logic.
112
+ * business logic. When the draft correction already perfectly resolves all
113
+ * issues with no problems found during review, this value can be null,
114
+ * indicating no further refinement was necessary.
113
115
  *
114
116
  * The final implementation resolves all compilation issues, maintains
115
117
  * strict type safety, follows all established conventions, and delivers a
116
118
  * production-ready test that accurately validates the intended API
117
- * behaviors and user workflows.
119
+ * behaviors and user workflows. A null value signifies the draft correction
120
+ * was already optimal and requires no modifications.
118
121
  *
119
122
  * Workflow: Review integration → Final refinement → Production-ready
120
- * implementation. This is the ultimate deliverable that will replace the
121
- * compilation-failed code.
123
+ * implementation (or null if draft needs no changes). This is the ultimate
124
+ * deliverable that will replace the compilation-failed code when provided,
125
+ * otherwise the draft correction is used as-is.
122
126
  */
123
- final: string;
127
+ final: string | null;
124
128
  }
125
129
  }
@@ -125,7 +125,10 @@ export declare namespace IAutoBeTestCorrectInvalidRequestApplication {
125
125
  * Final corrected code.
126
126
  *
127
127
  * The complete, cleaned test code with all invalid API request sections
128
- * removed, ready for compilation.
128
+ * removed, ready for compilation. When the draft already successfully
129
+ * removes all problematic code with no additional issues found during
130
+ * review, this value can be null, indicating the draft deletion was
131
+ * sufficient and requires no further changes.
129
132
  *
130
133
  * This code must:
131
134
  *
@@ -134,7 +137,10 @@ export declare namespace IAutoBeTestCorrectInvalidRequestApplication {
134
137
  * - Have no `as any` or similar type violations
135
138
  * - Maintain the original file structure
136
139
  * - Be production-ready E2E test code
140
+ *
141
+ * A null value indicates the draft successfully removed all invalid code
142
+ * and needs no additional modifications.
137
143
  */
138
- final: string;
144
+ final: string | null;
139
145
  }
140
146
  }
@@ -59,8 +59,8 @@ export declare namespace IAutoBeTestWriteApplication {
59
59
  *
60
60
  * Contains the iterative improvement workflow that transforms the initial
61
61
  * draft into production-ready test code. The review phase identifies issues
62
- * to fix or code to delete, followed by the final phase that produces
63
- * the polished, production-ready test implementation.
62
+ * to fix or code to delete, followed by the final phase that produces the
63
+ * polished, production-ready test implementation.
64
64
  *
65
65
  * Workflow: Draft → Review analysis → Final implementation
66
66
  */
@@ -126,7 +126,9 @@ export declare namespace IAutoBeTestWriteApplication {
126
126
  *
127
127
  * AI produces the final, polished version of the test code incorporating
128
128
  * all review feedback. This code represents the completed test
129
- * implementation, ready for production deployment.
129
+ * implementation, ready for production deployment. When the draft code is
130
+ * already perfect with no issues found during review, this value can be
131
+ * null, indicating no revisions were necessary.
130
132
  *
131
133
  * **🚨 CRITICAL: APPLY ALL FIXES AND DELETIONS FROM REVIEW 🚨**
132
134
  *
@@ -134,16 +136,18 @@ export declare namespace IAutoBeTestWriteApplication {
134
136
  * - DELETE all prohibited code identified in review
135
137
  * - If review found type error tests, they MUST be deleted in final
136
138
  * - If review found code to DELETE, final MUST be different from draft
139
+ * - If review finds NO issues requiring changes, set to null
137
140
  *
138
141
  * All identified issues must be resolved, and the code must meet the
139
- * highest quality standards.
142
+ * highest quality standards. A null value indicates the draft code already
143
+ * meets all requirements without modification.
140
144
  *
141
145
  * Workflow: Review feedback → Apply FIXES → Apply DELETIONS →
142
- * Production-ready implementation
146
+ * Production-ready implementation (or null if no changes needed)
143
147
  *
144
148
  * This is the ultimate deliverable that will be used in the actual test
145
- * suite.
149
+ * suite when provided, otherwise the draft is used as-is.
146
150
  */
147
- final: string;
151
+ final: string | null;
148
152
  }
149
153
  }
@@ -0,0 +1,5 @@
1
+ import { AutoBeOpenApi } from "@autobe/interface";
2
+ export declare const getPrerequisites: (props: {
3
+ document: AutoBeOpenApi.IDocument;
4
+ endpoint: AutoBeOpenApi.IEndpoint;
5
+ }) => AutoBeOpenApi.IPrerequisite[];
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getPrerequisites = void 0;
4
+ const utils_1 = require("@autobe/utils");
5
+ const tstl_1 = require("tstl");
6
+ const getPrerequisites = (props) => {
7
+ const visited = new Set();
8
+ const result = new tstl_1.HashMap(utils_1.AutoBeOpenApiEndpointComparator.hashCode, utils_1.AutoBeOpenApiEndpointComparator.equals);
9
+ const traverse = (endpoint) => {
10
+ const key = `${endpoint.method}:${endpoint.path}`;
11
+ // prevent circular structure: skip visited endpoint
12
+ if (visited.has(key))
13
+ return;
14
+ visited.add(key);
15
+ const operation = props.document.operations.find((op) => op.method === endpoint.method && op.path === endpoint.path);
16
+ if (operation === undefined)
17
+ return;
18
+ // add current operation's prerequisites
19
+ for (const prerequisite of operation.prerequisites) {
20
+ // check if already in result to avoid duplicates
21
+ const exists = result.has(prerequisite.endpoint);
22
+ if (!exists) {
23
+ result.set(prerequisite.endpoint, [prerequisite]);
24
+ }
25
+ // recursively traverse prerequisite's prerequisites
26
+ traverse(prerequisite.endpoint);
27
+ }
28
+ };
29
+ traverse(props.endpoint);
30
+ return result
31
+ .toJSON()
32
+ .map((it) => it.second)
33
+ .flat();
34
+ };
35
+ exports.getPrerequisites = getPrerequisites;
36
+ //# sourceMappingURL=getPrerequisites.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPrerequisites.js","sourceRoot":"","sources":["../../../../src/orchestrate/test/utils/getPrerequisites.ts"],"names":[],"mappings":";;;AACA,yCAAgE;AAChE,+BAA+B;AAExB,MAAM,gBAAgB,GAAG,CAAC,KAGhC,EAAiC,EAAE;IAClC,MAAM,OAAO,GAAgB,IAAI,GAAG,EAAU,CAAC;IAC/C,MAAM,MAAM,GAGR,IAAI,cAAO,CACb,uCAA+B,CAAC,QAAQ,EACxC,uCAA+B,CAAC,MAAM,CACvC,CAAC;IAEF,MAAM,QAAQ,GAAG,CAAC,QAAiC,EAAQ,EAAE;QAC3D,MAAM,GAAG,GAAG,GAAG,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;QAElD,oDAAoD;QACpD,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,OAAO;QAC7B,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAEjB,MAAM,SAAS,GACb,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAC5B,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM,IAAI,EAAE,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI,CACnE,CAAC;QAEJ,IAAI,SAAS,KAAK,SAAS;YAAE,OAAO;QAEpC,wCAAwC;QACxC,KAAK,MAAM,YAAY,IAAI,SAAS,CAAC,aAAa,EAAE,CAAC;YACnD,iDAAiD;YACjD,MAAM,MAAM,GAAY,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;YAE1D,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;YACpD,CAAC;YAED,oDAAoD;YACpD,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAClC,CAAC;IACH,CAAC,CAAC;IAEF,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACzB,OAAO,MAAM;SACV,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC;SACtB,IAAI,EAAE,CAAC;AACZ,CAAC,CAAC;AA9CW,QAAA,gBAAgB,oBA8C3B"}
@@ -5,7 +5,7 @@ const openapi_1 = require("@samchon/openapi");
5
5
  const getReferenceIds = (props) => {
6
6
  const result = new Set();
7
7
  const emplace = (key) => {
8
- if (key.endsWith("_id") || key.endsWith("Id"))
8
+ if (key.endsWith("_id") || key.endsWith("Id") || key === "id")
9
9
  result.add(key);
10
10
  };
11
11
  props.operation.parameters.forEach((p) => emplace(p.name));
@@ -1 +1 @@
1
- {"version":3,"file":"getReferenceIds.js","sourceRoot":"","sources":["../../../../src/orchestrate/test/utils/getReferenceIds.ts"],"names":[],"mappings":";;;AACA,8CAAsD;AAE/C,MAAM,eAAe,GAAG,CAAC,KAG/B,EAAY,EAAE;IACb,MAAM,MAAM,GAAgB,IAAI,GAAG,EAAE,CAAC;IACtC,MAAM,OAAO,GAAG,CAAC,GAAW,EAAE,EAAE;QAC9B,IAAI,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC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,CAAC,CAAC;IACpB,CAAC,CAAC;IAEF,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3D,IAAI,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;QAChC,4BAAkB,CAAC,KAAK,CAAC;YACvB,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,UAAU;YACrC,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,QAAQ,EAAE;YACtD,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE;;gBAClB,IAAI,4BAAkB,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,KAAK;oBAAE,OAAO;gBAC1D,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAA,MAAM,CAAC,UAAU,mCAAI,EAAE,CAAC;oBAAE,OAAO,CAAC,GAAG,CAAC,CAAC;YACvE,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC,CAAC;AAtBW,QAAA,eAAe,mBAsB1B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobe/agent",
3
- "version": "0.25.0",
3
+ "version": "0.25.2",
4
4
  "description": "AI backend server code generator",
5
5
  "main": "lib/index.js",
6
6
  "author": "Wrtn Technologies",
@@ -27,8 +27,8 @@
27
27
  "tstl": "^3.0.0",
28
28
  "typia": "^9.7.2",
29
29
  "uuid": "^11.1.0",
30
- "@autobe/interface": "^0.25.0",
31
- "@autobe/utils": "^0.25.0"
30
+ "@autobe/interface": "^0.25.2",
31
+ "@autobe/utils": "^0.25.2"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@rollup/plugin-json": "^6.1.0",
@@ -40,8 +40,8 @@
40
40
  "ts-node": "^10.9.2",
41
41
  "ts-patch": "^3.3.0",
42
42
  "typescript": "~5.9.2",
43
- "@autobe/compiler": "^0.25.0",
44
- "@autobe/filesystem": "^0.25.0"
43
+ "@autobe/compiler": "^0.25.2",
44
+ "@autobe/filesystem": "^0.25.2"
45
45
  },
46
46
  "keywords": [
47
47
  "ai",
@@ -1,7 +1,9 @@
1
1
  import {
2
+ AgenticaExecuteHistory,
2
3
  IAgenticaTokenUsageJson,
3
4
  IAgenticaVendor,
4
5
  MicroAgentica,
6
+ MicroAgenticaHistory,
5
7
  } from "@agentica/core";
6
8
  import {
7
9
  AutoBeAssistantMessageHistory,
@@ -277,7 +279,21 @@ export class AutoBeAgent<Model extends ILlmSchema.Model>
277
279
  this.histories_.push(userMessageHistory);
278
280
  this.dispatch(userMessageHistory).catch(() => {});
279
281
 
280
- await this.agentica_.conversate(content);
282
+ const agenticaHistories: MicroAgenticaHistory<Model>[] =
283
+ await this.agentica_.conversate(content);
284
+ const errorHistory: AgenticaExecuteHistory<Model> | undefined =
285
+ agenticaHistories.find(
286
+ (h): h is AgenticaExecuteHistory<Model> =>
287
+ h.type === "execute" && h.success === false,
288
+ );
289
+ if (errorHistory !== undefined) {
290
+ if (errorHistory.value instanceof Error) throw errorHistory.value;
291
+ else {
292
+ const v = new Error();
293
+ Object.assign(v, errorHistory.value);
294
+ throw v;
295
+ }
296
+ }
281
297
  return this.histories_.slice(index);
282
298
  }
283
299
 
@@ -193,6 +193,7 @@ const sleepMap: Record<AutoBeEvent.Type, number> = {
193
193
  interfaceSchemasReview: 400,
194
194
  interfaceComplement: 2_000,
195
195
  interfaceComplete: 1_000,
196
+ interfacePrerequisites: 1_000,
196
197
  // TEST
197
198
  testStart: 1_000,
198
199
  testScenarios: 40,
@@ -1,5 +1,5 @@
1
1
  export const enum AutoBeConfigConstant {
2
2
  RETRY = 4,
3
- INTERFACE_CAPACITY = 4,
3
+ INTERFACE_CAPACITY = 2,
4
4
  TIMEOUT = 30 * 60 * 1000,
5
5
  }