@autobe/agent 0.10.6 → 0.11.1

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 (147) hide show
  1. package/lib/AutoBeAgent.js +13 -46
  2. package/lib/AutoBeAgent.js.map +1 -1
  3. package/lib/constants/AutoBeSystemPromptConstant.d.ts +11 -6
  4. package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
  5. package/lib/context/AutoBeContext.d.ts +3 -2
  6. package/lib/factory/getAutoBeGenerated.d.ts +5 -0
  7. package/lib/factory/getAutoBeGenerated.js +307 -0
  8. package/lib/factory/getAutoBeGenerated.js.map +1 -0
  9. package/lib/index.mjs +1652 -1402
  10. package/lib/index.mjs.map +1 -1
  11. package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.d.ts +2 -7
  12. package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js +1 -9
  13. package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js.map +1 -1
  14. package/lib/orchestrate/analyze/AutoBeAnalyzeRole.d.ts +13 -0
  15. package/lib/orchestrate/analyze/AutoBeAnalyzeRole.js +3 -0
  16. package/lib/orchestrate/analyze/AutoBeAnalyzeRole.js.map +1 -0
  17. package/lib/orchestrate/analyze/orchestrateAnalyze.d.ts +0 -25
  18. package/lib/orchestrate/analyze/orchestrateAnalyze.js +22 -420
  19. package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
  20. package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.d.ts +6 -0
  21. package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js +561 -0
  22. package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js.map +1 -0
  23. package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.d.ts +6 -0
  24. package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js +41 -0
  25. package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js.map +1 -0
  26. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +14 -0
  27. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +468 -0
  28. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -0
  29. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.d.ts +68 -0
  30. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.js +3 -0
  31. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.js.map +1 -0
  32. package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.d.ts +5 -0
  33. package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js +27 -0
  34. package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js.map +1 -0
  35. package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.d.ts +12 -0
  36. package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js +78 -0
  37. package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js.map +1 -0
  38. package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.d.ts +6 -0
  39. package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js +58 -0
  40. package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js.map +1 -0
  41. package/lib/orchestrate/interface/orchestrateInterface.js +0 -2
  42. package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
  43. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +17 -137
  44. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +1 -1
  45. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +92 -141
  46. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  47. package/lib/orchestrate/prisma/orchestratePrisma.js +9 -5
  48. package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -1
  49. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +54 -25
  50. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  51. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +4 -3
  52. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  53. package/lib/orchestrate/prisma/{orchestratePrismaSchema.d.ts → orchestratePrismaSchemas.d.ts} +2 -4
  54. package/lib/orchestrate/prisma/{orchestratePrismaSchema.js → orchestratePrismaSchemas.js} +269 -203
  55. package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -0
  56. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js +1 -1
  57. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +1 -1
  58. package/lib/orchestrate/prisma/transformPrismaCorrectHistories.js +1 -1
  59. package/lib/orchestrate/prisma/transformPrismaHistories.js +1 -1
  60. package/lib/orchestrate/prisma/transformPrismaHistories.js.map +1 -1
  61. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.d.ts +2 -6
  62. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js +24 -32
  63. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js.map +1 -1
  64. package/lib/orchestrate/realize/RealizePipe.d.ts +5 -0
  65. package/lib/orchestrate/realize/RealizePipe.js +14 -0
  66. package/lib/orchestrate/realize/RealizePipe.js.map +1 -0
  67. package/lib/orchestrate/realize/orchestrateRealize.d.ts +0 -6
  68. package/lib/orchestrate/realize/orchestrateRealize.js +6 -43
  69. package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
  70. package/lib/orchestrate/realize/orchestrateRealizeCoder.d.ts +3 -3
  71. package/lib/orchestrate/realize/orchestrateRealizeCoder.js +124 -59
  72. package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +1 -1
  73. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +188 -18
  74. package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +23 -0
  75. package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.js +3 -0
  76. package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +1 -0
  77. package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +2 -0
  78. package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js +5 -0
  79. package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js.map +1 -0
  80. package/lib/orchestrate/realize/transformRealizeCoderHistories.d.ts +2 -1
  81. package/lib/orchestrate/realize/transformRealizeCoderHistories.js +50 -36
  82. package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +1 -1
  83. package/lib/orchestrate/realize/writeCodeUntilCompilePassed.d.ts +5 -0
  84. package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js +123 -0
  85. package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js.map +1 -0
  86. package/lib/orchestrate/test/compile/getTestExternalDeclarations.js +4 -1
  87. package/lib/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -1
  88. package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js +2 -1
  89. package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -1
  90. package/lib/orchestrate/test/orchestrateTest.js +11 -5
  91. package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
  92. package/lib/orchestrate/test/orchestrateTestCorrect.js +3 -2
  93. package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  94. package/lib/orchestrate/test/orchestrateTestWrite.js +22 -13
  95. package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  96. package/lib/structures/IAutoBeProps.d.ts +8 -8
  97. package/lib/utils/pipe.d.ts +5 -0
  98. package/lib/utils/pipe.js +14 -0
  99. package/lib/utils/pipe.js.map +1 -0
  100. package/package.json +6 -6
  101. package/src/AutoBeAgent.ts +22 -76
  102. package/src/constants/AutoBeSystemPromptConstant.ts +11 -6
  103. package/src/context/AutoBeContext.ts +3 -1
  104. package/src/factory/getAutoBeGenerated.ts +113 -0
  105. package/src/orchestrate/analyze/AutoBeAnalyzeFileSystem.ts +5 -13
  106. package/src/orchestrate/analyze/AutoBeAnalyzeRole.ts +14 -0
  107. package/src/orchestrate/analyze/orchestrateAnalyze.ts +30 -165
  108. package/src/orchestrate/analyze/orchestrateAnalyzeComposer.ts +115 -0
  109. package/src/orchestrate/analyze/orchestrateAnalyzeReviewer.ts +39 -0
  110. package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +106 -0
  111. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.ts +74 -0
  112. package/src/orchestrate/analyze/transformAnalyzeReviewerHistories.ts +31 -0
  113. package/src/orchestrate/analyze/transformAnalyzeWriteHistories.ts +94 -0
  114. package/src/orchestrate/analyze/writeDocumentUntilReviewPassed.ts +66 -0
  115. package/src/orchestrate/interface/orchestrateInterface.ts +0 -2
  116. package/src/orchestrate/interface/orchestrateInterfaceComponents.ts +2 -3
  117. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +21 -0
  118. package/src/orchestrate/prisma/orchestratePrisma.ts +12 -5
  119. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +4 -13
  120. package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +9 -4
  121. package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +265 -0
  122. package/src/orchestrate/prisma/transformPrismaSchemaHistories.ts +26 -37
  123. package/src/orchestrate/realize/RealizePipe.ts +39 -0
  124. package/src/orchestrate/realize/orchestrateRealize.ts +3 -91
  125. package/src/orchestrate/realize/orchestrateRealizeCoder.ts +60 -25
  126. package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +192 -18
  127. package/src/orchestrate/realize/structures/IAutoBeRealizeCompile.ts +34 -0
  128. package/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.ts +2 -0
  129. package/src/orchestrate/realize/transformRealizeCoderHistories.ts +58 -34
  130. package/src/orchestrate/realize/writeCodeUntilCompilePassed.ts +178 -0
  131. package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +5 -4
  132. package/src/orchestrate/test/compile/getTestScenarioArtifacts.ts +7 -2
  133. package/src/orchestrate/test/orchestrateTest.ts +14 -12
  134. package/src/orchestrate/test/orchestrateTestCorrect.ts +10 -9
  135. package/src/orchestrate/test/orchestrateTestWrite.ts +33 -27
  136. package/src/structures/IAutoBeProps.ts +10 -7
  137. package/src/utils/pipe.ts +39 -0
  138. package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.d.ts +0 -20
  139. package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js +0 -735
  140. package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js.map +0 -1
  141. package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.d.ts +0 -15
  142. package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js +0 -44
  143. package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js.map +0 -1
  144. package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +0 -1
  145. package/src/orchestrate/analyze/AutoBeAnalyzeAgent.ts +0 -219
  146. package/src/orchestrate/analyze/AutoBeAnalyzeReviewer.ts +0 -62
  147. package/src/orchestrate/prisma/orchestratePrismaSchema.ts +0 -157
@@ -0,0 +1,561 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.orchestrateAnalyzeComposer = void 0;
40
+ const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
41
+ const core_1 = require("@agentica/core");
42
+ const typia_1 = __importDefault(require("typia"));
43
+ const uuid_1 = require("uuid");
44
+ const assertSchemaModel_1 = require("../../context/assertSchemaModel");
45
+ const enforceToolCall_1 = require("../../utils/enforceToolCall");
46
+ const orchestrateAnalyzeComposer = (ctx, pointer) => {
47
+ var _a;
48
+ const controller = createController({
49
+ model: ctx.model,
50
+ execute: new AutoBeAnalyzeComposerApplication(),
51
+ build: (value) => {
52
+ pointer.value = value;
53
+ },
54
+ });
55
+ const agent = new core_1.MicroAgentica({
56
+ model: ctx.model,
57
+ vendor: ctx.vendor,
58
+ controllers: [controller],
59
+ config: {
60
+ locale: (_a = ctx.config) === null || _a === void 0 ? void 0 : _a.locale,
61
+ executor: {
62
+ describe: null,
63
+ },
64
+ },
65
+ histories: [
66
+ ...ctx
67
+ .histories()
68
+ .filter((h) => h.type === "userMessage" || h.type === "assistantMessage"),
69
+ {
70
+ id: (0, uuid_1.v4)(),
71
+ type: "systemMessage",
72
+ text: "# Overview\n\n- You are the agent that determines the form of the entire document.\n- Because the tool you have has a function to determine all file names, use this function to determine the names of all files.\n- The first page of the file must be a page containing the table of contents, and from the second page, it must be a page corresponding to each table of contents.\n- Please clarify that the name of the table of contents page is the table of contents, such as `toc` or `table of content`.\n- Each document must begin with a number in turn, such as `00`, `01`, `02`, `03`.\n- Do not include database schema document.\n\n\n# \uD83D\uDCC4 Page Count System Prompt\n\nYou are responsible for determining the appropriate number of pages (documents) to generate.\n\n## Rules:\n\n1. **If the user explicitly requests a number of pages**, use that number *exactly*.\n2. **If the user does not specify a number**, determine a reasonable number of pages that satisfies the user's intent and scope.\n3. The final number of pages **must always match** the length of the `files` array.\n4. The total number of pages **must be greater than 1**.\n5. Always include a **Table of Contents** as one of the pages.\n6. \u2705 Example:\n\n * If the user asks for **3 pages**, then the total should be **4 pages**, including the Table of Contents.\n\n## Summary:\n\n> Total pages = (user-specified page count OR inferred appropriate count) + 1 (Table of Contents)\n\nDo **not** forget to include the Table of Contents when calculating the total number of documents." /* AutoBeSystemPromptConstant.ANALYZE_PLANNER */,
73
+ created_at: new Date().toISOString(),
74
+ },
75
+ ],
76
+ });
77
+ (0, enforceToolCall_1.enforceToolCall)(agent);
78
+ return agent;
79
+ };
80
+ exports.orchestrateAnalyzeComposer = orchestrateAnalyzeComposer;
81
+ class AutoBeAnalyzeComposerApplication {
82
+ /**
83
+ * Compose project structure with roles and files.
84
+ *
85
+ * Design a list of roles and initial documents that you need to create for
86
+ * that requirement. Roles define team member responsibilities, while files
87
+ * define the documentation structure. These are managed separately. If you
88
+ * determine from the conversation that the user's requirements have not been
89
+ * fully gathered, you must stop the analysis and continue collecting the
90
+ * remaining requirements. In this case, you do not need to generate any files
91
+ * or roles. Simply pass an empty array to `input.files` and `input.roles`.
92
+ *
93
+ * @param input Prefix, roles, and files
94
+ * @returns
95
+ */
96
+ compose(input) {
97
+ return input;
98
+ }
99
+ }
100
+ function createController(props) {
101
+ (0, assertSchemaModel_1.assertSchemaModel)(props.model);
102
+ const application = collection[props.model];
103
+ return {
104
+ protocol: "class",
105
+ name: "Compose",
106
+ application,
107
+ execute: {
108
+ compose: (input) => {
109
+ props.build(input);
110
+ return props.execute.compose(input);
111
+ },
112
+ },
113
+ };
114
+ }
115
+ const claude = {
116
+ model: "claude",
117
+ options: {
118
+ reference: true,
119
+ separate: null
120
+ },
121
+ functions: [
122
+ {
123
+ name: "compose",
124
+ parameters: {
125
+ description: " Prefix, roles, and files\n\n------------------------------\n\nCurrent Type: {@link IComposeInput}",
126
+ type: "object",
127
+ properties: {
128
+ reason: {
129
+ description: "Reason for the analysis and composition of the project structure.",
130
+ type: "string"
131
+ },
132
+ prefix: {
133
+ description: "Prefix for file names and all prisma schema files, table, interface, and\nvariable names.",
134
+ type: "string"
135
+ },
136
+ roles: {
137
+ description: "Roles to be assigned for the project",
138
+ type: "array",
139
+ items: {
140
+ $ref: "#/$defs/AutoBeAnalyzeRole"
141
+ }
142
+ },
143
+ page: {
144
+ description: "If the user has requested a specific number of pages, enter that number.\nOtherwise, provide an appropriate number of documents needed to meet the\nuser's requirements. This number must always match the length of the files\nproperty, must be greater than 1, and must include the table of contents.\nFor example, if the user requests 3 pages, the total should be 4, including\nthe table of contents.",
145
+ type: "number"
146
+ },
147
+ files: {
148
+ description: "# Document files to be generated\n\nFile name must be English and it must contain the numbering and prefix.\n\nThese files represent business documentation that may include:\n\n- Business requirements and functional specifications\n- User journey mapping and use case scenarios\n- Business rules and workflow definitions\n- Service architecture and system design overview\n- Data flow and integration requirements\n- User roles and permission matrix\n- API endpoint specifications and contracts\n- Business logic and validation rules\n\nGenerate files based on actual requirements gathered from conversation. Do\nnot create unnecessary documentation - only generate what is needed to\nproperly define the business requirements and system specifications.\n\n# Page Length Rules\n\nThe number of documents must match the user's request, excluding the table\nof contents. For example, if the user requests 3 pages, a total of 4\ndocuments should be generated, including the table of contents. If the user\ndoes not specify a number, generate a sufficient number of documents to\nadequately support the service.",
149
+ type: "array",
150
+ items: {
151
+ $ref: "#/$defs/PickIFilereasonfilename"
152
+ }
153
+ }
154
+ },
155
+ required: [
156
+ "reason",
157
+ "prefix",
158
+ "roles",
159
+ "page",
160
+ "files"
161
+ ],
162
+ additionalProperties: false,
163
+ $defs: {
164
+ AutoBeAnalyzeRole: {
165
+ type: "object",
166
+ properties: {
167
+ name: {
168
+ description: "Role name representing user types that can authenticate via API. These are\nuser roles that can register and login to the service. This will be used as\nreference when creating Prisma schema for user authentication.",
169
+ type: "string"
170
+ },
171
+ description: {
172
+ description: "Description of what this user role can do in the system. Describes the\npermissions and capabilities of this authenticated user type.",
173
+ type: "string"
174
+ }
175
+ },
176
+ required: [
177
+ "name",
178
+ "description"
179
+ ]
180
+ },
181
+ PickIFilereasonfilename: {
182
+ description: "From T, pick a set of properties whose keys are in the union K",
183
+ type: "object",
184
+ properties: {
185
+ reason: {
186
+ description: "Describe briefly why you made this document, and if you have any plans for\nthe next one.",
187
+ type: "string"
188
+ },
189
+ filename: {
190
+ description: "Filename to generate or overwrite.",
191
+ type: "string",
192
+ pattern: "((.*)\\.md)$"
193
+ }
194
+ },
195
+ required: [
196
+ "reason",
197
+ "filename"
198
+ ]
199
+ },
200
+ IComposeInput: {
201
+ type: "object",
202
+ properties: {
203
+ reason: {
204
+ description: "Reason for the analysis and composition of the project structure.",
205
+ type: "string"
206
+ },
207
+ prefix: {
208
+ description: "Prefix for file names and all prisma schema files, table, interface, and\nvariable names.",
209
+ type: "string"
210
+ },
211
+ roles: {
212
+ description: "Roles to be assigned for the project",
213
+ type: "array",
214
+ items: {
215
+ $ref: "#/$defs/AutoBeAnalyzeRole"
216
+ }
217
+ },
218
+ page: {
219
+ description: "If the user has requested a specific number of pages, enter that number.\nOtherwise, provide an appropriate number of documents needed to meet the\nuser's requirements. This number must always match the length of the files\nproperty, must be greater than 1, and must include the table of contents.\nFor example, if the user requests 3 pages, the total should be 4, including\nthe table of contents.",
220
+ type: "number"
221
+ },
222
+ files: {
223
+ description: "# Document files to be generated\n\nFile name must be English and it must contain the numbering and prefix.\n\nThese files represent business documentation that may include:\n\n- Business requirements and functional specifications\n- User journey mapping and use case scenarios\n- Business rules and workflow definitions\n- Service architecture and system design overview\n- Data flow and integration requirements\n- User roles and permission matrix\n- API endpoint specifications and contracts\n- Business logic and validation rules\n\nGenerate files based on actual requirements gathered from conversation. Do\nnot create unnecessary documentation - only generate what is needed to\nproperly define the business requirements and system specifications.\n\n# Page Length Rules\n\nThe number of documents must match the user's request, excluding the table\nof contents. For example, if the user requests 3 pages, a total of 4\ndocuments should be generated, including the table of contents. If the user\ndoes not specify a number, generate a sufficient number of documents to\nadequately support the service.",
224
+ type: "array",
225
+ items: {
226
+ $ref: "#/$defs/PickIFilereasonfilename"
227
+ }
228
+ }
229
+ },
230
+ required: [
231
+ "reason",
232
+ "prefix",
233
+ "roles",
234
+ "page",
235
+ "files"
236
+ ]
237
+ }
238
+ }
239
+ },
240
+ output: {
241
+ $ref: "#/$defs/IComposeInput"
242
+ },
243
+ description: "Compose project structure with roles and files.\n\nDesign a list of roles and initial documents that you need to create for\nthat requirement. Roles define team member responsibilities, while files\ndefine the documentation structure. These are managed separately. If you\ndetermine from the conversation that the user's requirements have not been\nfully gathered, you must stop the analysis and continue collecting the\nremaining requirements. In this case, you do not need to generate any files\nor roles. Simply pass an empty array to `input.files` and `input.roles`.",
244
+ validate: (() => { const _io0 = input => "string" === typeof input.reason && "string" === typeof input.prefix && (Array.isArray(input.roles) && input.roles.every(elem => "object" === typeof elem && null !== elem && _io1(elem))) && "number" === typeof input.page && (Array.isArray(input.files) && input.files.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io1 = input => "string" === typeof input.name && "string" === typeof input.description; const _io2 = input => "string" === typeof input.reason && ("string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename)); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
245
+ path: _path + ".reason",
246
+ expected: "string",
247
+ value: input.reason
248
+ }), "string" === typeof input.prefix || _report(_exceptionable, {
249
+ path: _path + ".prefix",
250
+ expected: "string",
251
+ value: input.prefix
252
+ }), (Array.isArray(input.roles) || _report(_exceptionable, {
253
+ path: _path + ".roles",
254
+ expected: "Array<AutoBeAnalyzeRole>",
255
+ value: input.roles
256
+ })) && input.roles.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
257
+ path: _path + ".roles[" + _index3 + "]",
258
+ expected: "AutoBeAnalyzeRole",
259
+ value: elem
260
+ })) && _vo1(elem, _path + ".roles[" + _index3 + "]", true && _exceptionable) || _report(_exceptionable, {
261
+ path: _path + ".roles[" + _index3 + "]",
262
+ expected: "AutoBeAnalyzeRole",
263
+ value: elem
264
+ })).every(flag => flag) || _report(_exceptionable, {
265
+ path: _path + ".roles",
266
+ expected: "Array<AutoBeAnalyzeRole>",
267
+ value: input.roles
268
+ }), "number" === typeof input.page || _report(_exceptionable, {
269
+ path: _path + ".page",
270
+ expected: "number",
271
+ value: input.page
272
+ }), (Array.isArray(input.files) || _report(_exceptionable, {
273
+ path: _path + ".files",
274
+ expected: "Array<Pick<IFile, \"reason\" | \"filename\">>",
275
+ value: input.files
276
+ })) && input.files.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
277
+ path: _path + ".files[" + _index4 + "]",
278
+ expected: "Pick<IFile, \"reason\" | \"filename\">",
279
+ value: elem
280
+ })) && _vo2(elem, _path + ".files[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
281
+ path: _path + ".files[" + _index4 + "]",
282
+ expected: "Pick<IFile, \"reason\" | \"filename\">",
283
+ value: elem
284
+ })).every(flag => flag) || _report(_exceptionable, {
285
+ path: _path + ".files",
286
+ expected: "Array<Pick<IFile, \"reason\" | \"filename\">>",
287
+ value: input.files
288
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
289
+ path: _path + ".name",
290
+ expected: "string",
291
+ value: input.name
292
+ }), "string" === typeof input.description || _report(_exceptionable, {
293
+ path: _path + ".description",
294
+ expected: "string",
295
+ value: input.description
296
+ })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
297
+ path: _path + ".reason",
298
+ expected: "string",
299
+ value: input.reason
300
+ }), "string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename) || _report(_exceptionable, {
301
+ path: _path + ".filename",
302
+ expected: "`${string}.md`",
303
+ value: input.filename
304
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
305
+ if (false === __is(input)) {
306
+ errors = [];
307
+ _report = __typia_transform__validateReport._validateReport(errors);
308
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
309
+ path: _path + "",
310
+ expected: "IComposeInput",
311
+ value: input
312
+ })) && _vo0(input, _path + "", true) || _report(true, {
313
+ path: _path + "",
314
+ expected: "IComposeInput",
315
+ value: input
316
+ }))(input, "$input", true);
317
+ const success = 0 === errors.length;
318
+ return success ? {
319
+ success,
320
+ data: input
321
+ } : {
322
+ success,
323
+ errors,
324
+ data: input
325
+ };
326
+ }
327
+ return {
328
+ success: true,
329
+ data: input
330
+ };
331
+ }; })()
332
+ }
333
+ ]
334
+ };
335
+ const collection = {
336
+ chatgpt: {
337
+ model: "chatgpt",
338
+ options: {
339
+ reference: true,
340
+ strict: false,
341
+ separate: null
342
+ },
343
+ functions: [
344
+ {
345
+ name: "compose",
346
+ parameters: {
347
+ description: " Prefix, roles, and files\n\n------------------------------\n\nCurrent Type: {@link IComposeInput}",
348
+ type: "object",
349
+ properties: {
350
+ reason: {
351
+ description: "Reason for the analysis and composition of the project structure.",
352
+ type: "string"
353
+ },
354
+ prefix: {
355
+ description: "Prefix for file names and all prisma schema files, table, interface, and\nvariable names.",
356
+ type: "string"
357
+ },
358
+ roles: {
359
+ description: "Roles to be assigned for the project",
360
+ type: "array",
361
+ items: {
362
+ $ref: "#/$defs/AutoBeAnalyzeRole"
363
+ }
364
+ },
365
+ page: {
366
+ description: "If the user has requested a specific number of pages, enter that number.\nOtherwise, provide an appropriate number of documents needed to meet the\nuser's requirements. This number must always match the length of the files\nproperty, must be greater than 1, and must include the table of contents.\nFor example, if the user requests 3 pages, the total should be 4, including\nthe table of contents.",
367
+ type: "number"
368
+ },
369
+ files: {
370
+ description: "# Document files to be generated\n\nFile name must be English and it must contain the numbering and prefix.\n\nThese files represent business documentation that may include:\n\n- Business requirements and functional specifications\n- User journey mapping and use case scenarios\n- Business rules and workflow definitions\n- Service architecture and system design overview\n- Data flow and integration requirements\n- User roles and permission matrix\n- API endpoint specifications and contracts\n- Business logic and validation rules\n\nGenerate files based on actual requirements gathered from conversation. Do\nnot create unnecessary documentation - only generate what is needed to\nproperly define the business requirements and system specifications.\n\n# Page Length Rules\n\nThe number of documents must match the user's request, excluding the table\nof contents. For example, if the user requests 3 pages, a total of 4\ndocuments should be generated, including the table of contents. If the user\ndoes not specify a number, generate a sufficient number of documents to\nadequately support the service.",
371
+ type: "array",
372
+ items: {
373
+ $ref: "#/$defs/PickIFilereasonfilename"
374
+ }
375
+ }
376
+ },
377
+ required: [
378
+ "reason",
379
+ "prefix",
380
+ "roles",
381
+ "page",
382
+ "files"
383
+ ],
384
+ additionalProperties: false,
385
+ $defs: {
386
+ AutoBeAnalyzeRole: {
387
+ type: "object",
388
+ properties: {
389
+ name: {
390
+ description: "Role name representing user types that can authenticate via API. These are\nuser roles that can register and login to the service. This will be used as\nreference when creating Prisma schema for user authentication.",
391
+ type: "string"
392
+ },
393
+ description: {
394
+ description: "Description of what this user role can do in the system. Describes the\npermissions and capabilities of this authenticated user type.",
395
+ type: "string"
396
+ }
397
+ },
398
+ required: [
399
+ "name",
400
+ "description"
401
+ ]
402
+ },
403
+ PickIFilereasonfilename: {
404
+ description: "From T, pick a set of properties whose keys are in the union K",
405
+ type: "object",
406
+ properties: {
407
+ reason: {
408
+ description: "Describe briefly why you made this document, and if you have any plans for\nthe next one.",
409
+ type: "string"
410
+ },
411
+ filename: {
412
+ description: "Filename to generate or overwrite.\n\n\n@pattern ((.*)\\.md)$",
413
+ type: "string"
414
+ }
415
+ },
416
+ required: [
417
+ "reason",
418
+ "filename"
419
+ ]
420
+ },
421
+ IComposeInput: {
422
+ type: "object",
423
+ properties: {
424
+ reason: {
425
+ description: "Reason for the analysis and composition of the project structure.",
426
+ type: "string"
427
+ },
428
+ prefix: {
429
+ description: "Prefix for file names and all prisma schema files, table, interface, and\nvariable names.",
430
+ type: "string"
431
+ },
432
+ roles: {
433
+ description: "Roles to be assigned for the project",
434
+ type: "array",
435
+ items: {
436
+ $ref: "#/$defs/AutoBeAnalyzeRole"
437
+ }
438
+ },
439
+ page: {
440
+ description: "If the user has requested a specific number of pages, enter that number.\nOtherwise, provide an appropriate number of documents needed to meet the\nuser's requirements. This number must always match the length of the files\nproperty, must be greater than 1, and must include the table of contents.\nFor example, if the user requests 3 pages, the total should be 4, including\nthe table of contents.",
441
+ type: "number"
442
+ },
443
+ files: {
444
+ description: "# Document files to be generated\n\nFile name must be English and it must contain the numbering and prefix.\n\nThese files represent business documentation that may include:\n\n- Business requirements and functional specifications\n- User journey mapping and use case scenarios\n- Business rules and workflow definitions\n- Service architecture and system design overview\n- Data flow and integration requirements\n- User roles and permission matrix\n- API endpoint specifications and contracts\n- Business logic and validation rules\n\nGenerate files based on actual requirements gathered from conversation. Do\nnot create unnecessary documentation - only generate what is needed to\nproperly define the business requirements and system specifications.\n\n# Page Length Rules\n\nThe number of documents must match the user's request, excluding the table\nof contents. For example, if the user requests 3 pages, a total of 4\ndocuments should be generated, including the table of contents. If the user\ndoes not specify a number, generate a sufficient number of documents to\nadequately support the service.",
445
+ type: "array",
446
+ items: {
447
+ $ref: "#/$defs/PickIFilereasonfilename"
448
+ }
449
+ }
450
+ },
451
+ required: [
452
+ "reason",
453
+ "prefix",
454
+ "roles",
455
+ "page",
456
+ "files"
457
+ ]
458
+ }
459
+ }
460
+ },
461
+ output: {
462
+ $ref: "#/$defs/IComposeInput"
463
+ },
464
+ description: "Compose project structure with roles and files.\n\nDesign a list of roles and initial documents that you need to create for\nthat requirement. Roles define team member responsibilities, while files\ndefine the documentation structure. These are managed separately. If you\ndetermine from the conversation that the user's requirements have not been\nfully gathered, you must stop the analysis and continue collecting the\nremaining requirements. In this case, you do not need to generate any files\nor roles. Simply pass an empty array to `input.files` and `input.roles`.",
465
+ validate: (() => { const _io0 = input => "string" === typeof input.reason && "string" === typeof input.prefix && (Array.isArray(input.roles) && input.roles.every(elem => "object" === typeof elem && null !== elem && _io1(elem))) && "number" === typeof input.page && (Array.isArray(input.files) && input.files.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io1 = input => "string" === typeof input.name && "string" === typeof input.description; const _io2 = input => "string" === typeof input.reason && ("string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename)); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
466
+ path: _path + ".reason",
467
+ expected: "string",
468
+ value: input.reason
469
+ }), "string" === typeof input.prefix || _report(_exceptionable, {
470
+ path: _path + ".prefix",
471
+ expected: "string",
472
+ value: input.prefix
473
+ }), (Array.isArray(input.roles) || _report(_exceptionable, {
474
+ path: _path + ".roles",
475
+ expected: "Array<AutoBeAnalyzeRole>",
476
+ value: input.roles
477
+ })) && input.roles.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
478
+ path: _path + ".roles[" + _index3 + "]",
479
+ expected: "AutoBeAnalyzeRole",
480
+ value: elem
481
+ })) && _vo1(elem, _path + ".roles[" + _index3 + "]", true && _exceptionable) || _report(_exceptionable, {
482
+ path: _path + ".roles[" + _index3 + "]",
483
+ expected: "AutoBeAnalyzeRole",
484
+ value: elem
485
+ })).every(flag => flag) || _report(_exceptionable, {
486
+ path: _path + ".roles",
487
+ expected: "Array<AutoBeAnalyzeRole>",
488
+ value: input.roles
489
+ }), "number" === typeof input.page || _report(_exceptionable, {
490
+ path: _path + ".page",
491
+ expected: "number",
492
+ value: input.page
493
+ }), (Array.isArray(input.files) || _report(_exceptionable, {
494
+ path: _path + ".files",
495
+ expected: "Array<Pick<IFile, \"reason\" | \"filename\">>",
496
+ value: input.files
497
+ })) && input.files.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
498
+ path: _path + ".files[" + _index4 + "]",
499
+ expected: "Pick<IFile, \"reason\" | \"filename\">",
500
+ value: elem
501
+ })) && _vo2(elem, _path + ".files[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
502
+ path: _path + ".files[" + _index4 + "]",
503
+ expected: "Pick<IFile, \"reason\" | \"filename\">",
504
+ value: elem
505
+ })).every(flag => flag) || _report(_exceptionable, {
506
+ path: _path + ".files",
507
+ expected: "Array<Pick<IFile, \"reason\" | \"filename\">>",
508
+ value: input.files
509
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
510
+ path: _path + ".name",
511
+ expected: "string",
512
+ value: input.name
513
+ }), "string" === typeof input.description || _report(_exceptionable, {
514
+ path: _path + ".description",
515
+ expected: "string",
516
+ value: input.description
517
+ })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.reason || _report(_exceptionable, {
518
+ path: _path + ".reason",
519
+ expected: "string",
520
+ value: input.reason
521
+ }), "string" === typeof input.filename && RegExp(/(.*)\.md$/).test(input.filename) || _report(_exceptionable, {
522
+ path: _path + ".filename",
523
+ expected: "`${string}.md`",
524
+ value: input.filename
525
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
526
+ if (false === __is(input)) {
527
+ errors = [];
528
+ _report = __typia_transform__validateReport._validateReport(errors);
529
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
530
+ path: _path + "",
531
+ expected: "IComposeInput",
532
+ value: input
533
+ })) && _vo0(input, _path + "", true) || _report(true, {
534
+ path: _path + "",
535
+ expected: "IComposeInput",
536
+ value: input
537
+ }))(input, "$input", true);
538
+ const success = 0 === errors.length;
539
+ return success ? {
540
+ success,
541
+ data: input
542
+ } : {
543
+ success,
544
+ errors,
545
+ data: input
546
+ };
547
+ }
548
+ return {
549
+ success: true,
550
+ data: input
551
+ };
552
+ }; })()
553
+ }
554
+ ]
555
+ },
556
+ claude,
557
+ llama: claude,
558
+ deepseek: claude,
559
+ "3.1": claude,
560
+ };
561
+ //# sourceMappingURL=orchestrateAnalyzeComposer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrateAnalyzeComposer.js","sourceRoot":"","sources":["../../../src/orchestrate/analyze/orchestrateAnalyzeComposer.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,6 @@
1
+ import { ILlmSchema } from "@samchon/openapi";
2
+ import { AutoBeContext } from "../../context/AutoBeContext";
3
+ export declare const orchestrateAnalyzeReviewer: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, input: {
4
+ /** Total file names */
5
+ files: Record<string, string>;
6
+ }) => Promise<string | null>;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.orchestrateAnalyzeReviewer = void 0;
13
+ const core_1 = require("@agentica/core");
14
+ const backoffRetry_1 = require("../../utils/backoffRetry");
15
+ const enforceToolCall_1 = require("../../utils/enforceToolCall");
16
+ const transformAnalyzeReviewerHistories_1 = require("./transformAnalyzeReviewerHistories");
17
+ const orchestrateAnalyzeReviewer = (ctx, input) => __awaiter(void 0, void 0, void 0, function* () {
18
+ var _a, _b, _c;
19
+ const agent = new core_1.MicroAgentica({
20
+ model: ctx.model,
21
+ vendor: ctx.vendor,
22
+ controllers: [],
23
+ config: {
24
+ locale: (_a = ctx.config) === null || _a === void 0 ? void 0 : _a.locale,
25
+ backoffStrategy: backoffRetry_1.randomBackoffStrategy,
26
+ executor: {
27
+ describe: null,
28
+ },
29
+ },
30
+ histories: [...(0, transformAnalyzeReviewerHistories_1.transformAnalyzeReviewerHistories)(input)],
31
+ });
32
+ (0, enforceToolCall_1.enforceToolCall)(agent);
33
+ const command = `proceed with the review of these files only.`;
34
+ const histories = yield agent.conversate(command).finally(() => {
35
+ const tokenUsage = agent.getTokenUsage();
36
+ ctx.usage().record(tokenUsage, ["analyze"]);
37
+ });
38
+ return (_c = (_b = histories.find((h) => h.type === "assistantMessage")) === null || _b === void 0 ? void 0 : _b.text) !== null && _c !== void 0 ? _c : null;
39
+ });
40
+ exports.orchestrateAnalyzeReviewer = orchestrateAnalyzeReviewer;
41
+ //# sourceMappingURL=orchestrateAnalyzeReviewer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrateAnalyzeReviewer.js","sourceRoot":"","sources":["../../../src/orchestrate/analyze/orchestrateAnalyzeReviewer.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAA+C;AAI/C,2DAAiE;AACjE,iEAA8D;AAC9D,2FAAwF;AAEjF,MAAM,0BAA0B,GAAG,CAGxC,GAAyB,EACzB,KAGC,EACuB,EAAE;;IAC1B,MAAM,KAAK,GAAG,IAAI,oBAAa,CAAC;QAC9B,KAAK,EAAE,GAAG,CAAC,KAAK;QAChB,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,WAAW,EAAE,EAAE;QACf,MAAM,EAAE;YACN,MAAM,EAAE,MAAA,GAAG,CAAC,MAAM,0CAAE,MAAM;YAC1B,eAAe,EAAE,oCAAqB;YACtC,QAAQ,EAAE;gBACR,QAAQ,EAAE,IAAI;aACf;SACF;QACD,SAAS,EAAE,CAAC,GAAG,IAAA,qEAAiC,EAAC,KAAK,CAAC,CAAC;KACzD,CAAC,CAAC;IACH,IAAA,iCAAe,EAAC,KAAK,CAAC,CAAC;IAEvB,MAAM,OAAO,GAAG,8CAAuD,CAAC;IACxE,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE;QAC7D,MAAM,UAAU,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;QACzC,GAAG,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;IACH,OAAO,MAAA,MAAA,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,kBAAkB,CAAC,0CAAE,IAAI,mCAAI,IAAI,CAAC;AAC5E,CAAC,CAAA,CAAC;AA9BW,QAAA,0BAA0B,8BA8BrC"}
@@ -0,0 +1,14 @@
1
+ import { MicroAgentica } from "@agentica/core";
2
+ import { ILlmSchema } from "@samchon/openapi";
3
+ import { IPointer } from "tstl";
4
+ import { AutoBeContext } from "../../context/AutoBeContext";
5
+ import { IFile } from "./AutoBeAnalyzeFileSystem";
6
+ import { AutoBeAnalyzePointer } from "./AutoBeAnalyzePointer";
7
+ import { AutoBeAnalyzeRole } from "./AutoBeAnalyzeRole";
8
+ export declare const orchestrateAnalyzeWrite: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, input: {
9
+ /** Total file names */
10
+ totalFiles: Pick<IFile, "filename" | "reason">[];
11
+ targetFile: string;
12
+ roles: AutoBeAnalyzeRole[];
13
+ review: string | null;
14
+ }, pointer: AutoBeAnalyzePointer, isAborted: IPointer<boolean>) => MicroAgentica<Model>;