@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
@@ -1 +1 @@
1
- {"version":3,"file":"transformRealizeWriteHistories.js","sourceRoot":"","sources":["../../../../src/orchestrate/realize/histories/transformRealizeWriteHistories.ts"],"names":[],"mappings":";;;AAEA,yCAA2C;AAC3C,+B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AE,eAAe;YACrB,IAAI,EAAE,iuJAAkD,UAAU,CAChE,iBAAiB,EACjB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAC3C;iBACE,UAAU,CACT,SAAS,EACT,IAAA,mDAAwB,EAAC,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CACzD;iBACA,UAAU,CAAC,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SAC5D;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,IAAI,EAAE,eAAe;YACrB,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,IAAA,yDAA2B,EAC/B,KAAK,CAAC,QAAQ,EACd,SAAS,EACT,KAAK,CAAC,aAAa,CACpB;SACF;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,IAAI,EAAE,eAAe;YACrB,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;;;UAIjB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC;;OAEjC;SACF;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;;;;;;;;;;;OAYpB;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AA1JW,QAAA,8BAA8B,kCA0JzC"}
1
+ {"version":3,"file":"transformRealizeWriteHistories.js","sourceRoot":"","sources":["../../../../src/orchestrate/realize/histories/transformRealizeWriteHistories.ts"],"names":[],"mappings":";;;AAEA,yCAA2C;AAC3C,+BAA0B;AAK1B,sFAAmF;AACnF,gFAA6E;AAC7E,iHAA8G;AAEvG,MAAM,8BA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AI,EAAE,eAAe;YACrB,IAAI,EAAE,iuJAAkD,UAAU,CAChE,iBAAiB,EACjB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAC3C;iBACE,UAAU,CACT,SAAS,EACT,IAAA,mDAAwB,EAAC,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CACzD;iBACA,UAAU,CAAC,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SAC5D;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,IAAI,EAAE,eAAe;YACrB,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,IAAA,yDAA2B,EAAC;gBAChC,aAAa,EAAE,KAAK,CAAC,aAAa;gBAClC,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,OAAO;gBACpC,SAAS;aACV,CAAC;SACH;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,IAAI,EAAE,eAAe;YACrB,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;;;UAIjB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC;;OAEjC;SACF;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;;;;;;;;;;;OAYpB;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AA5JW,QAAA,8BAA8B,kCA4JzC"}
@@ -26,7 +26,7 @@ function compileRealizeFiles(ctx, props) {
26
26
  const compiled = yield compiler.typescript.compile({
27
27
  files: files,
28
28
  });
29
- const event = {
29
+ return {
30
30
  type: "realizeValidate",
31
31
  id: (0, uuid_1.v7)(),
32
32
  files: files,
@@ -34,7 +34,6 @@ function compileRealizeFiles(ctx, props) {
34
34
  step: (_c = (_b = ctx.state().analyze) === null || _b === void 0 ? void 0 : _b.step) !== null && _c !== void 0 ? _c : 0,
35
35
  created_at: new Date().toISOString(),
36
36
  };
37
- return event;
38
37
  });
39
38
  }
40
39
  //# sourceMappingURL=compileRealizeFiles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"compileRealizeFiles.js","sourceRoot":"","sources":["../../../../src/orchestrate/realize/internal/compileRealizeFiles.ts"],"names":[],"mappings":";;;;;;;;;;;AAYA,kDAqDC;AAzDD,+BAA0B;AAI1B,SAAsB,mBAAmB,CACvC,GAAyB,EACzB,KAGC;;;QAED,MAAM,MAAM,GAAG,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,MAAM,0CAAE,QAAQ,CAAC;QAC5C,MAAM,QAAQ,GAA2B,MAAM,CAAC,WAAW,CACzD,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAC5E,CAAC;QACF,MAAM,QAAQ,GAAoB,MAAM,GAAG,CAAC,QAAQ,EAAE,CAAC;QACvD,MAAM,aAAa,GACjB,MAAM,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC;YACjC,IAAI,EAAE,QAAQ;SACf,CAAC,CAAC;QACL,MAAM,WAAW,GACf,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,MAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;QAEvD,MAAM,aAAa,GAAG,CAAC,QAAgB,EAAE,EAAE,CACzC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAE1D,MAAM,KAAK,6EACN,WAAW,GACX,QAAQ,GACR,MAAM,CAAC,WAAW,CACnB,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CACnE,aAAa,CAAC,GAAG,CAAC,CACnB,CACF,GACE,MAAM,CAAC,WAAW,CACnB,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CACpE,GACE,MAAM,CAAC,WAAW,CACnB,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CACvD,CACF,CAAC;QAEF,MAAM,QAAQ,GACZ,MAAM,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC;YAChC,KAAK,EAAE,KAAK;SACb,CAAC,CAAC;QAEL,MAAM,KAAK,GAA+B;YACxC,IAAI,EAAE,iBAAiB;YACvB,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,0CAAE,IAAI,mCAAI,CAAC;YACpC,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACrC,CAAC;QAEF,OAAO,KAAK,CAAC;IACf,CAAC;CAAA"}
1
+ {"version":3,"file":"compileRealizeFiles.js","sourceRoot":"","sources":["../../../../src/orchestrate/realize/internal/compileRealizeFiles.ts"],"names":[],"mappings":";;;;;;;;;;;AAYA,kDAiDC;AArDD,+BAA0B;AAI1B,SAAsB,mBAAmB,C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AAC,WAAW,CACnB,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CACvD,CACF,CAAC;QACF,MAAM,QAAQ,GACZ,MAAM,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC;YAChC,KAAK,EAAE,KAAK;SACb,CAAC,CAAC;QACL,OAAO;YACL,IAAI,EAAE,iBAAiB;YACvB,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,0CAAE,IAAI,mCAAI,CAAC;YACpC,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACrC,CAAC;IACJ,CAAC;CAAA"}
@@ -1,4 +1,5 @@
1
1
  import { AutoBeProgressEventBase, AutoBeRealizeAuthorization, AutoBeRealizeFunction } from "@autobe/interface";
2
2
  import { ILlmSchema } from "@samchon/openapi";
3
3
  import { AutoBeContext } from "../../context/AutoBeContext";
4
- export declare const orchestrateRealizeCorrectCasting: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, authorizations: AutoBeRealizeAuthorization[], functions: AutoBeRealizeFunction[], progress: AutoBeProgressEventBase, life?: number) => Promise<AutoBeRealizeFunction[]>;
4
+ import { IAutoBeRealizeScenarioResult } from "./structures/IAutoBeRealizeScenarioResult";
5
+ export declare const orchestrateRealizeCorrectCasting: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, scenarios: IAutoBeRealizeScenarioResult[], authorizations: AutoBeRealizeAuthorization[], functions: AutoBeRealizeFunction[], progress: AutoBeProgressEventBase, life?: number) => Promise<AutoBeRealizeFunction[]>;
@@ -54,22 +54,24 @@ const assertSchemaModel_1 = require("../../context/assertSchemaModel");
54
54
  const executeCachedBatch_1 = require("../../utils/executeCachedBatch");
55
55
  const transformRealizeCorrectCastingHistories_1 = require("./histories/transformRealizeCorrectCastingHistories");
56
56
  const compileRealizeFiles_1 = require("./internal/compileRealizeFiles");
57
- const orchestrateRealizeCorrectCasting = (ctx_1, authorizations_1, functions_1, progress_1, ...args_1) => __awaiter(void 0, [ctx_1, authorizations_1, functions_1, progress_1, ...args_1], void 0, function* (ctx, authorizations, functions, progress, life = ctx.retry) {
57
+ const getRealizeWriteCodeTemplate_1 = require("./utils/getRealizeWriteCodeTemplate");
58
+ const replaceImportStatements_1 = require("./utils/replaceImportStatements");
59
+ const orchestrateRealizeCorrectCasting = (ctx_1, scenarios_1, authorizations_1, functions_1, progress_1, ...args_1) => __awaiter(void 0, [ctx_1, scenarios_1, authorizations_1, functions_1, progress_1, ...args_1], void 0, function* (ctx, scenarios, authorizations, functions, progress, life = ctx.retry) {
58
60
  const validateEvent = yield (0, compileRealizeFiles_1.compileRealizeFiles)(ctx, {
59
61
  authorizations,
60
62
  functions,
61
63
  });
62
- return predicate(ctx, authorizations, functions, [], progress, validateEvent, life);
64
+ return predicate(ctx, scenarios, authorizations, functions, [], progress, validateEvent, life);
63
65
  });
64
66
  exports.orchestrateRealizeCorrectCasting = orchestrateRealizeCorrectCasting;
65
- const predicate = (ctx, authorizations, functions, failures, progress, event, life) => __awaiter(void 0, void 0, void 0, function* () {
67
+ const predicate = (ctx, scenarios, authorizations, functions, failures, progress, event, life) => __awaiter(void 0, void 0, void 0, function* () {
66
68
  if (event.result.type === "failure") {
67
69
  ctx.dispatch(event);
68
- return yield correct(ctx, authorizations, functions, [...failures, ...event.result.diagnostics], progress, event, life);
70
+ return yield correct(ctx, scenarios, authorizations, functions, [...failures, ...event.result.diagnostics], progress, event, life);
69
71
  }
70
72
  return functions;
71
73
  });
72
- const correct = (ctx, authorizations, functions, failures, progress, event, life) => __awaiter(void 0, void 0, void 0, function* () {
74
+ const correct = (ctx, scenarios, authorizations, functions, failures, progress, event, life) => __awaiter(void 0, void 0, void 0, function* () {
73
75
  // Early returns for non-correctable cases
74
76
  if (event.result.type !== "failure" || life < 0) {
75
77
  return functions;
@@ -81,8 +83,11 @@ const correct = (ctx, authorizations, functions, failures, progress, event, life
81
83
  }
82
84
  progress.total += locations.length;
83
85
  const converted = yield (0, executeCachedBatch_1.executeCachedBatch)(locations.map((location) => () => __awaiter(void 0, void 0, void 0, function* () {
84
- var _a, _b;
86
+ var _a, _b, _c, _d;
85
87
  const func = functions.find((f) => f.location === location);
88
+ const scenario = scenarios.find((s) => s.location === func.location);
89
+ const operation = scenario.operation;
90
+ const authorization = authorizations.find((a) => a.role.name === operation.authorizationRole);
86
91
  const pointer = {
87
92
  value: null,
88
93
  };
@@ -115,6 +120,35 @@ const correct = (ctx, authorizations, functions, failures, progress, event, life
115
120
 
116
121
  You don't need to explain me anything, but just fix or give it up
117
122
  immediately without any hesitation, explanation, and questions.
123
+
124
+ The instruction to write at first was as follows, and the code you received is the code you wrote according to this instruction.
125
+ When modifying, modify the entire code, but not the import statement.
126
+
127
+ Below is template code you wrote:
128
+
129
+ ${(0, getRealizeWriteCodeTemplate_1.getRealizeWriteCodeTemplate)({
130
+ scenario,
131
+ schemas: ctx.state().interface.document.components.schemas,
132
+ operation: scenario.operation,
133
+ authorization: authorization !== null && authorization !== void 0 ? authorization : null,
134
+ })}
135
+
136
+ Current code is as follows:
137
+
138
+ \`\`\`typescript
139
+ ${func.content}
140
+ \`\`\`
141
+
142
+ Also, never use typia.assert and typia.assertGuard like functions
143
+ to the Prisma types. Your mission is to fix the casting problem of
144
+ primitive types like string or number. Prisma type is not your scope.
145
+
146
+ If you take a mistake that casting the Prisma type with the typia.assert
147
+ function, it would be fallen into the infinite compilation due to extremely
148
+ complicated Prisma type. Note that, the typia.assert function is allowed
149
+ only in the individual property level string or literal type.
150
+
151
+ I repeat that, never assert the Prisma type. It's not your mission.
118
152
  `,
119
153
  });
120
154
  ++progress.completed;
@@ -122,29 +156,49 @@ const correct = (ctx, authorizations, functions, failures, progress, event, life
122
156
  return { result: "exception", func: func };
123
157
  else if (pointer.value === false)
124
158
  return { result: "ignore", func: func };
159
+ pointer.value.draft = yield (0, replaceImportStatements_1.replaceImportStatements)(ctx, {
160
+ schemas: ctx.state().interface.document.components.schemas,
161
+ operation: operation,
162
+ code: pointer.value.draft,
163
+ decoratorType: authorization === null || authorization === void 0 ? void 0 : authorization.payload.name,
164
+ });
165
+ if (pointer.value.revise.final)
166
+ pointer.value.revise.final = yield (0, replaceImportStatements_1.replaceImportStatements)(ctx, {
167
+ schemas: ctx.state().interface.document.components.schemas,
168
+ operation: operation,
169
+ code: pointer.value.revise.final,
170
+ decoratorType: authorization === null || authorization === void 0 ? void 0 : authorization.payload.name,
171
+ });
125
172
  ctx.dispatch({
126
173
  id: (0, uuid_1.v7)(),
127
174
  type: "realizeCorrect",
128
- content: pointer.value.revise.final,
175
+ content: (_a = pointer.value.revise.final) !== null && _a !== void 0 ? _a : pointer.value.draft,
129
176
  created_at: new Date().toISOString(),
130
177
  location: func.location,
131
- step: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
178
+ step: (_c = (_b = ctx.state().analyze) === null || _b === void 0 ? void 0 : _b.step) !== null && _c !== void 0 ? _c : 0,
132
179
  tokenUsage,
133
180
  completed: progress.completed,
134
181
  total: progress.total,
135
182
  });
136
183
  return {
137
184
  result: "success",
138
- func: Object.assign(Object.assign({}, func), { content: pointer.value.revise.final }),
185
+ func: Object.assign(Object.assign({}, func), { content: (_d = pointer.value.revise.final) !== null && _d !== void 0 ? _d : pointer.value.draft }),
139
186
  };
140
187
  })));
188
+ // Get functions that were not modified (not in locations array)
189
+ const unchangedFunctions = functions.filter((f) => !locations.includes(f.location));
190
+ // Merge converted functions with unchanged functions for validation
191
+ const allFunctionsForValidation = [
192
+ ...converted.map((c) => c.func),
193
+ ...unchangedFunctions,
194
+ ];
141
195
  const newValidate = yield (0, compileRealizeFiles_1.compileRealizeFiles)(ctx, {
142
196
  authorizations,
143
- functions: converted.map((c) => c.func),
197
+ functions: allFunctionsForValidation,
144
198
  });
145
199
  const newResult = newValidate.result;
146
200
  if (newResult.type === "success") {
147
- return converted.map((c) => c.func);
201
+ return allFunctionsForValidation;
148
202
  }
149
203
  else if (newResult.type === "exception") {
150
204
  // Compilation exception, return current functions. because retrying won't help.
@@ -152,14 +206,14 @@ const correct = (ctx, authorizations, functions, failures, progress, event, life
152
206
  }
153
207
  if (newResult.diagnostics.every((d) => { var _a; return !((_a = d.file) === null || _a === void 0 ? void 0 : _a.startsWith("src/providers")); })) {
154
208
  // No diagnostics related to provider functions, stop correcting
155
- return converted.map((c) => c.func);
209
+ return allFunctionsForValidation;
156
210
  }
157
211
  const newLocations = diagnose(newValidate);
158
212
  // Separate successful, failed, and ignored corrections
159
213
  const { success, failed, ignored } = separateCorrectionResults(converted, newLocations);
160
- // If no failures to retry, return success and ignored functions
214
+ // If no failures to retry, return all functions
161
215
  if (failed.length === 0) {
162
- return [...success, ...ignored];
216
+ return [...success, ...ignored, ...unchangedFunctions];
163
217
  }
164
218
  // Collect diagnostics relevant to failed functions
165
219
  const failedLocations = failed.map((f) => f.location);
@@ -169,11 +223,8 @@ const correct = (ctx, authorizations, functions, failures, progress, event, life
169
223
  ];
170
224
  const relevantDiagnostics = filterRelevantDiagnostics(allDiagnostics, failedLocations);
171
225
  // Recursively retry failed functions
172
- const retriedFunctions = yield predicate(ctx, authorizations, failed, relevantDiagnostics, progress, newValidate, life - 1);
173
- // Get functions that were not modified (not in converted array)
174
- const convertedLocations = converted.map(c => c.func.location);
175
- const unchanged = functions.filter(f => !convertedLocations.includes(f.location));
176
- return [...success, ...ignored, ...retriedFunctions, ...unchanged];
226
+ const retriedFunctions = yield predicate(ctx, scenarios, authorizations, failed, relevantDiagnostics, progress, newValidate, life - 1);
227
+ return [...success, ...ignored, ...retriedFunctions, ...unchangedFunctions];
177
228
  });
178
229
  /**
179
230
  * Extract unique file locations from validation event diagnostics
@@ -250,11 +301,11 @@ const collection = {
250
301
  {
251
302
  name: "rewrite",
252
303
  parameters: {
253
- description: " - The analysis and correction properties\n\n------------------------------\n\nDescription of the current {@link IAutoBeCommonCorrectCastingApplication.IProps} type:\n\n> Properties for the rewrite function containing the type casting error\n> analysis and correction workflow.\n\n### Description of {@link revise} property:\n\n> Review and finalization of type casting corrections.\n> \n> Contains the review of applied corrections and the final code with all\n> type casting issues resolved while preserving type safety and validation intent.",
304
+ description: " - The analysis and correction properties\n\n------------------------------\n\nCurrent Type: {@link IAutoBeCommonCorrectCastingApplication.IProps}\n\n### Description of {@link revise} property:\n\n> Review and finalization of type casting corrections.\n> \n> Contains the review of applied corrections and the final code with all\n> type casting issues resolved while preserving type safety and validation\n> intent.",
254
305
  type: "object",
255
306
  properties: {
256
307
  think: {
257
- description: "Initial analysis of the type casting or assignment error.\n\nContains the agent's analysis of the specific type mismatch pattern:\n\n- Type of casting error (tag incompatibility, nullable assignment, literal \n type conversion, etc.)\n- Whether nullable or undefined types are involved\n- If Date to string conversions are needed\n- The chosen fix strategy for the specific error type",
308
+ description: "Initial analysis of the type casting or assignment error.\n\nContains the agent's analysis of the specific type mismatch pattern:\n\n- Type of casting error (tag incompatibility, nullable assignment, literal\n type conversion, etc.)\n- Whether nullable or undefined types are involved\n- If Date to string conversions are needed\n- The chosen fix strategy for the specific error type",
258
309
  type: "string"
259
310
  },
260
311
  draft: {
@@ -273,7 +324,6 @@ const collection = {
273
324
  additionalProperties: false,
274
325
  $defs: {
275
326
  "IAutoBeCommonCorrectCastingApplication.IReviseProps": {
276
- description: "Properties for the revision phase of type casting corrections.",
277
327
  type: "object",
278
328
  properties: {
279
329
  review: {
@@ -281,8 +331,15 @@ const collection = {
281
331
  type: "string"
282
332
  },
283
333
  final: {
284
- description: "Final corrected code with all type casting issues resolved.\n\nThe complete code ready for TypeScript compilation, with all type casting\nand assignment errors properly fixed using appropriate patterns while\nmaintaining type safety and the original validation logic.",
285
- type: "string"
334
+ description: "Final corrected code with all type casting issues resolved.\n\nThe complete code ready for TypeScript compilation, with all type casting\nand assignment errors properly fixed using appropriate patterns while\nmaintaining type safety and the original validation logic. When the draft\nalready successfully resolves all type casting issues with no problems\nfound during review, this value can be null, indicating no further\nrefinements are necessary.\n\nA `null` value signifies the draft corrections were already optimal and\nrequire no additional modifications.",
335
+ anyOf: [
336
+ {
337
+ type: "null"
338
+ },
339
+ {
340
+ type: "string"
341
+ }
342
+ ]
286
343
  }
287
344
  },
288
345
  required: [
@@ -292,8 +349,8 @@ const collection = {
292
349
  }
293
350
  }
294
351
  },
295
- description: "Rewrite function to fix type casting and assignment errors.\n\nThis function is called when the agent detects any type casting or assignment\nrelated compilation error patterns.\n\nThe agent applies various fix strategies based on the error type:\n\n- **Typia tag incompatibilities**: Uses `satisfies ... as ...` pattern to strip \n incompatible tags, or `typia.assert<T>()` as a last resort\n- **Date conversions**: Uses `.toISOString()` method for Date to string conversions\n- **Nullable type narrowing**: Applies exhaustive checks (e.g., !== null && !== undefined)\n- **typia.assert vs assertGuard**: Uses assert for value assignment, assertGuard \n for type narrowing\n- **Literal type conversions**: Uses `typia.assert<T>()` for runtime validation\n- **Optional chaining results**: Uses `=== true` or `??` operators\n- **\"No overlap\" errors**: Removes redundant comparisons",
296
- 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, {
352
+ description: "Rewrite function to fix type casting and assignment errors.\n\nThis function is called when the agent detects any type casting or\nassignment related compilation error patterns.\n\nThe agent applies various fix strategies based on the error type:\n\n- **Typia tag incompatibilities**: Uses `satisfies ... as ...` pattern to\n strip incompatible tags, or `typia.assert<T>()` as a last resort\n- **Date conversions**: Uses `.toISOString()` method for Date to string\n conversions\n- **Nullable type narrowing**: Applies exhaustive checks (e.g., !== null &&\n !== undefined)\n- **typia.assert vs assertGuard**: Uses assert for value assignment,\n assertGuard for type narrowing\n- **Literal type conversions**: Uses `typia.assert<T>()` for runtime\n validation\n- **Optional chaining results**: Uses `=== true` or `??` operators\n- **\"No overlap\" errors**: Removes redundant comparisons",
353
+ 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, {
297
354
  path: _path + ".think",
298
355
  expected: "string",
299
356
  value: input.think
@@ -313,9 +370,9 @@ const collection = {
313
370
  path: _path + ".review",
314
371
  expected: "string",
315
372
  value: input.review
316
- }), "string" === typeof input.final || _report(_exceptionable, {
373
+ }), null === input.final || "string" === typeof input.final || _report(_exceptionable, {
317
374
  path: _path + ".final",
318
- expected: "string",
375
+ expected: "(null | string)",
319
376
  value: input.final
320
377
  })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
321
378
  if (false === __is(input)) {
@@ -355,7 +412,7 @@ const collection = {
355
412
  required: [],
356
413
  $defs: {}
357
414
  },
358
- description: "Reject function when error is not related to type casting or assignment.\n\nThis function is called when the compilation error is unrelated to type \ncasting issues (e.g., missing imports, syntax errors, undefined variables), \nindicating the error should be handled by a different agent.",
415
+ description: "Reject function when error is not related to type casting or assignment.\n\nThis function is called when the compilation error is unrelated to type\ncasting issues (e.g., missing imports, syntax errors, undefined variables),\nindicating the error should be handled by a different agent.",
359
416
  validate: (() => { const __is = input => true; let errors; let _report; return input => {
360
417
  if (false === __is(input)) {
361
418
  errors = [];
@@ -389,11 +446,11 @@ const collection = {
389
446
  {
390
447
  name: "rewrite",
391
448
  parameters: {
392
- description: " - The analysis and correction properties\n\n------------------------------\n\nDescription of the current {@link IAutoBeCommonCorrectCastingApplication.IProps} type:\n\n> Properties for the rewrite function containing the type casting error\n> analysis and correction workflow.",
449
+ description: " - The analysis and correction properties\n\n------------------------------\n\nCurrent Type: {@link IAutoBeCommonCorrectCastingApplication.IProps}",
393
450
  type: "object",
394
451
  properties: {
395
452
  think: {
396
- description: "Initial analysis of the type casting or assignment error.\n\nContains the agent's analysis of the specific type mismatch pattern:\n\n- Type of casting error (tag incompatibility, nullable assignment, literal \n type conversion, etc.)\n- Whether nullable or undefined types are involved\n- If Date to string conversions are needed\n- The chosen fix strategy for the specific error type",
453
+ description: "Initial analysis of the type casting or assignment error.\n\nContains the agent's analysis of the specific type mismatch pattern:\n\n- Type of casting error (tag incompatibility, nullable assignment, literal\n type conversion, etc.)\n- Whether nullable or undefined types are involved\n- If Date to string conversions are needed\n- The chosen fix strategy for the specific error type",
397
454
  type: "string"
398
455
  },
399
456
  draft: {
@@ -401,7 +458,7 @@ const collection = {
401
458
  type: "string"
402
459
  },
403
460
  revise: {
404
- description: "Review and finalization of type casting corrections.\n\nContains the review of applied corrections and the final code with all\ntype casting issues resolved while preserving type safety and validation intent.",
461
+ description: "Review and finalization of type casting corrections.\n\nContains the review of applied corrections and the final code with all\ntype casting issues resolved while preserving type safety and validation\nintent.",
405
462
  $ref: "#/$defs/IAutoBeCommonCorrectCastingApplication.IReviseProps"
406
463
  }
407
464
  },
@@ -413,7 +470,6 @@ const collection = {
413
470
  additionalProperties: false,
414
471
  $defs: {
415
472
  "IAutoBeCommonCorrectCastingApplication.IReviseProps": {
416
- description: "Properties for the revision phase of type casting corrections.",
417
473
  type: "object",
418
474
  properties: {
419
475
  review: {
@@ -421,8 +477,15 @@ const collection = {
421
477
  type: "string"
422
478
  },
423
479
  final: {
424
- description: "Final corrected code with all type casting issues resolved.\n\nThe complete code ready for TypeScript compilation, with all type casting\nand assignment errors properly fixed using appropriate patterns while\nmaintaining type safety and the original validation logic.",
425
- type: "string"
480
+ description: "Final corrected code with all type casting issues resolved.\n\nThe complete code ready for TypeScript compilation, with all type casting\nand assignment errors properly fixed using appropriate patterns while\nmaintaining type safety and the original validation logic. When the draft\nalready successfully resolves all type casting issues with no problems\nfound during review, this value can be null, indicating no further\nrefinements are necessary.\n\nA `null` value signifies the draft corrections were already optimal and\nrequire no additional modifications.",
481
+ oneOf: [
482
+ {
483
+ type: "null"
484
+ },
485
+ {
486
+ type: "string"
487
+ }
488
+ ]
426
489
  }
427
490
  },
428
491
  required: [
@@ -432,8 +495,8 @@ const collection = {
432
495
  }
433
496
  }
434
497
  },
435
- description: "Rewrite function to fix type casting and assignment errors.\n\nThis function is called when the agent detects any type casting or assignment\nrelated compilation error patterns.\n\nThe agent applies various fix strategies based on the error type:\n\n- **Typia tag incompatibilities**: Uses `satisfies ... as ...` pattern to strip \n incompatible tags, or `typia.assert<T>()` as a last resort\n- **Date conversions**: Uses `.toISOString()` method for Date to string conversions\n- **Nullable type narrowing**: Applies exhaustive checks (e.g., !== null && !== undefined)\n- **typia.assert vs assertGuard**: Uses assert for value assignment, assertGuard \n for type narrowing\n- **Literal type conversions**: Uses `typia.assert<T>()` for runtime validation\n- **Optional chaining results**: Uses `=== true` or `??` operators\n- **\"No overlap\" errors**: Removes redundant comparisons",
436
- 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, {
498
+ description: "Rewrite function to fix type casting and assignment errors.\n\nThis function is called when the agent detects any type casting or\nassignment related compilation error patterns.\n\nThe agent applies various fix strategies based on the error type:\n\n- **Typia tag incompatibilities**: Uses `satisfies ... as ...` pattern to\n strip incompatible tags, or `typia.assert<T>()` as a last resort\n- **Date conversions**: Uses `.toISOString()` method for Date to string\n conversions\n- **Nullable type narrowing**: Applies exhaustive checks (e.g., !== null &&\n !== undefined)\n- **typia.assert vs assertGuard**: Uses assert for value assignment,\n assertGuard for type narrowing\n- **Literal type conversions**: Uses `typia.assert<T>()` for runtime\n validation\n- **Optional chaining results**: Uses `=== true` or `??` operators\n- **\"No overlap\" errors**: Removes redundant comparisons",
499
+ 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, {
437
500
  path: _path + ".think",
438
501
  expected: "string",
439
502
  value: input.think
@@ -453,9 +516,9 @@ const collection = {
453
516
  path: _path + ".review",
454
517
  expected: "string",
455
518
  value: input.review
456
- }), "string" === typeof input.final || _report(_exceptionable, {
519
+ }), null === input.final || "string" === typeof input.final || _report(_exceptionable, {
457
520
  path: _path + ".final",
458
- expected: "string",
521
+ expected: "(null | string)",
459
522
  value: input.final
460
523
  })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
461
524
  if (false === __is(input)) {
@@ -495,7 +558,7 @@ const collection = {
495
558
  required: [],
496
559
  $defs: {}
497
560
  },
498
- description: "Reject function when error is not related to type casting or assignment.\n\nThis function is called when the compilation error is unrelated to type \ncasting issues (e.g., missing imports, syntax errors, undefined variables), \nindicating the error should be handled by a different agent.",
561
+ description: "Reject function when error is not related to type casting or assignment.\n\nThis function is called when the compilation error is unrelated to type\ncasting issues (e.g., missing imports, syntax errors, undefined variables),\nindicating the error should be handled by a different agent.",
499
562
  validate: (() => { const __is = input => true; let errors; let _report; return input => {
500
563
  if (false === __is(input)) {
501
564
  errors = [];
@@ -1 +1 @@
1
- {"version":3,"file":"orchestRateRealizeCorrectCasting.js","sourceRoot":"","sources":["../../../src/orchestrate/realize/orchestRateRealizeCorrectCasting.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,yCAA2C;AAG3C,kDAA0B;AAC1B,+BAA0B;AAG1B,uEAAoE;AACpE,uEAAoE;AAEpE,iHAA8G;AAC9G,wEAAqE;AAQ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AAC,CAAC,SAAS,CAAC,CAAC,CAAC,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;SAC+C;KACnD,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG;IACjB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAGJ;IACH,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAGH;CACJ,CAAC"}
1
+ {"version":3,"file":"orchestRateRealizeCorrectCasting.js","sourceRoot":"","sources":["../../../src/orchestrate/realize/orchestRateRealizeCorrectCasting.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,yCAA2C;AAG3C,kDAA0B;AAC1B,+BAA0B;AAG1B,uEAAoE;AACpE,uEAAoE;AAEpE,iHAA8G;AAC9G,wEAAqE;AAErE,qFAAkF;AAClF,6EAA0E;AAQnE,MAAM,gCAAgC,GAAG,2EASZ,EAAE,kHANpC,GAAyB,EACzB,SAAyC,EACzC,cAA4C,EAC5C,SAAkC,EAClC,QAAiC,EACjC,OAAe,GAAG,CAAC,KAAK;IAExB,MAAM,aAAa,G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,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,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;SAC+C;KACnD,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG;IACjB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAGJ;IACH,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAGH;CACJ,CAAC"}
@@ -22,8 +22,8 @@ const generateRealizeScenario_1 = require("./utils/generateRealizeScenario");
22
22
  const orchestrateRealize = (ctx) => (props) => __awaiter(void 0, void 0, void 0, function* () {
23
23
  var _a, _b, _c, _d, _e;
24
24
  // PREDICATION
25
- const operations = (_a = ctx.state().interface) === null || _a === void 0 ? void 0 : _a.document.operations;
26
- if (!operations)
25
+ const document = (_a = ctx.state().interface) === null || _a === void 0 ? void 0 : _a.document;
26
+ if (document === undefined)
27
27
  throw new Error("Can't do realize agent because operations are nothing.");
28
28
  const start = new Date();
29
29
  const predicate = (0, predicateStateMessage_1.predicateStateMessage)(ctx.state(), "realize");
@@ -42,67 +42,101 @@ const orchestrateRealize = (ctx) => (props) => __awaiter(void 0, void 0, void 0,
42
42
  reason: props.instruction,
43
43
  step: (_c = (_b = ctx.state().test) === null || _b === void 0 ? void 0 : _b.step) !== null && _c !== void 0 ? _c : 0,
44
44
  });
45
- // AUTHORIZATIONS
45
+ // PREPARE ASSETS
46
+ const compiler = yield ctx.compiler();
46
47
  const authorizations = yield (0, orchestrateRealizeAuthorization_1.orchestrateRealizeAuthorization)(ctx);
47
- // SCENARIOS
48
- const scenarios = operations.map((operation) => (0, generateRealizeScenario_1.generateRealizeScenario)(ctx, operation, authorizations));
49
48
  const writeProgress = {
50
- total: scenarios.length,
49
+ total: document.operations.length,
51
50
  completed: 0,
52
51
  };
53
- const writeEvents = yield (0, executeCachedBatch_1.executeCachedBatch)(scenarios.map((scenario) => (promptCacheKey) => __awaiter(void 0, void 0, void 0, function* () {
54
- var _a;
55
- const props = {
56
- totalAuthorizations: authorizations,
57
- authorization: (_a = scenario.decoratorEvent) !== null && _a !== void 0 ? _a : null,
58
- scenario,
59
- progress: writeProgress,
60
- promptCacheKey,
61
- };
62
- const code = yield (0, orchestrateRealizeWrite_1.orchestrateRealizeWrite)(ctx, props).catch(() => {
63
- return (0, orchestrateRealizeWrite_1.orchestrateRealizeWrite)(ctx, props).catch(() => null);
52
+ const correctProgress = {
53
+ total: document.operations.length,
54
+ completed: 0,
55
+ };
56
+ const process = (artifacts) => __awaiter(void 0, void 0, void 0, function* () {
57
+ const writes = (yield (0, executeCachedBatch_1.executeCachedBatch)(artifacts.map((art) => (promptCacheKey) => __awaiter(void 0, void 0, void 0, function* () {
58
+ var _a;
59
+ const write = () => __awaiter(void 0, void 0, void 0, function* () {
60
+ var _a;
61
+ try {
62
+ return yield (0, orchestrateRealizeWrite_1.orchestrateRealizeWrite)(ctx, {
63
+ totalAuthorizations: authorizations,
64
+ authorization: (_a = art.decoratorEvent) !== null && _a !== void 0 ? _a : null,
65
+ scenario: art,
66
+ document,
67
+ progress: writeProgress,
68
+ promptCacheKey,
69
+ });
70
+ }
71
+ catch (_b) {
72
+ return null;
73
+ }
74
+ });
75
+ return (_a = (yield write())) !== null && _a !== void 0 ? _a : (yield write());
76
+ })))).filter((w) => w !== null);
77
+ const functions = Object.entries(Object.fromEntries(writes.map((w) => [w.location, w.content]))).map(([location, content]) => {
78
+ const scenario = artifacts.find((el) => el.location === location);
79
+ return {
80
+ location,
81
+ content,
82
+ endpoint: {
83
+ method: scenario.operation.method,
84
+ path: scenario.operation.path,
85
+ },
86
+ name: scenario.functionName,
87
+ };
88
+ });
89
+ const corrected = yield (0, orchestRateRealizeCorrectCasting_1.orchestrateRealizeCorrectCasting)(ctx, artifacts, authorizations, functions, correctProgress).then((res) => __awaiter(void 0, void 0, void 0, function* () {
90
+ return yield (0, orchestrateRealizeCorrect_1.orchestrateRealizeCorrect)(ctx, artifacts, authorizations, res, [], correctProgress);
91
+ }));
92
+ const validate = yield (0, compileRealizeFiles_1.compileRealizeFiles)(ctx, {
93
+ authorizations,
94
+ functions: corrected,
64
95
  });
65
- return code;
66
- })));
67
- const functions = Object.entries(Object.fromEntries(writeEvents
68
- .filter((w) => w !== null)
69
- .map((event) => [event.location, event.content]))).map(([location, content]) => {
70
- const scenario = scenarios.find((el) => el.location === location);
71
96
  return {
72
- location,
73
- content,
74
- endpoint: {
75
- method: scenario.operation.method,
76
- path: scenario.operation.path,
77
- },
78
- name: scenario.functionName,
97
+ corrected,
98
+ validate,
79
99
  };
80
100
  });
81
- const reviewProgress = {
82
- total: writeEvents.length,
83
- completed: writeEvents.length,
84
- };
85
- const totalCorrected = yield (0, orchestRateRealizeCorrectCasting_1.orchestrateRealizeCorrectCasting)(ctx, authorizations, functions, reviewProgress).then((res) => __awaiter(void 0, void 0, void 0, function* () {
86
- return (0, orchestrateRealizeCorrect_1.orchestrateRealizeCorrect)(ctx, scenarios, authorizations, res, [], reviewProgress);
87
- }));
88
- const compiler = yield ctx.compiler();
101
+ // SCENARIOS
102
+ const entireScenarios = document.operations.map((operation) => (0, generateRealizeScenario_1.generateRealizeScenario)(ctx, operation, authorizations));
103
+ let bucket = yield process(entireScenarios);
104
+ for (let i = 0; i < 2; ++i) {
105
+ if (bucket.validate.result.type !== "failure")
106
+ break;
107
+ const failedScenarios = Array.from(new Set(bucket.validate.result.diagnostics.map((f) => f.file)))
108
+ .map((location) => bucket.corrected.find((f) => f.location === location))
109
+ .filter((f) => f !== undefined)
110
+ .map((f) => entireScenarios.find((s) => s.operation.path === f.endpoint.path &&
111
+ s.operation.method === f.endpoint.method))
112
+ .filter((o) => o !== undefined);
113
+ if (failedScenarios.length === 0)
114
+ break;
115
+ writeProgress.total += failedScenarios.length;
116
+ correctProgress.total += failedScenarios.length;
117
+ const newBucket = yield process(failedScenarios);
118
+ const corrected = new Map([
119
+ ...bucket.corrected.map((f) => [f.location, f]),
120
+ ...newBucket.corrected.map((f) => [f.location, f]),
121
+ ]);
122
+ bucket = {
123
+ corrected: Array.from(corrected.values()),
124
+ validate: newBucket.validate,
125
+ };
126
+ }
89
127
  const controllers = yield compiler.realize.controller({
90
128
  document: ctx.state().interface.document,
91
- functions: totalCorrected,
92
- authorizations,
93
- });
94
- const { result } = yield (0, compileRealizeFiles_1.compileRealizeFiles)(ctx, {
129
+ functions: bucket.corrected,
95
130
  authorizations,
96
- functions: totalCorrected,
97
131
  });
98
132
  return ctx.dispatch({
99
133
  type: "realizeComplete",
100
134
  id: (0, uuid_1.v7)(),
101
135
  created_at: new Date().toISOString(),
102
- functions: totalCorrected,
136
+ functions: bucket.corrected,
103
137
  authorizations,
104
138
  controllers,
105
- compiled: result,
139
+ compiled: bucket.validate.result,
106
140
  step: (_e = (_d = ctx.state().analyze) === null || _d === void 0 ? void 0 : _d.step) !== null && _e !== void 0 ? _e : 0,
107
141
  elapsed: new Date().getTime() - start.getTime(),
108
142
  });
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrateRealize.js","sourceRoot":"","sources":["../../../src/orchestrate/realize/orchestrateRealize.ts"],"names":[],"mappings":";;;;;;;;;;;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