@autobe/agent 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/LICENSE +21 -0
  2. package/lib/AutoBeAgent.d.ts +29 -0
  3. package/lib/AutoBeAgent.js +88 -0
  4. package/lib/AutoBeAgent.js.map +1 -0
  5. package/lib/context/AutoBeContext.d.ts +13 -0
  6. package/lib/context/AutoBeContext.js +3 -0
  7. package/lib/context/AutoBeContext.js.map +1 -0
  8. package/lib/context/AutoBeState.d.ts +8 -0
  9. package/lib/context/AutoBeState.js +3 -0
  10. package/lib/context/AutoBeState.js.map +1 -0
  11. package/lib/context/AutoBeTokenUsage.d.ts +2 -0
  12. package/lib/context/AutoBeTokenUsage.js +6 -0
  13. package/lib/context/AutoBeTokenUsage.js.map +1 -0
  14. package/lib/context/IAutoBeApplication.d.ts +67 -0
  15. package/lib/context/IAutoBeApplication.js +3 -0
  16. package/lib/context/IAutoBeApplication.js.map +1 -0
  17. package/lib/context/IAutoBeApplicationProps.d.ts +6 -0
  18. package/lib/context/IAutoBeApplicationProps.js +3 -0
  19. package/lib/context/IAutoBeApplicationProps.js.map +1 -0
  20. package/lib/context/IAutoBeApplicationResult.d.ts +4 -0
  21. package/lib/context/IAutoBeApplicationResult.js +3 -0
  22. package/lib/context/IAutoBeApplicationResult.js.map +1 -0
  23. package/lib/factory/transformRouteDocument.d.ts +3 -0
  24. package/lib/factory/transformRouteDocument.js +50 -0
  25. package/lib/factory/transformRouteDocument.js.map +1 -0
  26. package/lib/index.d.ts +9 -0
  27. package/lib/index.js +49 -0
  28. package/lib/index.js.map +1 -0
  29. package/lib/index.mjs +1548 -0
  30. package/lib/index.mjs.map +1 -0
  31. package/lib/internal/createAutoBeApplication.d.ts +7 -0
  32. package/lib/internal/createAutoBeApplication.js +1452 -0
  33. package/lib/internal/createAutoBeApplication.js.map +1 -0
  34. package/lib/internal/createAutoBeState.d.ts +3 -0
  35. package/lib/internal/createAutoBeState.js +16 -0
  36. package/lib/internal/createAutoBeState.js.map +1 -0
  37. package/lib/internal/transformAgenticaHistory.d.ts +7 -0
  38. package/lib/internal/transformAgenticaHistory.js +27 -0
  39. package/lib/internal/transformAgenticaHistory.js.map +1 -0
  40. package/lib/orchestrate/index.d.ts +5 -0
  41. package/lib/orchestrate/index.js +14 -0
  42. package/lib/orchestrate/index.js.map +1 -0
  43. package/lib/orchestrate/interface/AutoBeInterfaceAgent.d.ts +0 -0
  44. package/lib/orchestrate/interface/AutoBeInterfaceAgent.js +2 -0
  45. package/lib/orchestrate/interface/AutoBeInterfaceAgent.js.map +1 -0
  46. package/lib/orchestrate/orchestrateAnalyze.d.ts +8 -0
  47. package/lib/orchestrate/orchestrateAnalyze.js +22 -0
  48. package/lib/orchestrate/orchestrateAnalyze.js.map +1 -0
  49. package/lib/orchestrate/orchestrateInterface.d.ts +8 -0
  50. package/lib/orchestrate/orchestrateInterface.js +22 -0
  51. package/lib/orchestrate/orchestrateInterface.js.map +1 -0
  52. package/lib/orchestrate/orchestratePrisma.d.ts +8 -0
  53. package/lib/orchestrate/orchestratePrisma.js +22 -0
  54. package/lib/orchestrate/orchestratePrisma.js.map +1 -0
  55. package/lib/orchestrate/orchestrateRealize.d.ts +5 -0
  56. package/lib/orchestrate/orchestrateRealize.js +19 -0
  57. package/lib/orchestrate/orchestrateRealize.js.map +1 -0
  58. package/lib/orchestrate/orchestrateTest.d.ts +5 -0
  59. package/lib/orchestrate/orchestrateTest.js +19 -0
  60. package/lib/orchestrate/orchestrateTest.js.map +1 -0
  61. package/lib/structures/IAutoBeConfig.d.ts +24 -0
  62. package/lib/structures/IAutoBeConfig.js +3 -0
  63. package/lib/structures/IAutoBeConfig.js.map +1 -0
  64. package/lib/structures/IAutoBeProps.d.ts +11 -0
  65. package/lib/structures/IAutoBeProps.js +3 -0
  66. package/lib/structures/IAutoBeProps.js.map +1 -0
  67. package/lib/structures/IAutoBeVendor.d.ts +2 -0
  68. package/lib/structures/IAutoBeVendor.js +3 -0
  69. package/lib/structures/IAutoBeVendor.js.map +1 -0
  70. package/package.json +67 -0
  71. package/src/AutoBeAgent.ts +101 -0
  72. package/src/context/AutoBeContext.ts +15 -0
  73. package/src/context/AutoBeState.ts +15 -0
  74. package/src/context/AutoBeTokenUsage.ts +3 -0
  75. package/src/context/IAutoBeApplication.ts +72 -0
  76. package/src/context/IAutoBeApplicationProps.ts +6 -0
  77. package/src/context/IAutoBeApplicationResult.ts +4 -0
  78. package/src/factory/transformRouteDocument.ts +49 -0
  79. package/src/index.ts +12 -0
  80. package/src/internal/createAutoBeApplication.ts +47 -0
  81. package/src/internal/createAutoBeState.ts +14 -0
  82. package/src/internal/transformAgenticaHistory.ts +54 -0
  83. package/src/orchestrate/index.ts +5 -0
  84. package/src/orchestrate/interface/AutoBeInterfaceAgent.ts +0 -0
  85. package/src/orchestrate/orchestrateAnalyze.ts +21 -0
  86. package/src/orchestrate/orchestrateInterface.ts +21 -0
  87. package/src/orchestrate/orchestratePrisma.ts +21 -0
  88. package/src/orchestrate/orchestrateRealize.ts +18 -0
  89. package/src/orchestrate/orchestrateTest.ts +18 -0
  90. package/src/structures/IAutoBeConfig.ts +25 -0
  91. package/src/structures/IAutoBeProps.ts +13 -0
  92. package/src/structures/IAutoBeVendor.ts +3 -0
package/lib/index.mjs ADDED
@@ -0,0 +1,1548 @@
1
+ import { MicroAgentica, AgenticaTokenUsage } from "@agentica/core";
2
+
3
+ import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport.js";
4
+
5
+ import "typia";
6
+
7
+ const orchestrateAnalyze = ctx => async props => null;
8
+
9
+ const orchestrateInterface = ctx => async props => null;
10
+
11
+ const orchestratePrisma = ctx => async props => null;
12
+
13
+ const orchestrateRealize = ctx => async props => null;
14
+
15
+ const orchestrateTest = ctx => async props => null;
16
+
17
+ const createAutoBeController = props => {
18
+ const application = collection[props.model];
19
+ return {
20
+ protocol: "class",
21
+ name: "autobe",
22
+ application,
23
+ execute: {
24
+ analyze: orchestrateAnalyze(),
25
+ prisma: orchestratePrisma(),
26
+ interface: orchestrateInterface(),
27
+ test: orchestrateTest(),
28
+ realize: orchestrateRealize()
29
+ }
30
+ };
31
+ };
32
+
33
+ const claude = {
34
+ model: "claude",
35
+ options: {
36
+ reference: false,
37
+ separate: null
38
+ },
39
+ functions: [ {
40
+ name: "analyze",
41
+ parameters: {
42
+ description: "Current Type: {@link IAutoBeApplicationProps}",
43
+ type: "object",
44
+ properties: {
45
+ reason: {
46
+ title: "The reason of the function call",
47
+ description: "The reason of the function call.",
48
+ type: "string"
49
+ }
50
+ },
51
+ required: [ "reason" ],
52
+ additionalProperties: false,
53
+ $defs: {}
54
+ },
55
+ output: {
56
+ description: "Current Type: {@link IAutoBeApplicationResult}",
57
+ type: "object",
58
+ properties: {
59
+ success: {
60
+ type: "boolean"
61
+ },
62
+ description: {
63
+ type: "string"
64
+ }
65
+ },
66
+ required: [ "success", "description" ]
67
+ },
68
+ description: "Run Analyze Agent.\n\nAnalyze agent analyzes requirements and creates specification\ndocuments.\n\nThe Analyze agent serves as the foundation of the entire development\nprocess. It not only captures initial requirements but also\ncontinuously refines understanding through iterative conversation\nwith users. When requirements are ambiguous or incomplete, it\nproactively formulates targeted questions to elicit necessary\ninformation before proceeding with development.\n\nAdditionally, once other agents have generated code, the Analyze\nagent can interpret change requests in the context of existing\nimplementations, assessing the impact and feasibility of modifications\nwhile maintaining system integrity. This comprehensive approach\nensures that all subsequent development stages work from a clear,\ncomplete, and consistent specification.",
69
+ validate: (() => {
70
+ const _io0 = input => "string" === typeof input.reason;
71
+ const _vo0 = (input, _path, _exceptionable = true) => [ "string" === typeof input.reason || _report(_exceptionable, {
72
+ path: _path + ".reason",
73
+ expected: "string",
74
+ value: input.reason
75
+ }) ].every((flag => flag));
76
+ const __is = input => "object" === typeof input && null !== input && _io0(input);
77
+ let errors;
78
+ let _report;
79
+ return input => {
80
+ if (false === __is(input)) {
81
+ errors = [];
82
+ _report = __typia_transform__validateReport._validateReport(errors);
83
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
84
+ path: _path + "",
85
+ expected: "IAutoBeApplicationProps",
86
+ value: input
87
+ })) && _vo0(input, _path + "", true) || _report(true, {
88
+ path: _path + "",
89
+ expected: "IAutoBeApplicationProps",
90
+ value: input
91
+ }))(input, "$input", true);
92
+ const success = 0 === errors.length;
93
+ return success ? {
94
+ success,
95
+ data: input
96
+ } : {
97
+ success,
98
+ errors,
99
+ data: input
100
+ };
101
+ }
102
+ return {
103
+ success: true,
104
+ data: input
105
+ };
106
+ };
107
+ })()
108
+ }, {
109
+ name: "prisma",
110
+ parameters: {
111
+ description: "Current Type: {@link IAutoBeApplicationProps}",
112
+ type: "object",
113
+ properties: {
114
+ reason: {
115
+ title: "The reason of the function call",
116
+ description: "The reason of the function call.",
117
+ type: "string"
118
+ }
119
+ },
120
+ required: [ "reason" ],
121
+ additionalProperties: false,
122
+ $defs: {}
123
+ },
124
+ output: {
125
+ description: "Current Type: {@link IAutoBeApplicationResult}",
126
+ type: "object",
127
+ properties: {
128
+ success: {
129
+ type: "boolean"
130
+ },
131
+ description: {
132
+ type: "string"
133
+ }
134
+ },
135
+ required: [ "success", "description" ]
136
+ },
137
+ description: "Run prisma agent.\n\nPrisma agent analyzes requirements specifications to generate\ndatabase schemas in Prisma format.\n\nThe Prisma agent references the requirements specification document\ncreated by the {@link analyze} function to craft the `prisma.schema`\nfile. For each entity and attribute in the database schema, it\nprovides comprehensive documentation including the rationale behind\nits creation, its purpose, and conceptual explanations. The agent\nemploys normalization techniques to ensure high-quality database\ndesign.\n\nOnce the DB schema file is written, the Prisma agent compiles it using\nthe built-in Prisma compiler. If compilation errors occur, these are\nfed back to the AI agent, enabling a self-correction process through\ncompiler feedback. After successful compilation, this schema file is\nthen subjected to a quality assurance process through an internal\nreview agent that verifies and refines the schema.\n\nNote that, never use this function without calling the\n{@link analyze} function at least once.",
138
+ validate: (() => {
139
+ const _io0 = input => "string" === typeof input.reason;
140
+ const _vo0 = (input, _path, _exceptionable = true) => [ "string" === typeof input.reason || _report(_exceptionable, {
141
+ path: _path + ".reason",
142
+ expected: "string",
143
+ value: input.reason
144
+ }) ].every((flag => flag));
145
+ const __is = input => "object" === typeof input && null !== input && _io0(input);
146
+ let errors;
147
+ let _report;
148
+ return input => {
149
+ if (false === __is(input)) {
150
+ errors = [];
151
+ _report = __typia_transform__validateReport._validateReport(errors);
152
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
153
+ path: _path + "",
154
+ expected: "IAutoBeApplicationProps",
155
+ value: input
156
+ })) && _vo0(input, _path + "", true) || _report(true, {
157
+ path: _path + "",
158
+ expected: "IAutoBeApplicationProps",
159
+ value: input
160
+ }))(input, "$input", true);
161
+ const success = 0 === errors.length;
162
+ return success ? {
163
+ success,
164
+ data: input
165
+ } : {
166
+ success,
167
+ errors,
168
+ data: input
169
+ };
170
+ }
171
+ return {
172
+ success: true,
173
+ data: input
174
+ };
175
+ };
176
+ })()
177
+ }, {
178
+ name: "interface",
179
+ parameters: {
180
+ description: "Current Type: {@link IAutoBeApplicationProps}",
181
+ type: "object",
182
+ properties: {
183
+ reason: {
184
+ title: "The reason of the function call",
185
+ description: "The reason of the function call.",
186
+ type: "string"
187
+ }
188
+ },
189
+ required: [ "reason" ],
190
+ additionalProperties: false,
191
+ $defs: {}
192
+ },
193
+ output: {
194
+ description: "Current Type: {@link IAutoBeApplicationResult}",
195
+ type: "object",
196
+ properties: {
197
+ success: {
198
+ type: "boolean"
199
+ },
200
+ description: {
201
+ type: "string"
202
+ }
203
+ },
204
+ required: [ "success", "description" ]
205
+ },
206
+ description: "Run interface agent.",
207
+ validate: (() => {
208
+ const _io0 = input => "string" === typeof input.reason;
209
+ const _vo0 = (input, _path, _exceptionable = true) => [ "string" === typeof input.reason || _report(_exceptionable, {
210
+ path: _path + ".reason",
211
+ expected: "string",
212
+ value: input.reason
213
+ }) ].every((flag => flag));
214
+ const __is = input => "object" === typeof input && null !== input && _io0(input);
215
+ let errors;
216
+ let _report;
217
+ return input => {
218
+ if (false === __is(input)) {
219
+ errors = [];
220
+ _report = __typia_transform__validateReport._validateReport(errors);
221
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
222
+ path: _path + "",
223
+ expected: "IAutoBeApplicationProps",
224
+ value: input
225
+ })) && _vo0(input, _path + "", true) || _report(true, {
226
+ path: _path + "",
227
+ expected: "IAutoBeApplicationProps",
228
+ value: input
229
+ }))(input, "$input", true);
230
+ const success = 0 === errors.length;
231
+ return success ? {
232
+ success,
233
+ data: input
234
+ } : {
235
+ success,
236
+ errors,
237
+ data: input
238
+ };
239
+ }
240
+ return {
241
+ success: true,
242
+ data: input
243
+ };
244
+ };
245
+ })()
246
+ }, {
247
+ name: "test",
248
+ parameters: {
249
+ description: "Current Type: {@link IAutoBeApplicationProps}",
250
+ type: "object",
251
+ properties: {
252
+ reason: {
253
+ title: "The reason of the function call",
254
+ description: "The reason of the function call.",
255
+ type: "string"
256
+ }
257
+ },
258
+ required: [ "reason" ],
259
+ additionalProperties: false,
260
+ $defs: {}
261
+ },
262
+ output: {
263
+ description: "Current Type: {@link IAutoBeApplicationResult}",
264
+ type: "object",
265
+ properties: {
266
+ success: {
267
+ type: "boolean"
268
+ },
269
+ description: {
270
+ type: "string"
271
+ }
272
+ },
273
+ required: [ "success", "description" ]
274
+ },
275
+ description: "Run test program agent.",
276
+ validate: (() => {
277
+ const _io0 = input => "string" === typeof input.reason;
278
+ const _vo0 = (input, _path, _exceptionable = true) => [ "string" === typeof input.reason || _report(_exceptionable, {
279
+ path: _path + ".reason",
280
+ expected: "string",
281
+ value: input.reason
282
+ }) ].every((flag => flag));
283
+ const __is = input => "object" === typeof input && null !== input && _io0(input);
284
+ let errors;
285
+ let _report;
286
+ return input => {
287
+ if (false === __is(input)) {
288
+ errors = [];
289
+ _report = __typia_transform__validateReport._validateReport(errors);
290
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
291
+ path: _path + "",
292
+ expected: "IAutoBeApplicationProps",
293
+ value: input
294
+ })) && _vo0(input, _path + "", true) || _report(true, {
295
+ path: _path + "",
296
+ expected: "IAutoBeApplicationProps",
297
+ value: input
298
+ }))(input, "$input", true);
299
+ const success = 0 === errors.length;
300
+ return success ? {
301
+ success,
302
+ data: input
303
+ } : {
304
+ success,
305
+ errors,
306
+ data: input
307
+ };
308
+ }
309
+ return {
310
+ success: true,
311
+ data: input
312
+ };
313
+ };
314
+ })()
315
+ }, {
316
+ name: "realize",
317
+ parameters: {
318
+ description: "Current Type: {@link IAutoBeApplicationProps}",
319
+ type: "object",
320
+ properties: {
321
+ reason: {
322
+ title: "The reason of the function call",
323
+ description: "The reason of the function call.",
324
+ type: "string"
325
+ }
326
+ },
327
+ required: [ "reason" ],
328
+ additionalProperties: false,
329
+ $defs: {}
330
+ },
331
+ output: {
332
+ description: "Current Type: {@link IAutoBeApplicationResult}",
333
+ type: "object",
334
+ properties: {
335
+ success: {
336
+ type: "boolean"
337
+ },
338
+ description: {
339
+ type: "string"
340
+ }
341
+ },
342
+ required: [ "success", "description" ]
343
+ },
344
+ description: "Run realize agent.",
345
+ validate: (() => {
346
+ const _io0 = input => "string" === typeof input.reason;
347
+ const _vo0 = (input, _path, _exceptionable = true) => [ "string" === typeof input.reason || _report(_exceptionable, {
348
+ path: _path + ".reason",
349
+ expected: "string",
350
+ value: input.reason
351
+ }) ].every((flag => flag));
352
+ const __is = input => "object" === typeof input && null !== input && _io0(input);
353
+ let errors;
354
+ let _report;
355
+ return input => {
356
+ if (false === __is(input)) {
357
+ errors = [];
358
+ _report = __typia_transform__validateReport._validateReport(errors);
359
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
360
+ path: _path + "",
361
+ expected: "IAutoBeApplicationProps",
362
+ value: input
363
+ })) && _vo0(input, _path + "", true) || _report(true, {
364
+ path: _path + "",
365
+ expected: "IAutoBeApplicationProps",
366
+ value: input
367
+ }))(input, "$input", true);
368
+ const success = 0 === errors.length;
369
+ return success ? {
370
+ success,
371
+ data: input
372
+ } : {
373
+ success,
374
+ errors,
375
+ data: input
376
+ };
377
+ }
378
+ return {
379
+ success: true,
380
+ data: input
381
+ };
382
+ };
383
+ })()
384
+ } ]
385
+ };
386
+
387
+ const collection = {
388
+ chatgpt: {
389
+ model: "chatgpt",
390
+ options: {
391
+ reference: true,
392
+ strict: false,
393
+ separate: null
394
+ },
395
+ functions: [ {
396
+ name: "analyze",
397
+ parameters: {
398
+ description: "Current Type: {@link IAutoBeApplicationProps}",
399
+ type: "object",
400
+ properties: {
401
+ reason: {
402
+ title: "The reason of the function call",
403
+ description: "The reason of the function call.",
404
+ type: "string"
405
+ }
406
+ },
407
+ required: [ "reason" ],
408
+ additionalProperties: false,
409
+ $defs: {}
410
+ },
411
+ output: {
412
+ description: "Current Type: {@link IAutoBeApplicationResult}",
413
+ type: "object",
414
+ properties: {
415
+ success: {
416
+ type: "boolean"
417
+ },
418
+ description: {
419
+ type: "string"
420
+ }
421
+ },
422
+ required: [ "success", "description" ]
423
+ },
424
+ description: "Run Analyze Agent.\n\nAnalyze agent analyzes requirements and creates specification\ndocuments.\n\nThe Analyze agent serves as the foundation of the entire development\nprocess. It not only captures initial requirements but also\ncontinuously refines understanding through iterative conversation\nwith users. When requirements are ambiguous or incomplete, it\nproactively formulates targeted questions to elicit necessary\ninformation before proceeding with development.\n\nAdditionally, once other agents have generated code, the Analyze\nagent can interpret change requests in the context of existing\nimplementations, assessing the impact and feasibility of modifications\nwhile maintaining system integrity. This comprehensive approach\nensures that all subsequent development stages work from a clear,\ncomplete, and consistent specification.",
425
+ validate: (() => {
426
+ const _io0 = input => "string" === typeof input.reason;
427
+ const _vo0 = (input, _path, _exceptionable = true) => [ "string" === typeof input.reason || _report(_exceptionable, {
428
+ path: _path + ".reason",
429
+ expected: "string",
430
+ value: input.reason
431
+ }) ].every((flag => flag));
432
+ const __is = input => "object" === typeof input && null !== input && _io0(input);
433
+ let errors;
434
+ let _report;
435
+ return input => {
436
+ if (false === __is(input)) {
437
+ errors = [];
438
+ _report = __typia_transform__validateReport._validateReport(errors);
439
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
440
+ path: _path + "",
441
+ expected: "IAutoBeApplicationProps",
442
+ value: input
443
+ })) && _vo0(input, _path + "", true) || _report(true, {
444
+ path: _path + "",
445
+ expected: "IAutoBeApplicationProps",
446
+ value: input
447
+ }))(input, "$input", true);
448
+ const success = 0 === errors.length;
449
+ return success ? {
450
+ success,
451
+ data: input
452
+ } : {
453
+ success,
454
+ errors,
455
+ data: input
456
+ };
457
+ }
458
+ return {
459
+ success: true,
460
+ data: input
461
+ };
462
+ };
463
+ })()
464
+ }, {
465
+ name: "prisma",
466
+ parameters: {
467
+ description: "Current Type: {@link IAutoBeApplicationProps}",
468
+ type: "object",
469
+ properties: {
470
+ reason: {
471
+ title: "The reason of the function call",
472
+ description: "The reason of the function call.",
473
+ type: "string"
474
+ }
475
+ },
476
+ required: [ "reason" ],
477
+ additionalProperties: false,
478
+ $defs: {}
479
+ },
480
+ output: {
481
+ description: "Current Type: {@link IAutoBeApplicationResult}",
482
+ type: "object",
483
+ properties: {
484
+ success: {
485
+ type: "boolean"
486
+ },
487
+ description: {
488
+ type: "string"
489
+ }
490
+ },
491
+ required: [ "success", "description" ]
492
+ },
493
+ description: "Run prisma agent.\n\nPrisma agent analyzes requirements specifications to generate\ndatabase schemas in Prisma format.\n\nThe Prisma agent references the requirements specification document\ncreated by the {@link analyze} function to craft the `prisma.schema`\nfile. For each entity and attribute in the database schema, it\nprovides comprehensive documentation including the rationale behind\nits creation, its purpose, and conceptual explanations. The agent\nemploys normalization techniques to ensure high-quality database\ndesign.\n\nOnce the DB schema file is written, the Prisma agent compiles it using\nthe built-in Prisma compiler. If compilation errors occur, these are\nfed back to the AI agent, enabling a self-correction process through\ncompiler feedback. After successful compilation, this schema file is\nthen subjected to a quality assurance process through an internal\nreview agent that verifies and refines the schema.\n\nNote that, never use this function without calling the\n{@link analyze} function at least once.",
494
+ validate: (() => {
495
+ const _io0 = input => "string" === typeof input.reason;
496
+ const _vo0 = (input, _path, _exceptionable = true) => [ "string" === typeof input.reason || _report(_exceptionable, {
497
+ path: _path + ".reason",
498
+ expected: "string",
499
+ value: input.reason
500
+ }) ].every((flag => flag));
501
+ const __is = input => "object" === typeof input && null !== input && _io0(input);
502
+ let errors;
503
+ let _report;
504
+ return input => {
505
+ if (false === __is(input)) {
506
+ errors = [];
507
+ _report = __typia_transform__validateReport._validateReport(errors);
508
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
509
+ path: _path + "",
510
+ expected: "IAutoBeApplicationProps",
511
+ value: input
512
+ })) && _vo0(input, _path + "", true) || _report(true, {
513
+ path: _path + "",
514
+ expected: "IAutoBeApplicationProps",
515
+ value: input
516
+ }))(input, "$input", true);
517
+ const success = 0 === errors.length;
518
+ return success ? {
519
+ success,
520
+ data: input
521
+ } : {
522
+ success,
523
+ errors,
524
+ data: input
525
+ };
526
+ }
527
+ return {
528
+ success: true,
529
+ data: input
530
+ };
531
+ };
532
+ })()
533
+ }, {
534
+ name: "interface",
535
+ parameters: {
536
+ description: "Current Type: {@link IAutoBeApplicationProps}",
537
+ type: "object",
538
+ properties: {
539
+ reason: {
540
+ title: "The reason of the function call",
541
+ description: "The reason of the function call.",
542
+ type: "string"
543
+ }
544
+ },
545
+ required: [ "reason" ],
546
+ additionalProperties: false,
547
+ $defs: {}
548
+ },
549
+ output: {
550
+ description: "Current Type: {@link IAutoBeApplicationResult}",
551
+ type: "object",
552
+ properties: {
553
+ success: {
554
+ type: "boolean"
555
+ },
556
+ description: {
557
+ type: "string"
558
+ }
559
+ },
560
+ required: [ "success", "description" ]
561
+ },
562
+ description: "Run interface agent.",
563
+ validate: (() => {
564
+ const _io0 = input => "string" === typeof input.reason;
565
+ const _vo0 = (input, _path, _exceptionable = true) => [ "string" === typeof input.reason || _report(_exceptionable, {
566
+ path: _path + ".reason",
567
+ expected: "string",
568
+ value: input.reason
569
+ }) ].every((flag => flag));
570
+ const __is = input => "object" === typeof input && null !== input && _io0(input);
571
+ let errors;
572
+ let _report;
573
+ return input => {
574
+ if (false === __is(input)) {
575
+ errors = [];
576
+ _report = __typia_transform__validateReport._validateReport(errors);
577
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
578
+ path: _path + "",
579
+ expected: "IAutoBeApplicationProps",
580
+ value: input
581
+ })) && _vo0(input, _path + "", true) || _report(true, {
582
+ path: _path + "",
583
+ expected: "IAutoBeApplicationProps",
584
+ value: input
585
+ }))(input, "$input", true);
586
+ const success = 0 === errors.length;
587
+ return success ? {
588
+ success,
589
+ data: input
590
+ } : {
591
+ success,
592
+ errors,
593
+ data: input
594
+ };
595
+ }
596
+ return {
597
+ success: true,
598
+ data: input
599
+ };
600
+ };
601
+ })()
602
+ }, {
603
+ name: "test",
604
+ parameters: {
605
+ description: "Current Type: {@link IAutoBeApplicationProps}",
606
+ type: "object",
607
+ properties: {
608
+ reason: {
609
+ title: "The reason of the function call",
610
+ description: "The reason of the function call.",
611
+ type: "string"
612
+ }
613
+ },
614
+ required: [ "reason" ],
615
+ additionalProperties: false,
616
+ $defs: {}
617
+ },
618
+ output: {
619
+ description: "Current Type: {@link IAutoBeApplicationResult}",
620
+ type: "object",
621
+ properties: {
622
+ success: {
623
+ type: "boolean"
624
+ },
625
+ description: {
626
+ type: "string"
627
+ }
628
+ },
629
+ required: [ "success", "description" ]
630
+ },
631
+ description: "Run test program agent.",
632
+ validate: (() => {
633
+ const _io0 = input => "string" === typeof input.reason;
634
+ const _vo0 = (input, _path, _exceptionable = true) => [ "string" === typeof input.reason || _report(_exceptionable, {
635
+ path: _path + ".reason",
636
+ expected: "string",
637
+ value: input.reason
638
+ }) ].every((flag => flag));
639
+ const __is = input => "object" === typeof input && null !== input && _io0(input);
640
+ let errors;
641
+ let _report;
642
+ return input => {
643
+ if (false === __is(input)) {
644
+ errors = [];
645
+ _report = __typia_transform__validateReport._validateReport(errors);
646
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
647
+ path: _path + "",
648
+ expected: "IAutoBeApplicationProps",
649
+ value: input
650
+ })) && _vo0(input, _path + "", true) || _report(true, {
651
+ path: _path + "",
652
+ expected: "IAutoBeApplicationProps",
653
+ value: input
654
+ }))(input, "$input", true);
655
+ const success = 0 === errors.length;
656
+ return success ? {
657
+ success,
658
+ data: input
659
+ } : {
660
+ success,
661
+ errors,
662
+ data: input
663
+ };
664
+ }
665
+ return {
666
+ success: true,
667
+ data: input
668
+ };
669
+ };
670
+ })()
671
+ }, {
672
+ name: "realize",
673
+ parameters: {
674
+ description: "Current Type: {@link IAutoBeApplicationProps}",
675
+ type: "object",
676
+ properties: {
677
+ reason: {
678
+ title: "The reason of the function call",
679
+ description: "The reason of the function call.",
680
+ type: "string"
681
+ }
682
+ },
683
+ required: [ "reason" ],
684
+ additionalProperties: false,
685
+ $defs: {}
686
+ },
687
+ output: {
688
+ description: "Current Type: {@link IAutoBeApplicationResult}",
689
+ type: "object",
690
+ properties: {
691
+ success: {
692
+ type: "boolean"
693
+ },
694
+ description: {
695
+ type: "string"
696
+ }
697
+ },
698
+ required: [ "success", "description" ]
699
+ },
700
+ description: "Run realize agent.",
701
+ validate: (() => {
702
+ const _io0 = input => "string" === typeof input.reason;
703
+ const _vo0 = (input, _path, _exceptionable = true) => [ "string" === typeof input.reason || _report(_exceptionable, {
704
+ path: _path + ".reason",
705
+ expected: "string",
706
+ value: input.reason
707
+ }) ].every((flag => flag));
708
+ const __is = input => "object" === typeof input && null !== input && _io0(input);
709
+ let errors;
710
+ let _report;
711
+ return input => {
712
+ if (false === __is(input)) {
713
+ errors = [];
714
+ _report = __typia_transform__validateReport._validateReport(errors);
715
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
716
+ path: _path + "",
717
+ expected: "IAutoBeApplicationProps",
718
+ value: input
719
+ })) && _vo0(input, _path + "", true) || _report(true, {
720
+ path: _path + "",
721
+ expected: "IAutoBeApplicationProps",
722
+ value: input
723
+ }))(input, "$input", true);
724
+ const success = 0 === errors.length;
725
+ return success ? {
726
+ success,
727
+ data: input
728
+ } : {
729
+ success,
730
+ errors,
731
+ data: input
732
+ };
733
+ }
734
+ return {
735
+ success: true,
736
+ data: input
737
+ };
738
+ };
739
+ })()
740
+ } ]
741
+ },
742
+ gemini: {
743
+ model: "gemini",
744
+ options: {
745
+ recursive: 3,
746
+ separate: null
747
+ },
748
+ functions: [ {
749
+ name: "analyze",
750
+ parameters: {
751
+ type: "object",
752
+ properties: {
753
+ reason: {
754
+ type: "string",
755
+ description: "The reason of the function call."
756
+ }
757
+ },
758
+ required: [ "reason" ],
759
+ description: "Current Type: {@link IAutoBeApplicationProps}"
760
+ },
761
+ output: {
762
+ type: "object",
763
+ properties: {
764
+ success: {
765
+ type: "boolean"
766
+ },
767
+ description: {
768
+ type: "string"
769
+ }
770
+ },
771
+ required: [ "success", "description" ],
772
+ description: "Current Type: {@link IAutoBeApplicationResult}"
773
+ },
774
+ description: "Run Analyze Agent.\n\nAnalyze agent analyzes requirements and creates specification\ndocuments.\n\nThe Analyze agent serves as the foundation of the entire development\nprocess. It not only captures initial requirements but also\ncontinuously refines understanding through iterative conversation\nwith users. When requirements are ambiguous or incomplete, it\nproactively formulates targeted questions to elicit necessary\ninformation before proceeding with development.\n\nAdditionally, once other agents have generated code, the Analyze\nagent can interpret change requests in the context of existing\nimplementations, assessing the impact and feasibility of modifications\nwhile maintaining system integrity. This comprehensive approach\nensures that all subsequent development stages work from a clear,\ncomplete, and consistent specification.",
775
+ validate: (() => {
776
+ const _io0 = input => "string" === typeof input.reason;
777
+ const _vo0 = (input, _path, _exceptionable = true) => [ "string" === typeof input.reason || _report(_exceptionable, {
778
+ path: _path + ".reason",
779
+ expected: "string",
780
+ value: input.reason
781
+ }) ].every((flag => flag));
782
+ const __is = input => "object" === typeof input && null !== input && _io0(input);
783
+ let errors;
784
+ let _report;
785
+ return input => {
786
+ if (false === __is(input)) {
787
+ errors = [];
788
+ _report = __typia_transform__validateReport._validateReport(errors);
789
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
790
+ path: _path + "",
791
+ expected: "IAutoBeApplicationProps",
792
+ value: input
793
+ })) && _vo0(input, _path + "", true) || _report(true, {
794
+ path: _path + "",
795
+ expected: "IAutoBeApplicationProps",
796
+ value: input
797
+ }))(input, "$input", true);
798
+ const success = 0 === errors.length;
799
+ return success ? {
800
+ success,
801
+ data: input
802
+ } : {
803
+ success,
804
+ errors,
805
+ data: input
806
+ };
807
+ }
808
+ return {
809
+ success: true,
810
+ data: input
811
+ };
812
+ };
813
+ })()
814
+ }, {
815
+ name: "prisma",
816
+ parameters: {
817
+ type: "object",
818
+ properties: {
819
+ reason: {
820
+ type: "string",
821
+ description: "The reason of the function call."
822
+ }
823
+ },
824
+ required: [ "reason" ],
825
+ description: "Current Type: {@link IAutoBeApplicationProps}"
826
+ },
827
+ output: {
828
+ type: "object",
829
+ properties: {
830
+ success: {
831
+ type: "boolean"
832
+ },
833
+ description: {
834
+ type: "string"
835
+ }
836
+ },
837
+ required: [ "success", "description" ],
838
+ description: "Current Type: {@link IAutoBeApplicationResult}"
839
+ },
840
+ description: "Run prisma agent.\n\nPrisma agent analyzes requirements specifications to generate\ndatabase schemas in Prisma format.\n\nThe Prisma agent references the requirements specification document\ncreated by the {@link analyze} function to craft the `prisma.schema`\nfile. For each entity and attribute in the database schema, it\nprovides comprehensive documentation including the rationale behind\nits creation, its purpose, and conceptual explanations. The agent\nemploys normalization techniques to ensure high-quality database\ndesign.\n\nOnce the DB schema file is written, the Prisma agent compiles it using\nthe built-in Prisma compiler. If compilation errors occur, these are\nfed back to the AI agent, enabling a self-correction process through\ncompiler feedback. After successful compilation, this schema file is\nthen subjected to a quality assurance process through an internal\nreview agent that verifies and refines the schema.\n\nNote that, never use this function without calling the\n{@link analyze} function at least once.",
841
+ validate: (() => {
842
+ const _io0 = input => "string" === typeof input.reason;
843
+ const _vo0 = (input, _path, _exceptionable = true) => [ "string" === typeof input.reason || _report(_exceptionable, {
844
+ path: _path + ".reason",
845
+ expected: "string",
846
+ value: input.reason
847
+ }) ].every((flag => flag));
848
+ const __is = input => "object" === typeof input && null !== input && _io0(input);
849
+ let errors;
850
+ let _report;
851
+ return input => {
852
+ if (false === __is(input)) {
853
+ errors = [];
854
+ _report = __typia_transform__validateReport._validateReport(errors);
855
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
856
+ path: _path + "",
857
+ expected: "IAutoBeApplicationProps",
858
+ value: input
859
+ })) && _vo0(input, _path + "", true) || _report(true, {
860
+ path: _path + "",
861
+ expected: "IAutoBeApplicationProps",
862
+ value: input
863
+ }))(input, "$input", true);
864
+ const success = 0 === errors.length;
865
+ return success ? {
866
+ success,
867
+ data: input
868
+ } : {
869
+ success,
870
+ errors,
871
+ data: input
872
+ };
873
+ }
874
+ return {
875
+ success: true,
876
+ data: input
877
+ };
878
+ };
879
+ })()
880
+ }, {
881
+ name: "interface",
882
+ parameters: {
883
+ type: "object",
884
+ properties: {
885
+ reason: {
886
+ type: "string",
887
+ description: "The reason of the function call."
888
+ }
889
+ },
890
+ required: [ "reason" ],
891
+ description: "Current Type: {@link IAutoBeApplicationProps}"
892
+ },
893
+ output: {
894
+ type: "object",
895
+ properties: {
896
+ success: {
897
+ type: "boolean"
898
+ },
899
+ description: {
900
+ type: "string"
901
+ }
902
+ },
903
+ required: [ "success", "description" ],
904
+ description: "Current Type: {@link IAutoBeApplicationResult}"
905
+ },
906
+ description: "Run interface agent.",
907
+ validate: (() => {
908
+ const _io0 = input => "string" === typeof input.reason;
909
+ const _vo0 = (input, _path, _exceptionable = true) => [ "string" === typeof input.reason || _report(_exceptionable, {
910
+ path: _path + ".reason",
911
+ expected: "string",
912
+ value: input.reason
913
+ }) ].every((flag => flag));
914
+ const __is = input => "object" === typeof input && null !== input && _io0(input);
915
+ let errors;
916
+ let _report;
917
+ return input => {
918
+ if (false === __is(input)) {
919
+ errors = [];
920
+ _report = __typia_transform__validateReport._validateReport(errors);
921
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
922
+ path: _path + "",
923
+ expected: "IAutoBeApplicationProps",
924
+ value: input
925
+ })) && _vo0(input, _path + "", true) || _report(true, {
926
+ path: _path + "",
927
+ expected: "IAutoBeApplicationProps",
928
+ value: input
929
+ }))(input, "$input", true);
930
+ const success = 0 === errors.length;
931
+ return success ? {
932
+ success,
933
+ data: input
934
+ } : {
935
+ success,
936
+ errors,
937
+ data: input
938
+ };
939
+ }
940
+ return {
941
+ success: true,
942
+ data: input
943
+ };
944
+ };
945
+ })()
946
+ }, {
947
+ name: "test",
948
+ parameters: {
949
+ type: "object",
950
+ properties: {
951
+ reason: {
952
+ type: "string",
953
+ description: "The reason of the function call."
954
+ }
955
+ },
956
+ required: [ "reason" ],
957
+ description: "Current Type: {@link IAutoBeApplicationProps}"
958
+ },
959
+ output: {
960
+ type: "object",
961
+ properties: {
962
+ success: {
963
+ type: "boolean"
964
+ },
965
+ description: {
966
+ type: "string"
967
+ }
968
+ },
969
+ required: [ "success", "description" ],
970
+ description: "Current Type: {@link IAutoBeApplicationResult}"
971
+ },
972
+ description: "Run test program agent.",
973
+ validate: (() => {
974
+ const _io0 = input => "string" === typeof input.reason;
975
+ const _vo0 = (input, _path, _exceptionable = true) => [ "string" === typeof input.reason || _report(_exceptionable, {
976
+ path: _path + ".reason",
977
+ expected: "string",
978
+ value: input.reason
979
+ }) ].every((flag => flag));
980
+ const __is = input => "object" === typeof input && null !== input && _io0(input);
981
+ let errors;
982
+ let _report;
983
+ return input => {
984
+ if (false === __is(input)) {
985
+ errors = [];
986
+ _report = __typia_transform__validateReport._validateReport(errors);
987
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
988
+ path: _path + "",
989
+ expected: "IAutoBeApplicationProps",
990
+ value: input
991
+ })) && _vo0(input, _path + "", true) || _report(true, {
992
+ path: _path + "",
993
+ expected: "IAutoBeApplicationProps",
994
+ value: input
995
+ }))(input, "$input", true);
996
+ const success = 0 === errors.length;
997
+ return success ? {
998
+ success,
999
+ data: input
1000
+ } : {
1001
+ success,
1002
+ errors,
1003
+ data: input
1004
+ };
1005
+ }
1006
+ return {
1007
+ success: true,
1008
+ data: input
1009
+ };
1010
+ };
1011
+ })()
1012
+ }, {
1013
+ name: "realize",
1014
+ parameters: {
1015
+ type: "object",
1016
+ properties: {
1017
+ reason: {
1018
+ type: "string",
1019
+ description: "The reason of the function call."
1020
+ }
1021
+ },
1022
+ required: [ "reason" ],
1023
+ description: "Current Type: {@link IAutoBeApplicationProps}"
1024
+ },
1025
+ output: {
1026
+ type: "object",
1027
+ properties: {
1028
+ success: {
1029
+ type: "boolean"
1030
+ },
1031
+ description: {
1032
+ type: "string"
1033
+ }
1034
+ },
1035
+ required: [ "success", "description" ],
1036
+ description: "Current Type: {@link IAutoBeApplicationResult}"
1037
+ },
1038
+ description: "Run realize agent.",
1039
+ validate: (() => {
1040
+ const _io0 = input => "string" === typeof input.reason;
1041
+ const _vo0 = (input, _path, _exceptionable = true) => [ "string" === typeof input.reason || _report(_exceptionable, {
1042
+ path: _path + ".reason",
1043
+ expected: "string",
1044
+ value: input.reason
1045
+ }) ].every((flag => flag));
1046
+ const __is = input => "object" === typeof input && null !== input && _io0(input);
1047
+ let errors;
1048
+ let _report;
1049
+ return input => {
1050
+ if (false === __is(input)) {
1051
+ errors = [];
1052
+ _report = __typia_transform__validateReport._validateReport(errors);
1053
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
1054
+ path: _path + "",
1055
+ expected: "IAutoBeApplicationProps",
1056
+ value: input
1057
+ })) && _vo0(input, _path + "", true) || _report(true, {
1058
+ path: _path + "",
1059
+ expected: "IAutoBeApplicationProps",
1060
+ value: input
1061
+ }))(input, "$input", true);
1062
+ const success = 0 === errors.length;
1063
+ return success ? {
1064
+ success,
1065
+ data: input
1066
+ } : {
1067
+ success,
1068
+ errors,
1069
+ data: input
1070
+ };
1071
+ }
1072
+ return {
1073
+ success: true,
1074
+ data: input
1075
+ };
1076
+ };
1077
+ })()
1078
+ } ]
1079
+ },
1080
+ claude,
1081
+ llama: claude,
1082
+ deepseek: claude,
1083
+ 3.1: claude,
1084
+ "3.0": {
1085
+ model: "3.0",
1086
+ options: {
1087
+ constraint: true,
1088
+ recursive: 3,
1089
+ separate: null
1090
+ },
1091
+ functions: [ {
1092
+ name: "analyze",
1093
+ parameters: {
1094
+ type: "object",
1095
+ properties: {
1096
+ reason: {
1097
+ type: "string",
1098
+ title: "The reason of the function call",
1099
+ description: "The reason of the function call."
1100
+ }
1101
+ },
1102
+ required: [ "reason" ],
1103
+ description: "Current Type: {@link IAutoBeApplicationProps}",
1104
+ additionalProperties: false
1105
+ },
1106
+ output: {
1107
+ type: "object",
1108
+ properties: {
1109
+ success: {
1110
+ type: "boolean"
1111
+ },
1112
+ description: {
1113
+ type: "string"
1114
+ }
1115
+ },
1116
+ required: [ "success", "description" ],
1117
+ description: "Current Type: {@link IAutoBeApplicationResult}",
1118
+ additionalProperties: false
1119
+ },
1120
+ description: "Run Analyze Agent.\n\nAnalyze agent analyzes requirements and creates specification\ndocuments.\n\nThe Analyze agent serves as the foundation of the entire development\nprocess. It not only captures initial requirements but also\ncontinuously refines understanding through iterative conversation\nwith users. When requirements are ambiguous or incomplete, it\nproactively formulates targeted questions to elicit necessary\ninformation before proceeding with development.\n\nAdditionally, once other agents have generated code, the Analyze\nagent can interpret change requests in the context of existing\nimplementations, assessing the impact and feasibility of modifications\nwhile maintaining system integrity. This comprehensive approach\nensures that all subsequent development stages work from a clear,\ncomplete, and consistent specification.",
1121
+ validate: (() => {
1122
+ const _io0 = input => "string" === typeof input.reason;
1123
+ const _vo0 = (input, _path, _exceptionable = true) => [ "string" === typeof input.reason || _report(_exceptionable, {
1124
+ path: _path + ".reason",
1125
+ expected: "string",
1126
+ value: input.reason
1127
+ }) ].every((flag => flag));
1128
+ const __is = input => "object" === typeof input && null !== input && _io0(input);
1129
+ let errors;
1130
+ let _report;
1131
+ return input => {
1132
+ if (false === __is(input)) {
1133
+ errors = [];
1134
+ _report = __typia_transform__validateReport._validateReport(errors);
1135
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
1136
+ path: _path + "",
1137
+ expected: "IAutoBeApplicationProps",
1138
+ value: input
1139
+ })) && _vo0(input, _path + "", true) || _report(true, {
1140
+ path: _path + "",
1141
+ expected: "IAutoBeApplicationProps",
1142
+ value: input
1143
+ }))(input, "$input", true);
1144
+ const success = 0 === errors.length;
1145
+ return success ? {
1146
+ success,
1147
+ data: input
1148
+ } : {
1149
+ success,
1150
+ errors,
1151
+ data: input
1152
+ };
1153
+ }
1154
+ return {
1155
+ success: true,
1156
+ data: input
1157
+ };
1158
+ };
1159
+ })()
1160
+ }, {
1161
+ name: "prisma",
1162
+ parameters: {
1163
+ type: "object",
1164
+ properties: {
1165
+ reason: {
1166
+ type: "string",
1167
+ title: "The reason of the function call",
1168
+ description: "The reason of the function call."
1169
+ }
1170
+ },
1171
+ required: [ "reason" ],
1172
+ description: "Current Type: {@link IAutoBeApplicationProps}",
1173
+ additionalProperties: false
1174
+ },
1175
+ output: {
1176
+ type: "object",
1177
+ properties: {
1178
+ success: {
1179
+ type: "boolean"
1180
+ },
1181
+ description: {
1182
+ type: "string"
1183
+ }
1184
+ },
1185
+ required: [ "success", "description" ],
1186
+ description: "Current Type: {@link IAutoBeApplicationResult}",
1187
+ additionalProperties: false
1188
+ },
1189
+ description: "Run prisma agent.\n\nPrisma agent analyzes requirements specifications to generate\ndatabase schemas in Prisma format.\n\nThe Prisma agent references the requirements specification document\ncreated by the {@link analyze} function to craft the `prisma.schema`\nfile. For each entity and attribute in the database schema, it\nprovides comprehensive documentation including the rationale behind\nits creation, its purpose, and conceptual explanations. The agent\nemploys normalization techniques to ensure high-quality database\ndesign.\n\nOnce the DB schema file is written, the Prisma agent compiles it using\nthe built-in Prisma compiler. If compilation errors occur, these are\nfed back to the AI agent, enabling a self-correction process through\ncompiler feedback. After successful compilation, this schema file is\nthen subjected to a quality assurance process through an internal\nreview agent that verifies and refines the schema.\n\nNote that, never use this function without calling the\n{@link analyze} function at least once.",
1190
+ validate: (() => {
1191
+ const _io0 = input => "string" === typeof input.reason;
1192
+ const _vo0 = (input, _path, _exceptionable = true) => [ "string" === typeof input.reason || _report(_exceptionable, {
1193
+ path: _path + ".reason",
1194
+ expected: "string",
1195
+ value: input.reason
1196
+ }) ].every((flag => flag));
1197
+ const __is = input => "object" === typeof input && null !== input && _io0(input);
1198
+ let errors;
1199
+ let _report;
1200
+ return input => {
1201
+ if (false === __is(input)) {
1202
+ errors = [];
1203
+ _report = __typia_transform__validateReport._validateReport(errors);
1204
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
1205
+ path: _path + "",
1206
+ expected: "IAutoBeApplicationProps",
1207
+ value: input
1208
+ })) && _vo0(input, _path + "", true) || _report(true, {
1209
+ path: _path + "",
1210
+ expected: "IAutoBeApplicationProps",
1211
+ value: input
1212
+ }))(input, "$input", true);
1213
+ const success = 0 === errors.length;
1214
+ return success ? {
1215
+ success,
1216
+ data: input
1217
+ } : {
1218
+ success,
1219
+ errors,
1220
+ data: input
1221
+ };
1222
+ }
1223
+ return {
1224
+ success: true,
1225
+ data: input
1226
+ };
1227
+ };
1228
+ })()
1229
+ }, {
1230
+ name: "interface",
1231
+ parameters: {
1232
+ type: "object",
1233
+ properties: {
1234
+ reason: {
1235
+ type: "string",
1236
+ title: "The reason of the function call",
1237
+ description: "The reason of the function call."
1238
+ }
1239
+ },
1240
+ required: [ "reason" ],
1241
+ description: "Current Type: {@link IAutoBeApplicationProps}",
1242
+ additionalProperties: false
1243
+ },
1244
+ output: {
1245
+ type: "object",
1246
+ properties: {
1247
+ success: {
1248
+ type: "boolean"
1249
+ },
1250
+ description: {
1251
+ type: "string"
1252
+ }
1253
+ },
1254
+ required: [ "success", "description" ],
1255
+ description: "Current Type: {@link IAutoBeApplicationResult}",
1256
+ additionalProperties: false
1257
+ },
1258
+ description: "Run interface agent.",
1259
+ validate: (() => {
1260
+ const _io0 = input => "string" === typeof input.reason;
1261
+ const _vo0 = (input, _path, _exceptionable = true) => [ "string" === typeof input.reason || _report(_exceptionable, {
1262
+ path: _path + ".reason",
1263
+ expected: "string",
1264
+ value: input.reason
1265
+ }) ].every((flag => flag));
1266
+ const __is = input => "object" === typeof input && null !== input && _io0(input);
1267
+ let errors;
1268
+ let _report;
1269
+ return input => {
1270
+ if (false === __is(input)) {
1271
+ errors = [];
1272
+ _report = __typia_transform__validateReport._validateReport(errors);
1273
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
1274
+ path: _path + "",
1275
+ expected: "IAutoBeApplicationProps",
1276
+ value: input
1277
+ })) && _vo0(input, _path + "", true) || _report(true, {
1278
+ path: _path + "",
1279
+ expected: "IAutoBeApplicationProps",
1280
+ value: input
1281
+ }))(input, "$input", true);
1282
+ const success = 0 === errors.length;
1283
+ return success ? {
1284
+ success,
1285
+ data: input
1286
+ } : {
1287
+ success,
1288
+ errors,
1289
+ data: input
1290
+ };
1291
+ }
1292
+ return {
1293
+ success: true,
1294
+ data: input
1295
+ };
1296
+ };
1297
+ })()
1298
+ }, {
1299
+ name: "test",
1300
+ parameters: {
1301
+ type: "object",
1302
+ properties: {
1303
+ reason: {
1304
+ type: "string",
1305
+ title: "The reason of the function call",
1306
+ description: "The reason of the function call."
1307
+ }
1308
+ },
1309
+ required: [ "reason" ],
1310
+ description: "Current Type: {@link IAutoBeApplicationProps}",
1311
+ additionalProperties: false
1312
+ },
1313
+ output: {
1314
+ type: "object",
1315
+ properties: {
1316
+ success: {
1317
+ type: "boolean"
1318
+ },
1319
+ description: {
1320
+ type: "string"
1321
+ }
1322
+ },
1323
+ required: [ "success", "description" ],
1324
+ description: "Current Type: {@link IAutoBeApplicationResult}",
1325
+ additionalProperties: false
1326
+ },
1327
+ description: "Run test program agent.",
1328
+ validate: (() => {
1329
+ const _io0 = input => "string" === typeof input.reason;
1330
+ const _vo0 = (input, _path, _exceptionable = true) => [ "string" === typeof input.reason || _report(_exceptionable, {
1331
+ path: _path + ".reason",
1332
+ expected: "string",
1333
+ value: input.reason
1334
+ }) ].every((flag => flag));
1335
+ const __is = input => "object" === typeof input && null !== input && _io0(input);
1336
+ let errors;
1337
+ let _report;
1338
+ return input => {
1339
+ if (false === __is(input)) {
1340
+ errors = [];
1341
+ _report = __typia_transform__validateReport._validateReport(errors);
1342
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
1343
+ path: _path + "",
1344
+ expected: "IAutoBeApplicationProps",
1345
+ value: input
1346
+ })) && _vo0(input, _path + "", true) || _report(true, {
1347
+ path: _path + "",
1348
+ expected: "IAutoBeApplicationProps",
1349
+ value: input
1350
+ }))(input, "$input", true);
1351
+ const success = 0 === errors.length;
1352
+ return success ? {
1353
+ success,
1354
+ data: input
1355
+ } : {
1356
+ success,
1357
+ errors,
1358
+ data: input
1359
+ };
1360
+ }
1361
+ return {
1362
+ success: true,
1363
+ data: input
1364
+ };
1365
+ };
1366
+ })()
1367
+ }, {
1368
+ name: "realize",
1369
+ parameters: {
1370
+ type: "object",
1371
+ properties: {
1372
+ reason: {
1373
+ type: "string",
1374
+ title: "The reason of the function call",
1375
+ description: "The reason of the function call."
1376
+ }
1377
+ },
1378
+ required: [ "reason" ],
1379
+ description: "Current Type: {@link IAutoBeApplicationProps}",
1380
+ additionalProperties: false
1381
+ },
1382
+ output: {
1383
+ type: "object",
1384
+ properties: {
1385
+ success: {
1386
+ type: "boolean"
1387
+ },
1388
+ description: {
1389
+ type: "string"
1390
+ }
1391
+ },
1392
+ required: [ "success", "description" ],
1393
+ description: "Current Type: {@link IAutoBeApplicationResult}",
1394
+ additionalProperties: false
1395
+ },
1396
+ description: "Run realize agent.",
1397
+ validate: (() => {
1398
+ const _io0 = input => "string" === typeof input.reason;
1399
+ const _vo0 = (input, _path, _exceptionable = true) => [ "string" === typeof input.reason || _report(_exceptionable, {
1400
+ path: _path + ".reason",
1401
+ expected: "string",
1402
+ value: input.reason
1403
+ }) ].every((flag => flag));
1404
+ const __is = input => "object" === typeof input && null !== input && _io0(input);
1405
+ let errors;
1406
+ let _report;
1407
+ return input => {
1408
+ if (false === __is(input)) {
1409
+ errors = [];
1410
+ _report = __typia_transform__validateReport._validateReport(errors);
1411
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
1412
+ path: _path + "",
1413
+ expected: "IAutoBeApplicationProps",
1414
+ value: input
1415
+ })) && _vo0(input, _path + "", true) || _report(true, {
1416
+ path: _path + "",
1417
+ expected: "IAutoBeApplicationProps",
1418
+ value: input
1419
+ }))(input, "$input", true);
1420
+ const success = 0 === errors.length;
1421
+ return success ? {
1422
+ success,
1423
+ data: input
1424
+ } : {
1425
+ success,
1426
+ errors,
1427
+ data: input
1428
+ };
1429
+ }
1430
+ return {
1431
+ success: true,
1432
+ data: input
1433
+ };
1434
+ };
1435
+ })()
1436
+ } ]
1437
+ }
1438
+ };
1439
+
1440
+ const createAutoBeState = histories => {
1441
+ const reversed = histories.slice().reverse();
1442
+ return {
1443
+ analyze: reversed.find((h => h.type === "analyze")) ?? null,
1444
+ prisma: reversed.find((h => h.type === "prisma")) ?? null,
1445
+ interface: reversed.find((h => h.type === "interface")) ?? null,
1446
+ test: reversed.find((h => h.type === "test")) ?? null,
1447
+ realize: reversed.find((h => h.type === "realize")) ?? null
1448
+ };
1449
+ };
1450
+
1451
+ function transformAgenticaHistory(props) {
1452
+ if (props.history.type === "userMessage") return {
1453
+ ...props.history,
1454
+ toJSON: () => props.history
1455
+ }; else if (props.history.type === "assistantMessage") return {
1456
+ ...props.history,
1457
+ toJSON: () => props.history
1458
+ };
1459
+ const operation = props.operations.find((op => op.function.name === props.history.type));
1460
+ if (operation === undefined) return null;
1461
+ const partial = {
1462
+ id: props.history.id,
1463
+ type: "execute",
1464
+ arguments: {
1465
+ reason: props.history.reason
1466
+ },
1467
+ value: {
1468
+ success: props.history.type === "analyze" || props.history.type === "interface" ? true : props.history.result.type === "success",
1469
+ description: props.history.description
1470
+ }
1471
+ };
1472
+ return {
1473
+ ...partial,
1474
+ protocol: operation.protocol,
1475
+ operation,
1476
+ toJSON: () => ({
1477
+ ...partial,
1478
+ protocol: operation.protocol,
1479
+ operation: operation.toJSON()
1480
+ })
1481
+ };
1482
+ }
1483
+
1484
+ class AutoBeAgent {
1485
+ constructor(props) {
1486
+ this.props = props;
1487
+ this.histories_ = props.histories?.slice() ?? [];
1488
+ this.state_ = createAutoBeState(this.histories_);
1489
+ this.context_ = {
1490
+ model: props.model,
1491
+ vendor: props.vendor,
1492
+ compiler: props.compiler,
1493
+ histories: this.histories_,
1494
+ usage: () => this.agentica_.getTokenUsage(),
1495
+ state: () => this.state_
1496
+ };
1497
+ this.agentica_ = new MicroAgentica({
1498
+ model: props.model,
1499
+ vendor: props.vendor,
1500
+ config: {
1501
+ ...props.config ?? {},
1502
+ executor: {
1503
+ describe: null
1504
+ }
1505
+ },
1506
+ controllers: [ createAutoBeController({
1507
+ model: props.model,
1508
+ context: this.context_
1509
+ }) ]
1510
+ });
1511
+ this.agentica_.getHistories().push(...this.histories_.map((history => transformAgenticaHistory({
1512
+ operations: this.agentica_.getOperations(),
1513
+ history
1514
+ }))).filter((h => h !== null)));
1515
+ }
1516
+ clone() {
1517
+ return new AutoBeAgent({
1518
+ ...this.props,
1519
+ histories: this.histories_.slice()
1520
+ });
1521
+ }
1522
+ async conversate(content) {
1523
+ return [];
1524
+ }
1525
+ getHistories() {
1526
+ return this.histories_;
1527
+ }
1528
+ getTokenUsage() {
1529
+ return this.agentica_.getTokenUsage();
1530
+ }
1531
+ getContext() {
1532
+ return this.context_;
1533
+ }
1534
+ }
1535
+
1536
+ var AutoBeTokenUsage = AgenticaTokenUsage;
1537
+
1538
+ var index = Object.freeze({
1539
+ __proto__: null,
1540
+ analyze: orchestrateAnalyze,
1541
+ interface: orchestrateInterface,
1542
+ prisma: orchestratePrisma,
1543
+ realize: orchestrateRealize,
1544
+ test: orchestrateTest
1545
+ });
1546
+
1547
+ export { AutoBeAgent, AutoBeTokenUsage, index as orchestrate };
1548
+ //# sourceMappingURL=index.mjs.map