@autobe/agent 0.26.0 → 0.28.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 (205) hide show
  1. package/lib/AutoBeAgent.d.ts +2 -1
  2. package/lib/AutoBeAgent.js +27 -7
  3. package/lib/AutoBeAgent.js.map +1 -1
  4. package/lib/AutoBeMockAgent.js +2 -4
  5. package/lib/AutoBeMockAgent.js.map +1 -1
  6. package/lib/constants/AutoBeSystemPromptConstant.d.ts +11 -11
  7. package/lib/context/AutoBeContext.d.ts +4 -1
  8. package/lib/context/AutoBeTokenUsage.d.ts +1 -1
  9. package/lib/context/AutoBeTokenUsage.js.map +1 -1
  10. package/lib/context/assertSchemaModel.d.ts +1 -1
  11. package/lib/context/assertSchemaModel.js +4 -7
  12. package/lib/context/assertSchemaModel.js.map +1 -1
  13. package/lib/factory/AutoBeFunctionCallingMetricFactory.d.ts +7 -0
  14. package/lib/factory/AutoBeFunctionCallingMetricFactory.js +35 -0
  15. package/lib/factory/AutoBeFunctionCallingMetricFactory.js.map +1 -0
  16. package/lib/factory/AutoBeProcessAggregateFactory.d.ts +13 -0
  17. package/lib/factory/AutoBeProcessAggregateFactory.js +100 -0
  18. package/lib/factory/AutoBeProcessAggregateFactory.js.map +1 -0
  19. package/lib/factory/createAutoBeContext.d.ts +2 -1
  20. package/lib/factory/createAutoBeContext.js +78 -27
  21. package/lib/factory/createAutoBeContext.js.map +1 -1
  22. package/lib/index.mjs +24065 -12997
  23. package/lib/index.mjs.map +1 -1
  24. package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +1 -1
  25. package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
  26. package/lib/orchestrate/analyze/orchestrateAnalyze.js +1 -0
  27. package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
  28. package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js +166 -87
  29. package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
  30. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +639 -322
  31. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
  32. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +146 -76
  33. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
  34. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +17 -52
  35. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +25 -22
  36. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +7 -23
  37. package/lib/orchestrate/common/orchestrateCommonCorrectCasting.d.ts +2 -1
  38. package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +168 -4
  39. package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js.map +1 -1
  40. package/lib/{factory/createAutoBeApplication.d.ts → orchestrate/facade/createAutoBeFacadeController.d.ts} +2 -2
  41. package/lib/orchestrate/facade/createAutoBeFacadeController.js +1308 -0
  42. package/lib/orchestrate/facade/createAutoBeFacadeController.js.map +1 -0
  43. package/lib/orchestrate/facade/histories/IAutoBeFacadeApplication.js.map +1 -0
  44. package/lib/orchestrate/facade/histories/IAutoBeFacadeApplicationProps.js.map +1 -0
  45. package/lib/orchestrate/facade/histories/IAutoBeFacadeApplicationResult.js.map +1 -0
  46. package/lib/orchestrate/facade/{transformFacadeStateMessage.d.ts → structures/transformFacadeStateMessage.d.ts} +1 -1
  47. package/lib/orchestrate/facade/structures/transformFacadeStateMessage.js.map +1 -0
  48. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +2 -2
  49. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
  50. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +1 -1
  51. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
  52. package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +3 -2
  53. package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -1
  54. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +1 -1
  55. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
  56. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +1 -1
  57. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
  58. package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +2 -2
  59. package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
  60. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +1 -1
  61. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
  62. package/lib/orchestrate/interface/orchestrateInterface.d.ts +1 -1
  63. package/lib/orchestrate/interface/orchestrateInterface.js +15 -8
  64. package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
  65. package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js +874 -49
  66. package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
  67. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +1858 -67
  68. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  69. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +251 -133
  70. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
  71. package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +0 -6
  72. package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +257 -135
  73. package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +1 -1
  74. package/lib/orchestrate/interface/orchestrateInterfaceGroups.js +341 -227
  75. package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
  76. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +761 -49
  77. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  78. package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js +911 -50
  79. package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
  80. package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js +207 -4
  81. package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js.map +1 -1
  82. package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js +109 -2
  83. package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js.map +1 -1
  84. package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.d.ts +5 -3
  85. package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js +1904 -77
  86. package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js.map +1 -1
  87. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js +1858 -67
  88. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
  89. package/lib/orchestrate/interface/utils/JsonSchemaFactory.js +23 -23
  90. package/lib/orchestrate/prisma/orchestratePrisma.d.ts +1 -1
  91. package/lib/orchestrate/prisma/orchestratePrisma.js +1 -0
  92. package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -1
  93. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +391 -197
  94. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  95. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +1168 -591
  96. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  97. package/lib/orchestrate/prisma/orchestratePrismaReview.js +1186 -600
  98. package/lib/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
  99. package/lib/orchestrate/prisma/orchestratePrismaSchemas.js +6 -3
  100. package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
  101. package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +2 -2
  102. package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -1
  103. package/lib/orchestrate/realize/orchestrateRealize.d.ts +1 -1
  104. package/lib/orchestrate/realize/orchestrateRealize.js +2 -1
  105. package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
  106. package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js +362 -180
  107. package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
  108. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +399 -199
  109. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
  110. package/lib/orchestrate/realize/orchestrateRealizeCorrect.js +133 -4
  111. package/lib/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
  112. package/lib/orchestrate/realize/orchestrateRealizeCorrectCasting.js +171 -7
  113. package/lib/orchestrate/realize/orchestrateRealizeCorrectCasting.js.map +1 -1
  114. package/lib/orchestrate/realize/orchestrateRealizeWrite.js +132 -3
  115. package/lib/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
  116. package/lib/orchestrate/realize/utils/replaceImportStatements.js +0 -85
  117. package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
  118. package/lib/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
  119. package/lib/orchestrate/test/orchestrateTest.d.ts +1 -1
  120. package/lib/orchestrate/test/orchestrateTest.js +2 -1
  121. package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
  122. package/lib/orchestrate/test/orchestrateTestCorrect.js +134 -3
  123. package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  124. package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js +169 -4
  125. package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js.map +1 -1
  126. package/lib/orchestrate/test/orchestrateTestScenario.js +257 -4
  127. package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  128. package/lib/orchestrate/test/orchestrateTestScenarioReview.js +283 -4
  129. package/lib/orchestrate/test/orchestrateTestScenarioReview.js.map +1 -1
  130. package/lib/orchestrate/test/orchestrateTestWrite.js +141 -3
  131. package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  132. package/lib/utils/TokenUsageComputer.d.ts +5 -0
  133. package/lib/utils/TokenUsageComputer.js +29 -0
  134. package/lib/utils/TokenUsageComputer.js.map +1 -0
  135. package/package.json +10 -10
  136. package/src/AutoBeAgent.ts +40 -6
  137. package/src/AutoBeMockAgent.ts +2 -4
  138. package/src/constants/AutoBeSystemPromptConstant.ts +11 -11
  139. package/src/context/AutoBeContext.ts +8 -0
  140. package/src/context/AutoBeTokenUsage.ts +1 -1
  141. package/src/context/assertSchemaModel.ts +5 -8
  142. package/src/factory/AutoBeFunctionCallingMetricFactory.ts +44 -0
  143. package/src/factory/AutoBeProcessAggregateFactory.ts +141 -0
  144. package/src/factory/createAutoBeContext.ts +96 -36
  145. package/src/orchestrate/analyze/orchestrateAnalyze.ts +1 -0
  146. package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +9 -10
  147. package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +15 -10
  148. package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +10 -11
  149. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +19 -54
  150. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +25 -22
  151. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.ts +8 -24
  152. package/src/orchestrate/common/orchestrateCommonCorrectCasting.ts +20 -3
  153. package/src/orchestrate/facade/createAutoBeFacadeController.ts +136 -0
  154. package/src/orchestrate/facade/{transformFacadeStateMessage.ts → structures/transformFacadeStateMessage.ts} +2 -2
  155. package/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.ts +1 -0
  156. package/src/orchestrate/interface/orchestrateInterface.ts +17 -6
  157. package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +13 -2
  158. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +13 -2
  159. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +16 -11
  160. package/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.ts +16 -13
  161. package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +19 -15
  162. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +13 -2
  163. package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +16 -2
  164. package/src/orchestrate/interface/orchestrateInterfacePrerequisites.ts +13 -2
  165. package/src/orchestrate/interface/orchestrateInterfaceSchemaRename.ts +11 -2
  166. package/src/orchestrate/interface/orchestrateInterfaceSchemaReview.ts +24 -16
  167. package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +13 -2
  168. package/src/orchestrate/prisma/orchestratePrisma.ts +2 -1
  169. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +15 -10
  170. package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +9 -10
  171. package/src/orchestrate/prisma/orchestratePrismaReview.ts +9 -11
  172. package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +2 -1
  173. package/src/orchestrate/realize/orchestrateRealize.ts +3 -2
  174. package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +15 -10
  175. package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +15 -10
  176. package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +14 -3
  177. package/src/orchestrate/realize/orchestrateRealizeCorrectCasting.ts +21 -6
  178. package/src/orchestrate/realize/orchestrateRealizeWrite.ts +13 -2
  179. package/src/orchestrate/realize/utils/replaceImportStatements.ts +0 -90
  180. package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +5 -1
  181. package/src/orchestrate/test/histories/transformTestWriteHistories.ts +1 -1
  182. package/src/orchestrate/test/orchestrateTest.ts +3 -2
  183. package/src/orchestrate/test/orchestrateTestCorrect.ts +14 -2
  184. package/src/orchestrate/test/orchestrateTestCorrectInvalidRequest.ts +21 -3
  185. package/src/orchestrate/test/orchestrateTestScenario.ts +13 -2
  186. package/src/orchestrate/test/orchestrateTestScenarioReview.ts +13 -2
  187. package/src/orchestrate/test/orchestrateTestWrite.ts +13 -2
  188. package/src/utils/TokenUsageComputer.ts +35 -0
  189. package/lib/context/IAutoBeFacadeApplication.js.map +0 -1
  190. package/lib/context/IAutoBeFacadeApplicationProps.js.map +0 -1
  191. package/lib/context/IAutoBeFacadeApplicationResult.js.map +0 -1
  192. package/lib/factory/createAutoBeApplication.js +0 -942
  193. package/lib/factory/createAutoBeApplication.js.map +0 -1
  194. package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +0 -1
  195. package/src/factory/createAutoBeApplication.ts +0 -123
  196. /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplication.d.ts +0 -0
  197. /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplication.js +0 -0
  198. /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationProps.d.ts +0 -0
  199. /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationProps.js +0 -0
  200. /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationResult.d.ts +0 -0
  201. /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationResult.js +0 -0
  202. /package/lib/orchestrate/facade/{transformFacadeStateMessage.js → structures/transformFacadeStateMessage.js} +0 -0
  203. /package/src/{context → orchestrate/facade/histories}/IAutoBeFacadeApplication.ts +0 -0
  204. /package/src/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationProps.ts +0 -0
  205. /package/src/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationResult.ts +0 -0
@@ -1,942 +0,0 @@
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.createAutoBeController = void 0;
49
- const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
50
- const utils_1 = require("@autobe/utils");
51
- const typia_1 = __importDefault(require("typia"));
52
- const assertSchemaModel_1 = require("../context/assertSchemaModel");
53
- const orchestrateAnalyze_1 = require("../orchestrate/analyze/orchestrateAnalyze");
54
- const orchestrateInterface_1 = require("../orchestrate/interface/orchestrateInterface");
55
- const orchestratePrisma_1 = require("../orchestrate/prisma/orchestratePrisma");
56
- const orchestrateRealize_1 = require("../orchestrate/realize/orchestrateRealize");
57
- const orchestrateTest_1 = require("../orchestrate/test/orchestrateTest");
58
- const createAutoBeController = (props) => {
59
- (0, assertSchemaModel_1.assertSchemaModel)(props.model);
60
- const application = collection[props.model];
61
- return {
62
- protocol: "class",
63
- name: "autobe",
64
- application,
65
- execute: {
66
- analyze: () => __awaiter(void 0, void 0, void 0, function* () {
67
- const r = yield (0, orchestrateAnalyze_1.orchestrateAnalyze)(props.context);
68
- if (r.type === "analyze")
69
- return {
70
- type: "success",
71
- description: "Analysis completed successfully, and report has been published.",
72
- };
73
- else
74
- return {
75
- type: "in-progress",
76
- description: utils_1.StringUtil.trim `
77
- Requirements are not yet fully elicited,
78
- therefore additional questions will be made to the user.
79
- `,
80
- };
81
- }),
82
- prisma: (next) => __awaiter(void 0, void 0, void 0, function* () {
83
- const r = yield (0, orchestratePrisma_1.orchestratePrisma)(props.context, next);
84
- if (r.type === "prisma")
85
- return {
86
- type: r.compiled.type,
87
- description: r.compiled.type === "success"
88
- ? "Prisma schemas have been generated successfully."
89
- : r.result.success === false || r.compiled.type === "failure"
90
- ? "Prisma schemas are generated, but compilation failed."
91
- : "Unexpected error occurred while generating Prisma schemas.",
92
- };
93
- else
94
- return {
95
- type: "prerequisites-not-satisfied",
96
- description: "Requirement analysis is not yet completed.",
97
- };
98
- }),
99
- interface: (next) => __awaiter(void 0, void 0, void 0, function* () {
100
- const r = yield (0, orchestrateInterface_1.orchestrateInterface)(props.context)(next);
101
- if (r.type === "interface")
102
- return {
103
- type: "success",
104
- description: "API interfaces have been designed successfully.",
105
- };
106
- else
107
- return {
108
- type: "prerequisites-not-satisfied",
109
- description: "Prisma schemas are not yet completed.",
110
- };
111
- }),
112
- test: (next) => __awaiter(void 0, void 0, void 0, function* () {
113
- const r = yield (0, orchestrateTest_1.orchestrateTest)(props.context)(next);
114
- if (r.type === "test")
115
- return {
116
- type: r.compiled.type,
117
- description: r.compiled.type === "success"
118
- ? "Test functions have been generated successfully."
119
- : r.compiled.type === "failure"
120
- ? "Test functions are written, but compilation failed."
121
- : "Unexpected error occurred while writing test functions.",
122
- };
123
- else
124
- return {
125
- type: "prerequisites-not-satisfied",
126
- description: "API interfaces are not yet completed.",
127
- };
128
- }),
129
- realize: (next) => __awaiter(void 0, void 0, void 0, function* () {
130
- const r = yield (0, orchestrateRealize_1.orchestrateRealize)(props.context)(next);
131
- if (r.type === "realize")
132
- return {
133
- type: r.compiled.type,
134
- description: r.compiled.type === "success"
135
- ? "API implementation codes have been generated successfully."
136
- : r.compiled.type === "failure"
137
- ? "Implementation codes are composed, but compilation failed."
138
- : "Unexpected error occurred while writing implementation codes.",
139
- };
140
- else
141
- return {
142
- type: "prerequisites-not-satisfied",
143
- description: "API interfaces are not yet completed.",
144
- };
145
- }),
146
- },
147
- };
148
- };
149
- exports.createAutoBeController = createAutoBeController;
150
- const claude = {
151
- model: "claude",
152
- options: {
153
- reference: true,
154
- separate: null
155
- },
156
- functions: [
157
- {
158
- name: "analyze",
159
- parameters: {
160
- type: "object",
161
- properties: {},
162
- additionalProperties: false,
163
- required: [],
164
- $defs: {
165
- IAutoBeFacadeApplicationResult: {
166
- type: "object",
167
- properties: {
168
- type: {
169
- oneOf: [
170
- {
171
- "const": "success"
172
- },
173
- {
174
- "const": "failure"
175
- },
176
- {
177
- "const": "exception"
178
- },
179
- {
180
- "const": "in-progress"
181
- },
182
- {
183
- "const": "prerequisites-not-satisfied"
184
- }
185
- ]
186
- },
187
- description: {
188
- type: "string"
189
- }
190
- },
191
- required: [
192
- "type",
193
- "description"
194
- ]
195
- }
196
- }
197
- },
198
- output: {
199
- $ref: "#/$defs/IAutoBeFacadeApplicationResult"
200
- },
201
- description: "Run Analyze Agent.\n\nExecutes the Analyze agent to process user requirements and generate a\nstructured specification document. This agent analyzes all conversation\nhistory between users and AI, separates business logic from technical\nrequirements, and establishes development priorities and scope.\n\n**IMPORTANT**: Only call this function when sufficient requirements have\nbeen discussed to generate a comprehensive specification. The context must\ncontain enough detail about the system's purpose, core features, data\nmodels, and business rules. If requirements are unclear or incomplete,\ncontinue gathering information through conversation instead.\n\nThe agent will automatically generate follow-up questions for any ambiguous\nrequirements and continuously refine its understanding through iterative\nconversation. When executed after other agents have generated code, it can\nalso interpret change requests in the context of existing implementations.",
202
- validate: (() => { const __is = input => true; let errors; let _report; return input => {
203
- if (false === __is(input)) {
204
- errors = [];
205
- _report = __typia_transform__validateReport._validateReport(errors);
206
- ((input, _path, _exceptionable = true) => true)(input, "$input", true);
207
- const success = 0 === errors.length;
208
- return success ? {
209
- success,
210
- data: input
211
- } : {
212
- success,
213
- errors,
214
- data: input
215
- };
216
- }
217
- return {
218
- success: true,
219
- data: input
220
- };
221
- }; })()
222
- },
223
- {
224
- name: "prisma",
225
- parameters: {
226
- type: "object",
227
- properties: {
228
- instruction: {
229
- description: "Database design instructions from user conversation.\n\nPass empty string \"\" if no database-specific instructions exist.",
230
- type: "string"
231
- }
232
- },
233
- required: [
234
- "instruction"
235
- ],
236
- additionalProperties: false,
237
- $defs: {
238
- IAutoBeFacadeApplicationResult: {
239
- type: "object",
240
- properties: {
241
- type: {
242
- oneOf: [
243
- {
244
- "const": "success"
245
- },
246
- {
247
- "const": "failure"
248
- },
249
- {
250
- "const": "exception"
251
- },
252
- {
253
- "const": "in-progress"
254
- },
255
- {
256
- "const": "prerequisites-not-satisfied"
257
- }
258
- ]
259
- },
260
- description: {
261
- type: "string"
262
- }
263
- },
264
- required: [
265
- "type",
266
- "description"
267
- ]
268
- }
269
- }
270
- },
271
- output: {
272
- $ref: "#/$defs/IAutoBeFacadeApplicationResult"
273
- },
274
- description: "Run prisma agent.\n\nExecutes the Prisma agent to generate database schema files and ERD\ndocumentation. This agent reads the requirements specification created by\nthe {@link analyze Analyze agent} and produces a complete Prisma schema with\ncomprehensive documentation for each entity and attribute.\n\n**PREREQUISITE**: Only call this function after the {@link analyze} function\nhas been successfully executed and a requirements specification document\nhas been generated. The Prisma agent depends on the structured requirements\nanalysis to design the database schema properly. Without a completed\nrequirements specification, this function should NOT be called.\n\nThe agent will automatically validate the generated schema using the Prisma\ncompiler, self-correct any compilation errors through feedback loops, and\ngenerate ERD documentation using prisma-markdown. An internal review\nprocess ensures schema quality and optimization.",
275
- validate: (() => { const _io0 = input => "string" === typeof input.instruction; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.instruction || _report(_exceptionable, {
276
- path: _path + ".instruction",
277
- expected: "string",
278
- value: input.instruction
279
- })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
280
- if (false === __is(input)) {
281
- errors = [];
282
- _report = __typia_transform__validateReport._validateReport(errors);
283
- ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
284
- path: _path + "",
285
- expected: "__type",
286
- value: input
287
- })) && _vo0(input, _path + "", true) || _report(true, {
288
- path: _path + "",
289
- expected: "__type",
290
- value: input
291
- }))(input, "$input", true);
292
- const success = 0 === errors.length;
293
- return success ? {
294
- success,
295
- data: input
296
- } : {
297
- success,
298
- errors,
299
- data: input
300
- };
301
- }
302
- return {
303
- success: true,
304
- data: input
305
- };
306
- }; })()
307
- },
308
- {
309
- name: "interface",
310
- parameters: {
311
- type: "object",
312
- properties: {
313
- instruction: {
314
- description: "API design instructions from user conversation.\n\nPass empty string \"\" if no API-specific instructions exist.",
315
- type: "string"
316
- }
317
- },
318
- required: [
319
- "instruction"
320
- ],
321
- additionalProperties: false,
322
- $defs: {
323
- IAutoBeFacadeApplicationResult: {
324
- type: "object",
325
- properties: {
326
- type: {
327
- oneOf: [
328
- {
329
- "const": "success"
330
- },
331
- {
332
- "const": "failure"
333
- },
334
- {
335
- "const": "exception"
336
- },
337
- {
338
- "const": "in-progress"
339
- },
340
- {
341
- "const": "prerequisites-not-satisfied"
342
- }
343
- ]
344
- },
345
- description: {
346
- type: "string"
347
- }
348
- },
349
- required: [
350
- "type",
351
- "description"
352
- ]
353
- }
354
- }
355
- },
356
- output: {
357
- $ref: "#/$defs/IAutoBeFacadeApplicationResult"
358
- },
359
- description: "Run interface agent.\n\nExecutes the Interface agent to design and generate API interfaces. This\nagent creates OpenAPI schemas and TypeScript/NestJS code based on the\nrequirements specification and ERD documentation from previous agents.\n\nThe agent follows a sophisticated pipeline: first constructing formal\nOpenAPI Operation Schemas and JSON Schemas, then validating these schemas,\nand finally transforming them into NestJS controllers and DTOs. Each\ngenerated interface includes comprehensive JSDoc comments and undergoes\ninternal review for consistency.",
360
- validate: (() => { const _io0 = input => "string" === typeof input.instruction; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.instruction || _report(_exceptionable, {
361
- path: _path + ".instruction",
362
- expected: "string",
363
- value: input.instruction
364
- })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
365
- if (false === __is(input)) {
366
- errors = [];
367
- _report = __typia_transform__validateReport._validateReport(errors);
368
- ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
369
- path: _path + "",
370
- expected: "__type",
371
- value: input
372
- })) && _vo0(input, _path + "", true) || _report(true, {
373
- path: _path + "",
374
- expected: "__type",
375
- value: input
376
- }))(input, "$input", true);
377
- const success = 0 === errors.length;
378
- return success ? {
379
- success,
380
- data: input
381
- } : {
382
- success,
383
- errors,
384
- data: input
385
- };
386
- }
387
- return {
388
- success: true,
389
- data: input
390
- };
391
- }; })()
392
- },
393
- {
394
- name: "test",
395
- parameters: {
396
- type: "object",
397
- properties: {
398
- instruction: {
399
- description: "Testing strategy instructions from user conversation.\n\nPass empty string \"\" if no test-specific instructions exist.",
400
- type: "string"
401
- }
402
- },
403
- required: [
404
- "instruction"
405
- ],
406
- additionalProperties: false,
407
- $defs: {
408
- IAutoBeFacadeApplicationResult: {
409
- type: "object",
410
- properties: {
411
- type: {
412
- oneOf: [
413
- {
414
- "const": "success"
415
- },
416
- {
417
- "const": "failure"
418
- },
419
- {
420
- "const": "exception"
421
- },
422
- {
423
- "const": "in-progress"
424
- },
425
- {
426
- "const": "prerequisites-not-satisfied"
427
- }
428
- ]
429
- },
430
- description: {
431
- type: "string"
432
- }
433
- },
434
- required: [
435
- "type",
436
- "description"
437
- ]
438
- }
439
- }
440
- },
441
- output: {
442
- $ref: "#/$defs/IAutoBeFacadeApplicationResult"
443
- },
444
- description: "Run test program agent.\n\nExecutes the Test agent to generate comprehensive E2E test suites for all\n{@link interface API interfaces}. This agent synthesizes outputs from\nprevious agents to create tests that validate both individual endpoints and\ntheir interactions.\n\n**PREREQUISITE**: Only call this function after the {@link interface}\nfunction has been successfully executed and API interfaces have been\ngenerated. The Test agent requires the completed API interface definitions,\nOpenAPI schemas, and TypeScript code to generate appropriate test\nscenarios. Without completed interface design, this function should NOT be\ncalled.\n\nThe agent will analyze dependency relationships between API functions,\nstructure integrated test scenarios with correct execution sequences, and\nenhance pre-generated test scaffolds with business logic validation.\nTypeScript compiler validation and internal review ensure test quality and\noptimal coverage.",
445
- validate: (() => { const _io0 = input => "string" === typeof input.instruction; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.instruction || _report(_exceptionable, {
446
- path: _path + ".instruction",
447
- expected: "string",
448
- value: input.instruction
449
- })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
450
- if (false === __is(input)) {
451
- errors = [];
452
- _report = __typia_transform__validateReport._validateReport(errors);
453
- ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
454
- path: _path + "",
455
- expected: "__type",
456
- value: input
457
- })) && _vo0(input, _path + "", true) || _report(true, {
458
- path: _path + "",
459
- expected: "__type",
460
- value: input
461
- }))(input, "$input", true);
462
- const success = 0 === errors.length;
463
- return success ? {
464
- success,
465
- data: input
466
- } : {
467
- success,
468
- errors,
469
- data: input
470
- };
471
- }
472
- return {
473
- success: true,
474
- data: input
475
- };
476
- }; })()
477
- },
478
- {
479
- name: "realize",
480
- parameters: {
481
- type: "object",
482
- properties: {
483
- instruction: {
484
- description: "Implementation instructions from user conversation.\n\nPass empty string \"\" if no implementation-specific instructions exist.",
485
- type: "string"
486
- }
487
- },
488
- required: [
489
- "instruction"
490
- ],
491
- additionalProperties: false,
492
- $defs: {
493
- IAutoBeFacadeApplicationResult: {
494
- type: "object",
495
- properties: {
496
- type: {
497
- oneOf: [
498
- {
499
- "const": "success"
500
- },
501
- {
502
- "const": "failure"
503
- },
504
- {
505
- "const": "exception"
506
- },
507
- {
508
- "const": "in-progress"
509
- },
510
- {
511
- "const": "prerequisites-not-satisfied"
512
- }
513
- ]
514
- },
515
- description: {
516
- type: "string"
517
- }
518
- },
519
- required: [
520
- "type",
521
- "description"
522
- ]
523
- }
524
- }
525
- },
526
- output: {
527
- $ref: "#/$defs/IAutoBeFacadeApplicationResult"
528
- },
529
- description: "Run realize agent.\n\nExecutes the Realize agent to implement the actual business logic for each\nAPI endpoint. This agent synthesizes all outputs from previous agents to\ngenerate fully functional service provider code.\n\n**PREREQUISITE**: Only call this function after the {@link interface}\nfunction has been successfully executed and API interfaces have been\ngenerated. The Realize agent requires the completed API interface\ndefinitions to implement the corresponding service logic. It also benefits\nfrom having test code available for validation. Without completed interface\ndesign, this function should NOT be called.\n\nThe agent will create service implementations with multiple validation\nlayers: TypeScript compiler feedback, runtime validation through test\nexecution, and quality optimization through internal review. The generated\ncode handles database interactions through Prisma, implements security and\nvalidation checks, and processes business rules according to\nspecifications.",
530
- validate: (() => { const _io0 = input => "string" === typeof input.instruction; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.instruction || _report(_exceptionable, {
531
- path: _path + ".instruction",
532
- expected: "string",
533
- value: input.instruction
534
- })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
535
- if (false === __is(input)) {
536
- errors = [];
537
- _report = __typia_transform__validateReport._validateReport(errors);
538
- ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
539
- path: _path + "",
540
- expected: "__type",
541
- value: input
542
- })) && _vo0(input, _path + "", true) || _report(true, {
543
- path: _path + "",
544
- expected: "__type",
545
- value: input
546
- }))(input, "$input", true);
547
- const success = 0 === errors.length;
548
- return success ? {
549
- success,
550
- data: input
551
- } : {
552
- success,
553
- errors,
554
- data: input
555
- };
556
- }
557
- return {
558
- success: true,
559
- data: input
560
- };
561
- }; })()
562
- }
563
- ]
564
- };
565
- const collection = {
566
- chatgpt: {
567
- model: "chatgpt",
568
- options: {
569
- reference: true,
570
- strict: false,
571
- separate: null
572
- },
573
- functions: [
574
- {
575
- name: "analyze",
576
- parameters: {
577
- type: "object",
578
- properties: {},
579
- additionalProperties: false,
580
- required: [],
581
- $defs: {
582
- IAutoBeFacadeApplicationResult: {
583
- type: "object",
584
- properties: {
585
- type: {
586
- type: "string",
587
- "enum": [
588
- "success",
589
- "failure",
590
- "exception",
591
- "in-progress",
592
- "prerequisites-not-satisfied"
593
- ]
594
- },
595
- description: {
596
- type: "string"
597
- }
598
- },
599
- required: [
600
- "type",
601
- "description"
602
- ]
603
- }
604
- }
605
- },
606
- output: {
607
- $ref: "#/$defs/IAutoBeFacadeApplicationResult"
608
- },
609
- description: "Run Analyze Agent.\n\nExecutes the Analyze agent to process user requirements and generate a\nstructured specification document. This agent analyzes all conversation\nhistory between users and AI, separates business logic from technical\nrequirements, and establishes development priorities and scope.\n\n**IMPORTANT**: Only call this function when sufficient requirements have\nbeen discussed to generate a comprehensive specification. The context must\ncontain enough detail about the system's purpose, core features, data\nmodels, and business rules. If requirements are unclear or incomplete,\ncontinue gathering information through conversation instead.\n\nThe agent will automatically generate follow-up questions for any ambiguous\nrequirements and continuously refine its understanding through iterative\nconversation. When executed after other agents have generated code, it can\nalso interpret change requests in the context of existing implementations.",
610
- validate: (() => { const __is = input => true; let errors; let _report; return input => {
611
- if (false === __is(input)) {
612
- errors = [];
613
- _report = __typia_transform__validateReport._validateReport(errors);
614
- ((input, _path, _exceptionable = true) => true)(input, "$input", true);
615
- const success = 0 === errors.length;
616
- return success ? {
617
- success,
618
- data: input
619
- } : {
620
- success,
621
- errors,
622
- data: input
623
- };
624
- }
625
- return {
626
- success: true,
627
- data: input
628
- };
629
- }; })()
630
- },
631
- {
632
- name: "prisma",
633
- parameters: {
634
- type: "object",
635
- properties: {
636
- instruction: {
637
- description: "Database design instructions from user conversation.\n\nPass empty string \"\" if no database-specific instructions exist.",
638
- type: "string"
639
- }
640
- },
641
- required: [
642
- "instruction"
643
- ],
644
- additionalProperties: false,
645
- $defs: {
646
- IAutoBeFacadeApplicationResult: {
647
- type: "object",
648
- properties: {
649
- type: {
650
- type: "string",
651
- "enum": [
652
- "success",
653
- "failure",
654
- "exception",
655
- "in-progress",
656
- "prerequisites-not-satisfied"
657
- ]
658
- },
659
- description: {
660
- type: "string"
661
- }
662
- },
663
- required: [
664
- "type",
665
- "description"
666
- ]
667
- }
668
- }
669
- },
670
- output: {
671
- $ref: "#/$defs/IAutoBeFacadeApplicationResult"
672
- },
673
- description: "Run prisma agent.\n\nExecutes the Prisma agent to generate database schema files and ERD\ndocumentation. This agent reads the requirements specification created by\nthe {@link analyze Analyze agent} and produces a complete Prisma schema with\ncomprehensive documentation for each entity and attribute.\n\n**PREREQUISITE**: Only call this function after the {@link analyze} function\nhas been successfully executed and a requirements specification document\nhas been generated. The Prisma agent depends on the structured requirements\nanalysis to design the database schema properly. Without a completed\nrequirements specification, this function should NOT be called.\n\nThe agent will automatically validate the generated schema using the Prisma\ncompiler, self-correct any compilation errors through feedback loops, and\ngenerate ERD documentation using prisma-markdown. An internal review\nprocess ensures schema quality and optimization.",
674
- validate: (() => { const _io0 = input => "string" === typeof input.instruction; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.instruction || _report(_exceptionable, {
675
- path: _path + ".instruction",
676
- expected: "string",
677
- value: input.instruction
678
- })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
679
- if (false === __is(input)) {
680
- errors = [];
681
- _report = __typia_transform__validateReport._validateReport(errors);
682
- ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
683
- path: _path + "",
684
- expected: "__type",
685
- value: input
686
- })) && _vo0(input, _path + "", true) || _report(true, {
687
- path: _path + "",
688
- expected: "__type",
689
- value: input
690
- }))(input, "$input", true);
691
- const success = 0 === errors.length;
692
- return success ? {
693
- success,
694
- data: input
695
- } : {
696
- success,
697
- errors,
698
- data: input
699
- };
700
- }
701
- return {
702
- success: true,
703
- data: input
704
- };
705
- }; })()
706
- },
707
- {
708
- name: "interface",
709
- parameters: {
710
- type: "object",
711
- properties: {
712
- instruction: {
713
- description: "API design instructions from user conversation.\n\nPass empty string \"\" if no API-specific instructions exist.",
714
- type: "string"
715
- }
716
- },
717
- required: [
718
- "instruction"
719
- ],
720
- additionalProperties: false,
721
- $defs: {
722
- IAutoBeFacadeApplicationResult: {
723
- type: "object",
724
- properties: {
725
- type: {
726
- type: "string",
727
- "enum": [
728
- "success",
729
- "failure",
730
- "exception",
731
- "in-progress",
732
- "prerequisites-not-satisfied"
733
- ]
734
- },
735
- description: {
736
- type: "string"
737
- }
738
- },
739
- required: [
740
- "type",
741
- "description"
742
- ]
743
- }
744
- }
745
- },
746
- output: {
747
- $ref: "#/$defs/IAutoBeFacadeApplicationResult"
748
- },
749
- description: "Run interface agent.\n\nExecutes the Interface agent to design and generate API interfaces. This\nagent creates OpenAPI schemas and TypeScript/NestJS code based on the\nrequirements specification and ERD documentation from previous agents.\n\nThe agent follows a sophisticated pipeline: first constructing formal\nOpenAPI Operation Schemas and JSON Schemas, then validating these schemas,\nand finally transforming them into NestJS controllers and DTOs. Each\ngenerated interface includes comprehensive JSDoc comments and undergoes\ninternal review for consistency.",
750
- validate: (() => { const _io0 = input => "string" === typeof input.instruction; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.instruction || _report(_exceptionable, {
751
- path: _path + ".instruction",
752
- expected: "string",
753
- value: input.instruction
754
- })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
755
- if (false === __is(input)) {
756
- errors = [];
757
- _report = __typia_transform__validateReport._validateReport(errors);
758
- ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
759
- path: _path + "",
760
- expected: "__type",
761
- value: input
762
- })) && _vo0(input, _path + "", true) || _report(true, {
763
- path: _path + "",
764
- expected: "__type",
765
- value: input
766
- }))(input, "$input", true);
767
- const success = 0 === errors.length;
768
- return success ? {
769
- success,
770
- data: input
771
- } : {
772
- success,
773
- errors,
774
- data: input
775
- };
776
- }
777
- return {
778
- success: true,
779
- data: input
780
- };
781
- }; })()
782
- },
783
- {
784
- name: "test",
785
- parameters: {
786
- type: "object",
787
- properties: {
788
- instruction: {
789
- description: "Testing strategy instructions from user conversation.\n\nPass empty string \"\" if no test-specific instructions exist.",
790
- type: "string"
791
- }
792
- },
793
- required: [
794
- "instruction"
795
- ],
796
- additionalProperties: false,
797
- $defs: {
798
- IAutoBeFacadeApplicationResult: {
799
- type: "object",
800
- properties: {
801
- type: {
802
- type: "string",
803
- "enum": [
804
- "success",
805
- "failure",
806
- "exception",
807
- "in-progress",
808
- "prerequisites-not-satisfied"
809
- ]
810
- },
811
- description: {
812
- type: "string"
813
- }
814
- },
815
- required: [
816
- "type",
817
- "description"
818
- ]
819
- }
820
- }
821
- },
822
- output: {
823
- $ref: "#/$defs/IAutoBeFacadeApplicationResult"
824
- },
825
- description: "Run test program agent.\n\nExecutes the Test agent to generate comprehensive E2E test suites for all\n{@link interface API interfaces}. This agent synthesizes outputs from\nprevious agents to create tests that validate both individual endpoints and\ntheir interactions.\n\n**PREREQUISITE**: Only call this function after the {@link interface}\nfunction has been successfully executed and API interfaces have been\ngenerated. The Test agent requires the completed API interface definitions,\nOpenAPI schemas, and TypeScript code to generate appropriate test\nscenarios. Without completed interface design, this function should NOT be\ncalled.\n\nThe agent will analyze dependency relationships between API functions,\nstructure integrated test scenarios with correct execution sequences, and\nenhance pre-generated test scaffolds with business logic validation.\nTypeScript compiler validation and internal review ensure test quality and\noptimal coverage.",
826
- validate: (() => { const _io0 = input => "string" === typeof input.instruction; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.instruction || _report(_exceptionable, {
827
- path: _path + ".instruction",
828
- expected: "string",
829
- value: input.instruction
830
- })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
831
- if (false === __is(input)) {
832
- errors = [];
833
- _report = __typia_transform__validateReport._validateReport(errors);
834
- ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
835
- path: _path + "",
836
- expected: "__type",
837
- value: input
838
- })) && _vo0(input, _path + "", true) || _report(true, {
839
- path: _path + "",
840
- expected: "__type",
841
- value: input
842
- }))(input, "$input", true);
843
- const success = 0 === errors.length;
844
- return success ? {
845
- success,
846
- data: input
847
- } : {
848
- success,
849
- errors,
850
- data: input
851
- };
852
- }
853
- return {
854
- success: true,
855
- data: input
856
- };
857
- }; })()
858
- },
859
- {
860
- name: "realize",
861
- parameters: {
862
- type: "object",
863
- properties: {
864
- instruction: {
865
- description: "Implementation instructions from user conversation.\n\nPass empty string \"\" if no implementation-specific instructions exist.",
866
- type: "string"
867
- }
868
- },
869
- required: [
870
- "instruction"
871
- ],
872
- additionalProperties: false,
873
- $defs: {
874
- IAutoBeFacadeApplicationResult: {
875
- type: "object",
876
- properties: {
877
- type: {
878
- type: "string",
879
- "enum": [
880
- "success",
881
- "failure",
882
- "exception",
883
- "in-progress",
884
- "prerequisites-not-satisfied"
885
- ]
886
- },
887
- description: {
888
- type: "string"
889
- }
890
- },
891
- required: [
892
- "type",
893
- "description"
894
- ]
895
- }
896
- }
897
- },
898
- output: {
899
- $ref: "#/$defs/IAutoBeFacadeApplicationResult"
900
- },
901
- description: "Run realize agent.\n\nExecutes the Realize agent to implement the actual business logic for each\nAPI endpoint. This agent synthesizes all outputs from previous agents to\ngenerate fully functional service provider code.\n\n**PREREQUISITE**: Only call this function after the {@link interface}\nfunction has been successfully executed and API interfaces have been\ngenerated. The Realize agent requires the completed API interface\ndefinitions to implement the corresponding service logic. It also benefits\nfrom having test code available for validation. Without completed interface\ndesign, this function should NOT be called.\n\nThe agent will create service implementations with multiple validation\nlayers: TypeScript compiler feedback, runtime validation through test\nexecution, and quality optimization through internal review. The generated\ncode handles database interactions through Prisma, implements security and\nvalidation checks, and processes business rules according to\nspecifications.",
902
- validate: (() => { const _io0 = input => "string" === typeof input.instruction; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.instruction || _report(_exceptionable, {
903
- path: _path + ".instruction",
904
- expected: "string",
905
- value: input.instruction
906
- })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
907
- if (false === __is(input)) {
908
- errors = [];
909
- _report = __typia_transform__validateReport._validateReport(errors);
910
- ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
911
- path: _path + "",
912
- expected: "__type",
913
- value: input
914
- })) && _vo0(input, _path + "", true) || _report(true, {
915
- path: _path + "",
916
- expected: "__type",
917
- value: input
918
- }))(input, "$input", true);
919
- const success = 0 === errors.length;
920
- return success ? {
921
- success,
922
- data: input
923
- } : {
924
- success,
925
- errors,
926
- data: input
927
- };
928
- }
929
- return {
930
- success: true,
931
- data: input
932
- };
933
- }; })()
934
- }
935
- ]
936
- },
937
- claude,
938
- llama: claude,
939
- deepseek: claude,
940
- "3.1": claude,
941
- };
942
- //# sourceMappingURL=createAutoBeApplication.js.map