@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
@@ -169,7 +169,7 @@ const claude = {
169
169
  {
170
170
  name: "createDecorator",
171
171
  parameters: {
172
- description: " Properties containing provider, decorator, and payload type configurations\n\n------------------------------\n\nCurrent Type: {@link IAutoBeRealizeAuthorizationApplication.IProps}",
172
+ description: " Properties containing provider, decorator, and payload type\nconfigurations\n\n------------------------------\n\nCurrent Type: {@link IAutoBeRealizeAuthorizationApplication.IProps}",
173
173
  type: "object",
174
174
  properties: {
175
175
  provider: {
@@ -248,7 +248,7 @@ const claude = {
248
248
  }
249
249
  }
250
250
  },
251
- description: "Generates authentication provider, decorator, and payload type for role-based authorization.\n\nThis method creates a complete authentication infrastructure for a specific\nrole in the NestJS application. It generates three interconnected components\nthat work together to provide JWT-based authentication and authorization.\n\nThe generated components include:\n- **Provider Function**: Handles JWT verification and user validation from database\n- **Decorator**: NestJS parameter decorator for injecting authenticated user data\n- **Payload Type**: TypeScript interface defining the authenticated user structure\n\nAll components follow strict naming conventions and integrate with the existing\nauthentication architecture using the shared jwtAuthorize function.",
251
+ description: "Generates authentication provider, decorator, and payload type for\nrole-based authorization.\n\nThis method creates a complete authentication infrastructure for a specific\nrole in the NestJS application. It generates three interconnected\ncomponents that work together to provide JWT-based authentication and\nauthorization.\n\nThe generated components include:\n\n- **Provider Function**: Handles JWT verification and user validation from\n database\n- **Decorator**: NestJS parameter decorator for injecting authenticated user\n data\n- **Payload Type**: TypeScript interface defining the authenticated user\n structure\n\nAll components follow strict naming conventions and integrate with the\nexisting authentication architecture using the shared jwtAuthorize\nfunction.",
252
252
  validate: (() => { const _io0 = input => "object" === typeof input.provider && null !== input.provider && _io1(input.provider) && ("object" === typeof input.decorator && null !== input.decorator && _io2(input.decorator)) && ("object" === typeof input.payload && null !== input.payload && _io3(input.payload)); const _io1 = input => "string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) && "string" === typeof input.content; const _io2 = input => "string" === typeof input.name && RegExp("^[A-Z][a-zA-Z0-9]*$").test(input.name) && "string" === typeof input.content; const _io3 = input => "string" === typeof input.name && RegExp("^[A-Z][a-zA-Z0-9]*$").test(input.name) && "string" === typeof input.content; const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.provider && null !== input.provider || _report(_exceptionable, {
253
253
  path: _path + ".provider",
254
254
  expected: "IAutoBeRealizeAuthorizationApplication.IProvider",
@@ -275,11 +275,11 @@ const claude = {
275
275
  value: input.payload
276
276
  })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
277
277
  path: _path + ".name",
278
- expected: "string & CamelPattern",
278
+ expected: "string & CamelCasePattern",
279
279
  value: input.name
280
280
  })) || _report(_exceptionable, {
281
281
  path: _path + ".name",
282
- expected: "(string & CamelPattern)",
282
+ expected: "(string & CamelCasePattern)",
283
283
  value: input.name
284
284
  }), "string" === typeof input.content || _report(_exceptionable, {
285
285
  path: _path + ".content",
@@ -287,11 +287,11 @@ const claude = {
287
287
  value: input.content
288
288
  })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[A-Z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
289
289
  path: _path + ".name",
290
- expected: "string & PascalPattern",
290
+ expected: "string & PascalCasePattern",
291
291
  value: input.name
292
292
  })) || _report(_exceptionable, {
293
293
  path: _path + ".name",
294
- expected: "(string & PascalPattern)",
294
+ expected: "(string & PascalCasePattern)",
295
295
  value: input.name
296
296
  }), "string" === typeof input.content || _report(_exceptionable, {
297
297
  path: _path + ".content",
@@ -299,11 +299,11 @@ const claude = {
299
299
  value: input.content
300
300
  })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[A-Z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
301
301
  path: _path + ".name",
302
- expected: "string & PascalPattern",
302
+ expected: "string & PascalCasePattern",
303
303
  value: input.name
304
304
  })) || _report(_exceptionable, {
305
305
  path: _path + ".name",
306
- expected: "(string & PascalPattern)",
306
+ expected: "(string & PascalCasePattern)",
307
307
  value: input.name
308
308
  }), "string" === typeof input.content || _report(_exceptionable, {
309
309
  path: _path + ".content",
@@ -352,7 +352,7 @@ const collection = {
352
352
  {
353
353
  name: "createDecorator",
354
354
  parameters: {
355
- description: " Properties containing provider, decorator, and payload type configurations\n\n------------------------------\n\nCurrent Type: {@link IAutoBeRealizeAuthorizationApplication.IProps}\n\n### Description of {@link provider} property:\n\n> Authentication Provider function configuration containing the function\n> name and implementation code. The Provider handles JWT token\n> verification, role validation, and database queries to authenticate\n> users.\n\n### Description of {@link decorator} property:\n\n> Authentication Decorator configuration containing the decorator name and\n> implementation code. The Decorator integrates with NestJS parameter\n> decorators to automatically inject authenticated user data into\n> Controller methods.\n\n### Description of {@link payload} property:\n\n> Authentication Payload Type configuration containing the payload type\n> name and implementation code. The Payload Type is used to define the\n> structure of the authenticated user data that will be injected into\n> Controller methods when using the decorator. It serves as the TypeScript\n> type for the parameter in Controller method signatures.",
355
+ description: " Properties containing provider, decorator, and payload type\nconfigurations\n\n------------------------------\n\nCurrent Type: {@link IAutoBeRealizeAuthorizationApplication.IProps}\n\n### Description of {@link provider} property:\n\n> Authentication Provider function configuration containing the function\n> name and implementation code. The Provider handles JWT token\n> verification, role validation, and database queries to authenticate\n> users.\n\n### Description of {@link decorator} property:\n\n> Authentication Decorator configuration containing the decorator name and\n> implementation code. The Decorator integrates with NestJS parameter\n> decorators to automatically inject authenticated user data into\n> Controller methods.\n\n### Description of {@link payload} property:\n\n> Authentication Payload Type configuration containing the payload type\n> name and implementation code. The Payload Type is used to define the\n> structure of the authenticated user data that will be injected into\n> Controller methods when using the decorator. It serves as the TypeScript\n> type for the parameter in Controller method signatures.",
356
356
  type: "object",
357
357
  properties: {
358
358
  provider: {
@@ -425,7 +425,7 @@ const collection = {
425
425
  }
426
426
  }
427
427
  },
428
- description: "Generates authentication provider, decorator, and payload type for role-based authorization.\n\nThis method creates a complete authentication infrastructure for a specific\nrole in the NestJS application. It generates three interconnected components\nthat work together to provide JWT-based authentication and authorization.\n\nThe generated components include:\n- **Provider Function**: Handles JWT verification and user validation from database\n- **Decorator**: NestJS parameter decorator for injecting authenticated user data\n- **Payload Type**: TypeScript interface defining the authenticated user structure\n\nAll components follow strict naming conventions and integrate with the existing\nauthentication architecture using the shared jwtAuthorize function.",
428
+ description: "Generates authentication provider, decorator, and payload type for\nrole-based authorization.\n\nThis method creates a complete authentication infrastructure for a specific\nrole in the NestJS application. It generates three interconnected\ncomponents that work together to provide JWT-based authentication and\nauthorization.\n\nThe generated components include:\n\n- **Provider Function**: Handles JWT verification and user validation from\n database\n- **Decorator**: NestJS parameter decorator for injecting authenticated user\n data\n- **Payload Type**: TypeScript interface defining the authenticated user\n structure\n\nAll components follow strict naming conventions and integrate with the\nexisting authentication architecture using the shared jwtAuthorize\nfunction.",
429
429
  validate: (() => { const _io0 = input => "object" === typeof input.provider && null !== input.provider && _io1(input.provider) && ("object" === typeof input.decorator && null !== input.decorator && _io2(input.decorator)) && ("object" === typeof input.payload && null !== input.payload && _io3(input.payload)); const _io1 = input => "string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) && "string" === typeof input.content; const _io2 = input => "string" === typeof input.name && RegExp("^[A-Z][a-zA-Z0-9]*$").test(input.name) && "string" === typeof input.content; const _io3 = input => "string" === typeof input.name && RegExp("^[A-Z][a-zA-Z0-9]*$").test(input.name) && "string" === typeof input.content; const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.provider && null !== input.provider || _report(_exceptionable, {
430
430
  path: _path + ".provider",
431
431
  expected: "IAutoBeRealizeAuthorizationApplication.IProvider",
@@ -452,11 +452,11 @@ const collection = {
452
452
  value: input.payload
453
453
  })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
454
454
  path: _path + ".name",
455
- expected: "string & CamelPattern",
455
+ expected: "string & CamelCasePattern",
456
456
  value: input.name
457
457
  })) || _report(_exceptionable, {
458
458
  path: _path + ".name",
459
- expected: "(string & CamelPattern)",
459
+ expected: "(string & CamelCasePattern)",
460
460
  value: input.name
461
461
  }), "string" === typeof input.content || _report(_exceptionable, {
462
462
  path: _path + ".content",
@@ -464,11 +464,11 @@ const collection = {
464
464
  value: input.content
465
465
  })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[A-Z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
466
466
  path: _path + ".name",
467
- expected: "string & PascalPattern",
467
+ expected: "string & PascalCasePattern",
468
468
  value: input.name
469
469
  })) || _report(_exceptionable, {
470
470
  path: _path + ".name",
471
- expected: "(string & PascalPattern)",
471
+ expected: "(string & PascalCasePattern)",
472
472
  value: input.name
473
473
  }), "string" === typeof input.content || _report(_exceptionable, {
474
474
  path: _path + ".content",
@@ -476,11 +476,11 @@ const collection = {
476
476
  value: input.content
477
477
  })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[A-Z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
478
478
  path: _path + ".name",
479
- expected: "string & PascalPattern",
479
+ expected: "string & PascalCasePattern",
480
480
  value: input.name
481
481
  })) || _report(_exceptionable, {
482
482
  path: _path + ".name",
483
- expected: "(string & PascalPattern)",
483
+ expected: "(string & PascalCasePattern)",
484
484
  value: input.name
485
485
  }), "string" === typeof input.content || _report(_exceptionable, {
486
486
  path: _path + ".content",
@@ -252,11 +252,11 @@ const claude = {
252
252
  value: input.payload
253
253
  })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
254
254
  path: _path + ".name",
255
- expected: "string & CamelPattern",
255
+ expected: "string & CamelCasePattern",
256
256
  value: input.name
257
257
  })) || _report(_exceptionable, {
258
258
  path: _path + ".name",
259
- expected: "(string & CamelPattern)",
259
+ expected: "(string & CamelCasePattern)",
260
260
  value: input.name
261
261
  }), "string" === typeof input.content || _report(_exceptionable, {
262
262
  path: _path + ".content",
@@ -264,11 +264,11 @@ const claude = {
264
264
  value: input.content
265
265
  })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[A-Z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
266
266
  path: _path + ".name",
267
- expected: "string & PascalPattern",
267
+ expected: "string & PascalCasePattern",
268
268
  value: input.name
269
269
  })) || _report(_exceptionable, {
270
270
  path: _path + ".name",
271
- expected: "(string & PascalPattern)",
271
+ expected: "(string & PascalCasePattern)",
272
272
  value: input.name
273
273
  }), "string" === typeof input.content || _report(_exceptionable, {
274
274
  path: _path + ".content",
@@ -276,11 +276,11 @@ const claude = {
276
276
  value: input.content
277
277
  })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[A-Z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
278
278
  path: _path + ".name",
279
- expected: "string & PascalPattern",
279
+ expected: "string & PascalCasePattern",
280
280
  value: input.name
281
281
  })) || _report(_exceptionable, {
282
282
  path: _path + ".name",
283
- expected: "(string & PascalPattern)",
283
+ expected: "(string & PascalCasePattern)",
284
284
  value: input.name
285
285
  }), "string" === typeof input.content || _report(_exceptionable, {
286
286
  path: _path + ".content",
@@ -447,11 +447,11 @@ const collection = {
447
447
  value: input.payload
448
448
  })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
449
449
  path: _path + ".name",
450
- expected: "string & CamelPattern",
450
+ expected: "string & CamelCasePattern",
451
451
  value: input.name
452
452
  })) || _report(_exceptionable, {
453
453
  path: _path + ".name",
454
- expected: "(string & CamelPattern)",
454
+ expected: "(string & CamelCasePattern)",
455
455
  value: input.name
456
456
  }), "string" === typeof input.content || _report(_exceptionable, {
457
457
  path: _path + ".content",
@@ -459,11 +459,11 @@ const collection = {
459
459
  value: input.content
460
460
  })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[A-Z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
461
461
  path: _path + ".name",
462
- expected: "string & PascalPattern",
462
+ expected: "string & PascalCasePattern",
463
463
  value: input.name
464
464
  })) || _report(_exceptionable, {
465
465
  path: _path + ".name",
466
- expected: "(string & PascalPattern)",
466
+ expected: "(string & PascalCasePattern)",
467
467
  value: input.name
468
468
  }), "string" === typeof input.content || _report(_exceptionable, {
469
469
  path: _path + ".content",
@@ -471,11 +471,11 @@ const collection = {
471
471
  value: input.content
472
472
  })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[A-Z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
473
473
  path: _path + ".name",
474
- expected: "string & PascalPattern",
474
+ expected: "string & PascalCasePattern",
475
475
  value: input.name
476
476
  })) || _report(_exceptionable, {
477
477
  path: _path + ".name",
478
- expected: "(string & PascalPattern)",
478
+ expected: "(string & PascalCasePattern)",
479
479
  value: input.name
480
480
  }), "string" === typeof input.content || _report(_exceptionable, {
481
481
  path: _path + ".content",
@@ -55,6 +55,7 @@ const executeCachedBatch_1 = require("../../utils/executeCachedBatch");
55
55
  const transformRealizeCorrectHistories_1 = require("./histories/transformRealizeCorrectHistories");
56
56
  const compileRealizeFiles_1 = require("./internal/compileRealizeFiles");
57
57
  const filterDiagnostics_1 = require("./utils/filterDiagnostics");
58
+ const getRealizeWriteCodeTemplate_1 = require("./utils/getRealizeWriteCodeTemplate");
58
59
  const getRealizeWriteDto_1 = require("./utils/getRealizeWriteDto");
59
60
  const replaceImportStatements_1 = require("./utils/replaceImportStatements");
60
61
  function orchestrateRealizeCorrect(ctx_1, scenarios_1, authorizations_1, functions_1, failures_1, progress_1) {
@@ -69,7 +70,7 @@ function orchestrateRealizeCorrect(ctx_1, scenarios_1, authorizations_1, functio
69
70
  return functions;
70
71
  // Extract and process diagnostics
71
72
  const diagnostics = event.result.diagnostics;
72
- if (event.result.diagnostics.every((d) => { var _a; return !((_a = d.file) === null || _a === void 0 ? void 0 : _a.startsWith("src/providers")); })) {
73
+ if (event.result.diagnostics.every((d) => { var _a; return !((_a = d.file) === null || _a === void 0 ? void 0 : _a.startsWith("src/providers")); }) === true) {
73
74
  // No diagnostics related to provider functions, stop correcting
74
75
  return functions;
75
76
  }
@@ -146,7 +147,7 @@ function correct(ctx, locations, scenarios, authorizations, functions, failures,
146
147
  }
147
148
  function step(ctx, props) {
148
149
  return __awaiter(this, void 0, void 0, function* () {
149
- var _a, _b, _c;
150
+ var _a, _b, _c, _d, _e, _f;
150
151
  const pointer = {
151
152
  value: null,
152
153
  };
@@ -171,25 +172,50 @@ function step(ctx, props) {
171
172
  enforceFunctionCall: true,
172
173
  message: utils_1.StringUtil.trim `
173
174
  Correct the TypeScript code implementation.
175
+
176
+ The instruction to write at first was as follows, and the code you received is the code you wrote according to this instruction.
177
+ When modifying, modify the entire code, but not the import statement.
178
+
179
+ Below is template code you wrote:
180
+
181
+ ${(0, getRealizeWriteCodeTemplate_1.getRealizeWriteCodeTemplate)({
182
+ scenario: props.scenario,
183
+ schemas: ctx.state().interface.document.components.schemas,
184
+ operation: props.scenario.operation,
185
+ authorization: (_a = props.authorization) !== null && _a !== void 0 ? _a : null,
186
+ })}
187
+
188
+ Current code is as follows:
189
+ \`\`\`typescript
190
+ ${props.function.content}
191
+ \`\`\`
174
192
  `,
175
193
  });
176
194
  if (pointer.value === null) {
177
195
  return null;
178
196
  }
179
- pointer.value.revise.final = yield (0, replaceImportStatements_1.replaceImportStatements)(ctx, {
197
+ pointer.value.draft = yield (0, replaceImportStatements_1.replaceImportStatements)(ctx, {
180
198
  operation: props.scenario.operation,
181
- code: pointer.value.revise.final,
182
- decoratorType: (_a = props.authorization) === null || _a === void 0 ? void 0 : _a.payload.name,
199
+ schemas: ctx.state().interface.document.components.schemas,
200
+ code: pointer.value.draft,
201
+ decoratorType: (_b = props.authorization) === null || _b === void 0 ? void 0 : _b.payload.name,
183
202
  });
203
+ if (pointer.value.revise.final)
204
+ pointer.value.revise.final = yield (0, replaceImportStatements_1.replaceImportStatements)(ctx, {
205
+ operation: props.scenario.operation,
206
+ schemas: ctx.state().interface.document.components.schemas,
207
+ code: pointer.value.revise.final,
208
+ decoratorType: (_c = props.authorization) === null || _c === void 0 ? void 0 : _c.payload.name,
209
+ });
184
210
  const event = {
185
211
  type: "realizeCorrect",
186
212
  id: (0, uuid_1.v7)(),
187
213
  location: props.scenario.location,
188
- content: pointer.value.revise.final,
214
+ content: (_d = pointer.value.revise.final) !== null && _d !== void 0 ? _d : pointer.value.draft,
189
215
  tokenUsage,
190
216
  completed: ++props.progress.completed,
191
217
  total: props.progress.total,
192
- step: (_c = (_b = ctx.state().analyze) === null || _b === void 0 ? void 0 : _b.step) !== null && _c !== void 0 ? _c : 0,
218
+ step: (_f = (_e = ctx.state().analyze) === null || _e === void 0 ? void 0 : _e.step) !== null && _f !== void 0 ? _f : 0,
193
219
  created_at: new Date().toISOString(),
194
220
  };
195
221
  ctx.dispatch(event);
@@ -204,7 +230,7 @@ function createController(props) {
204
230
  name: "Write code",
205
231
  application,
206
232
  execute: {
207
- review: (next) => {
233
+ correct: (next) => {
208
234
  props.build(next);
209
235
  },
210
236
  },
@@ -218,79 +244,81 @@ const claude = {
218
244
  },
219
245
  functions: [
220
246
  {
221
- name: "review",
247
+ name: "correct",
222
248
  parameters: {
223
- description: " Properties containing the multi-phase error correction process\n\n------------------------------\n\nDescription of the current {@link IAutoBeRealizeCorrectApplication.IProps} type:\n\n> Properties for error correction following Chain of Thinking (CoT).\n> \n> All phases are wrapped in a `revise` object for systematic error\n> resolution.",
249
+ description: " Three-phase correction properties\n\n------------------------------\n\nCurrent Type: {@link IAutoBeRealizeCorrectApplication.IProps}",
224
250
  type: "object",
225
251
  properties: {
252
+ think: {
253
+ description: "Initial error analysis and correction strategy.\n\nAnalyzes TypeScript compilation errors to understand:\n\n- Error patterns and root causes\n- Required fixes and their impact\n- Whether quick fixes or deep refactoring is needed\n- Prisma schema and API contract constraints",
254
+ type: "string"
255
+ },
256
+ draft: {
257
+ description: "First correction attempt.\n\nImplements the initial fixes identified in the think phase. For simple\nerrors (typos, missing imports), this may be the final solution. Complex\nerrors may require further refinement.",
258
+ type: "string"
259
+ },
226
260
  revise: {
227
- description: "Revision process containing all error correction phases.",
228
- $ref: "#/$defs/IAutoBeRealizeCorrectApplication.IRevise"
261
+ description: "Revision and finalization phase.\n\nReviews the draft corrections and produces the final, error-free code\nthat maintains all business requirements.",
262
+ $ref: "#/$defs/IAutoBeRealizeCorrectApplication.IReviseProps"
229
263
  }
230
264
  },
231
265
  required: [
266
+ "think",
267
+ "draft",
232
268
  "revise"
233
269
  ],
234
270
  additionalProperties: false,
235
271
  $defs: {
236
- "IAutoBeRealizeCorrectApplication.IRevise": {
272
+ "IAutoBeRealizeCorrectApplication.IReviseProps": {
237
273
  type: "object",
238
274
  properties: {
239
- errorAnalysis: {
240
- description: "Step 1: TypeScript compilation error analysis and resolution strategy.\nAnalyzes TypeScript compiler diagnostics (error codes, messages) to understand\ntype mismatches, missing properties, nullable conflicts, and other compilation issues.",
241
- type: "string"
242
- },
243
- plan: {
244
- description: "Step 2: Provider function implementation plan.",
245
- type: "string"
246
- },
247
- prismaSchemas: {
248
- description: "Step 3: Relevant Prisma schema definitions.",
249
- type: "string"
250
- },
251
275
  review: {
252
- description: "Step 4: Refined version with improved completeness.",
276
+ description: "Correction review and validation.\n\nAnalyzes the draft corrections to ensure:\n\n- All TypeScript errors are resolved\n- Business logic remains intact\n- AutoBE coding standards are maintained\n- No new errors are introduced\n- Performance and security are preserved",
253
277
  type: "string"
254
278
  },
255
279
  final: {
256
- description: "Step 5: Final complete TypeScript function implementation.",
257
- type: "string"
280
+ description: "Final error-free implementation.\n\nThe complete, corrected code that passes all TypeScript compilation\nchecks.\n\nReturns `null` if the draft corrections are sufficient and need no\nfurther changes.",
281
+ oneOf: [
282
+ {
283
+ type: "null"
284
+ },
285
+ {
286
+ type: "string"
287
+ }
288
+ ]
258
289
  }
259
290
  },
260
291
  required: [
292
+ "review",
261
293
  "final"
262
294
  ]
263
295
  }
264
296
  }
265
297
  },
266
- description: "Reviews and corrects TypeScript compilation errors.\n\nFixes TypeScript compilation errors while preserving original business\nlogic, applying minimal intervention principle.",
267
- validate: (() => { const _io0 = input => "object" === typeof input.revise && null !== input.revise && _io1(input.revise); const _io1 = input => (undefined === input.errorAnalysis || "string" === typeof input.errorAnalysis) && (undefined === input.plan || "string" === typeof input.plan) && (undefined === input.prismaSchemas || "string" === typeof input.prismaSchemas) && (undefined === input.review || "string" === typeof input.review) && "string" === typeof input.final; const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.revise && null !== input.revise || _report(_exceptionable, {
298
+ description: "Systematically analyze and correct TypeScript compilation errors.\n\nImplements a three-phase workflow (think \u2192 draft \u2192 revise) that balances\nefficiency for simple errors with thoroughness for complex problems.",
299
+ 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, {
300
+ path: _path + ".think",
301
+ expected: "string",
302
+ value: input.think
303
+ }), "string" === typeof input.draft || _report(_exceptionable, {
304
+ path: _path + ".draft",
305
+ expected: "string",
306
+ value: input.draft
307
+ }), ("object" === typeof input.revise && null !== input.revise || _report(_exceptionable, {
268
308
  path: _path + ".revise",
269
- expected: "IAutoBeRealizeCorrectApplication.IRevise",
309
+ expected: "IAutoBeRealizeCorrectApplication.IReviseProps",
270
310
  value: input.revise
271
311
  })) && _vo1(input.revise, _path + ".revise", true && _exceptionable) || _report(_exceptionable, {
272
312
  path: _path + ".revise",
273
- expected: "IAutoBeRealizeCorrectApplication.IRevise",
313
+ expected: "IAutoBeRealizeCorrectApplication.IReviseProps",
274
314
  value: input.revise
275
- })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [undefined === input.errorAnalysis || "string" === typeof input.errorAnalysis || _report(_exceptionable, {
276
- path: _path + ".errorAnalysis",
277
- expected: "(string | undefined)",
278
- value: input.errorAnalysis
279
- }), undefined === input.plan || "string" === typeof input.plan || _report(_exceptionable, {
280
- path: _path + ".plan",
281
- expected: "(string | undefined)",
282
- value: input.plan
283
- }), undefined === input.prismaSchemas || "string" === typeof input.prismaSchemas || _report(_exceptionable, {
284
- path: _path + ".prismaSchemas",
285
- expected: "(string | undefined)",
286
- value: input.prismaSchemas
287
- }), undefined === input.review || "string" === typeof input.review || _report(_exceptionable, {
315
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
288
316
  path: _path + ".review",
289
- expected: "(string | undefined)",
317
+ expected: "string",
290
318
  value: input.review
291
- }), "string" === typeof input.final || _report(_exceptionable, {
319
+ }), null === input.final || "string" === typeof input.final || _report(_exceptionable, {
292
320
  path: _path + ".final",
293
- expected: "string",
321
+ expected: "(null | string)",
294
322
  value: input.final
295
323
  })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
296
324
  if (false === __is(input)) {
@@ -333,78 +361,80 @@ const collection = {
333
361
  },
334
362
  functions: [
335
363
  {
336
- name: "review",
364
+ name: "correct",
337
365
  parameters: {
338
- description: " Properties containing the multi-phase error correction process\n\n------------------------------\n\nDescription of the current {@link IAutoBeRealizeCorrectApplication.IProps} type:\n\n> Properties for error correction following Chain of Thinking (CoT).\n> \n> All phases are wrapped in a `revise` object for systematic error\n> resolution.\n\n### Description of {@link revise} property:\n\n> Revision process containing all error correction phases.",
366
+ description: " Three-phase correction properties\n\n------------------------------\n\nCurrent Type: {@link IAutoBeRealizeCorrectApplication.IProps}\n\n### Description of {@link revise} property:\n\n> Revision and finalization phase.\n> \n> Reviews the draft corrections and produces the final, error-free code\n> that maintains all business requirements.",
339
367
  type: "object",
340
368
  properties: {
369
+ think: {
370
+ description: "Initial error analysis and correction strategy.\n\nAnalyzes TypeScript compilation errors to understand:\n\n- Error patterns and root causes\n- Required fixes and their impact\n- Whether quick fixes or deep refactoring is needed\n- Prisma schema and API contract constraints",
371
+ type: "string"
372
+ },
373
+ draft: {
374
+ description: "First correction attempt.\n\nImplements the initial fixes identified in the think phase. For simple\nerrors (typos, missing imports), this may be the final solution. Complex\nerrors may require further refinement.",
375
+ type: "string"
376
+ },
341
377
  revise: {
342
- $ref: "#/$defs/IAutoBeRealizeCorrectApplication.IRevise"
378
+ $ref: "#/$defs/IAutoBeRealizeCorrectApplication.IReviseProps"
343
379
  }
344
380
  },
345
381
  required: [
382
+ "think",
383
+ "draft",
346
384
  "revise"
347
385
  ],
348
386
  additionalProperties: false,
349
387
  $defs: {
350
- "IAutoBeRealizeCorrectApplication.IRevise": {
388
+ "IAutoBeRealizeCorrectApplication.IReviseProps": {
351
389
  type: "object",
352
390
  properties: {
353
- errorAnalysis: {
354
- description: "Step 1: TypeScript compilation error analysis and resolution strategy.\nAnalyzes TypeScript compiler diagnostics (error codes, messages) to understand\ntype mismatches, missing properties, nullable conflicts, and other compilation issues.",
355
- type: "string"
356
- },
357
- plan: {
358
- description: "Step 2: Provider function implementation plan.",
359
- type: "string"
360
- },
361
- prismaSchemas: {
362
- description: "Step 3: Relevant Prisma schema definitions.",
363
- type: "string"
364
- },
365
391
  review: {
366
- description: "Step 4: Refined version with improved completeness.",
392
+ description: "Correction review and validation.\n\nAnalyzes the draft corrections to ensure:\n\n- All TypeScript errors are resolved\n- Business logic remains intact\n- AutoBE coding standards are maintained\n- No new errors are introduced\n- Performance and security are preserved",
367
393
  type: "string"
368
394
  },
369
395
  final: {
370
- description: "Step 5: Final complete TypeScript function implementation.",
371
- type: "string"
396
+ description: "Final error-free implementation.\n\nThe complete, corrected code that passes all TypeScript compilation\nchecks.\n\nReturns `null` if the draft corrections are sufficient and need no\nfurther changes.",
397
+ anyOf: [
398
+ {
399
+ type: "null"
400
+ },
401
+ {
402
+ type: "string"
403
+ }
404
+ ]
372
405
  }
373
406
  },
374
407
  required: [
408
+ "review",
375
409
  "final"
376
410
  ]
377
411
  }
378
412
  }
379
413
  },
380
- description: "Reviews and corrects TypeScript compilation errors.\n\nFixes TypeScript compilation errors while preserving original business\nlogic, applying minimal intervention principle.",
381
- validate: (() => { const _io0 = input => "object" === typeof input.revise && null !== input.revise && _io1(input.revise); const _io1 = input => (undefined === input.errorAnalysis || "string" === typeof input.errorAnalysis) && (undefined === input.plan || "string" === typeof input.plan) && (undefined === input.prismaSchemas || "string" === typeof input.prismaSchemas) && (undefined === input.review || "string" === typeof input.review) && "string" === typeof input.final; const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.revise && null !== input.revise || _report(_exceptionable, {
414
+ description: "Systematically analyze and correct TypeScript compilation errors.\n\nImplements a three-phase workflow (think \u2192 draft \u2192 revise) that balances\nefficiency for simple errors with thoroughness for complex problems.",
415
+ 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, {
416
+ path: _path + ".think",
417
+ expected: "string",
418
+ value: input.think
419
+ }), "string" === typeof input.draft || _report(_exceptionable, {
420
+ path: _path + ".draft",
421
+ expected: "string",
422
+ value: input.draft
423
+ }), ("object" === typeof input.revise && null !== input.revise || _report(_exceptionable, {
382
424
  path: _path + ".revise",
383
- expected: "IAutoBeRealizeCorrectApplication.IRevise",
425
+ expected: "IAutoBeRealizeCorrectApplication.IReviseProps",
384
426
  value: input.revise
385
427
  })) && _vo1(input.revise, _path + ".revise", true && _exceptionable) || _report(_exceptionable, {
386
428
  path: _path + ".revise",
387
- expected: "IAutoBeRealizeCorrectApplication.IRevise",
429
+ expected: "IAutoBeRealizeCorrectApplication.IReviseProps",
388
430
  value: input.revise
389
- })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [undefined === input.errorAnalysis || "string" === typeof input.errorAnalysis || _report(_exceptionable, {
390
- path: _path + ".errorAnalysis",
391
- expected: "(string | undefined)",
392
- value: input.errorAnalysis
393
- }), undefined === input.plan || "string" === typeof input.plan || _report(_exceptionable, {
394
- path: _path + ".plan",
395
- expected: "(string | undefined)",
396
- value: input.plan
397
- }), undefined === input.prismaSchemas || "string" === typeof input.prismaSchemas || _report(_exceptionable, {
398
- path: _path + ".prismaSchemas",
399
- expected: "(string | undefined)",
400
- value: input.prismaSchemas
401
- }), undefined === input.review || "string" === typeof input.review || _report(_exceptionable, {
431
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
402
432
  path: _path + ".review",
403
- expected: "(string | undefined)",
433
+ expected: "string",
404
434
  value: input.review
405
- }), "string" === typeof input.final || _report(_exceptionable, {
435
+ }), null === input.final || "string" === typeof input.final || _report(_exceptionable, {
406
436
  path: _path + ".final",
407
- expected: "string",
437
+ expected: "(null | string)",
408
438
  value: input.final
409
439
  })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
410
440
  if (false === __is(input)) {
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrateRealizeCorrect.js","sourceRoot":"","sources":["../../../src/orchestrate/realize/orchestrateRealizeCorrect.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,8DA0FC;;AA5GD,yCAA2C;AAG3C,kDAA0B;AAC1B,+BAA0B;AAG1B,uEAAoE;AACpE,uEAAoE;AACpE,mGAAgG;AAChG,wEAAqE;AAIrE,iEAA8D;AAC9D,mEAAgE;AAChE,6EAA0E;AAE1E,SAAsB,yBAAyB;yDAC7C,GAAyB,EACzB,SAAyC,EACzC,cAA4C,EAC5C,SAAkC,EAClC,QAAyC,EACzC,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AAiB,EAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/B,MAAM,WAAW,GAA2B,UAAU,CACpD,KAAK,CAAC,KAAK,CACwD,CAAC;IAEtE,OAAO;QACL,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,YAAY;QAClB,WAAW;QACX,OAAO,EAAE;YACP,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;gBACf,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACpB,CAAC;SACyC;KAC7C,CAAC;AACJ,CAAC;AAED,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGT,CAAC;AACJ,MAAM,UAAU,GAAG;IACjB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAsE;IAC7E,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;CACd,CAAC"}
1
+ {"version":3,"file":"orchestrateRealizeCorrect.js","sourceRoot":"","sources":["../../../src/orchestrate/realize/orchestrateRealizeCorrect.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,8DA2FC;;AA9GD,yCAA2C;AAG3C,kDAA0B;AAC1B,+BAA0B;AAG1B,uEAAoE;AACpE,uEAAoE;AACpE,mGAAgG;AAChG,wEAAqE;AAIrE,iEAA8D;AAC9D,qFAAkF;AAClF,mEAAgE;AAChE,6EAA0E;AAE1E,SAAsB,yBAAyB;yDAC7C,GAAyB,EACzB,SAAyC,EACzC,cAA4C,EAC5C,SAAkC,EAClC,QAAyC,EACzC,QAAiC,EACjC,OAAe,GA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGT,CAAC;AACJ,MAAM,UAAU,GAAG;IACjB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAsE;IAC7E,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;CACd,CAAC"}
@@ -1,8 +1,9 @@
1
- import { AutoBeProgressEventBase, AutoBeRealizeAuthorization, AutoBeRealizeWriteEvent } from "@autobe/interface";
1
+ import { AutoBeOpenApi, AutoBeProgressEventBase, AutoBeRealizeAuthorization, AutoBeRealizeWriteEvent } from "@autobe/interface";
2
2
  import { ILlmSchema } from "@samchon/openapi";
3
3
  import { AutoBeContext } from "../../context/AutoBeContext";
4
4
  import { IAutoBeRealizeScenarioResult } from "./structures/IAutoBeRealizeScenarioResult";
5
5
  export declare function orchestrateRealizeWrite<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
6
+ document: AutoBeOpenApi.IDocument;
6
7
  totalAuthorizations: AutoBeRealizeAuthorization[];
7
8
  authorization: AutoBeRealizeAuthorization | null;
8
9
  scenario: IAutoBeRealizeScenarioResult;