@autobe/rpc 0.3.6 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{rpc/src/AutoBeRpcService.d.ts → AutoBeRpcService.d.ts} +1 -1
- package/lib/AutoBeRpcService.js.map +1 -0
- package/lib/index.js.map +1 -0
- package/package.json +3 -3
- package/src/AutoBeRpcService.ts +1 -2
- package/lib/agent/src/AutoBeAgent.d.ts +0 -31
- package/lib/agent/src/AutoBeAgent.js +0 -180
- package/lib/agent/src/AutoBeAgent.js.map +0 -1
- package/lib/agent/src/analyze/AnalyzeAgent.d.ts +0 -24
- package/lib/agent/src/analyze/AnalyzeAgent.js +0 -143
- package/lib/agent/src/analyze/AnalyzeAgent.js.map +0 -1
- package/lib/agent/src/analyze/CreateReviewerAgent.d.ts +0 -16
- package/lib/agent/src/analyze/CreateReviewerAgent.js +0 -97
- package/lib/agent/src/analyze/CreateReviewerAgent.js.map +0 -1
- package/lib/agent/src/analyze/Planning.d.ts +0 -63
- package/lib/agent/src/analyze/Planning.js +0 -39
- package/lib/agent/src/analyze/Planning.js.map +0 -1
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +0 -14
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.js +0 -4
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +0 -1
- package/lib/agent/src/context/AutoBeContext.d.ts +0 -17
- package/lib/agent/src/context/AutoBeContext.js +0 -3
- package/lib/agent/src/context/AutoBeContext.js.map +0 -1
- package/lib/agent/src/context/AutoBeState.d.ts +0 -8
- package/lib/agent/src/context/AutoBeState.js +0 -3
- package/lib/agent/src/context/AutoBeState.js.map +0 -1
- package/lib/agent/src/context/AutoBeTokenUsage.d.ts +0 -2
- package/lib/agent/src/context/AutoBeTokenUsage.js +0 -6
- package/lib/agent/src/context/AutoBeTokenUsage.js.map +0 -1
- package/lib/agent/src/context/IAutoBeApplication.d.ts +0 -107
- package/lib/agent/src/context/IAutoBeApplication.js +0 -3
- package/lib/agent/src/context/IAutoBeApplication.js.map +0 -1
- package/lib/agent/src/context/IAutoBeApplicationProps.d.ts +0 -26
- package/lib/agent/src/context/IAutoBeApplicationProps.js +0 -3
- package/lib/agent/src/context/IAutoBeApplicationProps.js.map +0 -1
- package/lib/agent/src/context/IAutoBeApplicationResult.d.ts +0 -3
- package/lib/agent/src/context/IAutoBeApplicationResult.js +0 -3
- package/lib/agent/src/context/IAutoBeApplicationResult.js.map +0 -1
- package/lib/agent/src/context/assertSchemaModel.d.ts +0 -2
- package/lib/agent/src/context/assertSchemaModel.js +0 -15
- package/lib/agent/src/context/assertSchemaModel.js.map +0 -1
- package/lib/agent/src/factory/createAgenticaHistory.d.ts +0 -7
- package/lib/agent/src/factory/createAgenticaHistory.js +0 -26
- package/lib/agent/src/factory/createAgenticaHistory.js.map +0 -1
- package/lib/agent/src/factory/createAutoBeApplication.d.ts +0 -7
- package/lib/agent/src/factory/createAutoBeApplication.js +0 -40
- package/lib/agent/src/factory/createAutoBeApplication.js.map +0 -1
- package/lib/agent/src/factory/createAutoBeState.d.ts +0 -3
- package/lib/agent/src/factory/createAutoBeState.js +0 -16
- package/lib/agent/src/factory/createAutoBeState.js.map +0 -1
- package/lib/agent/src/factory/index.d.ts +0 -2
- package/lib/agent/src/factory/index.js +0 -19
- package/lib/agent/src/factory/index.js.map +0 -1
- package/lib/agent/src/factory/invertOpenApiDocument.d.ts +0 -3
- package/lib/agent/src/factory/invertOpenApiDocument.js +0 -51
- package/lib/agent/src/factory/invertOpenApiDocument.js.map +0 -1
- package/lib/agent/src/index.d.ts +0 -9
- package/lib/agent/src/index.js +0 -49
- package/lib/agent/src/index.js.map +0 -1
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.d.ts +0 -2
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.js +0 -46
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.js.map +0 -1
- package/lib/agent/src/orchestrate/index.d.ts +0 -5
- package/lib/agent/src/orchestrate/index.js +0 -14
- package/lib/agent/src/orchestrate/index.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/OpenApiEndpointComparator.d.ts +0 -5
- package/lib/agent/src/orchestrate/interface/OpenApiEndpointComparator.js +0 -16
- package/lib/agent/src/orchestrate/interface/OpenApiEndpointComparator.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.d.ts +0 -5
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js +0 -61
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComponents.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComponents.js +0 -208
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComponents.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js +0 -86
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +0 -154
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/transformInterfaceHistories.d.ts +0 -3
- package/lib/agent/src/orchestrate/interface/transformInterfaceHistories.js +0 -94
- package/lib/agent/src/orchestrate/interface/transformInterfaceHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/orchestrateAnalyze.d.ts +0 -6
- package/lib/agent/src/orchestrate/orchestrateAnalyze.js +0 -76
- package/lib/agent/src/orchestrate/orchestrateAnalyze.js.map +0 -1
- package/lib/agent/src/orchestrate/orchestrateRealize.d.ts +0 -5
- package/lib/agent/src/orchestrate/orchestrateRealize.js +0 -19
- package/lib/agent/src/orchestrate/orchestrateRealize.js.map +0 -1
- package/lib/agent/src/orchestrate/orchestrateTest.d.ts +0 -5
- package/lib/agent/src/orchestrate/orchestrateTest.js +0 -19
- package/lib/agent/src/orchestrate/orchestrateTest.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.d.ts +0 -5
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js +0 -103
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCompiler.d.ts +0 -6
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCompiler.js +0 -127
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCompiler.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.d.ts +0 -5
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js +0 -80
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchema.d.ts +0 -7
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchema.js +0 -124
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchema.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/transformPrismaCompilerHistories.d.ts +0 -3
- package/lib/agent/src/orchestrate/prisma/transformPrismaCompilerHistories.js +0 -44
- package/lib/agent/src/orchestrate/prisma/transformPrismaCompilerHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/transformPrismaComponentsHistories.d.ts +0 -3
- package/lib/agent/src/orchestrate/prisma/transformPrismaComponentsHistories.js +0 -42
- package/lib/agent/src/orchestrate/prisma/transformPrismaComponentsHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/transformPrismaSchemaHistories.d.ts +0 -3
- package/lib/agent/src/orchestrate/prisma/transformPrismaSchemaHistories.js +0 -46
- package/lib/agent/src/orchestrate/prisma/transformPrismaSchemaHistories.js.map +0 -1
- package/lib/agent/src/structures/IAutoBeConfig.d.ts +0 -24
- package/lib/agent/src/structures/IAutoBeConfig.js +0 -3
- package/lib/agent/src/structures/IAutoBeConfig.js.map +0 -1
- package/lib/agent/src/structures/IAutoBeProps.d.ts +0 -11
- package/lib/agent/src/structures/IAutoBeProps.js +0 -3
- package/lib/agent/src/structures/IAutoBeProps.js.map +0 -1
- package/lib/agent/src/structures/IAutoBeVendor.d.ts +0 -2
- package/lib/agent/src/structures/IAutoBeVendor.js +0 -3
- package/lib/agent/src/structures/IAutoBeVendor.js.map +0 -1
- package/lib/agent/src/utils/StringUtil.d.ts +0 -4
- package/lib/agent/src/utils/StringUtil.js +0 -43
- package/lib/agent/src/utils/StringUtil.js.map +0 -1
- package/lib/agent/src/utils/divideArray.d.ts +0 -4
- package/lib/agent/src/utils/divideArray.js +0 -19
- package/lib/agent/src/utils/divideArray.js.map +0 -1
- package/lib/agent/src/utils/emplaceMap.d.ts +0 -1
- package/lib/agent/src/utils/emplaceMap.js +0 -13
- package/lib/agent/src/utils/emplaceMap.js.map +0 -1
- package/lib/rpc/src/AutoBeRpcService.js.map +0 -1
- package/lib/rpc/src/index.js.map +0 -1
- /package/lib/{rpc/src/AutoBeRpcService.js → AutoBeRpcService.js} +0 -0
- /package/lib/{rpc/src/index.d.ts → index.d.ts} +0 -0
- /package/lib/{rpc/src/index.js → index.js} +0 -0
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.orchestrateInterfaceOperations = orchestrateInterfaceOperations;
|
|
16
|
-
const core_1 = require("@agentica/core");
|
|
17
|
-
const tstl_1 = require("tstl");
|
|
18
|
-
const typia_1 = __importDefault(require("typia"));
|
|
19
|
-
const assertSchemaModel_1 = require("../../context/assertSchemaModel");
|
|
20
|
-
const divideArray_1 = require("../../utils/divideArray");
|
|
21
|
-
const OpenApiEndpointComparator_1 = require("./OpenApiEndpointComparator");
|
|
22
|
-
const transformInterfaceHistories_1 = require("./transformInterfaceHistories");
|
|
23
|
-
function orchestrateInterfaceOperations(ctx_1, endpoints_1) {
|
|
24
|
-
return __awaiter(this, arguments, void 0, function* (ctx, endpoints, capacity = 12) {
|
|
25
|
-
const matrix = (0, divideArray_1.divideArray)({
|
|
26
|
-
array: endpoints,
|
|
27
|
-
capacity,
|
|
28
|
-
});
|
|
29
|
-
let completed = 0;
|
|
30
|
-
const operations = yield Promise.all(matrix.map((it) => __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
var _a, _b;
|
|
32
|
-
const row = yield divideAndConquer(ctx, it, 3, (count) => {
|
|
33
|
-
completed += count;
|
|
34
|
-
});
|
|
35
|
-
ctx.dispatch({
|
|
36
|
-
type: "interfaceOperations",
|
|
37
|
-
operations: row,
|
|
38
|
-
completed,
|
|
39
|
-
total: endpoints.length,
|
|
40
|
-
step: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
|
|
41
|
-
created_at: new Date().toISOString(),
|
|
42
|
-
});
|
|
43
|
-
return row;
|
|
44
|
-
})));
|
|
45
|
-
return operations.flat();
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
function divideAndConquer(ctx, endpoints, retry, progress) {
|
|
49
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
const remained = new tstl_1.HashSet(endpoints, OpenApiEndpointComparator_1.OpenApiEndpointComparator.hashCode, OpenApiEndpointComparator_1.OpenApiEndpointComparator.equals);
|
|
51
|
-
const operations = new tstl_1.HashMap(OpenApiEndpointComparator_1.OpenApiEndpointComparator.hashCode, OpenApiEndpointComparator_1.OpenApiEndpointComparator.equals);
|
|
52
|
-
for (let i = 0; i < retry; ++i) {
|
|
53
|
-
if (remained.empty() === true || operations.size() >= endpoints.length)
|
|
54
|
-
break;
|
|
55
|
-
const before = operations.size();
|
|
56
|
-
const newbie = yield process(ctx, Array.from(remained));
|
|
57
|
-
for (const item of newbie) {
|
|
58
|
-
operations.set(item, item);
|
|
59
|
-
remained.erase(item);
|
|
60
|
-
}
|
|
61
|
-
if (operations.size() - before !== 0)
|
|
62
|
-
progress(operations.size() - before);
|
|
63
|
-
}
|
|
64
|
-
return operations.toJSON().map((it) => it.second);
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
function process(ctx, endpoints) {
|
|
68
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
-
var _a;
|
|
70
|
-
const pointer = {
|
|
71
|
-
value: null,
|
|
72
|
-
};
|
|
73
|
-
const agentica = new core_1.MicroAgentica({
|
|
74
|
-
model: ctx.model,
|
|
75
|
-
vendor: ctx.vendor,
|
|
76
|
-
config: Object.assign(Object.assign({}, ((_a = ctx.config) !== null && _a !== void 0 ? _a : {})), { executor: {
|
|
77
|
-
describe: null,
|
|
78
|
-
} }),
|
|
79
|
-
histories: (0, transformInterfaceHistories_1.transformInterfaceHistories)(ctx.state(), "# API Endpoint Generator System Prompt\n\n## 1. Overview\n\nYou are the API Endpoint Generator, specializing in creating comprehensive lists of REST API endpoints with their paths and HTTP methods based on requirements documents, Prisma schema files, and ERD diagrams. You must output your results by calling the `makeEndpoints()` function.\n\n## 2. Your Mission\n\nAnalyze the provided information and generate a complete array of API endpoints that includes EVERY entity from the Prisma schema and addresses ALL functional requirements. You will call the `makeEndpoints()` function with an array of endpoint definitions that contain ONLY path and method properties.\n\n## 3. Output Method\n\nYou MUST call the `makeEndpoints()` function with your results.\n\n```typescript\nmakeEndpoints({\n endpoints: [\n {\n \"path\": \"/resources\",\n \"method\": \"get\"\n },\n {\n \"path\": \"/resources/{resourceId}\",\n \"method\": \"get\"\n },\n // more endpoints...\n ],\n});\n```\n\n## 4. Endpoint Design Principles\n\n### 4.1. Follow REST principles\n\n- Resource-centric URL design (use nouns, not verbs)\n- Appropriate HTTP methods:\n - `put`: Retrieve a collection resources with searching information\n - `get`: Retrieve a single resource\n - `post`: Create new resources\n - `delete`: Remove resources\n - `patch`: Partial updates or complex queries with request bodies\n\n### 4.2. Path Formatting Rules\n\n1. **Use camelCase for all resource names in paths**\n - Example: Use `/attachmentFiles` instead of `/attachment-files`\n\n2. **Use domain prefixes with slashes**\n - Example: Use `/shopping/channels` instead of `/shopping-channels`\n - **Important**: If you identify any service-related prefix in the DB schema, use it as the global prefix for ALL API endpoints\n\n3. **Structure hierarchical relationships with slashes**\n - Example: For a child entity like \"sale-snapshots\" under \"sales\", use `/shopping/sales/snapshots` instead of `/shopping-sale-snapshots`\n\n### 4.3. Path patterns\n\n- Collection endpoints: `/domain/resources`\n- Single resource endpoints: `/domain/resources/{resourceId}`\n- Nested resources: `/domain/resources/{resourceId}/subsidiaries/{subsidiaryId}`\n\n### 4.4. Standard API operations per entity\n\nFor EACH independent entity identified in the requirements document, Prisma DB Schema, and ERD diagram, you MUST include these standard endpoints:\n\n1. `PATCH /entity-plural` - List entities with searching\n2. `GET /entity-plural/{id}` - Get specific entity\n3. `POST /entity-plural` - Create entity\n4. `PUT /entity-plural/{id}` - Update entity\n5. `DELETE /entity-plural/{id}` - Delete entity\n\n## 5. Critical Requirements\n\n- **Function Call Required**: You MUST use the `makeEndpoints()` function to submit your results\n- **Complete Coverage**: EVERY independent entity in the Prisma schema MUST have corresponding endpoints\n- **No Omissions**: Process ALL independent entities regardless of quantity\n- **Strict Output Format**: ONLY include objects with `path` and `method` properties in your function call\n- **No Additional Properties**: Do NOT include any properties beyond `path` and `method`\n\n## 6. Implementation Strategy\n\n1. Identify ALL independent entities from the Prisma schema, requirements document, and ERD\n2. Identify service-related prefixes in the DB schema to use as the global prefix for ALL API endpoints\n3. Identify domain prefixes and hierarchical relationships between entities\n4. For each independent entity:\n - Convert kebab-case names to camelCase (e.g., `attachment-files` \u2192 `attachmentFiles`)\n - Structure paths to reflect domain and hierarchical relationships\n - Generate the standard endpoints\n5. Add endpoints for relationships and complex operations\n6. Verify ALL independent entities and requirements are covered\n7. Call the `makeEndpoints()` function with your complete array\n\nYour implementation MUST be COMPLETE and EXHAUSTIVE, ensuring NO independent entity or requirement is missed, while strictly adhering to the `AutoBeOpenApi.IEndpoint` interface format. Calling the `makeEndpoints()` function is MANDATORY.\n\n## 7. Path Transformation Examples\n\n| Original Format | Improved Format | Explanation |\n|-----------------|-----------------|-------------|\n| `/attachment-files` | `/attachmentFiles` | Convert kebab-case to camelCase |\n| `/bbs-articles` | `/bbs/articles` | Separate domain prefix with slash |\n| `/bbs-article-snapshots` | `/bbs/articles/snapshots` | Reflect hierarchy in URL structure |\n| `/shopping-sale-snapshots` | `/shopping/sales/snapshots` | Both domain prefix and hierarchy properly formatted |\n\nYour implementation MUST be COMPLETE and EXHAUSTIVE, ensuring NO independent entity or requirement is missed, while strictly adhering to the `AutoBeOpenApi.IEndpoint` interface format. Calling the `makeEndpoints()` function is MANDATORY.\n\nYou're right - I removed too much of the original structure. Here's a better version that maintains the section structure while adding explanations:\n\n## 8. Example Cases\n\nBelow are example projects that demonstrate the proper endpoint formatting.\n\n### 8.1. BBS (Bulletin Board System)\n\n```json\n{\"endpoints\":[{\"path\":\"/bbs/articles\",\"method\":\"post\"},{\"path\":\"/bbs/articles\",\"method\":\"patch\"},{\"path\":\"/bbs/articles/abridges\",\"method\":\"patch\"},{\"path\":\"/bbs/articles/{id}\",\"method\":\"get\"},{\"path\":\"/bbs/articles/{id}\",\"method\":\"put\"},{\"path\":\"/bbs/articles/{id}\",\"method\":\"delete\"},{\"path\":\"/bbs/articles/{articleId}/comments\",\"method\":\"post\"},{\"path\":\"/bbs/articles/{articleId}/comments\",\"method\":\"patch\"},{\"path\":\"/bbs/articles/{articleId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/bbs/articles/{articleId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/bbs/articles/{articleId}/comments/{id}\",\"method\":\"delete\"},{\"path\":\"/monitors/health\",\"method\":\"get\"},{\"path\":\"/monitors/performance\",\"method\":\"get\"},{\"path\":\"/monitors/system\",\"method\":\"get\"}]}\n```\n\n**Key points**: Notice how the domain prefix \"bbs\" is separated with a slash, entities use camelCase, and hierarchical relationships are expressed (e.g., `/bbs/articles/{articleId}/comments`).\n\n### 8.2. Shopping Mall\n\n```json\n{\"endpoints\":[{\"path\":\"/monitors/health\",\"method\":\"get\"},{\"path\":\"/monitors/performance\",\"method\":\"get\"},{\"path\":\"/monitors/system\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/authenticate\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/authenticate\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/authenticate/login\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/coupons\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/coupons\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/coupons/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/coupons/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/deposits\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/deposits\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/deposits/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/deposits/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/deposits/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/mileages\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/mileages\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/mileages/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/mileages/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/mileages/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/mileages/donations\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/mileages/donations\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/mileages/donations/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/orders\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/orders/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/details\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/snapshots\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/snapshots/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/snapshots/{id}/flip\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories/merge\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories/{id}/invert\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/channels\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/systematic/channels\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/systematic/channels/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/channels/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/systematic/channels/merge\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/systematic/channels/hierarchical\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/systematic/channels/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/sections\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/systematic/sections\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/systematic/sections/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/sections/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/systematic/sections/merge\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/systematic/sections/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/authenticate/refresh\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/authenticate\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/authenticate\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/authenticate/join\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/authenticate/login\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/authenticate/activate\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/authenticate/external\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/authenticate/password/change\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/coupons\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/coupons/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/coupons/tickets\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/coupons/tickets\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/coupons/tickets/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/deposits/charges\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/deposits/charges\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/deposits/charges/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/deposits/charges/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/deposits/charges/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/customers/deposits/charges/{chargeId}/publish/able\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/deposits/charges/{chargeId}/publish\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/deposits/histories\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/deposits/histories/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/deposits/histories/balance\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/mileages/histories\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/mileages/histories/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/mileages/histories/balance\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/carts/commodities\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/carts/commodities\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/carts/commodities/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/carts/commodities/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/carts/commodities/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/customers/carts/commodities/{id}/replica\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/carts/commodities/discountable\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/orders\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/orders\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/orders/direct\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/orders/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/orders/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/customers/orders/{id}/price\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/orders/{id}/discountable\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/orders/{id}/discount\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/orders/{orderId}/goods/{id}/confirm\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/orders/{orderId}/publish/able\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/orders/{orderId}/publish\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/orders/{orderId}/publish\",\"method\":\"delete\"},{\"path\":\"/shoppings/customers/sales/details\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{id}\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{id}\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/snapshots\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/snapshots/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/snapshots/{id}/flip\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/channels/{channelCode}/categories\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/systematic/channels/{channelCode}/categories/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/channels/{channelCode}/categories/{id}/invert\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/channels\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/systematic/channels/hierarchical\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/systematic/channels/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/channels/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/sections\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/systematic/sections/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/sections/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/authenticate\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/authenticate\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/authenticate/login\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/deliveries\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/deliveries\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/deliveries/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/deliveries/incompletes\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/deliveries/{deliveryId}/journeys\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/deliveries/{deliveryId}/journeys/{id}/complete\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/deliveries/{deliveryId}/journeys/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/sellers/deliveries/{deliveryId}/shippers\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/coupons\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/coupons\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/coupons/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/coupons/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/sellers/orders\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/orders/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{id}/open\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{id}/replica\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{id}/pause\",\"method\":\"delete\"},{\"path\":\"/shoppings/sellers/sales/{id}/suspend\",\"method\":\"delete\"},{\"path\":\"/shoppings/sellers/sales/{id}/restore\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/details\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{questionId}/answer\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{questionId}/answer\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{reviewId}/answer\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{reviewId}/answer\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/snapshots/{id}/replica\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/snapshots\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/snapshots/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/snapshots/{id}/flip\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/units/{unitId}/stocks/{stockId}/supplements\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/units/{unitId}/stocks/{stockId}/supplements\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/units/{unitId}/stocks/{stockId}/supplements/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/units/{unitId}/stocks/{stockId}/supplements/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/sellers/systematic/channels/{channelCode}/categories\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/systematic/channels/{channelCode}/categories/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/systematic/channels/{channelCode}/categories/{id}/invert\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/systematic/channels\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/systematic/channels/hierarchical\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/systematic/channels/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/systematic/channels/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/systematic/sections\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/systematic/sections/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/systematic/sections/{code}/get\",\"method\":\"get\"}]}\n```\n\n**Key points**: Observe how `/shopping` is used as domain prefix, hierarchical relationships are reflected in paths (e.g., `/shopping/sales/{saleId}/reviews/{reviewId}`), and consistent HTTP methods are applied across similar operations." /* AutoBeSystemPromptConstant.INTERFACE_ENDPOINT */),
|
|
80
|
-
tokenUsage: ctx.usage(),
|
|
81
|
-
controllers: [
|
|
82
|
-
createApplication({
|
|
83
|
-
model: ctx.model,
|
|
84
|
-
build: (endpoints) => __awaiter(this, void 0, void 0, function* () {
|
|
85
|
-
pointer.value = endpoints;
|
|
86
|
-
}),
|
|
87
|
-
pointer,
|
|
88
|
-
}),
|
|
89
|
-
],
|
|
90
|
-
});
|
|
91
|
-
agentica.on("request", (event) => __awaiter(this, void 0, void 0, function* () {
|
|
92
|
-
event.body.tool_choice = "required";
|
|
93
|
-
}));
|
|
94
|
-
yield agentica.conversate([
|
|
95
|
-
"Make API operations for below endpoints:",
|
|
96
|
-
"",
|
|
97
|
-
"```json",
|
|
98
|
-
JSON.stringify(Array.from(endpoints), null, 2),
|
|
99
|
-
"```",
|
|
100
|
-
].join("\n"));
|
|
101
|
-
if (pointer.value === null)
|
|
102
|
-
throw new Error("Failed to create operations."); // never be happened
|
|
103
|
-
return pointer.value;
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
function createApplication(props) {
|
|
107
|
-
(0, assertSchemaModel_1.assertSchemaModel)(props.model);
|
|
108
|
-
const application = collection[props.model];
|
|
109
|
-
application.functions[0].validate = (next) => {
|
|
110
|
-
const result = typia_1.default.validate(next);
|
|
111
|
-
if (result.success === false)
|
|
112
|
-
return result;
|
|
113
|
-
props.pointer.value = result.data.operations;
|
|
114
|
-
const errors = [];
|
|
115
|
-
result.data.operations.forEach((op, i) => {
|
|
116
|
-
if (op.method === "get" && op.requestBody !== null)
|
|
117
|
-
errors.push({
|
|
118
|
-
path: `operations[${i}].requestBody`,
|
|
119
|
-
expected: "GET method should not have request body. Change method, or re-design the operation.",
|
|
120
|
-
value: op.requestBody,
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
if (errors.length !== 0)
|
|
124
|
-
return {
|
|
125
|
-
success: false,
|
|
126
|
-
errors,
|
|
127
|
-
data: next,
|
|
128
|
-
};
|
|
129
|
-
return result;
|
|
130
|
-
};
|
|
131
|
-
return {
|
|
132
|
-
protocol: "class",
|
|
133
|
-
name: "interface",
|
|
134
|
-
application,
|
|
135
|
-
execute: {
|
|
136
|
-
makeOperations: (next) => __awaiter(this, void 0, void 0, function* () {
|
|
137
|
-
yield props.build(next.operations);
|
|
138
|
-
return {
|
|
139
|
-
success: true,
|
|
140
|
-
};
|
|
141
|
-
}),
|
|
142
|
-
},
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
const claude = typia_1.default.llm.application();
|
|
146
|
-
const collection = {
|
|
147
|
-
chatgpt: typia_1.default.llm.application(),
|
|
148
|
-
claude,
|
|
149
|
-
llama: claude,
|
|
150
|
-
deepseek: claude,
|
|
151
|
-
"3.1": claude,
|
|
152
|
-
"3.0": typia_1.default.llm.application(),
|
|
153
|
-
};
|
|
154
|
-
//# sourceMappingURL=orchestrateInterfaceOperations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateInterfaceOperations.js","sourceRoot":"","sources":["../../../../../../agent/src/orchestrate/interface/orchestrateInterfaceOperations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAaA,wEAkCC;AA/CD,yCAAoE;AAGpE,+BAAkD;AAClD,kDAA0B;AAI1B,uEAAoE;AACpE,yDAAsD;AACtD,2EAAwE;AACxE,+EAA4E;AAE5E,SAAsB,8BAA8B;yDAGlD,GAAyB,EACzB,SAAoC,EACpC,WAAmB,EAAE;QAErB,MAAM,MAAM,GAAgC,IAAA,yBAAW,EAAC;YACtD,KAAK,EAAE,SAAS;YAChB,QAAQ;SACT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WAAW,KAAK,IAAI;gBAChD,MAAM,CAAC,IAAI,CAAC;oBACV,IAAI,EAAE,cAAc,CAAC,eAAe;oBACpC,QAAQ,EACN,qFAAqF;oBACvF,KAAK,EAAE,EAAE,CAAC,WAAW;iBACtB,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QACH,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;YACrB,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,MAAM;gBACN,IAAI,EAAE,IAAI;aACX,CAAC;QACJ,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;IACF,OAAO;QACL,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,WAAW;QACjB,WAAW;QACX,OAAO,EAAE;YACP,cAAc,EAAE,CAAO,IAAI,EAAE,EAAE;gBAC7B,MAAM,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBACnC,OAAO;oBACL,OAAO,EAAE,IAAI;iBACd,CAAC;YACJ,CAAC,CAAA;SACqB;KACzB,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,eAAK,CAAC,GAAG,CAAC,WAAW,EAIjC,CAAC;AACJ,MAAM,UAAU,GAAG;IACjB,OAAO,EAAE,eAAK,CAAC,GAAG,CAAC,WAAW,EAI3B;IACH,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,eAAK,CAAC,GAAG,CAAC,WAAW,EAAuB;CACpD,CAAC"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
-
import { AutoBeState } from "../../context/AutoBeState";
|
|
3
|
-
export declare const transformInterfaceHistories: (state: AutoBeState, systemMessage: string) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformInterfaceHistories = void 0;
|
|
4
|
-
const transformInterfaceHistories = (state, systemMessage) => {
|
|
5
|
-
if (state.analyze === null)
|
|
6
|
-
return [
|
|
7
|
-
{
|
|
8
|
-
type: "systemMessage",
|
|
9
|
-
text: [
|
|
10
|
-
"Requirement analysis is not yet completed.",
|
|
11
|
-
"Don't call the any tool function,",
|
|
12
|
-
"but say to process the requirement analysis.",
|
|
13
|
-
].join(" "),
|
|
14
|
-
},
|
|
15
|
-
];
|
|
16
|
-
else if (state.prisma === null)
|
|
17
|
-
return [
|
|
18
|
-
{
|
|
19
|
-
type: "systemMessage",
|
|
20
|
-
text: [
|
|
21
|
-
"Prisma DB schema generation is not yet completed.",
|
|
22
|
-
"Don't call the any tool function,",
|
|
23
|
-
"but say to process the Prisma DB schema generation.",
|
|
24
|
-
].join(" "),
|
|
25
|
-
},
|
|
26
|
-
];
|
|
27
|
-
else if (state.analyze.step !== state.prisma.step)
|
|
28
|
-
return [
|
|
29
|
-
{
|
|
30
|
-
type: "systemMessage",
|
|
31
|
-
text: [
|
|
32
|
-
"Prisma DB schema generation has not been updated",
|
|
33
|
-
"for the latest requirement analysis.",
|
|
34
|
-
"Don't call the any tool function,",
|
|
35
|
-
"but say to re-process the Prisma DB schema generation.",
|
|
36
|
-
].join(" "),
|
|
37
|
-
},
|
|
38
|
-
];
|
|
39
|
-
else if (state.prisma.result.type !== "success")
|
|
40
|
-
return [
|
|
41
|
-
{
|
|
42
|
-
type: "systemMessage",
|
|
43
|
-
text: [
|
|
44
|
-
"Prisma DB schema generation has not been updated",
|
|
45
|
-
"for the latest requirement analysis.",
|
|
46
|
-
"Don't call the any tool function,",
|
|
47
|
-
"but say to re-process the Prisma DB schema generation.",
|
|
48
|
-
].join(" "),
|
|
49
|
-
},
|
|
50
|
-
];
|
|
51
|
-
return [
|
|
52
|
-
{
|
|
53
|
-
type: "systemMessage",
|
|
54
|
-
text: systemMessage,
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
type: "assistantMessage",
|
|
58
|
-
text: [
|
|
59
|
-
"Requirement analysis and Prisma DB schema generation are ready.",
|
|
60
|
-
"",
|
|
61
|
-
"Call the provided tool function to generate the OpenAPI document",
|
|
62
|
-
"referencing below requirement analysis and Prisma DB schema.",
|
|
63
|
-
"",
|
|
64
|
-
// User Request
|
|
65
|
-
`## User Request`,
|
|
66
|
-
"",
|
|
67
|
-
state.analyze.reason,
|
|
68
|
-
"",
|
|
69
|
-
// Requirement Analysis Report
|
|
70
|
-
`## Requirement Analysis Report`,
|
|
71
|
-
"",
|
|
72
|
-
"```json",
|
|
73
|
-
JSON.stringify(state.analyze.files),
|
|
74
|
-
"```",
|
|
75
|
-
].join("\n"),
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
type: "assistantMessage",
|
|
79
|
-
text: [
|
|
80
|
-
"## Prisma DB Schema",
|
|
81
|
-
"```json",
|
|
82
|
-
JSON.stringify(state.prisma.result.schemas),
|
|
83
|
-
"```",
|
|
84
|
-
"",
|
|
85
|
-
"## Entity Relationship Diagrams",
|
|
86
|
-
"```json",
|
|
87
|
-
JSON.stringify(state.prisma.result.diagrams),
|
|
88
|
-
"```",
|
|
89
|
-
].join("\n"),
|
|
90
|
-
},
|
|
91
|
-
];
|
|
92
|
-
};
|
|
93
|
-
exports.transformInterfaceHistories = transformInterfaceHistories;
|
|
94
|
-
//# sourceMappingURL=transformInterfaceHistories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transformInterfaceHistories.js","sourceRoot":"","sources":["../../../../../../agent/src/orchestrate/interface/transformInterfaceHistories.ts"],"names":[],"mappings":";;;AAIO,MAAM,2BAA2B,GAAG,CACzC,KAAkB,EAClB,aAAqB,EAGrB,EAAE;IACF,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI;QACxB,OAAO;YACL;gBACE,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE;oBACJ,4CAA4C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AI,CAAC;SACb;QACD;YACE,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE;gBACJ,qBAAqB;gBACrB,SAAS;gBACT,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;gBAC3C,KAAK;gBACL,EAAE;gBACF,iCAAiC;gBACjC,SAAS;gBACT,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;gBAC5C,KAAK;aACN,CAAC,IAAI,CAAC,IAAI,CAAC;SACb;KACF,CAAC;AACJ,CAAC,CAAC;AA7FW,QAAA,2BAA2B,+BA6FtC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AutoBeAnalyzeHistory, AutoBeAssistantMessageHistory } from "@autobe/interface";
|
|
2
|
-
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
-
import { AutoBeContext } from "../context/AutoBeContext";
|
|
4
|
-
import { IAutoBeApplicationProps } from "../context/IAutoBeApplicationProps";
|
|
5
|
-
/** @todo Kakasoo */
|
|
6
|
-
export declare const orchestrateAnalyze: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>) => (props: IAutoBeApplicationProps) => Promise<AutoBeAssistantMessageHistory | AutoBeAnalyzeHistory>;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.orchestrateAnalyze = void 0;
|
|
13
|
-
const uuid_1 = require("uuid");
|
|
14
|
-
const AnalyzeAgent_1 = require("../analyze/AnalyzeAgent");
|
|
15
|
-
const CreateReviewerAgent_1 = require("../analyze/CreateReviewerAgent");
|
|
16
|
-
/** @todo Kakasoo */
|
|
17
|
-
const orchestrateAnalyze = (ctx) => (props) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
-
var _a, _b, _c;
|
|
19
|
-
const pointer = {
|
|
20
|
-
value: null,
|
|
21
|
-
};
|
|
22
|
-
const userPlanningRequirements = props.userPlanningRequirements;
|
|
23
|
-
if (!userPlanningRequirements) {
|
|
24
|
-
throw new Error(`Unable to prepare a proposal because there is no user requirement`);
|
|
25
|
-
}
|
|
26
|
-
const step = (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0;
|
|
27
|
-
const created_at = new Date().toISOString();
|
|
28
|
-
ctx.dispatch({
|
|
29
|
-
type: "analyzeStart",
|
|
30
|
-
reason: userPlanningRequirements,
|
|
31
|
-
step,
|
|
32
|
-
created_at,
|
|
33
|
-
});
|
|
34
|
-
const agent = new AnalyzeAgent_1.AnalyzeAgent(CreateReviewerAgent_1.createReviewerAgent, ctx, pointer);
|
|
35
|
-
const response = yield agent.conversate([
|
|
36
|
-
`Please write a user requirement report.`,
|
|
37
|
-
"```json",
|
|
38
|
-
JSON.stringify(userPlanningRequirements),
|
|
39
|
-
"```",
|
|
40
|
-
].join("\n"));
|
|
41
|
-
if ((_c = pointer.value) === null || _c === void 0 ? void 0 : _c.files) {
|
|
42
|
-
const history = {
|
|
43
|
-
id: (0, uuid_1.v4)(),
|
|
44
|
-
type: "analyze",
|
|
45
|
-
reason: userPlanningRequirements,
|
|
46
|
-
files: pointer.value.files,
|
|
47
|
-
step,
|
|
48
|
-
created_at,
|
|
49
|
-
completed_at: new Date().toISOString(),
|
|
50
|
-
};
|
|
51
|
-
ctx.state().analyze = history;
|
|
52
|
-
ctx.histories().push(history);
|
|
53
|
-
ctx.dispatch({
|
|
54
|
-
type: "analyzeComplete",
|
|
55
|
-
files: pointer.value.files,
|
|
56
|
-
step,
|
|
57
|
-
created_at,
|
|
58
|
-
});
|
|
59
|
-
return history;
|
|
60
|
-
}
|
|
61
|
-
const history = {
|
|
62
|
-
id: (0, uuid_1.v4)(),
|
|
63
|
-
type: "assistantMessage",
|
|
64
|
-
text: response,
|
|
65
|
-
created_at,
|
|
66
|
-
completed_at: new Date().toISOString(),
|
|
67
|
-
};
|
|
68
|
-
ctx.dispatch({
|
|
69
|
-
type: "assistantMessage",
|
|
70
|
-
text: response,
|
|
71
|
-
created_at,
|
|
72
|
-
});
|
|
73
|
-
return history;
|
|
74
|
-
});
|
|
75
|
-
exports.orchestrateAnalyze = orchestrateAnalyze;
|
|
76
|
-
//# sourceMappingURL=orchestrateAnalyze.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateAnalyze.js","sourceRoot":"","sources":["../../../../../agent/src/orchestrate/orchestrateAnalyze.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,+BAA0B;AAE1B,0DAAuD;AACvD,wEAAqE;AAOrE,oBAAoB;AACb,MAAM,kBAAkB,GAC7B,CAAiC,GAAyB,EAAE,EAAE,CAC9D,CACE,KAA8B,EACiC,EAAE;;IACjE,MAAM,OAAO,GAA8D;QACzE,KAAK,EAAE,IAAI;KACZ,CAAC;IAEF,MAAM,wBAAwB,GAAG,KAAK,CAAC,wBAAwB,CAAC;IAChE,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CACb,mEAAmE,CACpE,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,GAAG,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,0CAAE,IAAI,mCAAI,CAAC,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AI,EAAE,CAAC,WAAW,EAAE;KACvC,CAAC;IACF,GAAG,CAAC,QAAQ,CAAC;QACX,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,QAAQ;QACd,UAAU;KACX,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC,CAAA,CAAC;AApES,QAAA,kBAAkB,sBAoE3B"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { AutoBeAssistantMessageHistory, AutoBeRealizeHistory } from "@autobe/interface";
|
|
2
|
-
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
-
import { AutoBeContext } from "../context/AutoBeContext";
|
|
4
|
-
import { IAutoBeApplicationProps } from "../context/IAutoBeApplicationProps";
|
|
5
|
-
export declare const orchestrateRealize: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>) => (props: IAutoBeApplicationProps) => Promise<AutoBeAssistantMessageHistory | AutoBeRealizeHistory>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.orchestrateRealize = void 0;
|
|
13
|
-
const orchestrateRealize = (ctx) => (props) => __awaiter(void 0, void 0, void 0, function* () {
|
|
14
|
-
ctx;
|
|
15
|
-
props;
|
|
16
|
-
return null;
|
|
17
|
-
});
|
|
18
|
-
exports.orchestrateRealize = orchestrateRealize;
|
|
19
|
-
//# sourceMappingURL=orchestrateRealize.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateRealize.js","sourceRoot":"","sources":["../../../../../agent/src/orchestrate/orchestrateRealize.ts"],"names":[],"mappings":";;;;;;;;;;;;AASO,MAAM,kBAAkB,GAC7B,CAAiC,GAAyB,EAAE,EAAE,CAC9D,CACE,KAA8B,EACiC,EAAE;IACjE,GAAG,CAAC;IACJ,KAAK,CAAC;IACN,OAAO,IAAK,CAAC;AACf,CAAC,CAAA,CAAC;AARS,QAAA,kBAAkB,sBAQ3B"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { AutoBeAssistantMessageHistory, AutoBeTestHistory } from "@autobe/interface";
|
|
2
|
-
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
-
import { AutoBeContext } from "../context/AutoBeContext";
|
|
4
|
-
import { IAutoBeApplicationProps } from "../context/IAutoBeApplicationProps";
|
|
5
|
-
export declare const orchestrateTest: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>) => (props: IAutoBeApplicationProps) => Promise<AutoBeAssistantMessageHistory | AutoBeTestHistory>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.orchestrateTest = void 0;
|
|
13
|
-
const orchestrateTest = (ctx) => (props) => __awaiter(void 0, void 0, void 0, function* () {
|
|
14
|
-
ctx;
|
|
15
|
-
props;
|
|
16
|
-
return null;
|
|
17
|
-
});
|
|
18
|
-
exports.orchestrateTest = orchestrateTest;
|
|
19
|
-
//# sourceMappingURL=orchestrateTest.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateTest.js","sourceRoot":"","sources":["../../../../../agent/src/orchestrate/orchestrateTest.ts"],"names":[],"mappings":";;;;;;;;;;;;AASO,MAAM,eAAe,GAC1B,CAAiC,GAAyB,EAAE,EAAE,CAC9D,CACE,KAA8B,EAC8B,EAAE;IAC9D,GAAG,CAAC;IACJ,KAAK,CAAC;IACN,OAAO,IAAK,CAAC;AACf,CAAC,CAAA,CAAC;AARS,QAAA,eAAe,mBAQxB"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { AutoBeAssistantMessageHistory, AutoBePrismaHistory } from "@autobe/interface";
|
|
2
|
-
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
-
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
|
-
import { IAutoBeApplicationProps } from "../../context/IAutoBeApplicationProps";
|
|
5
|
-
export declare const orchestratePrisma: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>) => (props: IAutoBeApplicationProps) => Promise<AutoBePrismaHistory | AutoBeAssistantMessageHistory>;
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
-
var t = {};
|
|
13
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
-
t[p] = s[p];
|
|
15
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
-
t[p[i]] = s[p[i]];
|
|
19
|
-
}
|
|
20
|
-
return t;
|
|
21
|
-
};
|
|
22
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.orchestratePrisma = void 0;
|
|
24
|
-
const uuid_1 = require("uuid");
|
|
25
|
-
const orchestratePrismaCompiler_1 = require("./orchestratePrismaCompiler");
|
|
26
|
-
const orchestratePrismaComponent_1 = require("./orchestratePrismaComponent");
|
|
27
|
-
const orchestratePrismaSchema_1 = require("./orchestratePrismaSchema");
|
|
28
|
-
const orchestratePrisma = (ctx) => (props) => __awaiter(void 0, void 0, void 0, function* () {
|
|
29
|
-
var _a, _b, _c, _d;
|
|
30
|
-
const start = new Date();
|
|
31
|
-
// COMPONENTS
|
|
32
|
-
const components = yield (0, orchestratePrismaComponent_1.orchestratePrismaComponents)(ctx);
|
|
33
|
-
if (components.type === "assistantMessage") {
|
|
34
|
-
ctx.dispatch(components);
|
|
35
|
-
ctx.histories().push(components);
|
|
36
|
-
return components;
|
|
37
|
-
}
|
|
38
|
-
else
|
|
39
|
-
ctx.dispatch(components);
|
|
40
|
-
// SCHEMAS
|
|
41
|
-
const events = yield (0, orchestratePrismaSchema_1.orchestratePrismaSchemas)(ctx, components.components);
|
|
42
|
-
// COMPILER
|
|
43
|
-
const files = Object.fromEntries(events.map((e) => [e.filename, e.content]));
|
|
44
|
-
const _e = yield (0, orchestratePrismaCompiler_1.orchestratePrismaCompiler)(ctx, files), { description } = _e, compiledResult = __rest(_e, ["description"]);
|
|
45
|
-
const result = processCompilerResult(compiledResult);
|
|
46
|
-
const history = {
|
|
47
|
-
type: "prisma",
|
|
48
|
-
id: (0, uuid_1.v4)(),
|
|
49
|
-
created_at: start.toISOString(),
|
|
50
|
-
completed_at: new Date().toISOString(),
|
|
51
|
-
reason: props.reason,
|
|
52
|
-
description,
|
|
53
|
-
result: result,
|
|
54
|
-
step: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
|
|
55
|
-
};
|
|
56
|
-
ctx.state().prisma = history;
|
|
57
|
-
ctx.histories().push(history);
|
|
58
|
-
if (result.type === "success")
|
|
59
|
-
ctx.dispatch({
|
|
60
|
-
type: "prismaComplete",
|
|
61
|
-
schemas: result.schemas,
|
|
62
|
-
document: result.document,
|
|
63
|
-
diagrams: result.diagrams,
|
|
64
|
-
step: (_d = (_c = ctx.state().analyze) === null || _c === void 0 ? void 0 : _c.step) !== null && _d !== void 0 ? _d : 0,
|
|
65
|
-
created_at: new Date().toISOString(),
|
|
66
|
-
});
|
|
67
|
-
return history;
|
|
68
|
-
});
|
|
69
|
-
exports.orchestratePrisma = orchestratePrisma;
|
|
70
|
-
/**
|
|
71
|
-
* Process the compiler result to generate the main Prisma schema file.
|
|
72
|
-
*
|
|
73
|
-
* If the compiler result is a success, the main Prisma schema file will be
|
|
74
|
-
* generated.
|
|
75
|
-
*
|
|
76
|
-
* @param result - The compiler result to process.
|
|
77
|
-
* @returns The processed compiler result with the main Prisma schema file.
|
|
78
|
-
*/
|
|
79
|
-
function processCompilerResult(result) {
|
|
80
|
-
const content = `
|
|
81
|
-
generator client {
|
|
82
|
-
provider = "prisma-client-js"
|
|
83
|
-
previewFeatures = ["postgresqlExtensions", "views"]
|
|
84
|
-
binaryTargets = ["native", "linux-musl-arm64-openssl-3.0.x"]
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
datasource db {
|
|
88
|
-
provider = "postgresql"
|
|
89
|
-
url = env("DATABASE_URL")
|
|
90
|
-
extensions = []
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
generator markdown {
|
|
94
|
-
provider = "prisma-markdown"
|
|
95
|
-
output = "../docs/ERD.md"
|
|
96
|
-
}
|
|
97
|
-
`;
|
|
98
|
-
if (result.type === "success") {
|
|
99
|
-
return Object.assign(Object.assign({}, result), { schemas: Object.assign(Object.assign({}, result.schemas), { "main.prisma": content }) });
|
|
100
|
-
}
|
|
101
|
-
return result;
|
|
102
|
-
}
|
|
103
|
-
//# sourceMappingURL=orchestratePrisma.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"orchestratePrisma.js","sourceRoot":"","sources":["../../../../../../agent/src/orchestrate/prisma/orchestratePrisma.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAOA,+BAA0B;AAI1B,2EAAwE;AACxE,6EAA2E;AAC3E,uEAAqE;AAE9D,MAAM,iBAAiB,GAC5B,CAAiC,GAAyB,EAAE,EAAE,CAC9D,CACE,KAA8B,EACgC,EAAE;;IAChE,MAAM,KAAK,GAAS,IAAI,IAAI,EAAE,CAAC;IAE/B,aAAa;IACb,MAAM,UAAU,GAAG,MAAM,IAAA,wDAA2B,EAAC,GAAG,CAAC,CAAC;IAE1D,IAAI,UAAU,CAAC,IAAI,KAAK,kBAAkB,EAAE,CAAC;QAC3C,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QACzB,GAAG,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACjC,OAAO,UAAU,CAAC;IACpB,CAAC;;QAAM,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,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K,EAAE,CAAC,OAAO,0CAAE,IAAI,mCAAI,CAAC;YACpC,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACrC,CAAC,CAAC;IAEL,OAAO,OAAO,CAAC;AACjB,CAAC,CAAA,CAAC;AAzDS,QAAA,iBAAiB,qBAyD1B;AAEJ;;;;;;;;GAQG;AACH,SAAS,qBAAqB,CAC5B,MAAmC;IAEnC,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;GAiBf,CAAC;IAEF,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC9B,uCACK,MAAM,KACT,OAAO,kCACF,MAAM,CAAC,OAAO,KACjB,aAAa,EAAE,OAAO,OAExB;IACJ,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { IAutoBePrismaCompilerResult } from "@autobe/interface";
|
|
2
|
-
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
-
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
|
-
export declare function orchestratePrismaCompiler<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, files: Record<string, string>, retry?: number): Promise<IAutoBePrismaCompilerResult & {
|
|
5
|
-
description: string;
|
|
6
|
-
}>;
|