@autobe/agent 0.18.0 → 0.20.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 (341) hide show
  1. package/lib/AutoBeMockAgent.d.ts +2 -10
  2. package/lib/agent/src/AutoBeAgent.js +8 -2
  3. package/lib/agent/src/AutoBeAgent.js.map +1 -1
  4. package/lib/agent/src/AutoBeMockAgent.d.ts +2 -10
  5. package/lib/agent/src/AutoBeMockAgent.js +10 -5
  6. package/lib/agent/src/AutoBeMockAgent.js.map +1 -1
  7. package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +23 -29
  8. package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +1 -1
  9. package/lib/agent/src/context/AutoBeContext.d.ts +1 -0
  10. package/lib/agent/src/context/AutoBeTokenUsageComponent.d.ts +1 -0
  11. package/lib/agent/src/context/AutoBeTokenUsageComponent.js +14 -0
  12. package/lib/agent/src/context/AutoBeTokenUsageComponent.js.map +1 -1
  13. package/lib/agent/src/factory/consentFunctionCall.d.ts +10 -0
  14. package/lib/agent/src/factory/consentFunctionCall.js +213 -0
  15. package/lib/agent/src/factory/consentFunctionCall.js.map +1 -0
  16. package/lib/agent/src/factory/createAgenticaHistory.js +1 -0
  17. package/lib/agent/src/factory/createAgenticaHistory.js.map +1 -1
  18. package/lib/agent/src/factory/createAutoBeContext.js +79 -19
  19. package/lib/agent/src/factory/createAutoBeContext.js.map +1 -1
  20. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +6 -0
  21. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js +41 -0
  22. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -0
  23. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +12 -9
  24. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
  25. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +3 -1
  26. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +45 -31
  27. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
  28. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js +25 -6
  29. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
  30. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +8 -3
  31. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +15 -12
  32. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
  33. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +33 -44
  34. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
  35. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -4
  36. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +10 -4
  37. package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
  38. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +16 -16
  39. package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +5 -5
  40. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js +45 -45
  41. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -1
  42. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +14 -14
  43. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
  44. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +31 -30
  45. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
  46. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +24 -31
  47. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
  48. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +4 -4
  49. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
  50. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +27 -26
  51. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
  52. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +13 -12
  53. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
  54. package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js +4 -4
  55. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +11 -10
  56. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
  57. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +36 -29
  58. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
  59. package/lib/agent/src/orchestrate/interface/orchestrateInterface.js +31 -9
  60. package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -1
  61. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +2 -2
  62. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +1571 -1144
  63. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
  64. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js +24 -4
  65. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  66. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js +6 -2
  67. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
  68. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.d.ts +2 -2
  69. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js +12 -14
  70. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
  71. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +103 -71
  72. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  73. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +2 -3
  74. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +147 -116
  75. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
  76. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js +401 -233
  77. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
  78. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +2 -5
  79. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +362 -178
  80. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -1
  81. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +38 -0
  82. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +16 -16
  83. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +97 -14
  84. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +75 -1
  85. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +46 -14
  86. package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +18 -24
  87. package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +7 -0
  88. package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js +35 -0
  89. package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js.map +1 -0
  90. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +60 -66
  91. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
  92. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +19 -30
  93. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -1
  94. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +38 -35
  95. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
  96. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +39 -26
  97. package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
  98. package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js +15 -4
  99. package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +1 -1
  100. package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -2
  101. package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js +7 -9
  102. package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  103. package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js +38 -2
  104. package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  105. package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js +61 -10
  106. package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
  107. package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js +68 -24
  108. package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
  109. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +24 -21
  110. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -1
  111. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +59 -57
  112. package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
  113. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +1 -0
  114. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +17 -13
  115. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
  116. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +3 -0
  117. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +287 -0
  118. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -0
  119. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -2
  120. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +46 -49
  121. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
  122. package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.d.ts +7 -0
  123. package/lib/agent/src/orchestrate/realize/internal/{compile.js → compileRealizeFiles.js} +12 -29
  124. package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js.map +1 -0
  125. package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +76 -45
  126. package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -1
  127. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js +15 -9
  128. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
  129. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +9 -7
  130. package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
  131. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +9 -6
  132. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +25 -20
  133. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
  134. package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -66
  135. package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -1
  136. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +8 -6
  137. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +36 -27
  138. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
  139. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +3 -3
  140. package/lib/agent/src/orchestrate/{internal/IProgress.js → realize/structures/IAutoBeRealizeCorrectApplication.js} +1 -1
  141. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.js.map +1 -0
  142. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +19 -16
  143. package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js +5 -1
  144. package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
  145. package/lib/agent/src/orchestrate/test/compile/completeTestCode.js +13 -10
  146. package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +1 -1
  147. package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +17 -16
  148. package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
  149. package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js +33 -32
  150. package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +1 -1
  151. package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.d.ts +2 -1
  152. package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +97 -49
  153. package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
  154. package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +3 -3
  155. package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
  156. package/lib/agent/src/orchestrate/test/orchestrateTest.js +17 -4
  157. package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -1
  158. package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js +18 -9
  159. package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  160. package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +138 -23
  161. package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  162. package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js +17 -17
  163. package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  164. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +7 -6
  165. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +1 -1
  166. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
  167. package/lib/agent/src/orchestrate/{realize/structures/IAutoBeRealizeCoderApplication.js → test/structures/IAutoBeTestScenarioAuthorizationRole.js} +1 -1
  168. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.js.map +1 -0
  169. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -2
  170. package/lib/agent/src/utils/executeCachedBatch.d.ts +1 -0
  171. package/lib/agent/src/utils/executeCachedBatch.js +23 -0
  172. package/lib/agent/src/utils/executeCachedBatch.js.map +1 -0
  173. package/lib/agent/src/utils/predicateStateMessage.d.ts +4 -0
  174. package/lib/agent/src/utils/predicateStateMessage.js +87 -0
  175. package/lib/agent/src/utils/predicateStateMessage.js.map +1 -0
  176. package/lib/constants/AutoBeSystemPromptConstant.d.ts +23 -29
  177. package/lib/context/AutoBeContext.d.ts +1 -0
  178. package/lib/context/AutoBeTokenUsageComponent.d.ts +1 -0
  179. package/lib/factory/consentFunctionCall.d.ts +10 -0
  180. package/lib/index.mjs +4799 -2637
  181. package/lib/index.mjs.map +1 -1
  182. package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +6 -0
  183. package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +3 -1
  184. package/lib/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +8 -3
  185. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -4
  186. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +16 -16
  187. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +5 -5
  188. package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +2 -2
  189. package/lib/orchestrate/interface/orchestrateInterfaceGroups.d.ts +2 -2
  190. package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +2 -3
  191. package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +2 -5
  192. package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +38 -0
  193. package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +16 -16
  194. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +97 -14
  195. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +75 -1
  196. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +46 -14
  197. package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +18 -24
  198. package/lib/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +7 -0
  199. package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -2
  200. package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +1 -0
  201. package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +3 -0
  202. package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -2
  203. package/lib/orchestrate/realize/internal/compileRealizeFiles.d.ts +7 -0
  204. package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +9 -6
  205. package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -66
  206. package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +8 -6
  207. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +3 -3
  208. package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +19 -16
  209. package/lib/orchestrate/test/histories/transformTestScenarioHistories.d.ts +2 -1
  210. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +7 -6
  211. package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +1 -1
  212. package/lib/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
  213. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -2
  214. package/lib/utils/executeCachedBatch.d.ts +1 -0
  215. package/lib/utils/predicateStateMessage.d.ts +4 -0
  216. package/package.json +6 -6
  217. package/src/AutoBeAgent.ts +18 -3
  218. package/src/AutoBeMockAgent.ts +13 -15
  219. package/src/constants/AutoBeSystemPromptConstant.ts +23 -29
  220. package/src/context/AutoBeContext.ts +1 -0
  221. package/src/context/AutoBeTokenUsageComponent.ts +20 -0
  222. package/src/factory/consentFunctionCall.ts +129 -0
  223. package/src/factory/createAgenticaHistory.ts +1 -0
  224. package/src/factory/createAutoBeContext.ts +108 -20
  225. package/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.ts +53 -0
  226. package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +13 -10
  227. package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +68 -47
  228. package/src/orchestrate/analyze/orchestrateAnalyze.ts +33 -21
  229. package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +21 -10
  230. package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +18 -40
  231. package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +15 -8
  232. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +16 -16
  233. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +5 -5
  234. package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +47 -47
  235. package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +14 -14
  236. package/src/orchestrate/interface/histories/transformInterfaceComplementHistories.ts +31 -30
  237. package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +20 -29
  238. package/src/orchestrate/interface/histories/transformInterfaceGroupHistories.ts +3 -3
  239. package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +23 -22
  240. package/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.ts +12 -11
  241. package/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.ts +5 -5
  242. package/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts +11 -10
  243. package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +37 -30
  244. package/src/orchestrate/interface/orchestrateInterface.ts +53 -12
  245. package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +142 -32
  246. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +2 -0
  247. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +13 -9
  248. package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +8 -19
  249. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +82 -74
  250. package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +51 -32
  251. package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +174 -56
  252. package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +149 -63
  253. package/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.ts +39 -0
  254. package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +16 -16
  255. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +101 -14
  256. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +77 -1
  257. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +47 -14
  258. package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +18 -24
  259. package/src/orchestrate/interface/utils/validateAuthorizationSchema.ts +41 -0
  260. package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +61 -66
  261. package/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.ts +19 -30
  262. package/src/orchestrate/prisma/histories/transformPrismaReviewHistories.ts +38 -35
  263. package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +36 -23
  264. package/src/orchestrate/prisma/orchestratePrisma.ts +17 -6
  265. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +8 -19
  266. package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +3 -0
  267. package/src/orchestrate/prisma/orchestratePrismaReview.ts +37 -18
  268. package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +25 -17
  269. package/src/orchestrate/realize/histories/transformRealizeAuthorization.ts +24 -21
  270. package/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.ts +57 -59
  271. package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +20 -14
  272. package/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.ts +294 -0
  273. package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +62 -57
  274. package/src/orchestrate/realize/internal/compileRealizeFiles.ts +71 -0
  275. package/src/orchestrate/realize/orchestrateRealize.ts +109 -86
  276. package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +22 -13
  277. package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +3 -0
  278. package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +28 -24
  279. package/src/orchestrate/realize/orchestrateRealizeScenario.ts +0 -74
  280. package/src/orchestrate/realize/orchestrateRealizeWrite.ts +37 -28
  281. package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +3 -3
  282. package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +19 -16
  283. package/src/orchestrate/realize/utils/replaceImportStatements.ts +7 -0
  284. package/src/orchestrate/test/compile/completeTestCode.ts +17 -13
  285. package/src/orchestrate/test/experimental/transformTestCorrectHistories.ast +4 -4
  286. package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +17 -16
  287. package/src/orchestrate/test/histories/transformTestHistories.ts +35 -34
  288. package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +116 -60
  289. package/src/orchestrate/test/histories/transformTestWriteHistories.ts +3 -3
  290. package/src/orchestrate/test/orchestrateTest.ts +18 -8
  291. package/src/orchestrate/test/orchestrateTestCorrect.ts +34 -24
  292. package/src/orchestrate/test/orchestrateTestScenario.ts +179 -36
  293. package/src/orchestrate/test/orchestrateTestWrite.ts +18 -19
  294. package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +7 -6
  295. package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +1 -1
  296. package/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.ts +7 -0
  297. package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +2 -2
  298. package/src/utils/executeCachedBatch.ts +15 -0
  299. package/src/utils/predicateStateMessage.ts +107 -0
  300. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +0 -4
  301. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js +0 -46
  302. package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js.map +0 -1
  303. package/lib/agent/src/orchestrate/internal/IProgress.d.ts +0 -4
  304. package/lib/agent/src/orchestrate/internal/IProgress.js.map +0 -1
  305. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.d.ts +0 -7
  306. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.js +0 -213
  307. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.js.map +0 -1
  308. package/lib/agent/src/orchestrate/realize/internal/compile.d.ts +0 -7
  309. package/lib/agent/src/orchestrate/realize/internal/compile.js.map +0 -1
  310. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +0 -345
  311. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +0 -1
  312. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +0 -56
  313. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.js +0 -3
  314. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +0 -1
  315. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +0 -2
  316. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js +0 -5
  317. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js.map +0 -1
  318. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.js +0 -3
  319. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.js.map +0 -1
  320. package/lib/agent/src/utils/pipe.d.ts +0 -5
  321. package/lib/agent/src/utils/pipe.js +0 -14
  322. package/lib/agent/src/utils/pipe.js.map +0 -1
  323. package/lib/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +0 -4
  324. package/lib/orchestrate/internal/IProgress.d.ts +0 -4
  325. package/lib/orchestrate/realize/histories/transformRealizeCoderHistories.d.ts +0 -7
  326. package/lib/orchestrate/realize/internal/compile.d.ts +0 -7
  327. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +0 -345
  328. package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +0 -56
  329. package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +0 -2
  330. package/lib/utils/pipe.d.ts +0 -5
  331. package/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.ts +0 -53
  332. package/src/orchestrate/internal/IProgress.ts +0 -4
  333. package/src/orchestrate/realize/histories/transformRealizeCoderHistories.ts +0 -248
  334. package/src/orchestrate/realize/internal/compile.ts +0 -84
  335. package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +0 -358
  336. package/src/orchestrate/realize/structures/IAutoBeRealizeCompile.ts +0 -70
  337. package/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.ts +0 -2
  338. package/src/utils/pipe.ts +0 -39
  339. /package/lib/agent/src/orchestrate/realize/structures/{IAutoBeRealizeReviewApplication.d.ts → IAutoBeRealizeCorrectApplication.d.ts} +0 -0
  340. /package/lib/orchestrate/realize/structures/{IAutoBeRealizeReviewApplication.d.ts → IAutoBeRealizeCorrectApplication.d.ts} +0 -0
  341. /package/src/orchestrate/realize/structures/{IAutoBeRealizeReviewApplication.ts → IAutoBeRealizeCorrectApplication.ts} +0 -0
@@ -0,0 +1,6 @@
1
+ import { IAgenticaHistoryJson } from "@agentica/core";
2
+ import { AutoBeAnalyzeScenarioEvent } from "@autobe/interface";
3
+ import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
4
+ import { ILlmSchema } from "@samchon/openapi";
5
+ import { AutoBeContext } from "../../../context/AutoBeContext";
6
+ export declare const transformAnalyzeReviewHistories: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, scenario: AutoBeAnalyzeScenarioEvent, allFiles: AutoBeAnalyzeFile[], myFile: AutoBeAnalyzeFile) => Array<IAgenticaHistoryJson.IUserMessage | IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
@@ -1,4 +1,6 @@
1
1
  import { IAgenticaHistoryJson } from "@agentica/core";
2
2
  import { AutoBeAnalyzeScenarioEvent } from "@autobe/interface";
3
3
  import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
4
- export declare const transformAnalyzeWriteHistories: (scenario: AutoBeAnalyzeScenarioEvent, file: AutoBeAnalyzeFile.Scenario) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
4
+ import { ILlmSchema } from "@samchon/openapi";
5
+ import { AutoBeContext } from "../../../context/AutoBeContext";
6
+ export declare const transformAnalyzeWriteHistories: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, scenario: AutoBeAnalyzeScenarioEvent, file: AutoBeAnalyzeFile.Scenario) => Array<IAgenticaHistoryJson.IUserMessage | IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
@@ -1,6 +1,11 @@
1
- import { AutoBeAnalyzeReviewEvent, AutoBeAnalyzeScenarioEvent } from "@autobe/interface";
1
+ import { AutoBeAnalyzeReviewEvent, AutoBeAnalyzeScenarioEvent, AutoBeProgressEventBase } from "@autobe/interface";
2
2
  import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
3
3
  import { ILlmSchema } from "@samchon/openapi";
4
4
  import { AutoBeContext } from "../../context/AutoBeContext";
5
- import { IProgress } from "../internal/IProgress";
6
- export declare const orchestrateAnalyzeReview: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, scenario: AutoBeAnalyzeScenarioEvent, otherFiles: AutoBeAnalyzeFile[], myFile: AutoBeAnalyzeFile, progress: IProgress) => Promise<AutoBeAnalyzeReviewEvent>;
5
+ export declare const orchestrateAnalyzeReview: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
6
+ scenario: AutoBeAnalyzeScenarioEvent;
7
+ allFiles: AutoBeAnalyzeFile[];
8
+ myFile: AutoBeAnalyzeFile;
9
+ progress: AutoBeProgressEventBase;
10
+ promptCacheKey: string;
11
+ }) => Promise<AutoBeAnalyzeReviewEvent>;
@@ -1,8 +1,10 @@
1
- import { AutoBeAnalyzeScenarioEvent, AutoBeAnalyzeWriteEvent } from "@autobe/interface";
1
+ import { AutoBeAnalyzeScenarioEvent, AutoBeAnalyzeWriteEvent, AutoBeProgressEventBase } from "@autobe/interface";
2
2
  import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
3
3
  import { ILlmSchema } from "@samchon/openapi";
4
4
  import { AutoBeContext } from "../../context/AutoBeContext";
5
- export declare const orchestrateAnalyzeWrite: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, scenario: AutoBeAnalyzeScenarioEvent, file: AutoBeAnalyzeFile.Scenario, progress: {
6
- total: number;
7
- completed: number;
5
+ export declare const orchestrateAnalyzeWrite: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
6
+ scenario: AutoBeAnalyzeScenarioEvent;
7
+ file: AutoBeAnalyzeFile.Scenario;
8
+ progress: AutoBeProgressEventBase;
9
+ promptCacheKey: string;
8
10
  }) => Promise<AutoBeAnalyzeWriteEvent>;
@@ -12,9 +12,10 @@ export interface IAutoBeAnalyzeReviewApplication {
12
12
  * - Adding missing business processes and workflows
13
13
  * - Ensuring proper document structure and completeness
14
14
  *
15
- * CRITICAL: The function outputs the actual document content that will be saved,
16
- * not a review or analysis of the document. Any text output becomes part of
17
- * the final document.
15
+ * DO: Output the actual document content that will be saved.
16
+ * DO NOT: Output review comments or analysis of the document.
17
+ *
18
+ * Note: Any text output becomes part of the final document.
18
19
  *
19
20
  * @param props - The properties containing the document to enhance along with
20
21
  * plan and review criteria for guidance
@@ -40,14 +41,12 @@ export declare namespace IAutoBeAnalyzeReviewApplication {
40
41
  *
41
42
  * Critical review points:
42
43
  *
43
- * - Mermaid diagrams MUST use double quotes for ALL labels
44
- * - No spaces allowed between brackets and quotes in Mermaid
45
- * - Requirements must be specific and measurable in natural language
46
- * - Focus on business requirements and user scenarios
47
- * - STRICTLY PROHIBITED: Reject if document contains database schemas or API
48
- * specifications
49
- * - Business model and authentication requirements must be described in
50
- * natural language
44
+ * - DO: Use double quotes for ALL labels in Mermaid diagrams
45
+ * - DO NOT: Use spaces between brackets and quotes in Mermaid
46
+ * - DO: Make requirements specific and measurable in natural language
47
+ * - DO: Focus on business requirements and user scenarios
48
+ * - DO NOT: Accept documents containing database schemas or API specifications
49
+ * - DO: Describe business model and authentication requirements in natural language
51
50
  */
52
51
  review: string;
53
52
  /**
@@ -67,10 +66,11 @@ export declare namespace IAutoBeAnalyzeReviewApplication {
67
66
  /**
68
67
  * The actual markdown document content that incorporates review feedback.
69
68
  *
70
- * ⚠️ CRITICAL: This field contains a COMPLETE MARKDOWN DOCUMENT that has
71
- * already incorporated the review criteria and plan requirements. This is
72
- * NOT raw input to be reviewed - it is the FINAL, PRODUCTION-READY DOCUMENT
73
- * that reflects all review feedback and is immediately usable.
69
+ * This field contains a COMPLETE MARKDOWN DOCUMENT that has already
70
+ * incorporated the review criteria and plan requirements.
71
+ *
72
+ * DO: Treat this as the final, production-ready document.
73
+ * DO NOT: Treat this as raw input to be reviewed.
74
74
  *
75
75
  * This content represents:
76
76
  * - A fully-formed markdown document (.md file)
@@ -89,7 +89,7 @@ export declare namespace IAutoBeAnalyzeReviewApplication {
89
89
  * - Appropriate level of detail for backend implementation
90
90
  * - Proper document linking (descriptive text, not raw filenames)
91
91
  *
92
- * IMPORTANT: The enhancer's output IS this document, not comments about it:
92
+ * The enhancer outputs the document itself:
93
93
  *
94
94
  * - If content is provided, it represents the actual document
95
95
  * - The enhancer outputs the enhanced version AS the document itself
@@ -1,5 +1,6 @@
1
1
  import { AutoBeAnalyzeRole, CamelPattern } from "@autobe/interface";
2
2
  import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
3
+ import { tags } from "typia";
3
4
  export interface IAutoBeAnalyzeScenarioApplication {
4
5
  /**
5
6
  * Compose project structure with roles and files.
@@ -25,7 +26,7 @@ export declare namespace IAutoBeAnalyzeScenarioApplication {
25
26
  * Prefix for file names and variable names. This will be used for
26
27
  * organizing documentation files.
27
28
  *
28
- * MUST use camelCase naming convention.
29
+ * DO: Use camelCase naming convention.
29
30
  */
30
31
  prefix: string & CamelPattern;
31
32
  /** Roles to be assigned for the project */
@@ -57,9 +58,8 @@ export declare namespace IAutoBeAnalyzeScenarioApplication {
57
58
  * - Service overview and business model description
58
59
  * - User roles and permission requirements (described in natural language)
59
60
  * - Business logic and validation rules
60
- * - STRICTLY PROHIBITED: Do NOT include database schemas, ERD, or API
61
- * specifications
62
- * - All requirements must be written in natural language for clarity
61
+ * - DO NOT: Include database schemas, ERD, or API specifications
62
+ * - DO: Write all requirements in natural language for clarity
63
63
  *
64
64
  * Generate files based on actual requirements gathered from conversation.
65
65
  * Do not create unnecessary documentation - only generate what is needed to
@@ -73,6 +73,6 @@ export declare namespace IAutoBeAnalyzeScenarioApplication {
73
73
  * user does not specify a number, generate a sufficient number of documents
74
74
  * to adequately support the service.
75
75
  */
76
- files: Array<AutoBeAnalyzeFile.Scenario>;
76
+ files: Array<AutoBeAnalyzeFile.Scenario> & tags.MinItems<1>;
77
77
  }
78
78
  }
@@ -1,4 +1,4 @@
1
- import { AutoBeOpenApi } from "@autobe/interface";
1
+ import { AutoBeInterfaceAuthorization } from "@autobe/interface";
2
2
  import { ILlmSchema } from "@samchon/openapi";
3
3
  import { AutoBeContext } from "../../context/AutoBeContext";
4
- export declare function orchestrateInterfaceAuthorizations<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>): Promise<AutoBeOpenApi.IOperation[]>;
4
+ export declare function orchestrateInterfaceAuthorizations<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>): Promise<AutoBeInterfaceAuthorization[]>;
@@ -1,4 +1,4 @@
1
- import { AutoBeAssistantMessageHistory, AutoBeInterfaceGroupsEvent } from "@autobe/interface";
1
+ import { AutoBeInterfaceGroupsEvent } from "@autobe/interface";
2
2
  import { ILlmSchema } from "@samchon/openapi";
3
3
  import { AutoBeContext } from "../../context/AutoBeContext";
4
- export declare function orchestrateInterfaceGroups<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, message?: string): Promise<AutoBeAssistantMessageHistory | AutoBeInterfaceGroupsEvent>;
4
+ export declare function orchestrateInterfaceGroups<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, message?: string): Promise<AutoBeInterfaceGroupsEvent>;
@@ -1,5 +1,4 @@
1
- import { AutoBeOpenApi } from "@autobe/interface";
1
+ import { AutoBeOpenApi, AutoBeProgressEventBase } from "@autobe/interface";
2
2
  import { ILlmSchema } from "@samchon/openapi";
3
3
  import { AutoBeContext } from "../../context/AutoBeContext";
4
- import { IProgress } from "../internal/IProgress";
5
- export declare function orchestrateInterfaceOperationsReview<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, operations: AutoBeOpenApi.IOperation[], progress: IProgress): Promise<AutoBeOpenApi.IOperation[]>;
4
+ export declare function orchestrateInterfaceOperationsReview<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, operations: AutoBeOpenApi.IOperation[], progress: AutoBeProgressEventBase): Promise<AutoBeOpenApi.IOperation[]>;
@@ -1,7 +1,4 @@
1
- import { AutoBeOpenApi } from "@autobe/interface";
1
+ import { AutoBeOpenApi, AutoBeProgressEventBase } from "@autobe/interface";
2
2
  import { ILlmSchema } from "@samchon/openapi";
3
3
  import { AutoBeContext } from "../../context/AutoBeContext";
4
- export declare function orchestrateInterfaceSchemasReview<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, operations: AutoBeOpenApi.IOperation[], schemas: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>, progress: {
5
- total: number;
6
- completed: number;
7
- }): Promise<Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>>;
4
+ export declare function orchestrateInterfaceSchemasReview<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, operations: AutoBeOpenApi.IOperation[], schemas: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>, progress: AutoBeProgressEventBase): Promise<Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>>;
@@ -17,6 +17,44 @@ export interface IAutoBeInterfaceComplementApplication {
17
17
  }
18
18
  export declare namespace IAutoBeInterfaceComplementApplication {
19
19
  interface IProps {
20
+ /**
21
+ * TypeScript draft code for complement schema definitions.
22
+ *
23
+ * This property contains TypeScript interface definitions for missing schema
24
+ * types that were referenced but not defined in the initial schema generation.
25
+ * Similar to the main schema draft, this serves as a preliminary TypeScript
26
+ * representation before converting to JSON Schema format.
27
+ *
28
+ * The draft helps ensure that complementary schemas maintain consistency with
29
+ * the existing type system and follow the same conventions as the primary schemas.
30
+ *
31
+ * This draft typically includes:
32
+ * - Missing entity interfaces referenced via $ref
33
+ * - Nested object types used within other schemas
34
+ * - Shared utility types or enumerations
35
+ * - Any transitively referenced types
36
+ *
37
+ * The final schemas in the `schemas` property should be validated against and
38
+ * derived from this TypeScript draft to ensure type safety and consistency
39
+ * across the entire API specification.
40
+ *
41
+ * Example complement draft:
42
+ * ```typescript
43
+ * interface IUserProfile {
44
+ * id: string;
45
+ * userId: string;
46
+ * displayName: string;
47
+ * avatarUrl?: string;
48
+ * }
49
+ *
50
+ * interface IAddress {
51
+ * street: string;
52
+ * city: string;
53
+ * postalCode: string;
54
+ * }
55
+ * ```
56
+ */
57
+ draft: string;
20
58
  /**
21
59
  * A collection of missing schema definitions that need to be added to the
22
60
  * OpenAPI document's `components.schemas` section.
@@ -4,10 +4,10 @@ export interface IAutoBeInterfaceGroupApplication {
4
4
  * Generate logical groups for organizing API endpoint creation based on
5
5
  * Prisma schema structure.
6
6
  *
7
- * Groups MUST be derived from Prisma schema organization (namespaces, file
8
- * structure, table prefixes) rather than arbitrary business domains. Only
9
- * create new groups when existing schema structure cannot adequately cover
10
- * all requirements.
7
+ * DO: Derive groups from Prisma schema organization (namespaces, file
8
+ * structure, table prefixes) rather than arbitrary business domains.
9
+ * DO: Create new groups only when existing schema structure cannot adequately
10
+ * cover all requirements.
11
11
  *
12
12
  * @param props Properties containing the groups to be created for API
13
13
  * organization
@@ -19,8 +19,8 @@ export declare namespace IAutoBeInterfaceGroupApplication {
19
19
  /**
20
20
  * Array of API endpoint groups for organizing development.
21
21
  *
22
- * Groups MUST be organized around existing Prisma schema structure and
23
- * provide complete coverage of all entities and requirements without
22
+ * DO: Organize groups around existing Prisma schema structure.
23
+ * DO: Provide complete coverage of all entities and requirements without
24
24
  * overlap.
25
25
  */
26
26
  groups: IGroup[] & tags.MinItems<1>;
@@ -31,10 +31,11 @@ export declare namespace IAutoBeInterfaceGroupApplication {
31
31
  *
32
32
  * **SCHEMA-BASED GROUP REQUIREMENTS:**
33
33
  *
34
- * Groups MUST be derived from the Prisma schema structure rather than
35
- * arbitrary business domain names. This ensures consistency with the
36
- * underlying data model and prevents misalignment between API organization
37
- * and database structure.
34
+ * DO: Derive groups from the Prisma schema structure rather than arbitrary
35
+ * business domain names.
36
+ *
37
+ * This ensures consistency with the underlying data model and prevents
38
+ * misalignment between API organization and database structure.
38
39
  *
39
40
  * **Primary Group Sources (in order of priority):**
40
41
  *
@@ -48,12 +49,11 @@ export declare namespace IAutoBeInterfaceGroupApplication {
48
49
  *
49
50
  * **Group Creation Guidelines:**
50
51
  *
51
- * - Each group must cover specific Prisma schema entities without overlap
52
+ * - Each group covers specific Prisma schema entities without overlap
52
53
  * - Size groups appropriately for manageable endpoint generation cycles
53
54
  * - Maintain clear boundaries based on schema organization
54
55
  * - Ensure complete coverage of all database entities and requirements
55
- * - Related database tables within the same schema area should be grouped
56
- * together
56
+ * - Related database tables within the same schema area are grouped together
57
57
  *
58
58
  * **When to Create Schema-Independent Groups:**
59
59
  *
@@ -68,14 +68,14 @@ export declare namespace IAutoBeInterfaceGroupApplication {
68
68
  * **Naming Standards:**
69
69
  *
70
70
  * - Use PascalCase format (e.g., "Shopping", "BBS", "UserManagement")
71
- * - Names MUST directly reflect Prisma schema structure
71
+ * - Names directly reflect Prisma schema structure
72
72
  * - Keep names concise and schema-derived
73
73
  * - Avoid arbitrary business domain names
74
74
  * - Maintain consistency with schema organization
75
75
  *
76
76
  * **Quality Requirements:**
77
77
  *
78
- * - Groups collectively must cover ALL entities and requirements
78
+ * - Groups collectively cover ALL entities and requirements
79
79
  * - Each database entity belongs to exactly one group
80
80
  * - Clear mapping to specific Prisma schema elements
81
81
  * - Balance group sizes within schema constraints
@@ -85,7 +85,7 @@ export declare namespace IAutoBeInterfaceGroupApplication {
85
85
  /**
86
86
  * Unique identifier name derived from Prisma schema structure.
87
87
  *
88
- * Must correspond to schema namespaces, file names, table prefixes, or
88
+ * DO: Correspond to schema namespaces, file names, table prefixes, or
89
89
  * organizational annotations rather than arbitrary business domain names.
90
90
  */
91
91
  name: string & tags.MinLength<1>;
@@ -22,7 +22,7 @@ export declare namespace IAutoBeInterfaceOperationApplication {
22
22
  /**
23
23
  * Array of API operations to generate.
24
24
  *
25
- * Each operation in this array must include:
25
+ * Each operation in this array includes:
26
26
  *
27
27
  * - Specification: Detailed API specification with clear purpose and
28
28
  * functionality
@@ -37,7 +37,7 @@ export declare namespace IAutoBeInterfaceOperationApplication {
37
37
  * components.schemas
38
38
  * - ResponseBody: With typeName referencing appropriate response type
39
39
  *
40
- * All operations must follow strict quality standards:
40
+ * All operations follow strict quality standards:
41
41
  *
42
42
  * 1. Detailed descriptions referencing Prisma schema comments
43
43
  * 2. Accurate parameter definitions matching path parameters
@@ -64,11 +64,10 @@ export declare namespace IAutoBeInterfaceOperationApplication {
64
64
  * reason and description fields, making it clear why the API was designed and
65
65
  * how it should be used.
66
66
  *
67
- * All request bodies and responses for this operation must be object types
68
- * and must reference named types defined in the components section. The
69
- * content-type is always `application/json`. For file upload/download
70
- * operations, use `string & tags.Format<"uri">` in the appropriate schema
71
- * instead of binary data formats.
67
+ * DO: Use object types for all request bodies and responses. DO: Reference
68
+ * named types defined in the components section. DO: Use `application/json`
69
+ * as the content-type. DO: Use `string & tags.Format<"uri">` in the schema
70
+ * for file upload/download operations instead of binary data formats.
72
71
  *
73
72
  * In OpenAPI, this might represent:
74
73
  *
@@ -85,7 +84,45 @@ export declare namespace IAutoBeInterfaceOperationApplication {
85
84
  * }
86
85
  * ```
87
86
  */
88
- interface IOperation extends Omit<AutoBeOpenApi.IOperation, "authorizationRole"> {
87
+ interface IOperation extends Omit<AutoBeOpenApi.IOperation, "authorizationRole" | "authorizationType"> {
88
+ /**
89
+ * Prisma schema models relevant to this operation.
90
+ *
91
+ * Contains the complete Prisma schema definitions for all entities involved
92
+ * in this operation, including their fields, relations, and database
93
+ * constraints. This enables comprehensive validation and schema-aware
94
+ * operation design.
95
+ *
96
+ * The schema information serves multiple critical purposes:
97
+ *
98
+ * - **Field Verification**: Ensures all referenced fields actually exist in
99
+ * the database schema and have the correct types
100
+ * - **Relationship Validation**: Confirms that entity relationships are
101
+ * properly defined and can support the operation's data access patterns
102
+ * - **Soft-Delete Detection**: For DELETE operations, identifies whether
103
+ * entities have soft-delete fields (deleted_at, is_deleted, etc.) to
104
+ * determine if the operation should perform logical deletion instead of
105
+ * physical removal
106
+ * - **Constraint Awareness**: Understands unique constraints, required
107
+ * fields, and default values to generate accurate request/response
108
+ * schemas
109
+ *
110
+ * Example content might include:
111
+ *
112
+ * ```prisma
113
+ * model User {
114
+ * id String @id @default(uuid())
115
+ * email String @unique
116
+ * name String
117
+ * deleted_at DateTime? // Indicates soft-delete capability
118
+ * posts Post[]
119
+ * }
120
+ * ```
121
+ *
122
+ * This schema context ensures operations are fully aligned with the actual
123
+ * database structure and business logic requirements.
124
+ */
125
+ prisma_schemas: string;
89
126
  /**
90
127
  * Authorization roles required to access this API operation.
91
128
  *
@@ -93,16 +130,47 @@ export declare namespace IAutoBeInterfaceOperationApplication {
93
130
  * endpoint. Multiple roles can be specified to allow different types of
94
131
  * users to access the same endpoint.
95
132
  *
133
+ * ## ⚠️ CRITICAL: Role Multiplication Effect
134
+ *
135
+ * **EACH ROLE IN THIS ARRAY GENERATES A SEPARATE ENDPOINT**
136
+ *
137
+ * - If you specify `["admin", "moderator", "member"]`, this creates 3
138
+ * separate endpoints
139
+ * - Total generated endpoints = operations × average roles.length
140
+ * - Example: 100 operations with 3 roles each = 300 actual endpoints
141
+ *
142
+ * ## 🔴 AVOID OVER-GENERATION
143
+ *
144
+ * **DO NOT create role-specific endpoints when a public endpoint would
145
+ * suffice:**
146
+ *
147
+ * - ❌ BAD: Separate GET endpoints for admin, member, moderator to view the
148
+ * same public data
149
+ * - ✅ GOOD: Single public endpoint `[]` with role-based filtering in business
150
+ * logic
151
+ *
152
+ * **DO NOT enumerate all possible roles when the Prisma schema uses a
153
+ * single User table:**
154
+ *
155
+ * - If Prisma has a User table with role/permission fields, you likely only
156
+ * need `["user"]`
157
+ * - Avoid listing `["admin", "seller", "buyer", "moderator", ...]`
158
+ * unnecessarily
159
+ * - The actual role checking happens in business logic, not at the endpoint
160
+ * level
161
+ *
96
162
  * ## Naming Convention
97
163
  *
98
- * All role names MUST use camelCase.
164
+ * DO: Use camelCase for all role names.
99
165
  *
100
166
  * ## Important Guidelines
101
167
  *
102
168
  * - Set to empty array `[]` for public endpoints that require no
103
169
  * authentication
104
170
  * - Set to array with role strings for role-restricted endpoints
105
- * - The role names MUST match exactly with the user type/role defined in the
171
+ * - **MINIMIZE the number of roles per endpoint to prevent explosion**
172
+ * - Consider if the endpoint can be public with role-based filtering instead
173
+ * - The role names match exactly with the user type/role defined in the
106
174
  * database
107
175
  * - This will be used by the Realize Agent to generate appropriate decorator
108
176
  * and authorization logic in the provider functions
@@ -111,11 +179,26 @@ export declare namespace IAutoBeInterfaceOperationApplication {
111
179
  *
112
180
  * ## Examples
113
181
  *
114
- * - `[]` - Public endpoint, no authentication required
115
- * - `["user"]` - Any authenticated user can access
116
- * - `["admin"]` - Only admin users can access
182
+ * - `[]` - Public endpoint, no authentication required (PREFERRED for read
183
+ * operations)
184
+ * - `["user"]` - Any authenticated user can access (PREFERRED for
185
+ * user-specific operations)
186
+ * - `["admin"]` - Only admin users can access (USE SPARINGLY)
117
187
  * - `["admin", "moderator"]` - Both admin and moderator users can access
118
- * - `["seller"]` - Only seller users can access
188
+ * (AVOID if possible)
189
+ * - `["seller"]` - Only seller users can access (ONLY if Seller is a separate
190
+ * table)
191
+ *
192
+ * ## Best Practices
193
+ *
194
+ * 1. **Start with public `[]` for all read operations** unless sensitive data
195
+ * is involved
196
+ * 2. **Use single role `["user"]` for authenticated operations** and handle
197
+ * permissions in business logic
198
+ * 3. **Only use multiple roles when absolutely necessary** for different
199
+ * business logic paths
200
+ * 4. **Remember: Fewer roles = Fewer endpoints = Better performance and
201
+ * maintainability**
119
202
  *
120
203
  * Note: The actual authentication/authorization implementation will be
121
204
  * handled by decorators at the controller level, and the provider function
@@ -91,6 +91,80 @@ export declare namespace IAutoBeInterfaceOperationsReviewApplication {
91
91
  * operations unchanged. These operations are validated and ready for schema
92
92
  * generation and subsequent implementation phases.
93
93
  */
94
- content: AutoBeOpenApi.IOperation[];
94
+ content: IOperation[];
95
+ }
96
+ /**
97
+ * Operation of the Restful API.
98
+ *
99
+ * This interface defines a single API endpoint with its HTTP {@link method},
100
+ * {@link path}, {@link parameters path parameters},
101
+ * {@link requestBody request body}, and {@link responseBody} structure. It
102
+ * corresponds to an individual operation in the paths section of an OpenAPI
103
+ * document.
104
+ *
105
+ * Each operation requires a detailed explanation of its purpose through the
106
+ * reason and description fields, making it clear why the API was designed and
107
+ * how it should be used.
108
+ *
109
+ * All request bodies and responses for this operation must be object types
110
+ * and must reference named types defined in the components section. The
111
+ * content-type is always `application/json`. For file upload/download
112
+ * operations, use `string & tags.Format<"uri">` in the appropriate schema
113
+ * instead of binary data formats.
114
+ *
115
+ * In OpenAPI, this might represent:
116
+ *
117
+ * ```json
118
+ * {
119
+ * "/shoppings/customers/orders": {
120
+ * "post": {
121
+ * "description": "Create a new order application from shopping cart...",
122
+ * "parameters": [...],
123
+ * "requestBody": {...},
124
+ * "responses": {...}
125
+ * }
126
+ * }
127
+ * }
128
+ * ```
129
+ */
130
+ interface IOperation extends Omit<AutoBeOpenApi.IOperation, "authorizationType"> {
131
+ /**
132
+ * Prisma schema models relevant to this operation.
133
+ *
134
+ * Contains the complete Prisma schema definitions for all entities involved
135
+ * in this operation, including their fields, relations, and database
136
+ * constraints. This enables comprehensive validation and schema-aware
137
+ * operation design.
138
+ *
139
+ * The schema information serves multiple critical purposes:
140
+ *
141
+ * - **Field Verification**: Ensures all referenced fields actually exist in
142
+ * the database schema and have the correct types
143
+ * - **Relationship Validation**: Confirms that entity relationships are
144
+ * properly defined and can support the operation's data access patterns
145
+ * - **Soft-Delete Detection**: For DELETE operations, identifies whether
146
+ * entities have soft-delete fields (deleted_at, is_deleted, etc.) to
147
+ * determine if the operation should perform logical deletion instead of
148
+ * physical removal
149
+ * - **Constraint Awareness**: Understands unique constraints, required
150
+ * fields, and default values to generate accurate request/response
151
+ * schemas
152
+ *
153
+ * Example content might include:
154
+ *
155
+ * ```prisma
156
+ * model User {
157
+ * id String @id @default(uuid())
158
+ * email String @unique
159
+ * name String
160
+ * deleted_at DateTime? // Indicates soft-delete capability
161
+ * posts Post[]
162
+ * }
163
+ * ```
164
+ *
165
+ * This schema context ensures operations are fully aligned with the actual
166
+ * database structure and business logic requirements.
167
+ */
168
+ prisma_schemas: string;
95
169
  }
96
170
  }
@@ -13,10 +13,9 @@ export interface IAutoBeInterfaceSchemaApplication {
13
13
  * creation. This ensures that the final OpenAPI document has complete type
14
14
  * coverage for all operations.
15
15
  *
16
- * CRITICAL: All schema definitions must follow the established naming
17
- * conventions (IEntityName, IEntityName.ICreate, etc.) and must be thoroughly
18
- * documented with descriptions that reference the original Prisma schema
19
- * comments.
16
+ * DO: Follow established naming conventions (IEntityName,
17
+ * IEntityName.ICreate, etc.) DO: Document thoroughly with descriptions that
18
+ * reference the original Prisma schema comments.
20
19
  *
21
20
  * @param props Properties containing components to generate.
22
21
  */
@@ -24,6 +23,39 @@ export interface IAutoBeInterfaceSchemaApplication {
24
23
  }
25
24
  export declare namespace IAutoBeInterfaceSchemaApplication {
26
25
  interface IProps {
26
+ /**
27
+ * TypeScript draft code for schema definitions.
28
+ *
29
+ * This property contains TypeScript interface definitions that serve as a
30
+ * preliminary draft before generating the final JSON schema components.
31
+ * The draft allows for initial design and validation of the schema structure
32
+ * using TypeScript's type system before converting to OpenAPI/JSON Schema format.
33
+ *
34
+ * The draft typically includes:
35
+ * - Entity interfaces matching the Prisma models
36
+ * - Operation-specific variants (ICreate, IUpdate, etc.)
37
+ * - Utility types and enumerations
38
+ * - Type relationships and constraints
39
+ *
40
+ * This TypeScript draft serves as the foundation for the subsequent schema
41
+ * generation, ensuring type safety and consistency. The final schemas in the
42
+ * `schemas` property should be derived from and validated against this draft.
43
+ *
44
+ * Example draft structure:
45
+ * ```typescript
46
+ * interface IUser {
47
+ * id: string;
48
+ * email: string;
49
+ * profile: IUserProfile;
50
+ * }
51
+ *
52
+ * namespace IUser {
53
+ * interface ICreate extends Omit<IUser, "id"> {}
54
+ * interface IUpdate extends Partial<ICreate> {}
55
+ * }
56
+ * ```
57
+ */
58
+ draft: string;
27
59
  /**
28
60
  * Complete set of schema components for the OpenAPI specification.
29
61
  *
@@ -31,23 +63,23 @@ export declare namespace IAutoBeInterfaceSchemaApplication {
31
63
  * the system. It is the central repository of all named schema types that
32
64
  * will be used throughout the API specification.
33
65
  *
34
- * CRITICAL REQUIREMENT: All object types MUST be defined as named types in
35
- * the components.schemas section. Inline anonymous object definitions are
36
- * strictly prohibited.
66
+ * DO: Define all object types as named types in the components.schemas
67
+ * section. DO NOT: Use inline anonymous object definitions.
37
68
  *
38
- * This components object should include:
69
+ * This components object includes:
39
70
  *
40
71
  * - Main entity types (IEntityName)
41
72
  * - Operation-specific variants (.ICreate, .IUpdate, .ISummary, etc.)
42
73
  * - Container types (IPage<T> for pagination)
43
74
  * - Enumeration types
44
75
  *
45
- * All schema definitions must include detailed descriptions that reference
46
- * the original Prisma schema comments and thoroughly document each
47
- * property. Every property that references an object must use a $ref to a
48
- * named type in the components.schemas section. This applies to all objects
49
- * in request bodies, response bodies, and properties that are objects or
50
- * arrays of objects.
76
+ * DO: Include detailed descriptions that reference the original Prisma
77
+ * schema comments and thoroughly document each property. DO: Use a $ref to
78
+ * a named type in the components.schemas section for every property that
79
+ * references an object.
80
+ *
81
+ * This applies to all objects in request bodies, response bodies, and
82
+ * properties that are objects or arrays of objects.
51
83
  *
52
84
  * Example structure:
53
85
  *