@autobe/agent 0.25.5 → 0.25.7

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 (119) hide show
  1. package/lib/constants/AutoBeSystemPromptConstant.d.ts +12 -13
  2. package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
  3. package/lib/context/AutoBeTokenUsage.d.ts +2 -2
  4. package/lib/context/AutoBeTokenUsage.js.map +1 -1
  5. package/lib/context/{IAutoBeApplication.d.ts → IAutoBeFacadeApplication.d.ts} +15 -83
  6. package/lib/context/{IAutoBeApplicationProps.js → IAutoBeFacadeApplication.js} +1 -1
  7. package/lib/context/IAutoBeFacadeApplication.js.map +1 -0
  8. package/lib/context/{IAutoBeApplicationProps.d.ts → IAutoBeFacadeApplicationProps.d.ts} +1 -1
  9. package/lib/context/{IAutoBeApplication.js → IAutoBeFacadeApplicationProps.js} +1 -1
  10. package/lib/context/IAutoBeFacadeApplicationProps.js.map +1 -0
  11. package/lib/context/{IAutoBeApplicationResult.d.ts → IAutoBeFacadeApplicationResult.d.ts} +1 -1
  12. package/lib/context/{IAutoBeApplicationResult.js → IAutoBeFacadeApplicationResult.js} +1 -1
  13. package/lib/context/IAutoBeFacadeApplicationResult.js.map +1 -0
  14. package/lib/factory/createAgenticaHistory.js +3 -1
  15. package/lib/factory/createAgenticaHistory.js.map +1 -1
  16. package/lib/factory/createAutoBeApplication.js +38 -76
  17. package/lib/factory/createAutoBeApplication.js.map +1 -1
  18. package/lib/factory/createAutoBeContext.js +10 -11
  19. package/lib/factory/createAutoBeContext.js.map +1 -1
  20. package/lib/index.mjs +167 -246
  21. package/lib/index.mjs.map +1 -1
  22. package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js +0 -1
  23. package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -1
  24. package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +1 -1
  25. package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +3 -18
  26. package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
  27. package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +0 -1
  28. package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +1 -13
  29. package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
  30. package/lib/orchestrate/analyze/orchestrateAnalyze.d.ts +1 -2
  31. package/lib/orchestrate/analyze/orchestrateAnalyze.js +2 -4
  32. package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
  33. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.d.ts +1 -1
  34. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +2 -2
  35. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
  36. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +0 -1
  37. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
  38. package/lib/orchestrate/facade/transformFacadeStateMessage.js +1 -1
  39. package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
  40. package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js +0 -4
  41. package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -1
  42. package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +10 -7
  43. package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
  44. package/lib/orchestrate/interface/histories/transformInterfaceCommonHistories.d.ts +3 -0
  45. package/lib/orchestrate/interface/histories/{transformInterfaceCommonPrerequisiteHistories.js → transformInterfaceCommonHistories.js} +4 -4
  46. package/lib/orchestrate/interface/histories/transformInterfaceCommonHistories.js.map +1 -0
  47. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +12 -9
  48. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
  49. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +10 -7
  50. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
  51. package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +1 -1
  52. package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -1
  53. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +13 -10
  54. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
  55. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +10 -7
  56. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
  57. package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +1 -1
  58. package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
  59. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +10 -7
  60. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
  61. package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +1 -1
  62. package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
  63. package/lib/orchestrate/interface/orchestrateInterface.d.ts +2 -2
  64. package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
  65. package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +10 -5
  66. package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
  67. package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js +2 -2
  68. package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
  69. package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +9 -6
  70. package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
  71. package/lib/orchestrate/prisma/orchestratePrisma.d.ts +2 -2
  72. package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -1
  73. package/lib/orchestrate/realize/orchestrateRealize.d.ts +2 -2
  74. package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
  75. package/lib/orchestrate/test/histories/transformTestScenarioHistories.js +8 -5
  76. package/lib/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
  77. package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js +8 -5
  78. package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js.map +1 -1
  79. package/lib/orchestrate/test/histories/transformTestWriteHistories.js +8 -5
  80. package/lib/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
  81. package/lib/orchestrate/test/orchestrateTest.d.ts +2 -2
  82. package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
  83. package/package.json +6 -6
  84. package/src/constants/AutoBeSystemPromptConstant.ts +12 -13
  85. package/src/context/AutoBeTokenUsage.ts +2 -2
  86. package/src/context/{IAutoBeApplication.ts → IAutoBeFacadeApplication.ts} +15 -83
  87. package/src/context/{IAutoBeApplicationProps.ts → IAutoBeFacadeApplicationProps.ts} +1 -1
  88. package/src/context/{IAutoBeApplicationResult.ts → IAutoBeFacadeApplicationResult.ts} +1 -1
  89. package/src/factory/createAgenticaHistory.ts +5 -4
  90. package/src/factory/createAutoBeApplication.ts +6 -6
  91. package/src/factory/createAutoBeContext.ts +2 -3
  92. package/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.ts +0 -1
  93. package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +0 -16
  94. package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +0 -13
  95. package/src/orchestrate/analyze/orchestrateAnalyze.ts +71 -74
  96. package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +1 -2
  97. package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +0 -1
  98. package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +0 -4
  99. package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +9 -6
  100. package/src/orchestrate/interface/histories/{transformInterfaceCommonPrerequisiteHistories.ts → transformInterfaceCommonHistories.ts} +1 -1
  101. package/src/orchestrate/interface/histories/transformInterfaceComplementHistories.ts +9 -6
  102. package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +9 -6
  103. package/src/orchestrate/interface/histories/transformInterfaceGroupHistories.ts +11 -10
  104. package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +9 -6
  105. package/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts +9 -6
  106. package/src/orchestrate/interface/orchestrateInterface.ts +2 -2
  107. package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +9 -4
  108. package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +8 -5
  109. package/src/orchestrate/prisma/orchestratePrisma.ts +2 -2
  110. package/src/orchestrate/realize/orchestrateRealize.ts +2 -2
  111. package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +8 -5
  112. package/src/orchestrate/test/histories/transformTestScenarioReviewHistories.ts +8 -5
  113. package/src/orchestrate/test/histories/transformTestWriteHistories.ts +8 -5
  114. package/src/orchestrate/test/orchestrateTest.ts +2 -2
  115. package/lib/context/IAutoBeApplication.js.map +0 -1
  116. package/lib/context/IAutoBeApplicationProps.js.map +0 -1
  117. package/lib/context/IAutoBeApplicationResult.js.map +0 -1
  118. package/lib/orchestrate/interface/histories/transformInterfaceCommonPrerequisiteHistories.d.ts +0 -3
  119. package/lib/orchestrate/interface/histories/transformInterfaceCommonPrerequisiteHistories.js.map +0 -1
@@ -15,7 +15,7 @@ const executeCachedBatch_1 = require("../../utils/executeCachedBatch");
15
15
  const orchestrateAnalyzeReview_1 = require("./orchestrateAnalyzeReview");
16
16
  const orchestrateAnalyzeScenario_1 = require("./orchestrateAnalyzeScenario");
17
17
  const orchestrateAnalyzeWrite_1 = require("./orchestrateAnalyzeWrite");
18
- const orchestrateAnalyze = (ctx) => (props) => __awaiter(void 0, void 0, void 0, function* () {
18
+ const orchestrateAnalyze = (ctx) => __awaiter(void 0, void 0, void 0, function* () {
19
19
  var _a, _b;
20
20
  // Initialize analysis state
21
21
  const step = ((_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : -1) + 1;
@@ -23,12 +23,11 @@ const orchestrateAnalyze = (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.instruction,
27
26
  step,
28
27
  created_at: startTime.toISOString(),
29
28
  });
30
29
  // Generate analysis scenario
31
- const scenario = yield (0, orchestrateAnalyzeScenario_1.orchestrateAnalyzeScenario)(ctx, props.instruction);
30
+ const scenario = yield (0, orchestrateAnalyzeScenario_1.orchestrateAnalyzeScenario)(ctx);
32
31
  if (scenario.type === "assistantMessage")
33
32
  return ctx.assistantMessage(scenario);
34
33
  else
@@ -44,7 +43,6 @@ const orchestrateAnalyze = (ctx) => (props) => __awaiter(void 0, void 0, void 0,
44
43
  file,
45
44
  progress: writeProgress,
46
45
  promptCacheKey,
47
- instruction: props.instruction,
48
46
  });
49
47
  return event.file;
50
48
  })));
@@ -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,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E,YAAY;gBAChC,MAAM,EAAE,IAAI;gBACZ,QAAQ,EAAE,cAAc;gBACxB,cAAc;aACf,CACF,CAAC;YACF,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;AAhFW,QAAA,kBAAkB,sBAgF7B"}
@@ -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>, instruction: string) => Promise<AutoBeAnalyzeScenarioEvent | AutoBeAssistantMessageHistory>;
4
+ export declare const orchestrateAnalyzeScenario: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>) => 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, instruction) => __awaiter(void 0, void 0, void 0, function* () {
55
+ const orchestrateAnalyzeScenario = (ctx) => __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, instruction) => __awaiter(void 0, void
64
64
  model: ctx.model,
65
65
  build: (value) => (pointer.value = value),
66
66
  }),
67
- histories: (0, transformAnalyzeScenarioHistories_1.transformAnalyzeSceHistories)(ctx, instruction),
67
+ histories: (0, transformAnalyzeScenarioHistories_1.transformAnalyzeSceHistories)(ctx),
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,EACzB,WAAmB,EACkD,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,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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,7 +5,6 @@ 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;
9
8
  progress: AutoBeProgressEventBase;
10
9
  promptCacheKey: string;
11
10
  }) => Promise<AutoBeAnalyzeWriteEvent>;
@@ -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,KAMC,EACiC,EAAE;;IACpC,MAAM,EAAE,IAA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,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"}
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,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IACjD,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,EA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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## 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 `
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- Your job is to help users clearly express their intended **features** by asking many questions. \n- Use examples and simple questions to guide them if they have trouble explaining. \n- Break down features into smaller steps if needed to complete the planning gradually. \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- 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\n### \uD83D\uDEA8 ABSOLUTE RULE #1: DOMAIN-SPECIFIC INSTRUCTION EXTRACTION WITH ZERO DISTORTION \uD83D\uDEA8\n\n**YOU ARE A DOMAIN-SPECIFIC INSTRUCTION EXTRACTOR AND COPY-PASTE MACHINE.**\n\nYour role is TWO-FOLD:\n1. **EXTRACT ONLY explicit, direct instructions for each agent's specific domain**\n - General requirements and features are handled by analyze() - DO NOT repeat them\n - Only extract instructions that directly tell the agent HOW to design/implement their part\n2. **COPY-PASTE the extracted instructions WITHOUT ANY MODIFICATION**\n\n### Phase-Specific Content Filtering\n\n**IMPORTANT: analyze() already processes and propagates general requirements. Each subsequent agent needs ONLY their domain-specific instructions, NOT general requirements.**\n\nEach agent should ONLY receive **direct instructions** for their specific domain:\n\n- **analyze()**: No special filtering - receives the full conversation history to analyze requirements\n- **prisma()**: ONLY direct database design instructions\n - Explicit database schema specifications, CREATE TABLE statements\n - Direct instructions about table structures, field definitions\n - Specific relationship definitions (foreign keys, joins)\n - Explicit database constraints, indexes, unique fields\n - **NOT general requirements - analyze() handles those**\n- **interface()**: ONLY direct API/DTO design instructions \n - Explicit API endpoint specifications\n - Direct request/response schema definitions\n - Specific DTO structure instructions\n - Explicit OpenAPI/Swagger specifications\n - **NOT general features or user stories - only API design specifics**\n- **test()**: ONLY direct testing program instructions\n - Explicit test scenario definitions\n - Specific test case instructions\n - Direct testing strategy commands\n - Explicit validation requirements\n - **NOT what to test (analyze provides that) - but HOW to test**\n- **realize()**: ONLY direct implementation logic instructions\n - Explicit business logic algorithms\n - Specific implementation patterns\n - Direct processing logic instructions\n - Explicit performance optimization requirements\n - **NOT what features to implement - but HOW to implement them**\n\n### Examples of What to Extract vs What to Exclude\n\n**Example User Input:**\n\"I need a blog system where users can write posts. \nPosts table should have: id, title, content, author_id, created_at.\nAPI should have GET /posts and POST /posts endpoints.\nTest the post creation with valid and invalid data.\nWhen creating a post, validate that title is not empty.\"\n\n**What Each Agent Should Receive:**\n- **prisma()**: \"Posts table should have: id, title, content, author_id, created_at.\" \u2705\n - NOT: \"I need a blog system where users can write posts\" \u274C (general requirement)\n- **interface()**: \"API should have GET /posts and POST /posts endpoints.\" \u2705\n - NOT: The database schema \u274C (that's prisma's job)\n- **test()**: \"Test the post creation with valid and invalid data.\" \u2705\n - NOT: What tables exist \u274C (analyze already knows)\n- **realize()**: \"When creating a post, validate that title is not empty.\" \u2705\n - NOT: The API endpoint definitions \u274C (interface handles that)\n\n### Within Each Phase: ABSOLUTE COPY-PASTE RULE\n\n**Once you identify content relevant to a specific phase:**\n\n1. **COPY the user's raw text** - ctrl+C, ctrl+V, nothing else\n2. **PASTE without ANY modifications** - no editing, no summarizing, no \"improving\"\n3. **INCLUDE EVERYTHING relevant** - every line, every character, every code block\n4. **PRESERVE ORIGINAL FORMATTING** - indentation, line breaks, markdown, everything\n\n**IF YOU WRITE THINGS LIKE:**\n- \"Design database according to user specification\" \u274C WRONG\n- \"Follow the schema provided\" \u274C WRONG \n- \"As specified in requirements\" \u274C WRONG\n- \"Create tables as shown\" \u274C WRONG\n\n**YOU MUST INSTEAD:**\n- Copy-paste the ENTIRE relevant specification \u2705\n- Include ALL relevant code blocks completely \u2705\n- Preserve ALL user comments and commands for that phase \u2705\n- Keep ALL sections, warnings, and rules related to that phase \u2705\n\nWhen calling each functional agent, you must:\n\n1. **Filter by Phase** - Extract ONLY content relevant to that specific agent\n2. **DO NOT Transform** - Copy-paste the user's exact words, do NOT rewrite\n3. **Preserve Everything Within Scope** - User's tone, emphasis, commands, code blocks for that phase\n4. **Never Summarize** - If user wrote 1000 lines about databases, prisma() gets 1000 lines\n5. **Act as a Selective Pipeline** - You filter by phase, but pass relevant content through unchanged\n\n### CRITICAL: Extract Instructions from Entire Conversation History\n\n**When preparing instructions for each agent:**\n- **SEARCH THE ENTIRE CONVERSATION HISTORY** - not just the most recent messages\n- **EXTRACT ALL RELEVANT INSTRUCTIONS** from any point in the dialogue, including early requirements, mid-conversation clarifications, and recent updates\n- **COMBINE INSTRUCTIONS CHRONOLOGICALLY** - preserve the evolution of requirements while ensuring later instructions override earlier ones when there's a conflict\n- **NEVER MISS PAST CONTEXT** - thoroughly scan all previous messages for specifications, constraints, examples, and design decisions\n- **INCLUDE FORGOTTEN DETAILS** - users may mention critical requirements early and assume you remember them throughout\n\n### CRITICAL: Preserve Original Content Without Arbitrary Summarization\n\n**When extracting instructions from user requirements:**\n- **DO clarify unclear content** when necessary for agent understanding\n- **DO NOT arbitrarily summarize or abbreviate** user requirements\n- **PRESERVE the original wording** as much as possible - stay close to the user's actual words\n- **MAINTAIN full context** - don't lose important details through oversimplification\n- **KEEP the complete narrative** - the preservation of tone and manner stems from this same principle\n- **PRESERVE ALL technical specifications verbatim** - design specs, schemas, API definitions, and code blocks MUST be included exactly as provided\n- **NEVER modify code blocks or technical specs** - pass them through unchanged, including formatting, indentation, and comments\n- **INCLUDE complete technical documentation** - if the user provides detailed specifications, architectures, or diagrams in text form, preserve them entirely\n\n### ABSOLUTE RULE: Copy-Paste Raw Content for Technical Specifications\n\n**FOR ALL TECHNICAL CONTENT (schemas, code, specifications, designs):**\n- **COPY-PASTE THE ENTIRE RAW CONTENT** - do not rewrite, summarize, or interpret\n- **INCLUDE MARKDOWN CODE BLOCKS AS-IS** - preserve ```language markers and all content within\n- **PRESERVE EXACT FORMATTING** - maintain line breaks, indentation, bullet points, numbering\n- **KEEP ALL COMMENTS AND ANNOTATIONS** - user's inline comments are part of the specification\n- **DO NOT TRANSLATE TECHNICAL TERMS** - keep CREATE TABLE, PRIMARY KEY, etc. exactly as written\n- **INCLUDE THE FULL SCHEMA/CODE** - never excerpt or abbreviate technical specifications\n\n### \uD83D\uDD34 STOP! READ THIS BEFORE CALLING ANY AGENT \uD83D\uDD34\n\n**THE INSTRUCTION PARAMETER IS NOT FOR YOUR SUMMARY. IT IS FOR PHASE-FILTERED RAW USER CONTENT.**\n\n**WHAT YOU ARE DOING WRONG:**\n```\ninstruction: \"Design the database schema according to the user's specification.\"\n```\nThis is WRONG. You are summarizing. STOP IT.\n\n**WHAT YOU MUST DO:**\n1. **FIRST: Identify content relevant to the specific agent phase**\n2. **THEN: Include that ENTIRE relevant content exactly as written by the user**\n\n**THE GOLDEN RULE FOR EACH PHASE:**\n- If the user wrote 10,000 characters about databases, prisma() gets ALL 10,000 characters\n- If the user included 50 API endpoint definitions, interface() gets ALL 50 endpoints\n- If the user wrote test scenarios with emphasis, test() gets that exact tone and wording\n- If the user described business logic, realize() gets the complete description\n\n**YOU ARE VIOLATING THIS RULE IF:**\n- Your instruction is shorter than what the user wrote for that phase\n- You removed any code blocks relevant to that phase\n- You changed any wording in the phase-specific content\n- You \"cleaned up\" the formatting of relevant content\n- You tried to \"organize\" or \"improve\" phase-specific instructions\n\n**REMEMBER:**\n- Phase filtering is MANDATORY - don't send database schemas to test()\n- Within each phase, content preservation is ABSOLUTE\n- Code blocks MUST be preserved with ``` markers\n- Every CREATE TABLE goes to prisma(), every endpoint to interface()\n- Every warning and rule SPECIFIC TO THAT PHASE must be preserved\n- You are a PHASE-SPECIFIC FILTER, then a PIPE\n\nThe goal is to pass the user's authentic voice and complete requirements to each agent, not a condensed interpretation. Technical specifications and code examples are sacred - they must flow through untouched. When in doubt, COPY MORE, not less.\n\n### IMPORTANT: Phase-Specific Instructions Only\n\n**You MUST extract ONLY the instructions relevant to each specific phase:**\n\n- **analyze()**: No special instructions needed - the agent will process the raw conversation history directly\n- **prisma()**: ONLY database design instructions (schema structure, relationships, constraints, indexing strategies)\n - Extract and pass through VERBATIM any database schemas, CREATE TABLE statements, entity definitions\n - Include all database-specific requirements WITHOUT interpretation\n- **interface()**: ONLY API and DTO schema instructions (endpoint patterns, request/response formats, operation specifications)\n - Extract and pass through VERBATIM any API definitions, endpoint specifications, OpenAPI schemas\n - Include all API-specific requirements WITHOUT modification\n- **test()**: ONLY testing strategy instructions (test scenarios, coverage priorities, edge cases to validate)\n - Extract and pass through VERBATIM any test scenarios, test cases, validation requirements\n - Include all testing-specific instructions WITHOUT editing\n- **realize()**: ONLY implementation instructions (business logic patterns, performance requirements, architectural decisions)\n - Extract and pass through VERBATIM any business logic, algorithms, processing rules\n - Include all implementation-specific requirements WITHOUT transformation\n\n**DO NOT include instructions meant for other phases. Each agent should receive ONLY its domain-specific guidance, but that guidance must be passed through UNCHANGED.**\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### CRITICAL: Preserve User's Emphatic Rules and Tone\n\n**When the user provides strong directives or absolute rules, you MUST:**\n- **Preserve the exact tone and intensity** of their commands\n- **Maintain the user's original wording and emphatic language** without dilution\n- **Include all prohibitions, commands, and warnings exactly as stated**\n- **Never soften or reinterpret strong language** - if the user uses absolute terms, preserve them\n\n### Key Principle\n\n**Two-Step Process:**\n1. **Extract Domain-Specific Instructions**: Extract ONLY explicit, direct instructions for each agent's specific domain\n - prisma(): Database design HOW-TOs only\n - interface(): API/DTO design HOW-TOs only \n - test(): Testing program HOW-TOs only\n - realize(): Implementation logic HOW-TOs only\n2. **Preserve Completely**: Pass the extracted instructions with the user's authentic voice, preserving original wording and tone WITHOUT any interpretation, transformation, or summarization\n\n**The Formula:**\n- Domain-specific instruction extraction (not general requirements) + Zero distortion (exact copy-paste) = Correct instruction passing\n\n**Remember**: analyze() handles general requirements. Other agents need ONLY their specific technical instructions.\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,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"}
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,wliBAAkC,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"}
@@ -17,10 +17,6 @@ const transformInterfaceAssetHistories = (state) => {
17
17
  Call the provided tool function to generate the OpenAPI document
18
18
  referencing below requirement analysis and Prisma DB schema.
19
19
 
20
- ## User Request
21
-
22
- ${analyze.instruction}
23
-
24
20
  ## Requirement Analysis Report
25
21
 
26
22
  \`\`\`json
@@ -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,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
+ {"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;;;;;;;;;UASjB,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;AA5DW,QAAA,gCAAgC,oCA4D3C"}
@@ -11,7 +11,7 @@ const transformInterfaceAuthorizationsHistories = (props) => {
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. 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 */,
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**: Follow these instructions when designing authorization operations. Carefully distinguish between:\n- Suggestions or recommendations (consider these as guidance)\n- Direct specifications or explicit commands (these must be followed exactly)\n\nWhen instructions contain direct specifications or explicit design decisions, follow them precisely even if you believe you have better alternatives - this is fundamental to your role as an AI assistant.\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
16
  ...(0, transformInterfaceAssetHistories_1.transformInterfaceAssetHistories)(props.state),
17
17
  {
@@ -38,15 +38,18 @@ const transformInterfaceAuthorizationsHistories = (props) => {
38
38
  text: utils_1.StringUtil.trim `
39
39
  ## API Design Instructions
40
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
41
+ The following API-specific instructions were extracted from
42
+ the user's requirements. These focus on API interface design aspects
43
43
  such as endpoint patterns, request/response formats, DTO schemas,
44
44
  and operation specifications.
45
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.
46
+ Follow these instructions when designing authorization operations for ${props.role.name}.
47
+ Carefully distinguish between:
48
+ - Suggestions or recommendations (consider these as guidance)
49
+ - Direct specifications or explicit commands (these must be followed exactly)
50
+
51
+ When instructions contain direct specifications or explicit design decisions,
52
+ follow them precisely even if you believe you have better alternatives.
50
53
 
51
54
  ${props.instruction}
52
55
 
@@ -1 +1 @@
1
- {"version":3,"file":"transformInterfaceAuthorizationsHistories.js","sourceRoot":"","sources":["../../../../src/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I,EAAE,kBAAU,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
+ {"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,CAAC,KAIzD,EAEC,EAAE;IACF,MAAM,OAAO,GAAyB,KAAK,CAAC,KAAK,CAAC,OAAQ,CAAC;IAC3D,OAAO;QACL;YACE,IAAI,EAAE,eAAe;YACrB,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,uwYAAoD;SACzD;QACD,GAAG,IAAA,mEAAgC,EAAC,KAAK,CAAC,KAAK,CAAC;QAChD;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;;;;;;;;gFAQqD,KAAK,CAAC,IAAI,CAAC,IAAI;;;;;;;;UAQrF,KAAK,CAAC,WAAW;;;;;;;UAOjB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC;;OAE7B;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAjEW,QAAA,yCAAyC,6CAiEpD"}
@@ -0,0 +1,3 @@
1
+ import { IAgenticaHistoryJson } from "@agentica/core";
2
+ import { AutoBeState } from "../../../context/AutoBeState";
3
+ export declare const transformInterfaceCommonHistories: (state: AutoBeState) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage> | null;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.transformInterfaceCommonPrerequisiteHistories = void 0;
3
+ exports.transformInterfaceCommonHistories = void 0;
4
4
  const uuid_1 = require("uuid");
5
- const transformInterfaceCommonPrerequisiteHistories = (state) => {
5
+ const transformInterfaceCommonHistories = (state) => {
6
6
  if (state.analyze === null)
7
7
  return [
8
8
  {
@@ -59,5 +59,5 @@ const transformInterfaceCommonPrerequisiteHistories = (state) => {
59
59
  ];
60
60
  return null;
61
61
  };
62
- exports.transformInterfaceCommonPrerequisiteHistories = transformInterfaceCommonPrerequisiteHistories;
63
- //# sourceMappingURL=transformInterfaceCommonPrerequisiteHistories.js.map
62
+ exports.transformInterfaceCommonHistories = transformInterfaceCommonHistories;
63
+ //# sourceMappingURL=transformInterfaceCommonHistories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transformInterfaceCommonHistories.js","sourceRoot":"","sources":["../../../../src/orchestrate/interface/histories/transformInterfaceCommonHistories.ts"],"names":[],"mappings":";;;AACA,+BAA0B;AAInB,MAAM,iCAAiC,GAAG,CAC/C,KAAkB,EAGX,EAAE;IACT,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI;QACxB,OAAO;YACL;gBACE,EAAE,EAAE,IAAA,SAAE,GAAE;gBACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACpC,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE;oBACJ,4CAA4C;oBAC5C,mCAAmC;oBACnC,8CAA8C;iBAC/C,CAAC,IAAI,CAAC,GAAG,CAAC;aACZ;SACF,CAAC;SACC,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI;QAC5B,OAAO;YACL;gBACE,EAAE,EAAE,IAAA,SAAE,GAAE;gBACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACpC,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE;oBACJ,mDAAmD;oBACnD,mCAAmC;oBACnC,qDAAqD;iBACtD,CAAC,IAAI,CAAC,GAAG,CAAC;aACZ;SACF,CAAC;SACC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,KAAK,CAAC,MAAM,CAAC,IAAI;QAC/C,OAAO;YACL;gBACE,EAAE,EAAE,IAAA,SAAE,GAAE;gBACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACpC,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE;oBACJ,kDAAkD;oBAClD,sCAAsC;oBACtC,mCAAmC;oBACnC,wDAAwD;iBACzD,CAAC,IAAI,CAAC,GAAG,CAAC;aACZ;SACF,CAAC;SACC,IAAI,KAAK,CAAC,MAAM,CAAC,QAAQ,CAA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