@autobe/agent 0.14.5 → 0.15.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.
- package/lib/AutoBeMockAgent.js +1 -1
- package/lib/AutoBeMockAgent.js.map +1 -1
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +11 -9
- package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/index.mjs +3557 -2635
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js +4 -9
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +2 -8
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js +1 -1
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js.map +1 -1
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js +1 -1
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.d.ts +3 -0
- package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js +65 -0
- package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.d.ts +4 -0
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +62 -0
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +4 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +28 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.d.ts +3 -0
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +28 -0
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.d.ts +4 -0
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +28 -0
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.d.ts +3 -0
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js +63 -0
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.d.ts +4 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +28 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterface.js +14 -9
- package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.d.ts +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +13 -40
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +3 -2
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +52 -32
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js +350 -0
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +252 -226
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js +411 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +55 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.js +3 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.d.ts +23 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.js +3 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +108 -0
- package/lib/orchestrate/{realize/structures/IAutoBeRealizeDecoratorApplication.js → interface/structures/IAutoBeInterfaceGroupApplication.js} +1 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +122 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js +3 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +75 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js +3 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js.map +1 -0
- package/lib/orchestrate/interface/{OpenApiEndpointComparator.d.ts → utils/OpenApiEndpointComparator.d.ts} +1 -0
- package/lib/orchestrate/interface/{OpenApiEndpointComparator.js → utils/OpenApiEndpointComparator.js} +6 -0
- package/lib/orchestrate/interface/utils/OpenApiEndpointComparator.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealize.js +17 -3
- package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js +81 -88
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.d.ts +4 -0
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +513 -0
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js +3 -2
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +1 -1
- package/lib/orchestrate/realize/structures/{IAutoBeRealizeDecoratorApplication.d.ts → IAutoBeRealizeAuthorizationApplication.d.ts} +9 -9
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js +3 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +33 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js +3 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +34 -13
- package/lib/orchestrate/realize/transformRealizeAuthorization.d.ts +4 -0
- package/lib/orchestrate/realize/transformRealizeAuthorization.js +43 -0
- package/lib/orchestrate/realize/transformRealizeAuthorization.js.map +1 -0
- package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.d.ts +5 -0
- package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.js +71 -0
- package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.js.map +1 -0
- package/lib/orchestrate/realize/transformRealizeCoderHistories.js +5 -5
- package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +1 -1
- package/lib/orchestrate/realize/utils/InternalFileSystem.d.ts +8 -0
- package/lib/orchestrate/realize/utils/InternalFileSystem.js +17 -0
- package/lib/orchestrate/realize/utils/InternalFileSystem.js.map +1 -0
- package/lib/orchestrate/realize/utils/ProviderFileSystem.d.ts +3 -0
- package/lib/orchestrate/realize/utils/ProviderFileSystem.js +8 -0
- package/lib/orchestrate/realize/utils/ProviderFileSystem.js.map +1 -0
- package/lib/orchestrate/realize/utils/replaceImportStatements.js +2 -2
- package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js +36 -36
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js.map +1 -1
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js +1 -0
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.js +2 -0
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenario.js +29 -13
- package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestWrite.js +2 -0
- package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/orchestrate/test/transformTestWriteHistories.js +3 -2
- package/lib/orchestrate/test/transformTestWriteHistories.js.map +1 -1
- package/lib/utils/arrayToRecord.d.ts +17 -0
- package/lib/utils/arrayToRecord.js +19 -0
- package/lib/utils/arrayToRecord.js.map +1 -0
- package/lib/utils/backoffRetry.js +0 -1
- package/lib/utils/backoffRetry.js.map +1 -1
- package/package.json +6 -5
- package/src/AutoBeMockAgent.ts +1 -1
- package/src/constants/AutoBeSystemPromptConstant.ts +11 -9
- package/src/orchestrate/analyze/orchestrateAnalyzeReviewer.ts +1 -3
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +1 -3
- package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +75 -0
- package/src/orchestrate/interface/histories/transformInterfaceComplementHistories.ts +69 -0
- package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +34 -0
- package/src/orchestrate/interface/histories/transformInterfaceGroupHistories.ts +32 -0
- package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +34 -0
- package/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.ts +66 -0
- package/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts +34 -0
- package/src/orchestrate/interface/orchestrateInterface.ts +17 -8
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +22 -97
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +48 -55
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +109 -0
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +83 -120
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +197 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.ts +58 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.ts +24 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +112 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +125 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +76 -0
- package/src/orchestrate/interface/{OpenApiEndpointComparator.ts → utils/OpenApiEndpointComparator.ts} +8 -0
- package/src/orchestrate/realize/orchestrateRealize.ts +25 -3
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +45 -54
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +179 -0
- package/src/orchestrate/realize/orchestrateRealizeCoder.ts +3 -6
- package/src/orchestrate/realize/structures/{IAutoBeRealizeDecoratorApplication.ts → IAutoBeRealizeAuthorizationApplication.ts} +11 -9
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.ts +40 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeCompile.ts +42 -24
- package/src/orchestrate/realize/{transformRealizeDecorator.ts → transformRealizeAuthorization.ts} +13 -2
- package/src/orchestrate/realize/{transformRealizeDecoratorCorrectHistories.ts → transformRealizeAuthorizationCorrectHistories.ts} +15 -7
- package/src/orchestrate/realize/transformRealizeCoderHistories.ts +4 -4
- package/src/orchestrate/realize/utils/InternalFileSystem.ts +12 -0
- package/src/orchestrate/realize/utils/ProviderFileSystem.ts +4 -0
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +2 -2
- package/src/orchestrate/realize/writeCodeUntilCompilePassed.ts +59 -53
- package/src/orchestrate/test/compile/getTestScenarioArtifacts.ts +1 -0
- package/src/orchestrate/test/orchestrateTestCorrect.ts +3 -0
- package/src/orchestrate/test/orchestrateTestScenario.ts +4 -2
- package/src/orchestrate/test/orchestrateTestWrite.ts +8 -1
- package/src/utils/arrayToRecord.ts +49 -0
- package/src/utils/backoffRetry.ts +0 -1
- package/lib/orchestrate/interface/OpenApiEndpointComparator.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComponents.d.ts +0 -4
- package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +0 -473
- package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +0 -1
- package/lib/orchestrate/interface/transformInterfaceHistories.d.ts +0 -3
- package/lib/orchestrate/interface/transformInterfaceHistories.js +0 -149
- package/lib/orchestrate/interface/transformInterfaceHistories.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeDecoratorApplication.js.map +0 -1
- package/lib/orchestrate/realize/transformRealizeDecorator.d.ts +0 -4
- package/lib/orchestrate/realize/transformRealizeDecorator.js +0 -32
- package/lib/orchestrate/realize/transformRealizeDecorator.js.map +0 -1
- package/lib/orchestrate/realize/transformRealizeDecoratorCorrectHistories.d.ts +0 -5
- package/lib/orchestrate/realize/transformRealizeDecoratorCorrectHistories.js +0 -62
- package/lib/orchestrate/realize/transformRealizeDecoratorCorrectHistories.js.map +0 -1
- package/src/orchestrate/interface/orchestrateInterfaceComponents.ts +0 -292
- package/src/orchestrate/interface/transformInterfaceHistories.ts +0 -152
|
@@ -1,473 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
|
-
};
|
|
47
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.orchestrateInterfaceComponents = orchestrateInterfaceComponents;
|
|
49
|
-
const __typia_transform__accessExpressionAsString = __importStar(require("typia/lib/internal/_accessExpressionAsString.js"));
|
|
50
|
-
const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
|
|
51
|
-
const core_1 = require("@agentica/core");
|
|
52
|
-
const OpenApiV3_1Emender_1 = require("@samchon/openapi/lib/converters/OpenApiV3_1Emender");
|
|
53
|
-
const typia_1 = __importDefault(require("typia"));
|
|
54
|
-
const uuid_1 = require("uuid");
|
|
55
|
-
const assertSchemaModel_1 = require("../../context/assertSchemaModel");
|
|
56
|
-
const divideArray_1 = require("../../utils/divideArray");
|
|
57
|
-
const enforceToolCall_1 = require("../../utils/enforceToolCall");
|
|
58
|
-
const forceRetry_1 = require("../../utils/forceRetry");
|
|
59
|
-
const transformInterfaceHistories_1 = require("./transformInterfaceHistories");
|
|
60
|
-
function orchestrateInterfaceComponents(ctx_1, operations_1) {
|
|
61
|
-
return __awaiter(this, arguments, void 0, function* (ctx, operations, capacity = 12) {
|
|
62
|
-
var _a;
|
|
63
|
-
const typeNames = new Set();
|
|
64
|
-
for (const op of operations) {
|
|
65
|
-
if (op.requestBody !== null)
|
|
66
|
-
typeNames.add(op.requestBody.typeName);
|
|
67
|
-
if (op.responseBody !== null)
|
|
68
|
-
typeNames.add(op.responseBody.typeName);
|
|
69
|
-
}
|
|
70
|
-
const matrix = (0, divideArray_1.divideArray)({
|
|
71
|
-
array: Array.from(typeNames),
|
|
72
|
-
capacity,
|
|
73
|
-
});
|
|
74
|
-
let progress = 0;
|
|
75
|
-
const x = {
|
|
76
|
-
schemas: {},
|
|
77
|
-
authorization: (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.roles,
|
|
78
|
-
};
|
|
79
|
-
for (const y of yield Promise.all(matrix.map((it) => __awaiter(this, void 0, void 0, function* () {
|
|
80
|
-
var _a, _b;
|
|
81
|
-
const row = yield divideAndConquer(ctx, operations, it, 3, (count) => {
|
|
82
|
-
progress += count;
|
|
83
|
-
});
|
|
84
|
-
ctx.dispatch({
|
|
85
|
-
type: "interfaceComponents",
|
|
86
|
-
components: row,
|
|
87
|
-
completed: progress,
|
|
88
|
-
total: typeNames.size,
|
|
89
|
-
step: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
|
|
90
|
-
created_at: new Date().toISOString(),
|
|
91
|
-
});
|
|
92
|
-
return row;
|
|
93
|
-
})))) {
|
|
94
|
-
Object.assign(x.schemas, y.schemas);
|
|
95
|
-
}
|
|
96
|
-
return x;
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
function divideAndConquer(ctx, operations, typeNames, retry, progress) {
|
|
100
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
-
const remained = new Set(typeNames);
|
|
102
|
-
const components = {
|
|
103
|
-
schemas: {},
|
|
104
|
-
};
|
|
105
|
-
for (let i = 0; i < retry; ++i) {
|
|
106
|
-
if (remained.size === 0)
|
|
107
|
-
break;
|
|
108
|
-
const before = remained.size;
|
|
109
|
-
const newbie = yield (0, forceRetry_1.forceRetry)(() => process(ctx, operations, components, remained));
|
|
110
|
-
for (const key of Object.keys(newbie.schemas)) {
|
|
111
|
-
components.schemas[key] = newbie.schemas[key];
|
|
112
|
-
remained.delete(key);
|
|
113
|
-
}
|
|
114
|
-
if (before - remained.size !== 0)
|
|
115
|
-
progress(before - remained.size);
|
|
116
|
-
}
|
|
117
|
-
return components;
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
function process(ctx, operations, oldbie, remained) {
|
|
121
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
122
|
-
var _a;
|
|
123
|
-
const pointer = {
|
|
124
|
-
value: null,
|
|
125
|
-
};
|
|
126
|
-
const agentica = new core_1.MicroAgentica({
|
|
127
|
-
model: ctx.model,
|
|
128
|
-
vendor: ctx.vendor,
|
|
129
|
-
config: Object.assign(Object.assign({}, ((_a = ctx.config) !== null && _a !== void 0 ? _a : {})), { executor: {
|
|
130
|
-
describe: null,
|
|
131
|
-
} }),
|
|
132
|
-
histories: [
|
|
133
|
-
...(0, transformInterfaceHistories_1.transformInterfaceHistories)(ctx.state(), "# AutoAPI Schema Agent System Prompt\n\nYou are AutoAPI Schema Agent, an expert in creating comprehensive schema components for OpenAPI specifications in the `AutoBeOpenApi.IDocument` format. Your specialized role focuses on the third phase of a multi-agent orchestration process for large-scale API design.\n\nYour mission is to analyze the provided API operations, paths, methods, Prisma schema files, and ERD diagrams to construct a complete and consistent set of component schemas that accurately represent all entities and their relationships in the system.\n\n## 1. Context and Your Role in the Multi-Agent Process\n\nYou are the third agent in a three-phase process:\n1. **Phase 1** (completed): Analysis of requirements, Prisma schema, and ERD to define API paths and methods\n2. **Phase 2** (completed): Creation of detailed API operations based on the defined paths and methods\n3. **Phase 3** (your role): Construction of comprehensive component schemas for all entities\n\nYou will receive:\n- The complete list of API operations from Phase 2\n- The original Prisma schema with detailed comments\n- ERD diagrams in Mermaid format\n- Requirement analysis documents\n\n## 2. Primary Responsibilities\n\nYour specific tasks are:\n\n1. **Extract All Entity Types**: Analyze all API operations and identify every distinct entity type referenced\n2. **Define Complete Schema Components**: Create detailed schema definitions for every entity and its variants\n3. **Maintain Type Naming Conventions**: Follow the established type naming patterns\n4. **Ensure Schema Completeness**: Verify that ALL entities in the Prisma schema have corresponding component schemas\n5. **Create Type Variants**: Define all necessary type variants for each entity (.ICreate, .IUpdate, .ISummary, etc.)\n6. **Document Thoroughly**: Provide comprehensive descriptions for all schema components\n7. **Validate Consistency**: Ensure schema definitions align with API operations\n8. **Use Named References Only**: NEVER use inline/anonymous object definitions - ALL object types must be defined as named types in the components.schemas section and referenced using $ref\n\n## 3. Schema Design Principles\n\n### 3.1. Type Naming Conventions\n\n- **Main Entity Types**: Use `IEntityName` format\n- **Operation-Specific Types**:\n - `IEntityName.ICreate`: Request body for creation operations (POST)\n - `IEntityName.IUpdate`: Request body for update operations (PUT or PATCH)\n - `IEntityName.ISummary`: Simplified response version with essential properties\n - `IEntityName.IRequest`: Request parameters for list operations (search/filter/pagination)\n - `IEntityName.IAbridge`: Intermediate view with more detail than Summary but less than full entity\n - `IEntityName.IInvert`: Alternative representation of an entity from a different perspective\n- **Container Types**: \n - `IPageIEntityName`: Paginated results container (use the standard IPage structure)\n\n### 3.2. Schema Definition Requirements\n\n- **Completeness**: Include ALL properties from the Prisma schema for each entity\n- **Type Accuracy**: Map Prisma types to appropriate OpenAPI types and formats\n- **Required Fields**: Accurately mark required fields based on Prisma schema constraints\n- **Relationships**: Properly handle entity relationships (references to other entities)\n- **Enumerations**: Define all enum types referenced in entity schemas\n- **Detailed Documentation**: \n - Schema descriptions must reference related Prisma schema table comments\n - Property descriptions must reference related Prisma schema column comments\n - All descriptions must be organized in multiple paragraphs for better readability\n- **Named References Only**: \n - Every object type MUST be defined as a named type in the components.schemas section\n - NEVER use inline/anonymous object definitions anywhere in the schema\n - All property types that are objects must use $ref to reference a named type\n - This applies to EVERY object in the schema, including nested objects and arrays of objects\n\n### 3.3. \uD83D\uDD34 CRITICAL Security Requirements\n\n#### Response Types - NEVER expose sensitive fields:\n- **Password fields**: NEVER include fields like `password`, `hashed_password`, `encrypted_password`, `salt`, etc. in ANY response type\n- **Security tokens**: NEVER expose `refresh_token`, `api_key`, `secret_key`, or similar security credentials\n- **Internal system fields**: Avoid exposing internal implementation details like `password_reset_token`, `email_verification_code`\n- **Sensitive personal data**: Be cautious with fields containing sensitive information based on your domain\n\n**Example of FORBIDDEN response properties**:\n```typescript\n// \u274C NEVER include these in response types\ninterface IUser {\n id: string;\n email: string;\n hashed_password: string; // FORBIDDEN\n salt: string; // FORBIDDEN\n refresh_token: string; // FORBIDDEN\n api_secret: string; // FORBIDDEN\n}\n\n// \u2705 Correct response type\ninterface IUser {\n id: string;\n email: string;\n name: string;\n created_at: string;\n // Password and security fields are intentionally omitted\n}\n```\n\n#### Request Types - NEVER accept actor IDs directly:\n- **Actor identification**: NEVER accept fields like `user_id`, `member_id`, `creator_id`, `author_id` in request bodies\n- **Authentication source**: The authenticated user's identity comes from the authentication decorator, NOT from request body\n- **Security principle**: Clients should NEVER be able to specify \"who they are\" - this must come from verified authentication\n\n**Example of FORBIDDEN request properties**:\n```typescript\n// \u274C NEVER accept actor IDs in request types\ninterface IPostCreate {\n title: string;\n content: string;\n author_id: string; // FORBIDDEN - comes from authentication\n created_by: string; // FORBIDDEN - comes from authentication\n}\n\n// \u2705 Correct request type\ninterface IPostCreate {\n title: string;\n content: string;\n category_id: string; // OK - selecting a category\n // author_id will be set by the server using authenticated user info\n}\n```\n\n**Why this matters**:\n1. **Security**: Prevents users from impersonating others or claiming false ownership\n2. **Data integrity**: Ensures the true actor is recorded for audit trails\n3. **Authorization**: Enables proper ownership verification in provider functions\n\n**Remember**: The authenticated user information is provided by the decorator at the controller level and passed to the provider function - it should NEVER come from client input.\n\n### 3.3. Standard Type Definitions\n\nFor paginated results, use the standard `IPage<T>` interface:\n\n```typescript\n/**\n * A page.\n *\n * Collection of records with pagination information.\n *\n * @author Samchon\n */\nexport interface IPage<T extends object> {\n /**\n * Page information.\n */\n pagination: IPage.IPagination;\n\n /**\n * List of records.\n */\n data: T[];\n}\nexport namespace IPage {\n /**\n * Page information.\n */\n export interface IPagination {\n /**\n * Current page number.\n */\n current: number & tags.Type<\"uint32\">;\n\n /**\n * Limitation of records per a page.\n *\n * @default 100\n */\n limit: number & tags.Type<\"uint32\">;\n\n /**\n * Total records in the database.\n */\n records: number & tags.Type<\"uint32\">;\n\n /**\n * Total pages.\n *\n * Equal to {@link records} / {@link limit} with ceiling.\n */\n pages: number & tags.Type<\"uint32\">;\n }\n\n /**\n * Page request data\n */\n export interface IRequest {\n /**\n * Page number.\n */\n page?: null | (number & tags.Type<\"uint32\">);\n\n /**\n * Limitation of records per a page.\n *\n * @default 100\n */\n limit?: null | (number & tags.Type<\"uint32\">);\n }\n}\n```\n\n## 4. Implementation Strategy\n\n### 4.1. Comprehensive Entity Identification\n\n1. **Extract All Entity References**:\n - Analyze all API operation paths for entity identifiers\n - Examine request and response bodies in API operations\n - Review the Prisma schema to identify ALL entities\n\n2. **Create Entity Tracking System**:\n - List ALL entities from the Prisma schema\n - Cross-reference with entities mentioned in API operations\n - Identify any entities that might be missing schema definitions\n\n### 4.2. Schema Definition Process\n\n1. **For Each Entity**:\n - Define the main entity schema (`IEntityName`)\n - Create all necessary variant types based on API operations\n - Ensure all properties are documented with descriptions from Prisma schema\n - Mark required fields based on Prisma schema constraints\n - **CRITICAL**: Apply security filtering - remove sensitive fields from response types\n\n2. **For Relationship Handling**:\n - Identify all relationships from the ERD and Prisma schema\n - Define appropriate property types for relationships (IDs, nested objects, arrays)\n - Document relationship constraints and cardinality\n - **IMPORTANT**: For \"belongs to\" relationships, never accept the owner ID in requests\n\n3. **For Variant Types**:\n - Create `.ICreate` types with appropriate required/optional fields for creation\n - **NEVER include**: creator_id, author_id, user_id, created_by fields\n - These fields will be populated from authenticated user context\n - Define `.IUpdate` types with all fields made optional for updates\n - **NEVER include**: updater_id, modified_by, last_updated_by fields\n - **NEVER allow**: changing ownership fields like author_id or creator_id\n - Build `.ISummary` types with essential fields for list views\n - Include only safe, public-facing properties\n - Define `.IRequest` types with search/filter/sort parameters\n - May include filters like \"my_posts_only\" but not \"user_id\" parameters\n\n4. **Security Checklist for Each Type**:\n - \u2713 No password or hash fields in any response type\n - \u2713 No security tokens or keys in any response type\n - \u2713 No actor ID fields in any request type\n - \u2713 No internal system fields exposed in responses\n - \u2713 Ownership fields are read-only (never in request types)\n\n### 4.3. Schema Completeness Verification\n\n1. **Entity Coverage Check**:\n - Verify every entity in the Prisma schema has at least one schema definition\n - Check that all entities referenced in API operations have schema definitions\n\n2. **Property Coverage Check**:\n - Ensure all properties from the Prisma schema are included in entity schemas\n - Verify property types align with Prisma schema definitions\n\n3. **Variant Type Verification**:\n - Confirm necessary variant types exist based on API operations\n - Ensure variant types have appropriate property subsets and constraints\n\n## 5. Documentation Quality Requirements\n\n### 5.1. **Schema Type Descriptions**\n- Must reference related Prisma schema table description comments\n- Must be extremely detailed and comprehensive\n- Must be organized in multiple paragraphs\n- Should explain the entity's role in the business domain\n- Should describe relationships with other entities\n\n### 5.2. **Property Descriptions**\n- Must reference related Prisma schema column description comments\n- Must explain the purpose, constraints, and format of each property\n- Should note business rules that apply to the property\n- Should provide examples when helpful\n- Should use multiple paragraphs for complex properties\n\n## 6. Output Format\n\nYour output should be the complete `components` section of the OpenAPI document:\n\n```typescript\nconst components: OpenApi.IComponents = {\n schemas: {\n // Main entity types\n IEntityName: { \n type: \"object\", \n properties: {\n propertyName: {\n type: \"string\",\n description: \"Detailed property description referencing Prisma schema column comments.\\n\\nMultiple paragraphs where appropriate.\"\n }\n // ...more properties\n // SECURITY: Never include password, hashed_password, salt, or other sensitive fields in response types\n },\n required: [...],\n description: \"Extremely detailed explanation about IEntityName referencing Prisma schema table comments.\\n\\nMultiple paragraphs focusing on different aspects of the entity.\",\n },\n // Variant types\n \"IEntityName.ICreate\": { \n // SECURITY: Never include author_id, creator_id, user_id - these come from authentication context\n ... \n },\n \"IEntityName.IUpdate\": { \n // SECURITY: Never allow updating ownership fields like author_id or creator_id\n ... \n },\n \"IEntityName.ISummary\": { ... },\n \"IEntityName.IRequest\": { ... },\n \n // Repeat for ALL entities\n \n // Standard types\n \"IPage\": { ... },\n \"IPage.IPagination\": { ... },\n \"IPage.IRequest\": { ... },\n \n // Enumerations\n \"EEnumName\": { ... }\n }\n}\n```\n\n## 7. Critical Success Factors\n\n### 7.1. Absolute Completeness Principles\n\n- **Process ALL Entities**: EVERY entity defined in the Prisma schema MUST have corresponding schema components.\n- **Complete Property Coverage**: ALL properties of each entity MUST be included in schema definitions.\n- **Variant Type Comprehensiveness**: ALL necessary variant types MUST be defined based on API operations.\n- **No Simplification**: Complex entities or relationships MUST be faithfully represented without simplification.\n- **Verification of Completeness**: Before final output, verify that ALL entities and properties have been defined.\n\n### 7.2. High-Volume Processing Strategy\n\n- **Batch Processing**: If there are many entities, process them in groups, but ALL groups MUST be completed.\n- **No Prioritization**: ALL entities and their properties have equal importance and must be processed.\n- **Systematic Approach**: Use a methodical approach to ensure no entity or property is overlooked.\n- **Detailed Tracking**: Maintain a tracking system to verify completeness of schema definitions.\n\n### 7.3. Critical Warnings\n\n- **Partial Implementation Prohibited**: \"Defining schemas for only some entities and omitting others\" is a CRITICAL ERROR.\n- **Property Omission Prohibited**: \"Including only some properties of an entity\" is a SERIOUS ERROR.\n- **No Simplification**: \"Simplifying complex entities or relationships\" is NOT ACCEPTABLE.\n- **Ignore Capacity Limitations**: Processing only some entities due to their quantity is a SERIOUS ERROR.\n- **Named Types Required**: Using inline/anonymous object definitions instead of named type references ($ref) is a CRITICAL ERROR. EVERY object type must be defined in the components.schemas section and referenced by name.\n- **Security Violations**: Including password fields in responses or actor IDs in requests is a CRITICAL SECURITY ERROR.\n- **Authentication Bypass**: Accepting user identity from request body instead of authentication context is a CRITICAL SECURITY ERROR.\n\n## 8. Execution Process\n\n1. **Initialization**:\n - Analyze all input data (API operations, Prisma schema, ERD)\n - Create a complete inventory of entities and their relationships\n\n2. **Schema Development**:\n - Systematically define schema components for each entity and its variants\n - Document all components and properties thoroughly\n\n3. **Verification**:\n - Validate completeness against the Prisma schema\n - Verify consistency with API operations\n - Ensure all relationships are properly handled\n\n4. **Output Generation**:\n - Produce the complete `components` section in the required format\n - Verify the output meets all quality and completeness requirements\n\nRemember that your role is CRITICAL to the success of the entire API design process. The schemas you define will be the foundation for ALL data exchange in the API. Thoroughness, accuracy, and completeness are your highest priorities.\n\n## 9. Integration with Previous Phases\n\n- Ensure your schema components align perfectly with the API operations defined in Phase 2\n- Reference the same entities and property names used in the API paths from Phase 1\n- Maintain consistency in naming, typing, and structure throughout the entire API design\n\n## 10. Final Output Format\n\nYour final output should be the complete `components` section that can be directly integrated with the API operations from Phase 2 to form a complete `AutoBeOpenApi.IDocument` object.\n\nAlways aim to create schema components that are intuitive, well-documented, and accurately represent the business domain. Your schema definitions should meet ALL business requirements while being extensible and maintainable. Remember to define components for EVERY SINGLE independent entity table in the Prisma schema. NO ENTITY OR PROPERTY SHOULD BE OMITTED FOR ANY REASON." /* AutoBeSystemPromptConstant.INTERFACE_SCHEMA */),
|
|
134
|
-
{
|
|
135
|
-
id: (0, uuid_1.v4)(),
|
|
136
|
-
created_at: new Date().toISOString(),
|
|
137
|
-
type: "assistantMessage",
|
|
138
|
-
text: [
|
|
139
|
-
"Here is the OpenAPI operations generated by phase 2.",
|
|
140
|
-
"",
|
|
141
|
-
"```json",
|
|
142
|
-
JSON.stringify(operations),
|
|
143
|
-
"```",
|
|
144
|
-
].join("\n"),
|
|
145
|
-
},
|
|
146
|
-
],
|
|
147
|
-
controllers: [
|
|
148
|
-
createApplication({
|
|
149
|
-
model: ctx.model,
|
|
150
|
-
build: (components) => __awaiter(this, void 0, void 0, function* () {
|
|
151
|
-
var _a;
|
|
152
|
-
(_a = pointer.value) !== null && _a !== void 0 ? _a : (pointer.value = {
|
|
153
|
-
schemas: {},
|
|
154
|
-
});
|
|
155
|
-
Object.assign(pointer.value.schemas, components.schemas);
|
|
156
|
-
}),
|
|
157
|
-
pointer,
|
|
158
|
-
}),
|
|
159
|
-
],
|
|
160
|
-
});
|
|
161
|
-
(0, enforceToolCall_1.enforceToolCall)(agentica);
|
|
162
|
-
const already = Object.keys(oldbie.schemas);
|
|
163
|
-
yield agentica
|
|
164
|
-
.conversate([
|
|
165
|
-
"Make type components please.",
|
|
166
|
-
"",
|
|
167
|
-
"Here is the list of request/response bodies' type names from",
|
|
168
|
-
"OpenAPI operations. Make type components of them. If more object",
|
|
169
|
-
"types are required during making the components, please make them",
|
|
170
|
-
"too.",
|
|
171
|
-
"",
|
|
172
|
-
...Array.from(remained).map((k) => `- \`${k}\``),
|
|
173
|
-
...(already.length !== 0
|
|
174
|
-
? [
|
|
175
|
-
"",
|
|
176
|
-
"> By the way, here is the list of components schemas what you've",
|
|
177
|
-
"> already made. So, you don't need to make them again.",
|
|
178
|
-
">",
|
|
179
|
-
...already.map((k) => `> - \`${k}\``),
|
|
180
|
-
]
|
|
181
|
-
: []),
|
|
182
|
-
].join("\n"))
|
|
183
|
-
.finally(() => {
|
|
184
|
-
const tokenUsage = agentica.getTokenUsage();
|
|
185
|
-
ctx.usage().record(tokenUsage, ["interface"]);
|
|
186
|
-
});
|
|
187
|
-
if (pointer.value === null) {
|
|
188
|
-
// never be happened
|
|
189
|
-
throw new Error("Failed to create components.");
|
|
190
|
-
}
|
|
191
|
-
return OpenApiV3_1Emender_1.OpenApiV3_1Emender.convertComponents(pointer.value);
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
function createApplication(props) {
|
|
195
|
-
(0, assertSchemaModel_1.assertSchemaModel)(props.model);
|
|
196
|
-
const application = collection[props.model];
|
|
197
|
-
return {
|
|
198
|
-
protocol: "class",
|
|
199
|
-
name: "interface",
|
|
200
|
-
application,
|
|
201
|
-
execute: {
|
|
202
|
-
makeComponents: (next) => __awaiter(this, void 0, void 0, function* () {
|
|
203
|
-
yield props.build(next.components);
|
|
204
|
-
}),
|
|
205
|
-
},
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
const claude = {
|
|
209
|
-
model: "claude",
|
|
210
|
-
options: {
|
|
211
|
-
reference: true,
|
|
212
|
-
separate: null
|
|
213
|
-
},
|
|
214
|
-
functions: [
|
|
215
|
-
{
|
|
216
|
-
name: "makeComponents",
|
|
217
|
-
parameters: {
|
|
218
|
-
description: " Properties containing components to generate.\n\n------------------------------\n\nCurrent Type: {@link IMakeComponentsProps}",
|
|
219
|
-
type: "object",
|
|
220
|
-
properties: {
|
|
221
|
-
components: {
|
|
222
|
-
description: "Complete set of schema components for the OpenAPI specification.\n\nThis property contains comprehensive type definitions for all entities in\nthe system. It is the central repository of all named schema types that\nwill be used throughout the API specification.\n\nCRITICAL REQUIREMENT: All object types MUST be defined as named types in\nthe components.schemas section. Inline anonymous object definitions are\nstrictly prohibited.\n\nThis components object should include:\n\n- Main entity types (IEntityName)\n- Operation-specific variants (.ICreate, .IUpdate, .ISummary, etc.)\n- Container types (IPage<T> for pagination)\n- Enumeration types\n\nAll schema definitions must include detailed descriptions that reference\nthe original Prisma schema comments and thoroughly document each property.\nEvery property that references an object must use a $ref to a named type in\nthe components.schemas section. This applies to all objects in request\nbodies, response bodies, and properties that are objects or arrays of\nobjects.\n\nExample structure:\n\n```typescript\n{\n components: {\n schemas: {\n IUser: {\n type: \"object\",\n properties: {\n id: { type: \"string\", format: \"uuid\" },\n email: { type: \"string\", format: \"email\" },\n profile: { \"$ref\": \"#/components/schemas/IUserProfile\" }\n },\n required: [\"id\", \"email\"],\n description: \"User entity representing system account holders...\"\n },\n \"IUser.ICreate\": { ... },\n // Additional schemas\n }\n }\n}\n```",
|
|
223
|
-
$ref: "#/$defs/OmitAutoBeOpenApi.IComponentsauthorization"
|
|
224
|
-
}
|
|
225
|
-
},
|
|
226
|
-
required: [
|
|
227
|
-
"components"
|
|
228
|
-
],
|
|
229
|
-
additionalProperties: false,
|
|
230
|
-
$defs: {
|
|
231
|
-
"OmitAutoBeOpenApi.IComponentsauthorization": {
|
|
232
|
-
description: "Construct a type with the properties of T except for those in type K.",
|
|
233
|
-
type: "object",
|
|
234
|
-
properties: {
|
|
235
|
-
schemas: {
|
|
236
|
-
description: "An object to hold reusable DTO schemas.\n\nIn other words, a collection of named JSON schemas.\n\nIMPORTANT: For each schema in this collection:\n\n1. EVERY schema MUST have a detailed description that references and aligns\n with the description comments from the corresponding Prisma DB schema\n tables\n2. EACH property within the schema MUST have detailed descriptions that\n reference and align with the description comments from the\n corresponding DB schema columns\n3. All descriptions MUST be organized into MULTIPLE PARAGRAPHS (separated by\n line breaks) when appropriate\n4. Descriptions should be comprehensive enough that anyone reading them can\n understand the purpose, functionality, and constraints of each type\n and property without needing to reference other documentation",
|
|
237
|
-
$ref: "#/$defs/RecordstringAutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema"
|
|
238
|
-
}
|
|
239
|
-
},
|
|
240
|
-
required: [
|
|
241
|
-
"schemas"
|
|
242
|
-
]
|
|
243
|
-
},
|
|
244
|
-
"RecordstringAutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema": {
|
|
245
|
-
description: "Construct a type with a set of properties K of type T",
|
|
246
|
-
type: "object",
|
|
247
|
-
properties: {},
|
|
248
|
-
required: [],
|
|
249
|
-
additionalProperties: {
|
|
250
|
-
$ref: "#/$defs/AutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema"
|
|
251
|
-
}
|
|
252
|
-
},
|
|
253
|
-
"AutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema": {
|
|
254
|
-
description: "Descriptive type schema info.\n\n`AutoBeOpenApi.IJsonSchemaDescriptive` is a type schema info of the OpenAPI\nGenerative, but it has a `description` property which is required.\n\n`AutoBeOpenApi.IJsonSchemaDescriptive` basically follows the JSON schema\nspecification of OpenAPI v3.1, but a little bit shrunk to remove ambiguous\nand duplicated expressions of OpenAPI v3.1 for the convenience, clarity,\nand AI generation.\n\nCRITICAL INSTRUCTIONS FOR OPTIMAL AI GENERATION:\n\nWhen creating descriptions for components, types, and properties:\n\n1. ALWAYS refer to and incorporate the description comments from the\n corresponding Prisma DB schema tables and columns. The descriptions\n should match the style, level of detail, and terminology used in the\n Prisma schema.\n2. ALL descriptions MUST be organized into MULTIPLE PARAGRAPHS separated by\n line breaks. Single-paragraph descriptions should be avoided.\n3. Descriptions should comprehensively cover:\n\n - The purpose and business meaning of the type or property\n - Relationships to other entities\n - Validation rules, constraints, and edge cases\n - Usage context and examples when helpful\n4. For each property of an object type, ensure its description reflects the\n corresponding column description in the Prisma DB schema, maintaining\n the same level of detail and terminology\n5. Descriptions should be so detailed and clear that anyone reading them can\n fully understand the type or property without needing to reference any\n other documentation",
|
|
255
|
-
type: "object",
|
|
256
|
-
properties: {
|
|
257
|
-
description: {
|
|
258
|
-
description: "Description about the type.\n\nCRITICAL: This description MUST be extensively detailed and MUST\nreference and align with the description comments from the\ncorresponding Prisma DB schema tables and columns.\n\nThe description MUST be organized into MULTIPLE PARAGRAPHS (separated\nby line breaks) based on different aspects of the type:\n\n- The purpose and business meaning of the type\n- Relationships to other entities in the system\n- Validation rules, constraints, and edge cases\n- Usage context and examples when helpful\n\nThis structured approach improves readability and helps readers better\nunderstand the type's various characteristics and use cases. The\ndescription should be so comprehensive that anyone reading it can fully\nunderstand the type without needing to reference other documentation.\n\n> MUST be written in English. Never use other languages.",
|
|
259
|
-
type: "string"
|
|
260
|
-
}
|
|
261
|
-
},
|
|
262
|
-
required: [
|
|
263
|
-
"description"
|
|
264
|
-
]
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
},
|
|
268
|
-
description: "Generate OpenAPI components containing named schema types.\n\nThis method receives a complete set of schema components and integrates\nthem into the final OpenAPI specification. It processes all entity schemas,\ntheir variants, and related type definitions to ensure a comprehensive and\nconsistent API design.\n\nThe provided components should include schemas for all entities identified\nin the previous phases of API path/method definition and operation\ncreation. This ensures that the final OpenAPI document has complete type\ncoverage for all operations.\n\nCRITICAL: All schema definitions must follow the established naming\nconventions (IEntityName, IEntityName.ICreate, etc.) and must be thoroughly\ndocumented with descriptions that reference the original Prisma schema\ncomments.",
|
|
269
|
-
validate: (() => { const _io0 = input => "object" === typeof input.components && null !== input.components && _io1(input.components); const _io1 = input => "object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && _io2(input.schemas); const _io2 = input => Object.keys(input).every(key => {
|
|
270
|
-
const value = input[key];
|
|
271
|
-
if (undefined === value)
|
|
272
|
-
return true;
|
|
273
|
-
return "object" === typeof value && null !== value && _io3(value);
|
|
274
|
-
}); const _io3 = input => "string" === typeof input.description; const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.components && null !== input.components || _report(_exceptionable, {
|
|
275
|
-
path: _path + ".components",
|
|
276
|
-
expected: "Omit<AutoBeOpenApi.IComponents, \"authorization\">",
|
|
277
|
-
value: input.components
|
|
278
|
-
})) && _vo1(input.components, _path + ".components", true && _exceptionable) || _report(_exceptionable, {
|
|
279
|
-
path: _path + ".components",
|
|
280
|
-
expected: "Omit<AutoBeOpenApi.IComponents, \"authorization\">",
|
|
281
|
-
value: input.components
|
|
282
|
-
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) || _report(_exceptionable, {
|
|
283
|
-
path: _path + ".schemas",
|
|
284
|
-
expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>",
|
|
285
|
-
value: input.schemas
|
|
286
|
-
})) && _vo2(input.schemas, _path + ".schemas", true && _exceptionable) || _report(_exceptionable, {
|
|
287
|
-
path: _path + ".schemas",
|
|
288
|
-
expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>",
|
|
289
|
-
value: input.schemas
|
|
290
|
-
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
291
|
-
const value = input[key];
|
|
292
|
-
if (undefined === value)
|
|
293
|
-
return true;
|
|
294
|
-
return ("object" === typeof value && null !== value || _report(_exceptionable, {
|
|
295
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
296
|
-
expected: "AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>",
|
|
297
|
-
value: value
|
|
298
|
-
})) && _vo3(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || _report(_exceptionable, {
|
|
299
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
300
|
-
expected: "AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>",
|
|
301
|
-
value: value
|
|
302
|
-
});
|
|
303
|
-
}).every(flag => flag)].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
304
|
-
path: _path + ".description",
|
|
305
|
-
expected: "string",
|
|
306
|
-
value: input.description
|
|
307
|
-
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
308
|
-
if (false === __is(input)) {
|
|
309
|
-
errors = [];
|
|
310
|
-
_report = __typia_transform__validateReport._validateReport(errors);
|
|
311
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
312
|
-
path: _path + "",
|
|
313
|
-
expected: "IMakeComponentsProps",
|
|
314
|
-
value: input
|
|
315
|
-
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
316
|
-
path: _path + "",
|
|
317
|
-
expected: "IMakeComponentsProps",
|
|
318
|
-
value: input
|
|
319
|
-
}))(input, "$input", true);
|
|
320
|
-
const success = 0 === errors.length;
|
|
321
|
-
return success ? {
|
|
322
|
-
success,
|
|
323
|
-
data: input
|
|
324
|
-
} : {
|
|
325
|
-
success,
|
|
326
|
-
errors,
|
|
327
|
-
data: input
|
|
328
|
-
};
|
|
329
|
-
}
|
|
330
|
-
return {
|
|
331
|
-
success: true,
|
|
332
|
-
data: input
|
|
333
|
-
};
|
|
334
|
-
}; })()
|
|
335
|
-
}
|
|
336
|
-
]
|
|
337
|
-
};
|
|
338
|
-
const collection = {
|
|
339
|
-
chatgpt: {
|
|
340
|
-
model: "chatgpt",
|
|
341
|
-
options: {
|
|
342
|
-
reference: true,
|
|
343
|
-
strict: false,
|
|
344
|
-
separate: null
|
|
345
|
-
},
|
|
346
|
-
functions: [
|
|
347
|
-
{
|
|
348
|
-
name: "makeComponents",
|
|
349
|
-
parameters: {
|
|
350
|
-
description: " Properties containing components to generate.\n\n------------------------------\n\nCurrent Type: {@link IMakeComponentsProps}\n\n### Description of {@link components} property:\n\n> Complete set of schema components for the OpenAPI specification.\n> \n> This property contains comprehensive type definitions for all entities in\n> the system. It is the central repository of all named schema types that\n> will be used throughout the API specification.\n> \n> CRITICAL REQUIREMENT: All object types MUST be defined as named types in\n> the components.schemas section. Inline anonymous object definitions are\n> strictly prohibited.\n> \n> This components object should include:\n> \n> - Main entity types (IEntityName)\n> - Operation-specific variants (.ICreate, .IUpdate, .ISummary, etc.)\n> - Container types (IPage<T> for pagination)\n> - Enumeration types\n> \n> All schema definitions must include detailed descriptions that reference\n> the original Prisma schema comments and thoroughly document each property.\n> Every property that references an object must use a $ref to a named type in\n> the components.schemas section. This applies to all objects in request\n> bodies, response bodies, and properties that are objects or arrays of\n> objects.\n> \n> Example structure:\n> \n> ```typescript\n> {\n> components: {\n> schemas: {\n> IUser: {\n> type: \"object\",\n> properties: {\n> id: { type: \"string\", format: \"uuid\" },\n> email: { type: \"string\", format: \"email\" },\n> profile: { \"$ref\": \"#/components/schemas/IUserProfile\" }\n> },\n> required: [\"id\", \"email\"],\n> description: \"User entity representing system account holders...\"\n> },\n> \"IUser.ICreate\": { ... },\n> // Additional schemas\n> }\n> }\n> }\n> ```",
|
|
351
|
-
type: "object",
|
|
352
|
-
properties: {
|
|
353
|
-
components: {
|
|
354
|
-
$ref: "#/$defs/OmitAutoBeOpenApi.IComponentsauthorization"
|
|
355
|
-
}
|
|
356
|
-
},
|
|
357
|
-
required: [
|
|
358
|
-
"components"
|
|
359
|
-
],
|
|
360
|
-
additionalProperties: false,
|
|
361
|
-
$defs: {
|
|
362
|
-
"OmitAutoBeOpenApi.IComponentsauthorization": {
|
|
363
|
-
description: "Construct a type with the properties of T except for those in type K.\n\n### Description of {@link schemas} property:\n\n> An object to hold reusable DTO schemas.\n> \n> In other words, a collection of named JSON schemas.\n> \n> IMPORTANT: For each schema in this collection:\n> \n> 1. EVERY schema MUST have a detailed description that references and aligns\n> with the description comments from the corresponding Prisma DB schema\n> tables\n> 2. EACH property within the schema MUST have detailed descriptions that\n> reference and align with the description comments from the\n> corresponding DB schema columns\n> 3. All descriptions MUST be organized into MULTIPLE PARAGRAPHS (separated by\n> line breaks) when appropriate\n> 4. Descriptions should be comprehensive enough that anyone reading them can\n> understand the purpose, functionality, and constraints of each type\n> and property without needing to reference other documentation",
|
|
364
|
-
type: "object",
|
|
365
|
-
properties: {
|
|
366
|
-
schemas: {
|
|
367
|
-
$ref: "#/$defs/RecordstringAutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema"
|
|
368
|
-
}
|
|
369
|
-
},
|
|
370
|
-
required: [
|
|
371
|
-
"schemas"
|
|
372
|
-
]
|
|
373
|
-
},
|
|
374
|
-
"RecordstringAutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema": {
|
|
375
|
-
description: "Construct a type with a set of properties K of type T",
|
|
376
|
-
type: "object",
|
|
377
|
-
properties: {},
|
|
378
|
-
required: [],
|
|
379
|
-
additionalProperties: {
|
|
380
|
-
$ref: "#/$defs/AutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema"
|
|
381
|
-
}
|
|
382
|
-
},
|
|
383
|
-
"AutoBeOpenApi.IJsonSchemaDescriptiveAutoBeOpenApi.IJsonSchema": {
|
|
384
|
-
description: "Descriptive type schema info.\n\n`AutoBeOpenApi.IJsonSchemaDescriptive` is a type schema info of the OpenAPI\nGenerative, but it has a `description` property which is required.\n\n`AutoBeOpenApi.IJsonSchemaDescriptive` basically follows the JSON schema\nspecification of OpenAPI v3.1, but a little bit shrunk to remove ambiguous\nand duplicated expressions of OpenAPI v3.1 for the convenience, clarity,\nand AI generation.\n\nCRITICAL INSTRUCTIONS FOR OPTIMAL AI GENERATION:\n\nWhen creating descriptions for components, types, and properties:\n\n1. ALWAYS refer to and incorporate the description comments from the\n corresponding Prisma DB schema tables and columns. The descriptions\n should match the style, level of detail, and terminology used in the\n Prisma schema.\n2. ALL descriptions MUST be organized into MULTIPLE PARAGRAPHS separated by\n line breaks. Single-paragraph descriptions should be avoided.\n3. Descriptions should comprehensively cover:\n\n - The purpose and business meaning of the type or property\n - Relationships to other entities\n - Validation rules, constraints, and edge cases\n - Usage context and examples when helpful\n4. For each property of an object type, ensure its description reflects the\n corresponding column description in the Prisma DB schema, maintaining\n the same level of detail and terminology\n5. Descriptions should be so detailed and clear that anyone reading them can\n fully understand the type or property without needing to reference any\n other documentation",
|
|
385
|
-
type: "object",
|
|
386
|
-
properties: {
|
|
387
|
-
description: {
|
|
388
|
-
description: "Description about the type.\n\nCRITICAL: This description MUST be extensively detailed and MUST\nreference and align with the description comments from the\ncorresponding Prisma DB schema tables and columns.\n\nThe description MUST be organized into MULTIPLE PARAGRAPHS (separated\nby line breaks) based on different aspects of the type:\n\n- The purpose and business meaning of the type\n- Relationships to other entities in the system\n- Validation rules, constraints, and edge cases\n- Usage context and examples when helpful\n\nThis structured approach improves readability and helps readers better\nunderstand the type's various characteristics and use cases. The\ndescription should be so comprehensive that anyone reading it can fully\nunderstand the type without needing to reference other documentation.\n\n> MUST be written in English. Never use other languages.",
|
|
389
|
-
type: "string"
|
|
390
|
-
}
|
|
391
|
-
},
|
|
392
|
-
required: [
|
|
393
|
-
"description"
|
|
394
|
-
]
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
},
|
|
398
|
-
description: "Generate OpenAPI components containing named schema types.\n\nThis method receives a complete set of schema components and integrates\nthem into the final OpenAPI specification. It processes all entity schemas,\ntheir variants, and related type definitions to ensure a comprehensive and\nconsistent API design.\n\nThe provided components should include schemas for all entities identified\nin the previous phases of API path/method definition and operation\ncreation. This ensures that the final OpenAPI document has complete type\ncoverage for all operations.\n\nCRITICAL: All schema definitions must follow the established naming\nconventions (IEntityName, IEntityName.ICreate, etc.) and must be thoroughly\ndocumented with descriptions that reference the original Prisma schema\ncomments.",
|
|
399
|
-
validate: (() => { const _io0 = input => "object" === typeof input.components && null !== input.components && _io1(input.components); const _io1 = input => "object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && _io2(input.schemas); const _io2 = input => Object.keys(input).every(key => {
|
|
400
|
-
const value = input[key];
|
|
401
|
-
if (undefined === value)
|
|
402
|
-
return true;
|
|
403
|
-
return "object" === typeof value && null !== value && _io3(value);
|
|
404
|
-
}); const _io3 = input => "string" === typeof input.description; const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.components && null !== input.components || _report(_exceptionable, {
|
|
405
|
-
path: _path + ".components",
|
|
406
|
-
expected: "Omit<AutoBeOpenApi.IComponents, \"authorization\">",
|
|
407
|
-
value: input.components
|
|
408
|
-
})) && _vo1(input.components, _path + ".components", true && _exceptionable) || _report(_exceptionable, {
|
|
409
|
-
path: _path + ".components",
|
|
410
|
-
expected: "Omit<AutoBeOpenApi.IComponents, \"authorization\">",
|
|
411
|
-
value: input.components
|
|
412
|
-
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => [("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) || _report(_exceptionable, {
|
|
413
|
-
path: _path + ".schemas",
|
|
414
|
-
expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>",
|
|
415
|
-
value: input.schemas
|
|
416
|
-
})) && _vo2(input.schemas, _path + ".schemas", true && _exceptionable) || _report(_exceptionable, {
|
|
417
|
-
path: _path + ".schemas",
|
|
418
|
-
expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>",
|
|
419
|
-
value: input.schemas
|
|
420
|
-
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
421
|
-
const value = input[key];
|
|
422
|
-
if (undefined === value)
|
|
423
|
-
return true;
|
|
424
|
-
return ("object" === typeof value && null !== value || _report(_exceptionable, {
|
|
425
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
426
|
-
expected: "AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>",
|
|
427
|
-
value: value
|
|
428
|
-
})) && _vo3(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || _report(_exceptionable, {
|
|
429
|
-
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
430
|
-
expected: "AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>",
|
|
431
|
-
value: value
|
|
432
|
-
});
|
|
433
|
-
}).every(flag => flag)].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
434
|
-
path: _path + ".description",
|
|
435
|
-
expected: "string",
|
|
436
|
-
value: input.description
|
|
437
|
-
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
438
|
-
if (false === __is(input)) {
|
|
439
|
-
errors = [];
|
|
440
|
-
_report = __typia_transform__validateReport._validateReport(errors);
|
|
441
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
442
|
-
path: _path + "",
|
|
443
|
-
expected: "IMakeComponentsProps",
|
|
444
|
-
value: input
|
|
445
|
-
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
446
|
-
path: _path + "",
|
|
447
|
-
expected: "IMakeComponentsProps",
|
|
448
|
-
value: input
|
|
449
|
-
}))(input, "$input", true);
|
|
450
|
-
const success = 0 === errors.length;
|
|
451
|
-
return success ? {
|
|
452
|
-
success,
|
|
453
|
-
data: input
|
|
454
|
-
} : {
|
|
455
|
-
success,
|
|
456
|
-
errors,
|
|
457
|
-
data: input
|
|
458
|
-
};
|
|
459
|
-
}
|
|
460
|
-
return {
|
|
461
|
-
success: true,
|
|
462
|
-
data: input
|
|
463
|
-
};
|
|
464
|
-
}; })()
|
|
465
|
-
}
|
|
466
|
-
]
|
|
467
|
-
},
|
|
468
|
-
claude,
|
|
469
|
-
llama: claude,
|
|
470
|
-
deepseek: claude,
|
|
471
|
-
"3.1": claude,
|
|
472
|
-
};
|
|
473
|
-
//# sourceMappingURL=orchestrateInterfaceComponents.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateInterfaceComponents.js","sourceRoot":"","sources":["../../../src/orchestrate/interface/orchestrateInterfaceComponents.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,wEA+CC;;;AA/DD,yCAAoE;AAGpE,2FAAwF;AAExF,kDAA0B;AAC1B,+BAA0B;AAI1B,uEAAoE;AACpE,yDAAsD;AACtD,iEAA8D;AAC9D,uDAAoD;AACpD,+EAA4E;AAE5E,SAAsB,8BAA8B;yDAGlD,GAAyB,EACzB,UAAsC,EACtC,WAAmB,EAAE;;QAErB,MAAM,SAAS,GAAgB,IAAI,GAAG,EAAE,CAAC;QACzC,KAAK,MAAM,EAAE,IAAI,UAAU,EAAE,CAAC;YAC5B,IAAI,EAAE,CAAC,WAAW,KAAK,IAAI;gBAAE,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;YACpE,IAAI,EAAE,CAAC,YAAY,KAAK,IAAI;gBAAE,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QACxE,CAAC;QACD,MAAM,MAAM,GAAe,IAAA,yBAAW,EAAC;YACrC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;YAC5B,QAAQ;SACT,CAAC,CAAC;QACH,IAAI,QAAQ,GAAW,CAAC,CAAC;QAEzB,MAAM,CAAC,GAA8B;YACnC,OAAO,EAAE,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C"}
|
|
@@ -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>;
|