@autobe/agent 0.20.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) hide show
  1. package/lib/agent/src/AutoBeAgent.js +2 -2
  2. package/lib/agent/src/AutoBeAgent.js.map +1 -1
  3. package/lib/agent/src/AutoBeMockAgent.js +1 -0
  4. package/lib/agent/src/AutoBeMockAgent.js.map +1 -1
  5. package/lib/agent/src/constants/AutoBeConfigConstant.d.ts +3 -0
  6. package/lib/agent/src/{orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js → constants/AutoBeConfigConstant.js} +1 -1
  7. package/lib/agent/src/constants/AutoBeConfigConstant.js.map +1 -0
  8. package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +27 -26
  9. package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +1 -1
  10. package/lib/agent/src/context/AutoBeContext.d.ts +3 -2
  11. package/lib/agent/src/context/AutoBeTokenUsageComponent.js +4 -3
  12. package/lib/agent/src/context/AutoBeTokenUsageComponent.js.map +1 -1
  13. package/lib/agent/src/factory/consentFunctionCall.js +4 -4
  14. package/lib/agent/src/factory/consentFunctionCall.js.map +1 -1
  15. package/lib/agent/src/factory/createAutoBeContext.js +16 -11
  16. package/lib/agent/src/factory/createAutoBeContext.js.map +1 -1
  17. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js +1 -1
  18. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -1
  19. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +2 -2
  20. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
  21. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +1 -1
  22. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
  23. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +6 -6
  24. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +50 -8
  25. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
  26. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +4 -4
  27. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +6 -0
  28. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +4 -0
  29. package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.js +1 -1
  30. package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
  31. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +19 -1
  32. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
  33. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +3 -3
  34. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
  35. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +1 -1
  36. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
  37. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.d.ts +4 -0
  38. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +33 -0
  39. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -0
  40. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +2 -2
  41. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
  42. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +1 -1
  43. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
  44. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +2 -2
  45. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
  46. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +1 -1
  47. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
  48. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +1 -1
  49. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +2 -2
  50. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
  51. package/lib/agent/src/orchestrate/interface/orchestrateInterface.js +5 -1
  52. package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -1
  53. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +16 -10
  54. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
  55. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.d.ts +1 -1
  56. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js +3731 -228
  57. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  58. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js +5 -3
  59. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
  60. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +10 -0
  61. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +365 -0
  62. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +1 -0
  63. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +43 -63
  64. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  65. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +244 -176
  66. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
  67. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js +3466 -103
  68. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
  69. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +6 -1
  70. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +3672 -358
  71. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -1
  72. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.d.ts +60 -0
  73. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js +3 -0
  74. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js.map +1 -0
  75. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +0 -38
  76. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +48 -101
  77. package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +29 -23
  78. package/lib/agent/src/orchestrate/interface/utils/JsonSchemaFactory.d.ts +9 -0
  79. package/lib/agent/src/orchestrate/interface/utils/JsonSchemaFactory.js +1385 -0
  80. package/lib/agent/src/orchestrate/interface/utils/JsonSchemaFactory.js.map +1 -0
  81. package/lib/agent/src/orchestrate/interface/utils/JsonSchemaNamingConvention.d.ts +5 -0
  82. package/lib/agent/src/orchestrate/interface/utils/JsonSchemaNamingConvention.js +78 -0
  83. package/lib/agent/src/orchestrate/interface/utils/JsonSchemaNamingConvention.js.map +1 -0
  84. package/lib/agent/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.d.ts +2 -0
  85. package/lib/agent/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.js +81 -0
  86. package/lib/agent/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.js.map +1 -0
  87. package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js.map +1 -1
  88. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +1 -1
  89. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
  90. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +1 -1
  91. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -1
  92. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +2 -2
  93. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
  94. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +1 -1
  95. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
  96. package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.d.ts +1 -1
  97. package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js +2 -2
  98. package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  99. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +1 -1
  100. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -1
  101. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +2 -2
  102. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
  103. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +6 -6
  104. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +22 -7
  105. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
  106. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -8
  107. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +13 -29
  108. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
  109. package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.d.ts +2 -2
  110. package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js +2 -8
  111. package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js.map +1 -1
  112. package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +6 -49
  113. package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -1
  114. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js +4 -2
  115. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
  116. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +5 -3
  117. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
  118. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +13 -6
  119. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +206 -118
  120. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
  121. package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts +2 -2
  122. package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js +2 -2
  123. package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -1
  124. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +2 -2
  125. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +24 -39
  126. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
  127. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +17 -0
  128. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +20 -0
  129. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +33 -73
  130. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.d.ts +5 -0
  131. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.js +3 -0
  132. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.js.map +1 -0
  133. package/{src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.ts → lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.d.ts} +3 -10
  134. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.js +3 -0
  135. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.js.map +1 -0
  136. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +40 -24
  137. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.d.ts +31 -0
  138. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js +86 -0
  139. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js.map +1 -0
  140. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteDto.d.ts +4 -0
  141. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteDto.js +55 -0
  142. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteDto.js.map +1 -0
  143. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteImportStatements.d.ts +2 -0
  144. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteImportStatements.js +20 -0
  145. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteImportStatements.js.map +1 -0
  146. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteInputType.d.ts +30 -0
  147. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteInputType.js +73 -0
  148. package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteInputType.js.map +1 -0
  149. package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.d.ts +6 -2
  150. package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js +63 -69
  151. package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
  152. package/lib/agent/src/orchestrate/test/compile/completeTestCode.js +15 -14
  153. package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +1 -1
  154. package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js +1 -1
  155. package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -1
  156. package/lib/agent/src/orchestrate/test/compile/getTestImportStatements.d.ts +2 -0
  157. package/lib/agent/src/orchestrate/test/compile/getTestImportStatements.js +19 -0
  158. package/lib/agent/src/orchestrate/test/compile/getTestImportStatements.js.map +1 -0
  159. package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +1 -1
  160. package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.js +2 -0
  161. package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -1
  162. package/lib/agent/src/orchestrate/test/compile/getTestTemplateCode.d.ts +2 -0
  163. package/lib/agent/src/orchestrate/test/compile/getTestTemplateCode.js +21 -0
  164. package/lib/agent/src/orchestrate/test/compile/getTestTemplateCode.js.map +1 -0
  165. package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.d.ts +4 -2
  166. package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +40 -25
  167. package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
  168. package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +5 -4
  169. package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
  170. package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.d.ts +3 -1
  171. package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +137 -96
  172. package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
  173. package/lib/agent/src/orchestrate/test/orchestrateTest.js +6 -0
  174. package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -1
  175. package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.d.ts +1 -1
  176. package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js +126 -72
  177. package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  178. package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +54 -48
  179. package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  180. package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js +122 -43
  181. package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  182. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +48 -45
  183. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.d.ts +6 -0
  184. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.js +3 -0
  185. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.js.map +1 -0
  186. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +28 -1
  187. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.d.ts +1 -0
  188. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +13 -0
  189. package/lib/agent/src/orchestrate/test/utils/getReferenceIds.d.ts +5 -0
  190. package/lib/agent/src/orchestrate/test/utils/getReferenceIds.js +28 -0
  191. package/lib/agent/src/orchestrate/test/utils/getReferenceIds.js.map +1 -0
  192. package/lib/agent/src/structures/IAutoBeConfig.d.ts +2 -0
  193. package/lib/constants/AutoBeConfigConstant.d.ts +3 -0
  194. package/lib/constants/AutoBeSystemPromptConstant.d.ts +27 -26
  195. package/lib/context/AutoBeContext.d.ts +3 -2
  196. package/lib/index.mjs +13778 -3055
  197. package/lib/index.mjs.map +1 -1
  198. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +6 -0
  199. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +4 -0
  200. package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.d.ts +4 -0
  201. package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +1 -1
  202. package/lib/orchestrate/interface/orchestrateInterfaceComplement.d.ts +1 -1
  203. package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +10 -0
  204. package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +6 -1
  205. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.d.ts +60 -0
  206. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +0 -38
  207. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +48 -101
  208. package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +29 -23
  209. package/lib/orchestrate/interface/utils/JsonSchemaFactory.d.ts +9 -0
  210. package/lib/orchestrate/interface/utils/JsonSchemaNamingConvention.d.ts +5 -0
  211. package/lib/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.d.ts +2 -0
  212. package/lib/orchestrate/prisma/orchestratePrismaCorrect.d.ts +1 -1
  213. package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +6 -6
  214. package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -8
  215. package/lib/orchestrate/realize/internal/compileRealizeFiles.d.ts +2 -2
  216. package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +13 -6
  217. package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +2 -2
  218. package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +2 -2
  219. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +17 -0
  220. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +20 -0
  221. package/lib/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +33 -73
  222. package/lib/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.d.ts +5 -0
  223. package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.d.ts +36 -0
  224. package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +40 -24
  225. package/lib/orchestrate/realize/utils/getRealizeWriteCodeTemplate.d.ts +31 -0
  226. package/lib/orchestrate/realize/utils/getRealizeWriteDto.d.ts +4 -0
  227. package/lib/orchestrate/realize/utils/getRealizeWriteImportStatements.d.ts +2 -0
  228. package/lib/orchestrate/realize/utils/getRealizeWriteInputType.d.ts +30 -0
  229. package/lib/orchestrate/realize/utils/replaceImportStatements.d.ts +6 -2
  230. package/lib/orchestrate/test/compile/getTestImportStatements.d.ts +2 -0
  231. package/lib/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +1 -1
  232. package/lib/orchestrate/test/compile/getTestTemplateCode.d.ts +2 -0
  233. package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +4 -2
  234. package/lib/orchestrate/test/histories/transformTestWriteHistories.d.ts +3 -1
  235. package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +1 -1
  236. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +48 -45
  237. package/lib/orchestrate/test/structures/IAutoBeTestFunctionFailure.d.ts +6 -0
  238. package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +28 -1
  239. package/lib/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.d.ts +1 -0
  240. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +13 -0
  241. package/lib/orchestrate/test/utils/getReferenceIds.d.ts +5 -0
  242. package/lib/structures/IAutoBeConfig.d.ts +2 -0
  243. package/package.json +6 -6
  244. package/src/AutoBeAgent.ts +2 -0
  245. package/src/AutoBeMockAgent.ts +1 -0
  246. package/src/constants/AutoBeConfigConstant.ts +3 -0
  247. package/src/constants/AutoBeSystemPromptConstant.ts +27 -26
  248. package/src/context/AutoBeContext.ts +3 -0
  249. package/src/context/AutoBeTokenUsageComponent.ts +3 -3
  250. package/src/factory/consentFunctionCall.ts +2 -0
  251. package/src/factory/createAutoBeContext.ts +145 -135
  252. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +6 -0
  253. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.ts +4 -0
  254. package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +19 -1
  255. package/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.ts +39 -0
  256. package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +1 -4
  257. package/src/orchestrate/interface/orchestrateInterface.ts +15 -4
  258. package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +13 -5
  259. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +58 -19
  260. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +5 -1
  261. package/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.ts +95 -0
  262. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +11 -11
  263. package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +7 -3
  264. package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +33 -91
  265. package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +72 -95
  266. package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.ts +65 -0
  267. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +0 -39
  268. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +50 -104
  269. package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +31 -27
  270. package/src/orchestrate/interface/utils/JsonSchemaFactory.ts +171 -0
  271. package/src/orchestrate/interface/utils/JsonSchemaNamingConvention.ts +83 -0
  272. package/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.ts +90 -0
  273. package/src/orchestrate/interface/utils/validateAuthorizationSchema.ts +2 -2
  274. package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +1 -2
  275. package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +30 -15
  276. package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +27 -49
  277. package/src/orchestrate/realize/internal/compileRealizeFiles.ts +4 -11
  278. package/src/orchestrate/realize/orchestrateRealize.ts +19 -75
  279. package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +1 -1
  280. package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +114 -25
  281. package/src/orchestrate/realize/orchestrateRealizeScenario.ts +9 -5
  282. package/src/orchestrate/realize/orchestrateRealizeWrite.ts +11 -15
  283. package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +17 -0
  284. package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.ts +20 -0
  285. package/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.ts +40 -74
  286. package/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.ts +9 -0
  287. package/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.ts +45 -0
  288. package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +43 -27
  289. package/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.ts +97 -0
  290. package/src/orchestrate/realize/utils/getRealizeWriteDto.ts +64 -0
  291. package/src/orchestrate/realize/utils/getRealizeWriteImportStatements.ts +29 -0
  292. package/src/orchestrate/realize/utils/getRealizeWriteInputType.ts +82 -0
  293. package/src/orchestrate/realize/utils/replaceImportStatements.ts +101 -111
  294. package/src/orchestrate/test/compile/completeTestCode.ts +15 -26
  295. package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +3 -0
  296. package/src/orchestrate/test/compile/getTestImportStatements.ts +25 -0
  297. package/src/orchestrate/test/compile/getTestScenarioArtifacts.ts +6 -1
  298. package/src/orchestrate/test/compile/getTestTemplateCode.ts +25 -0
  299. package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +48 -36
  300. package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +6 -5
  301. package/src/orchestrate/test/histories/transformTestWriteHistories.ts +43 -4
  302. package/src/orchestrate/test/orchestrateTest.ts +6 -0
  303. package/src/orchestrate/test/orchestrateTestCorrect.ts +46 -11
  304. package/src/orchestrate/test/orchestrateTestScenario.ts +52 -48
  305. package/src/orchestrate/test/orchestrateTestWrite.ts +24 -6
  306. package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +49 -46
  307. package/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.ts +8 -0
  308. package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +28 -1
  309. package/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.ts +1 -0
  310. package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +14 -0
  311. package/src/orchestrate/test/utils/getReferenceIds.ts +25 -0
  312. package/src/structures/IAutoBeConfig.ts +3 -0
  313. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +0 -38
  314. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js.map +0 -1
  315. package/lib/agent/src/orchestrate/test/histories/transformTestHistories.d.ts +0 -3
  316. package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js +0 -75
  317. package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +0 -1
  318. package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +0 -38
  319. package/lib/orchestrate/test/histories/transformTestHistories.d.ts +0 -3
  320. package/src/orchestrate/test/histories/transformTestHistories.ts +0 -78
@@ -51,27 +51,24 @@ const utils_1 = require("@autobe/utils");
51
51
  const typia_1 = __importDefault(require("typia"));
52
52
  const uuid_1 = require("uuid");
53
53
  const assertSchemaModel_1 = require("../../context/assertSchemaModel");
54
- const getTestScenarioArtifacts_1 = require("../test/compile/getTestScenarioArtifacts");
55
54
  const transformRealizeWriteHistories_1 = require("./histories/transformRealizeWriteHistories");
55
+ const getRealizeWriteDto_1 = require("./utils/getRealizeWriteDto");
56
56
  const replaceImportStatements_1 = require("./utils/replaceImportStatements");
57
57
  function orchestrateRealizeWrite(ctx, props) {
58
58
  return __awaiter(this, void 0, void 0, function* () {
59
59
  var _a, _b, _c;
60
- const artifacts = yield (0, getTestScenarioArtifacts_1.getTestScenarioArtifacts)(ctx, {
61
- endpoint: props.scenario.operation,
62
- dependencies: [],
63
- });
64
60
  const pointer = {
65
61
  value: null,
66
62
  };
63
+ const dto = yield (0, getRealizeWriteDto_1.getRealizeWriteDto)(ctx, props.scenario.operation);
67
64
  const { tokenUsage } = yield ctx.conversate({
68
65
  source: "realizeWrite",
69
66
  histories: (0, transformRealizeWriteHistories_1.transformRealizeWriteHistories)({
70
67
  state: ctx.state(),
71
68
  scenario: props.scenario,
72
- artifacts,
73
69
  authorization: props.authorization,
74
70
  totalAuthorizations: props.totalAuthorizations,
71
+ dto,
75
72
  }),
76
73
  controller: createController({
77
74
  model: ctx.model,
@@ -101,7 +98,11 @@ function orchestrateRealizeWrite(ctx, props) {
101
98
  });
102
99
  if (pointer.value === null)
103
100
  throw new Error("Failed to write code.");
104
- pointer.value.implementationCode = yield (0, replaceImportStatements_1.replaceImportStatements)(ctx)(artifacts, pointer.value.implementationCode, (_a = props.authorization) === null || _a === void 0 ? void 0 : _a.payload.name);
101
+ pointer.value.implementationCode = yield (0, replaceImportStatements_1.replaceImportStatements)(ctx, {
102
+ operation: props.scenario.operation,
103
+ code: pointer.value.implementationCode,
104
+ decoratorType: (_a = props.authorization) === null || _a === void 0 ? void 0 : _a.payload.name,
105
+ });
105
106
  const event = {
106
107
  type: "realizeWrite",
107
108
  id: (0, uuid_1.v7)(),
@@ -141,31 +142,27 @@ const claude = {
141
142
  {
142
143
  name: "coding",
143
144
  parameters: {
144
- description: "Current Type: {@link IAutoBeRealizeWriteApplication.IProps}",
145
+ description: " Properties containing the multi-phase implementation plan and code\n\n------------------------------\n\nDescription of the current {@link IAutoBeRealizeWriteApplication.IProps} type:\n\n> Properties for the Realize Write Application following Chain of Thinking (CoT).\n> \n> Each field represents a distinct phase in the reasoning and implementation process,\n> building upon the previous step to create a complete, error-free implementation.\n> This structured approach ensures clarity, debuggability, and systematic thinking.",
145
146
  type: "object",
146
147
  properties: {
147
148
  plan: {
148
- description: "Step 1.\n\n\uD83E\uDDE0 Provider Function Implementation Plan\n\nThis field outlines the strategic plan for implementing the provider\nfunction according to the Realize Coder Agent specification. Before\nwriting the actual code, think through the logic and structure.\n\nThe plan follows a SCHEMA-FIRST APPROACH:\n\n\uD83D\uDCCB STEP 1 - PRISMA SCHEMA VERIFICATION:\n\nDO:\n- Examine the actual Prisma schema model definition\n- List EVERY field that exists in the model with exact types\n- Explicitly note fields that DO NOT exist\n\nDO NOT:\n- Assume common fields exist without verification\n- Use fields like deleted_at, created_by, updated_by, is_deleted, is_active without checking\n\n\uD83D\uDCCB STEP 2 - FIELD INVENTORY:\n\n- List ONLY fields confirmed to exist in schema\n- Example: \"Verified fields in user model: id (String), email (String),\n created_at (DateTime), updated_at (DateTime)\"\n- Example: \"Fields that DO NOT exist: deleted_at, is_active, created_by\"\n\n\uD83D\uDCCB STEP 3 - FIELD ACCESS STRATEGY:\n\n- Plan which verified fields will be used in select, update, create\n operations\n- For complex operations with type errors, plan to use separate queries\n instead of nested operations\n\n\uD83D\uDCCB STEP 4 - TYPE COMPATIBILITY:\n\n- Plan DateTime to ISO string conversions using toISOStringSafe()\n- Plan handling of nullable vs required fields\n\n\uD83D\uDCCB STEP 5 - IMPLEMENTATION APPROACH:\n\n- \uD83E\uDDE9 Required business entities (e.g., users, posts, logs) and their\n relationships\n- \uD83D\uDEE0 Operations needed to fulfill the business scenario (e.g., fetch,\n create, update) using ONLY verified fields\n- \uD83D\uDD04 Data dependencies between steps (e.g., use userId to fetch related\n data)\n- \u2705 Validation points (based on business rules, not field presence)\n- \uD83D\uDEA7 Error and edge cases that must be handled explicitly (e.g., missing\n records)\n- \uD83C\uDFD7 Structure: always a single `async function`, using only `parameters`\n and `body`\n\n\u26A0\uFE0F Important Constraints:\n\n- Do NOT perform input validation \u2014 assume `parameters` and `body` are\n already valid\n- Use `typia.random<T>()` with an explanatory comment if logic can't be\n implemented\n- Never use `any` or make assumptions without sufficient context\n- Use only allowed imports \u2014 DTOs and Prisma types\n- Use `MyGlobal.prisma` for DB access and respect Prisma typing rules\n\n\u26A0\uFE0F TypeScript-specific considerations:\n\n- Do **not** use native `Date` objects directly; always convert all dates\n using `toISOStringSafe()` and brand as `string &\n tags.Format<'date-time'>`. This rule applies throughout all phases.\n- Prefer `satisfies` for DTO conformance instead of unsafe `as` casts\n- Avoid weak typing such as `any`, `as any`, or `satisfies any`\n- Use branded types (e.g., `tags.Format<'uuid'>`) and literal unions where\n applicable\n\n\u2705 Example Structure:\n\n```ts\nexport async function doSomething(\n user: { id: string & tags.Format<\"uuid\">; type: string },\n parameters: IParams,\n body: IBody\n): Promise<IReturn> {\n const { id } = parameters;\n const { name } = body;\n const user = await MyGlobal.prisma.users.findFirst({ where: { id } });\n if (!user) throw new Error(\"User not found\");\n ...\n return result;\n}\n```\n\n\uD83D\uDD0D Feasibility Analysis Requirement:\n\n- Before generating any code, the agent **must analyze** whether the\n requested implementation is **feasible based on the given Prisma schema\n and DTO types**.\n- If required fields or relationships are **missing or incompatible**, the\n plan should explicitly state that the implementation is **not\n possible** with the current schema/DTO, and no code should be generated\n in later stages.\n- In such cases, only a detailed **comment in the `implementationCode`**\n should be returned explaining why the logic cannot be implemented.\n\n\uD83D\uDD25 Error Handling Plan:\n\nIf an error is expected or encountered during implementation:\n\n- Clearly document the error message(s) and TypeScript error codes.\n- Analyze the root cause (e.g., type mismatch, missing field, nullability\n issue).\n- Define concrete steps to resolve the issue, such as:\n\n - Adjusting type declarations or using Prisma-generated input types.\n - Using `?? undefined` to normalize nullable fields.\n - Applying correct relation handling (e.g., `connect` instead of direct\n foreign key assignment).\n - Ensuring all date fields use `.toISOString()` and proper branding.\n- Include fallback or workaround plans if a direct fix is complex.\n- If no error is present, simply omit this section.\n\nThis plan ensures the function will:\n\n- Respect the global architecture and coding conventions\n- Be safe, predictable, and aligned with upstream logic",
149
+ description: "Step 1 - Planning Phase (CoT: Initial Reasoning)\n\n\uD83E\uDDE0 Provider Function Implementation Plan\n\nThis field outlines the strategic plan for implementing the provider\nfunction according to the Realize Coder Agent specification. Before\nwriting the actual code, think through the logic and structure.\n\nThe plan follows a SCHEMA-FIRST APPROACH:\n\n\uD83D\uDCCB STEP 1 - PRISMA SCHEMA VERIFICATION:\n\nDO:\n\n- Examine the actual Prisma schema model definition\n- List EVERY field that exists in the model with exact types\n- Explicitly note fields that DO NOT exist\n- Verify database compatibility (PostgreSQL AND SQLite)\n\nDO NOT:\n\n- Assume common fields exist without verification\n- Use fields like deleted_at, created_by, updated_by, is_deleted, is_active\n without checking\n- Use PostgreSQL-specific features like mode: \"insensitive\"\n\n\uD83D\uDCCB STEP 2 - FIELD INVENTORY:\n\n- List ONLY fields confirmed to exist in schema\n- Example: \"Verified fields in user model: id (String), email (String),\n created_at (DateTime), updated_at (DateTime)\"\n- Example: \"Fields that DO NOT exist: deleted_at, is_active, created_by\"\n\n\uD83D\uDCCB STEP 3 - FIELD ACCESS STRATEGY:\n\n- Plan which verified fields will be used in select, update, create\n operations\n- For complex operations with type errors, plan to use separate queries\n instead of nested operations\n\n\uD83D\uDCCB STEP 4 - TYPE COMPATIBILITY:\n\n- Plan DateTime to ISO string conversions using toISOStringSafe()\n- Plan handling of nullable vs required fields\n\n\uD83D\uDCCB STEP 5 - IMPLEMENTATION APPROACH:\n\n- \uD83E\uDDE9 Required business entities (e.g., users, posts, logs) and their\n relationships\n- \uD83D\uDEE0 Operations needed to fulfill the business scenario (e.g., fetch,\n create, update) using ONLY verified fields\n- \uD83D\uDD04 Data dependencies between steps (e.g., use userId to fetch related\n data)\n- \u2705 Validation points (based on business rules, not field presence)\n- \uD83D\uDEA7 Error and edge cases that must be handled explicitly (e.g., missing\n records)\n- \uD83C\uDFD7 Structure: always a single `async function`, using only `parameters`\n and `body`\n\n\u26A0\uFE0F Important Constraints:\n\n- Do NOT perform input validation \u2014 assume `parameters` and `body` are\n already valid\n- Use `typia.random<T>()` with an explanatory comment if logic can't be\n implemented\n- Never use `any` or make assumptions without sufficient context\n- Use only allowed imports \u2014 DTOs and Prisma types\n- Use `MyGlobal.prisma` for DB access and respect Prisma typing rules\n\n\u26A0\uFE0F TypeScript-specific considerations:\n\n- Do **not** use native `Date` objects directly; always convert all dates\n using `toISOStringSafe()` and brand as `string &\n tags.Format<'date-time'>`. This rule applies throughout all phases.\n- Prefer `satisfies` for DTO conformance instead of unsafe `as` casts\n- Avoid weak typing such as `any`, `as any`, or `satisfies any`\n- Use branded types (e.g., `tags.Format<'uuid'>`) and literal unions where\n applicable\n\n\u2705 Example Structure:\n\n```ts\nexport async function doSomething(\n user: { id: string & tags.Format<\"uuid\">; type: string },\n parameters: IParams,\n body: IBody\n): Promise<IReturn> {\n const { id } = parameters;\n const { name } = body;\n const user = await MyGlobal.prisma.users.findFirst({ where: { id } });\n if (!user) throw new Error(\"User not found\");\n ...\n return result;\n}\n```\n\n\uD83D\uDD0D Feasibility Analysis Requirement:\n\n- Before generating any code, the agent **must analyze** whether the\n requested implementation is **feasible based on the given Prisma schema\n and DTO types**.\n- If required fields or relationships are **missing or incompatible**, the\n plan should explicitly state that the implementation is **not\n possible** with the current schema/DTO, and no code should be generated\n in later stages.\n- In such cases, only a detailed **comment in the `implementationCode`**\n should be returned explaining why the logic cannot be implemented.\n\n\uD83D\uDD25 Error Handling Plan:\n\nIf an error is expected or encountered during implementation:\n\n- Clearly document the error message(s) and TypeScript error codes.\n- Analyze the root cause (e.g., type mismatch, missing field, nullability\n issue).\n- Define concrete steps to resolve the issue, such as:\n\n - Adjusting type declarations or using Prisma-generated input types.\n - Using `?? undefined` to normalize nullable fields.\n - Applying correct relation handling (e.g., `connect` instead of direct\n foreign key assignment).\n - Ensuring all date fields use `.toISOString()` and proper branding.\n- Include fallback or workaround plans if a direct fix is complex.\n- If no error is present, simply omit this section.\n\nThis plan ensures the function will:\n\n- Respect the global architecture and coding conventions\n- Be safe, predictable, and aligned with upstream logic",
149
150
  type: "string"
150
151
  },
151
152
  prisma_schemas: {
152
- description: "Step 2.\n\nThe Prisma schema string that will be used to validate the implementation\nlogic in this file.\n\nYou must **explicitly specify only the relevant models and fields** from\nyour full schema that are used in this implementation. This ensures that\nyour logic is aligned with the expected database structure without\naccidentally introducing unrelated fields or models.\n\n\u26A0\uFE0F Important: The value of this field must be a valid Prisma schema\nstring containing only the models used in this code \u2014 not the entire\nschema.\n\nThis acts as a safeguard against:\n\n- Forgetting required fields used in this implementation\n- Including fields or models that are not actually used",
153
+ description: "Step 2 - Schema Definition (CoT: Context Establishment)\n\nThe Prisma schema string that will be used to validate the implementation\nlogic in this file.\n\nYou must **explicitly specify only the relevant models and fields** from\nyour full schema that are used in this implementation. This ensures that\nyour logic is aligned with the expected database structure without\naccidentally introducing unrelated fields or models.\n\n\u26A0\uFE0F Important: The value of this field must be a valid Prisma schema\nstring containing only the models used in this code \u2014 not the entire\nschema.\n\nThis acts as a safeguard against:\n\n- Forgetting required fields used in this implementation\n- Including fields or models that are not actually used",
153
154
  type: "string"
154
155
  },
155
156
  draft_without_date_type: {
156
- description: "Step 3.\n\nDraft WITHOUT using native Date type.\n\nThis is the initial drafting phase where you outline the basic skeleton\nof the function.\n\nDO NOT: Use the native Date type.\n\n- The function signature must correctly include `user`, `parameters`, and\n `body` arguments.\n- Design the main flow of business logic, such as DB fetches and early\n returns based on conditions.\n- Mark any incomplete or missing parts clearly with placeholders (e.g.,\n comments or temporary values).\n\nImport rules:\n\nDO NOT:\n- Add any new import statements manually\n- Write import statements directly (this causes compile errors)\n\nNote: All necessary imports are provided globally or by the system automatically.\n\n\u2705 Requirements:\n\n- Avoid using the `any` type at all costs to ensure type safety.\n- NEVER declare variables with `: Date` type\n- ALWAYS use `string & tags.Format<'date-time'>` for date values\n- Use `toISOStringSafe(new Date())` for current timestamps\n- Maintain a single-function structure; avoid using classes.",
157
+ description: "Step 3 - Initial Draft (CoT: First Implementation Attempt)\n\nDraft WITHOUT using native Date type.\n\nThis is the initial drafting phase where you outline the basic skeleton\nof the function.\n\nDO NOT: Use the native Date type.\n\n- The function signature must correctly include `user`, `parameters`, and\n `body` arguments.\n- Design the main flow of business logic, such as DB fetches and early\n returns based on conditions.\n- Mark any incomplete or missing parts clearly with placeholders (e.g.,\n comments or temporary values).\n\nImport rules:\n\nDO NOT:\n\n- Add any new import statements manually\n- Write import statements directly (this causes compile errors)\n\nNote: All necessary imports are provided globally or by the system\nautomatically.\n\n\u2705 Requirements:\n\n- Avoid using the `any` type at all costs to ensure type safety.\n- NEVER declare variables with `: Date` type\n- ALWAYS use `string & tags.Format<'date-time'>` for date values\n- Use `toISOStringSafe(new Date())` for current timestamps\n- Maintain a single-function structure; avoid using classes.",
157
158
  type: "string"
158
159
  },
159
160
  review: {
160
- description: "Step 4.\n\nA refined version of the draft with improved completeness.\n\n- Replace placeholder logic with real DTO-conformant operations.\n- Add error handling (`throw new Error(...)`) where necessary.\n- Begin resolving structural or type mismatches.\n\n\u2705 Requirements:\n\n- Use `satisfies` to ensure DTO conformity.\n- Avoid unsafe `as` casts unless only for branding or literal narrowing.\n- Use `toISOStringSafe()` for all date conversions (NOT `.toISOString()`).\n- Ensure all object keys strictly conform to the expected type definitions.",
161
- type: "string"
162
- },
163
- withCompilerFeedback: {
164
- description: "\uD83D\uDEE0 Phase 4-2: With compiler feedback (optional)\n\nA correction pass that applies fixes for compile-time errors that arose\nduring the review stage (if any).\n\n\u2705 Must:\n\n- Only include this field if TypeScript errors are detected in the Review\n phase.\n- Resolve all TypeScript errors without using `as any`.\n- Provide safe brand casting only if required (e.g., `as string &\n tags.Format<'uuid'>`).\n- If no TypeScript errors exist, this field MUST contain the text: \"No\n TypeScript errors detected - skipping this phase\"",
161
+ description: "Step 4 - Review and Refinement (CoT: Self-Reflection)\n\nA refined version of the draft with improved completeness.\n\n- Replace placeholder logic with real DTO-conformant operations.\n- Add error handling (`throw new Error(...)`) where necessary.\n- Begin resolving structural or type mismatches.\n\n\u2705 Requirements:\n\n- Use `satisfies` to ensure DTO conformity.\n- Avoid unsafe `as` casts unless only for branding or literal narrowing.\n- Use `toISOStringSafe()` for all date conversions (NOT `.toISOString()`).\n- Ensure all object keys strictly conform to the expected type definitions.\n- NEVER use `mode: \"insensitive\"` in string operations (breaks SQLite).",
165
162
  type: "string"
166
163
  },
167
164
  implementationCode: {
168
- description: "Step 5.\n\nThe complete and fully correct TypeScript function implementation.\n\n- Passes strict type checking without errors.\n- Uses only safe branding or literal type assertions.\n- Converts all date values properly using `toISOStringSafe()`.\n- Follows DTO structures using `satisfies`.\n- Avoids any weak typing such as `any`, `as any`, or `satisfies any`.\n- Uses only allowed imports (e.g., from `../api/structures` and\n `MyGlobal.prisma`).\n- NEVER creates intermediate variables for Prisma operations.\n\n\u26A0\uFE0F Fallback Behavior:\n\n- If the `plan` phase explicitly determines that the requested logic is\n **not feasible** due to mismatches or limitations in the provided\n Prisma schema and DTO types:\n\n - The implementation must still return a syntactically valid function.\n - In such cases, return mock data using `typia.random<T>()` wrapped in the\n correct structure, along with a comment explaining the limitation.\n\n Example fallback:\n\n```ts\n // \u26A0\uFE0F Cannot implement logic due to missing relation between A and B\n export async function someFunction(...) {\n return typia.random<IReturn>(); // mocked output\n }\n```\n\n\u26A0\uFE0F Prohibited Practices:\n\n- Do NOT add or modify import statements manually. Imports are handled\n automatically by the system.\n- Do NOT use `any`, `as any`, or `satisfies any` to bypass type checking.\n- Do NOT assign native `Date` objects directly; always convert them using\n `toISOStringSafe()`.\n- Do NOT use unsafe type assertions except for safe branding or literal\n narrowing.\n- Do NOT write code outside the single async function structure (e.g., no\n classes or multiple functions).\n- Do NOT perform any input validation \u2014 assume all inputs are already\n validated.\n- Do NOT use dynamic import expressions (`import()`); all imports must be\n static.\n- Do NOT use Prisma-generated input types; always use types from\n `../api/structures`.\n- Do NOT use `Object.prototype.hasOwnProperty.call()` for field checks.\n- Do NOT escape newlines or quotes in the implementation string (e.g., no\n `\\\\n` or `\\\"`); use a properly formatted template literal with actual\n line breaks instead.",
165
+ description: "Step 5 - Complete Implementation (CoT: Final Synthesis)\n\nThe complete and fully correct TypeScript function implementation.\n\n- Passes strict type checking without errors.\n- Uses only safe branding or literal type assertions.\n- Converts all date values properly using `toISOStringSafe()`.\n- Follows DTO structures using `satisfies`.\n- Avoids any weak typing such as `any`, `as any`, or `satisfies any`.\n- Uses only allowed imports (e.g., from `../api/structures` and\n `MyGlobal.prisma`).\n- NEVER creates intermediate variables for Prisma operations.\n- NEVER uses `mode: \"insensitive\"` (PostgreSQL-only, breaks SQLite).\n\n\u26A0\uFE0F Fallback Behavior:\n\n- If the `plan` phase explicitly determines that the requested logic is\n **not feasible** due to mismatches or limitations in the provided\n Prisma schema and DTO types:\n\n - The implementation must still return a syntactically valid function.\n - In such cases, return mock data using `typia.random<T>()` wrapped in the\n correct structure, along with a comment explaining the limitation.\n\n Example fallback:\n\n```ts\n // \u26A0\uFE0F Cannot implement logic due to missing relation between A and B\n export async function someFunction(...) {\n return typia.random<IReturn>(); // mocked output\n }\n```\n\n\u26A0\uFE0F Prohibited Practices:\n\n- Do NOT add or modify import statements manually. Imports are handled\n automatically by the system.\n- Do NOT use `any`, `as any`, or `satisfies any` to bypass type checking.\n- Do NOT assign native `Date` objects directly; always convert them using\n `toISOStringSafe()`.\n- Do NOT use unsafe type assertions except for safe branding or literal\n narrowing.\n- Do NOT write code outside the single async function structure (e.g., no\n classes or multiple functions).\n- Do NOT perform any input validation \u2014 assume all inputs are already\n validated.\n- Do NOT use dynamic import expressions (`import()`); all imports must be\n static.\n- Do NOT use Prisma-generated input types; always use types from\n `../api/structures`.\n- Do NOT use `Object.prototype.hasOwnProperty.call()` for field checks.\n- Do NOT escape newlines or quotes in the implementation string (e.g., no\n `\\\\n` or `\\\"`); use a properly formatted template literal with actual\n line breaks instead.",
169
166
  type: "string"
170
167
  }
171
168
  },
@@ -174,13 +171,13 @@ const claude = {
174
171
  "prisma_schemas",
175
172
  "draft_without_date_type",
176
173
  "review",
177
- "withCompilerFeedback",
178
174
  "implementationCode"
179
175
  ],
180
176
  additionalProperties: false,
181
177
  $defs: {}
182
178
  },
183
- validate: (() => { const _io0 = input => "string" === typeof input.plan && "string" === typeof input.prisma_schemas && "string" === typeof input.draft_without_date_type && "string" === typeof input.review && "string" === typeof input.withCompilerFeedback && "string" === typeof input.implementationCode; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.plan || _report(_exceptionable, {
179
+ description: "Generates provider function implementation through multi-phase development.\n\nThis method implements a systematic approach to generate NestJS provider\nfunctions that handle business logic for API operations. It follows a\nschema-first approach with multiple refinement phases to ensure type-safe,\nerror-free code generation.\n\nThe generation process includes:\n1. Strategic planning based on Prisma schema analysis\n2. Initial draft without Date type usage\n3. Review and refinement for completeness\n4. Compiler feedback integration if errors detected\n5. Final implementation with all validations and type safety",
180
+ validate: (() => { const _io0 = input => "string" === typeof input.plan && "string" === typeof input.prisma_schemas && "string" === typeof input.draft_without_date_type && "string" === typeof input.review && "string" === typeof input.implementationCode; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.plan || _report(_exceptionable, {
184
181
  path: _path + ".plan",
185
182
  expected: "string",
186
183
  value: input.plan
@@ -196,10 +193,6 @@ const claude = {
196
193
  path: _path + ".review",
197
194
  expected: "string",
198
195
  value: input.review
199
- }), "string" === typeof input.withCompilerFeedback || _report(_exceptionable, {
200
- path: _path + ".withCompilerFeedback",
201
- expected: "string",
202
- value: input.withCompilerFeedback
203
196
  }), "string" === typeof input.implementationCode || _report(_exceptionable, {
204
197
  path: _path + ".implementationCode",
205
198
  expected: "string",
@@ -247,31 +240,27 @@ const collection = {
247
240
  {
248
241
  name: "coding",
249
242
  parameters: {
250
- description: "Current Type: {@link IAutoBeRealizeWriteApplication.IProps}",
243
+ description: " Properties containing the multi-phase implementation plan and code\n\n------------------------------\n\nDescription of the current {@link IAutoBeRealizeWriteApplication.IProps} type:\n\n> Properties for the Realize Write Application following Chain of Thinking (CoT).\n> \n> Each field represents a distinct phase in the reasoning and implementation process,\n> building upon the previous step to create a complete, error-free implementation.\n> This structured approach ensures clarity, debuggability, and systematic thinking.",
251
244
  type: "object",
252
245
  properties: {
253
246
  plan: {
254
- description: "Step 1.\n\n\uD83E\uDDE0 Provider Function Implementation Plan\n\nThis field outlines the strategic plan for implementing the provider\nfunction according to the Realize Coder Agent specification. Before\nwriting the actual code, think through the logic and structure.\n\nThe plan follows a SCHEMA-FIRST APPROACH:\n\n\uD83D\uDCCB STEP 1 - PRISMA SCHEMA VERIFICATION:\n\nDO:\n- Examine the actual Prisma schema model definition\n- List EVERY field that exists in the model with exact types\n- Explicitly note fields that DO NOT exist\n\nDO NOT:\n- Assume common fields exist without verification\n- Use fields like deleted_at, created_by, updated_by, is_deleted, is_active without checking\n\n\uD83D\uDCCB STEP 2 - FIELD INVENTORY:\n\n- List ONLY fields confirmed to exist in schema\n- Example: \"Verified fields in user model: id (String), email (String),\n created_at (DateTime), updated_at (DateTime)\"\n- Example: \"Fields that DO NOT exist: deleted_at, is_active, created_by\"\n\n\uD83D\uDCCB STEP 3 - FIELD ACCESS STRATEGY:\n\n- Plan which verified fields will be used in select, update, create\n operations\n- For complex operations with type errors, plan to use separate queries\n instead of nested operations\n\n\uD83D\uDCCB STEP 4 - TYPE COMPATIBILITY:\n\n- Plan DateTime to ISO string conversions using toISOStringSafe()\n- Plan handling of nullable vs required fields\n\n\uD83D\uDCCB STEP 5 - IMPLEMENTATION APPROACH:\n\n- \uD83E\uDDE9 Required business entities (e.g., users, posts, logs) and their\n relationships\n- \uD83D\uDEE0 Operations needed to fulfill the business scenario (e.g., fetch,\n create, update) using ONLY verified fields\n- \uD83D\uDD04 Data dependencies between steps (e.g., use userId to fetch related\n data)\n- \u2705 Validation points (based on business rules, not field presence)\n- \uD83D\uDEA7 Error and edge cases that must be handled explicitly (e.g., missing\n records)\n- \uD83C\uDFD7 Structure: always a single `async function`, using only `parameters`\n and `body`\n\n\u26A0\uFE0F Important Constraints:\n\n- Do NOT perform input validation \u2014 assume `parameters` and `body` are\n already valid\n- Use `typia.random<T>()` with an explanatory comment if logic can't be\n implemented\n- Never use `any` or make assumptions without sufficient context\n- Use only allowed imports \u2014 DTOs and Prisma types\n- Use `MyGlobal.prisma` for DB access and respect Prisma typing rules\n\n\u26A0\uFE0F TypeScript-specific considerations:\n\n- Do **not** use native `Date` objects directly; always convert all dates\n using `toISOStringSafe()` and brand as `string &\n tags.Format<'date-time'>`. This rule applies throughout all phases.\n- Prefer `satisfies` for DTO conformance instead of unsafe `as` casts\n- Avoid weak typing such as `any`, `as any`, or `satisfies any`\n- Use branded types (e.g., `tags.Format<'uuid'>`) and literal unions where\n applicable\n\n\u2705 Example Structure:\n\n```ts\nexport async function doSomething(\n user: { id: string & tags.Format<\"uuid\">; type: string },\n parameters: IParams,\n body: IBody\n): Promise<IReturn> {\n const { id } = parameters;\n const { name } = body;\n const user = await MyGlobal.prisma.users.findFirst({ where: { id } });\n if (!user) throw new Error(\"User not found\");\n ...\n return result;\n}\n```\n\n\uD83D\uDD0D Feasibility Analysis Requirement:\n\n- Before generating any code, the agent **must analyze** whether the\n requested implementation is **feasible based on the given Prisma schema\n and DTO types**.\n- If required fields or relationships are **missing or incompatible**, the\n plan should explicitly state that the implementation is **not\n possible** with the current schema/DTO, and no code should be generated\n in later stages.\n- In such cases, only a detailed **comment in the `implementationCode`**\n should be returned explaining why the logic cannot be implemented.\n\n\uD83D\uDD25 Error Handling Plan:\n\nIf an error is expected or encountered during implementation:\n\n- Clearly document the error message(s) and TypeScript error codes.\n- Analyze the root cause (e.g., type mismatch, missing field, nullability\n issue).\n- Define concrete steps to resolve the issue, such as:\n\n - Adjusting type declarations or using Prisma-generated input types.\n - Using `?? undefined` to normalize nullable fields.\n - Applying correct relation handling (e.g., `connect` instead of direct\n foreign key assignment).\n - Ensuring all date fields use `.toISOString()` and proper branding.\n- Include fallback or workaround plans if a direct fix is complex.\n- If no error is present, simply omit this section.\n\nThis plan ensures the function will:\n\n- Respect the global architecture and coding conventions\n- Be safe, predictable, and aligned with upstream logic",
247
+ description: "Step 1 - Planning Phase (CoT: Initial Reasoning)\n\n\uD83E\uDDE0 Provider Function Implementation Plan\n\nThis field outlines the strategic plan for implementing the provider\nfunction according to the Realize Coder Agent specification. Before\nwriting the actual code, think through the logic and structure.\n\nThe plan follows a SCHEMA-FIRST APPROACH:\n\n\uD83D\uDCCB STEP 1 - PRISMA SCHEMA VERIFICATION:\n\nDO:\n\n- Examine the actual Prisma schema model definition\n- List EVERY field that exists in the model with exact types\n- Explicitly note fields that DO NOT exist\n- Verify database compatibility (PostgreSQL AND SQLite)\n\nDO NOT:\n\n- Assume common fields exist without verification\n- Use fields like deleted_at, created_by, updated_by, is_deleted, is_active\n without checking\n- Use PostgreSQL-specific features like mode: \"insensitive\"\n\n\uD83D\uDCCB STEP 2 - FIELD INVENTORY:\n\n- List ONLY fields confirmed to exist in schema\n- Example: \"Verified fields in user model: id (String), email (String),\n created_at (DateTime), updated_at (DateTime)\"\n- Example: \"Fields that DO NOT exist: deleted_at, is_active, created_by\"\n\n\uD83D\uDCCB STEP 3 - FIELD ACCESS STRATEGY:\n\n- Plan which verified fields will be used in select, update, create\n operations\n- For complex operations with type errors, plan to use separate queries\n instead of nested operations\n\n\uD83D\uDCCB STEP 4 - TYPE COMPATIBILITY:\n\n- Plan DateTime to ISO string conversions using toISOStringSafe()\n- Plan handling of nullable vs required fields\n\n\uD83D\uDCCB STEP 5 - IMPLEMENTATION APPROACH:\n\n- \uD83E\uDDE9 Required business entities (e.g., users, posts, logs) and their\n relationships\n- \uD83D\uDEE0 Operations needed to fulfill the business scenario (e.g., fetch,\n create, update) using ONLY verified fields\n- \uD83D\uDD04 Data dependencies between steps (e.g., use userId to fetch related\n data)\n- \u2705 Validation points (based on business rules, not field presence)\n- \uD83D\uDEA7 Error and edge cases that must be handled explicitly (e.g., missing\n records)\n- \uD83C\uDFD7 Structure: always a single `async function`, using only `parameters`\n and `body`\n\n\u26A0\uFE0F Important Constraints:\n\n- Do NOT perform input validation \u2014 assume `parameters` and `body` are\n already valid\n- Use `typia.random<T>()` with an explanatory comment if logic can't be\n implemented\n- Never use `any` or make assumptions without sufficient context\n- Use only allowed imports \u2014 DTOs and Prisma types\n- Use `MyGlobal.prisma` for DB access and respect Prisma typing rules\n\n\u26A0\uFE0F TypeScript-specific considerations:\n\n- Do **not** use native `Date` objects directly; always convert all dates\n using `toISOStringSafe()` and brand as `string &\n tags.Format<'date-time'>`. This rule applies throughout all phases.\n- Prefer `satisfies` for DTO conformance instead of unsafe `as` casts\n- Avoid weak typing such as `any`, `as any`, or `satisfies any`\n- Use branded types (e.g., `tags.Format<'uuid'>`) and literal unions where\n applicable\n\n\u2705 Example Structure:\n\n```ts\nexport async function doSomething(\n user: { id: string & tags.Format<\"uuid\">; type: string },\n parameters: IParams,\n body: IBody\n): Promise<IReturn> {\n const { id } = parameters;\n const { name } = body;\n const user = await MyGlobal.prisma.users.findFirst({ where: { id } });\n if (!user) throw new Error(\"User not found\");\n ...\n return result;\n}\n```\n\n\uD83D\uDD0D Feasibility Analysis Requirement:\n\n- Before generating any code, the agent **must analyze** whether the\n requested implementation is **feasible based on the given Prisma schema\n and DTO types**.\n- If required fields or relationships are **missing or incompatible**, the\n plan should explicitly state that the implementation is **not\n possible** with the current schema/DTO, and no code should be generated\n in later stages.\n- In such cases, only a detailed **comment in the `implementationCode`**\n should be returned explaining why the logic cannot be implemented.\n\n\uD83D\uDD25 Error Handling Plan:\n\nIf an error is expected or encountered during implementation:\n\n- Clearly document the error message(s) and TypeScript error codes.\n- Analyze the root cause (e.g., type mismatch, missing field, nullability\n issue).\n- Define concrete steps to resolve the issue, such as:\n\n - Adjusting type declarations or using Prisma-generated input types.\n - Using `?? undefined` to normalize nullable fields.\n - Applying correct relation handling (e.g., `connect` instead of direct\n foreign key assignment).\n - Ensuring all date fields use `.toISOString()` and proper branding.\n- Include fallback or workaround plans if a direct fix is complex.\n- If no error is present, simply omit this section.\n\nThis plan ensures the function will:\n\n- Respect the global architecture and coding conventions\n- Be safe, predictable, and aligned with upstream logic",
255
248
  type: "string"
256
249
  },
257
250
  prisma_schemas: {
258
- description: "Step 2.\n\nThe Prisma schema string that will be used to validate the implementation\nlogic in this file.\n\nYou must **explicitly specify only the relevant models and fields** from\nyour full schema that are used in this implementation. This ensures that\nyour logic is aligned with the expected database structure without\naccidentally introducing unrelated fields or models.\n\n\u26A0\uFE0F Important: The value of this field must be a valid Prisma schema\nstring containing only the models used in this code \u2014 not the entire\nschema.\n\nThis acts as a safeguard against:\n\n- Forgetting required fields used in this implementation\n- Including fields or models that are not actually used",
251
+ description: "Step 2 - Schema Definition (CoT: Context Establishment)\n\nThe Prisma schema string that will be used to validate the implementation\nlogic in this file.\n\nYou must **explicitly specify only the relevant models and fields** from\nyour full schema that are used in this implementation. This ensures that\nyour logic is aligned with the expected database structure without\naccidentally introducing unrelated fields or models.\n\n\u26A0\uFE0F Important: The value of this field must be a valid Prisma schema\nstring containing only the models used in this code \u2014 not the entire\nschema.\n\nThis acts as a safeguard against:\n\n- Forgetting required fields used in this implementation\n- Including fields or models that are not actually used",
259
252
  type: "string"
260
253
  },
261
254
  draft_without_date_type: {
262
- description: "Step 3.\n\nDraft WITHOUT using native Date type.\n\nThis is the initial drafting phase where you outline the basic skeleton\nof the function.\n\nDO NOT: Use the native Date type.\n\n- The function signature must correctly include `user`, `parameters`, and\n `body` arguments.\n- Design the main flow of business logic, such as DB fetches and early\n returns based on conditions.\n- Mark any incomplete or missing parts clearly with placeholders (e.g.,\n comments or temporary values).\n\nImport rules:\n\nDO NOT:\n- Add any new import statements manually\n- Write import statements directly (this causes compile errors)\n\nNote: All necessary imports are provided globally or by the system automatically.\n\n\u2705 Requirements:\n\n- Avoid using the `any` type at all costs to ensure type safety.\n- NEVER declare variables with `: Date` type\n- ALWAYS use `string & tags.Format<'date-time'>` for date values\n- Use `toISOStringSafe(new Date())` for current timestamps\n- Maintain a single-function structure; avoid using classes.",
255
+ description: "Step 3 - Initial Draft (CoT: First Implementation Attempt)\n\nDraft WITHOUT using native Date type.\n\nThis is the initial drafting phase where you outline the basic skeleton\nof the function.\n\nDO NOT: Use the native Date type.\n\n- The function signature must correctly include `user`, `parameters`, and\n `body` arguments.\n- Design the main flow of business logic, such as DB fetches and early\n returns based on conditions.\n- Mark any incomplete or missing parts clearly with placeholders (e.g.,\n comments or temporary values).\n\nImport rules:\n\nDO NOT:\n\n- Add any new import statements manually\n- Write import statements directly (this causes compile errors)\n\nNote: All necessary imports are provided globally or by the system\nautomatically.\n\n\u2705 Requirements:\n\n- Avoid using the `any` type at all costs to ensure type safety.\n- NEVER declare variables with `: Date` type\n- ALWAYS use `string & tags.Format<'date-time'>` for date values\n- Use `toISOStringSafe(new Date())` for current timestamps\n- Maintain a single-function structure; avoid using classes.",
263
256
  type: "string"
264
257
  },
265
258
  review: {
266
- description: "Step 4.\n\nA refined version of the draft with improved completeness.\n\n- Replace placeholder logic with real DTO-conformant operations.\n- Add error handling (`throw new Error(...)`) where necessary.\n- Begin resolving structural or type mismatches.\n\n\u2705 Requirements:\n\n- Use `satisfies` to ensure DTO conformity.\n- Avoid unsafe `as` casts unless only for branding or literal narrowing.\n- Use `toISOStringSafe()` for all date conversions (NOT `.toISOString()`).\n- Ensure all object keys strictly conform to the expected type definitions.",
267
- type: "string"
268
- },
269
- withCompilerFeedback: {
270
- description: "\uD83D\uDEE0 Phase 4-2: With compiler feedback (optional)\n\nA correction pass that applies fixes for compile-time errors that arose\nduring the review stage (if any).\n\n\u2705 Must:\n\n- Only include this field if TypeScript errors are detected in the Review\n phase.\n- Resolve all TypeScript errors without using `as any`.\n- Provide safe brand casting only if required (e.g., `as string &\n tags.Format<'uuid'>`).\n- If no TypeScript errors exist, this field MUST contain the text: \"No\n TypeScript errors detected - skipping this phase\"",
259
+ description: "Step 4 - Review and Refinement (CoT: Self-Reflection)\n\nA refined version of the draft with improved completeness.\n\n- Replace placeholder logic with real DTO-conformant operations.\n- Add error handling (`throw new Error(...)`) where necessary.\n- Begin resolving structural or type mismatches.\n\n\u2705 Requirements:\n\n- Use `satisfies` to ensure DTO conformity.\n- Avoid unsafe `as` casts unless only for branding or literal narrowing.\n- Use `toISOStringSafe()` for all date conversions (NOT `.toISOString()`).\n- Ensure all object keys strictly conform to the expected type definitions.\n- NEVER use `mode: \"insensitive\"` in string operations (breaks SQLite).",
271
260
  type: "string"
272
261
  },
273
262
  implementationCode: {
274
- description: "Step 5.\n\nThe complete and fully correct TypeScript function implementation.\n\n- Passes strict type checking without errors.\n- Uses only safe branding or literal type assertions.\n- Converts all date values properly using `toISOStringSafe()`.\n- Follows DTO structures using `satisfies`.\n- Avoids any weak typing such as `any`, `as any`, or `satisfies any`.\n- Uses only allowed imports (e.g., from `../api/structures` and\n `MyGlobal.prisma`).\n- NEVER creates intermediate variables for Prisma operations.\n\n\u26A0\uFE0F Fallback Behavior:\n\n- If the `plan` phase explicitly determines that the requested logic is\n **not feasible** due to mismatches or limitations in the provided\n Prisma schema and DTO types:\n\n - The implementation must still return a syntactically valid function.\n - In such cases, return mock data using `typia.random<T>()` wrapped in the\n correct structure, along with a comment explaining the limitation.\n\n Example fallback:\n\n```ts\n // \u26A0\uFE0F Cannot implement logic due to missing relation between A and B\n export async function someFunction(...) {\n return typia.random<IReturn>(); // mocked output\n }\n```\n\n\u26A0\uFE0F Prohibited Practices:\n\n- Do NOT add or modify import statements manually. Imports are handled\n automatically by the system.\n- Do NOT use `any`, `as any`, or `satisfies any` to bypass type checking.\n- Do NOT assign native `Date` objects directly; always convert them using\n `toISOStringSafe()`.\n- Do NOT use unsafe type assertions except for safe branding or literal\n narrowing.\n- Do NOT write code outside the single async function structure (e.g., no\n classes or multiple functions).\n- Do NOT perform any input validation \u2014 assume all inputs are already\n validated.\n- Do NOT use dynamic import expressions (`import()`); all imports must be\n static.\n- Do NOT use Prisma-generated input types; always use types from\n `../api/structures`.\n- Do NOT use `Object.prototype.hasOwnProperty.call()` for field checks.\n- Do NOT escape newlines or quotes in the implementation string (e.g., no\n `\\\\n` or `\\\"`); use a properly formatted template literal with actual\n line breaks instead.",
263
+ description: "Step 5 - Complete Implementation (CoT: Final Synthesis)\n\nThe complete and fully correct TypeScript function implementation.\n\n- Passes strict type checking without errors.\n- Uses only safe branding or literal type assertions.\n- Converts all date values properly using `toISOStringSafe()`.\n- Follows DTO structures using `satisfies`.\n- Avoids any weak typing such as `any`, `as any`, or `satisfies any`.\n- Uses only allowed imports (e.g., from `../api/structures` and\n `MyGlobal.prisma`).\n- NEVER creates intermediate variables for Prisma operations.\n- NEVER uses `mode: \"insensitive\"` (PostgreSQL-only, breaks SQLite).\n\n\u26A0\uFE0F Fallback Behavior:\n\n- If the `plan` phase explicitly determines that the requested logic is\n **not feasible** due to mismatches or limitations in the provided\n Prisma schema and DTO types:\n\n - The implementation must still return a syntactically valid function.\n - In such cases, return mock data using `typia.random<T>()` wrapped in the\n correct structure, along with a comment explaining the limitation.\n\n Example fallback:\n\n```ts\n // \u26A0\uFE0F Cannot implement logic due to missing relation between A and B\n export async function someFunction(...) {\n return typia.random<IReturn>(); // mocked output\n }\n```\n\n\u26A0\uFE0F Prohibited Practices:\n\n- Do NOT add or modify import statements manually. Imports are handled\n automatically by the system.\n- Do NOT use `any`, `as any`, or `satisfies any` to bypass type checking.\n- Do NOT assign native `Date` objects directly; always convert them using\n `toISOStringSafe()`.\n- Do NOT use unsafe type assertions except for safe branding or literal\n narrowing.\n- Do NOT write code outside the single async function structure (e.g., no\n classes or multiple functions).\n- Do NOT perform any input validation \u2014 assume all inputs are already\n validated.\n- Do NOT use dynamic import expressions (`import()`); all imports must be\n static.\n- Do NOT use Prisma-generated input types; always use types from\n `../api/structures`.\n- Do NOT use `Object.prototype.hasOwnProperty.call()` for field checks.\n- Do NOT escape newlines or quotes in the implementation string (e.g., no\n `\\\\n` or `\\\"`); use a properly formatted template literal with actual\n line breaks instead.",
275
264
  type: "string"
276
265
  }
277
266
  },
@@ -280,13 +269,13 @@ const collection = {
280
269
  "prisma_schemas",
281
270
  "draft_without_date_type",
282
271
  "review",
283
- "withCompilerFeedback",
284
272
  "implementationCode"
285
273
  ],
286
274
  additionalProperties: false,
287
275
  $defs: {}
288
276
  },
289
- validate: (() => { const _io0 = input => "string" === typeof input.plan && "string" === typeof input.prisma_schemas && "string" === typeof input.draft_without_date_type && "string" === typeof input.review && "string" === typeof input.withCompilerFeedback && "string" === typeof input.implementationCode; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.plan || _report(_exceptionable, {
277
+ description: "Generates provider function implementation through multi-phase development.\n\nThis method implements a systematic approach to generate NestJS provider\nfunctions that handle business logic for API operations. It follows a\nschema-first approach with multiple refinement phases to ensure type-safe,\nerror-free code generation.\n\nThe generation process includes:\n1. Strategic planning based on Prisma schema analysis\n2. Initial draft without Date type usage\n3. Review and refinement for completeness\n4. Compiler feedback integration if errors detected\n5. Final implementation with all validations and type safety",
278
+ validate: (() => { const _io0 = input => "string" === typeof input.plan && "string" === typeof input.prisma_schemas && "string" === typeof input.draft_without_date_type && "string" === typeof input.review && "string" === typeof input.implementationCode; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.plan || _report(_exceptionable, {
290
279
  path: _path + ".plan",
291
280
  expected: "string",
292
281
  value: input.plan
@@ -302,10 +291,6 @@ const collection = {
302
291
  path: _path + ".review",
303
292
  expected: "string",
304
293
  value: input.review
305
- }), "string" === typeof input.withCompilerFeedback || _report(_exceptionable, {
306
- path: _path + ".withCompilerFeedback",
307
- expected: "string",
308
- value: input.withCompilerFeedback
309
294
  }), "string" === typeof input.implementationCode || _report(_exceptionable, {
310
295
  path: _path + ".implementationCode",
311
296
  expected: "string",
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrateRealizeWrite.js","sourceRoot":"","sources":["../../../../../src/orchestrate/realize/orchestrateRealizeWrite.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"orchestrateRealizeWrite.js","sourceRoot":"","sources":["../../../../../src/orchestrate/realize/orchestrateRealizeWrite.ts"],"names":[],"mappings":"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"}
@@ -1,5 +1,22 @@
1
1
  import { CamelPattern, PascalPattern } from "@autobe/interface";
2
2
  export interface IAutoBeRealizeAuthorizationApplication {
3
+ /**
4
+ * Generates authentication provider, decorator, and payload type for role-based authorization.
5
+ *
6
+ * This method creates a complete authentication infrastructure for a specific
7
+ * role in the NestJS application. It generates three interconnected components
8
+ * that work together to provide JWT-based authentication and authorization.
9
+ *
10
+ * The generated components include:
11
+ * - **Provider Function**: Handles JWT verification and user validation from database
12
+ * - **Decorator**: NestJS parameter decorator for injecting authenticated user data
13
+ * - **Payload Type**: TypeScript interface defining the authenticated user structure
14
+ *
15
+ * All components follow strict naming conventions and integrate with the existing
16
+ * authentication architecture using the shared jwtAuthorize function.
17
+ *
18
+ * @param next Properties containing provider, decorator, and payload type configurations
19
+ */
3
20
  createDecorator: (next: IAutoBeRealizeAuthorizationApplication.IProps) => void;
4
21
  }
5
22
  export declare namespace IAutoBeRealizeAuthorizationApplication {
@@ -1,5 +1,25 @@
1
1
  import { IAutoBeRealizeAuthorizationApplication } from "./IAutoBeRealizeAuthorizationApplication";
2
2
  export interface IAutoBeRealizeAuthorizationCorrectApplication {
3
+ /**
4
+ * Corrects TypeScript compilation errors in authentication components.
5
+ *
6
+ * This method analyzes and fixes compilation errors in previously generated
7
+ * authentication provider, decorator, and payload type implementations. It
8
+ * performs systematic error diagnosis and generates corrected versions of
9
+ * all three components while maintaining their interconnected functionality.
10
+ *
11
+ * The correction process includes:
12
+ * - TypeScript error analysis and categorization by component
13
+ * - Identification of type mismatches, import issues, and syntax errors
14
+ * - Clear solution guidance for each identified problem
15
+ * - Regeneration of all components with fixes applied
16
+ *
17
+ * The corrected components maintain the same naming conventions and
18
+ * architectural patterns as the original generation while resolving all
19
+ * compilation issues.
20
+ *
21
+ * @param next Properties containing error analysis, solution guidance, and corrected components
22
+ */
3
23
  correctDecorator: (next: IAutoBeRealizeAuthorizationCorrectApplication.IProps) => void;
4
24
  }
5
25
  export declare namespace IAutoBeRealizeAuthorizationCorrectApplication {
@@ -1,79 +1,39 @@
1
- import { IAutoBeRealizeWriteApplication } from "./IAutoBeRealizeWriteApplication";
2
1
  export interface IAutoBeRealizeCorrectApplication {
2
+ /**
3
+ * Reviews and corrects TypeScript compilation errors.
4
+ *
5
+ * Fixes TypeScript compilation errors while preserving original business
6
+ * logic, applying minimal intervention principle.
7
+ *
8
+ * @param props Properties containing the multi-phase error correction process
9
+ */
3
10
  review: (props: IAutoBeRealizeCorrectApplication.IProps) => void;
4
11
  }
5
12
  export declare namespace IAutoBeRealizeCorrectApplication {
6
- interface IProps extends IAutoBeRealizeWriteApplication.IProps {
7
- /**
8
- * Compilation Error Analysis and Resolution Strategy
9
- *
10
- * This field contains a detailed analysis of TypeScript compilation errors
11
- * that occurred during the previous compilation attempt, along with
12
- * specific strategies to resolve each error.
13
- *
14
- * The analysis MUST include:
15
- *
16
- * 📊 ERROR BREAKDOWN:
17
- *
18
- * - List of all TypeScript error codes encountered (e.g., TS2339, TS2345)
19
- * - Exact error messages and the lines/files where they occurred
20
- * - Categorization of errors by type (type mismatch, missing property, etc.)
21
- *
22
- * 🔍 ROOT CAUSE ANALYSIS:
23
- *
24
- * - Why each error occurred (e.g., incorrect type assumptions, missing
25
- * fields)
26
- * - Relationship between errors (e.g., cascading errors from a single issue)
27
- * - Common patterns identified across multiple errors
28
- *
29
- * 🛠 RESOLUTION STRATEGY:
30
- *
31
- * - Specific fixes for each error type
32
- * - Priority order for addressing errors (fix critical errors first)
33
- * - Alternative approaches if the direct fix is not possible
34
- *
35
- * 📝 SCHEMA VERIFICATION:
36
- *
37
- * - Re-verification of Prisma schema fields actually available
38
- * - Identification of assumed fields that don't exist
39
- * - Correct field types and relationships
40
- *
41
- * ⚠️ COMMON ERROR PATTERNS TO CHECK:
42
- *
43
- * - Using non-existent fields (e.g., deleted_at, created_by)
44
- * - Type mismatches in Prisma operations
45
- * - Incorrect date handling (using Date instead of string)
46
- * - Missing required fields in create/update operations
47
- * - Incorrect relation handling in nested operations
48
- *
49
- * 🎯 CORRECTION APPROACH:
50
- *
51
- * - Remove references to non-existent fields
52
- * - Fix type conversions (especially dates with toISOStringSafe())
53
- * - Simplify complex nested operations into separate queries
54
- * - Add missing required fields
55
- * - Use correct Prisma input types
56
- *
57
- * Example structure:
58
- *
59
- * Errors Found:
60
- * 1. TS2339: Property 'deleted_at' does not exist on type 'User'
61
- * - Cause: Field assumed but not in schema
62
- * - Fix: Remove all deleted_at references
63
- *
64
- * 2. TS2345: Type 'Date' is not assignable to type 'string'
65
- * - Cause: Direct Date assignment without conversion
66
- * - Fix: Use toISOStringSafe() for all date values
67
- *
68
- * Resolution Plan:
69
- * 1. First, remove all non-existent field references
70
- * 2. Then, fix all date type conversions
71
- * 3. Finally, adjust Prisma query structures
72
- *
73
- * This analysis ensures the review process addresses all compilation errors
74
- * systematically and produces error-free code in the corrected
75
- * implementation.
76
- */
77
- errorAnalysis: string;
13
+ /**
14
+ * Properties for error correction following Chain of Thinking (CoT).
15
+ *
16
+ * All phases are wrapped in a `revise` object for systematic error
17
+ * resolution.
18
+ */
19
+ interface IProps {
20
+ /** Revision process containing all error correction phases. */
21
+ revise: IRevise;
22
+ }
23
+ interface IRevise {
24
+ /** Step 1: Compilation error analysis and resolution strategy. */
25
+ errorAnalysis?: string;
26
+ /** Step 2: Provider function implementation plan. */
27
+ plan?: string;
28
+ /** Step 3: Relevant Prisma schema definitions. */
29
+ prismaSchemas?: string;
30
+ /** Step 4: Initial draft without using native Date type. */
31
+ draftWithoutDateType?: string;
32
+ /** Step 5: Refined version with improved completeness. */
33
+ review?: string;
34
+ /** Step 6: Corrected implementation after compiler feedback. */
35
+ withCompilerFeedback?: string;
36
+ /** Step 7: Final complete TypeScript function implementation. */
37
+ implementationCode: string;
78
38
  }
79
39
  }
@@ -0,0 +1,5 @@
1
+ import { AutoBeRealizeFunction, IAutoBeTypeScriptCompileResult } from "@autobe/interface";
2
+ export interface IAutoBeRealizeFunctionFailure {
3
+ function: AutoBeRealizeFunction;
4
+ diagnostics: IAutoBeTypeScriptCompileResult.IDiagnostic[];
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IAutoBeRealizeFunctionFailure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IAutoBeRealizeFunctionFailure.js","sourceRoot":"","sources":["../../../../../../src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.ts"],"names":[],"mappings":""}
@@ -1,10 +1,7 @@
1
- import { AutoBeOpenApi, AutoBeRealizeAuthorization } from "@autobe/interface";
2
-
3
- export namespace IAutoBeRealizeScenarioApplication {
4
- export interface IProps {
1
+ import { AutoBeOpenApi, AutoBeRealizeAuthorization, AutoBeTestFile } from "@autobe/interface";
2
+ export interface IAutoBeRealizeScenarioResult {
5
3
  /** The OpenAPI operation to be realized. */
6
4
  operation: AutoBeOpenApi.IOperation;
7
-
8
5
  /**
9
6
  * The name of the function to be generated.
10
7
  *
@@ -17,10 +14,8 @@ export namespace IAutoBeRealizeScenarioApplication {
17
14
  * `src/providers/${function_name}.ts`.
18
15
  */
19
16
  functionName: string;
20
-
21
17
  /** For example, `src/providers/${function_name}.ts`. */
22
18
  location: string;
23
-
24
19
  /**
25
20
  * List of scenario descriptions for test code generation.
26
21
  *
@@ -28,8 +23,7 @@ export namespace IAutoBeRealizeScenarioApplication {
28
23
  * certain conditions. Used as a basis for TDD-style automated test
29
24
  * generation.
30
25
  */
31
- testScenarios: string[];
32
-
26
+ testFiles: AutoBeTestFile[];
33
27
  /**
34
28
  * Optional decorator event for customizing code generation behavior.
35
29
  *
@@ -39,5 +33,4 @@ export namespace IAutoBeRealizeScenarioApplication {
39
33
  * final code output.
40
34
  */
41
35
  decoratorEvent?: AutoBeRealizeAuthorization;
42
- }
43
36
  }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IAutoBeRealizeScenarioResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IAutoBeRealizeScenarioResult.js","sourceRoot":"","sources":["../../../../../../src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.ts"],"names":[],"mappings":""}