@autobe/agent 0.0.0 → 0.3.9

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 (166) hide show
  1. package/LICENSE +21 -21
  2. package/lib/AutoBeAgent.d.ts +9 -7
  3. package/lib/AutoBeAgent.js +106 -14
  4. package/lib/AutoBeAgent.js.map +1 -1
  5. package/lib/analyze/AnalyzeAgent.d.ts +24 -0
  6. package/lib/analyze/AnalyzeAgent.js +817 -0
  7. package/lib/analyze/AnalyzeAgent.js.map +1 -0
  8. package/lib/analyze/CreateReviewerAgent.d.ts +16 -0
  9. package/lib/analyze/CreateReviewerAgent.js +97 -0
  10. package/lib/analyze/CreateReviewerAgent.js.map +1 -0
  11. package/lib/analyze/Planning.d.ts +63 -0
  12. package/lib/{orchestrate/orchestratePrisma.js → analyze/Planning.js} +28 -11
  13. package/lib/analyze/Planning.js.map +1 -0
  14. package/lib/constants/AutoBeSystemPromptConstant.d.ts +14 -0
  15. package/lib/constants/AutoBeSystemPromptConstant.js +4 -0
  16. package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -0
  17. package/lib/context/AutoBeContext.d.ts +7 -3
  18. package/lib/context/IAutoBeApplication.d.ts +72 -32
  19. package/lib/context/IAutoBeApplicationProps.d.ts +22 -2
  20. package/lib/context/IAutoBeApplicationResult.d.ts +0 -1
  21. package/lib/context/assertSchemaModel.d.ts +2 -0
  22. package/lib/context/assertSchemaModel.js +15 -0
  23. package/lib/context/assertSchemaModel.js.map +1 -0
  24. package/lib/{internal/transformAgenticaHistory.d.ts → factory/createAgenticaHistory.d.ts} +1 -1
  25. package/lib/{internal/transformAgenticaHistory.js → factory/createAgenticaHistory.js} +3 -4
  26. package/lib/factory/createAgenticaHistory.js.map +1 -0
  27. package/lib/factory/createAutoBeApplication.js +1195 -0
  28. package/lib/factory/createAutoBeApplication.js.map +1 -0
  29. package/lib/factory/createAutoBeState.js.map +1 -0
  30. package/lib/factory/index.d.ts +2 -0
  31. package/lib/factory/index.js +19 -0
  32. package/lib/factory/index.js.map +1 -0
  33. package/lib/factory/invertOpenApiDocument.d.ts +3 -0
  34. package/lib/factory/invertOpenApiDocument.js +51 -0
  35. package/lib/factory/invertOpenApiDocument.js.map +1 -0
  36. package/lib/index.d.ts +3 -3
  37. package/lib/index.js +4 -4
  38. package/lib/index.js.map +1 -1
  39. package/lib/index.mjs +5455 -547
  40. package/lib/index.mjs.map +1 -1
  41. package/lib/orchestrate/facade/transformFacadeStateMessage.d.ts +2 -0
  42. package/lib/orchestrate/facade/transformFacadeStateMessage.js +46 -0
  43. package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -0
  44. package/lib/orchestrate/index.d.ts +2 -2
  45. package/lib/orchestrate/index.js +2 -2
  46. package/lib/orchestrate/index.js.map +1 -1
  47. package/lib/orchestrate/interface/OpenApiEndpointComparator.d.ts +5 -0
  48. package/lib/orchestrate/interface/OpenApiEndpointComparator.js +16 -0
  49. package/lib/orchestrate/interface/OpenApiEndpointComparator.js.map +1 -0
  50. package/lib/orchestrate/interface/orchestrateInterface.d.ts +5 -0
  51. package/lib/orchestrate/interface/orchestrateInterface.js +61 -0
  52. package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -0
  53. package/lib/orchestrate/interface/orchestrateInterfaceComponents.d.ts +4 -0
  54. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +702 -0
  55. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +1 -0
  56. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +4 -0
  57. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +452 -0
  58. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -0
  59. package/lib/orchestrate/interface/orchestrateInterfaceOperations.d.ts +4 -0
  60. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +2065 -0
  61. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -0
  62. package/lib/orchestrate/interface/transformInterfaceHistories.d.ts +3 -0
  63. package/lib/orchestrate/interface/transformInterfaceHistories.js +94 -0
  64. package/lib/orchestrate/interface/transformInterfaceHistories.js.map +1 -0
  65. package/lib/orchestrate/orchestrateAnalyze.d.ts +1 -3
  66. package/lib/orchestrate/orchestrateAnalyze.js +60 -6
  67. package/lib/orchestrate/orchestrateAnalyze.js.map +1 -1
  68. package/lib/orchestrate/{orchestratePrisma.d.ts → prisma/orchestratePrisma.d.ts} +3 -6
  69. package/lib/orchestrate/prisma/orchestratePrisma.js +103 -0
  70. package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -0
  71. package/lib/orchestrate/prisma/orchestratePrismaCompiler.d.ts +6 -0
  72. package/lib/orchestrate/prisma/orchestratePrismaCompiler.js +436 -0
  73. package/lib/orchestrate/prisma/orchestratePrismaCompiler.js.map +1 -0
  74. package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +5 -0
  75. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +437 -0
  76. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -0
  77. package/lib/orchestrate/prisma/orchestratePrismaSchema.d.ts +7 -0
  78. package/lib/orchestrate/prisma/orchestratePrismaSchema.js +369 -0
  79. package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -0
  80. package/lib/orchestrate/prisma/transformPrismaCompilerHistories.d.ts +3 -0
  81. package/lib/orchestrate/prisma/transformPrismaCompilerHistories.js +44 -0
  82. package/lib/orchestrate/prisma/transformPrismaCompilerHistories.js.map +1 -0
  83. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.d.ts +3 -0
  84. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js +42 -0
  85. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +1 -0
  86. package/lib/orchestrate/prisma/transformPrismaHistories.d.ts +3 -0
  87. package/lib/orchestrate/prisma/transformPrismaHistories.js +46 -0
  88. package/lib/orchestrate/prisma/transformPrismaHistories.js.map +1 -0
  89. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.d.ts +3 -0
  90. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js +46 -0
  91. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js.map +1 -0
  92. package/lib/structures/IAutoBeConfig.d.ts +4 -4
  93. package/lib/utils/StringUtil.d.ts +4 -0
  94. package/lib/utils/StringUtil.js +43 -0
  95. package/lib/utils/StringUtil.js.map +1 -0
  96. package/lib/utils/divideArray.d.ts +4 -0
  97. package/lib/utils/divideArray.js +19 -0
  98. package/lib/utils/divideArray.js.map +1 -0
  99. package/lib/utils/emplaceMap.d.ts +1 -0
  100. package/lib/utils/emplaceMap.js +13 -0
  101. package/lib/utils/emplaceMap.js.map +1 -0
  102. package/package.json +29 -8
  103. package/src/AutoBeAgent.ts +227 -101
  104. package/src/analyze/AnalyzeAgent.ts +167 -0
  105. package/src/analyze/CreateReviewerAgent.ts +126 -0
  106. package/src/analyze/Planning.ts +75 -0
  107. package/src/constants/AutoBeSystemPromptConstant.ts +15 -0
  108. package/src/context/AutoBeContext.ts +19 -15
  109. package/src/context/AutoBeState.ts +15 -15
  110. package/src/context/AutoBeTokenUsage.ts +3 -3
  111. package/src/context/IAutoBeApplication.ts +112 -72
  112. package/src/context/IAutoBeApplicationProps.ts +27 -6
  113. package/src/context/IAutoBeApplicationResult.ts +3 -4
  114. package/src/context/assertSchemaModel.ts +17 -0
  115. package/src/{internal/transformAgenticaHistory.ts → factory/createAgenticaHistory.ts} +51 -54
  116. package/src/{internal → factory}/createAutoBeApplication.ts +52 -47
  117. package/src/{internal → factory}/createAutoBeState.ts +14 -14
  118. package/src/factory/index.ts +2 -0
  119. package/src/factory/invertOpenApiDocument.ts +63 -0
  120. package/src/index.ts +13 -12
  121. package/src/orchestrate/facade/transformFacadeStateMessage.ts +58 -0
  122. package/src/orchestrate/index.ts +5 -5
  123. package/src/orchestrate/interface/OpenApiEndpointComparator.ts +15 -0
  124. package/src/orchestrate/interface/orchestrateInterface.ts +66 -0
  125. package/src/orchestrate/interface/orchestrateInterfaceComponents.ts +324 -0
  126. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +140 -0
  127. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +247 -0
  128. package/src/orchestrate/interface/transformInterfaceHistories.ts +98 -0
  129. package/src/orchestrate/orchestrateAnalyze.ts +86 -21
  130. package/src/orchestrate/orchestrateRealize.ts +18 -18
  131. package/src/orchestrate/orchestrateTest.ts +18 -18
  132. package/src/orchestrate/prisma/orchestratePrisma.ts +117 -0
  133. package/src/orchestrate/prisma/orchestratePrismaCompiler.ts +194 -0
  134. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +176 -0
  135. package/src/orchestrate/prisma/orchestratePrismaSchema.ts +181 -0
  136. package/src/orchestrate/prisma/transformPrismaCompilerHistories.ts +49 -0
  137. package/src/orchestrate/prisma/transformPrismaComponentsHistories.ts +46 -0
  138. package/src/orchestrate/prisma/transformPrismaHistories.ts +50 -0
  139. package/src/orchestrate/prisma/transformPrismaSchemaHistories.ts +50 -0
  140. package/src/structures/IAutoBeConfig.ts +25 -25
  141. package/src/structures/IAutoBeProps.ts +13 -13
  142. package/src/structures/IAutoBeVendor.ts +3 -3
  143. package/src/utils/StringUtil.ts +45 -0
  144. package/src/utils/divideArray.ts +16 -0
  145. package/src/utils/emplaceMap.ts +14 -0
  146. package/lib/factory/transformRouteDocument.d.ts +0 -3
  147. package/lib/factory/transformRouteDocument.js +0 -50
  148. package/lib/factory/transformRouteDocument.js.map +0 -1
  149. package/lib/internal/createAutoBeApplication.js +0 -1452
  150. package/lib/internal/createAutoBeApplication.js.map +0 -1
  151. package/lib/internal/createAutoBeState.js.map +0 -1
  152. package/lib/internal/transformAgenticaHistory.js.map +0 -1
  153. package/lib/orchestrate/interface/AutoBeInterfaceAgent.d.ts +0 -0
  154. package/lib/orchestrate/interface/AutoBeInterfaceAgent.js +0 -2
  155. package/lib/orchestrate/interface/AutoBeInterfaceAgent.js.map +0 -1
  156. package/lib/orchestrate/orchestrateInterface.d.ts +0 -8
  157. package/lib/orchestrate/orchestrateInterface.js +0 -22
  158. package/lib/orchestrate/orchestrateInterface.js.map +0 -1
  159. package/lib/orchestrate/orchestratePrisma.js.map +0 -1
  160. package/src/factory/transformRouteDocument.ts +0 -49
  161. package/src/orchestrate/interface/AutoBeInterfaceAgent.ts +0 -0
  162. package/src/orchestrate/orchestrateInterface.ts +0 -21
  163. package/src/orchestrate/orchestratePrisma.ts +0 -21
  164. /package/lib/{internal → factory}/createAutoBeApplication.d.ts +0 -0
  165. /package/lib/{internal → factory}/createAutoBeState.d.ts +0 -0
  166. /package/lib/{internal → factory}/createAutoBeState.js +0 -0
@@ -0,0 +1,369 @@
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
+ return new (P || (P = Promise))(function (resolve, reject) {
38
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
42
+ });
43
+ };
44
+ var __importDefault = (this && this.__importDefault) || function (mod) {
45
+ return (mod && mod.__esModule) ? mod : { "default": mod };
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.orchestratePrismaSchemas = orchestratePrismaSchemas;
49
+ const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
50
+ const core_1 = require("@agentica/core");
51
+ const typia_1 = __importDefault(require("typia"));
52
+ const assertSchemaModel_1 = require("../../context/assertSchemaModel");
53
+ const transformPrismaSchemaHistories_1 = require("./transformPrismaSchemaHistories");
54
+ function orchestratePrismaSchemas(ctx, components) {
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ const start = new Date();
57
+ const entireTables = Array.from(new Set(components.flatMap((c) => c.tables)));
58
+ const total = components.reduce((acc, c) => acc + c.tables.length, 0);
59
+ let i = 0;
60
+ return yield Promise.all(components.map((c) => __awaiter(this, void 0, void 0, function* () {
61
+ var _a, _b;
62
+ const result = yield process(ctx, {
63
+ filename: c.filename,
64
+ tables: c.tables,
65
+ entireTables,
66
+ });
67
+ const event = {
68
+ type: "prismaSchemas",
69
+ created_at: start.toISOString(),
70
+ filename: c.filename,
71
+ content: result.content,
72
+ completed: (i += c.tables.length),
73
+ total,
74
+ step: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
75
+ };
76
+ ctx.dispatch(event);
77
+ return event;
78
+ })));
79
+ });
80
+ }
81
+ function process(ctx, component) {
82
+ return __awaiter(this, void 0, void 0, function* () {
83
+ var _a;
84
+ const pointer = {
85
+ value: null,
86
+ };
87
+ const agentica = new core_1.MicroAgentica({
88
+ model: ctx.model,
89
+ vendor: ctx.vendor,
90
+ config: Object.assign({}, ((_a = ctx.config) !== null && _a !== void 0 ? _a : {})),
91
+ histories: (0, transformPrismaSchemaHistories_1.transformPrismaSchemaHistories)(ctx.state()),
92
+ tokenUsage: ctx.usage(),
93
+ controllers: [
94
+ createApplication({
95
+ model: ctx.model,
96
+ build: (next) => {
97
+ pointer.value = next;
98
+ },
99
+ }),
100
+ ],
101
+ });
102
+ agentica.on("request", (event) => __awaiter(this, void 0, void 0, function* () {
103
+ if (event.body.tools) {
104
+ event.body.tool_choice = "required";
105
+ }
106
+ }));
107
+ yield agentica.conversate([
108
+ "Please generate Prisma schema files based on the previous requirement analysis report.",
109
+ "",
110
+ "**Context:**",
111
+ `- Target filename: \`${component.filename}\``,
112
+ `- Tables to implement in this file: \`${component.tables.join("`, `")}\``,
113
+ `- All available tables in the system: \`${component.entireTables.join("`, `")}\``,
114
+ "",
115
+ "**Instructions:**",
116
+ "1. Create comprehensive Prisma schema content for the specified tables",
117
+ "2. Reference the previous requirement analysis to understand business logic and data structures",
118
+ "3. Establish appropriate relationships between tables using the entireTables list as reference",
119
+ "4. Include proper field types, constraints, indexes, and documentation",
120
+ "5. Follow enterprise-level schema design patterns and best practices",
121
+ "6. Ensure cross-table relationships are accurately modeled based on business requirements",
122
+ "",
123
+ "**Key Requirements:**",
124
+ "- Implement only the tables specified for this file",
125
+ "- Create foreign key relationships to tables from entireTables when business logic requires it",
126
+ "- Add comprehensive field documentation and model descriptions",
127
+ "- Include appropriate indexes for performance optimization",
128
+ "- Follow consistent naming conventions and data types",
129
+ ].join("\n"));
130
+ if (pointer.value === null)
131
+ throw new Error("Unreachable code: Prisma Schema not generated");
132
+ return pointer.value;
133
+ });
134
+ }
135
+ function createApplication(props) {
136
+ (0, assertSchemaModel_1.assertSchemaModel)(props.model);
137
+ const application = collection[props.model];
138
+ return {
139
+ protocol: "class",
140
+ name: "Prisma Generator",
141
+ application,
142
+ execute: {
143
+ makePrismaSchemaFiles: (next) => {
144
+ props.build(next);
145
+ },
146
+ },
147
+ };
148
+ }
149
+ const claude = {
150
+ model: "claude",
151
+ options: {
152
+ reference: true,
153
+ separate: null
154
+ },
155
+ functions: [
156
+ {
157
+ name: "makePrismaSchemaFiles",
158
+ parameters: {
159
+ description: " Properties containing the complete set of Prisma schema files\n\n------------------------------\n\nCurrent Type: {@link IMakePrismaSchemaFilesProps}",
160
+ type: "object",
161
+ properties: {
162
+ content: {
163
+ title: "Complete Prisma schema content as a single concatenated string",
164
+ description: "Complete Prisma schema content as a single concatenated string.\n\nContains all schema files organized by domain/functionality with clear file\nseparators. Each file section includes models, relationships, indexes, and\ncomprehensive documentation following enterprise patterns.\n\nContent should be organized following enterprise patterns:\n\n- Main.prisma: Configuration, datasource, and generators\n- Schema-XX-domain.prisma: Domain-specific entity definitions\n- Proper cross-file relationships and dependencies",
165
+ type: "string"
166
+ },
167
+ description: {
168
+ title: "Summary description of the application requirements and business context",
169
+ description: "Summary description of the application requirements and business context.",
170
+ type: "string"
171
+ }
172
+ },
173
+ required: [
174
+ "content",
175
+ "description"
176
+ ],
177
+ additionalProperties: false,
178
+ $defs: {}
179
+ },
180
+ description: "Generates comprehensive Prisma schema files based on detailed requirements\nanalysis.\n\nCreates multiple organized schema files following enterprise patterns\nincluding proper domain separation, relationship modeling, snapshot\npatterns, inheritance, materialized views, and comprehensive documentation.\nThe generated schemas implement best practices for scalability,\nmaintainability, and data integrity.",
181
+ validate: (() => { const _io0 = input => "string" === typeof input.content && "string" === typeof input.description; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.content || _report(_exceptionable, {
182
+ path: _path + ".content",
183
+ expected: "string",
184
+ value: input.content
185
+ }), "string" === typeof input.description || _report(_exceptionable, {
186
+ path: _path + ".description",
187
+ expected: "string",
188
+ value: input.description
189
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
190
+ if (false === __is(input)) {
191
+ errors = [];
192
+ _report = __typia_transform__validateReport._validateReport(errors);
193
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
194
+ path: _path + "",
195
+ expected: "IMakePrismaSchemaFilesProps",
196
+ value: input
197
+ })) && _vo0(input, _path + "", true) || _report(true, {
198
+ path: _path + "",
199
+ expected: "IMakePrismaSchemaFilesProps",
200
+ value: input
201
+ }))(input, "$input", true);
202
+ const success = 0 === errors.length;
203
+ return success ? {
204
+ success,
205
+ data: input
206
+ } : {
207
+ success,
208
+ errors,
209
+ data: input
210
+ };
211
+ }
212
+ return {
213
+ success: true,
214
+ data: input
215
+ };
216
+ }; })()
217
+ }
218
+ ]
219
+ };
220
+ const collection = {
221
+ chatgpt: {
222
+ model: "chatgpt",
223
+ options: {
224
+ reference: true,
225
+ strict: false,
226
+ separate: null
227
+ },
228
+ functions: [
229
+ {
230
+ name: "makePrismaSchemaFiles",
231
+ parameters: {
232
+ description: " Properties containing the complete set of Prisma schema files\n\n------------------------------\n\nCurrent Type: {@link IMakePrismaSchemaFilesProps}",
233
+ type: "object",
234
+ properties: {
235
+ content: {
236
+ title: "Complete Prisma schema content as a single concatenated string",
237
+ description: "Complete Prisma schema content as a single concatenated string.\n\nContains all schema files organized by domain/functionality with clear file\nseparators. Each file section includes models, relationships, indexes, and\ncomprehensive documentation following enterprise patterns.\n\nContent should be organized following enterprise patterns:\n\n- Main.prisma: Configuration, datasource, and generators\n- Schema-XX-domain.prisma: Domain-specific entity definitions\n- Proper cross-file relationships and dependencies",
238
+ type: "string"
239
+ },
240
+ description: {
241
+ title: "Summary description of the application requirements and business context",
242
+ description: "Summary description of the application requirements and business context.",
243
+ type: "string"
244
+ }
245
+ },
246
+ required: [
247
+ "content",
248
+ "description"
249
+ ],
250
+ additionalProperties: false,
251
+ $defs: {}
252
+ },
253
+ description: "Generates comprehensive Prisma schema files based on detailed requirements\nanalysis.\n\nCreates multiple organized schema files following enterprise patterns\nincluding proper domain separation, relationship modeling, snapshot\npatterns, inheritance, materialized views, and comprehensive documentation.\nThe generated schemas implement best practices for scalability,\nmaintainability, and data integrity.",
254
+ validate: (() => { const _io0 = input => "string" === typeof input.content && "string" === typeof input.description; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.content || _report(_exceptionable, {
255
+ path: _path + ".content",
256
+ expected: "string",
257
+ value: input.content
258
+ }), "string" === typeof input.description || _report(_exceptionable, {
259
+ path: _path + ".description",
260
+ expected: "string",
261
+ value: input.description
262
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
263
+ if (false === __is(input)) {
264
+ errors = [];
265
+ _report = __typia_transform__validateReport._validateReport(errors);
266
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
267
+ path: _path + "",
268
+ expected: "IMakePrismaSchemaFilesProps",
269
+ value: input
270
+ })) && _vo0(input, _path + "", true) || _report(true, {
271
+ path: _path + "",
272
+ expected: "IMakePrismaSchemaFilesProps",
273
+ value: input
274
+ }))(input, "$input", true);
275
+ const success = 0 === errors.length;
276
+ return success ? {
277
+ success,
278
+ data: input
279
+ } : {
280
+ success,
281
+ errors,
282
+ data: input
283
+ };
284
+ }
285
+ return {
286
+ success: true,
287
+ data: input
288
+ };
289
+ }; })()
290
+ }
291
+ ]
292
+ },
293
+ claude,
294
+ llama: claude,
295
+ deepseek: claude,
296
+ "3.1": claude,
297
+ "3.0": {
298
+ model: "3.0",
299
+ options: {
300
+ constraint: true,
301
+ recursive: 3,
302
+ separate: null
303
+ },
304
+ functions: [
305
+ {
306
+ name: "makePrismaSchemaFiles",
307
+ parameters: {
308
+ type: "object",
309
+ properties: {
310
+ content: {
311
+ type: "string",
312
+ title: "Complete Prisma schema content as a single concatenated string",
313
+ description: "Complete Prisma schema content as a single concatenated string.\n\nContains all schema files organized by domain/functionality with clear file\nseparators. Each file section includes models, relationships, indexes, and\ncomprehensive documentation following enterprise patterns.\n\nContent should be organized following enterprise patterns:\n\n- Main.prisma: Configuration, datasource, and generators\n- Schema-XX-domain.prisma: Domain-specific entity definitions\n- Proper cross-file relationships and dependencies"
314
+ },
315
+ description: {
316
+ type: "string",
317
+ title: "Summary description of the application requirements and business context",
318
+ description: "Summary description of the application requirements and business context."
319
+ }
320
+ },
321
+ required: [
322
+ "content",
323
+ "description"
324
+ ],
325
+ description: " Properties containing the complete set of Prisma schema files\n\n------------------------------\n\nCurrent Type: {@link IMakePrismaSchemaFilesProps}",
326
+ additionalProperties: false
327
+ },
328
+ description: "Generates comprehensive Prisma schema files based on detailed requirements\nanalysis.\n\nCreates multiple organized schema files following enterprise patterns\nincluding proper domain separation, relationship modeling, snapshot\npatterns, inheritance, materialized views, and comprehensive documentation.\nThe generated schemas implement best practices for scalability,\nmaintainability, and data integrity.",
329
+ validate: (() => { const _io0 = input => "string" === typeof input.content && "string" === typeof input.description; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.content || _report(_exceptionable, {
330
+ path: _path + ".content",
331
+ expected: "string",
332
+ value: input.content
333
+ }), "string" === typeof input.description || _report(_exceptionable, {
334
+ path: _path + ".description",
335
+ expected: "string",
336
+ value: input.description
337
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
338
+ if (false === __is(input)) {
339
+ errors = [];
340
+ _report = __typia_transform__validateReport._validateReport(errors);
341
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
342
+ path: _path + "",
343
+ expected: "IMakePrismaSchemaFilesProps",
344
+ value: input
345
+ })) && _vo0(input, _path + "", true) || _report(true, {
346
+ path: _path + "",
347
+ expected: "IMakePrismaSchemaFilesProps",
348
+ value: input
349
+ }))(input, "$input", true);
350
+ const success = 0 === errors.length;
351
+ return success ? {
352
+ success,
353
+ data: input
354
+ } : {
355
+ success,
356
+ errors,
357
+ data: input
358
+ };
359
+ }
360
+ return {
361
+ success: true,
362
+ data: input
363
+ };
364
+ }; })()
365
+ }
366
+ ]
367
+ },
368
+ };
369
+ //# sourceMappingURL=orchestratePrismaSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestratePrismaSchema.js","sourceRoot":"","sources":["../../../src/orchestrate/prisma/orchestratePrismaSchema.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,3 @@
1
+ import { IAgenticaHistoryJson } from "@agentica/core";
2
+ import { AutoBeState } from "../../context/AutoBeState";
3
+ export declare const transformPrismaCompilerHistories: (state: AutoBeState, files: Record<string, string>) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.transformPrismaCompilerHistories = void 0;
4
+ const transformPrismaCompilerHistories = (state, files) => {
5
+ if (state.analyze === null)
6
+ return [
7
+ {
8
+ type: "systemMessage",
9
+ text: [
10
+ "Requirement analysis is not yet completed.",
11
+ "Don't call any tool function,",
12
+ "but say to process the requirement analysis.",
13
+ ].join(" "),
14
+ },
15
+ ];
16
+ return [
17
+ {
18
+ type: "systemMessage",
19
+ text: "You are a world-class Prisma schema validation and error resolution specialist. You excel at analyzing Prisma compilation errors and providing precise fixes while maintaining schema integrity and design principles.\n\n### Core Principles\n\n- **Never ask for clarification** - Analyze errors and provide direct solutions\n- **Output only corrected schema** - Return Record<string, string> format with fixes applied\n- **Preserve original intent** - Fix errors while maintaining the original design and relationships\n- **Maintain consistency** - Ensure fixes don't break other parts of the schema\n\n### Default Working Language: English\n\n- Use the language specified by user in messages as the working language when explicitly provided\n- All analysis and responses must be in the working language\n- All model/field names must remain in English regardless of working language\n\n### Input Format\n\nYou will receive:\n1. **Original schema files** - Record<string, string> format from Schema Agent\n2. **Compilation errors** - Detailed error messages from Prisma compiler\n3. **Original requirements** - User requirements for context (optional)\n\n### Task: Fix Prisma Compilation Errors\n\nAnalyze compilation errors and provide corrected schema files that resolve all issues while maintaining the original design intent.\n\n### Error Analysis Process\n\n1. **Error Classification**: Categorize each error by type and severity\n2. **Root Cause Analysis**: Identify the underlying cause of each error\n3. **Impact Assessment**: Determine how fixes might affect other parts of the schema\n4. **Solution Design**: Plan fixes that resolve errors while preserving functionality\n5. **Validation**: Ensure fixes don't introduce new errors\n\n### Common Error Types and Solutions\n\n#### Relationship Errors\n- **Missing models**: Create referenced models or update references\n- **Invalid field mappings**: Correct field names and types in @relation\n- **Circular dependencies**: Restructure relationships to avoid cycles\n- **Missing foreign keys**: Add required foreign key fields\n\n#### Type and Constraint Errors\n- **Invalid data types**: Correct to supported Prisma types\n- **Missing constraints**: Add required @id, @unique, or other constraints\n- **Invalid attribute usage**: Fix attribute syntax and placement\n\n#### Naming and Syntax Errors\n- **Reserved keywords**: Rename fields that conflict with Prisma/DB keywords\n- **Invalid identifiers**: Fix naming to follow Prisma conventions\n- **Syntax errors**: Correct Prisma schema syntax\n\n#### Cross-File Reference Errors\n- **Model not found**: Ensure referenced models exist in the correct files\n- **Circular imports**: Restructure file dependencies\n- **Invalid field references**: Update references to match actual field names\n\n### Fix Strategy Guidelines\n\n#### Minimal Changes Principle\n- Make the smallest changes necessary to fix errors\n- Preserve original model structure and relationships\n- Maintain field names and types where possible\n\n#### Consistency Maintenance\n- Ensure naming conventions remain consistent\n- Preserve comment structure and quality\n- Maintain architectural patterns (snapshot-based, etc.)\n\n#### Relationship Integrity\n- Ensure all relationships remain bidirectional where intended\n- Preserve cascade behaviors and constraints\n- Maintain foreign key relationships\n\n### Expected Output Format\n\n```json\n{\n \"main.prisma\": \"// Fixed version with corrected generator/datasource\\ngenerator client {\\n provider = \\\"prisma-client-js\\\"\\n}\\n\\ndatasource db {\\n provider = \\\"postgresql\\\"\\n url = env(\\\"DATABASE_URL\\\")\\n}\",\n \"schema-01-core.prisma\": \"// Fixed version with corrected relationships\\nmodel users {\\n // ... corrected model with fixes applied\\n}\",\n \"schema-02-articles.prisma\": \"// Fixed version with resolved dependencies\\nmodel articles {\\n // ... corrected model with fixes applied\\n}\"\n}\n```\n\n### Validation Checklist\n\nAfter applying fixes, ensure:\n- [ ] All compilation errors are resolved\n- [ ] No new errors are introduced\n- [ ] Relationships remain properly mapped\n- [ ] Foreign keys are correctly defined\n- [ ] Model and field names follow conventions\n- [ ] Comments and documentation are preserved\n- [ ] Cross-file references are valid\n- [ ] Original design intent is maintained\n\n### Error Reporting\n\nIf errors cannot be resolved without significant design changes:\n- Identify the specific errors that require design decisions\n- Suggest alternative approaches\n- Explain the trade-offs of different solutions\n- Provide the best possible fix with clear documentation of changes made" /* AutoBeSystemPromptConstant.PRISMA_COMPILER */,
20
+ },
21
+ {
22
+ type: "assistantMessage",
23
+ text: [
24
+ "Below are the current schema files that failed compilation:",
25
+ "",
26
+ "============================================== CURRENT SCHEMA FILES ==============================================",
27
+ "",
28
+ Object.entries(files)
29
+ .map(([filename, content]) => {
30
+ return [
31
+ `// =============================================================================`,
32
+ `// FILE: ${filename}`,
33
+ `// =============================================================================`,
34
+ content,
35
+ ].join("\n");
36
+ })
37
+ .join("\n\n"),
38
+ "",
39
+ ].join("\n"),
40
+ },
41
+ ];
42
+ };
43
+ exports.transformPrismaCompilerHistories = transformPrismaCompilerHistories;
44
+ //# sourceMappingURL=transformPrismaCompilerHistories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transformPrismaCompilerHistories.js","sourceRoot":"","sources":["../../../src/orchestrate/prisma/transformPrismaCompilerHistories.ts"],"names":[],"mappings":";;;AAKO,MAAM,gCAAgC,GAAG,CAC9C,KAAkB,EAClB,KAA6B,EAG7B,EAAE;IACF,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI;QACxB,OAAO;YACL;gBACE,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE;oBACJ,4CAA4C;oBAC5C,+BAA+B;oBAC/B,8CAA8C;iBAC/C,CAAC,IAAI,CAAC,GAAG,CAAC;aACZ;SACF,CAAC;IACJ,OAAO;QACL;YACE,IAAI,EAAE,eAAe;YACrB,IAAI,2nJAA4C;SACjD;QACD;YACE,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE;gBACJ,6DAA6D;gBAC7D,EAAE;gBACF,oHAAoH;gBACpH,EAAE;gBACF,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;qBAClB,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,EAAE;oBAC3B,OAAO;wBACL,kFAAkF;wBAClF,YAAY,QAAQ,EAAE;wBACtB,kFAAkF;wBAClF,OAAO;qBACR,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACf,CAAC,CAAC;qBACD,IAAI,CAAC,MAAM,CAAC;gBACf,EAAE;aACH,CAAC,IAAI,CAAC,IAAI,CAAC;SACb;KACF,CAAC;AACJ,CAAC,CAAC;AA3CW,QAAA,gCAAgC,oCA2C3C"}
@@ -0,0 +1,3 @@
1
+ import { IAgenticaHistoryJson } from "@agentica/core";
2
+ import { AutoBeState } from "../../context/AutoBeState";
3
+ export declare const transformPrismaComponentsHistories: (state: AutoBeState) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.transformPrismaComponentsHistories = void 0;
4
+ const transformPrismaComponentsHistories = (state) => {
5
+ if (state.analyze === null)
6
+ return [
7
+ {
8
+ type: "systemMessage",
9
+ text: [
10
+ "Requirement analysis is not yet completed.",
11
+ "Don't call any tool function,",
12
+ "but say to process the requirement analysis.",
13
+ ].join(" "),
14
+ },
15
+ ];
16
+ return [
17
+ {
18
+ type: "systemMessage",
19
+ text: "You are a world-class database architecture analyst specializing in domain-driven design and schema organization. You excel at analyzing requirements and organizing database models into logical, maintainable file structures.\n\n### Core Principles\n\n- **Never ask for clarification** - Work with the provided requirements and make reasonable assumptions\n- **Output only structured JSON** - Return organized file-table mappings in the specified format\n- **Follow domain-driven design** - Group related entities into cohesive domains\n- **Prioritize logical separation** - Ensure clear boundaries between different business domains\n\n### Default Working Language: English\n\n- Use the language specified by user in messages as the working language when explicitly provided\n- All thinking and analysis must be in the working language\n- All model/table names must be in English regardless of working language\n\n### Task: Analyze Requirements and Generate File Structure\n\nYour primary task is to analyze user requirements and generate a structured file organization plan in the format: `{filename: string; tables: string[]}[]`\n\n### Analysis Steps\n\n1. **Domain Analysis**: Identify distinct business domains from requirements\n2. **Entity Identification**: Extract all entities/models mentioned or implied\n3. **Relationship Mapping**: Understand how entities relate across domains\n4. **File Organization**: Group related entities into logical files\n5. **Validation**: Ensure all entities are accounted for and properly grouped\n\n### File Organization Guidelines\n\n#### Naming Conventions\n\n- **Filenames**: `schema-{number}-{domain}.prisma` (e.g., `schema-01-core.prisma`, `schema-02-users.prisma`)\n- **Main config**: Always include `main.prisma` for datasource/generator configuration\n- **Domain names**: Use clear, descriptive domain names in snake_case\n\n#### Grouping Strategy\n\n- **Core/Foundation**: Basic entities used across multiple domains (users, organizations)\n- **Domain-specific**: Entities belonging to specific business domains\n- **Cross-cutting**: Entities that span multiple domains (notifications, audit logs)\n- **Utility**: Helper entities (settings, configurations)\n\n#### File Structure Rules\n\n- **Maximum 8-10 models per file** for maintainability\n- **Related entities together**: Keep strongly related models in the same file\n- **Dependency consideration**: Place foundational models in earlier files\n- **Logical progression**: Order files from core to specific domains\n\n### Expected Output Format\n\n```json\n[\n {\n \"filename\": \"main.prisma\",\n \"tables\": []\n },\n {\n \"filename\": \"schema-01-core.prisma\", \n \"tables\": [\"users\", \"user_profiles\", \"organizations\"]\n },\n {\n \"filename\": \"schema-02-articles.prisma\",\n \"tables\": [\"articles\", \"article_snapshots\", \"article_comments\"]\n }\n]\n```\n\n### Quality Checklist\n\nBefore outputting, ensure:\n- [ ] All entities from requirements are included\n- [ ] Files are logically organized by domain\n- [ ] No single file is overloaded with too many models\n- [ ] Dependencies flow from core to specific domains\n- [ ] Filename conventions are followed\n- [ ] main.prisma is included for configuration" /* AutoBeSystemPromptConstant.PRISMA_COMPONENT */,
20
+ },
21
+ {
22
+ type: "assistantMessage",
23
+ text: [
24
+ "Here is the requirement analysis report.",
25
+ "",
26
+ "Call the provided tool function to generate Prisma DB schema",
27
+ "referencing below requirement analysis report.",
28
+ "",
29
+ "## User Request",
30
+ state.analyze.reason,
31
+ "",
32
+ `## Requirement Analysis Report`,
33
+ "",
34
+ "```json",
35
+ JSON.stringify(state.analyze.files),
36
+ "```",
37
+ ].join("\n"),
38
+ },
39
+ ];
40
+ };
41
+ exports.transformPrismaComponentsHistories = transformPrismaComponentsHistories;
42
+ //# sourceMappingURL=transformPrismaComponentsHistories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transformPrismaComponentsHistories.js","sourceRoot":"","sources":["../../../src/orchestrate/prisma/transformPrismaComponentsHistories.ts"],"names":[],"mappings":";;;AAKO,MAAM,kCAAkC,GAAG,CAChD,KAAkB,EAGlB,EAAE;IACF,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI;QACxB,OAAO;YACL;gBACE,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE;oBACJ,4CAA4C;oBAC5C,+BAA+B;oBAC/B,8CAA8C;iBAC/C,CAAC,IAAI,CAAC,GAAG,CAAC;aACZ;SACF,CAAC;IACJ,OAAO;QACL;YACE,IAAI,EAAE,eAAe;YACrB,IAAI,6uGAA6C;SAClD;QACD;YACE,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE;gBACJ,0CAA0C;gBAC1C,EAAE;gBACF,8DAA8D;gBAC9D,gDAAgD;gBAChD,EAAE;gBACF,iBAAiB;gBACjB,KAAK,CAAC,OAAO,CAAC,MAAM;gBACpB,EAAE;gBACF,gCAAgC;gBAChC,EAAE;gBACF,SAAS;gBACT,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;gBACnC,KAAK;aACN,CAAC,IAAI,CAAC,IAAI,CAAC;SACb;KACF,CAAC;AACJ,CAAC,CAAC;AAxCW,QAAA,kCAAkC,sCAwC7C"}
@@ -0,0 +1,3 @@
1
+ import { IAgenticaHistoryJson } from "@agentica/core";
2
+ import { AutoBeState } from "../../context/AutoBeState";
3
+ export declare const transformPrismaHistories: (state: AutoBeState) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;