@autobe/agent 0.14.4 → 0.14.6
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/constants/AutoBeSystemPromptConstant.d.ts +2 -2
- package/lib/index.mjs +662 -182
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +12 -10
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealize.js +2 -2
- package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js +77 -82
- 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/structures/{IAutoBeRealizeDecoratorApplication.d.ts → IAutoBeRealizeAuthorizationApplication.d.ts} +9 -9
- package/lib/orchestrate/realize/structures/{IAutoBeRealizeDecoratorApplication.js → IAutoBeRealizeAuthorizationApplication.js} +1 -1
- 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/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/test/orchestrateTestCorrect.js +2 -0
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestWrite.js +2 -0
- package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/package.json +6 -5
- package/src/constants/AutoBeSystemPromptConstant.ts +2 -2
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +11 -9
- package/src/orchestrate/realize/orchestrateRealize.ts +7 -2
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +40 -36
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +179 -0
- package/src/orchestrate/realize/structures/{IAutoBeRealizeDecoratorApplication.ts → IAutoBeRealizeAuthorizationApplication.ts} +11 -9
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.ts +40 -0
- package/src/orchestrate/realize/{transformRealizeDecorator.ts → transformRealizeAuthorization.ts} +13 -2
- package/src/orchestrate/realize/{transformRealizeDecoratorCorrectHistories.ts → transformRealizeAuthorizationCorrectHistories.ts} +15 -7
- package/src/orchestrate/test/orchestrateTestCorrect.ts +3 -0
- package/src/orchestrate/test/orchestrateTestWrite.ts +8 -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
|
@@ -0,0 +1,513 @@
|
|
|
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.orchestrateRealizeAuthorizationCorrect = orchestrateRealizeAuthorizationCorrect;
|
|
49
|
+
const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
|
|
50
|
+
const core_1 = require("@agentica/core");
|
|
51
|
+
const typia_1 = __importDefault(require("typia"));
|
|
52
|
+
const assertSchemaModel_1 = require("../../context/assertSchemaModel");
|
|
53
|
+
const enforceToolCall_1 = require("../../utils/enforceToolCall");
|
|
54
|
+
const transformRealizeAuthorizationCorrectHistories_1 = require("./transformRealizeAuthorizationCorrectHistories");
|
|
55
|
+
const AuthorizationFileSystem_1 = require("./utils/AuthorizationFileSystem");
|
|
56
|
+
function orchestrateRealizeAuthorizationCorrect(ctx_1, authorization_1, prismaClients_1, templateFiles_1) {
|
|
57
|
+
return __awaiter(this, arguments, void 0, function* (ctx, authorization, prismaClients, templateFiles, life = 4) {
|
|
58
|
+
var _a, _b, _c, _d, _e;
|
|
59
|
+
// Check Compile
|
|
60
|
+
const files = Object.assign(Object.assign(Object.assign({}, templateFiles), prismaClients), { [AuthorizationFileSystem_1.AuthorizationFileSystem.decoratorPath(authorization.decorator.name)]: authorization.decorator.content, [AuthorizationFileSystem_1.AuthorizationFileSystem.providerPath(authorization.provider.name)]: authorization.provider.content, [AuthorizationFileSystem_1.AuthorizationFileSystem.payloadPath(authorization.payload.name)]: authorization.payload.content });
|
|
61
|
+
const compiler = yield ctx.compiler();
|
|
62
|
+
const compiled = yield compiler.typescript.compile({
|
|
63
|
+
files,
|
|
64
|
+
});
|
|
65
|
+
ctx.dispatch({
|
|
66
|
+
type: "realizeAuthorizationValidate",
|
|
67
|
+
created_at: new Date().toISOString(),
|
|
68
|
+
authorization: authorization,
|
|
69
|
+
result: compiled,
|
|
70
|
+
step: (_b = (_a = ctx.state().test) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
|
|
71
|
+
});
|
|
72
|
+
if (compiled.type === "success") {
|
|
73
|
+
return authorization;
|
|
74
|
+
}
|
|
75
|
+
else if (compiled.type === "exception" || life === 0) {
|
|
76
|
+
return authorization;
|
|
77
|
+
}
|
|
78
|
+
const pointer = {
|
|
79
|
+
value: null,
|
|
80
|
+
};
|
|
81
|
+
const agentica = new core_1.MicroAgentica({
|
|
82
|
+
model: ctx.model,
|
|
83
|
+
vendor: ctx.vendor,
|
|
84
|
+
config: Object.assign(Object.assign({}, ((_c = ctx.config) !== null && _c !== void 0 ? _c : {})), { executor: {
|
|
85
|
+
describe: null,
|
|
86
|
+
} }),
|
|
87
|
+
histories: (0, transformRealizeAuthorizationCorrectHistories_1.transformRealizeAuthorizationCorrectHistories)(ctx, authorization, templateFiles, compiled.diagnostics),
|
|
88
|
+
controllers: [
|
|
89
|
+
createApplication({
|
|
90
|
+
model: ctx.model,
|
|
91
|
+
build: (next) => {
|
|
92
|
+
pointer.value = next;
|
|
93
|
+
},
|
|
94
|
+
}),
|
|
95
|
+
],
|
|
96
|
+
});
|
|
97
|
+
(0, enforceToolCall_1.enforceToolCall)(agentica);
|
|
98
|
+
yield agentica
|
|
99
|
+
.conversate("Please correct the decorator and the provider.")
|
|
100
|
+
.finally(() => {
|
|
101
|
+
const tokenUsage = agentica.getTokenUsage();
|
|
102
|
+
ctx.usage().record(tokenUsage, ["realize"]);
|
|
103
|
+
});
|
|
104
|
+
if (pointer.value === null)
|
|
105
|
+
throw new Error("Failed to correct decorator.");
|
|
106
|
+
const result = Object.assign(Object.assign({}, pointer.value), { decorator: Object.assign(Object.assign({}, pointer.value.decorator), { location: AuthorizationFileSystem_1.AuthorizationFileSystem.decoratorPath(pointer.value.decorator.name) }), provider: Object.assign(Object.assign({}, pointer.value.provider), { location: AuthorizationFileSystem_1.AuthorizationFileSystem.providerPath(pointer.value.provider.name) }), payload: Object.assign(Object.assign({}, pointer.value.payload), { location: AuthorizationFileSystem_1.AuthorizationFileSystem.payloadPath(pointer.value.payload.name) }), role: authorization.role });
|
|
107
|
+
ctx.dispatch(Object.assign(Object.assign({}, pointer.value), { type: "realizeAuthorizationCorrect", created_at: new Date().toISOString(), authorization: result, result: compiled, step: (_e = (_d = ctx.state().test) === null || _d === void 0 ? void 0 : _d.step) !== null && _e !== void 0 ? _e : 0 }));
|
|
108
|
+
return yield orchestrateRealizeAuthorizationCorrect(ctx, result, prismaClients, templateFiles, life - 1);
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
function createApplication(props) {
|
|
112
|
+
(0, assertSchemaModel_1.assertSchemaModel)(props.model);
|
|
113
|
+
const application = collection[props.model];
|
|
114
|
+
return {
|
|
115
|
+
protocol: "class",
|
|
116
|
+
name: "Correct Authorization",
|
|
117
|
+
application,
|
|
118
|
+
execute: {
|
|
119
|
+
correctDecorator: (next) => {
|
|
120
|
+
props.build(next);
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
const claude = {
|
|
126
|
+
model: "claude",
|
|
127
|
+
options: {
|
|
128
|
+
reference: true,
|
|
129
|
+
separate: null
|
|
130
|
+
},
|
|
131
|
+
functions: [
|
|
132
|
+
{
|
|
133
|
+
name: "correctDecorator",
|
|
134
|
+
parameters: {
|
|
135
|
+
description: "Current Type: {@link IAutoBeRealizeAuthorizationCorrectApplication.IProps}",
|
|
136
|
+
type: "object",
|
|
137
|
+
properties: {
|
|
138
|
+
error_analysis: {
|
|
139
|
+
description: "Step 1: TypeScript compilation error analysis and diagnosis.\n\nAI identifies all compilation errors (type mismatches, imports, syntax)\nand categorizes them by component (provider/decorator/payload). Analyzes\nerror dependencies and determines fix priorities for systematic\nresolution.",
|
|
140
|
+
type: "string"
|
|
141
|
+
},
|
|
142
|
+
corrected_implementation: {
|
|
143
|
+
description: "Step 2: Corrected implementation with all compilation errors resolved.\n\nAI generates fixed versions of provider, decorator, and payload code.\nMaintains original functionality while ensuring TypeScript compilation\nsuccess and proper NestJS/Prisma framework integration.",
|
|
144
|
+
type: "string"
|
|
145
|
+
},
|
|
146
|
+
validation_summary: {
|
|
147
|
+
description: "Step 3: Final validation and comprehensive fix summary.\n\nAI validates corrected code compiles successfully and documents all\nchanges made. Provides production-ready code with detailed change log for\nmaintenance reference.",
|
|
148
|
+
type: "string"
|
|
149
|
+
},
|
|
150
|
+
provider: {
|
|
151
|
+
description: "Authentication Provider function configuration containing the function\nname and implementation code. The Provider handles JWT token\nverification, role validation, and database queries to authenticate\nusers.",
|
|
152
|
+
$ref: "#/$defs/IAutoBeRealizeAuthorizationApplication.IProvider"
|
|
153
|
+
},
|
|
154
|
+
decorator: {
|
|
155
|
+
description: "Authentication Decorator configuration containing the decorator name and\nimplementation code. The Decorator integrates with NestJS parameter\ndecorators to automatically inject authenticated user data into\nController methods.",
|
|
156
|
+
$ref: "#/$defs/IAutoBeRealizeAuthorizationApplication.IDecorator"
|
|
157
|
+
},
|
|
158
|
+
payload: {
|
|
159
|
+
description: "Authentication Payload Type configuration containing the payload type\nname and implementation code. The Payload Type is used to define the\nstructure of the authenticated user data that will be injected into\nController methods when using the decorator. It serves as the TypeScript\ntype for the parameter in Controller method signatures.",
|
|
160
|
+
$ref: "#/$defs/IAutoBeRealizeAuthorizationApplication.IPayloadType"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
required: [
|
|
164
|
+
"error_analysis",
|
|
165
|
+
"corrected_implementation",
|
|
166
|
+
"validation_summary",
|
|
167
|
+
"provider",
|
|
168
|
+
"decorator",
|
|
169
|
+
"payload"
|
|
170
|
+
],
|
|
171
|
+
additionalProperties: false,
|
|
172
|
+
$defs: {
|
|
173
|
+
"IAutoBeRealizeAuthorizationApplication.IProvider": {
|
|
174
|
+
type: "object",
|
|
175
|
+
properties: {
|
|
176
|
+
name: {
|
|
177
|
+
description: "The name of the authentication Provider function in {role}Authorize\nformat (e.g., adminAuthorize, userAuthorize). This function will be\ncalled by the decorator to verify JWT tokens and return authenticated\nuser information for the specified role.",
|
|
178
|
+
type: "string"
|
|
179
|
+
},
|
|
180
|
+
content: {
|
|
181
|
+
description: "Complete TypeScript code for the authentication Provider function and its\ncorresponding Payload interface. Must include: JWT token verification\nusing jwtAuthorize function, role type checking against payload.type,\ndatabase query using MyGlobal.prisma.{tableName} pattern to verify user\nexistence, proper error handling with ForbiddenException and\nUnauthorizedException, and the Payload interface definition with id (UUID\nformat) and type (role discriminator) fields using typia tags.",
|
|
182
|
+
type: "string"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
required: [
|
|
186
|
+
"name",
|
|
187
|
+
"content"
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
"IAutoBeRealizeAuthorizationApplication.IDecorator": {
|
|
191
|
+
type: "object",
|
|
192
|
+
properties: {
|
|
193
|
+
name: {
|
|
194
|
+
description: "The name of the Decorator to be generated in {Role}Auth format (e.g.,\nAdminAuth, UserAuth). This decorator will be used as a parameter\ndecorator in Controller methods to automatically authenticate and\nauthorize users for the specific role, injecting the authenticated user\npayload as a method parameter.",
|
|
195
|
+
type: "string"
|
|
196
|
+
},
|
|
197
|
+
content: {
|
|
198
|
+
description: "Complete TypeScript code for the authentication Decorator implementation.\nMust include: SwaggerCustomizer integration to add bearer token security\nschema to API documentation, createParamDecorator implementation that\ncalls the corresponding Provider function for authentication, Singleton\npattern using tstl library for efficient decorator instance management,\nand proper TypeScript typing for the ParameterDecorator interface.",
|
|
199
|
+
type: "string"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
required: [
|
|
203
|
+
"name",
|
|
204
|
+
"content"
|
|
205
|
+
]
|
|
206
|
+
},
|
|
207
|
+
"IAutoBeRealizeAuthorizationApplication.IPayloadType": {
|
|
208
|
+
type: "object",
|
|
209
|
+
properties: {
|
|
210
|
+
name: {
|
|
211
|
+
description: "The name of the Decorator to be generated in {Role}Auth format (e.g.,\nAdminAuth, UserAuth). This decorator will be used as a parameter\ndecorator in Controller methods to automatically authenticate and\nauthorize users for the specific role, injecting the authenticated user\npayload as a method parameter.",
|
|
212
|
+
type: "string"
|
|
213
|
+
},
|
|
214
|
+
content: {
|
|
215
|
+
description: "The TypeScript code for the Payload type in {Role}Payload format (e.g.,\nAdminPayload, UserPayload). This interface defines the structure of the\nauthenticated user data that will be injected into Controller methods\nwhen using the decorator. It serves as the TypeScript type for the\nparameter in Controller method signatures.",
|
|
216
|
+
type: "string"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
required: [
|
|
220
|
+
"name",
|
|
221
|
+
"content"
|
|
222
|
+
]
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
validate: (() => { const _io0 = input => "string" === typeof input.error_analysis && "string" === typeof input.corrected_implementation && "string" === typeof input.validation_summary && ("object" === typeof input.provider && null !== input.provider && _io1(input.provider)) && ("object" === typeof input.decorator && null !== input.decorator && _io2(input.decorator)) && ("object" === typeof input.payload && null !== input.payload && _io3(input.payload)); const _io1 = input => "string" === typeof input.name && "string" === typeof input.content; const _io2 = input => "string" === typeof input.name && "string" === typeof input.content; const _io3 = input => "string" === typeof input.name && "string" === typeof input.content; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.error_analysis || _report(_exceptionable, {
|
|
227
|
+
path: _path + ".error_analysis",
|
|
228
|
+
expected: "string",
|
|
229
|
+
value: input.error_analysis
|
|
230
|
+
}), "string" === typeof input.corrected_implementation || _report(_exceptionable, {
|
|
231
|
+
path: _path + ".corrected_implementation",
|
|
232
|
+
expected: "string",
|
|
233
|
+
value: input.corrected_implementation
|
|
234
|
+
}), "string" === typeof input.validation_summary || _report(_exceptionable, {
|
|
235
|
+
path: _path + ".validation_summary",
|
|
236
|
+
expected: "string",
|
|
237
|
+
value: input.validation_summary
|
|
238
|
+
}), ("object" === typeof input.provider && null !== input.provider || _report(_exceptionable, {
|
|
239
|
+
path: _path + ".provider",
|
|
240
|
+
expected: "IAutoBeRealizeAuthorizationApplication.IProvider",
|
|
241
|
+
value: input.provider
|
|
242
|
+
})) && _vo1(input.provider, _path + ".provider", true && _exceptionable) || _report(_exceptionable, {
|
|
243
|
+
path: _path + ".provider",
|
|
244
|
+
expected: "IAutoBeRealizeAuthorizationApplication.IProvider",
|
|
245
|
+
value: input.provider
|
|
246
|
+
}), ("object" === typeof input.decorator && null !== input.decorator || _report(_exceptionable, {
|
|
247
|
+
path: _path + ".decorator",
|
|
248
|
+
expected: "IAutoBeRealizeAuthorizationApplication.IDecorator",
|
|
249
|
+
value: input.decorator
|
|
250
|
+
})) && _vo2(input.decorator, _path + ".decorator", true && _exceptionable) || _report(_exceptionable, {
|
|
251
|
+
path: _path + ".decorator",
|
|
252
|
+
expected: "IAutoBeRealizeAuthorizationApplication.IDecorator",
|
|
253
|
+
value: input.decorator
|
|
254
|
+
}), ("object" === typeof input.payload && null !== input.payload || _report(_exceptionable, {
|
|
255
|
+
path: _path + ".payload",
|
|
256
|
+
expected: "IAutoBeRealizeAuthorizationApplication.IPayloadType",
|
|
257
|
+
value: input.payload
|
|
258
|
+
})) && _vo3(input.payload, _path + ".payload", true && _exceptionable) || _report(_exceptionable, {
|
|
259
|
+
path: _path + ".payload",
|
|
260
|
+
expected: "IAutoBeRealizeAuthorizationApplication.IPayloadType",
|
|
261
|
+
value: input.payload
|
|
262
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
|
|
263
|
+
path: _path + ".name",
|
|
264
|
+
expected: "string",
|
|
265
|
+
value: input.name
|
|
266
|
+
}), "string" === typeof input.content || _report(_exceptionable, {
|
|
267
|
+
path: _path + ".content",
|
|
268
|
+
expected: "string",
|
|
269
|
+
value: input.content
|
|
270
|
+
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
|
|
271
|
+
path: _path + ".name",
|
|
272
|
+
expected: "string",
|
|
273
|
+
value: input.name
|
|
274
|
+
}), "string" === typeof input.content || _report(_exceptionable, {
|
|
275
|
+
path: _path + ".content",
|
|
276
|
+
expected: "string",
|
|
277
|
+
value: input.content
|
|
278
|
+
})].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
|
|
279
|
+
path: _path + ".name",
|
|
280
|
+
expected: "string",
|
|
281
|
+
value: input.name
|
|
282
|
+
}), "string" === typeof input.content || _report(_exceptionable, {
|
|
283
|
+
path: _path + ".content",
|
|
284
|
+
expected: "string",
|
|
285
|
+
value: input.content
|
|
286
|
+
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
287
|
+
if (false === __is(input)) {
|
|
288
|
+
errors = [];
|
|
289
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
290
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
291
|
+
path: _path + "",
|
|
292
|
+
expected: "IAutoBeRealizeAuthorizationCorrectApplication.IProps",
|
|
293
|
+
value: input
|
|
294
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
295
|
+
path: _path + "",
|
|
296
|
+
expected: "IAutoBeRealizeAuthorizationCorrectApplication.IProps",
|
|
297
|
+
value: input
|
|
298
|
+
}))(input, "$input", true);
|
|
299
|
+
const success = 0 === errors.length;
|
|
300
|
+
return success ? {
|
|
301
|
+
success,
|
|
302
|
+
data: input
|
|
303
|
+
} : {
|
|
304
|
+
success,
|
|
305
|
+
errors,
|
|
306
|
+
data: input
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
return {
|
|
310
|
+
success: true,
|
|
311
|
+
data: input
|
|
312
|
+
};
|
|
313
|
+
}; })()
|
|
314
|
+
}
|
|
315
|
+
]
|
|
316
|
+
};
|
|
317
|
+
const collection = {
|
|
318
|
+
chatgpt: {
|
|
319
|
+
model: "chatgpt",
|
|
320
|
+
options: {
|
|
321
|
+
reference: true,
|
|
322
|
+
strict: false,
|
|
323
|
+
separate: null
|
|
324
|
+
},
|
|
325
|
+
functions: [
|
|
326
|
+
{
|
|
327
|
+
name: "correctDecorator",
|
|
328
|
+
parameters: {
|
|
329
|
+
description: "Current Type: {@link IAutoBeRealizeAuthorizationCorrectApplication.IProps}\n\n### Description of {@link provider} property:\n\n> Authentication Provider function configuration containing the function\n> name and implementation code. The Provider handles JWT token\n> verification, role validation, and database queries to authenticate\n> users.\n\n### Description of {@link decorator} property:\n\n> Authentication Decorator configuration containing the decorator name and\n> implementation code. The Decorator integrates with NestJS parameter\n> decorators to automatically inject authenticated user data into\n> Controller methods.\n\n### Description of {@link payload} property:\n\n> Authentication Payload Type configuration containing the payload type\n> name and implementation code. The Payload Type is used to define the\n> structure of the authenticated user data that will be injected into\n> Controller methods when using the decorator. It serves as the TypeScript\n> type for the parameter in Controller method signatures.",
|
|
330
|
+
type: "object",
|
|
331
|
+
properties: {
|
|
332
|
+
error_analysis: {
|
|
333
|
+
description: "Step 1: TypeScript compilation error analysis and diagnosis.\n\nAI identifies all compilation errors (type mismatches, imports, syntax)\nand categorizes them by component (provider/decorator/payload). Analyzes\nerror dependencies and determines fix priorities for systematic\nresolution.",
|
|
334
|
+
type: "string"
|
|
335
|
+
},
|
|
336
|
+
corrected_implementation: {
|
|
337
|
+
description: "Step 2: Corrected implementation with all compilation errors resolved.\n\nAI generates fixed versions of provider, decorator, and payload code.\nMaintains original functionality while ensuring TypeScript compilation\nsuccess and proper NestJS/Prisma framework integration.",
|
|
338
|
+
type: "string"
|
|
339
|
+
},
|
|
340
|
+
validation_summary: {
|
|
341
|
+
description: "Step 3: Final validation and comprehensive fix summary.\n\nAI validates corrected code compiles successfully and documents all\nchanges made. Provides production-ready code with detailed change log for\nmaintenance reference.",
|
|
342
|
+
type: "string"
|
|
343
|
+
},
|
|
344
|
+
provider: {
|
|
345
|
+
$ref: "#/$defs/IAutoBeRealizeAuthorizationApplication.IProvider"
|
|
346
|
+
},
|
|
347
|
+
decorator: {
|
|
348
|
+
$ref: "#/$defs/IAutoBeRealizeAuthorizationApplication.IDecorator"
|
|
349
|
+
},
|
|
350
|
+
payload: {
|
|
351
|
+
$ref: "#/$defs/IAutoBeRealizeAuthorizationApplication.IPayloadType"
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
required: [
|
|
355
|
+
"error_analysis",
|
|
356
|
+
"corrected_implementation",
|
|
357
|
+
"validation_summary",
|
|
358
|
+
"provider",
|
|
359
|
+
"decorator",
|
|
360
|
+
"payload"
|
|
361
|
+
],
|
|
362
|
+
additionalProperties: false,
|
|
363
|
+
$defs: {
|
|
364
|
+
"IAutoBeRealizeAuthorizationApplication.IProvider": {
|
|
365
|
+
type: "object",
|
|
366
|
+
properties: {
|
|
367
|
+
name: {
|
|
368
|
+
description: "The name of the authentication Provider function in {role}Authorize\nformat (e.g., adminAuthorize, userAuthorize). This function will be\ncalled by the decorator to verify JWT tokens and return authenticated\nuser information for the specified role.",
|
|
369
|
+
type: "string"
|
|
370
|
+
},
|
|
371
|
+
content: {
|
|
372
|
+
description: "Complete TypeScript code for the authentication Provider function and its\ncorresponding Payload interface. Must include: JWT token verification\nusing jwtAuthorize function, role type checking against payload.type,\ndatabase query using MyGlobal.prisma.{tableName} pattern to verify user\nexistence, proper error handling with ForbiddenException and\nUnauthorizedException, and the Payload interface definition with id (UUID\nformat) and type (role discriminator) fields using typia tags.",
|
|
373
|
+
type: "string"
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
required: [
|
|
377
|
+
"name",
|
|
378
|
+
"content"
|
|
379
|
+
]
|
|
380
|
+
},
|
|
381
|
+
"IAutoBeRealizeAuthorizationApplication.IDecorator": {
|
|
382
|
+
type: "object",
|
|
383
|
+
properties: {
|
|
384
|
+
name: {
|
|
385
|
+
description: "The name of the Decorator to be generated in {Role}Auth format (e.g.,\nAdminAuth, UserAuth). This decorator will be used as a parameter\ndecorator in Controller methods to automatically authenticate and\nauthorize users for the specific role, injecting the authenticated user\npayload as a method parameter.",
|
|
386
|
+
type: "string"
|
|
387
|
+
},
|
|
388
|
+
content: {
|
|
389
|
+
description: "Complete TypeScript code for the authentication Decorator implementation.\nMust include: SwaggerCustomizer integration to add bearer token security\nschema to API documentation, createParamDecorator implementation that\ncalls the corresponding Provider function for authentication, Singleton\npattern using tstl library for efficient decorator instance management,\nand proper TypeScript typing for the ParameterDecorator interface.",
|
|
390
|
+
type: "string"
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
required: [
|
|
394
|
+
"name",
|
|
395
|
+
"content"
|
|
396
|
+
]
|
|
397
|
+
},
|
|
398
|
+
"IAutoBeRealizeAuthorizationApplication.IPayloadType": {
|
|
399
|
+
type: "object",
|
|
400
|
+
properties: {
|
|
401
|
+
name: {
|
|
402
|
+
description: "The name of the Decorator to be generated in {Role}Auth format (e.g.,\nAdminAuth, UserAuth). This decorator will be used as a parameter\ndecorator in Controller methods to automatically authenticate and\nauthorize users for the specific role, injecting the authenticated user\npayload as a method parameter.",
|
|
403
|
+
type: "string"
|
|
404
|
+
},
|
|
405
|
+
content: {
|
|
406
|
+
description: "The TypeScript code for the Payload type in {Role}Payload format (e.g.,\nAdminPayload, UserPayload). This interface defines the structure of the\nauthenticated user data that will be injected into Controller methods\nwhen using the decorator. It serves as the TypeScript type for the\nparameter in Controller method signatures.",
|
|
407
|
+
type: "string"
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
required: [
|
|
411
|
+
"name",
|
|
412
|
+
"content"
|
|
413
|
+
]
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
validate: (() => { const _io0 = input => "string" === typeof input.error_analysis && "string" === typeof input.corrected_implementation && "string" === typeof input.validation_summary && ("object" === typeof input.provider && null !== input.provider && _io1(input.provider)) && ("object" === typeof input.decorator && null !== input.decorator && _io2(input.decorator)) && ("object" === typeof input.payload && null !== input.payload && _io3(input.payload)); const _io1 = input => "string" === typeof input.name && "string" === typeof input.content; const _io2 = input => "string" === typeof input.name && "string" === typeof input.content; const _io3 = input => "string" === typeof input.name && "string" === typeof input.content; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.error_analysis || _report(_exceptionable, {
|
|
418
|
+
path: _path + ".error_analysis",
|
|
419
|
+
expected: "string",
|
|
420
|
+
value: input.error_analysis
|
|
421
|
+
}), "string" === typeof input.corrected_implementation || _report(_exceptionable, {
|
|
422
|
+
path: _path + ".corrected_implementation",
|
|
423
|
+
expected: "string",
|
|
424
|
+
value: input.corrected_implementation
|
|
425
|
+
}), "string" === typeof input.validation_summary || _report(_exceptionable, {
|
|
426
|
+
path: _path + ".validation_summary",
|
|
427
|
+
expected: "string",
|
|
428
|
+
value: input.validation_summary
|
|
429
|
+
}), ("object" === typeof input.provider && null !== input.provider || _report(_exceptionable, {
|
|
430
|
+
path: _path + ".provider",
|
|
431
|
+
expected: "IAutoBeRealizeAuthorizationApplication.IProvider",
|
|
432
|
+
value: input.provider
|
|
433
|
+
})) && _vo1(input.provider, _path + ".provider", true && _exceptionable) || _report(_exceptionable, {
|
|
434
|
+
path: _path + ".provider",
|
|
435
|
+
expected: "IAutoBeRealizeAuthorizationApplication.IProvider",
|
|
436
|
+
value: input.provider
|
|
437
|
+
}), ("object" === typeof input.decorator && null !== input.decorator || _report(_exceptionable, {
|
|
438
|
+
path: _path + ".decorator",
|
|
439
|
+
expected: "IAutoBeRealizeAuthorizationApplication.IDecorator",
|
|
440
|
+
value: input.decorator
|
|
441
|
+
})) && _vo2(input.decorator, _path + ".decorator", true && _exceptionable) || _report(_exceptionable, {
|
|
442
|
+
path: _path + ".decorator",
|
|
443
|
+
expected: "IAutoBeRealizeAuthorizationApplication.IDecorator",
|
|
444
|
+
value: input.decorator
|
|
445
|
+
}), ("object" === typeof input.payload && null !== input.payload || _report(_exceptionable, {
|
|
446
|
+
path: _path + ".payload",
|
|
447
|
+
expected: "IAutoBeRealizeAuthorizationApplication.IPayloadType",
|
|
448
|
+
value: input.payload
|
|
449
|
+
})) && _vo3(input.payload, _path + ".payload", true && _exceptionable) || _report(_exceptionable, {
|
|
450
|
+
path: _path + ".payload",
|
|
451
|
+
expected: "IAutoBeRealizeAuthorizationApplication.IPayloadType",
|
|
452
|
+
value: input.payload
|
|
453
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
|
|
454
|
+
path: _path + ".name",
|
|
455
|
+
expected: "string",
|
|
456
|
+
value: input.name
|
|
457
|
+
}), "string" === typeof input.content || _report(_exceptionable, {
|
|
458
|
+
path: _path + ".content",
|
|
459
|
+
expected: "string",
|
|
460
|
+
value: input.content
|
|
461
|
+
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
|
|
462
|
+
path: _path + ".name",
|
|
463
|
+
expected: "string",
|
|
464
|
+
value: input.name
|
|
465
|
+
}), "string" === typeof input.content || _report(_exceptionable, {
|
|
466
|
+
path: _path + ".content",
|
|
467
|
+
expected: "string",
|
|
468
|
+
value: input.content
|
|
469
|
+
})].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
|
|
470
|
+
path: _path + ".name",
|
|
471
|
+
expected: "string",
|
|
472
|
+
value: input.name
|
|
473
|
+
}), "string" === typeof input.content || _report(_exceptionable, {
|
|
474
|
+
path: _path + ".content",
|
|
475
|
+
expected: "string",
|
|
476
|
+
value: input.content
|
|
477
|
+
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
478
|
+
if (false === __is(input)) {
|
|
479
|
+
errors = [];
|
|
480
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
481
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
482
|
+
path: _path + "",
|
|
483
|
+
expected: "IAutoBeRealizeAuthorizationCorrectApplication.IProps",
|
|
484
|
+
value: input
|
|
485
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
486
|
+
path: _path + "",
|
|
487
|
+
expected: "IAutoBeRealizeAuthorizationCorrectApplication.IProps",
|
|
488
|
+
value: input
|
|
489
|
+
}))(input, "$input", true);
|
|
490
|
+
const success = 0 === errors.length;
|
|
491
|
+
return success ? {
|
|
492
|
+
success,
|
|
493
|
+
data: input
|
|
494
|
+
} : {
|
|
495
|
+
success,
|
|
496
|
+
errors,
|
|
497
|
+
data: input
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
return {
|
|
501
|
+
success: true,
|
|
502
|
+
data: input
|
|
503
|
+
};
|
|
504
|
+
}; })()
|
|
505
|
+
}
|
|
506
|
+
]
|
|
507
|
+
},
|
|
508
|
+
claude,
|
|
509
|
+
llama: claude,
|
|
510
|
+
deepseek: claude,
|
|
511
|
+
"3.1": claude,
|
|
512
|
+
};
|
|
513
|
+
//# sourceMappingURL=orchestrateRealizeAuthorizationCorrect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrateRealizeAuthorizationCorrect.js","sourceRoot":"","sources":["../../../src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,wFAuHC;;AAzID,yCAAoE;AASpE,kDAA0B;AAG1B,uEAAoE;AACpE,iEAA8D;AAE9D,mHAAgH;AAChH,6EAA0E;AAE1E,SAAsB,sCAAsC;yDAG1D,GAAyB,EACzB,aAAyC,EACzC,aAAqC,EACrC,aAAqC,EACrC,OAAe,CAAC;;QAEhB,gBAAgB;QAChB,MAAM,KAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAIJ;IACH,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;CACd,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export interface
|
|
2
|
-
createDecorator: (next:
|
|
1
|
+
export interface IAutoBeRealizeAuthorizationApplication {
|
|
2
|
+
createDecorator: (next: IAutoBeRealizeAuthorizationApplication.IProps) => void;
|
|
3
3
|
}
|
|
4
|
-
export declare namespace
|
|
4
|
+
export declare namespace IAutoBeRealizeAuthorizationApplication {
|
|
5
5
|
interface IProps {
|
|
6
6
|
/**
|
|
7
7
|
* Authentication Provider function configuration containing the function
|
|
@@ -9,14 +9,14 @@ export declare namespace IAutoBeRealizeDecoratorApplication {
|
|
|
9
9
|
* verification, role validation, and database queries to authenticate
|
|
10
10
|
* users.
|
|
11
11
|
*/
|
|
12
|
-
provider:
|
|
12
|
+
provider: IAutoBeRealizeAuthorizationApplication.IProvider;
|
|
13
13
|
/**
|
|
14
14
|
* Authentication Decorator configuration containing the decorator name and
|
|
15
15
|
* implementation code. The Decorator integrates with NestJS parameter
|
|
16
16
|
* decorators to automatically inject authenticated user data into
|
|
17
17
|
* Controller methods.
|
|
18
18
|
*/
|
|
19
|
-
decorator:
|
|
19
|
+
decorator: IAutoBeRealizeAuthorizationApplication.IDecorator;
|
|
20
20
|
/**
|
|
21
21
|
* Authentication Payload Type configuration containing the payload type
|
|
22
22
|
* name and implementation code. The Payload Type is used to define the
|
|
@@ -24,7 +24,7 @@ export declare namespace IAutoBeRealizeDecoratorApplication {
|
|
|
24
24
|
* Controller methods when using the decorator. It serves as the TypeScript
|
|
25
25
|
* type for the parameter in Controller method signatures.
|
|
26
26
|
*/
|
|
27
|
-
payload:
|
|
27
|
+
payload: IAutoBeRealizeAuthorizationApplication.IPayloadType;
|
|
28
28
|
}
|
|
29
29
|
interface IProvider {
|
|
30
30
|
/**
|
|
@@ -43,7 +43,7 @@ export declare namespace IAutoBeRealizeDecoratorApplication {
|
|
|
43
43
|
* UnauthorizedException, and the Payload interface definition with id (UUID
|
|
44
44
|
* format) and type (role discriminator) fields using typia tags.
|
|
45
45
|
*/
|
|
46
|
-
|
|
46
|
+
content: string;
|
|
47
47
|
}
|
|
48
48
|
interface IDecorator {
|
|
49
49
|
/**
|
|
@@ -62,7 +62,7 @@ export declare namespace IAutoBeRealizeDecoratorApplication {
|
|
|
62
62
|
* pattern using tstl library for efficient decorator instance management,
|
|
63
63
|
* and proper TypeScript typing for the ParameterDecorator interface.
|
|
64
64
|
*/
|
|
65
|
-
|
|
65
|
+
content: string;
|
|
66
66
|
}
|
|
67
67
|
interface IPayloadType {
|
|
68
68
|
/**
|
|
@@ -80,6 +80,6 @@ export declare namespace IAutoBeRealizeDecoratorApplication {
|
|
|
80
80
|
* when using the decorator. It serves as the TypeScript type for the
|
|
81
81
|
* parameter in Controller method signatures.
|
|
82
82
|
*/
|
|
83
|
-
|
|
83
|
+
content: string;
|
|
84
84
|
}
|
|
85
85
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAutoBeRealizeAuthorizationApplication.js","sourceRoot":"","sources":["../../../../src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { IAutoBeRealizeAuthorizationApplication } from "./IAutoBeRealizeAuthorizationApplication";
|
|
2
|
+
export interface IAutoBeRealizeAuthorizationCorrectApplication {
|
|
3
|
+
correctDecorator: (next: IAutoBeRealizeAuthorizationCorrectApplication.IProps) => void;
|
|
4
|
+
}
|
|
5
|
+
export declare namespace IAutoBeRealizeAuthorizationCorrectApplication {
|
|
6
|
+
interface IProps extends IAutoBeRealizeAuthorizationApplication.IProps {
|
|
7
|
+
/**
|
|
8
|
+
* Step 1: TypeScript compilation error analysis and diagnosis.
|
|
9
|
+
*
|
|
10
|
+
* AI identifies all compilation errors (type mismatches, imports, syntax)
|
|
11
|
+
* and categorizes them by component (provider/decorator/payload). Analyzes
|
|
12
|
+
* error dependencies and determines fix priorities for systematic
|
|
13
|
+
* resolution.
|
|
14
|
+
*/
|
|
15
|
+
error_analysis: string;
|
|
16
|
+
/**
|
|
17
|
+
* Step 2: Corrected implementation with all compilation errors resolved.
|
|
18
|
+
*
|
|
19
|
+
* AI generates fixed versions of provider, decorator, and payload code.
|
|
20
|
+
* Maintains original functionality while ensuring TypeScript compilation
|
|
21
|
+
* success and proper NestJS/Prisma framework integration.
|
|
22
|
+
*/
|
|
23
|
+
corrected_implementation: string;
|
|
24
|
+
/**
|
|
25
|
+
* Step 3: Final validation and comprehensive fix summary.
|
|
26
|
+
*
|
|
27
|
+
* AI validates corrected code compiles successfully and documents all
|
|
28
|
+
* changes made. Provides production-ready code with detailed change log for
|
|
29
|
+
* maintenance reference.
|
|
30
|
+
*/
|
|
31
|
+
validation_summary: string;
|
|
32
|
+
}
|
|
33
|
+
}
|
package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAutoBeRealizeAuthorizationCorrectApplication.js","sourceRoot":"","sources":["../../../../src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.ts"],"names":[],"mappings":""}
|