@autobe/agent 0.20.0 → 0.21.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 (97) hide show
  1. package/lib/agent/src/AutoBeMockAgent.js +1 -0
  2. package/lib/agent/src/AutoBeMockAgent.js.map +1 -1
  3. package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +10 -9
  4. package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +1 -1
  5. package/lib/agent/src/context/AutoBeContext.d.ts +2 -2
  6. package/lib/agent/src/factory/createAutoBeContext.js +3 -1
  7. package/lib/agent/src/factory/createAutoBeContext.js.map +1 -1
  8. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +3 -3
  9. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
  10. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.d.ts +4 -0
  11. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +33 -0
  12. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -0
  13. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +1 -1
  14. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
  15. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +1 -1
  16. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
  17. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +1 -1
  18. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
  19. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +2 -2
  20. package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
  21. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +6 -6
  22. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js +5 -3
  23. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
  24. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +10 -0
  25. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +365 -0
  26. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +1 -0
  27. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +6 -6
  28. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +1633 -1198
  29. package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
  30. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.d.ts +60 -0
  31. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js +3 -0
  32. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js.map +1 -0
  33. package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +40 -0
  34. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +1 -1
  35. package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
  36. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +1 -1
  37. package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
  38. package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +4 -4
  39. package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js +2 -2
  40. package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -1
  41. package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +4 -4
  42. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +2 -2
  43. package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +7 -2
  44. package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js +1 -1
  45. package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -1
  46. package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.d.ts +3 -1
  47. package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +41 -25
  48. package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
  49. package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +1 -1
  50. package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
  51. package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.d.ts +3 -1
  52. package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +118 -96
  53. package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
  54. package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js +1 -1
  55. package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  56. package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +10 -10
  57. package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js +1 -1
  58. package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  59. package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +28 -1
  60. package/lib/constants/AutoBeSystemPromptConstant.d.ts +10 -9
  61. package/lib/context/AutoBeContext.d.ts +2 -2
  62. package/lib/index.mjs +2315 -1526
  63. package/lib/index.mjs.map +1 -1
  64. package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.d.ts +4 -0
  65. package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +10 -0
  66. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.d.ts +60 -0
  67. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +40 -0
  68. package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +2 -2
  69. package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +7 -2
  70. package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +3 -1
  71. package/lib/orchestrate/test/histories/transformTestWriteHistories.d.ts +3 -1
  72. package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +28 -1
  73. package/package.json +6 -6
  74. package/src/AutoBeMockAgent.ts +1 -0
  75. package/src/constants/AutoBeSystemPromptConstant.ts +10 -9
  76. package/src/context/AutoBeContext.ts +2 -0
  77. package/src/factory/createAutoBeContext.ts +2 -1
  78. package/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.ts +39 -0
  79. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +5 -1
  80. package/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.ts +95 -0
  81. package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +118 -10
  82. package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.ts +65 -0
  83. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +42 -0
  84. package/src/orchestrate/realize/orchestrateRealizeScenario.ts +7 -3
  85. package/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.ts +6 -2
  86. package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +10 -5
  87. package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +2 -0
  88. package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +46 -34
  89. package/src/orchestrate/test/histories/transformTestWriteHistories.ts +24 -4
  90. package/src/orchestrate/test/orchestrateTestCorrect.ts +5 -1
  91. package/src/orchestrate/test/orchestrateTestWrite.ts +1 -1
  92. package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +28 -1
  93. package/lib/agent/src/orchestrate/test/histories/transformTestHistories.d.ts +0 -3
  94. package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js +0 -75
  95. package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +0 -1
  96. package/lib/orchestrate/test/histories/transformTestHistories.d.ts +0 -3
  97. package/src/orchestrate/test/histories/transformTestHistories.ts +0 -78
@@ -0,0 +1,365 @@
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.orchestrateInterfaceEndpointsReview = orchestrateInterfaceEndpointsReview;
49
+ exports.createController = createController;
50
+ const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
51
+ const typia_1 = __importDefault(require("typia"));
52
+ const uuid_1 = require("uuid");
53
+ const assertSchemaModel_1 = require("../../context/assertSchemaModel");
54
+ const transformInterfaceEndpointsReviewHistories_1 = require("./histories/transformInterfaceEndpointsReviewHistories");
55
+ function orchestrateInterfaceEndpointsReview(ctx_1, endpoints_1) {
56
+ return __awaiter(this, arguments, void 0, function* (ctx, endpoints, message = `Review the generated endpoints`) {
57
+ var _a, _b, _c, _d, _e;
58
+ const pointer = {
59
+ value: null,
60
+ };
61
+ const { tokenUsage } = yield ctx.conversate({
62
+ source: "interfaceEndpointsReview",
63
+ histories: (0, transformInterfaceEndpointsReviewHistories_1.transformInterfaceEndpointsReviewHistories)(ctx.state(), endpoints),
64
+ controller: createController({
65
+ model: ctx.model,
66
+ build: (props) => {
67
+ pointer.value = props;
68
+ },
69
+ }),
70
+ enforceFunctionCall: true,
71
+ message,
72
+ });
73
+ if (pointer.value === null) {
74
+ return endpoints;
75
+ }
76
+ const response = (_b = (_a = pointer.value) === null || _a === void 0 ? void 0 : _a.endpoints) !== null && _b !== void 0 ? _b : [];
77
+ ctx.dispatch({
78
+ id: (0, uuid_1.v7)(),
79
+ type: "interfaceEndpointsReview",
80
+ endpoints,
81
+ content: response,
82
+ created_at: new Date().toISOString(),
83
+ review: (_c = pointer.value) === null || _c === void 0 ? void 0 : _c.review,
84
+ step: (_e = (_d = ctx.state().analyze) === null || _d === void 0 ? void 0 : _d.step) !== null && _e !== void 0 ? _e : 0,
85
+ tokenUsage,
86
+ });
87
+ return response;
88
+ });
89
+ }
90
+ function createController(props) {
91
+ (0, assertSchemaModel_1.assertSchemaModel)(props.model);
92
+ const application = collection[props.model];
93
+ return {
94
+ protocol: "class",
95
+ name: "interface",
96
+ application,
97
+ execute: {
98
+ reviewEndpoints: (next) => {
99
+ props.build(next);
100
+ },
101
+ },
102
+ };
103
+ }
104
+ const claude = {
105
+ model: "claude",
106
+ options: {
107
+ reference: true,
108
+ separate: null
109
+ },
110
+ functions: [
111
+ {
112
+ name: "reviewEndpoints",
113
+ parameters: {
114
+ description: " - The review results and refined endpoint collection\n\n------------------------------\n\nCurrent Type: {@link IAutoBeInterfaceEndpointsReviewApplication.IProps}",
115
+ type: "object",
116
+ properties: {
117
+ review: {
118
+ description: "Comprehensive review analysis of all collected endpoints.\n\nContains detailed findings from the holistic review including:\n- Identified inconsistencies in naming conventions\n- Duplicate endpoints that serve the same purpose\n- Over-engineered solutions that add unnecessary complexity\n- Violations of REST API design principles\n- Recommendations for improvement and standardization\n\nThe review provides actionable feedback for creating a clean,\nconsistent, and maintainable API structure.",
119
+ type: "string"
120
+ },
121
+ endpoints: {
122
+ description: "Refined collection of API endpoints after review and cleanup.\n\nThe final optimized set of endpoints after:\n- Removing duplicates and redundant endpoints\n- Standardizing naming conventions across all paths\n- Simplifying over-engineered solutions\n- Ensuring consistent REST patterns\n- Aligning HTTP methods with their semantic meanings\n\nThis collection represents the production-ready API structure\nthat balances functionality with simplicity and maintainability.",
123
+ type: "array",
124
+ items: {
125
+ $ref: "#/$defs/AutoBeOpenApi.IEndpoint"
126
+ }
127
+ }
128
+ },
129
+ required: [
130
+ "review",
131
+ "endpoints"
132
+ ],
133
+ additionalProperties: false,
134
+ $defs: {
135
+ "AutoBeOpenApi.IEndpoint": {
136
+ description: "API endpoint information.",
137
+ type: "object",
138
+ properties: {
139
+ path: {
140
+ description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.\n\nPath validation rules:\n\n- Must start with a forward slash (/)\n- Can contain only: letters (a-z, A-Z), numbers (0-9), forward slashes (/),\n curly braces for parameters ({paramName}), hyphens (-), and underscores\n (_)\n- Parameters must be enclosed in curly braces: {paramName}\n- Resource names should be in camelCase\n- No quotes, spaces, or invalid special characters allowed\n- No domain or role-based prefixes\n\nValid examples:\n\n- \"/users\"\n- \"/users/{userId}\"\n- \"/articles/{articleId}/comments\"\n- \"/attachmentFiles\"\n- \"/orders/{orderId}/items/{itemId}\"\n\nInvalid examples:\n\n- \"'/users'\" (contains quotes)\n- \"/user profile\" (contains space)\n- \"/users/[userId]\" (wrong bracket format)\n- \"/admin/users\" (role prefix)\n- \"/api/v1/users\" (API prefix)",
141
+ type: "string",
142
+ pattern: "^\\/[a-zA-Z0-9\\/_{}.-]*$"
143
+ },
144
+ method: {
145
+ description: "HTTP method of the API operation.\n\n**IMPORTANT**: Methods must be written in lowercase only (e.g., \"get\", not \"GET\").\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
146
+ oneOf: [
147
+ {
148
+ "const": "get"
149
+ },
150
+ {
151
+ "const": "post"
152
+ },
153
+ {
154
+ "const": "put"
155
+ },
156
+ {
157
+ "const": "delete"
158
+ },
159
+ {
160
+ "const": "patch"
161
+ }
162
+ ]
163
+ }
164
+ },
165
+ required: [
166
+ "path",
167
+ "method"
168
+ ]
169
+ }
170
+ }
171
+ },
172
+ description: "Reviews and refines the complete collection of API endpoints.\n\nThis method consolidates all endpoints generated independently by different\ngroups and performs holistic review to:\n- Ensure naming consistency across all endpoints\n- Remove duplicate or overlapping endpoints\n- Eliminate over-engineered solutions\n- Standardize path structures and HTTP methods\n- Verify REST API design principles\n\nThe review process examines the entire API as a cohesive system rather\nthan individual endpoints, ensuring the final API is intuitive, maintainable,\nand follows best practices.",
173
+ validate: (() => { const _io0 = input => "string" === typeof input.review && (Array.isArray(input.endpoints) && input.endpoints.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
174
+ path: _path + ".review",
175
+ expected: "string",
176
+ value: input.review
177
+ }), (Array.isArray(input.endpoints) || _report(_exceptionable, {
178
+ path: _path + ".endpoints",
179
+ expected: "Array<AutoBeOpenApi.IEndpoint>",
180
+ value: input.endpoints
181
+ })) && input.endpoints.map((elem, _index2) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
182
+ path: _path + ".endpoints[" + _index2 + "]",
183
+ expected: "AutoBeOpenApi.IEndpoint",
184
+ value: elem
185
+ })) && _vo1(elem, _path + ".endpoints[" + _index2 + "]", true && _exceptionable) || _report(_exceptionable, {
186
+ path: _path + ".endpoints[" + _index2 + "]",
187
+ expected: "AutoBeOpenApi.IEndpoint",
188
+ value: elem
189
+ })).every(flag => flag) || _report(_exceptionable, {
190
+ path: _path + ".endpoints",
191
+ expected: "Array<AutoBeOpenApi.IEndpoint>",
192
+ value: input.endpoints
193
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.path && (RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) || _report(_exceptionable, {
194
+ path: _path + ".path",
195
+ expected: "string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">",
196
+ value: input.path
197
+ })) || _report(_exceptionable, {
198
+ path: _path + ".path",
199
+ expected: "(string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">)",
200
+ value: input.path
201
+ }), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
202
+ path: _path + ".method",
203
+ expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
204
+ value: input.method
205
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
206
+ if (false === __is(input)) {
207
+ errors = [];
208
+ _report = __typia_transform__validateReport._validateReport(errors);
209
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
210
+ path: _path + "",
211
+ expected: "IAutoBeInterfaceEndpointsReviewApplication.IProps",
212
+ value: input
213
+ })) && _vo0(input, _path + "", true) || _report(true, {
214
+ path: _path + "",
215
+ expected: "IAutoBeInterfaceEndpointsReviewApplication.IProps",
216
+ value: input
217
+ }))(input, "$input", true);
218
+ const success = 0 === errors.length;
219
+ return success ? {
220
+ success,
221
+ data: input
222
+ } : {
223
+ success,
224
+ errors,
225
+ data: input
226
+ };
227
+ }
228
+ return {
229
+ success: true,
230
+ data: input
231
+ };
232
+ }; })()
233
+ }
234
+ ]
235
+ };
236
+ const collection = {
237
+ chatgpt: {
238
+ model: "chatgpt",
239
+ options: {
240
+ reference: true,
241
+ strict: false,
242
+ separate: null
243
+ },
244
+ functions: [
245
+ {
246
+ name: "reviewEndpoints",
247
+ parameters: {
248
+ description: " - The review results and refined endpoint collection\n\n------------------------------\n\nCurrent Type: {@link IAutoBeInterfaceEndpointsReviewApplication.IProps}",
249
+ type: "object",
250
+ properties: {
251
+ review: {
252
+ description: "Comprehensive review analysis of all collected endpoints.\n\nContains detailed findings from the holistic review including:\n- Identified inconsistencies in naming conventions\n- Duplicate endpoints that serve the same purpose\n- Over-engineered solutions that add unnecessary complexity\n- Violations of REST API design principles\n- Recommendations for improvement and standardization\n\nThe review provides actionable feedback for creating a clean,\nconsistent, and maintainable API structure.",
253
+ type: "string"
254
+ },
255
+ endpoints: {
256
+ description: "Refined collection of API endpoints after review and cleanup.\n\nThe final optimized set of endpoints after:\n- Removing duplicates and redundant endpoints\n- Standardizing naming conventions across all paths\n- Simplifying over-engineered solutions\n- Ensuring consistent REST patterns\n- Aligning HTTP methods with their semantic meanings\n\nThis collection represents the production-ready API structure\nthat balances functionality with simplicity and maintainability.",
257
+ type: "array",
258
+ items: {
259
+ $ref: "#/$defs/AutoBeOpenApi.IEndpoint"
260
+ }
261
+ }
262
+ },
263
+ required: [
264
+ "review",
265
+ "endpoints"
266
+ ],
267
+ additionalProperties: false,
268
+ $defs: {
269
+ "AutoBeOpenApi.IEndpoint": {
270
+ description: "API endpoint information.",
271
+ type: "object",
272
+ properties: {
273
+ path: {
274
+ description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.\n\nPath validation rules:\n\n- Must start with a forward slash (/)\n- Can contain only: letters (a-z, A-Z), numbers (0-9), forward slashes (/),\n curly braces for parameters ({paramName}), hyphens (-), and underscores\n (_)\n- Parameters must be enclosed in curly braces: {paramName}\n- Resource names should be in camelCase\n- No quotes, spaces, or invalid special characters allowed\n- No domain or role-based prefixes\n\nValid examples:\n\n- \"/users\"\n- \"/users/{userId}\"\n- \"/articles/{articleId}/comments\"\n- \"/attachmentFiles\"\n- \"/orders/{orderId}/items/{itemId}\"\n\nInvalid examples:\n\n- \"'/users'\" (contains quotes)\n- \"/user profile\" (contains space)\n- \"/users/[userId]\" (wrong bracket format)\n- \"/admin/users\" (role prefix)\n- \"/api/v1/users\" (API prefix)\n\n\n@pattern ^\\/[a-zA-Z0-9\\/_{}.-]*$",
275
+ type: "string"
276
+ },
277
+ method: {
278
+ description: "HTTP method of the API operation.\n\n**IMPORTANT**: Methods must be written in lowercase only (e.g., \"get\", not \"GET\").\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
279
+ type: "string",
280
+ "enum": [
281
+ "get",
282
+ "post",
283
+ "put",
284
+ "delete",
285
+ "patch"
286
+ ]
287
+ }
288
+ },
289
+ required: [
290
+ "path",
291
+ "method"
292
+ ]
293
+ }
294
+ }
295
+ },
296
+ description: "Reviews and refines the complete collection of API endpoints.\n\nThis method consolidates all endpoints generated independently by different\ngroups and performs holistic review to:\n- Ensure naming consistency across all endpoints\n- Remove duplicate or overlapping endpoints\n- Eliminate over-engineered solutions\n- Standardize path structures and HTTP methods\n- Verify REST API design principles\n\nThe review process examines the entire API as a cohesive system rather\nthan individual endpoints, ensuring the final API is intuitive, maintainable,\nand follows best practices.",
297
+ validate: (() => { const _io0 = input => "string" === typeof input.review && (Array.isArray(input.endpoints) && input.endpoints.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
298
+ path: _path + ".review",
299
+ expected: "string",
300
+ value: input.review
301
+ }), (Array.isArray(input.endpoints) || _report(_exceptionable, {
302
+ path: _path + ".endpoints",
303
+ expected: "Array<AutoBeOpenApi.IEndpoint>",
304
+ value: input.endpoints
305
+ })) && input.endpoints.map((elem, _index2) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
306
+ path: _path + ".endpoints[" + _index2 + "]",
307
+ expected: "AutoBeOpenApi.IEndpoint",
308
+ value: elem
309
+ })) && _vo1(elem, _path + ".endpoints[" + _index2 + "]", true && _exceptionable) || _report(_exceptionable, {
310
+ path: _path + ".endpoints[" + _index2 + "]",
311
+ expected: "AutoBeOpenApi.IEndpoint",
312
+ value: elem
313
+ })).every(flag => flag) || _report(_exceptionable, {
314
+ path: _path + ".endpoints",
315
+ expected: "Array<AutoBeOpenApi.IEndpoint>",
316
+ value: input.endpoints
317
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.path && (RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) || _report(_exceptionable, {
318
+ path: _path + ".path",
319
+ expected: "string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">",
320
+ value: input.path
321
+ })) || _report(_exceptionable, {
322
+ path: _path + ".path",
323
+ expected: "(string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">)",
324
+ value: input.path
325
+ }), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
326
+ path: _path + ".method",
327
+ expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
328
+ value: input.method
329
+ })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
330
+ if (false === __is(input)) {
331
+ errors = [];
332
+ _report = __typia_transform__validateReport._validateReport(errors);
333
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
334
+ path: _path + "",
335
+ expected: "IAutoBeInterfaceEndpointsReviewApplication.IProps",
336
+ value: input
337
+ })) && _vo0(input, _path + "", true) || _report(true, {
338
+ path: _path + "",
339
+ expected: "IAutoBeInterfaceEndpointsReviewApplication.IProps",
340
+ value: input
341
+ }))(input, "$input", true);
342
+ const success = 0 === errors.length;
343
+ return success ? {
344
+ success,
345
+ data: input
346
+ } : {
347
+ success,
348
+ errors,
349
+ data: input
350
+ };
351
+ }
352
+ return {
353
+ success: true,
354
+ data: input
355
+ };
356
+ }; })()
357
+ }
358
+ ]
359
+ },
360
+ claude,
361
+ llama: claude,
362
+ deepseek: claude,
363
+ "3.1": claude,
364
+ };
365
+ //# sourceMappingURL=orchestrateInterfaceEndpointsReview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrateInterfaceEndpointsReview.js","sourceRoot":"","sources":["../../../../../src/orchestrate/interface/orchestrateInterfaceEndpointsReview.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,kFA8CC;AAED,4CAmBC;;AA3ED,kDAA0B;AAC1B,+BAA0B;AAG1B,uEAAoE;AACpE,uHAAoH;AAGpH,SAAsB,mCAAmC;yDAGvD,GAAyB,EACzB,SAAoC,EACpC,UAAkB,gCAAgC;;QAElD,MAAM,OAAO,GACX;YACE,KAAK,EAAE,IAAI;SACZ,CAAC;QAEJ,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC;YAC1C,MAAM,EAAE,0BAA0B;YAClC,SAAS,EAAE,IAAA,uFAA0C,EACnD,GAAG,CAAC,KAAK,EAAE,EACX,SAAS,CACV;YACD,UAAU,EAAE,gBAAgB,CAAC;gBAC3B,KAAK,EAAE,GAAG,CAAC,KAAK;gBAChB,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;oBACf,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;gBACxB,CAAC;aACF,CAAC;YACF,mBAAmB,EAAE,IAAI;YACzB,OAAO;SACR,CAAC,CAAC;QAEH,IAAI,OAAO,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC;YAC3B,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,MAAM,QAAQ,GAAG,MAAA,MAAA,OAAO,CAAC,KAAK,0CAAE,SAAS,mCAAI,EAAE,CAAC;QAEhD,GAAG,CAAC,QAAQ,CAAC;YACX,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,IAAI,EAAE,0BAA0B;YAChC,SAAS;YACT,OAAO,EAAE,QAAQ;YACjB,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,MAAM,EAAE,MAAA,OAAO,CAAC,KAAK,0CAAE,MAAM;YAC7B,IAAI,EAAE,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,0CAAE,IAAI,mCAAI,CAAC;YACpC,UAAU;SACX,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC;IAClB,CAAC;CAAA;AAED,SAAgB,gBAAgB,CAAiC,KAGhE;IACC,IAAA,qCAAiB,EAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAE/B,MAAM,WAAW,GAA2B,UAAU,CACpD,KAAK,CAAC,KAAK,CACwD,CAAC;IACtE,OAAO;QACL,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,WAAW;QACjB,WAAW;QACX,OAAO,EAAE;YACP,eAAe,EAAE,CAAC,IAAI,EAAE,EAAE;gBACxB,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACpB,CAAC;SACmD;KACvD,CAAC;AACJ,CAAC;AAED,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGT,CAAC;AACJ,MAAM,UAAU,GAAG;IACjB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAGJ;IACH,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;CACd,CAAC"}
@@ -620,7 +620,7 @@ const collection = {
620
620
  }
621
621
  },
622
622
  description: {
623
- description: "Detailed description about the API operation.\n\nIMPORTANT: This field MUST be extensively detailed and MUST reference the\ndescription comments from the related Prisma DB schema tables and\ncolumns. The description should be organized into MULTIPLE PARAGRAPHS\nseparated by line breaks to improve readability and comprehension.\n\nFor example, include separate paragraphs for:\n\n- The purpose and overview of the API operation\n- Security considerations and user permissions\n- Relationship to underlying database entities\n- Validation rules and business logic\n- Related API operations that might be used together with this one\n- Expected behavior and error handling\n\nWhen writing the description, be sure to incorporate the corresponding DB\nschema's description comments, matching the level of detail and style of\nthose comments. This ensures consistency between the API documentation\nand database structure.\n\nIf there's a dependency to other APIs, please describe the dependency API\noperation in this field with detailed reason. For example, if this API\noperation needs a pre-execution of other API operation, it must be\nexplicitly described.\n\n- `GET /shoppings/customers/sales` must be pre-executed to get entire list\n of summarized sales. Detailed sale information would be obtained by\n specifying the sale ID in the path parameter.\n\n> MUST be written in English. Never use other languages.",
623
+ description: "Detailed description about the API operation.\n\nIMPORTANT: This field MUST be extensively detailed and MUST reference the\ndescription comments from the related Prisma DB schema tables and\ncolumns. The description should be organized into MULTIPLE PARAGRAPHS\nseparated by line breaks to improve readability and comprehension.\n\nFor example, include separate paragraphs for:\n\n- The purpose and overview of the API operation\n- Security considerations and user permissions\n- Relationship to underlying database entities\n- Validation rules and business logic\n- Related API operations that might be used together with this one\n- Expected behavior and error handling\n\nWhen writing the description, be sure to incorporate the corresponding DB\nschema's description comments, matching the level of detail and style of\nthose comments. This ensures consistency between the API documentation\nand database structure.\n\nIf there's a dependency to other APIs, please describe the dependency API\noperation in this field with detailed reason. For example, if this API\noperation needs a pre-execution of other API operation, it must be\nexplicitly described.\n\n- `GET /shoppings/customers/sales` must be pre-executed to get entire list\n of summarized sales. Detailed sale information would be obtained by\n specifying the sale ID in the path parameter.\n\n**CRITICAL WARNING about soft delete keywords**:\nDO NOT use terms like \"soft delete\", \"soft-delete\", or similar variations\nin this description UNLESS the operation actually implements soft deletion.\nThese keywords trigger validation logic that expects a corresponding\nsoft_delete_column to be specified. Only use these terms when you intend\nto implement soft deletion (marking records as deleted without removing\nthem from the database).\n\nExample of problematic description:\n\u274C \"This would normally be a soft-delete, but we intentionally perform\npermanent deletion here\" - This triggers soft delete validation despite\nbeing a hard delete operation.\n\n> MUST be written in English. Never use other languages.",
624
624
  type: "string"
625
625
  },
626
626
  name: {
@@ -632,7 +632,7 @@ const collection = {
632
632
  type: "string"
633
633
  },
634
634
  summary: {
635
- description: "Short summary of the API operation.\n\nThis should be a concise description of the API operation, typically one\nsentence long. It should provide a quick overview of what the API does\nwithout going into too much detail.\n\nThis summary will be used in the OpenAPI documentation to give users a\nquick understanding of the API operation's purpose.\n\nIMPORTANT: The summary should clearly indicate which Prisma DB table this\noperation relates to, helping to ensure all tables have API coverage.\n\n> MUST be written in English. Never use other languages",
635
+ description: "Short summary of the API operation.\n\nThis should be a concise description of the API operation, typically one\nsentence long. It should provide a quick overview of what the API does\nwithout going into too much detail.\n\nThis summary will be used in the OpenAPI documentation to give users a\nquick understanding of the API operation's purpose.\n\nIMPORTANT: The summary should clearly indicate which Prisma DB table this\noperation relates to, helping to ensure all tables have API coverage.\n\n**CRITICAL WARNING about soft delete keywords**:\nDO NOT use terms like \"soft delete\", \"soft-delete\", or similar variations\nin this summary UNLESS the operation actually implements soft deletion.\nThese keywords trigger validation logic that expects a corresponding\nsoft_delete_column to be specified. Only use these terms when you intend\nto implement soft deletion (marking records as deleted without removing\nthem from the database).\n\n> MUST be written in English. Never use other languages",
636
636
  type: "string"
637
637
  },
638
638
  path: {
@@ -669,7 +669,7 @@ const collection = {
669
669
  ]
670
670
  },
671
671
  method: {
672
- description: "HTTP method of the API operation.\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
672
+ description: "HTTP method of the API operation.\n\n**IMPORTANT**: Methods must be written in lowercase only (e.g., \"get\", not \"GET\").\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
673
673
  type: "string",
674
674
  "enum": [
675
675
  "get",
@@ -1227,7 +1227,7 @@ const collection = {
1227
1227
  }
1228
1228
  },
1229
1229
  description: {
1230
- description: "Detailed description about the API operation.\n\nIMPORTANT: This field MUST be extensively detailed and MUST reference the\ndescription comments from the related Prisma DB schema tables and\ncolumns. The description should be organized into MULTIPLE PARAGRAPHS\nseparated by line breaks to improve readability and comprehension.\n\nFor example, include separate paragraphs for:\n\n- The purpose and overview of the API operation\n- Security considerations and user permissions\n- Relationship to underlying database entities\n- Validation rules and business logic\n- Related API operations that might be used together with this one\n- Expected behavior and error handling\n\nWhen writing the description, be sure to incorporate the corresponding DB\nschema's description comments, matching the level of detail and style of\nthose comments. This ensures consistency between the API documentation\nand database structure.\n\nIf there's a dependency to other APIs, please describe the dependency API\noperation in this field with detailed reason. For example, if this API\noperation needs a pre-execution of other API operation, it must be\nexplicitly described.\n\n- `GET /shoppings/customers/sales` must be pre-executed to get entire list\n of summarized sales. Detailed sale information would be obtained by\n specifying the sale ID in the path parameter.\n\n> MUST be written in English. Never use other languages.",
1230
+ description: "Detailed description about the API operation.\n\nIMPORTANT: This field MUST be extensively detailed and MUST reference the\ndescription comments from the related Prisma DB schema tables and\ncolumns. The description should be organized into MULTIPLE PARAGRAPHS\nseparated by line breaks to improve readability and comprehension.\n\nFor example, include separate paragraphs for:\n\n- The purpose and overview of the API operation\n- Security considerations and user permissions\n- Relationship to underlying database entities\n- Validation rules and business logic\n- Related API operations that might be used together with this one\n- Expected behavior and error handling\n\nWhen writing the description, be sure to incorporate the corresponding DB\nschema's description comments, matching the level of detail and style of\nthose comments. This ensures consistency between the API documentation\nand database structure.\n\nIf there's a dependency to other APIs, please describe the dependency API\noperation in this field with detailed reason. For example, if this API\noperation needs a pre-execution of other API operation, it must be\nexplicitly described.\n\n- `GET /shoppings/customers/sales` must be pre-executed to get entire list\n of summarized sales. Detailed sale information would be obtained by\n specifying the sale ID in the path parameter.\n\n**CRITICAL WARNING about soft delete keywords**:\nDO NOT use terms like \"soft delete\", \"soft-delete\", or similar variations\nin this description UNLESS the operation actually implements soft deletion.\nThese keywords trigger validation logic that expects a corresponding\nsoft_delete_column to be specified. Only use these terms when you intend\nto implement soft deletion (marking records as deleted without removing\nthem from the database).\n\nExample of problematic description:\n\u274C \"This would normally be a soft-delete, but we intentionally perform\npermanent deletion here\" - This triggers soft delete validation despite\nbeing a hard delete operation.\n\n> MUST be written in English. Never use other languages.",
1231
1231
  type: "string"
1232
1232
  },
1233
1233
  name: {
@@ -1240,7 +1240,7 @@ const collection = {
1240
1240
  type: "string"
1241
1241
  },
1242
1242
  summary: {
1243
- description: "Short summary of the API operation.\n\nThis should be a concise description of the API operation, typically one\nsentence long. It should provide a quick overview of what the API does\nwithout going into too much detail.\n\nThis summary will be used in the OpenAPI documentation to give users a\nquick understanding of the API operation's purpose.\n\nIMPORTANT: The summary should clearly indicate which Prisma DB table this\noperation relates to, helping to ensure all tables have API coverage.\n\n> MUST be written in English. Never use other languages",
1243
+ description: "Short summary of the API operation.\n\nThis should be a concise description of the API operation, typically one\nsentence long. It should provide a quick overview of what the API does\nwithout going into too much detail.\n\nThis summary will be used in the OpenAPI documentation to give users a\nquick understanding of the API operation's purpose.\n\nIMPORTANT: The summary should clearly indicate which Prisma DB table this\noperation relates to, helping to ensure all tables have API coverage.\n\n**CRITICAL WARNING about soft delete keywords**:\nDO NOT use terms like \"soft delete\", \"soft-delete\", or similar variations\nin this summary UNLESS the operation actually implements soft deletion.\nThese keywords trigger validation logic that expects a corresponding\nsoft_delete_column to be specified. Only use these terms when you intend\nto implement soft deletion (marking records as deleted without removing\nthem from the database).\n\n> MUST be written in English. Never use other languages",
1244
1244
  type: "string"
1245
1245
  },
1246
1246
  path: {
@@ -1278,7 +1278,7 @@ const collection = {
1278
1278
  ]
1279
1279
  },
1280
1280
  method: {
1281
- description: "HTTP method of the API operation.\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
1281
+ description: "HTTP method of the API operation.\n\n**IMPORTANT**: Methods must be written in lowercase only (e.g., \"get\", not \"GET\").\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
1282
1282
  oneOf: [
1283
1283
  {
1284
1284
  "const": "get"