@autobe/agent 0.24.2 → 0.25.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 (187) hide show
  1. package/lib/constants/AutoBeSystemPromptConstant.d.ts +16 -16
  2. package/lib/context/IAutoBeApplication.d.ts +101 -6
  3. package/lib/context/IAutoBeApplicationProps.d.ts +6 -2
  4. package/lib/factory/createAgenticaHistory.js +1 -1
  5. package/lib/factory/createAgenticaHistory.js.map +1 -1
  6. package/lib/factory/createAutoBeApplication.js +80 -90
  7. package/lib/factory/createAutoBeApplication.js.map +1 -1
  8. package/lib/factory/createAutoBeContext.js +5 -5
  9. package/lib/factory/createAutoBeContext.js.map +1 -1
  10. package/lib/index.mjs +941 -1065
  11. package/lib/index.mjs.map +1 -1
  12. package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js +5 -1
  13. package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -1
  14. package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +1 -1
  15. package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +18 -3
  16. package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
  17. package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +5 -1
  18. package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +19 -7
  19. package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
  20. package/lib/orchestrate/analyze/orchestrateAnalyze.js +3 -2
  21. package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
  22. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.d.ts +1 -1
  23. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +2 -2
  24. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
  25. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +1 -0
  26. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +2 -2
  27. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
  28. package/lib/orchestrate/facade/transformFacadeStateMessage.js +1 -1
  29. package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
  30. package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js +2 -1
  31. package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -1
  32. package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +5 -1
  33. package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +20 -7
  34. package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
  35. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.d.ts +6 -1
  36. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +31 -23
  37. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
  38. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +6 -1
  39. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +22 -6
  40. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
  41. package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +1 -1
  42. package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -1
  43. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.d.ts +4 -1
  44. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +26 -5
  45. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
  46. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.d.ts +5 -1
  47. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +21 -5
  48. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
  49. package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +1 -1
  50. package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
  51. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.d.ts +5 -1
  52. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +20 -4
  53. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
  54. package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +1 -1
  55. package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
  56. package/lib/orchestrate/interface/orchestrateInterface.js +25 -7
  57. package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
  58. package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +1 -1
  59. package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js +17 -8
  60. package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
  61. package/lib/orchestrate/interface/orchestrateInterfaceComplement.d.ts +4 -1
  62. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +18 -11
  63. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  64. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +6 -1
  65. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +25 -10
  66. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
  67. package/lib/orchestrate/interface/orchestrateInterfaceGroups.d.ts +4 -1
  68. package/lib/orchestrate/interface/orchestrateInterfaceGroups.js +9 -6
  69. package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
  70. package/lib/orchestrate/interface/orchestrateInterfaceOperations.d.ts +5 -1
  71. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +33 -17
  72. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  73. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.d.ts +5 -1
  74. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js +36 -18
  75. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
  76. package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.d.ts +4 -1
  77. package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +19 -8
  78. package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
  79. package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js +1 -1
  80. package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
  81. package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +6 -1
  82. package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +20 -6
  83. package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
  84. package/lib/orchestrate/prisma/orchestratePrisma.js +3 -3
  85. package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -1
  86. package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -1
  87. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +6 -3
  88. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  89. package/lib/orchestrate/prisma/orchestratePrismaSchemas.d.ts +1 -1
  90. package/lib/orchestrate/prisma/orchestratePrismaSchemas.js +12 -6
  91. package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
  92. package/lib/orchestrate/{common/histories/transformCommonCorrectDateHistories.d.ts → realize/histories/transformRealizeCorrectCastingHistories.d.ts} +1 -2
  93. package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.js +33 -0
  94. package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.js.map +1 -0
  95. package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.js +21 -7
  96. package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.js.map +1 -1
  97. package/lib/orchestrate/realize/orchestrateRealize.js +3 -9
  98. package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
  99. package/lib/orchestrate/realize/orchestrateRealizeCorrect.js +12 -2
  100. package/lib/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
  101. package/lib/orchestrate/realize/utils/generateRealizeScenario.js +1 -5
  102. package/lib/orchestrate/realize/utils/generateRealizeScenario.js.map +1 -1
  103. package/lib/orchestrate/realize/utils/replaceImportStatements.js +3 -1
  104. package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
  105. package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +5 -1
  106. package/lib/orchestrate/test/histories/transformTestCorrectHistories.js +11 -7
  107. package/lib/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
  108. package/lib/orchestrate/test/histories/transformTestScenarioHistories.d.ts +7 -1
  109. package/lib/orchestrate/test/histories/transformTestScenarioHistories.js +39 -31
  110. package/lib/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
  111. package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.d.ts +6 -3
  112. package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js +32 -26
  113. package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js.map +1 -1
  114. package/lib/orchestrate/test/histories/transformTestWriteHistories.d.ts +5 -1
  115. package/lib/orchestrate/test/histories/transformTestWriteHistories.js +111 -94
  116. package/lib/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
  117. package/lib/orchestrate/test/orchestrateTest.js +20 -14
  118. package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
  119. package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +4 -1
  120. package/lib/orchestrate/test/orchestrateTestCorrect.js +51 -35
  121. package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  122. package/lib/orchestrate/test/orchestrateTestScenario.d.ts +1 -1
  123. package/lib/orchestrate/test/orchestrateTestScenario.js +14 -3
  124. package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  125. package/lib/orchestrate/test/orchestrateTestScenarioReview.d.ts +5 -1
  126. package/lib/orchestrate/test/orchestrateTestScenarioReview.js +19 -11
  127. package/lib/orchestrate/test/orchestrateTestScenarioReview.js.map +1 -1
  128. package/lib/orchestrate/test/orchestrateTestWrite.d.ts +4 -1
  129. package/lib/orchestrate/test/orchestrateTestWrite.js +9 -4
  130. package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  131. package/package.json +5 -5
  132. package/src/constants/AutoBeSystemPromptConstant.ts +16 -16
  133. package/src/context/IAutoBeApplication.ts +101 -6
  134. package/src/context/IAutoBeApplicationProps.ts +6 -2
  135. package/src/factory/createAgenticaHistory.ts +11 -5
  136. package/src/factory/createAutoBeContext.ts +5 -5
  137. package/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.ts +5 -1
  138. package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +16 -0
  139. package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +22 -7
  140. package/src/orchestrate/analyze/orchestrateAnalyze.ts +3 -2
  141. package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +2 -1
  142. package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +3 -2
  143. package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +2 -1
  144. package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +23 -9
  145. package/src/orchestrate/interface/histories/transformInterfaceComplementHistories.ts +33 -24
  146. package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +26 -9
  147. package/src/orchestrate/interface/histories/transformInterfaceGroupHistories.ts +27 -5
  148. package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +24 -7
  149. package/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts +23 -6
  150. package/src/orchestrate/interface/orchestrateInterface.ts +29 -10
  151. package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +22 -12
  152. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +25 -17
  153. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +35 -23
  154. package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +9 -3
  155. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +44 -29
  156. package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +51 -32
  157. package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +20 -6
  158. package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +24 -9
  159. package/src/orchestrate/prisma/orchestratePrisma.ts +7 -3
  160. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +5 -1
  161. package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +15 -10
  162. package/src/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.ts +45 -0
  163. package/src/orchestrate/realize/orchestRateRealizeCorrectCasting.ts +26 -7
  164. package/src/orchestrate/realize/orchestrateRealize.ts +6 -17
  165. package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +18 -2
  166. package/src/orchestrate/realize/utils/generateRealizeScenario.ts +1 -5
  167. package/src/orchestrate/realize/utils/replaceImportStatements.ts +5 -0
  168. package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +14 -7
  169. package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +44 -36
  170. package/src/orchestrate/test/histories/transformTestScenarioReviewHistories.ts +74 -71
  171. package/src/orchestrate/test/histories/transformTestWriteHistories.ts +35 -12
  172. package/src/orchestrate/test/orchestrateTest.ts +19 -13
  173. package/src/orchestrate/test/orchestrateTestCorrect.ts +65 -46
  174. package/src/orchestrate/test/orchestrateTestScenario.ts +15 -11
  175. package/src/orchestrate/test/orchestrateTestScenarioReview.ts +29 -16
  176. package/src/orchestrate/test/orchestrateTestWrite.ts +13 -4
  177. package/lib/orchestrate/common/histories/transformCommonCorrectDateHistories.js +0 -48
  178. package/lib/orchestrate/common/histories/transformCommonCorrectDateHistories.js.map +0 -1
  179. package/lib/orchestrate/common/structures/IAutoBeCommonCorrectDateApplication.d.ts +0 -35
  180. package/lib/orchestrate/common/structures/IAutoBeCommonCorrectDateApplication.js +0 -3
  181. package/lib/orchestrate/common/structures/IAutoBeCommonCorrectDateApplication.js.map +0 -1
  182. package/lib/orchestrate/realize/orchestrateRealizeCorrectDate.d.ts +0 -4
  183. package/lib/orchestrate/realize/orchestrateRealizeCorrectDate.js +0 -540
  184. package/lib/orchestrate/realize/orchestrateRealizeCorrectDate.js.map +0 -1
  185. package/src/orchestrate/common/histories/transformCommonCorrectDateHistories.ts +0 -60
  186. package/src/orchestrate/common/structures/IAutoBeCommonCorrectDateApplication.ts +0 -40
  187. package/src/orchestrate/realize/orchestrateRealizeCorrectDate.ts +0 -372
@@ -1 +1 @@
1
- {"version":3,"file":"transformAnalyzeWriteHistories.js","sourceRoot":"","sources":["../../../../src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts"],"names":[],"mappings":";;;AAGA,yCAA2C;AAE3C,+BAA0B;AAKnB,MAAM,8BAA8B,GAAG,CAC5C,GAAyB,EACzB,QAAoC,EACpC,IAAgC,EAKhC,EAAE;;IAAC,OAAA;QACH,GAAG,GAAG;aACH,SAAS,EAAE;aACX,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,aAAa,IAAI,CAAC,CAAC,IAAI,KAAK,kBAAkB,CAAC;aACxE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YACT,MAAM,IAAI,GACR,CAAC,CAAC,IAAI,KAAK,aAAa;gBACtB,CAAC,CAAC,CAAC,CAAC,QAAQ;qBACP,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,KAAK,MAAM,CAAC;qBAClC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;qBACpB,IAAI,CAAC,IAAI,CAAC;gBACf,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;YACb,uCACK,CAAC,KACJ,IAAI,IACJ;QACJ,CAAC,CAAC;QACJ;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,eAAe;YACrB,IAAI,imtCAA0C;SAC/C;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;;;wCAGe,IAAI,CAAC,SAAS,CAAC,MAAA,QAAQ,CAAC,QAAQ,mCAAI,OAAO,CAAC;;;;gDAIpC,QAAQ,CAAC,MAAM;;;;QAIvD,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC;;;;;;;;;QAS9B,IAAI,CAAC,SAAS,CACd,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ,CAAC,CAC3D;;;;;QAKC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;;KAEvB;SACF;KACF,CAAA;CAAA,CAAC;AAlEW,QAAA,8BAA8B,kCAkEzC"}
1
+ {"version":3,"file":"transformAnalyzeWriteHistories.js","sourceRoot":"","sources":["../../../../src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts"],"names":[],"mappings":";;;AAGA,yCAA2C;AAE3C,+BAA0B;AAKnB,MAAM,8BAA8B,GAAG,CAC5C,GAAyB,EACzB,KAIC,EAKD,EAAE;;IAAC,OAAA;QACH,GAAG,GAAG;aACH,SAAS,EAAE;aACX,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,aAAa,IAAI,CAAC,CAAC,IAAI,KAAK,kBAAkB,CAAC;aACxE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YACT,MAAM,IAAI,GACR,CAAC,CAAC,IAAI,KAAK,aAAa;gBACtB,CAAC,CAAC,CA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rateAnalyze = (ctx) => (props) => __awaiter(void 0, void 0, void 0,
23
23
  ctx.dispatch({
24
24
  type: "analyzeStart",
25
25
  id: (0, uuid_1.v7)(),
26
- reason: props.reason,
26
+ reason: props.instruction,
27
27
  step,
28
28
  created_at: startTime.toISOString(),
29
29
  });
30
30
  // Generate analysis scenario
31
- const scenario = yield (0, orchestrateAnalyzeScenario_1.orchestrateAnalyzeScenario)(ctx);
31
+ const scenario = yield (0, orchestrateAnalyzeScenario_1.orchestrateAnalyzeScenario)(ctx, props.instruction);
32
32
  if (scenario.type === "assistantMessage")
33
33
  return ctx.assistantMessage(scenario);
34
34
  else
@@ -44,6 +44,7 @@ const orchestrateAnalyze = (ctx) => (props) => __awaiter(void 0, void 0, void 0,
44
44
  file,
45
45
  progress: writeProgress,
46
46
  promptCacheKey,
47
+ instruction: props.instruction,
47
48
  });
48
49
  return event.file;
49
50
  })));
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrateAnalyze.js","sourceRoot":"","sources":["../../../src/orchestrate/analyze/orchestrateAnalyze.ts"],"names":[],"mappings":";;;;;;;;;;;;AAUA,+BAA0B;AAI1B,uEAAoE;AACpE,yEAAsE;AACtE,6EAA0E;AAC1E,uEAAoE;AAE7D,MAAM,kBAAkB,GAC7B,CAAiC,GAAyB,EAAE,EAAE,CAC9D,CACE,KAA8B,EACiC,EAAE;;IACjE,4BAA4B;IAC5B,MAAM,IAAI,GAAW,CAAC,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,0CAAE,IAAI,mCAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAC3D,MAAM,SAAS,GAAS,IAAI,IAAI,EAAE,CAAC;IAEnC,GAAG,CAAC,QAAQ,CAAC;QACX,IAAI,EAAE,cAAc;QACpB,EAAE,EAAE,IAAA,SAAE,GAAE;QACR,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI;QACJ,UAAU,EAAE,SAAS,CAAC,WAAW,EAAE;KACpC,CAA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,CAAC,CAAC;YACL,uCACK,KAAK,CAAC,IAAI,KACb,OAAO,EAAE,KAAK,CAAC,OAAO,IACtB;QACJ,CAAC;QAAC,WAAM,CAAC;YACP,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC,CAAA,CAAC,CACH,CAAC;IAEF,wBAAwB;IACxB,OAAO,GAAG,CAAC,QAAQ,CAAC;QAClB,IAAI,EAAE,iBAAiB;QACvB,EAAE,EAAE,IAAA,SAAE,GAAE;QACR,KAAK,EAAE,QAAQ,CAAC,KAAK;QACrB,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,KAAK,EAAE,QAAQ;QACf,IAAI;QACJ,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,SAAS,CAAC,OAAO,EAAE;QACnD,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACrC,CAAgC,CAAC;AACpC,CAAC,CAAA,CAAC;AAlFS,QAAA,kBAAkB,sBAkF3B"}
@@ -1,4 +1,4 @@
1
1
  import { AutoBeAnalyzeScenarioEvent, AutoBeAssistantMessageHistory } from "@autobe/interface";
2
2
  import { ILlmSchema } from "@samchon/openapi";
3
3
  import { AutoBeContext } from "../../context/AutoBeContext";
4
- export declare const orchestrateAnalyzeScenario: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>) => Promise<AutoBeAnalyzeScenarioEvent | AutoBeAssistantMessageHistory>;
4
+ export declare const orchestrateAnalyzeScenario: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, instruction: string) => Promise<AutoBeAnalyzeScenarioEvent | AutoBeAssistantMessageHistory>;
@@ -52,7 +52,7 @@ const typia_1 = __importDefault(require("typia"));
52
52
  const uuid_1 = require("uuid");
53
53
  const assertSchemaModel_1 = require("../../context/assertSchemaModel");
54
54
  const transformAnalyzeScenarioHistories_1 = require("./histories/transformAnalyzeScenarioHistories");
55
- const orchestrateAnalyzeScenario = (ctx) => __awaiter(void 0, void 0, void 0, function* () {
55
+ const orchestrateAnalyzeScenario = (ctx, instruction) => __awaiter(void 0, void 0, void 0, function* () {
56
56
  var _a, _b, _c;
57
57
  const start = new Date();
58
58
  const pointer = {
@@ -64,7 +64,7 @@ const orchestrateAnalyzeScenario = (ctx) => __awaiter(void 0, void 0, void 0, fu
64
64
  model: ctx.model,
65
65
  build: (value) => (pointer.value = value),
66
66
  }),
67
- histories: (0, transformAnalyzeScenarioHistories_1.transformAnalyzeSceHistories)(ctx),
67
+ histories: (0, transformAnalyzeScenarioHistories_1.transformAnalyzeSceHistories)(ctx, instruction),
68
68
  enforceFunctionCall: false,
69
69
  message: utils_1.StringUtil.trim `
70
70
  Design a complete list of documents and user roles for this project.
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrateAnalyzeScenario.js","sourceRoot":"","sources":["../../../src/orchestrate/analyze/orchestrateAnalyzeScenario.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,yCAA2C;AAG3C,kDAA0B;AAC1B,+BAA0B;AAG1B,uEAAoE;AACpE,qGAA6F;AAGtF,MAAM,0BAA0B,GAAG,CAGxC,GAAyB,EAC4C,EAAE;;IACvE,MAAM,KAAK,GAAS,IAAI,IAAI,EAAE,CAAC;IAC/B,MAAM,OAAO,GAA8D;QACzE,KAAK,EAAE,IAAI;KACZ,CAAC;IACF,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC;QACrD,MAAM,EAAE,iBAAiB;QACzB,UAAU,EAAE,gBAAgB,CAAQ;YAClC,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;SAC1C,CAAC;QACF,SAAS,EAAE,IAAA,gEAA4B,EAAC,GAAG,CAAC;QAC5C,mBAAmB,EAAE,KAAK;QAC1B,OAAO,EAAE,kB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;;;;;;;;;;;;;;;;;;CAGT,CAAC;AACJ,MAAM,UAAU,GAAG;IACjB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAGJ;IACH,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;CACd,CAAC"}
@@ -5,6 +5,7 @@ import { AutoBeContext } from "../../context/AutoBeContext";
5
5
  export declare const orchestrateAnalyzeWrite: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
6
6
  scenario: AutoBeAnalyzeScenarioEvent;
7
7
  file: AutoBeAnalyzeFile.Scenario;
8
+ instruction: string;
8
9
  progress: AutoBeProgressEventBase;
9
10
  promptCacheKey: string;
10
11
  }) => Promise<AutoBeAnalyzeWriteEvent>;
@@ -53,7 +53,7 @@ const assertSchemaModel_1 = require("../../context/assertSchemaModel");
53
53
  const transformAnalyzeWriteHistories_1 = require("./histories/transformAnalyzeWriteHistories");
54
54
  const orchestrateAnalyzeWrite = (ctx, props) => __awaiter(void 0, void 0, void 0, function* () {
55
55
  var _a, _b;
56
- const { scenario, file, progress, promptCacheKey } = props;
56
+ const { file, progress, promptCacheKey } = props;
57
57
  const pointer = {
58
58
  value: null,
59
59
  };
@@ -63,7 +63,7 @@ const orchestrateAnalyzeWrite = (ctx, props) => __awaiter(void 0, void 0, void 0
63
63
  model: ctx.model,
64
64
  pointer,
65
65
  }),
66
- histories: (0, transformAnalyzeWriteHistories_1.transformAnalyzeWriteHistories)(ctx, scenario, file),
66
+ histories: (0, transformAnalyzeWriteHistories_1.transformAnalyzeWriteHistories)(ctx, props),
67
67
  enforceFunctionCall: true,
68
68
  promptCacheKey,
69
69
  message: "Write requirement analysis report.",
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrateAnalyzeWrite.js","sourceRoot":"","sources":["../../../src/orchestrate/analyze/orchestrateAnalyzeWrite.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,kDAA0B;AAC1B,+BAA0B;AAG1B,uEAAoE;AACpE,+FAA4F;AAGrF,MAAM,uBAAuB,GAAG,CACrC,GAAyB,EACzB,KAKC,EACiC,EAAE;;IACpC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAC3D,MAAM,OAAO,GAA2D;QACtE,KAAK,EAAE,IAAI;KACZ,CAAC;IACF,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC;QAC1C,MAAM,EAAE,cAAc;QACtB,UAAU,EAAE,gBAAgB,CAAQ;YAClC,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,OAAO;SACR,CAAC;QACF,SAAS,EAAE,IAAA,+DAA8B,EAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC;QAC9D,mBAAmB,EAAE,IAAI;QACzB,cAAc;QACd,OAAO,EAAE,oCAAoC;KAC9C,CAAC,CAAC;IACH,IAAI,OAAO,CAAC,KAAK,KAAK,IAAI;QACxB,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;IAEtE,MAAM,KAAK,GAA4B;QACrC,IAAI,EAAE,cAAc;QACpB,EAAE,EAAE,IAAA,SAAE,GAAE;QACR,IAAI,kCACC,IAAI,KACP,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO,GAC/B;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C,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpB,OAAO,KAAK,CAAC;AACf,CAAC,CAAA,CAAC;AA3CW,QAAA,uBAAuB,2BA2ClC;AAEF,SAAS,gBAAgB,CAAiC,KAGzD;IACC,IAAA,qCAAiB,EAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/B,MAAM,WAAW,GAA2B,UAAU,CACpD,KAAK,CAAC,KAAK,CACwD,CAAC;IACtE,OAAO;QACL,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,UAAU;QAChB,WAAW;QACX,OAAO,EAAE;YACP,KAAK,EAAE,CAAO,KAAK,EAAE,EAAE;gBACrB,KAAK,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;YAC9B,CAAC,CAAA;SACuC;KAC3C,CAAC;AACJ,CAAC;AAED,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGT,CAAC;AACJ,MAAM,UAAU,GAAG;IACjB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAoE;IAC3E,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;CACd,CAAC"}
@@ -4,7 +4,7 @@ exports.transformFacadeStateMessage = transformFacadeStateMessage;
4
4
  const utils_1 = require("@autobe/utils");
5
5
  function transformFacadeStateMessage(state) {
6
6
  const currentState = getCurrentState(state);
7
- return "<!--\nfilename: FACADE.md\n-->\n# AutoBE Main Agent System Prompt\n\nYou are the AutoBE Main Agent, an orchestrator for backend server development automation. Your role is to manage the conversation with users about their backend requirements and coordinate the execution of five specialized functional agents through function calling.\n\n## Core Responsibilities\n\n1. **Requirements Gathering**: Engage in detailed conversations with users to understand their backend server needs, asking clarifying questions about business logic, data models, API endpoints, and technical requirements.\n\n2. **Agent Orchestration**: Execute the appropriate functional agents in the correct sequence based on the development stage and user needs.\n\n3. **Progress Communication**: Keep users informed about the current development stage, what has been completed, and what steps remain.\n\n## Functional Agents Overview\n\nYou have access to five functional agents that must be executed in a specific order:\n\n1. **Analyze Agent** - Converts conversations into structured requirements specifications\n2. **Prisma Agent** - Generates database schemas and ERD documentation\n3. **Interface Agent** - Creates API interfaces with OpenAPI schemas and TypeScript code\n4. **Test Agent** - Generates comprehensive E2E test suites\n5. **Realize Agent** - Implements actual business logic for service providers\n\n## Execution Rules\n\n### 1. Sequential Dependencies\n\n- **analyze()**: Can only be called when sufficient requirements have been gathered.\n- **prisma()**: Requires successful completion of analyze()\n- **interface()**: Requires successful completion of prisma()\n- **test()**: Requires successful completion of interface()\n- **realize()**: Requires successful completion of interface()\n\n### 2. Requirements Gathering and analyze() Calling Criteria\n\n- Since users are not developers, it is okay if they do not understand technical terms like \u201Cendpoints\u201D or \u201Cdata models.\u201D \n\n- Your job is to help users clearly express their intended **features** by asking many questions. \n\n- Use examples and simple questions to guide them if they have trouble explaining. \n\n- Break down features into smaller steps if needed to complete the planning gradually. \n\n- For instance, ask questions like \u201CWhat tasks do you want to automate?\u201D, \u201CWhat roles do users have?\u201D, \u201CWhat screens or actions are involved?\u201D \n\n- Even if the system requires many or complex APIs, it is not necessary to know all of them upfront. Focus on gathering core requirements step by step. \n\n#### Conditions for Calling analyze() \n- Call analyze() only when the user has clearly stated sufficient **features** and **requirements**, or \n- The user explicitly delegates the planning to you by saying things like \u201CI\u2019ll leave the planning to you\u201D or \u201CPlease proceed as you see fit.\u201D \n\n#### Pre-call Checks \n- If requirements are insufficient for some features, do **not** call analyze() and keep asking questions until the specifications are complete. \n- Continue asking actively and explain any technical terms in an easy-to-understand way.\n\n### 3. Requirements Gathering Phase\n\nBefore calling analyze(), ensure you have discussed:\n\n- System purpose and overall goals\n- Core features and functionalities\n- User roles and permissions\n- Main data entities and their relationships\n- Key business rules and constraints\n- API endpoints needed\n- Any specific technical requirements\n\nIf these aspects are unclear, continue the conversation to gather more details.\n\n### 4. Development Workflow\n\n1. Start by understanding the user's needs through conversation\n2. When requirements are sufficiently detailed, execute analyze()\n3. Review the analysis results with the user\n4. If approved, proceed with prisma() \u2192 interface() \u2192 test() \u2192 realize()\n5. At each stage, present results and get user confirmation before proceeding\n\n### 5. Handling Changes\n\n- If users request changes after agents have been executed, first understand the scope\n- For minor adjustments, you may re-run specific agents\n- For major changes, consider re-running analyze() to update the specification\n- Always explain the impact of changes on already generated code\n\n## Communication Guidelines\n\n1. **Be Transparent**: Clearly explain which agent is being executed and why\n2. **Show Progress**: Indicate completed steps and remaining work\n3. **Confirm Understanding**: Summarize requirements before executing agents\n4. **Request Approval**: Get user confirmation before moving to the next stage\n5. **Explain Results**: Briefly describe what each agent has generated\n\n## Current State\n\n{% STATE %}" /* AutoBeSystemPromptConstant.FACADE */.replace("{% STATE %}", utils_1.StringUtil.trim `
7
+ return "<!--\nfilename: FACADE.md\n-->\n# AutoBE Main Agent System Prompt\n\nYou are the AutoBE Main Agent, an orchestrator for backend server development automation. Your role is to manage the conversation with users about their backend requirements and coordinate the execution of five specialized functional agents through function calling.\n\n## Core Responsibilities\n\n1. **Requirements Gathering**: Engage in detailed conversations with users to understand their backend server needs, asking clarifying questions about business logic, data models, API endpoints, and technical requirements.\n\n2. **Agent Orchestration**: Execute the appropriate functional agents in the correct sequence based on the development stage and user needs.\n\n3. **Progress Communication**: Keep users informed about the current development stage, what has been completed, and what steps remain.\n\n## Functional Agents Overview\n\nYou have access to five functional agents that must be executed in a specific order:\n\n1. **Analyze Agent** - Converts conversations into structured requirements specifications\n2. **Prisma Agent** - Generates database schemas and ERD documentation\n3. **Interface Agent** - Creates API interfaces with OpenAPI schemas and TypeScript code\n4. **Test Agent** - Generates comprehensive E2E test suites\n5. **Realize Agent** - Implements actual business logic for service providers\n\n## Execution Rules\n\n### 1. Sequential Dependencies\n\n- **analyze()**: Can only be called when sufficient requirements have been gathered.\n- **prisma()**: Requires successful completion of analyze()\n- **interface()**: Requires successful completion of prisma()\n- **test()**: Requires successful completion of interface()\n- **realize()**: Requires successful completion of interface()\n\n### 2. Requirements Gathering and analyze() Calling Criteria\n\n- Since users are not developers, it is okay if they do not understand technical terms like \u201Cendpoints\u201D or \u201Cdata models.\u201D \n\n- Your job is to help users clearly express their intended **features** by asking many questions. \n\n- Use examples and simple questions to guide them if they have trouble explaining. \n\n- Break down features into smaller steps if needed to complete the planning gradually. \n\n- For instance, ask questions like \u201CWhat tasks do you want to automate?\u201D, \u201CWhat roles do users have?\u201D, \u201CWhat screens or actions are involved?\u201D \n\n- Even if the system requires many or complex APIs, it is not necessary to know all of them upfront. Focus on gathering core requirements step by step. \n\n#### Conditions for Calling analyze() \n- Call analyze() only when the user has clearly stated sufficient **features** and **requirements**, or \n- The user explicitly delegates the planning to you by saying things like \u201CI\u2019ll leave the planning to you\u201D or \u201CPlease proceed as you see fit.\u201D \n\n#### Pre-call Checks \n- If requirements are insufficient for some features, do **not** call analyze() and keep asking questions until the specifications are complete. \n- Continue asking actively and explain any technical terms in an easy-to-understand way.\n\n### 3. Requirements Gathering Phase\n\nBefore calling analyze(), ensure you have discussed:\n\n- System purpose and overall goals\n- Core features and functionalities\n- User roles and permissions\n- Main data entities and their relationships\n- Key business rules and constraints\n- API endpoints needed\n- Any specific technical requirements\n\nIf these aspects are unclear, continue the conversation to gather more details.\n\n### 4. Development Workflow\n\n1. Start by understanding the user's needs through conversation\n2. When requirements are sufficiently detailed, execute analyze()\n3. Review the analysis results with the user\n4. If approved, proceed with prisma() \u2192 interface() \u2192 test() \u2192 realize()\n5. At each stage, present results and get user confirmation before proceeding\n\n### 5. Handling Changes\n\n- If users request changes after agents have been executed, first understand the scope\n- For minor adjustments, you may re-run specific agents\n- For major changes, consider re-running analyze() to update the specification\n- Always explain the impact of changes on already generated code\n\n## Agent Instruction Guidelines\n\nWhen calling each functional agent, you must provide specific instructions that:\n\n1. **Redefine and Clarify**: Transform the user's utterances into clear, actionable instructions for each agent phase\n2. **Provide Context**: Include relevant context from the conversation that helps the agent understand the business intent\n3. **Set Priorities**: Specify which aspects are most important based on user emphasis\n4. **Define Constraints**: Include any specific limitations or requirements mentioned by the user\n\n### IMPORTANT: Phase-Specific Instructions Only\n\n**You MUST extract ONLY the instructions relevant to each specific phase:**\n\n- **analyze()**: ONLY requirements-related instructions (features, business rules, user stories, functional specifications)\n- **prisma()**: ONLY database design instructions (schema structure, relationships, constraints, indexing strategies)\n- **interface()**: ONLY API and DTO schema instructions (endpoint patterns, request/response formats, operation specifications)\n- **test()**: ONLY testing strategy instructions (test scenarios, coverage priorities, edge cases to validate)\n- **realize()**: ONLY implementation instructions (business logic patterns, performance requirements, architectural decisions)\n\n**DO NOT include instructions meant for other phases. Each agent should receive ONLY its domain-specific guidance.**\n\n### CRITICAL: Never Fabricate User Requirements\n\n**ABSOLUTELY FORBIDDEN:**\n- **NEVER invent or create requirements the user didn't explicitly mention**\n- **NEVER expand simple requests into detailed specifications without user input**\n- **NEVER add features, functionalities, or details the user hasn't discussed**\n- **ONLY include instructions based on what the user ACTUALLY said**\n\nIf the user says \"Design an API\", do NOT create detailed specifications about platforms, features, or functionalities they never mentioned. Stick strictly to their actual words and requirements.\n\n### Instruction Examples\n\n- **For analyze()**: \"Focus on e-commerce features with emphasis on inventory management and order processing. User wants simple checkout flow.\"\n- **For prisma()**: \"Design schema prioritizing product catalog flexibility. User mentioned frequent category changes.\"\n- **For interface()**: \"Create RESTful APIs following shopping cart patterns. Emphasize mobile-friendly endpoints.\"\n- **For test()**: \"Generate comprehensive tests for payment scenarios. User concerned about transaction reliability.\"\n- **For realize()**: \"Implement with performance optimization for high-traffic scenarios. User expects 10K concurrent users.\"\n\n## Communication Guidelines\n\n1. **Be Transparent**: Clearly explain which agent is being executed and why\n2. **Show Progress**: Indicate completed steps and remaining work\n3. **Confirm Understanding**: Summarize requirements before executing agents\n4. **Request Approval**: Get user confirmation before moving to the next stage\n5. **Explain Results**: Briefly describe what each agent has generated\n6. **Clarify Instructions**: When calling agents, explain how you've interpreted user needs into specific instructions\n\n## Current State\n\n{% STATE %}" /* AutoBeSystemPromptConstant.FACADE */.replace("{% STATE %}", utils_1.StringUtil.trim `
8
8
  ## Current State
9
9
 
10
10
  The current execution status of each functional agent is shown below.
@@ -1 +1 @@
1
- {"version":3,"file":"transformFacadeStateMessage.js","sourceRoot":"","sources":["../../../src/orchestrate/facade/transformFacadeStateMessage.ts"],"names":[],"mappings":";;AAKA,kEA0BC;AA/BD,yCAA2C;AAK3C,SAAgB,2BAA2B,CAAC,KAAkB;IAC5D,MAAM,YAAY,GAAkB,eAAe,CAAC,KAAK,CAAC,CAAC;IAC3D,OAAO,0sJAAkC,OAAO,CAC9C,aAAa,EACb,kBAAU,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;mBAeA,YAAY,CAAC,OAAO;kBACrB,YAAY,CAAC,MAAM;qBAChB,YAAY,CAAC,SAAS;gBAC3B,YAAY,CAAC,IAAI;mBACd,YAAY,CAAC,OAAO;KAClC,CACF,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,KAAkB;IACzC,MAAM,KAAK,GAAG,CACZ,GAEQ,EACR,EAAE;QACF,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI,IAAI,GAAG,KAAK,IAAI;YAAE,OAAO,MAAM,CAAC;aACrD,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI;YAAE,OAAO,YAAY,CAAC;;YACzD,OAAO,aAAa,CAAC;IAC5B,CAAC,CAAC;IACF,OAAO;QACL,OAAO,EAAE,KAAK,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY;QACvD,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;QAC3B,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC;QACjC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC;QACvB,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC;KAC9B,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"transformFacadeStateMessage.js","sourceRoot":"","sources":["../../../src/orchestrate/facade/transformFacadeStateMessage.ts"],"names":[],"mappings":";;AAKA,kEA0BC;AA/BD,yCAA2C;AAK3C,SAAgB,2BAA2B,CAAC,KAAkB;IAC5D,MAAM,YAAY,GAAkB,eAAe,CAAC,KAAK,CAAC,CAAC;IAC3D,OAAO,y7OAAkC,OAAO,CAC9C,aAAa,EACb,kBAAU,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;mBAeA,YAAY,CAAC,OAAO;kBACrB,YAAY,CAAC,MAAM;qBAChB,YAAY,CAAC,SAAS;gBAC3B,YAAY,CAAC,IAAI;mBACd,YAAY,CAAC,OAAO;KAClC,CACF,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,KAAkB;IACzC,MAAM,KAAK,GAAG,CACZ,GAEQ,EACR,EAAE;QACF,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI,IAAI,GAAG,KAAK,IAAI;YAAE,OAAO,MAAM,CAAC;aACrD,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI;YAAE,OAAO,YAAY,CAAC;;YACzD,OAAO,aAAa,CAAC;IAC5B,CAAC,CAAC;IACF,OAAO;QACL,OAAO,EAAE,KAAK,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY;QACvD,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;QAC3B,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC;QACjC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC;QACvB,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC;KAC9B,CAAC;AACJ,CAAC"}
@@ -19,7 +19,7 @@ const transformInterfaceAssetHistories = (state) => {
19
19
 
20
20
  ## User Request
21
21
 
22
- ${analyze.reason}
22
+ ${analyze.instruction}
23
23
 
24
24
  ## Requirement Analysis Report
25
25
 
@@ -54,6 +54,7 @@ const transformInterfaceAssetHistories = (state) => {
54
54
  \`\`\`
55
55
 
56
56
  ## Entity Relationship Diagrams
57
+
57
58
  \`\`\`json
58
59
  ${JSON.stringify(prisma.compiled.diagrams)}
59
60
  \`\`\`
@@ -1 +1 @@
1
- {"version":3,"file":"transformInterfaceAssetHistories.js","sourceRoot":"","sources":["../../../../src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts"],"names":[],"mappings":";;;AAMA,yCAA2C;AAC3C,+BAA0B;AAInB,MAAM,gCAAgC,GAAG,CAC9C,KAAkB,EAGlB,EAAE;IACF,MAAM,OAAO,GAAyB,KAAK,CAAC,OAAQ,CAAC;IACrD,MAAM,MAAM,GAAwB,KAAK,CAAC,MAAO,CAAC;IAClD,OAAO;QACL;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;;;;;;;;UAQjB,OAAO,CAAC,MAAM;;;;;UAKd,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;;OAEhC;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;;;;;;;;;;;;;;;;;;UAkBjB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;;;;;UAK9B,IAAI,CAAC,SAAS,CACb,MAAM,CAAC,QAAgD,CAAC,QAAQ,CAClE;;OAEF;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AA/DW,QAAA,gCAAgC,oCA+D3C"}
1
+ {"version":3,"file":"transformInterfaceAssetHistories.js","sourceRoot":"","sources":["../../../../src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts"],"names":[],"mappings":";;;AAMA,yCAA2C;AAC3C,+BAA0B;AAInB,MAAM,gCAAgC,GAAG,CAC9C,KAAkB,EAGlB,EAAE;IACF,MAAM,OAAO,GAAyB,KAAK,CAAC,OAAQ,CAAC;IACrD,MAAM,MAAM,GAAwB,KAAK,CAAC,MAAO,CAAC;IAClD,OAAO;QACL;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;;;;;;;;UAQjB,OAAO,CAAC,WAAW;;;;;UAKnB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;;OAEhC;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;;;;;;;;;;;;;;;;;;UAkBjB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;;;;;;UAM9B,IAAI,CAAC,SAAS,CACb,MAAM,CAAC,QAAgD,CAAC,QAAQ,CAClE;;OAEF;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAhEW,QAAA,gCAAgC,oCAgE3C"}
@@ -1,4 +1,8 @@
1
1
  import { IAgenticaHistoryJson } from "@agentica/core";
2
2
  import { AutoBeAnalyzeRole } from "@autobe/interface";
3
3
  import { AutoBeState } from "../../../context/AutoBeState";
4
- export declare const transformInterfaceAuthorizationsHistories: (state: AutoBeState, role: AutoBeAnalyzeRole) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
4
+ export declare const transformInterfaceAuthorizationsHistories: (props: {
5
+ state: AutoBeState;
6
+ role: AutoBeAnalyzeRole;
7
+ instruction: string;
8
+ }) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
@@ -4,16 +4,16 @@ exports.transformInterfaceAuthorizationsHistories = void 0;
4
4
  const utils_1 = require("@autobe/utils");
5
5
  const uuid_1 = require("uuid");
6
6
  const transformInterfaceAssetHistories_1 = require("./transformInterfaceAssetHistories");
7
- const transformInterfaceAuthorizationsHistories = (state, role) => {
8
- const analyze = state.analyze;
7
+ const transformInterfaceAuthorizationsHistories = (props) => {
8
+ const analyze = props.state.analyze;
9
9
  return [
10
10
  {
11
11
  type: "systemMessage",
12
12
  id: (0, uuid_1.v7)(),
13
13
  created_at: new Date().toISOString(),
14
- text: "<!--\nfilename: INTERFACE_AUTHORIZATION.md\n-->\n# Authorization API Operation Generator System Prompt\n\n## 1. Overview and Mission\n\nYou are the Authorization API Operation Generator, specializing in creating JWT-based **authentication and authorization ONLY** API operations for specific user roles. Your mission is to generate role-appropriate authentication operations plus additional operations that are clearly supported by the Prisma schema structure.\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 operations 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\n### Authentication Scope Definition\n\n**INCLUDE (Authentication/Authorization Operations):**\n- Role-appropriate authentication flows (registration, login, refresh)\n- JWT token management\n- Password management operations (reset, change, etc.)\n- Account verification and security operations\n- Schema-supported additional authentication operations\n\n**EXCLUDE (User Management Operations):**\n- General profile retrieval and viewing\n- Profile information updates (except security-related)\n- User preference management\n- Non-security related account settings\n\n## 2. Operation Generation Rules\n\n### 2.1. Role-Based Essential Operations\n\nThe essential operations you generate MUST be based on the role's `kind` property:\n\n**Generation Logic:**\n```\nIF role.kind === \"guest\":\n Generate: join, refresh (NO login - guests don't authenticate)\nELSE IF role.kind === \"member\" OR role.kind === \"admin\":\n Generate: join, login, refresh\n```\n\n**Guest Users (`kind: \"guest\"`)** - Non-authenticated, temporary access:\n- **Registration (Join)**: `/auth/{roleName}/join` \u2192 `\"join\"` \u2192 Create temporary guest account and issue temporary tokens (Public)\n- **Token Refresh**: `/auth/{roleName}/refresh` \u2192 `\"refresh\"` \u2192 Refresh temporary access tokens (Valid refresh token)\n\n**Member Users (`kind: \"member\"`)** - Regular authenticated users:\n- **Registration (Join)**: `/auth/{roleName}/join` \u2192 `\"join\"` \u2192 Create new user account and issue initial JWT tokens (Public)\n- **Login**: `/auth/{roleName}/login` \u2192 `\"login\"` \u2192 Authenticate user and issue access tokens (Public) \n- **Token Refresh**: `/auth/{roleName}/refresh` \u2192 `\"refresh\"` \u2192 Refresh access tokens using a valid refresh token (Valid refresh token)\n\n**Admin Users (`kind: \"admin\"`)** - System administrators (same as members):\n- **Registration (Join)**: `/auth/{roleName}/join` \u2192 `\"join\"` \u2192 Create new admin account and issue initial JWT tokens (Public)\n- **Login**: `/auth/{roleName}/login` \u2192 `\"login\"` \u2192 Authenticate admin and issue access tokens (Public)\n- **Token Refresh**: `/auth/{roleName}/refresh` \u2192 `\"refresh\"` \u2192 Refresh access tokens using a valid refresh token (Valid refresh token)\n\n### 2.2. Schema-Driven Additional Operations\n\n**Analyze the Prisma schema for the role's table and generate additional operations ONLY for features that are clearly supported by the schema fields.**\n\n**Generation Rule**: Only create operations for authentication features that have corresponding fields in the Prisma schema.\n\n**Conservative Approach**:\n- **If field exists in schema**: Generate corresponding operation\n- **If field missing**: Skip the operation entirely\n- **If unsure about field purpose**: Skip rather than assume\n\n**Schema Analysis Process**:\n1. **Identify Role Table**: Find the table corresponding to the role name\n2. **Check Role Kind**: Determine which essential operations to generate based on `kind`\n3. **Verify Essential Fields**: Confirm basic authentication fields exist for required operations\n4. **Scan for Additional Features**: Look for fields that indicate additional authentication capabilities\n5. **Generate Operations**: Create operations for confirmed capabilities only\n\n## 3. Naming and Response Rules\n\n### 3.1. Naming Conventions\n\n**Endpoint Path Conventions:**\n- Use RESTful resource-based paths with camelCase for role names and resource segments\n- Pattern: `/auth/{roleName}/{action}` or `/auth/{roleName}/{resource}/{action}`\n- Examples: `/auth/user/join`, `/auth/admin/login`, `/auth/user/password/reset`, `/auth/user/email/verify`\n\n**Function Name Conventions:**\n- Use camelCase starting with action verbs that clearly describe the operation\n- Make function names self-explanatory and business-oriented\n- Core operations: `join` (registration), `login` (authentication), `refresh` (token renewal)\n- Additional operations: `resetPassword`, `changePassword`, `verifyEmail`, `enableTwoFactor`\n\n**Path vs Function Name Relationship:**\n- **Path**: Describes the HTTP resource and REST endpoint (resource-oriented)\n- **Function Name**: Describes the business operation/action (action-oriented)\n- They should be related but NOT identical\n\n### 3.2. Response Body Type Naming\n\n**Authentication Operations** (where `authorizationType` is NOT null):\nFor operations with function names `login`, `join` and `refresh`, the response body `typeName` MUST follow this pattern:\n\n**Pattern**: `I{PascalPrefixName}{RoleName}.IAuthorized`\n\nWhere:\n- `{PascalPrefixName}` is the service prefix converted to PascalCase (provided in the prompt)\n- `{RoleName}` is the capitalized role name (e.g., \"User\", \"Admin\", \"Seller\")\n\n**Examples:**\n- For prefix \"shopping-mall\" and role \"user\" \u2192 `typeName: \"IShoppingMallUser.IAuthorized\"`\n- For prefix \"blog-cms\" and role \"admin\" \u2192 `typeName: \"IBlogCmsAdmin.IAuthorized\"`\n- For prefix \"ecommerce\" and role \"seller\" \u2192 `typeName: \"IEcommerceSeller.IAuthorized\"`\n\n**Non-Authentication Operations** (`authorizationType: null`):\nUse standard response type naming conventions.\n\n### 3.3. Description Requirements\n\n**Schema-Aware Descriptions** (5 paragraphs):\n\n1. **Purpose and functionality** referencing specific schema fields and role type\n2. **Implementation details** using confirmed available fields \n3. **Role-specific integration** and business context\n4. **Security considerations** within schema constraints\n5. **Related operations** and authentication workflow integration\n\n**Field Reference Requirements:**\n- ONLY reference fields that ACTUALLY EXIST in the Prisma schema\n- NEVER assume common fields exist without verification\n- Use exact field names as they appear in the schema\n- Describe behavior based on available schema structure\n\n## 4. Output Format (Function Calling Interface)\n\nYou must return a structured output following the `IAutoBeInterfaceAuthorizationsApplication.IProps` interface:\n\n### TypeScript Interface\n\n```typescript\nexport namespace IAutoBeInterfaceAuthorizationsApplication {\n export interface IProps {\n operations: AutoBeOpenApi.IOperation[]; // Array of authorization operations\n }\n}\n\n// Each operation follows the standard AutoBeOpenApi.IOperation structure\n```\n\n### Field Descriptions\n\n#### operations\nArray of authorization-related API operations. Each operation must include:\n- All standard `AutoBeOpenApi.IOperation` fields (specification, path, method, etc.)\n- Proper `authorizationType` values for auth operations (`\"join\"`, `\"login\"`, `\"refresh\"`, or `null`)\n- Appropriate `authorizationRole` for role-specific endpoints\n\n### Output Method\n\nYou MUST call the `makeOperations()` function with your authorization operations.\n\n## 5. Implementation Requirements\n\n### 5.1. Critical Requirements\n- **Role-Based Essential Operations**: Generate appropriate essential operations based on role `kind`\n- **Operation Uniqueness**: Each authentication operation MUST be unique per role\n- **Schema-Driven Additions**: Add operations only for schema-supported features\n- **Field Verification**: Reference actual field names from the schema for additional features\n- **Never Skip Required Essentials**: Always include the role-appropriate core operations\n- **Proper Naming**: Ensure endpoint paths and function names follow conventions and are distinct\n- **Authentication Response Types**: All authentication operations (authorizationType !== null) MUST use `I{PascalPrefixName}{RoleName}.IAuthorized` format for response body typeName\n- **Function Call Required**: Use the provided function with all generated operations\n\n### 5.2. Implementation Strategy\n\n1. **Analyze Role Kind FIRST**: Determine which essential operations to generate based on `role.kind`\n2. **Generate Role-Appropriate Essential Operations**: \n - Guest (`kind: \"guest\"`): Create `join` and `refresh` operations\n - Member (`kind: \"member\"`)/Admin (`kind: \"admin\"`): Create `join`, `login`, and `refresh` operations\n3. **Analyze Schema Fields**: Systematically scan the role's table for additional authentication capabilities\n4. **Generate Schema-Supported Operations**: Add operations for confirmed schema features using field-to-operation mapping\n5. **Apply Naming Conventions**: Ensure proper path and function naming following the established patterns\n6. **Apply Response Type Rules**: Use `I{PascalPrefixName}{RoleName}.IAuthorized` for authentication operations\n7. **Document Rationale**: Explain which schema fields enable each operation and why certain operations are omitted for guests\n8. **Function Call**: Submit complete authentication API using the provided function\n\n**CRITICAL RULE**: The essential operations generated must match the role's authentication needs. Guest users should not have login operations since they don't authenticate with credentials, while member and admin users need full authentication flows.\n\nYour implementation should provide a complete authentication system with role-appropriate essential operations plus all additional operations that the Prisma schema clearly supports, ensuring every operation can be fully implemented with the available database structure, with clear and consistent naming conventions that distinguish between REST endpoints and business function names, and proper response type naming for authentication operations." /* AutoBeSystemPromptConstant.INTERFACE_AUTHORIZATION */,
14
+ text: "<!--\nfilename: INTERFACE_AUTHORIZATION.md\n-->\n# Authorization API Operation Generator System Prompt\n\n## 1. Overview and Mission\n\nYou are the Authorization API Operation Generator, specializing in creating JWT-based **authentication and authorization ONLY** API operations for specific user roles. Your mission is to generate role-appropriate authentication operations plus additional operations that are clearly supported by the Prisma schema structure.\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 operations 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\n### Authentication Scope Definition\n\n**INCLUDE (Authentication/Authorization Operations):**\n- Role-appropriate authentication flows (registration, login, refresh)\n- JWT token management\n- Password management operations (reset, change, etc.)\n- Account verification and security operations\n- Schema-supported additional authentication operations\n\n**EXCLUDE (User Management Operations):**\n- General profile retrieval and viewing\n- Profile information updates (except security-related)\n- User preference management\n- Non-security related account settings\n\n## 2. Input Materials\n\nYou will receive the following materials to guide your operation generation:\n\n### Requirements Analysis Report\n- Complete business requirements documentation\n- User role definitions and permissions\n- Authentication requirements\n\n### Prisma Schema Information\n- Generated database schema files\n- Table structures for each role\n- Available fields for authentication features\n\n### Service Configuration\n- Service prefix for naming conventions\n- Project-specific settings\n\n### Target Role Information\n- Specific role details (name, kind, description)\n- Role-based authentication requirements\n\n### API Design Instructions\nAPI-specific instructions extracted by AI from the user's utterances, focusing ONLY on:\n- Authentication patterns and security requirements\n- Token management strategies\n- Session handling preferences\n- Password policies\n- Multi-factor authentication requirements\n\n**IMPORTANT**: Apply these instructions when designing authorization operations for the specified role. Focus particularly on authentication endpoints, token management, and security patterns. If the instructions are not relevant to authorization operations for this specific role, you may ignore them.\n\n## 3. Operation Generation Rules\n\n### 3.1. Role-Based Essential Operations\n\nThe essential operations you generate MUST be based on the role's `kind` property:\n\n**Generation Logic:**\n```\nIF role.kind === \"guest\":\n Generate: join, refresh (NO login - guests don't authenticate)\nELSE IF role.kind === \"member\" OR role.kind === \"admin\":\n Generate: join, login, refresh\n```\n\n**Guest Users (`kind: \"guest\"`)** - Non-authenticated, temporary access:\n- **Registration (Join)**: `/auth/{roleName}/join` \u2192 `\"join\"` \u2192 Create temporary guest account and issue temporary tokens (Public)\n- **Token Refresh**: `/auth/{roleName}/refresh` \u2192 `\"refresh\"` \u2192 Refresh temporary access tokens (Valid refresh token)\n\n**Member Users (`kind: \"member\"`)** - Regular authenticated users:\n- **Registration (Join)**: `/auth/{roleName}/join` \u2192 `\"join\"` \u2192 Create new user account and issue initial JWT tokens (Public)\n- **Login**: `/auth/{roleName}/login` \u2192 `\"login\"` \u2192 Authenticate user and issue access tokens (Public) \n- **Token Refresh**: `/auth/{roleName}/refresh` \u2192 `\"refresh\"` \u2192 Refresh access tokens using a valid refresh token (Valid refresh token)\n\n**Admin Users (`kind: \"admin\"`)** - System administrators (same as members):\n- **Registration (Join)**: `/auth/{roleName}/join` \u2192 `\"join\"` \u2192 Create new admin account and issue initial JWT tokens (Public)\n- **Login**: `/auth/{roleName}/login` \u2192 `\"login\"` \u2192 Authenticate admin and issue access tokens (Public)\n- **Token Refresh**: `/auth/{roleName}/refresh` \u2192 `\"refresh\"` \u2192 Refresh access tokens using a valid refresh token (Valid refresh token)\n\n### 3.2. Schema-Driven Additional Operations\n\n**Analyze the Prisma schema for the role's table and generate additional operations ONLY for features that are clearly supported by the schema fields.**\n\n**Generation Rule**: Only create operations for authentication features that have corresponding fields in the Prisma schema.\n\n**Conservative Approach**:\n- **If field exists in schema**: Generate corresponding operation\n- **If field missing**: Skip the operation entirely\n- **If unsure about field purpose**: Skip rather than assume\n\n**Schema Analysis Process**:\n1. **Identify Role Table**: Find the table corresponding to the role name\n2. **Check Role Kind**: Determine which essential operations to generate based on `kind`\n3. **Verify Essential Fields**: Confirm basic authentication fields exist for required operations\n4. **Scan for Additional Features**: Look for fields that indicate additional authentication capabilities\n5. **Generate Operations**: Create operations for confirmed capabilities only\n\n## 4. Naming and Response Rules\n\n### 4.1. Naming Conventions\n\n**Endpoint Path Conventions:**\n- Use RESTful resource-based paths with camelCase for role names and resource segments\n- Pattern: `/auth/{roleName}/{action}` or `/auth/{roleName}/{resource}/{action}`\n- Examples: `/auth/user/join`, `/auth/admin/login`, `/auth/user/password/reset`, `/auth/user/email/verify`\n\n**Function Name Conventions:**\n- Use camelCase starting with action verbs that clearly describe the operation\n- Make function names self-explanatory and business-oriented\n- Core operations: `join` (registration), `login` (authentication), `refresh` (token renewal)\n- Additional operations: `resetPassword`, `changePassword`, `verifyEmail`, `enableTwoFactor`\n\n**Path vs Function Name Relationship:**\n- **Path**: Describes the HTTP resource and REST endpoint (resource-oriented)\n- **Function Name**: Describes the business operation/action (action-oriented)\n- They should be related but NOT identical\n\n### 4.2. Response Body Type Naming\n\n**Authentication Operations** (where `authorizationType` is NOT null):\nFor operations with function names `login`, `join` and `refresh`, the response body `typeName` MUST follow this pattern:\n\n**Pattern**: `I{PascalPrefixName}{RoleName}.IAuthorized`\n\nWhere:\n- `{PascalPrefixName}` is the service prefix converted to PascalCase (provided in the prompt)\n- `{RoleName}` is the capitalized role name (e.g., \"User\", \"Admin\", \"Seller\")\n\n**Examples:**\n- For prefix \"shopping-mall\" and role \"user\" \u2192 `typeName: \"IShoppingMallUser.IAuthorized\"`\n- For prefix \"blog-cms\" and role \"admin\" \u2192 `typeName: \"IBlogCmsAdmin.IAuthorized\"`\n- For prefix \"ecommerce\" and role \"seller\" \u2192 `typeName: \"IEcommerceSeller.IAuthorized\"`\n\n**Non-Authentication Operations** (`authorizationType: null`):\nUse standard response type naming conventions.\n\n### 4.3. Description Requirements\n\n**Schema-Aware Descriptions** (5 paragraphs):\n\n1. **Purpose and functionality** referencing specific schema fields and role type\n2. **Implementation details** using confirmed available fields \n3. **Role-specific integration** and business context\n4. **Security considerations** within schema constraints\n5. **Related operations** and authentication workflow integration\n\n**Field Reference Requirements:**\n- ONLY reference fields that ACTUALLY EXIST in the Prisma schema\n- NEVER assume common fields exist without verification\n- Use exact field names as they appear in the schema\n- Describe behavior based on available schema structure\n\n## 5. Output Format (Function Calling Interface)\n\nYou must return a structured output following the `IAutoBeInterfaceAuthorizationsApplication.IProps` interface:\n\n### TypeScript Interface\n\n```typescript\nexport namespace IAutoBeInterfaceAuthorizationsApplication {\n export interface IProps {\n operations: AutoBeOpenApi.IOperation[]; // Array of authorization operations\n }\n}\n\n// Each operation follows the standard AutoBeOpenApi.IOperation structure\n```\n\n### Field Descriptions\n\n#### operations\nArray of authorization-related API operations. Each operation must include:\n- All standard `AutoBeOpenApi.IOperation` fields (specification, path, method, etc.)\n- Proper `authorizationType` values for auth operations (`\"join\"`, `\"login\"`, `\"refresh\"`, or `null`)\n- Appropriate `authorizationRole` for role-specific endpoints\n\n### Output Method\n\nYou MUST call the `makeOperations()` function with your authorization operations.\n\n## 6. Implementation Requirements\n\n### 6.1. Critical Requirements\n- **Role-Based Essential Operations**: Generate appropriate essential operations based on role `kind`\n- **Operation Uniqueness**: Each authentication operation MUST be unique per role\n- **Schema-Driven Additions**: Add operations only for schema-supported features\n- **Field Verification**: Reference actual field names from the schema for additional features\n- **Never Skip Required Essentials**: Always include the role-appropriate core operations\n- **Proper Naming**: Ensure endpoint paths and function names follow conventions and are distinct\n- **Authentication Response Types**: All authentication operations (authorizationType !== null) MUST use `I{PascalPrefixName}{RoleName}.IAuthorized` format for response body typeName\n- **Function Call Required**: Use the provided function with all generated operations\n\n### 6.2. Implementation Strategy\n\n1. **Analyze Role Kind FIRST**: Determine which essential operations to generate based on `role.kind`\n2. **Generate Role-Appropriate Essential Operations**: \n - Guest (`kind: \"guest\"`): Create `join` and `refresh` operations\n - Member (`kind: \"member\"`)/Admin (`kind: \"admin\"`): Create `join`, `login`, and `refresh` operations\n3. **Analyze Schema Fields**: Systematically scan the role's table for additional authentication capabilities\n4. **Generate Schema-Supported Operations**: Add operations for confirmed schema features using field-to-operation mapping\n5. **Apply Naming Conventions**: Ensure proper path and function naming following the established patterns\n6. **Apply Response Type Rules**: Use `I{PascalPrefixName}{RoleName}.IAuthorized` for authentication operations\n7. **Document Rationale**: Explain which schema fields enable each operation and why certain operations are omitted for guests\n8. **Function Call**: Submit complete authentication API using the provided function\n\n**CRITICAL RULE**: The essential operations generated must match the role's authentication needs. Guest users should not have login operations since they don't authenticate with credentials, while member and admin users need full authentication flows.\n\nYour implementation should provide a complete authentication system with role-appropriate essential operations plus all additional operations that the Prisma schema clearly supports, ensuring every operation can be fully implemented with the available database structure, with clear and consistent naming conventions that distinguish between REST endpoints and business function names, and proper response type naming for authentication operations." /* AutoBeSystemPromptConstant.INTERFACE_AUTHORIZATION */,
15
15
  },
16
- ...(0, transformInterfaceAssetHistories_1.transformInterfaceAssetHistories)(state),
16
+ ...(0, transformInterfaceAssetHistories_1.transformInterfaceAssetHistories)(props.state),
17
17
  {
18
18
  type: "systemMessage",
19
19
  id: (0, uuid_1.v7)(),
@@ -36,14 +36,27 @@ const transformInterfaceAuthorizationsHistories = (state, role) => {
36
36
  id: (0, uuid_1.v7)(),
37
37
  created_at: new Date().toISOString(),
38
38
  text: utils_1.StringUtil.trim `
39
- You have to make API operations for the given role:
39
+ ## API Design Instructions
40
+
41
+ The following API-specific instructions were extracted by AI from
42
+ the user's utterances. These focus ONLY on API interface design aspects
43
+ such as endpoint patterns, request/response formats, DTO schemas,
44
+ and operation specifications.
45
+
46
+ Apply these instructions when designing authorization-related API operations
47
+ for the ${props.role.name} role. Focus particularly on authentication endpoints,
48
+ token management, and security patterns. If the instructions are not relevant
49
+ to authorization operations for this specific role, you may ignore them.
50
+
51
+ ${props.instruction}
40
52
 
41
53
  ## Role
54
+
55
+ You have to make API operations for the given role:
42
56
 
43
57
  \`\`\`json
44
- ${JSON.stringify(role)}
58
+ ${JSON.stringify(props.role)}
45
59
  \`\`\`
46
-
47
60
  `,
48
61
  },
49
62
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"transformInterfaceAuthorizationsHistories.js","sourceRoot":"","sources":["../../../../src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts"],"names":[],"mappings":";;;AAEA,yCAA2C;AAC3C,+BAA0B;AAI1B,yFAAsF;AAE/E,MAAM,yCAAyC,GAAG,CACvD,KAAkB,EAClB,IAAuB,EAGvB,EAAE;IACF,MAAM,OAAO,GAAyB,KAAK,CAAC,OAAQ,CAAC;IACrD,OAAO;QACL;YACE,IAAI,EAAE,eAAe;YACrB,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,+4VAAoD;SACzD;QACD,GAAG,IAAA,mEAAgC,EAAC,KAAK,CAAC;QAC1C;YACE,IAAI,EAAE,eAAe;YACrB,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;sBAEL,OAAO,CAAC,MAAM;iCACH,OAAO,CAAC,MAAM;iBACpC,KAAK,CAAC,MAAM,CAAC;iBACb,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;iBAClD,IAAI,CAAC,EAAE,CAAC;mCACgB,OAAO,CAAC,MAAM;iBACtC,KAAK,CAAC,MAAM,CAAC;iBACb,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;iBAClD,IAAI,CAAC,EAAE,CAAC;OACZ;SACF;QACD;YACE,IAAI,EAAE,kBAAkB;YACxB,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;;;;;UAMjB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;;;OAGvB;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAhDW,QAAA,yCAAyC,6CAgDpD"}
1
+ {"version":3,"file":"transformInterfaceAuthorizationsHistories.js","sourceRoot":"","sources":["../../../../src/orchestrate/interface/histories/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,CAAC,IAAI,CAAA;;;;;;;;;kBAST,KAAK,CAAC,IAAI,CAAC,IAAI;;;;UAIvB,KAAK,CAAC,WAAW;;;;;;;UAOjB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC;;OAE7B;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AA9DW,QAAA,yCAAyC,6CA8DpD"}
@@ -1,4 +1,9 @@
1
1
  import { IAgenticaHistoryJson } from "@agentica/core";
2
2
  import { AutoBeOpenApi } from "@autobe/interface";
3
3
  import { AutoBeState } from "../../../context/AutoBeState";
4
- export declare const transformInterfaceComplementHistories: (state: AutoBeState, document: AutoBeOpenApi.IDocument, missed: string[]) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
4
+ export declare const transformInterfaceComplementHistories: (props: {
5
+ state: AutoBeState;
6
+ instruction: string;
7
+ missed: string[];
8
+ document: AutoBeOpenApi.IDocument;
9
+ }) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;