@autobe/agent 0.11.2 → 0.13.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/AutoBeAgent.d.ts +3 -146
- package/lib/AutoBeAgent.js +6 -180
- package/lib/AutoBeAgent.js.map +1 -1
- package/lib/AutoBeAgentBase.d.ts +18 -0
- package/lib/AutoBeAgentBase.js +54 -0
- package/lib/AutoBeAgentBase.js.map +1 -0
- package/lib/AutoBeMockAgent.d.ts +14 -0
- package/lib/AutoBeMockAgent.js +136 -0
- package/lib/AutoBeMockAgent.js.map +1 -0
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +8 -4
- package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/factory/getAutoBeGenerated.d.ts +3 -4
- package/lib/factory/getAutoBeGenerated.js +6 -250
- package/lib/factory/getAutoBeGenerated.js.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +886 -396
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyze.js +6 -1
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.d.ts +4 -1
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js +8 -3
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealize.js +11 -2
- package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js +46 -15
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeDecorator.d.ts +10 -0
- package/lib/orchestrate/realize/orchestrateRealizeDecorator.js +545 -0
- package/lib/orchestrate/realize/orchestrateRealizeDecorator.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +12 -9
- package/lib/orchestrate/realize/structures/IAutoBeRealizeDecoratorApplication.d.ts +85 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeDecoratorApplication.js +3 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeDecoratorApplication.js.map +1 -0
- package/lib/orchestrate/realize/transformRealizeCoderHistories.d.ts +1 -1
- package/lib/orchestrate/realize/transformRealizeCoderHistories.js +24 -30
- package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +1 -1
- package/lib/orchestrate/realize/transformRealizeDecorator.d.ts +4 -0
- package/lib/orchestrate/realize/transformRealizeDecorator.js +32 -0
- package/lib/orchestrate/realize/transformRealizeDecorator.js.map +1 -0
- package/lib/orchestrate/realize/transformRealizeDecoratorCorrectHistories.d.ts +6 -0
- package/lib/orchestrate/realize/transformRealizeDecoratorCorrectHistories.js +49 -0
- package/lib/orchestrate/realize/transformRealizeDecoratorCorrectHistories.js.map +1 -0
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js +30 -11
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.js +2 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/utils/backoffRetry.d.ts +18 -0
- package/lib/utils/backoffRetry.js +38 -0
- package/lib/utils/backoffRetry.js.map +1 -1
- package/package.json +8 -8
- package/src/AutoBeAgent.ts +10 -203
- package/src/AutoBeAgentBase.ts +78 -0
- package/src/AutoBeMockAgent.ts +164 -0
- package/src/constants/AutoBeSystemPromptConstant.ts +8 -4
- package/src/factory/getAutoBeGenerated.ts +8 -13
- package/src/index.ts +3 -1
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +7 -1
- package/src/orchestrate/analyze/writeDocumentUntilReviewPassed.ts +14 -1
- package/src/orchestrate/realize/orchestrateRealize.ts +11 -0
- package/src/orchestrate/realize/orchestrateRealizeCoder.ts +26 -4
- package/src/orchestrate/realize/orchestrateRealizeDecorator.ts +286 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +12 -9
- package/src/orchestrate/realize/structures/IAutoBeRealizeDecoratorApplication.ts +94 -0
- package/src/orchestrate/realize/transformRealizeCoderHistories.ts +22 -29
- package/src/orchestrate/realize/transformRealizeDecorator.ts +37 -0
- package/src/orchestrate/realize/transformRealizeDecoratorCorrectHistories.ts +58 -0
- package/src/orchestrate/realize/writeCodeUntilCompilePassed.ts +34 -9
- package/src/orchestrate/test/orchestrateTest.ts +1 -0
- package/src/orchestrate/test/orchestrateTestCorrect.ts +1 -1
- package/src/utils/backoffRetry.ts +56 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { AutoBeHistory, IAutoBeGetFilesOptions } from "@autobe/interface";
|
|
2
|
-
import {
|
|
3
|
-
import { AutoBeContext } from "../context/AutoBeContext";
|
|
1
|
+
import { AutoBeHistory, IAutoBeCompiler, IAutoBeGetFilesOptions } from "@autobe/interface";
|
|
2
|
+
import { AutoBeState } from "../context/AutoBeState";
|
|
4
3
|
import { AutoBeTokenUsage } from "../context/AutoBeTokenUsage";
|
|
5
|
-
export declare function getAutoBeGenerated
|
|
4
|
+
export declare function getAutoBeGenerated(compiler: IAutoBeCompiler, state: AutoBeState, histories: AutoBeHistory[], tokenUsage: AutoBeTokenUsage, options?: Partial<IAutoBeGetFilesOptions>): Promise<Record<string, string>>;
|
|
@@ -1,37 +1,4 @@
|
|
|
1
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
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -41,24 +8,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
41
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
9
|
});
|
|
43
10
|
};
|
|
44
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
|
-
};
|
|
47
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
12
|
exports.getAutoBeGenerated = getAutoBeGenerated;
|
|
49
|
-
|
|
50
|
-
const __typia_transform__jsonStringifyString = __importStar(require("typia/lib/internal/_jsonStringifyString.js"));
|
|
51
|
-
const __typia_transform__throwTypeGuardError = __importStar(require("typia/lib/internal/_throwTypeGuardError.js"));
|
|
52
|
-
const __typia_transform__isFormatDateTime = __importStar(require("typia/lib/internal/_isFormatDateTime.js"));
|
|
53
|
-
const __typia_transform__isFormatUuid = __importStar(require("typia/lib/internal/_isFormatUuid.js"));
|
|
54
|
-
const __typia_transform__isFormatUrl = __importStar(require("typia/lib/internal/_isFormatUrl.js"));
|
|
55
|
-
const typia_1 = __importDefault(require("typia"));
|
|
56
|
-
function getAutoBeGenerated(ctx, histories, tokenUsage, options) {
|
|
13
|
+
function getAutoBeGenerated(compiler, state, histories, tokenUsage, options) {
|
|
57
14
|
return __awaiter(this, void 0, void 0, function* () {
|
|
58
15
|
var _a, _b, _c, _d, _e, _f;
|
|
59
|
-
const state = ctx.state();
|
|
60
|
-
const ret = {};
|
|
61
16
|
// ANALYZE
|
|
17
|
+
const ret = {};
|
|
62
18
|
if (state.analyze === null)
|
|
63
19
|
return {};
|
|
64
20
|
Object.assign(ret, Object.fromEntries(Object.entries(state.analyze.files).map(([key, value]) => [
|
|
@@ -66,7 +22,6 @@ function getAutoBeGenerated(ctx, histories, tokenUsage, options) {
|
|
|
66
22
|
value,
|
|
67
23
|
])));
|
|
68
24
|
// PRISMA
|
|
69
|
-
const compiler = yield ctx.compiler();
|
|
70
25
|
if (((_a = state.prisma) === null || _a === void 0 ? void 0 : _a.step) === state.analyze.step) {
|
|
71
26
|
const schemaFiles = ((_b = options === null || options === void 0 ? void 0 : options.dbms) !== null && _b !== void 0 ? _b : "postgres") === "postgres"
|
|
72
27
|
? state.prisma.schemas
|
|
@@ -75,7 +30,7 @@ function getAutoBeGenerated(ctx, histories, tokenUsage, options) {
|
|
|
75
30
|
`prisma/schema/${key.split("/").at(-1)}`,
|
|
76
31
|
value,
|
|
77
32
|
])), {
|
|
78
|
-
"autobe/prisma.json":
|
|
33
|
+
"autobe/prisma.json": JSON.stringify(state.prisma.result.data),
|
|
79
34
|
});
|
|
80
35
|
if (state.prisma.compiled.type === "success")
|
|
81
36
|
ret["docs/ERD.md"] = state.prisma.compiled.document;
|
|
@@ -88,35 +43,7 @@ function getAutoBeGenerated(ctx, histories, tokenUsage, options) {
|
|
|
88
43
|
Object.assign(ret, ((_d = state.test) === null || _d === void 0 ? void 0 : _d.step) === state.interface.step
|
|
89
44
|
? Object.fromEntries(Object.entries(files).filter(([key]) => key.startsWith("test/features/") === false))
|
|
90
45
|
: files, {
|
|
91
|
-
"autobe/document.json":
|
|
92
|
-
return ""; return `${JSON.stringify(key)}:${_so10(value)}`; }).filter(str => "" !== str).join(",")}}`; const _so10 = input => `{"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)}}`; const _so11 = input => `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)}}`; const _su0 = input => (() => {
|
|
93
|
-
if ("number" === input.type)
|
|
94
|
-
return _so4(input);
|
|
95
|
-
else if ("integer" === input.type)
|
|
96
|
-
return _so3(input);
|
|
97
|
-
else if ("string" === input.type)
|
|
98
|
-
return _so5(input);
|
|
99
|
-
else
|
|
100
|
-
__typia_transform__throwTypeGuardError._throwTypeGuardError({
|
|
101
|
-
method: "typia.json.stringify",
|
|
102
|
-
expected: "(AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.IString)",
|
|
103
|
-
value: input
|
|
104
|
-
});
|
|
105
|
-
})(); const _io1 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && (null === input.authorizationRoles || Array.isArray(input.authorizationRoles) && (__typia_transform__isUniqueItems._isUniqueItems(input.authorizationRoles) && input.authorizationRoles.every(elem => "string" === typeof elem))) && "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io2 = input => "string" === typeof input.name && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu0(input.schema)); const _io3 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io4 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io5 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io8 = input => "object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && _io9(input.schemas) && (undefined === input.authorization || Array.isArray(input.authorization) && input.authorization.every(elem => "object" === typeof elem && null !== elem && _io11(elem))); const _io9 = input => Object.keys(input).every(key => {
|
|
106
|
-
const value = input[key];
|
|
107
|
-
if (undefined === value)
|
|
108
|
-
return true;
|
|
109
|
-
return "object" === typeof value && null !== value && _io10(value);
|
|
110
|
-
}); const _io10 = input => "string" === typeof input.description; const _io11 = input => "string" === typeof input.name && "string" === typeof input.description; const _iu0 = input => (() => {
|
|
111
|
-
if ("number" === input.type)
|
|
112
|
-
return _io4(input);
|
|
113
|
-
else if ("integer" === input.type)
|
|
114
|
-
return _io3(input);
|
|
115
|
-
else if ("string" === input.type)
|
|
116
|
-
return _io5(input);
|
|
117
|
-
else
|
|
118
|
-
return false;
|
|
119
|
-
})(); return input => _so0(input); })()(state.interface.document),
|
|
46
|
+
"autobe/document.json": JSON.stringify(state.interface.document),
|
|
120
47
|
});
|
|
121
48
|
}
|
|
122
49
|
// TEST
|
|
@@ -127,179 +54,8 @@ function getAutoBeGenerated(ctx, histories, tokenUsage, options) {
|
|
|
127
54
|
Object.assign(ret, state.realize.files, yield compiler.realize.getTemplate());
|
|
128
55
|
// LOGGING
|
|
129
56
|
Object.assign(ret, {
|
|
130
|
-
"autobe/histories.json":
|
|
131
|
-
|
|
132
|
-
return ""; return `${JSON.stringify(key)}:${_so15(value)}`; }).filter(str => "" !== str).join(",")}}`; const _so15 = input => `{"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)}}`; const _so16 = input => `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)}}`; const _so17 = input => `{"result":${_su3(input.result)},"schemas":${_so1(input.schemas)},"compiled":${_su4(input.compiled)},"reason":${__typia_transform__jsonStringifyString._jsonStringifyString(input.reason)},"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)},"step":${input.step},"completed_at":${__typia_transform__jsonStringifyString._jsonStringifyString(input.completed_at)},"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"type":${"\"" + input.type + "\""},"created_at":${__typia_transform__jsonStringifyString._jsonStringifyString(input.created_at)}}`; const _so18 = input => `{"success":${input.success},"data":${_so19(input.data)}}`; const _so19 = input => `{"files":${`[${input.files.map(elem => _so20(elem)).join(",")}]`}}`; const _so20 = input => `{"filename":${__typia_transform__jsonStringifyString._jsonStringifyString(input.filename)},"namespace":${__typia_transform__jsonStringifyString._jsonStringifyString(input.namespace)},"models":${`[${input.models.map(elem => _so21(elem)).join(",")}]`}}`; const _so21 = input => `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)},"material":${input.material},"primaryField":${_so22(input.primaryField)},"foreignFields":${`[${input.foreignFields.map(elem => _so23(elem)).join(",")}]`},"plainFields":${`[${input.plainFields.map(elem => _so25(elem)).join(",")}]`},"uniqueIndexes":${`[${input.uniqueIndexes.map(elem => _so26(elem)).join(",")}]`},"plainIndexes":${`[${input.plainIndexes.map(elem => _so27(elem)).join(",")}]`},"ginIndexes":${`[${input.ginIndexes.map(elem => _so28(elem)).join(",")}]`}}`; const _so22 = input => `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"type":${"\"" + input.type + "\""},"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)}}`; const _so23 = input => `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"type":${"\"" + input.type + "\""},"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)},"relation":${_so24(input.relation)},"unique":${input.unique},"nullable":${input.nullable}}`; const _so24 = input => `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"targetModel":${__typia_transform__jsonStringifyString._jsonStringifyString(input.targetModel)}}`; const _so25 = input => `{"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"type":${"\"" + input.type + "\""},"description":${__typia_transform__jsonStringifyString._jsonStringifyString(input.description)},"nullable":${input.nullable}}`; const _so26 = input => `{"fieldNames":${`[${input.fieldNames.map(elem => __typia_transform__jsonStringifyString._jsonStringifyString(elem)).join(",")}]`},"unique":${input.unique}}`; const _so27 = input => `{"fieldNames":${`[${input.fieldNames.map(elem => __typia_transform__jsonStringifyString._jsonStringifyString(elem)).join(",")}]`}}`; const _so28 = input => `{"fieldName":${__typia_transform__jsonStringifyString._jsonStringifyString(input.fieldName)}}`; const _so29 = input => `{"success":${input.success},"data":${_so19(input.data)},"errors":${`[${input.errors.map(elem => _so30(elem)).join(",")}]`}}`; const _so30 = input => `{"path":${__typia_transform__jsonStringifyString._jsonStringifyString(input.path)},"table":${null !== input.table ? __typia_transform__jsonStringifyString._jsonStringifyString(input.table) : "null"},"field":${null !== input.field ? __typia_transform__jsonStringifyString._jsonStringifyString(input.field) : "null"},"message":${__typia_transform__jsonStringifyString._jsonStringifyString(input.message)}}`; const _so31 = input => `{"type":${"\"" + input.type + "\""},"document":${__typia_transform__jsonStringifyString._jsonStringifyString(input.document)},"diagrams":${_so1(input.diagrams)},"schemas":${_so1(input.schemas)},"nodeModules":${_so1(input.nodeModules)}}`; const _so32 = input => `{"type":${"\"" + input.type + "\""},"reason":${__typia_transform__jsonStringifyString._jsonStringifyString(input.reason)}}`; const _so33 = input => `{${undefined === input.error || "function" === typeof input.error ? "" : `"error":${undefined !== input.error ? JSON.stringify(input.error) : undefined},`}"type":${"\"" + input.type + "\""}}`; const _so34 = input => `{"files":${_so1(input.files)},"compiled":${_su5(input.compiled)},"reason":${__typia_transform__jsonStringifyString._jsonStringifyString(input.reason)},"step":${input.step},"completed_at":${__typia_transform__jsonStringifyString._jsonStringifyString(input.completed_at)},"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"type":${"\"" + input.type + "\""},"created_at":${__typia_transform__jsonStringifyString._jsonStringifyString(input.created_at)}}`; const _so35 = input => `{"type":${"\"" + input.type + "\""}}`; const _so36 = input => `{"type":${"\"" + input.type + "\""},"diagnostics":${`[${input.diagnostics.map(elem => _so37(elem)).join(",")}]`}}`; const _so37 = input => `{${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.length ? "" : `"length":${undefined !== input.length ? input.length : undefined},`}"file":${null !== input.file ? __typia_transform__jsonStringifyString._jsonStringifyString(input.file) : "null"},"category":${"\"" + input.category + "\""},"code":${(() => {
|
|
133
|
-
if ("string" === typeof input.code)
|
|
134
|
-
return __typia_transform__jsonStringifyString._jsonStringifyString(input.code);
|
|
135
|
-
if ("number" === typeof input.code)
|
|
136
|
-
return input.code;
|
|
137
|
-
__typia_transform__throwTypeGuardError._throwTypeGuardError({
|
|
138
|
-
method: "typia.json.stringify",
|
|
139
|
-
expected: "(number | string)",
|
|
140
|
-
value: input.code
|
|
141
|
-
});
|
|
142
|
-
})()},"messageText":${__typia_transform__jsonStringifyString._jsonStringifyString(input.messageText)}}`; const _so38 = input => `{${undefined === input.error || "function" === typeof input.error ? "" : `"error":${undefined !== input.error ? JSON.stringify(input.error) : undefined},`}"type":${"\"" + input.type + "\""}}`; const _so39 = input => `{"files":${`[${input.files.map(elem => _so40(elem)).join(",")}]`},"compiled":${_su5(input.compiled)},"reason":${__typia_transform__jsonStringifyString._jsonStringifyString(input.reason)},"step":${input.step},"completed_at":${__typia_transform__jsonStringifyString._jsonStringifyString(input.completed_at)},"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"type":${"\"" + input.type + "\""},"created_at":${__typia_transform__jsonStringifyString._jsonStringifyString(input.created_at)}}`; const _so40 = input => `{"location":${__typia_transform__jsonStringifyString._jsonStringifyString(input.location)},"content":${__typia_transform__jsonStringifyString._jsonStringifyString(input.content)},"scenario":${_so41(input.scenario)}}`; const _so41 = input => `{"endpoint":${_so42(input.endpoint)},"draft":${__typia_transform__jsonStringifyString._jsonStringifyString(input.draft)},"functionName":${__typia_transform__jsonStringifyString._jsonStringifyString(input.functionName)},"dependencies":${`[${input.dependencies.map(elem => _so43(elem)).join(",")}]`}}`; const _so42 = input => `{"path":${__typia_transform__jsonStringifyString._jsonStringifyString(input.path)},"method":${"\"" + input.method + "\""}}`; const _so43 = input => `{"purpose":${__typia_transform__jsonStringifyString._jsonStringifyString(input.purpose)},"endpoint":${_so42(input.endpoint)}}`; const _so44 = input => `{"contents":${`[${input.contents.map(elem => _su1(elem)).join(",")}]`},"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"type":${"\"" + input.type + "\""},"created_at":${__typia_transform__jsonStringifyString._jsonStringifyString(input.created_at)}}`; const _so45 = input => `{"data":${__typia_transform__jsonStringifyString._jsonStringifyString(input.data)},"format":${"\"" + input.format + "\""},"type":${"\"" + input.type + "\""}}`; const _so46 = input => `{"file":${_su6(input.file)},"type":${"\"" + input.type + "\""}}`; const _so47 = input => `{"type":${"\"" + input.type + "\""},"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)}}`; const _so48 = input => `{"type":${"\"" + input.type + "\""},"name":${__typia_transform__jsonStringifyString._jsonStringifyString(input.name)},"data":${__typia_transform__jsonStringifyString._jsonStringifyString(input.data)}}`; const _so49 = input => `{${undefined === input.detail ? "" : `"detail":${undefined !== input.detail ? "\"" + input.detail + "\"" : undefined},`}"url":${__typia_transform__jsonStringifyString._jsonStringifyString(input.url)},"type":${"\"" + input.type + "\""}}`; const _so50 = input => `{"text":${__typia_transform__jsonStringifyString._jsonStringifyString(input.text)},"type":${"\"" + input.type + "\""}}`; const _su0 = input => (() => {
|
|
143
|
-
if ("analyze" === input.type)
|
|
144
|
-
return _so0(input);
|
|
145
|
-
else if ("assistantMessage" === input.type)
|
|
146
|
-
return _so3(input);
|
|
147
|
-
else if ("interface" === input.type)
|
|
148
|
-
return _so4(input);
|
|
149
|
-
else if ("prisma" === input.type)
|
|
150
|
-
return _so17(input);
|
|
151
|
-
else if ("test" === input.type)
|
|
152
|
-
return _so39(input);
|
|
153
|
-
else if ("realize" === input.type)
|
|
154
|
-
return _so34(input);
|
|
155
|
-
else if ("userMessage" === input.type)
|
|
156
|
-
return _so44(input);
|
|
157
|
-
else
|
|
158
|
-
__typia_transform__throwTypeGuardError._throwTypeGuardError({
|
|
159
|
-
method: "typia.json.stringify",
|
|
160
|
-
expected: "(AutoBeAnalyzeHistory | AutoBeAssistantMessageHistory | AutoBeInterfaceHistory | AutoBePrismaHistory | AutoBeTestHistory | AutoBeRealizeHistory | AutoBeUserMessageHistory)",
|
|
161
|
-
value: input
|
|
162
|
-
});
|
|
163
|
-
})(); const _su1 = input => (() => {
|
|
164
|
-
if (undefined !== input.format)
|
|
165
|
-
return _so45(input);
|
|
166
|
-
else if ("file" === input.type)
|
|
167
|
-
return _so46(input);
|
|
168
|
-
else if ("image" === input.type)
|
|
169
|
-
return _so49(input);
|
|
170
|
-
else if ("text" === input.type)
|
|
171
|
-
return _so50(input);
|
|
172
|
-
else
|
|
173
|
-
__typia_transform__throwTypeGuardError._throwTypeGuardError({
|
|
174
|
-
method: "typia.json.stringify",
|
|
175
|
-
expected: "(AutoBeUserMessageAudioContent | AutoBeUserMessageFileContent | AutoBeUserMessageImageContent | AutoBeUserMessageTextContent)",
|
|
176
|
-
value: input
|
|
177
|
-
});
|
|
178
|
-
})(); const _su2 = input => (() => {
|
|
179
|
-
if ("number" === input.type)
|
|
180
|
-
return _so9(input);
|
|
181
|
-
else if ("integer" === input.type)
|
|
182
|
-
return _so8(input);
|
|
183
|
-
else if ("string" === input.type)
|
|
184
|
-
return _so10(input);
|
|
185
|
-
else
|
|
186
|
-
__typia_transform__throwTypeGuardError._throwTypeGuardError({
|
|
187
|
-
method: "typia.json.stringify",
|
|
188
|
-
expected: "(AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.IString)",
|
|
189
|
-
value: input
|
|
190
|
-
});
|
|
191
|
-
})(); const _su3 = input => (() => {
|
|
192
|
-
if (true === input.success)
|
|
193
|
-
return _so18(input);
|
|
194
|
-
else if (false === input.success)
|
|
195
|
-
return _so29(input);
|
|
196
|
-
else
|
|
197
|
-
__typia_transform__throwTypeGuardError._throwTypeGuardError({
|
|
198
|
-
method: "typia.json.stringify",
|
|
199
|
-
expected: "(IAutoBePrismaValidation.ISuccess | IAutoBePrismaValidation.IFailure)",
|
|
200
|
-
value: input
|
|
201
|
-
});
|
|
202
|
-
})(); const _su4 = input => (() => {
|
|
203
|
-
if ("success" === input.type)
|
|
204
|
-
return _so31(input);
|
|
205
|
-
else if ("failure" === input.type)
|
|
206
|
-
return _so32(input);
|
|
207
|
-
else if ("exception" === input.type)
|
|
208
|
-
return _so33(input);
|
|
209
|
-
else
|
|
210
|
-
__typia_transform__throwTypeGuardError._throwTypeGuardError({
|
|
211
|
-
method: "typia.json.stringify",
|
|
212
|
-
expected: "(IAutoBePrismaCompileResult.ISuccess | IAutoBePrismaCompileResult.IFailure | IAutoBePrismaCompileResult.IException)",
|
|
213
|
-
value: input
|
|
214
|
-
});
|
|
215
|
-
})(); const _su5 = input => (() => {
|
|
216
|
-
if ("success" === input.type)
|
|
217
|
-
return _so35(input);
|
|
218
|
-
else if ("failure" === input.type)
|
|
219
|
-
return _so36(input);
|
|
220
|
-
else if ("exception" === input.type)
|
|
221
|
-
return _so38(input);
|
|
222
|
-
else
|
|
223
|
-
__typia_transform__throwTypeGuardError._throwTypeGuardError({
|
|
224
|
-
method: "typia.json.stringify",
|
|
225
|
-
expected: "(IAutoBeTypeScriptCompileResult.ISuccess | IAutoBeTypeScriptCompileResult.IFailure | IAutoBeTypeScriptCompileResult.IException)",
|
|
226
|
-
value: input
|
|
227
|
-
});
|
|
228
|
-
})(); const _su6 = input => (() => {
|
|
229
|
-
if ("reference" === input.type)
|
|
230
|
-
return _so47(input);
|
|
231
|
-
else if ("data" === input.type)
|
|
232
|
-
return _so48(input);
|
|
233
|
-
else
|
|
234
|
-
__typia_transform__throwTypeGuardError._throwTypeGuardError({
|
|
235
|
-
method: "typia.json.stringify",
|
|
236
|
-
expected: "(AutoBeUserMessageFileContent.IReference | AutoBeUserMessageFileContent.IData)",
|
|
237
|
-
value: input
|
|
238
|
-
});
|
|
239
|
-
})(); const _io0 = input => "string" === typeof input.reason && "number" === typeof input.step && "string" === typeof input.prefix && ("object" === typeof input.files && null !== input.files && false === Array.isArray(input.files) && _io1(input.files)) && ("string" === typeof input.completed_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.completed_at)) && (Array.isArray(input.roles) && input.roles.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && ("string" === typeof input.id && __typia_transform__isFormatUuid._isFormatUuid(input.id)) && "analyze" === input.type && ("string" === typeof input.created_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.created_at)); const _io1 = input => Object.keys(input).every(key => {
|
|
240
|
-
const value = input[key];
|
|
241
|
-
if (undefined === value)
|
|
242
|
-
return true;
|
|
243
|
-
return "string" === typeof value;
|
|
244
|
-
}); const _io2 = input => "string" === typeof input.name && "string" === typeof input.description; const _io3 = input => "string" === typeof input.text && ("string" === typeof input.completed_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.completed_at)) && ("string" === typeof input.id && __typia_transform__isFormatUuid._isFormatUuid(input.id)) && "assistantMessage" === input.type && ("string" === typeof input.created_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.created_at)); const _io4 = input => "object" === typeof input.document && null !== input.document && _io5(input.document) && "string" === typeof input.reason && "number" === typeof input.step && ("string" === typeof input.completed_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.completed_at)) && ("string" === typeof input.id && __typia_transform__isFormatUuid._isFormatUuid(input.id)) && "interface" === input.type && ("string" === typeof input.created_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.created_at)); const _io5 = input => Array.isArray(input.operations) && (1 <= input.operations.length && input.operations.every(elem => "object" === typeof elem && null !== elem && _io6(elem))) && ("object" === typeof input.components && null !== input.components && _io13(input.components)); const _io6 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io7(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io11(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io12(input.responseBody)) && (null === input.authorizationRoles || Array.isArray(input.authorizationRoles) && (__typia_transform__isUniqueItems._isUniqueItems(input.authorizationRoles) && input.authorizationRoles.every(elem => "string" === typeof elem))) && "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io7 = input => "string" === typeof input.name && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu2(input.schema)); const _io8 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io9 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io10 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io11 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io12 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io13 = input => "object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && _io14(input.schemas) && (undefined === input.authorization || Array.isArray(input.authorization) && input.authorization.every(elem => "object" === typeof elem && null !== elem && _io16(elem))); const _io14 = input => Object.keys(input).every(key => {
|
|
245
|
-
const value = input[key];
|
|
246
|
-
if (undefined === value)
|
|
247
|
-
return true;
|
|
248
|
-
return "object" === typeof value && null !== value && _io15(value);
|
|
249
|
-
}); const _io15 = input => "string" === typeof input.description; const _io16 = input => "string" === typeof input.name && "string" === typeof input.description; const _io17 = input => "object" === typeof input.result && null !== input.result && _iu3(input.result) && ("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && _io1(input.schemas)) && ("object" === typeof input.compiled && null !== input.compiled && _iu4(input.compiled)) && "string" === typeof input.reason && "string" === typeof input.description && "number" === typeof input.step && ("string" === typeof input.completed_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.completed_at)) && ("string" === typeof input.id && __typia_transform__isFormatUuid._isFormatUuid(input.id)) && "prisma" === input.type && ("string" === typeof input.created_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.created_at)); const _io18 = input => true === input.success && ("object" === typeof input.data && null !== input.data && _io19(input.data)); const _io19 = input => Array.isArray(input.files) && input.files.every(elem => "object" === typeof elem && null !== elem && _io20(elem)); const _io20 = input => "string" === typeof input.filename && RegExp("^[a-zA-Z0-9._-]+\\.prisma$").test(input.filename) && "string" === typeof input.namespace && (Array.isArray(input.models) && (1 <= input.models.length && input.models.every(elem => "object" === typeof elem && null !== elem && _io21(elem)))); const _io21 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "string" === typeof input.description && "boolean" === typeof input.material && ("object" === typeof input.primaryField && null !== input.primaryField && _io22(input.primaryField)) && (Array.isArray(input.foreignFields) && input.foreignFields.every(elem => "object" === typeof elem && null !== elem && _io23(elem))) && (Array.isArray(input.plainFields) && input.plainFields.every(elem => "object" === typeof elem && null !== elem && _io25(elem))) && (Array.isArray(input.uniqueIndexes) && input.uniqueIndexes.every(elem => "object" === typeof elem && null !== elem && _io26(elem))) && (Array.isArray(input.plainIndexes) && input.plainIndexes.every(elem => "object" === typeof elem && null !== elem && _io27(elem))) && (Array.isArray(input.ginIndexes) && input.ginIndexes.every(elem => "object" === typeof elem && null !== elem && _io28(elem))); const _io22 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description; const _io23 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description && ("object" === typeof input.relation && null !== input.relation && _io24(input.relation)) && "boolean" === typeof input.unique && "boolean" === typeof input.nullable; const _io24 = input => "string" === typeof input.name && RegExp("^[a-zA-Z_][a-zA-Z0-9_]*$").test(input.name) && "string" === typeof input.targetModel; const _io25 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && ("string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type) && "string" === typeof input.description && "boolean" === typeof input.nullable; const _io26 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)) && true === input.unique; const _io27 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)); const _io28 = input => "string" === typeof input.fieldName; const _io29 = input => false === input.success && ("object" === typeof input.data && null !== input.data && _io19(input.data)) && (Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && _io30(elem))); const _io30 = input => "string" === typeof input.path && (null === input.table || "string" === typeof input.table) && (null === input.field || "string" === typeof input.field) && "string" === typeof input.message; const _io31 = input => "success" === input.type && "string" === typeof input.document && ("object" === typeof input.diagrams && null !== input.diagrams && false === Array.isArray(input.diagrams) && _io1(input.diagrams)) && ("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && _io1(input.schemas)) && ("object" === typeof input.nodeModules && null !== input.nodeModules && false === Array.isArray(input.nodeModules) && _io1(input.nodeModules)); const _io32 = input => "failure" === input.type && "string" === typeof input.reason; const _io33 = input => "exception" === input.type && true; const _io34 = input => "object" === typeof input.files && null !== input.files && false === Array.isArray(input.files) && _io1(input.files) && ("object" === typeof input.compiled && null !== input.compiled && _iu5(input.compiled)) && "string" === typeof input.reason && "number" === typeof input.step && ("string" === typeof input.completed_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.completed_at)) && ("string" === typeof input.id && __typia_transform__isFormatUuid._isFormatUuid(input.id)) && "realize" === input.type && ("string" === typeof input.created_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.created_at)); const _io35 = input => "success" === input.type; const _io36 = input => "failure" === input.type && (Array.isArray(input.diagnostics) && input.diagnostics.every(elem => "object" === typeof elem && null !== elem && _io37(elem))); const _io37 = input => (null === input.file || "string" === typeof input.file) && ("warning" === input.category || "error" === input.category || "suggestion" === input.category || "message" === input.category) && ("string" === typeof input.code || "number" === typeof input.code) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.length || "number" === typeof input.length) && "string" === typeof input.messageText; const _io38 = input => "exception" === input.type && true; const _io39 = input => Array.isArray(input.files) && input.files.every(elem => "object" === typeof elem && null !== elem && _io40(elem)) && ("object" === typeof input.compiled && null !== input.compiled && _iu5(input.compiled)) && "string" === typeof input.reason && "number" === typeof input.step && ("string" === typeof input.completed_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.completed_at)) && ("string" === typeof input.id && __typia_transform__isFormatUuid._isFormatUuid(input.id)) && "test" === input.type && ("string" === typeof input.created_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.created_at)); const _io40 = input => "string" === typeof input.location && "string" === typeof input.content && ("object" === typeof input.scenario && null !== input.scenario && _io41(input.scenario)); const _io41 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io42(input.endpoint) && "string" === typeof input.draft && "string" === typeof input.functionName && (Array.isArray(input.dependencies) && input.dependencies.every(elem => "object" === typeof elem && null !== elem && _io43(elem))); const _io42 = input => "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io43 = input => "string" === typeof input.purpose && ("object" === typeof input.endpoint && null !== input.endpoint && _io42(input.endpoint)); const _io44 = input => Array.isArray(input.contents) && input.contents.every(elem => "object" === typeof elem && null !== elem && _iu1(elem)) && ("string" === typeof input.id && __typia_transform__isFormatUuid._isFormatUuid(input.id)) && "userMessage" === input.type && ("string" === typeof input.created_at && __typia_transform__isFormatDateTime._isFormatDateTime(input.created_at)); const _io45 = input => "string" === typeof input.data && ("wav" === input.format || "mp3" === input.format) && "audio" === input.type; const _io46 = input => "object" === typeof input.file && null !== input.file && _iu6(input.file) && "file" === input.type; const _io47 = input => "reference" === input.type && "string" === typeof input.id; const _io48 = input => "data" === input.type && "string" === typeof input.name && "string" === typeof input.data; const _io49 = input => "string" === typeof input.url && __typia_transform__isFormatUrl._isFormatUrl(input.url) && (undefined === input.detail || "auto" === input.detail || "high" === input.detail || "low" === input.detail) && "image" === input.type; const _io50 = input => "string" === typeof input.text && "text" === input.type; const _iu1 = input => (() => {
|
|
250
|
-
if (undefined !== input.format)
|
|
251
|
-
return _io45(input);
|
|
252
|
-
else if ("file" === input.type)
|
|
253
|
-
return _io46(input);
|
|
254
|
-
else if ("image" === input.type)
|
|
255
|
-
return _io49(input);
|
|
256
|
-
else if ("text" === input.type)
|
|
257
|
-
return _io50(input);
|
|
258
|
-
else
|
|
259
|
-
return false;
|
|
260
|
-
})(); const _iu2 = input => (() => {
|
|
261
|
-
if ("number" === input.type)
|
|
262
|
-
return _io9(input);
|
|
263
|
-
else if ("integer" === input.type)
|
|
264
|
-
return _io8(input);
|
|
265
|
-
else if ("string" === input.type)
|
|
266
|
-
return _io10(input);
|
|
267
|
-
else
|
|
268
|
-
return false;
|
|
269
|
-
})(); const _iu3 = input => (() => {
|
|
270
|
-
if (true === input.success)
|
|
271
|
-
return _io18(input);
|
|
272
|
-
else if (false === input.success)
|
|
273
|
-
return _io29(input);
|
|
274
|
-
else
|
|
275
|
-
return false;
|
|
276
|
-
})(); const _iu4 = input => (() => {
|
|
277
|
-
if ("success" === input.type)
|
|
278
|
-
return _io31(input);
|
|
279
|
-
else if ("failure" === input.type)
|
|
280
|
-
return _io32(input);
|
|
281
|
-
else if ("exception" === input.type)
|
|
282
|
-
return _io33(input);
|
|
283
|
-
else
|
|
284
|
-
return false;
|
|
285
|
-
})(); const _iu5 = input => (() => {
|
|
286
|
-
if ("success" === input.type)
|
|
287
|
-
return _io35(input);
|
|
288
|
-
else if ("failure" === input.type)
|
|
289
|
-
return _io36(input);
|
|
290
|
-
else if ("exception" === input.type)
|
|
291
|
-
return _io38(input);
|
|
292
|
-
else
|
|
293
|
-
return false;
|
|
294
|
-
})(); const _iu6 = input => (() => {
|
|
295
|
-
if ("reference" === input.type)
|
|
296
|
-
return _io47(input);
|
|
297
|
-
else if ("data" === input.type)
|
|
298
|
-
return _io48(input);
|
|
299
|
-
else
|
|
300
|
-
return false;
|
|
301
|
-
})(); return input => `[${input.map(elem => _su0(elem)).join(",")}]`; })()(histories),
|
|
302
|
-
"autobe/tokenUsage.json": (() => { const _so2 = input => `{"total":${input.total},"input":${_so3(input.input)},"output":${_so4(input.output)}}`; const _so3 = input => `{"total":${input.total},"cached":${input.cached}}`; const _so4 = input => `{"total":${input.total},"reasoning":${input.reasoning},"accepted_prediction":${input.accepted_prediction},"rejected_prediction":${input.rejected_prediction}}`; const _so5 = input => `{"aggregate":${_so6(input.aggregate)},"initialize":${_so6(input.initialize)},"select":${_so6(input.select)},"cancel":${_so6(input.cancel)},"call":${_so6(input.call)},"describe":${_so6(input.describe)}}`; const _so6 = input => `{"total":${input.total},"input":${_so7(input.input)},"output":${_so8(input.output)}}`; const _so7 = input => `{"total":${input.total},"cached":${input.cached}}`; const _so8 = input => `{"total":${input.total},"reasoning":${input.reasoning},"accepted_prediction":${input.accepted_prediction},"rejected_prediction":${input.rejected_prediction}}`; const _so9 = input => `{"facade":${_so10(input.facade)},"analyze":${_so10(input.analyze)},"prisma":${_so10(input.prisma)},"interface":${_so10(input.interface)},"test":${_so10(input.test)},"realize":${_so10(input.realize)}}`; const _so10 = input => `{"aggregate":${_so11(input.aggregate)},"initialize":${_so11(input.initialize)},"select":${_so11(input.select)},"cancel":${_so11(input.cancel)},"call":${_so11(input.call)},"describe":${_so11(input.describe)}}`; const _so11 = input => `{"total":${input.total},"input":${_so12(input.input)},"output":${_so13(input.output)}}`; const _so12 = input => `{"total":${input.total},"cached":${input.cached}}`; const _so13 = input => `{"total":${input.total},"reasoning":${input.reasoning},"accepted_prediction":${input.accepted_prediction},"rejected_prediction":${input.rejected_prediction}}`; const _io1 = input => "object" === typeof input.aggregate && null !== input.aggregate && _io2(input.aggregate) && ("object" === typeof input.initialize && null !== input.initialize && _io2(input.initialize)) && ("object" === typeof input.select && null !== input.select && _io2(input.select)) && ("object" === typeof input.cancel && null !== input.cancel && _io2(input.cancel)) && ("object" === typeof input.call && null !== input.call && _io2(input.call)) && ("object" === typeof input.describe && null !== input.describe && _io2(input.describe)); const _io2 = input => "number" === typeof input.total && ("object" === typeof input.input && null !== input.input && _io3(input.input)) && ("object" === typeof input.output && null !== input.output && _io4(input.output)); const _io3 = input => "number" === typeof input.total && "number" === typeof input.cached; const _io4 = input => "number" === typeof input.total && "number" === typeof input.reasoning && "number" === typeof input.accepted_prediction && "number" === typeof input.rejected_prediction; const _io5 = input => "object" === typeof input.aggregate && null !== input.aggregate && _io6(input.aggregate) && ("object" === typeof input.initialize && null !== input.initialize && _io6(input.initialize)) && ("object" === typeof input.select && null !== input.select && _io6(input.select)) && ("object" === typeof input.cancel && null !== input.cancel && _io6(input.cancel)) && ("object" === typeof input.call && null !== input.call && _io6(input.call)) && ("object" === typeof input.describe && null !== input.describe && _io6(input.describe)); const _io6 = input => "number" === typeof input.total && ("object" === typeof input.input && null !== input.input && _io7(input.input)) && ("object" === typeof input.output && null !== input.output && _io8(input.output)); const _io7 = input => "number" === typeof input.total && "number" === typeof input.cached; const _io8 = input => "number" === typeof input.total && "number" === typeof input.reasoning && "number" === typeof input.accepted_prediction && "number" === typeof input.rejected_prediction; const _io10 = input => "object" === typeof input.aggregate && null !== input.aggregate && _io11(input.aggregate) && ("object" === typeof input.initialize && null !== input.initialize && _io11(input.initialize)) && ("object" === typeof input.select && null !== input.select && _io11(input.select)) && ("object" === typeof input.cancel && null !== input.cancel && _io11(input.cancel)) && ("object" === typeof input.call && null !== input.call && _io11(input.call)) && ("object" === typeof input.describe && null !== input.describe && _io11(input.describe)); const _io11 = input => "number" === typeof input.total && ("object" === typeof input.input && null !== input.input && _io12(input.input)) && ("object" === typeof input.output && null !== input.output && _io13(input.output)); const _io12 = input => "number" === typeof input.total && "number" === typeof input.cached; const _io13 = input => "number" === typeof input.total && "number" === typeof input.reasoning && "number" === typeof input.accepted_prediction && "number" === typeof input.rejected_prediction; return input => _so9(input.toJSON()); })()(tokenUsage),
|
|
57
|
+
"autobe/histories.json": JSON.stringify(histories),
|
|
58
|
+
"autobe/tokenUsage.json": JSON.stringify(tokenUsage),
|
|
303
59
|
});
|
|
304
60
|
return ret;
|
|
305
61
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAutoBeGenerated.js","sourceRoot":"","sources":["../../src/factory/getAutoBeGenerated.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getAutoBeGenerated.js","sourceRoot":"","sources":["../../src/factory/getAutoBeGenerated.ts"],"names":[],"mappings":"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"}
|
package/lib/index.js
CHANGED
|
@@ -46,4 +46,6 @@ __exportStar(require("./structures/IAutoBeVendor"), exports);
|
|
|
46
46
|
exports.factory = __importStar(require("./factory"));
|
|
47
47
|
/** @internal */
|
|
48
48
|
exports.orchestrate = __importStar(require("./orchestrate"));
|
|
49
|
+
/** @internal */
|
|
50
|
+
__exportStar(require("./AutoBeMockAgent"), exports);
|
|
49
51
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA8B;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,6DAA2C;AAE3C,4DAA0C;AAC1C,6DAA2C;AAC3C,6DAA2C;AAE3C,gBAAgB;AAChB,qDAAqC;AAErC,gBAAgB;AAChB,6DAA6C;AAE7C,gBAAgB;AAChB,oDAAkC"}
|