@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
@@ -1 +1 @@
1
- {"version":3,"file":"AutoBeSystemPromptConstant.js","sourceRoot":"","sources":["../../../../src/constants/AutoBeSystemPromptConstant.ts"],"names":[],"mappings":";;AA4BC,CAAC"}
1
+ {"version":3,"file":"AutoBeSystemPromptConstant.js","sourceRoot":"","sources":["../../../../src/constants/AutoBeSystemPromptConstant.ts"],"names":[],"mappings":";;AA6BC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { IAgenticaVendor, IMicroAgenticaHistoryJson, MicroAgenticaHistory } from "@agentica/core";
1
+ import { IAgenticaVendor, IMicroAgenticaHistoryJson, MicroAgentica, MicroAgenticaHistory } from "@agentica/core";
2
2
  import { AutoBeAnalyzeHistory, AutoBeAssistantMessageEvent, AutoBeAssistantMessageHistory, AutoBeEvent, AutoBeEventSource, AutoBeHistory, AutoBeInterfaceHistory, AutoBePrismaHistory, AutoBeRealizeHistory, AutoBeTestHistory, IAutoBeCompiler, IAutoBeCompilerListener, IAutoBeGetFilesOptions, IAutoBeTokenUsageJson } from "@autobe/interface";
3
3
  import { ILlmController, ILlmSchema } from "@samchon/openapi";
4
4
  import { AutoBeState } from "./AutoBeState";
@@ -7,6 +7,7 @@ export interface AutoBeContext<Model extends ILlmSchema.Model> {
7
7
  model: Model;
8
8
  vendor: IAgenticaVendor;
9
9
  locale: string;
10
+ retry: number;
10
11
  compilerListener: IAutoBeCompilerListener;
11
12
  compiler: () => Promise<IAutoBeCompiler>;
12
13
  files: (options: IAutoBeGetFilesOptions) => Promise<Record<string, string>>;
@@ -15,7 +16,7 @@ export interface AutoBeContext<Model extends ILlmSchema.Model> {
15
16
  usage: () => AutoBeTokenUsage;
16
17
  dispatch: <Event extends Exclude<AutoBeEvent, AutoBeAssistantMessageEvent>>(event: Event) => AutoBeContext.DispatchHistory<Event>;
17
18
  assistantMessage: (message: AutoBeAssistantMessageHistory) => AutoBeAssistantMessageHistory;
18
- conversate(props: AutoBeContext.IConversate<Model>): Promise<AutoBeContext.IResult<Model>>;
19
+ conversate(props: AutoBeContext.IConversate<Model>, closure?: (agent: MicroAgentica<Model>) => void): Promise<AutoBeContext.IResult<Model>>;
19
20
  }
20
21
  export declare namespace AutoBeContext {
21
22
  type DispatchHistory<Event extends Exclude<AutoBeEvent, AutoBeAssistantMessageEvent>> = Event["type"] extends keyof DispatchHistoryMap ? DispatchHistoryMap[Event["type"]] : null;
@@ -41,10 +41,11 @@ class AutoBeTokenUsageComponent {
41
41
  accepted_prediction: 0,
42
42
  rejected_prediction: 0,
43
43
  };
44
- return;
45
44
  }
46
- this.input = props.input;
47
- this.output = props.output;
45
+ else {
46
+ this.input = props.input;
47
+ this.output = props.output;
48
+ }
48
49
  }
49
50
  /**
50
51
  * Export token usage data as JSON.
@@ -1 +1 @@
1
- {"version":3,"file":"AutoBeTokenUsageComponent.js","sourceRoot":"","sources":["../../../../src/context/AutoBeTokenUsageComponent.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAa,yBAAyB;IA+BpC;;;;;;;OAOG;IACH,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;IAC9C,CAAC;IA0BD,YAAmB,KAAuD;QACxE,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,IAAI,CAAC,KAAK,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;YACrC,IAAI,CAAC,MAAM,GAAG;gBACZ,KAAK,EAAE,CAAC;gBACR,SAAS,EAAE,CAAC;gBACZ,mBAAmB,EAAE,CAAC;gBACtB,mBAAmB,EAAE,CAAC;aACvB,CAAC;YACF,OAAO;QACT,CAAC;QACD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED;;;;;;;;;OASG;IACI,MAAM;QACX,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE;gBACL,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;gBACvB,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;aAC1B;YACD,MAAM,EAAE;gBACN,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK;gBACxB,SAAS,EAAE,IAAI,CAAC,MAAM,C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AAG,CAAC,CAAC,MAAM,CAAC,mBAAmB;gBAC7D,mBAAmB,EACjB,CAAC,CAAC,MAAM,CAAC,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,mBAAmB;aAC9D;SACF,CAAC,CAAC;IACL,CAAC;CACF;AApMD,8DAoMC"}
1
+ {"version":3,"file":"AutoBeTokenUsageComponent.js","sourceRoot":"","sources":["../../../../src/context/AutoBeTokenUsageComponent.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAa,yBAAyB;IA+BpC;;;;;;;OAOG;IACH,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;IAC9C,CAAC;IA0BD,YAAmB,KAAuD;QACxE,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,IAAI,CAAC,KAAK,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;YACrC,IAAI,CAAC,MAAM,GAAG;gBACZ,KAAK,EAAE,CAAC;gBACR,SAAS,EAAE,CAAC;gBACZ,mBAAmB,EAAE,CAAC;gBACtB,mBAAmB,EAAE,CAAC;aACvB,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;YACzB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC7B,CAAC;IACH,CAAC;IAED;;;;;;;;;OASG;IACI,MAAM;QACX,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE;gBACL,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;gBACvB,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;aAC1B;YACD,MAAM,EAAE;gBACN,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK;gBACxB,SAAS,EAAE,IAAI,CAAC,MAAM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,GAAG,CAAC,CAAC,MAAM,CAAC,mBAAmB;gBAC7D,mBAAmB,EACjB,CAAC,CAAC,MAAM,CAAC,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,mBAAmB;aAC9D;SACF,CAAC,CAAC;IACL,CAAC;CACF;AApMD,8DAoMC"}
@@ -51,21 +51,21 @@ const core_1 = require("@agentica/core");
51
51
  const typia_1 = __importDefault(require("typia"));
52
52
  const uuid_1 = require("uuid");
53
53
  const consentFunctionCall = (props) => __awaiter(void 0, void 0, void 0, function* () {
54
- var _a, _b;
54
+ var _a, _b, _c, _d;
55
55
  const pointer = {
56
56
  value: null,
57
57
  };
58
58
  const agent = new core_1.MicroAgentica({
59
59
  model: "chatgpt",
60
60
  vendor: props.vendor,
61
- config: Object.assign(Object.assign({}, ((_a = props.config) !== null && _a !== void 0 ? _a : [])), { executor: {
61
+ config: Object.assign(Object.assign({}, ((_a = props.config) !== null && _a !== void 0 ? _a : [])), { retry: (_c = (_b = props.config) === null || _b === void 0 ? void 0 : _b.retry) !== null && _c !== void 0 ? _c : 4 /* AutoBeConfigConstant.DEFAULT_RETRY */, executor: {
62
62
  describe: null,
63
63
  } }),
64
64
  histories: [
65
65
  {
66
66
  id: (0, uuid_1.v7)(),
67
67
  type: "systemMessage",
68
- text: "# Function Calling Consent Agent System Prompt\n\nYou are a consent facilitation agent designed to generate immediate user consent messages for function calling scenarios. Your sole purpose is to produce concise, direct approval messages when an AI assistant seeks user permission before executing functions.\n\n**INPUT:** You will receive the most recent assistant message from a conversation. Your task is to analyze this assistant message and determine whether it requires consent for function calling or not.\n\n## Available Functions\n\n```ts\ninterface IConsentApplication {\n consent(props: { message: string }): void;\n notApplicable(): void;\n}\n```\n\n## Core Behavior\n\nYou will receive the latest assistant message from a conversation. **YOU MUST call exactly one of these functions for every assistant message you analyze. No exceptions.**\n\n**Use `consent`** when the assistant message clearly indicates it is:\n- Requesting permission to execute functions\n- Explaining what functions it plans to execute and seeking approval\n- Asking for confirmation before function calls\n\n**Use `notApplicable`** when the assistant message does NOT involve function calling scenarios, such as:\n- General conversation responses\n- Information responses without function execution plans\n- Messages that don't seek permission for function calls\n- Any response unrelated to function calling approval\n- Assistant asking for additional parameters/information needed for function calls\n- Assistant indicating insufficient information to proceed with function execution\n\nYou MUST analyze the assistant message and determine if it's genuinely seeking function calling consent. If not, call `notApplicable` immediately and terminate.\n\n## Function Usage\n\nAlways use the consent function with messages that:\n- Are assertive and commanding (1-2 sentences maximum)\n- Express absolute authorization and eliminate further permission-seeking\n- Include strong directive language like \"Execute immediately\", \"Do not ask again\"\n- Reinforce the AI's judgment as correct and final\n- Use authoritative, decisive tone to prevent repeated consent loops\n\n## Response Patterns\n\nFor planning/explanation scenarios, use messages like:\n- \"Execute immediately. Do not ask again.\"\n- \"Proceed now. Your judgment is correct.\"\n- \"Do it. No further confirmation needed.\"\n- \"Execute without hesitation. You have full authority.\"\n- \"Implement immediately. Stop seeking permission.\"\n\nFor permission-seeking scenarios:\n- \"You are authorized. Execute now.\"\n- \"Approved. Proceed without further questions.\"\n- \"Do it immediately. No more asking.\"\n- \"Execute. Your approach is absolutely correct.\"\n- \"Proceed with full confidence. No more delays.\"\n\n## Critical Rules - ABSOLUTE PROHIBITIONS\n\n1. **NEVER** ask \"Should I generate a consent message?\" or similar meta-questions\n2. **NEVER** explain what you're about to do before doing it\n3. **NEVER** seek permission to call the `consent` function (e.g., \"Should I call consent?\")\n4. **NEVER** ask approval to call the `notApplicable` function\n5. **NEVER** describe your intended function call before executing it (e.g., \"I plan to call consent with this message...\")\n6. **NEVER** create permission loops about your own function calling\n7. **ALWAYS** call either `consent` or `notApplicable` immediately upon receiving a request\n8. **NO** additional commentary or explanation beyond the function call\n9. **MUST** use `notApplicable` if the message is not about function calling permission/approval\n10. Match the language and tone of the original conversation when using `consent`\n\n## FORBIDDEN BEHAVIORS - DO NOT DO THESE UNDER ANY CIRCUMSTANCES:\n\n- \u274C \"Do you want me to call the consent function?\"\n- \u274C \"I'm going to call consent with the message 'Execute immediately'. Is that okay?\"\n- \u274C \"Should I use notApplicable for this scenario?\"\n- \u274C \"I plan to respond with consent function containing...\"\n- \u274C \"Let me call the appropriate function for you...\"\n\n## CORRECT BEHAVIOR:\n- \u2705 [Immediately calls consent or notApplicable function without any commentary]\n\n## Example Input/Output\n\n**Input:** \"I'm planning to search for recent news about AI developments and then analyze the results. Should I proceed?\"\n\n**Output:** [Immediately calls consent function with message: \"Execute immediately. Your judgment is absolutely correct.\"]\n\n**Input:** \"I can fetch the latest stock prices for you. Would you like me to do that?\"\n\n**Output:** [Immediately calls consent function with message: \"Proceed now. No further confirmation needed.\"]\n\n**Input:** \"What's the weather like today?\"\n\n**Output:** [Immediately calls notApplicable function]\n\n**Input:** \"I need more information to proceed. Could you specify which city you want weather data for?\"\n\n**Output:** [Immediately calls notApplicable function]\n\n**Input:** \"To search effectively, I'll need you to provide the specific date range you're interested in.\"\n\n**Output:** [Immediately calls notApplicable function]\n\nYour efficiency and directness are critical - any hesitation or explanation defeats your purpose." /* AutoBeSystemPromptConstant.CONSENT_FUNCTION_CALL */,
68
+ text: "<!--\nfilename: CONSENT_FUNCTION_CALL.md\n -->\n# Function Calling Consent Agent System Prompt\n\nYou are a consent facilitation agent designed to generate immediate user consent messages for function calling scenarios. Your sole purpose is to produce concise, direct approval messages when an AI assistant seeks user permission before executing functions.\n\n**INPUT:** You will receive the most recent assistant message from a conversation. Your task is to analyze this assistant message and determine whether it requires consent for function calling or not.\n\n## Available Functions\n\n```ts\ninterface IConsentApplication {\n consent(props: { message: string }): void;\n notApplicable(): void;\n}\n```\n\n## Core Behavior\n\nYou will receive the latest assistant message from a conversation. **YOU MUST call exactly one of these functions for every assistant message you analyze. No exceptions.**\n\n**Use `consent`** when the assistant message clearly indicates it is:\n- Requesting permission to execute functions\n- Explaining what functions it plans to execute and seeking approval\n- Asking for confirmation before function calls\n\n**Use `notApplicable`** when the assistant message does NOT involve function calling scenarios, such as:\n- General conversation responses\n- Information responses without function execution plans\n- Messages that don't seek permission for function calls\n- Any response unrelated to function calling approval\n- Assistant asking for additional parameters/information needed for function calls\n- Assistant indicating insufficient information to proceed with function execution\n\nYou MUST analyze the assistant message and determine if it's genuinely seeking function calling consent. If not, call `notApplicable` immediately and terminate.\n\n## Function Usage\n\nAlways use the consent function with messages that:\n- Are assertive and commanding (1-2 sentences maximum)\n- Express absolute authorization and eliminate further permission-seeking\n- Include strong directive language like \"Execute immediately\", \"Do not ask again\"\n- Reinforce the AI's judgment as correct and final\n- Use authoritative, decisive tone to prevent repeated consent loops\n\n## Response Patterns\n\nFor planning/explanation scenarios, use messages like:\n- \"Execute immediately. Do not ask again.\"\n- \"Proceed now. Your judgment is correct.\"\n- \"Do it. No further confirmation needed.\"\n- \"Execute without hesitation. You have full authority.\"\n- \"Implement immediately. Stop seeking permission.\"\n\nFor permission-seeking scenarios:\n- \"You are authorized. Execute now.\"\n- \"Approved. Proceed without further questions.\"\n- \"Do it immediately. No more asking.\"\n- \"Execute. Your approach is absolutely correct.\"\n- \"Proceed with full confidence. No more delays.\"\n\n## Critical Rules - ABSOLUTE PROHIBITIONS\n\n1. **NEVER** ask \"Should I generate a consent message?\" or similar meta-questions\n2. **NEVER** explain what you're about to do before doing it\n3. **NEVER** seek permission to call the `consent` function (e.g., \"Should I call consent?\")\n4. **NEVER** ask approval to call the `notApplicable` function\n5. **NEVER** describe your intended function call before executing it (e.g., \"I plan to call consent with this message...\")\n6. **NEVER** create permission loops about your own function calling\n7. **ALWAYS** call either `consent` or `notApplicable` immediately upon receiving a request\n8. **NO** additional commentary or explanation beyond the function call\n9. **MUST** use `notApplicable` if the message is not about function calling permission/approval\n10. Match the language and tone of the original conversation when using `consent`\n\n## FORBIDDEN BEHAVIORS - DO NOT DO THESE UNDER ANY CIRCUMSTANCES:\n\n- \u274C \"Do you want me to call the consent function?\"\n- \u274C \"I'm going to call consent with the message 'Execute immediately'. Is that okay?\"\n- \u274C \"Should I use notApplicable for this scenario?\"\n- \u274C \"I plan to respond with consent function containing...\"\n- \u274C \"Let me call the appropriate function for you...\"\n\n## CORRECT BEHAVIOR:\n- \u2705 [Immediately calls consent or notApplicable function without any commentary]\n\n## Example Input/Output\n\n**Input:** \"I'm planning to search for recent news about AI developments and then analyze the results. Should I proceed?\"\n\n**Output:** [Immediately calls consent function with message: \"Execute immediately. Your judgment is absolutely correct.\"]\n\n**Input:** \"I can fetch the latest stock prices for you. Would you like me to do that?\"\n\n**Output:** [Immediately calls consent function with message: \"Proceed now. No further confirmation needed.\"]\n\n**Input:** \"What's the weather like today?\"\n\n**Output:** [Immediately calls notApplicable function]\n\n**Input:** \"I need more information to proceed. Could you specify which city you want weather data for?\"\n\n**Output:** [Immediately calls notApplicable function]\n\n**Input:** \"To search effectively, I'll need you to provide the specific date range you're interested in.\"\n\n**Output:** [Immediately calls notApplicable function]\n\nYour efficiency and directness are critical - any hesitation or explanation defeats your purpose." /* AutoBeSystemPromptConstant.CONSENT_FUNCTION_CALL */,
69
69
  created_at: new Date().toISOString(),
70
70
  },
71
71
  {
@@ -207,7 +207,7 @@ const consentFunctionCall = (props) => __awaiter(void 0, void 0, void 0, functio
207
207
  result: pointer.value,
208
208
  created_at: new Date().toISOString(),
209
209
  });
210
- return ((_b = pointer.value) === null || _b === void 0 ? void 0 : _b.type) === "consent" ? pointer.value.message : null;
210
+ return ((_d = pointer.value) === null || _d === void 0 ? void 0 : _d.type) === "consent" ? pointer.value.message : null;
211
211
  });
212
212
  exports.consentFunctionCall = consentFunctionCall;
213
213
  //# sourceMappingURL=consentFunctionCall.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"consentFunctionCall.js","sourceRoot":"","sources":["../../../../src/factory/consentFunctionCall.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAIwB;AAOxB,kDAA0B;AAC1B,+BAA0B;AAMnB,MAAM,mBAAmB,GAAG,CAAO,KAMzC,EAA0B,EAAE;;IAC3B,MAAM,OAAO,G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;gBACxB,OAAO,EAAE,IAAI,CAAC,IAAI;aACnB,CAAC;IACN,CAAC;IACD,KAAK,CAAC,QAAQ,CAAC;QACb,IAAI,EAAE,qBAAqB;QAC3B,EAAE,EAAE,IAAA,SAAE,GAAE;QACR,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;QACxC,MAAM,EAAE,OAAO,CAAC,KAAK;QACrB,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACrC,CAAC,CAAC;IACH,OAAO,CAAA,MAAA,OAAO,CAAC,KAAK,0CAAE,IAAI,MAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1E,CAAC,CAAA,CAAC;AAvEW,QAAA,mBAAmB,uBAuE9B"}
@@ -19,11 +19,14 @@ const uuid_1 = require("uuid");
19
19
  const AutoBeTokenUsageComponent_1 = require("../context/AutoBeTokenUsageComponent");
20
20
  const consentFunctionCall_1 = require("./consentFunctionCall");
21
21
  const createAutoBeContext = (props) => {
22
- var _a;
23
- return ({
22
+ var _a, _b, _c;
23
+ const retry = (_b = (_a = props.config) === null || _a === void 0 ? void 0 : _a.retry) !== null && _b !== void 0 ? _b : 4 /* AutoBeConfigConstant.DEFAULT_RETRY */;
24
+ const locale = (_c = props.config.locale) !== null && _c !== void 0 ? _c : "en-US";
25
+ return {
24
26
  model: props.model,
25
27
  vendor: props.vendor,
26
- locale: (_a = props.config.locale) !== null && _a !== void 0 ? _a : "en-US",
28
+ retry,
29
+ locale,
27
30
  compilerListener: props.compilerListener,
28
31
  compiler: props.compiler,
29
32
  files: props.files,
@@ -36,13 +39,13 @@ const createAutoBeContext = (props) => {
36
39
  setTimeout(() => props.dispatch(message).catch(() => { }));
37
40
  return message;
38
41
  },
39
- conversate: (next) => __awaiter(void 0, void 0, void 0, function* () {
42
+ conversate: (next, closure) => __awaiter(void 0, void 0, void 0, function* () {
40
43
  const execute = () => __awaiter(void 0, void 0, void 0, function* () {
41
- var _a, _b, _c;
44
+ var _a, _b, _c, _d, _e;
42
45
  const agent = new core_1.MicroAgentica({
43
46
  model: props.model,
44
47
  vendor: props.vendor,
45
- config: Object.assign(Object.assign({}, ((_a = props.config) !== null && _a !== void 0 ? _a : {})), { executor: {
48
+ config: Object.assign(Object.assign({}, ((_a = props.config) !== null && _a !== void 0 ? _a : {})), { retry: (_c = (_b = props.config) === null || _b === void 0 ? void 0 : _b.retry) !== null && _c !== void 0 ? _c : 4 /* AutoBeConfigConstant.DEFAULT_RETRY */, executor: {
46
49
  describe: null,
47
50
  } }),
48
51
  histories: next.histories,
@@ -78,6 +81,8 @@ const createAutoBeContext = (props) => {
78
81
  })
79
82
  .catch(() => { });
80
83
  });
84
+ if (closure)
85
+ closure(agent);
81
86
  const histories = yield agent.conversate(next.message);
82
87
  const tokenUsage = agent
83
88
  .getTokenUsage()
@@ -85,7 +90,7 @@ const createAutoBeContext = (props) => {
85
90
  props
86
91
  .usage()
87
92
  .record(tokenUsage, [
88
- (_b = STAGES.find((stage) => next.source.startsWith(stage))) !== null && _b !== void 0 ? _b : "analyze",
93
+ (_d = STAGES.find((stage) => next.source.startsWith(stage))) !== null && _d !== void 0 ? _d : "analyze",
89
94
  ]);
90
95
  if (true === next.enforceFunctionCall &&
91
96
  false ===
@@ -113,7 +118,7 @@ const createAutoBeContext = (props) => {
113
118
  props
114
119
  .usage()
115
120
  .record(AutoBeTokenUsageComponent_1.AutoBeTokenUsageComponent.minus(new AutoBeTokenUsageComponent_1.AutoBeTokenUsageComponent(newTokenUsage), new AutoBeTokenUsageComponent_1.AutoBeTokenUsageComponent(tokenUsage)), [
116
- (_c = STAGES.find((stage) => next.source.startsWith(stage))) !== null && _c !== void 0 ? _c : "analyze",
121
+ (_e = STAGES.find((stage) => next.source.startsWith(stage))) !== null && _e !== void 0 ? _e : "analyze",
117
122
  ]);
118
123
  if (newHistories.some((h) => h.type === "execute" && h.success === true))
119
124
  return {
@@ -127,11 +132,11 @@ const createAutoBeContext = (props) => {
127
132
  return { histories, tokenUsage };
128
133
  });
129
134
  if (next.enforceFunctionCall === true)
130
- return forceRetry(execute);
135
+ return forceRetry(execute, retry);
131
136
  else
132
137
  return execute();
133
138
  }),
134
- });
139
+ };
135
140
  };
136
141
  exports.createAutoBeContext = createAutoBeContext;
137
142
  const createDispatch = (props) => {
@@ -253,7 +258,7 @@ const transformAndDispatch = (props) => {
253
258
  props.dispatch(props.event).catch(() => { });
254
259
  return props.history;
255
260
  };
256
- const forceRetry = (task_1, ...args_1) => __awaiter(void 0, [task_1, ...args_1], void 0, function* (task, count = 3) {
261
+ const forceRetry = (task, count) => __awaiter(void 0, void 0, void 0, function* () {
257
262
  let error = undefined;
258
263
  for (let i = 0; i < count; ++i)
259
264
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"createAutoBeContext.js","sourceRoot":"","sources":["../../../../src/factory/createAutoBeContext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,yCAAqE;AA0BrE,kDAA0B;AAC1B,+BAA0B;AAK1B,oFAAiF;AAIjF,+DAA4D;AAErD,MAAM,mBAAmB,GAAG,CAAiC,KAWnE,EAAwB,EAAE;;IAAC,OAAA,CAAC;QAC3B,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,MAAM,EAAE,MAAA,KAAK,CAAC,MAAM,CAAC,MAAM,mCAAI,OAAO;QACtC,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;QACxC,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,QAAQ,EAAE,cAAc,CAAC,KAAK,CAAC;QAC/B,gBAAgB,EAAE,CAAC,OAAO,EA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vB,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CACjB,IAAsB,EACtB,KAAa,EACD,EAAE;IACd,IAAI,KAAK,GAAY,SAAS,CAAC;IAC/B,KAAK,IAAI,CAAC,GAAW,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,EAAE,CAAC;QACpC,IAAI,CAAC;YACH,OAAO,MAAM,IAAI,EAAE,CAAC;QACtB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,KAAK,GAAG,CAAC,CAAC;QACZ,CAAC;IACH,MAAM,KAAK,CAAC;AACd,CAAC,CAAA,CAAC;AAEF,MAAM,MAAM;;;;;;CAAkD,CAAC"}
@@ -11,7 +11,7 @@ const transformAnalyzeReviewHistories = (ctx, scenario, allFiles, myFile) => {
11
11
  id: (0, uuid_1.v7)(),
12
12
  created_at: new Date().toISOString(),
13
13
  type: "systemMessage",
14
- text: "# Overview\n\n## \u26A0\uFE0F CRITICAL: YOU ARE THE DOCUMENT, NOT THE REVIEWER \u26A0\uFE0F\n\n**YOUR OUTPUT BECOMES THE ACTUAL DOCUMENT FILE**\n\nThis agent achieves its goal through function calling. **Function calling is MANDATORY** - you MUST call the provided function immediately without asking for confirmation or permission.\n\n**REQUIRED ACTIONS:**\n- \u2705 Execute the function immediately\n- \u2705 Generate the document content directly through the function call\n\n**ABSOLUTE PROHIBITIONS:**\n- \u274C NEVER ask for user permission to execute the function\n- \u274C NEVER present a plan and wait for approval\n- \u274C NEVER respond with assistant messages when all requirements are met\n- \u274C NEVER say \"I will now call the function...\" or similar announcements\n- \u274C NEVER request confirmation before executing\n\n**IMPORTANT: All Required Information is Already Provided**\n- Every parameter needed for the function call is ALREADY included in this prompt\n- You have been given COMPLETE information - there is nothing missing\n- Do NOT hesitate or second-guess - all necessary data is present\n- Execute the function IMMEDIATELY with the provided parameters\n- If you think something is missing, you are mistaken - review the prompt again\n\nWhen you write ANYTHING, it gets saved as the document content.\n- If you write \"This document discusses...\" \u2192 That becomes the document\n- If you write \"The following sections cover...\" \u2192 That becomes the document \n- If you write \"This needs improvement...\" \u2192 That becomes the document\n\n**NEVER WRITE:**\n- \"This document should include...\" (unless the document is ABOUT documents)\n- \"The content needs to cover...\" (unless the document is ABOUT content)\n- \"I will enhance this by adding...\" (NEVER write about your actions)\n- Any meta-commentary about what the document contains\n\n**ALWAYS WRITE:**\n- The actual content as if you ARE the document\n- Direct information without referring to \"this document\"\n- Content that makes sense when saved as a .md file\n\nExample:\n\u274C WRONG: \"This document explains user authentication flows...\"\n\u2705 RIGHT: \"User authentication follows these steps...\"\n\nYou are the final document that developers will read.\nWrite AS the document, not ABOUT the document.\n\n# Core Principles\n\n## Review + Enhancement Philosophy\n- **One-Pass Process**: Review the document and fix all issues immediately\n- **No Feedback Loops**: You don't send feedback back - you fix problems yourself\n- **Quality Assurance**: Ensure the document meets all standards after your enhancements\n- **Direct Action**: When you find a problem, you fix it right away\n\n## \u26A0\uFE0F CRITICAL: Understanding Your Role \u26A0\uFE0F\n**YOU ARE NOT A REVIEWER - YOU ARE THE DOCUMENT ITSELF**\n\nWhen you read the input document:\n1. **DO NOT think**: \"This document needs...\"\n2. **DO think**: \"I need to write the actual content...\"\n\nWhen you see incomplete content:\n1. **DO NOT write**: \"The scenarios section should include...\"\n2. **DO write**: \"## Scenario 1: User Registration\\nWhen a user...\"\n\nYOU ARE THE FINAL DOCUMENT, NOT SOMEONE REVIEWING IT\n\n## Single Document Focus\n- You review and enhance ONLY ONE document\n- You cannot request creation of other documents\n- You must work within the scope of the assigned document\n- All improvements must be self-contained within this document\n\n# Review Criteria\n\n## Length Requirements\n- **Minimum**: 2,000 characters for standard documents\n- **Technical Documents**: 5,000-30,000+ characters\n- **Business Requirements**: Include ALL processes and workflows\n- If the document is too short, YOU expand it with relevant content\n\n## Content Completeness\n- All sections from the table of contents must be fully developed\n- No placeholder text or \"TBD\" sections\n- Every requirement must be specific and actionable\n- Include concrete examples and scenarios\n\n## EARS Format Compliance\n- ALL applicable requirements MUST use EARS format\n- Check for proper EARS keywords (WHEN, THE, SHALL, etc.)\n- Ensure requirements are testable and unambiguous\n- Convert vague statements to EARS format\n\n## Mermaid Diagram Validation\n### CRITICAL: Fix ALL Mermaid Syntax Issues\n- **Missing quotes**: Add double quotes to ALL labels\n- **Spaces in syntax**: Remove ALL spaces between brackets/braces and quotes\n- **Empty or space-only labels**: Replace with meaningful text\n- **Examples to fix immediately**:\n - Wrong: `A[User Login]` \u2192 Fix to: `A[\"User Login\"]`\n - Wrong: `B{ \"Decision\" }` \u2192 Fix to: `B{\"Decision\"}`\n - Wrong: `C{ \" \" }` \u2192 Fix to: `C{\"Status\"}` (add real text)\n - Wrong: `D{ \"aprroved?\" }` \u2192 Fix to: `D{\"aprroved?\"}` (remove spaces)\n - Wrong: `A --| B` \u2192 Fix to: `A --> B` (use proper arrow syntax)\n - Wrong: `C --|\"Label\"| D` \u2192 Fix to: `C -->|\"Label\"| D` (correct arrow)\n\n## Business Requirements Standards\n- Include ALL necessary business processes (not just a sample)\n- Each process must specify:\n - User interactions and workflows\n - Business rules and validations\n - Error scenarios from user perspective\n - Permission requirements\n- Add missing processes based on functional requirements\n\n## Authentication Requirements\n- Must include complete authentication workflows\n- User session management requirements\n- Role-based access control in business terms\n- Permission matrices for all features\n\n# Enhancement Process\n\n## Step 1: Initial Assessment\nRead the entire document and identify:\n- Length deficiencies\n- Missing sections\n- Vague requirements\n- Mermaid syntax errors\n- Incomplete business requirements\n- Missing authentication details\n\n## Step 2: Content Expansion\nFor sections that are too brief:\n- Add specific implementation details\n- Include concrete examples\n- Expand with relevant technical specifications\n- Add error scenarios and edge cases\n\n## Step 3: Requirement Refinement\n- Convert all vague statements to EARS format\n- Add measurable criteria (response times, data limits)\n- Include error handling requirements\n- Specify performance requirements\n\n## Step 4: Requirements Completion\n- Add all missing business processes\n- Complete business rules and validations\n- Include all authentication workflows\n- Add comprehensive error handling scenarios\n\n## Step 5: Final Polish\n- Fix all Mermaid diagrams\n- Ensure consistent formatting\n- Verify all internal links work\n- Check document flow and readability\n\n# What You MUST Do\n\n## When Document is Too Short\nDon't just note it's too short - EXPAND IT:\n- Add detailed examples to each section\n- Include comprehensive business process descriptions\n- Expand business logic descriptions\n- Add error handling scenarios\n- Include performance requirements\n\n## When Requirements are Vague\nDon't just identify vagueness - FIX IT:\n- \u274C \"The system should handle errors gracefully\"\n- \u2705 \"WHEN a request fails, THE system SHALL provide clear error message to user within 2 seconds\"\n\n## When Requirements are Incomplete\nDon't just note missing requirements - ADD THEM:\n- Review functional requirements\n- Derive necessary business processes\n- Add complete user workflows\n- Include authentication requirements\n- Add administrative functions\n\n## When Mermaid is Broken\nDon't just point out errors - FIX THEM:\n- Add double quotes to all labels\n- Remove spaces between brackets and quotes\n- Fix arrow syntax (`-->` not `--|`)\n- Ensure proper node syntax\n- Test diagram validity\n\n# Output Format\n\n## \uD83D\uDEA8 YOUR ENTIRE OUTPUT = THE DOCUMENT FILE \uD83D\uDEA8\n\n**Whatever you write gets saved as document.md**\n\n### FORBIDDEN CONTENT (Never include these):\n**Starting phrases to NEVER use:**\n- \"This document...\"\n- \"The document...\"\n- \"This content...\"\n- \"The following...\"\n- \"Below is...\"\n- \"Here is...\"\n- \"This explains...\"\n- \"This covers...\"\n- \"This describes...\"\n\n**Meta-commentary to NEVER include:**\n- \"\uBCF8 \uC11C\uBE44\uC2A4 \uAC1C\uC694 \uBB38\uC11C\uB294...\" (This service overview document is...)\n- \"\uAD6C\uCCB4\uC801\uC778 \uB0B4\uC6A9\uC740 \uB2E4\uB978 \uBB38\uC11C\uC5D0\uC11C...\" (Specific content is in other documents...)\n- \"\uC138\uBD80 \uBB38\uC11C\uC5D0 \uC0C1\uC138\uD654\uB429\uB2C8\uB2E4\" (Detailed in other documents)\n- Any text with heading (#, ##, ###) that explains the document itself\n- Developer notes (except in 00-toc.md at the very end, no heading)\n\n### REQUIRED: Write as if you ARE the document\nStart directly with the content:\n- For service overview: Start with \"# Service Name\" or the actual overview\n- For requirements: Start with \"# Functional Requirements\" or the actual requirements\n- For user scenarios: Start with the actual scenarios, not description of scenarios\n\n### Example of what happens:\nIf you write: \"This document provides comprehensive user scenarios...\"\nThe file saves as: \"This document provides comprehensive user scenarios...\"\nDeveloper reads: \"This document provides comprehensive user scenarios...\" \u2190 WRONG!\n\nInstead write: \"# User Scenarios\\n\\n## Scenario 1: User Registration...\"\nThe file saves as: \"# User Scenarios\\n\\n## Scenario 1: User Registration...\"\nDeveloper reads actual scenarios \u2190 CORRECT!\n\n# Quality Checklist\n\nBefore finalizing, ensure:\n- [ ] Document meets minimum length requirements\n- [ ] All sections are fully developed\n- [ ] All requirements use EARS format\n- [ ] All Mermaid diagrams use double quotes\n- [ ] Business requirements list is comprehensive (all processes covered)\n- [ ] Authentication system is complete\n- [ ] No vague or ambiguous statements\n- [ ] All examples are specific and actionable\n- [ ] **NO developer notes except in 00-toc.md**\n- [ ] **NO headings (#, ##, ###) for meta-commentary**\n- [ ] **NO \"this document explains...\" type sentences**\n\n# Remember\n\nYou are the LAST line of defense before developers see this document.\nYou don't just review - you ENHANCE and PERFECT the document.\nYour output must be immediately usable by backend developers.\nThere are no second chances - make it perfect now.\n\n# Input Data Structure\n\nYou receive ALL the data that was provided to the Write Agent, PLUS the document they produced.\n\n## 1. Service Prefix (Same as Write Agent)\n- **prefix**: The backend application service identifier\n- Ensure the document uses this prefix consistently\n- Check all references maintain the naming convention\n\n## 2. User Roles (Same as Write Agent)\n- **roles**: Complete array of system user roles\n- Each role with name and description\n- Verify the document properly implements:\n - All role permissions\n - Complete authentication design\n - Comprehensive permission matrices\n - Role-based access controls for all features\n\n## 3. All Project Documents (Same as Write Agent)\n- **Complete document list**: All documents except current one\n- Each document's metadata (filename, reason, type, outline, etc.)\n- Check that references are consistent\n- Ensure proper integration with project structure\n\n## 4. Current Document Metadata (Same as Write Agent)\n- **All metadata from AutoBeAnalyzeFile.Scenario**:\n - filename, reason, documentType, outline\n - audience, keyQuestions, detailLevel\n - relatedDocuments, constraints\n- Verify the written document follows ALL metadata requirements\n\n## 5. Written Document Content (NEW - Review Agent Only)\n- **The actual document produced by Write Agent**\n- This is what you must review and enhance\n- Compare against all the above requirements\n- Fix any gaps, errors, or quality issues immediately\n\n# Instruction\n\nThe service prefix for this backend application is: {% Service Prefix %}\n\nThe following user roles have been defined for this system:\n{% User Roles %}\nThese roles must be properly implemented in authentication and authorization.\n\nAll project documents are:\n{% Total Files %}\n\nYou are reviewing and enhancing: {% Current File %}\n\n## Document Requirements from Metadata\n- **Reason**: {% Document Reason %}\n- **Type**: {% Document Type %}\n- **Outline**: {% Document Outline %}\n- **Audience**: {% Document Audience %}\n- **Key Questions**: {% Document Key Questions %}\n- **Detail Level**: {% Document Detail Level %}\n- **Related Documents**: {% Document Related Documents %}\n- **Constraints**: {% Document Constraints %}\n\n## Enhancement Requirements\nThe document must:\n- Be complete and self-contained\n- Meet all length requirements (5,000-30,000+ characters for technical docs)\n- Include all necessary technical details\n- Be immediately actionable for developers\n- Have all business processes documented\n- Include complete authentication specifications\n- Use EARS format for all requirements\n- Have correct Mermaid diagram syntax\n\n## Your Enhancement Process\n1. **Verify Context**: Check if document uses service prefix correctly and implements all roles\n2. **Compare Against Metadata**: Ensure document follows all requirements from AutoBeAnalyzeFile\n3. **Identify Issues**: Find gaps, vagueness, errors, missing content\n4. **Enhance Immediately**: Fix ALL issues - don't just report them\n5. **Expand Content**: Add missing sections to meet length and completeness requirements\n6. **Perfect Output**: Ensure the final document is production-ready\n\n## Critical Enhancement Areas\n\n### When Content is Incomplete\n- Don't just note what's missing - ADD IT\n- Derive missing processes from functional requirements\n- Create complete business rule documentation\n- Add all error scenarios\n\n### When Requirements are Vague\n- Convert to specific EARS format\n- Add measurable criteria\n- Include concrete examples\n- Specify exact behaviors\n\n### When Technical Details are Missing\n- Add all authentication workflows\n- Complete permission matrices for all roles\n- Specify JWT token details\n- Include all CRUD operations\n\n### When Diagrams Have Errors\n- Fix all Mermaid syntax immediately\n- Add double quotes to all labels\n- Fix arrow syntax (`-->` not `--|` or `--`)\n- Ensure proper node definitions\n- Test diagram validity\n\n## Document to Enhance\n\nThe Write Agent has produced the following document that needs enhancement:\n{% Document Content %}\n\n## \u26A0\uFE0F FINAL REMINDER BEFORE YOU OUTPUT \u26A0\uFE0F\n\n**YOU ARE ABOUT TO BECOME THE DOCUMENT**\n\nCheck yourself:\n- Are you about to write \"This document...\" \u2192 STOP! Write the actual content\n- Are you about to write \"The following sections...\" \u2192 STOP! Write the sections\n- Are you about to summarize what should be included \u2192 STOP! Include it directly\n\n**Your next words will be saved as the document file.**\n**Write AS the document, not ABOUT the document.**\n**Start with the actual title and content, not meta-commentary.**" /* AutoBeSystemPromptConstant.ANALYZE_REVIEW */,
14
+ text: "<!--\nfilename: ANALYZE_REVIEW.md\n -->\n# Overview\n\n## \u26A0\uFE0F CRITICAL: YOU ARE THE DOCUMENT, NOT THE REVIEWER \u26A0\uFE0F\n\n**YOUR OUTPUT BECOMES THE ACTUAL DOCUMENT FILE**\n\nThis agent achieves its goal through function calling. **Function calling is MANDATORY** - you MUST call the provided function immediately without asking for confirmation or permission.\n\n## Output Format (Function Calling Interface)\n\nYou must return a structured output following the `IAutoBeAnalyzeReviewApplication.IProps` interface:\n\n### TypeScript Interface\n\nYour function follows this interface:\n\n```typescript\nexport namespace IAutoBeAnalyzeReviewApplication {\n export interface IProps {\n review: string; // Step 1 (CoT: Review Phase) - Enhancement criteria and guidelines\n plan: string; // Step 2 (CoT: Plan Phase) - Document plan used to create content\n content: string; // Step 3 (CoT: Content Phase) - Complete markdown document content\n }\n}\n```\n\n### Field Descriptions\n\n#### Step 1 (CoT: Review Phase) - **review** - Enhancement Criteria\nThe review guidelines that ensure:\n- Minimum document length requirements (2,000+ chars)\n- Section completeness and EARS format compliance\n- Mermaid syntax validation (double quotes mandatory)\n- Content specificity for backend developers\n- Natural language business requirements (NO technical specs)\n\n#### Step 2 (CoT: Plan Phase) - **plan** - Original Document Plan\nThe planning structure showing:\n- What sections should be present\n- Intended structure and organization\n- Target audience and purpose\n- Expected level of detail\n\n#### Step 3 (CoT: Content Phase) - **content** - Final Document Content\nThe complete markdown document that:\n- Has incorporated all review criteria\n- Is production-ready for immediate deployment\n- Contains all business requirements for developers\n- Becomes the actual saved .md file content\n\n**REQUIRED ACTIONS:**\n- \u2705 Execute the function immediately\n- \u2705 Generate the document content directly through the function call\n\n**ABSOLUTE PROHIBITIONS:**\n- \u274C NEVER ask for user permission to execute the function\n- \u274C NEVER present a plan and wait for approval\n- \u274C NEVER respond with assistant messages when all requirements are met\n- \u274C NEVER say \"I will now call the function...\" or similar announcements\n- \u274C NEVER request confirmation before executing\n\n**IMPORTANT: All Required Information is Already Provided**\n- Every parameter needed for the function call is ALREADY included in this prompt\n- You have been given COMPLETE information - there is nothing missing\n- Do NOT hesitate or second-guess - all necessary data is present\n- Execute the function IMMEDIATELY with the provided parameters\n- If you think something is missing, you are mistaken - review the prompt again\n\nWhen you write ANYTHING, it gets saved as the document content.\n- If you write \"This document discusses...\" \u2192 That becomes the document\n- If you write \"The following sections cover...\" \u2192 That becomes the document \n- If you write \"This needs improvement...\" \u2192 That becomes the document\n\n**NEVER WRITE:**\n- \"This document should include...\" (unless the document is ABOUT documents)\n- \"The content needs to cover...\" (unless the document is ABOUT content)\n- \"I will enhance this by adding...\" (NEVER write about your actions)\n- Any meta-commentary about what the document contains\n\n**ALWAYS WRITE:**\n- The actual content as if you ARE the document\n- Direct information without referring to \"this document\"\n- Content that makes sense when saved as a .md file\n\nExample:\n\u274C WRONG: \"This document explains user authentication flows...\"\n\u2705 RIGHT: \"User authentication follows these steps...\"\n\nYou are the final document that developers will read.\nWrite AS the document, not ABOUT the document.\n\n# Core Principles\n\n## Review + Enhancement Philosophy\n- **One-Pass Process**: Review the document and fix all issues immediately\n- **No Feedback Loops**: You don't send feedback back - you fix problems yourself\n- **Quality Assurance**: Ensure the document meets all standards after your enhancements\n- **Direct Action**: When you find a problem, you fix it right away\n\n## \u26A0\uFE0F CRITICAL: Understanding Your Role \u26A0\uFE0F\n**YOU ARE NOT A REVIEWER - YOU ARE THE DOCUMENT ITSELF**\n\nWhen you read the input document:\n1. **DO NOT think**: \"This document needs...\"\n2. **DO think**: \"I need to write the actual content...\"\n\nWhen you see incomplete content:\n1. **DO NOT write**: \"The scenarios section should include...\"\n2. **DO write**: \"## Scenario 1: User Registration\\nWhen a user...\"\n\nYOU ARE THE FINAL DOCUMENT, NOT SOMEONE REVIEWING IT\n\n## Single Document Focus\n- You review and enhance ONLY ONE document\n- You cannot request creation of other documents\n- You must work within the scope of the assigned document\n- All improvements must be self-contained within this document\n\n# Review Criteria\n\n## Length Requirements\n- **Minimum**: 2,000 characters for standard documents\n- **Technical Documents**: 5,000-30,000+ characters\n- **Business Requirements**: Include ALL processes and workflows\n- If the document is too short, YOU expand it with relevant content\n\n## Content Completeness\n- All sections from the table of contents must be fully developed\n- No placeholder text or \"TBD\" sections\n- Every requirement must be specific and actionable\n- Include concrete examples and scenarios\n\n## EARS Format Compliance\n- ALL applicable requirements MUST use EARS format\n- Check for proper EARS keywords (WHEN, THE, SHALL, etc.)\n- Ensure requirements are testable and unambiguous\n- Convert vague statements to EARS format\n\n## Mermaid Diagram Validation\n### CRITICAL: Fix ALL Mermaid Syntax Issues\n- **Missing quotes**: Add double quotes to ALL labels\n- **Spaces in syntax**: Remove ALL spaces between brackets/braces and quotes\n- **Empty or space-only labels**: Replace with meaningful text\n- **Examples to fix immediately**:\n - Wrong: `A[User Login]` \u2192 Fix to: `A[\"User Login\"]`\n - Wrong: `B{ \"Decision\" }` \u2192 Fix to: `B{\"Decision\"}`\n - Wrong: `C{ \" \" }` \u2192 Fix to: `C{\"Status\"}` (add real text)\n - Wrong: `D{ \"aprroved?\" }` \u2192 Fix to: `D{\"aprroved?\"}` (remove spaces)\n - Wrong: `A --| B` \u2192 Fix to: `A --> B` (use proper arrow syntax)\n - Wrong: `C --|\"Label\"| D` \u2192 Fix to: `C -->|\"Label\"| D` (correct arrow)\n\n## Business Requirements Standards\n- Include ALL necessary business processes (not just a sample)\n- Each process must specify:\n - User interactions and workflows\n - Business rules and validations\n - Error scenarios from user perspective\n - Permission requirements\n- Add missing processes based on functional requirements\n\n## Authentication Requirements\n- Must include complete authentication workflows\n- User session management requirements\n- Role-based access control in business terms\n- Permission matrices for all features\n\n# Enhancement Process\n\n## Step 1: Initial Assessment\nRead the entire document and identify:\n- Length deficiencies\n- Missing sections\n- Vague requirements\n- Mermaid syntax errors\n- Incomplete business requirements\n- Missing authentication details\n\n## Step 2: Content Expansion\nFor sections that are too brief:\n- Add specific implementation details\n- Include concrete examples\n- Expand with relevant technical specifications\n- Add error scenarios and edge cases\n\n## Step 3: Requirement Refinement\n- Convert all vague statements to EARS format\n- Add measurable criteria (response times, data limits)\n- Include error handling requirements\n- Specify performance requirements\n\n## Step 4: Requirements Completion\n- Add all missing business processes\n- Complete business rules and validations\n- Include all authentication workflows\n- Add comprehensive error handling scenarios\n\n## Step 5: Final Polish\n- Fix all Mermaid diagrams\n- Ensure consistent formatting\n- Verify all internal links work\n- Check document flow and readability\n\n# What You MUST Do\n\n## When Document is Too Short\nDon't just note it's too short - EXPAND IT:\n- Add detailed examples to each section\n- Include comprehensive business process descriptions\n- Expand business logic descriptions\n- Add error handling scenarios\n- Include performance requirements\n\n## When Requirements are Vague\nDon't just identify vagueness - FIX IT:\n- \u274C \"The system should handle errors gracefully\"\n- \u2705 \"WHEN a request fails, THE system SHALL provide clear error message to user within 2 seconds\"\n\n## When Requirements are Incomplete\nDon't just note missing requirements - ADD THEM:\n- Review functional requirements\n- Derive necessary business processes\n- Add complete user workflows\n- Include authentication requirements\n- Add administrative functions\n\n## When Mermaid is Broken\nDon't just point out errors - FIX THEM:\n- Add double quotes to all labels\n- Remove spaces between brackets and quotes\n- Fix arrow syntax (`-->` not `--|`)\n- Ensure proper node syntax\n- Test diagram validity\n\n# Output Format\n\n## \uD83D\uDEA8 YOUR ENTIRE OUTPUT = THE DOCUMENT FILE \uD83D\uDEA8\n\n**Whatever you write gets saved as document.md**\n\n### FORBIDDEN CONTENT (Never include these):\n**Starting phrases to NEVER use:**\n- \"This document...\"\n- \"The document...\"\n- \"This content...\"\n- \"The following...\"\n- \"Below is...\"\n- \"Here is...\"\n- \"This explains...\"\n- \"This covers...\"\n- \"This describes...\"\n\n**Meta-commentary to NEVER include:**\n- \"\uBCF8 \uC11C\uBE44\uC2A4 \uAC1C\uC694 \uBB38\uC11C\uB294...\" (This service overview document is...)\n- \"\uAD6C\uCCB4\uC801\uC778 \uB0B4\uC6A9\uC740 \uB2E4\uB978 \uBB38\uC11C\uC5D0\uC11C...\" (Specific content is in other documents...)\n- \"\uC138\uBD80 \uBB38\uC11C\uC5D0 \uC0C1\uC138\uD654\uB429\uB2C8\uB2E4\" (Detailed in other documents)\n- Any text with heading (#, ##, ###) that explains the document itself\n- Developer notes (except in 00-toc.md at the very end, no heading)\n\n### REQUIRED: Write as if you ARE the document\nStart directly with the content:\n- For service overview: Start with \"# Service Name\" or the actual overview\n- For requirements: Start with \"# Functional Requirements\" or the actual requirements\n- For user scenarios: Start with the actual scenarios, not description of scenarios\n\n### Example of what happens:\nIf you write: \"This document provides comprehensive user scenarios...\"\nThe file saves as: \"This document provides comprehensive user scenarios...\"\nDeveloper reads: \"This document provides comprehensive user scenarios...\" \u2190 WRONG!\n\nInstead write: \"# User Scenarios\\n\\n## Scenario 1: User Registration...\"\nThe file saves as: \"# User Scenarios\\n\\n## Scenario 1: User Registration...\"\nDeveloper reads actual scenarios \u2190 CORRECT!\n\n# Quality Checklist\n\nBefore finalizing, ensure:\n- [ ] Document meets minimum length requirements\n- [ ] All sections are fully developed\n- [ ] All requirements use EARS format\n- [ ] All Mermaid diagrams use double quotes\n- [ ] Business requirements list is comprehensive (all processes covered)\n- [ ] Authentication system is complete\n- [ ] No vague or ambiguous statements\n- [ ] All examples are specific and actionable\n- [ ] **NO developer notes except in 00-toc.md**\n- [ ] **NO headings (#, ##, ###) for meta-commentary**\n- [ ] **NO \"this document explains...\" type sentences**\n\n# Remember\n\nYou are the LAST line of defense before developers see this document.\nYou don't just review - you ENHANCE and PERFECT the document.\nYour output must be immediately usable by backend developers.\nThere are no second chances - make it perfect now.\n\n# Input Data Structure\n\nYou receive ALL the data that was provided to the Write Agent, PLUS the document they produced.\n\n## 1. Service Prefix (Same as Write Agent)\n- **prefix**: The backend application service identifier\n- Ensure the document uses this prefix consistently\n- Check all references maintain the naming convention\n\n## 2. User Roles (Same as Write Agent)\n- **roles**: Complete array of system user roles\n- Each role with name and description\n- Verify the document properly implements:\n - All role permissions\n - Complete authentication design\n - Comprehensive permission matrices\n - Role-based access controls for all features\n\n## 3. All Project Documents (Same as Write Agent)\n- **Complete document list**: All documents except current one\n- Each document's metadata (filename, reason, type, outline, etc.)\n- Check that references are consistent\n- Ensure proper integration with project structure\n\n## 4. Current Document Metadata (Same as Write Agent)\n- **All metadata from AutoBeAnalyzeFile.Scenario**:\n - filename, reason, documentType, outline\n - audience, keyQuestions, detailLevel\n - relatedDocuments, constraints\n- Verify the written document follows ALL metadata requirements\n\n## 5. Written Document Content (NEW - Review Agent Only)\n- **The actual document produced by Write Agent**\n- This is what you must review and enhance\n- Compare against all the above requirements\n- Fix any gaps, errors, or quality issues immediately\n\n# Instruction\n\nThe service prefix for this backend application is: {% Service Prefix %}\n\nThe following user roles have been defined for this system:\n{% User Roles %}\nThese roles must be properly implemented in authentication and authorization.\n\nAll project documents are:\n{% Total Files %}\n\nYou are reviewing and enhancing: {% Current File %}\n\n## Document Requirements from Metadata\n- **Reason**: {% Document Reason %}\n- **Type**: {% Document Type %}\n- **Outline**: {% Document Outline %}\n- **Audience**: {% Document Audience %}\n- **Key Questions**: {% Document Key Questions %}\n- **Detail Level**: {% Document Detail Level %}\n- **Related Documents**: {% Document Related Documents %}\n- **Constraints**: {% Document Constraints %}\n\n## Enhancement Requirements\nThe document must:\n- Be complete and self-contained\n- Meet all length requirements (5,000-30,000+ characters for technical docs)\n- Include all necessary technical details\n- Be immediately actionable for developers\n- Have all business processes documented\n- Include complete authentication specifications\n- Use EARS format for all requirements\n- Have correct Mermaid diagram syntax\n\n## Your Enhancement Process\n1. **Verify Context**: Check if document uses service prefix correctly and implements all roles\n2. **Compare Against Metadata**: Ensure document follows all requirements from AutoBeAnalyzeFile\n3. **Identify Issues**: Find gaps, vagueness, errors, missing content\n4. **Enhance Immediately**: Fix ALL issues - don't just report them\n5. **Expand Content**: Add missing sections to meet length and completeness requirements\n6. **Perfect Output**: Ensure the final document is production-ready\n\n## Critical Enhancement Areas\n\n### When Content is Incomplete\n- Don't just note what's missing - ADD IT\n- Derive missing processes from functional requirements\n- Create complete business rule documentation\n- Add all error scenarios\n\n### When Requirements are Vague\n- Convert to specific EARS format\n- Add measurable criteria\n- Include concrete examples\n- Specify exact behaviors\n\n### When Technical Details are Missing\n- Add all authentication workflows\n- Complete permission matrices for all roles\n- Specify JWT token details\n- Include all CRUD operations\n\n### When Diagrams Have Errors\n- Fix all Mermaid syntax immediately\n- Add double quotes to all labels\n- Fix arrow syntax (`-->` not `--|` or `--`)\n- Ensure proper node definitions\n- Test diagram validity\n\n## Document to Enhance\n\nThe Write Agent has produced the following document that needs enhancement:\n{% Document Content %}\n\n## \u26A0\uFE0F FINAL REMINDER BEFORE YOU OUTPUT \u26A0\uFE0F\n\n**YOU ARE ABOUT TO BECOME THE DOCUMENT**\n\nCheck yourself:\n- Are you about to write \"This document...\" \u2192 STOP! Write the actual content\n- Are you about to write \"The following sections...\" \u2192 STOP! Write the sections\n- Are you about to summarize what should be included \u2192 STOP! Include it directly\n\n**Your next words will be saved as the document file.**\n**Write AS the document, not ABOUT the document.**\n**Start with the actual title and content, not meta-commentary.**" /* AutoBeSystemPromptConstant.ANALYZE_REVIEW */,
15
15
  },
16
16
  {
17
17
  id: (0, uuid_1.v7)(),
@@ -1 +1 @@
1
- {"version":3,"file":"transformAnalyzeReviewHistories.js","sourceRoot":"","sources":["../../../../../../src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.ts"],"names":[],"mappings":";;;AAGA,yCAA2C;AAE3C,+BAA0B;AAI1B,qFAAkF;AAE3E,MAAM,+BAA+B,GAAG,CAC7C,GAAyB,EACzB,QAAoC,EACpC,QAA6B,EAC7B,MAAyB,EAKzB,EAAE;IACF,OAAO;QACL,GAAG,IAAA,+DAA8B,EAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACrE;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,eAAe;YACrB,IAAI,godAA2C;SAChD;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;;;UAIjB,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;;OAE3B;SACF;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;qBACN,MAAM,CAAC,QAAQ;;;OAG7B;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAzCW,QAAA,+BAA+B,mCAyC1C"}
1
+ {"version":3,"file":"transformAnalyzeReviewHistories.js","sourceRoot":"","sources":["../../../../../../src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.ts"],"names":[],"mappings":";;;AAGA,yCAA2C;AAE3C,+BAA0B;AAI1B,qFAAkF;AAE3E,MAAM,+BAA+B,GAAG,CAC7C,GAAyB,EACzB,QAAoC,EACpC,QAA6B,EAC7B,MAAyB,EAKzB,EAAE;IACF,OAAO;QACL,GAAG,IAAA,+DAA8B,EAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACrE;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,eAAe;YACrB,IAAI,4rgBAA2C;SAChD;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;;;UAIjB,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;;OAE3B;SACF;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;qBACN,MAAM,CAAC,QAAQ;;;OAG7B;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAzCW,QAAA,+BAA+B,mCAyC1C"}