@autobe/agent 0.25.3 → 0.25.5
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.js +2 -0
- package/lib/AutoBeAgent.js.map +1 -1
- package/lib/AutoBeMockAgent.js +1 -1
- package/lib/AutoBeMockAgent.js.map +1 -1
- package/lib/factory/consentFunctionCall.js +2 -0
- package/lib/factory/consentFunctionCall.js.map +1 -1
- package/lib/factory/createAutoBeContext.js +2 -0
- package/lib/factory/createAutoBeContext.js.map +1 -1
- package/lib/factory/supportMistral.d.ts +4 -0
- package/lib/factory/supportMistral.js +112 -0
- package/lib/factory/supportMistral.js.map +1 -0
- package/lib/index.mjs +1997 -1422
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.d.ts +1 -0
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +370 -275
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +1 -1
- package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.js +370 -275
- package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js +304 -221
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeWrite.js +303 -220
- package/lib/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.js +17 -22
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js +372 -277
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestWrite.js +322 -350
- package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/utils/validateEmptyCode.d.ts +8 -0
- package/lib/utils/validateEmptyCode.js +35 -0
- package/lib/utils/validateEmptyCode.js.map +1 -0
- package/package.json +5 -5
- package/src/AutoBeAgent.ts +2 -0
- package/src/AutoBeMockAgent.ts +1 -1
- package/src/factory/consentFunctionCall.ts +3 -0
- package/src/factory/createAutoBeContext.ts +2 -0
- package/src/factory/supportMistral.ts +122 -0
- package/src/orchestrate/common/orchestrateCommonCorrectCasting.ts +52 -10
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +1 -1
- package/src/orchestrate/realize/orchestRateRealizeCorrectCasting.ts +58 -17
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +51 -15
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +46 -12
- package/src/orchestrate/test/orchestrateTestCorrect.ts +17 -24
- package/src/orchestrate/test/orchestrateTestCorrectInvalidRequest.ts +57 -10
- package/src/orchestrate/test/orchestrateTestWrite.ts +41 -10
- package/src/utils/validateEmptyCode.ts +41 -0
|
@@ -47,11 +47,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
48
|
exports.orchestrateTestWrite = orchestrateTestWrite;
|
|
49
49
|
const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
|
|
50
|
+
const __typia_transform__llmApplicationFinalize = __importStar(require("typia/lib/internal/_llmApplicationFinalize.js"));
|
|
50
51
|
const typia_1 = __importDefault(require("typia"));
|
|
51
52
|
const NamingConvention_1 = require("typia/lib/utils/NamingConvention");
|
|
52
53
|
const uuid_1 = require("uuid");
|
|
53
54
|
const assertSchemaModel_1 = require("../../context/assertSchemaModel");
|
|
54
55
|
const executeCachedBatch_1 = require("../../utils/executeCachedBatch");
|
|
56
|
+
const validateEmptyCode_1 = require("../../utils/validateEmptyCode");
|
|
55
57
|
const completeTestCode_1 = require("./compile/completeTestCode");
|
|
56
58
|
const getTestScenarioArtifacts_1 = require("./compile/getTestScenarioArtifacts");
|
|
57
59
|
const transformTestWriteHistories_1 = require("./histories/transformTestWriteHistories");
|
|
@@ -107,6 +109,7 @@ function process(ctx, props) {
|
|
|
107
109
|
}),
|
|
108
110
|
controller: createController({
|
|
109
111
|
model: ctx.model,
|
|
112
|
+
functionName: props.scenario.functionName,
|
|
110
113
|
build: (next) => {
|
|
111
114
|
next.domain = NamingConvention_1.NamingConvention.snake(next.domain);
|
|
112
115
|
pointer.value = next;
|
|
@@ -142,7 +145,79 @@ function process(ctx, props) {
|
|
|
142
145
|
}
|
|
143
146
|
function createController(props) {
|
|
144
147
|
(0, assertSchemaModel_1.assertSchemaModel)(props.model);
|
|
145
|
-
const
|
|
148
|
+
const validate = (input) => {
|
|
149
|
+
const result = (() => { const _io0 = input => "string" === typeof input.scenario && "string" === typeof input.domain && "string" === typeof input.draft && ("object" === typeof input.revise && null !== input.revise && _io1(input.revise)); const _io1 = input => "string" === typeof input.review && (null === input.final || "string" === typeof input.final); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.scenario || _report(_exceptionable, {
|
|
150
|
+
path: _path + ".scenario",
|
|
151
|
+
expected: "string",
|
|
152
|
+
value: input.scenario
|
|
153
|
+
}), "string" === typeof input.domain || _report(_exceptionable, {
|
|
154
|
+
path: _path + ".domain",
|
|
155
|
+
expected: "string",
|
|
156
|
+
value: input.domain
|
|
157
|
+
}), "string" === typeof input.draft || _report(_exceptionable, {
|
|
158
|
+
path: _path + ".draft",
|
|
159
|
+
expected: "string",
|
|
160
|
+
value: input.draft
|
|
161
|
+
}), ("object" === typeof input.revise && null !== input.revise || _report(_exceptionable, {
|
|
162
|
+
path: _path + ".revise",
|
|
163
|
+
expected: "IAutoBeTestWriteApplication.IReviseProps",
|
|
164
|
+
value: input.revise
|
|
165
|
+
})) && _vo1(input.revise, _path + ".revise", true && _exceptionable) || _report(_exceptionable, {
|
|
166
|
+
path: _path + ".revise",
|
|
167
|
+
expected: "IAutoBeTestWriteApplication.IReviseProps",
|
|
168
|
+
value: input.revise
|
|
169
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
|
|
170
|
+
path: _path + ".review",
|
|
171
|
+
expected: "string",
|
|
172
|
+
value: input.review
|
|
173
|
+
}), null === input.final || "string" === typeof input.final || _report(_exceptionable, {
|
|
174
|
+
path: _path + ".final",
|
|
175
|
+
expected: "(null | string)",
|
|
176
|
+
value: input.final
|
|
177
|
+
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
178
|
+
if (false === __is(input)) {
|
|
179
|
+
errors = [];
|
|
180
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
181
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
182
|
+
path: _path + "",
|
|
183
|
+
expected: "IAutoBeTestWriteApplication.IProps",
|
|
184
|
+
value: input
|
|
185
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
186
|
+
path: _path + "",
|
|
187
|
+
expected: "IAutoBeTestWriteApplication.IProps",
|
|
188
|
+
value: input
|
|
189
|
+
}))(input, "$input", true);
|
|
190
|
+
const success = 0 === errors.length;
|
|
191
|
+
return success ? {
|
|
192
|
+
success,
|
|
193
|
+
data: input
|
|
194
|
+
} : {
|
|
195
|
+
success,
|
|
196
|
+
errors,
|
|
197
|
+
data: input
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
return {
|
|
201
|
+
success: true,
|
|
202
|
+
data: input
|
|
203
|
+
};
|
|
204
|
+
}; })()(input);
|
|
205
|
+
if (result.success === false)
|
|
206
|
+
return result;
|
|
207
|
+
const errors = (0, validateEmptyCode_1.validateEmptyCode)({
|
|
208
|
+
functionName: props.functionName,
|
|
209
|
+
draft: result.data.draft,
|
|
210
|
+
revise: result.data.revise,
|
|
211
|
+
});
|
|
212
|
+
return errors.length
|
|
213
|
+
? {
|
|
214
|
+
success: false,
|
|
215
|
+
errors,
|
|
216
|
+
data: result.data,
|
|
217
|
+
}
|
|
218
|
+
: result;
|
|
219
|
+
};
|
|
220
|
+
const application = collection[props.model === "chatgpt" ? "chatgpt" : "claude"](validate);
|
|
146
221
|
return {
|
|
147
222
|
protocol: "class",
|
|
148
223
|
name: "Create Test Code",
|
|
@@ -154,373 +229,270 @@ function createController(props) {
|
|
|
154
229
|
},
|
|
155
230
|
};
|
|
156
231
|
}
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
description: "Step 1: Strategic test planning and scenario analysis.\n\nAI analyzes the given test scenario and creates a comprehensive\nimplementation strategy. This planning phase is crucial for generating\nwell-structured, maintainable test code. The AI must define test\nmethodology, data preparation, execution flow, and validation logic\nbefore proceeding to code implementation.\n\nWorkflow: Input scenario \u2192 Strategic analysis \u2192 Detailed test plan",
|
|
172
|
-
type: "string"
|
|
173
|
-
},
|
|
174
|
-
domain: {
|
|
175
|
-
description: "Step 2: Functional domain classification for test organization.\n\nAI determines the appropriate domain category based on the scenario\nanalysis. This classification drives file structure, test categorization,\nand logical grouping. The domain must be a single, lowercase word in\nsnake_case format that represents the primary API resource.\n\nWorkflow: Scenario analysis \u2192 Domain identification \u2192 Test organization\nstructure",
|
|
176
|
-
type: "string"
|
|
177
|
-
},
|
|
178
|
-
draft: {
|
|
179
|
-
description: "Step 3: Initial TypeScript E2E test code implementation.\n\nAI generates the first working version of the test code based on the\nstrategic plan. This draft must be compilation-error-free and follow",
|
|
180
|
-
type: "string"
|
|
181
|
-
},
|
|
182
|
-
revise: {
|
|
183
|
-
description: "Steps 4-5: Code review and final refinement process.\n\nContains the iterative improvement workflow that transforms the initial\ndraft into production-ready test code. The review phase identifies issues\nto fix or code to delete, followed by the final phase that produces the\npolished, production-ready test implementation.\n\nWorkflow: Draft \u2192 Review analysis \u2192 Final implementation",
|
|
184
|
-
$ref: "#/$defs/IAutoBeTestWriteApplication.IReviseProps"
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
required: [
|
|
188
|
-
"scenario",
|
|
189
|
-
"domain",
|
|
190
|
-
"draft",
|
|
191
|
-
"revise"
|
|
192
|
-
],
|
|
193
|
-
additionalProperties: false,
|
|
194
|
-
$defs: {
|
|
195
|
-
"IAutoBeTestWriteApplication.IReviseProps": {
|
|
232
|
+
const collection = {
|
|
233
|
+
chatgpt: (validate) => (() => {
|
|
234
|
+
const application = {
|
|
235
|
+
model: "chatgpt",
|
|
236
|
+
options: {
|
|
237
|
+
reference: true,
|
|
238
|
+
strict: false,
|
|
239
|
+
separate: null
|
|
240
|
+
},
|
|
241
|
+
functions: [
|
|
242
|
+
{
|
|
243
|
+
name: "write",
|
|
244
|
+
parameters: {
|
|
245
|
+
description: " Complete specification for test generation including scenario,\ndomain, and implementation steps\n\n------------------------------\n\nCurrent Type: {@link IAutoBeTestWriteApplication.IProps}\n\n### Description of {@link revise} property:\n\n> Steps 4-5: Code review and final refinement process.\n> \n> Contains the iterative improvement workflow that transforms the initial\n> draft into production-ready test code. The review phase identifies issues\n> to fix or code to delete, followed by the final phase that produces the\n> polished, production-ready test implementation.\n> \n> Workflow: Draft \u2192 Review analysis \u2192 Final implementation",
|
|
196
246
|
type: "object",
|
|
197
247
|
properties: {
|
|
198
|
-
|
|
199
|
-
description: "Step
|
|
248
|
+
scenario: {
|
|
249
|
+
description: "Step 1: Strategic test planning and scenario analysis.\n\nAI analyzes the given test scenario and creates a comprehensive\nimplementation strategy. This planning phase is crucial for generating\nwell-structured, maintainable test code. The AI must define test\nmethodology, data preparation, execution flow, and validation logic\nbefore proceeding to code implementation.\n\nWorkflow: Input scenario \u2192 Strategic analysis \u2192 Detailed test plan",
|
|
200
250
|
type: "string"
|
|
201
251
|
},
|
|
202
|
-
|
|
203
|
-
description: "Step
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
252
|
+
domain: {
|
|
253
|
+
description: "Step 2: Functional domain classification for test organization.\n\nAI determines the appropriate domain category based on the scenario\nanalysis. This classification drives file structure, test categorization,\nand logical grouping. The domain must be a single, lowercase word in\nsnake_case format that represents the primary API resource.\n\nWorkflow: Scenario analysis \u2192 Domain identification \u2192 Test organization\nstructure",
|
|
254
|
+
type: "string"
|
|
255
|
+
},
|
|
256
|
+
draft: {
|
|
257
|
+
description: "Step 3: Initial TypeScript E2E test code implementation.\n\nAI generates the first working version of the test code based on the\nstrategic plan. This draft must be compilation-error-free and follow",
|
|
258
|
+
type: "string"
|
|
259
|
+
},
|
|
260
|
+
revise: {
|
|
261
|
+
$ref: "#/$defs/IAutoBeTestWriteApplication.IReviseProps"
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
required: [
|
|
265
|
+
"scenario",
|
|
266
|
+
"domain",
|
|
267
|
+
"draft",
|
|
268
|
+
"revise"
|
|
269
|
+
],
|
|
270
|
+
additionalProperties: false,
|
|
271
|
+
$defs: {
|
|
272
|
+
"IAutoBeTestWriteApplication.IReviseProps": {
|
|
273
|
+
type: "object",
|
|
274
|
+
properties: {
|
|
275
|
+
review: {
|
|
276
|
+
description: "Step 4: Code review and quality assessment.\n\n**\uD83D\uDEA8 TWO TYPES OF REVISIONS: FIX AND DELETE \uD83D\uDEA8**\n\nAI performs a thorough review of the draft implementation for:\n\n**1. FIX - Improve existing code:**\n\n**Compilation & Syntax:**\n\n- TypeScript compilation errors and type mismatches\n- Syntax errors and missing semicolons/brackets\n- Correct function signatures and parameter types\n\n**Framework Compliance:**\n\n-",
|
|
209
277
|
type: "string"
|
|
278
|
+
},
|
|
279
|
+
final: {
|
|
280
|
+
description: "Step 5: Final production-ready test code.\n\nAI produces the final, polished version of the test code incorporating\nall review feedback. This code represents the completed test\nimplementation, ready for production deployment. When the draft code is\nalready perfect with no issues found during review, this value can be\nnull, indicating no revisions were necessary.\n\n**\uD83D\uDEA8 CRITICAL: APPLY ALL FIXES AND DELETIONS FROM REVIEW \uD83D\uDEA8**\n\n- FIX all correctable issues identified in review\n- DELETE all prohibited code identified in review\n- If review found type error tests, they MUST be deleted in final\n- If review found code to DELETE, final MUST be different from draft\n- If review finds NO issues requiring changes, set to null\n\nAll identified issues must be resolved, and the code must meet the\nhighest quality standards. A null value indicates the draft code already\nmeets all requirements without modification.\n\nWorkflow: Review feedback \u2192 Apply FIXES \u2192 Apply DELETIONS \u2192\nProduction-ready implementation (or null if no changes needed)\n\nThis is the ultimate deliverable that will be used in the actual test\nsuite when provided, otherwise the draft is used as-is.",
|
|
281
|
+
anyOf: [
|
|
282
|
+
{
|
|
283
|
+
type: "null"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
type: "string"
|
|
287
|
+
}
|
|
288
|
+
]
|
|
210
289
|
}
|
|
290
|
+
},
|
|
291
|
+
required: [
|
|
292
|
+
"review",
|
|
293
|
+
"final"
|
|
211
294
|
]
|
|
212
295
|
}
|
|
213
|
-
},
|
|
214
|
-
required: [
|
|
215
|
-
"review",
|
|
216
|
-
"final"
|
|
217
|
-
]
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
},
|
|
221
|
-
description: "Main entry point for AI Function Call - generates complete E2E test code.\n\nThe AI executes this function to perform the entire test generation\nworkflow: scenario analysis \u2192 draft implementation \u2192 code review \u2192 final\ncode production. This structured approach ensures high-quality,\ncompilation-error-free test code.",
|
|
222
|
-
validate: (() => { const _io0 = input => "string" === typeof input.scenario && "string" === typeof input.domain && "string" === typeof input.draft && ("object" === typeof input.revise && null !== input.revise && _io1(input.revise)); const _io1 = input => "string" === typeof input.review && (null === input.final || "string" === typeof input.final); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.scenario || _report(_exceptionable, {
|
|
223
|
-
path: _path + ".scenario",
|
|
224
|
-
expected: "string",
|
|
225
|
-
value: input.scenario
|
|
226
|
-
}), "string" === typeof input.domain || _report(_exceptionable, {
|
|
227
|
-
path: _path + ".domain",
|
|
228
|
-
expected: "string",
|
|
229
|
-
value: input.domain
|
|
230
|
-
}), "string" === typeof input.draft || _report(_exceptionable, {
|
|
231
|
-
path: _path + ".draft",
|
|
232
|
-
expected: "string",
|
|
233
|
-
value: input.draft
|
|
234
|
-
}), ("object" === typeof input.revise && null !== input.revise || _report(_exceptionable, {
|
|
235
|
-
path: _path + ".revise",
|
|
236
|
-
expected: "IAutoBeTestWriteApplication.IReviseProps",
|
|
237
|
-
value: input.revise
|
|
238
|
-
})) && _vo1(input.revise, _path + ".revise", true && _exceptionable) || _report(_exceptionable, {
|
|
239
|
-
path: _path + ".revise",
|
|
240
|
-
expected: "IAutoBeTestWriteApplication.IReviseProps",
|
|
241
|
-
value: input.revise
|
|
242
|
-
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
|
|
243
|
-
path: _path + ".review",
|
|
244
|
-
expected: "string",
|
|
245
|
-
value: input.review
|
|
246
|
-
}), null === input.final || "string" === typeof input.final || _report(_exceptionable, {
|
|
247
|
-
path: _path + ".final",
|
|
248
|
-
expected: "(null | string)",
|
|
249
|
-
value: input.final
|
|
250
|
-
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
251
|
-
if (false === __is(input)) {
|
|
252
|
-
errors = [];
|
|
253
|
-
_report = __typia_transform__validateReport._validateReport(errors);
|
|
254
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
255
|
-
path: _path + "",
|
|
256
|
-
expected: "IAutoBeTestWriteApplication.IProps",
|
|
257
|
-
value: input
|
|
258
|
-
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
259
|
-
path: _path + "",
|
|
260
|
-
expected: "IAutoBeTestWriteApplication.IProps",
|
|
261
|
-
value: input
|
|
262
|
-
}))(input, "$input", true);
|
|
263
|
-
const success = 0 === errors.length;
|
|
264
|
-
return success ? {
|
|
265
|
-
success,
|
|
266
|
-
data: input
|
|
267
|
-
} : {
|
|
268
|
-
success,
|
|
269
|
-
errors,
|
|
270
|
-
data: input
|
|
271
|
-
};
|
|
272
|
-
}
|
|
273
|
-
return {
|
|
274
|
-
success: true,
|
|
275
|
-
data: input
|
|
276
|
-
};
|
|
277
|
-
}; })()
|
|
278
|
-
}
|
|
279
|
-
]
|
|
280
|
-
};
|
|
281
|
-
const collection = {
|
|
282
|
-
chatgpt: {
|
|
283
|
-
model: "chatgpt",
|
|
284
|
-
options: {
|
|
285
|
-
reference: true,
|
|
286
|
-
strict: false,
|
|
287
|
-
separate: null
|
|
288
|
-
},
|
|
289
|
-
functions: [
|
|
290
|
-
{
|
|
291
|
-
name: "write",
|
|
292
|
-
parameters: {
|
|
293
|
-
description: " Complete specification for test generation including scenario,\ndomain, and implementation steps\n\n------------------------------\n\nCurrent Type: {@link IAutoBeTestWriteApplication.IProps}\n\n### Description of {@link revise} property:\n\n> Steps 4-5: Code review and final refinement process.\n> \n> Contains the iterative improvement workflow that transforms the initial\n> draft into production-ready test code. The review phase identifies issues\n> to fix or code to delete, followed by the final phase that produces the\n> polished, production-ready test implementation.\n> \n> Workflow: Draft \u2192 Review analysis \u2192 Final implementation",
|
|
294
|
-
type: "object",
|
|
295
|
-
properties: {
|
|
296
|
-
scenario: {
|
|
297
|
-
description: "Step 1: Strategic test planning and scenario analysis.\n\nAI analyzes the given test scenario and creates a comprehensive\nimplementation strategy. This planning phase is crucial for generating\nwell-structured, maintainable test code. The AI must define test\nmethodology, data preparation, execution flow, and validation logic\nbefore proceeding to code implementation.\n\nWorkflow: Input scenario \u2192 Strategic analysis \u2192 Detailed test plan",
|
|
298
|
-
type: "string"
|
|
299
|
-
},
|
|
300
|
-
domain: {
|
|
301
|
-
description: "Step 2: Functional domain classification for test organization.\n\nAI determines the appropriate domain category based on the scenario\nanalysis. This classification drives file structure, test categorization,\nand logical grouping. The domain must be a single, lowercase word in\nsnake_case format that represents the primary API resource.\n\nWorkflow: Scenario analysis \u2192 Domain identification \u2192 Test organization\nstructure",
|
|
302
|
-
type: "string"
|
|
303
|
-
},
|
|
304
|
-
draft: {
|
|
305
|
-
description: "Step 3: Initial TypeScript E2E test code implementation.\n\nAI generates the first working version of the test code based on the\nstrategic plan. This draft must be compilation-error-free and follow",
|
|
306
|
-
type: "string"
|
|
307
|
-
},
|
|
308
|
-
revise: {
|
|
309
|
-
$ref: "#/$defs/IAutoBeTestWriteApplication.IReviseProps"
|
|
310
296
|
}
|
|
311
297
|
},
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
298
|
+
description: "Main entry point for AI Function Call - generates complete E2E test code.\n\nThe AI executes this function to perform the entire test generation\nworkflow: scenario analysis \u2192 draft implementation \u2192 code review \u2192 final\ncode production. This structured approach ensures high-quality,\ncompilation-error-free test code.",
|
|
299
|
+
validate: (() => { const _io0 = input => "string" === typeof input.scenario && "string" === typeof input.domain && "string" === typeof input.draft && ("object" === typeof input.revise && null !== input.revise && _io1(input.revise)); const _io1 = input => "string" === typeof input.review && (null === input.final || "string" === typeof input.final); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.scenario || _report(_exceptionable, {
|
|
300
|
+
path: _path + ".scenario",
|
|
301
|
+
expected: "string",
|
|
302
|
+
value: input.scenario
|
|
303
|
+
}), "string" === typeof input.domain || _report(_exceptionable, {
|
|
304
|
+
path: _path + ".domain",
|
|
305
|
+
expected: "string",
|
|
306
|
+
value: input.domain
|
|
307
|
+
}), "string" === typeof input.draft || _report(_exceptionable, {
|
|
308
|
+
path: _path + ".draft",
|
|
309
|
+
expected: "string",
|
|
310
|
+
value: input.draft
|
|
311
|
+
}), ("object" === typeof input.revise && null !== input.revise || _report(_exceptionable, {
|
|
312
|
+
path: _path + ".revise",
|
|
313
|
+
expected: "IAutoBeTestWriteApplication.IReviseProps",
|
|
314
|
+
value: input.revise
|
|
315
|
+
})) && _vo1(input.revise, _path + ".revise", true && _exceptionable) || _report(_exceptionable, {
|
|
316
|
+
path: _path + ".revise",
|
|
317
|
+
expected: "IAutoBeTestWriteApplication.IReviseProps",
|
|
318
|
+
value: input.revise
|
|
319
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
|
|
320
|
+
path: _path + ".review",
|
|
321
|
+
expected: "string",
|
|
322
|
+
value: input.review
|
|
323
|
+
}), null === input.final || "string" === typeof input.final || _report(_exceptionable, {
|
|
324
|
+
path: _path + ".final",
|
|
325
|
+
expected: "(null | string)",
|
|
326
|
+
value: input.final
|
|
327
|
+
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
328
|
+
if (false === __is(input)) {
|
|
329
|
+
errors = [];
|
|
330
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
331
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
332
|
+
path: _path + "",
|
|
333
|
+
expected: "IAutoBeTestWriteApplication.IProps",
|
|
334
|
+
value: input
|
|
335
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
336
|
+
path: _path + "",
|
|
337
|
+
expected: "IAutoBeTestWriteApplication.IProps",
|
|
338
|
+
value: input
|
|
339
|
+
}))(input, "$input", true);
|
|
340
|
+
const success = 0 === errors.length;
|
|
341
|
+
return success ? {
|
|
342
|
+
success,
|
|
343
|
+
data: input
|
|
344
|
+
} : {
|
|
345
|
+
success,
|
|
346
|
+
errors,
|
|
347
|
+
data: input
|
|
348
|
+
};
|
|
343
349
|
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
description: "Main entry point for AI Function Call - generates complete E2E test code.\n\nThe AI executes this function to perform the entire test generation\nworkflow: scenario analysis \u2192 draft implementation \u2192 code review \u2192 final\ncode production. This structured approach ensures high-quality,\ncompilation-error-free test code.",
|
|
347
|
-
validate: (() => { const _io0 = input => "string" === typeof input.scenario && "string" === typeof input.domain && "string" === typeof input.draft && ("object" === typeof input.revise && null !== input.revise && _io1(input.revise)); const _io1 = input => "string" === typeof input.review && (null === input.final || "string" === typeof input.final); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.scenario || _report(_exceptionable, {
|
|
348
|
-
path: _path + ".scenario",
|
|
349
|
-
expected: "string",
|
|
350
|
-
value: input.scenario
|
|
351
|
-
}), "string" === typeof input.domain || _report(_exceptionable, {
|
|
352
|
-
path: _path + ".domain",
|
|
353
|
-
expected: "string",
|
|
354
|
-
value: input.domain
|
|
355
|
-
}), "string" === typeof input.draft || _report(_exceptionable, {
|
|
356
|
-
path: _path + ".draft",
|
|
357
|
-
expected: "string",
|
|
358
|
-
value: input.draft
|
|
359
|
-
}), ("object" === typeof input.revise && null !== input.revise || _report(_exceptionable, {
|
|
360
|
-
path: _path + ".revise",
|
|
361
|
-
expected: "IAutoBeTestWriteApplication.IReviseProps",
|
|
362
|
-
value: input.revise
|
|
363
|
-
})) && _vo1(input.revise, _path + ".revise", true && _exceptionable) || _report(_exceptionable, {
|
|
364
|
-
path: _path + ".revise",
|
|
365
|
-
expected: "IAutoBeTestWriteApplication.IReviseProps",
|
|
366
|
-
value: input.revise
|
|
367
|
-
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
|
|
368
|
-
path: _path + ".review",
|
|
369
|
-
expected: "string",
|
|
370
|
-
value: input.review
|
|
371
|
-
}), null === input.final || "string" === typeof input.final || _report(_exceptionable, {
|
|
372
|
-
path: _path + ".final",
|
|
373
|
-
expected: "(null | string)",
|
|
374
|
-
value: input.final
|
|
375
|
-
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
376
|
-
if (false === __is(input)) {
|
|
377
|
-
errors = [];
|
|
378
|
-
_report = __typia_transform__validateReport._validateReport(errors);
|
|
379
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
380
|
-
path: _path + "",
|
|
381
|
-
expected: "IAutoBeTestWriteApplication.IProps",
|
|
382
|
-
value: input
|
|
383
|
-
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
384
|
-
path: _path + "",
|
|
385
|
-
expected: "IAutoBeTestWriteApplication.IProps",
|
|
386
|
-
value: input
|
|
387
|
-
}))(input, "$input", true);
|
|
388
|
-
const success = 0 === errors.length;
|
|
389
|
-
return success ? {
|
|
390
|
-
success,
|
|
391
|
-
data: input
|
|
392
|
-
} : {
|
|
393
|
-
success,
|
|
394
|
-
errors,
|
|
350
|
+
return {
|
|
351
|
+
success: true,
|
|
395
352
|
data: input
|
|
396
353
|
};
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
354
|
+
}; })()
|
|
355
|
+
}
|
|
356
|
+
]
|
|
357
|
+
};
|
|
358
|
+
__typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
|
|
359
|
+
validate: {
|
|
360
|
+
write: validate,
|
|
361
|
+
},
|
|
362
|
+
}), { equals: false }));
|
|
363
|
+
return application;
|
|
364
|
+
})(),
|
|
365
|
+
claude: (validate) => (() => {
|
|
366
|
+
const application = {
|
|
367
|
+
model: "claude",
|
|
368
|
+
options: {
|
|
369
|
+
reference: true,
|
|
370
|
+
separate: null
|
|
371
|
+
},
|
|
372
|
+
functions: [
|
|
373
|
+
{
|
|
374
|
+
name: "write",
|
|
375
|
+
parameters: {
|
|
376
|
+
description: " Complete specification for test generation including scenario,\ndomain, and implementation steps\n\n------------------------------\n\nCurrent Type: {@link IAutoBeTestWriteApplication.IProps}",
|
|
377
|
+
type: "object",
|
|
378
|
+
properties: {
|
|
379
|
+
scenario: {
|
|
380
|
+
description: "Step 1: Strategic test planning and scenario analysis.\n\nAI analyzes the given test scenario and creates a comprehensive\nimplementation strategy. This planning phase is crucial for generating\nwell-structured, maintainable test code. The AI must define test\nmethodology, data preparation, execution flow, and validation logic\nbefore proceeding to code implementation.\n\nWorkflow: Input scenario \u2192 Strategic analysis \u2192 Detailed test plan",
|
|
381
|
+
type: "string"
|
|
382
|
+
},
|
|
383
|
+
domain: {
|
|
384
|
+
description: "Step 2: Functional domain classification for test organization.\n\nAI determines the appropriate domain category based on the scenario\nanalysis. This classification drives file structure, test categorization,\nand logical grouping. The domain must be a single, lowercase word in\nsnake_case format that represents the primary API resource.\n\nWorkflow: Scenario analysis \u2192 Domain identification \u2192 Test organization\nstructure",
|
|
385
|
+
type: "string"
|
|
386
|
+
},
|
|
387
|
+
draft: {
|
|
388
|
+
description: "Step 3: Initial TypeScript E2E test code implementation.\n\nAI generates the first working version of the test code based on the\nstrategic plan. This draft must be compilation-error-free and follow",
|
|
389
|
+
type: "string"
|
|
390
|
+
},
|
|
391
|
+
revise: {
|
|
392
|
+
description: "Steps 4-5: Code review and final refinement process.\n\nContains the iterative improvement workflow that transforms the initial\ndraft into production-ready test code. The review phase identifies issues\nto fix or code to delete, followed by the final phase that produces the\npolished, production-ready test implementation.\n\nWorkflow: Draft \u2192 Review analysis \u2192 Final implementation",
|
|
393
|
+
$ref: "#/$defs/IAutoBeTestWriteApplication.IReviseProps"
|
|
394
|
+
}
|
|
434
395
|
},
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
396
|
+
required: [
|
|
397
|
+
"scenario",
|
|
398
|
+
"domain",
|
|
399
|
+
"draft",
|
|
400
|
+
"revise"
|
|
401
|
+
],
|
|
402
|
+
additionalProperties: false,
|
|
403
|
+
$defs: {
|
|
404
|
+
"IAutoBeTestWriteApplication.IReviseProps": {
|
|
405
|
+
type: "object",
|
|
406
|
+
properties: {
|
|
407
|
+
review: {
|
|
408
|
+
description: "Step 4: Code review and quality assessment.\n\n**\uD83D\uDEA8 TWO TYPES OF REVISIONS: FIX AND DELETE \uD83D\uDEA8**\n\nAI performs a thorough review of the draft implementation for:\n\n**1. FIX - Improve existing code:**\n\n**Compilation & Syntax:**\n\n- TypeScript compilation errors and type mismatches\n- Syntax errors and missing semicolons/brackets\n- Correct function signatures and parameter types\n\n**Framework Compliance:**\n\n-",
|
|
409
|
+
type: "string"
|
|
410
|
+
},
|
|
411
|
+
final: {
|
|
412
|
+
description: "Step 5: Final production-ready test code.\n\nAI produces the final, polished version of the test code incorporating\nall review feedback. This code represents the completed test\nimplementation, ready for production deployment. When the draft code is\nalready perfect with no issues found during review, this value can be\nnull, indicating no revisions were necessary.\n\n**\uD83D\uDEA8 CRITICAL: APPLY ALL FIXES AND DELETIONS FROM REVIEW \uD83D\uDEA8**\n\n- FIX all correctable issues identified in review\n- DELETE all prohibited code identified in review\n- If review found type error tests, they MUST be deleted in final\n- If review found code to DELETE, final MUST be different from draft\n- If review finds NO issues requiring changes, set to null\n\nAll identified issues must be resolved, and the code must meet the\nhighest quality standards. A null value indicates the draft code already\nmeets all requirements without modification.\n\nWorkflow: Review feedback \u2192 Apply FIXES \u2192 Apply DELETIONS \u2192\nProduction-ready implementation (or null if no changes needed)\n\nThis is the ultimate deliverable that will be used in the actual test\nsuite when provided, otherwise the draft is used as-is.",
|
|
413
|
+
oneOf: [
|
|
414
|
+
{
|
|
415
|
+
type: "null"
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
type: "string"
|
|
419
|
+
}
|
|
420
|
+
]
|
|
421
|
+
}
|
|
441
422
|
},
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
},
|
|
448
|
-
required: [
|
|
449
|
-
"review",
|
|
450
|
-
"final"
|
|
451
|
-
],
|
|
452
|
-
description: "Steps 4-5: Code review and final refinement process.\n\nContains the iterative improvement workflow that transforms the initial\ndraft into production-ready test code. The review phase identifies issues\nto fix or code to delete, followed by the final phase that produces the\npolished, production-ready test implementation.\n\nWorkflow: Draft \u2192 Review analysis \u2192 Final implementation\n\n------------------------------\n\nCurrent Type: {@link IAutoBeTestWriteApplication.IReviseProps}",
|
|
453
|
-
additionalProperties: false
|
|
423
|
+
required: [
|
|
424
|
+
"review",
|
|
425
|
+
"final"
|
|
426
|
+
]
|
|
427
|
+
}
|
|
454
428
|
}
|
|
455
429
|
},
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
return
|
|
509
|
-
success,
|
|
510
|
-
data: input
|
|
511
|
-
} : {
|
|
512
|
-
success,
|
|
513
|
-
errors,
|
|
430
|
+
description: "Main entry point for AI Function Call - generates complete E2E test code.\n\nThe AI executes this function to perform the entire test generation\nworkflow: scenario analysis \u2192 draft implementation \u2192 code review \u2192 final\ncode production. This structured approach ensures high-quality,\ncompilation-error-free test code.",
|
|
431
|
+
validate: (() => { const _io0 = input => "string" === typeof input.scenario && "string" === typeof input.domain && "string" === typeof input.draft && ("object" === typeof input.revise && null !== input.revise && _io1(input.revise)); const _io1 = input => "string" === typeof input.review && (null === input.final || "string" === typeof input.final); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.scenario || _report(_exceptionable, {
|
|
432
|
+
path: _path + ".scenario",
|
|
433
|
+
expected: "string",
|
|
434
|
+
value: input.scenario
|
|
435
|
+
}), "string" === typeof input.domain || _report(_exceptionable, {
|
|
436
|
+
path: _path + ".domain",
|
|
437
|
+
expected: "string",
|
|
438
|
+
value: input.domain
|
|
439
|
+
}), "string" === typeof input.draft || _report(_exceptionable, {
|
|
440
|
+
path: _path + ".draft",
|
|
441
|
+
expected: "string",
|
|
442
|
+
value: input.draft
|
|
443
|
+
}), ("object" === typeof input.revise && null !== input.revise || _report(_exceptionable, {
|
|
444
|
+
path: _path + ".revise",
|
|
445
|
+
expected: "IAutoBeTestWriteApplication.IReviseProps",
|
|
446
|
+
value: input.revise
|
|
447
|
+
})) && _vo1(input.revise, _path + ".revise", true && _exceptionable) || _report(_exceptionable, {
|
|
448
|
+
path: _path + ".revise",
|
|
449
|
+
expected: "IAutoBeTestWriteApplication.IReviseProps",
|
|
450
|
+
value: input.revise
|
|
451
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
|
|
452
|
+
path: _path + ".review",
|
|
453
|
+
expected: "string",
|
|
454
|
+
value: input.review
|
|
455
|
+
}), null === input.final || "string" === typeof input.final || _report(_exceptionable, {
|
|
456
|
+
path: _path + ".final",
|
|
457
|
+
expected: "(null | string)",
|
|
458
|
+
value: input.final
|
|
459
|
+
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
460
|
+
if (false === __is(input)) {
|
|
461
|
+
errors = [];
|
|
462
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
463
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
464
|
+
path: _path + "",
|
|
465
|
+
expected: "IAutoBeTestWriteApplication.IProps",
|
|
466
|
+
value: input
|
|
467
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
468
|
+
path: _path + "",
|
|
469
|
+
expected: "IAutoBeTestWriteApplication.IProps",
|
|
470
|
+
value: input
|
|
471
|
+
}))(input, "$input", true);
|
|
472
|
+
const success = 0 === errors.length;
|
|
473
|
+
return success ? {
|
|
474
|
+
success,
|
|
475
|
+
data: input
|
|
476
|
+
} : {
|
|
477
|
+
success,
|
|
478
|
+
errors,
|
|
479
|
+
data: input
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
return {
|
|
483
|
+
success: true,
|
|
514
484
|
data: input
|
|
515
485
|
};
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
486
|
+
}; })()
|
|
487
|
+
}
|
|
488
|
+
]
|
|
489
|
+
};
|
|
490
|
+
__typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
|
|
491
|
+
validate: {
|
|
492
|
+
write: validate,
|
|
493
|
+
},
|
|
494
|
+
}), { equals: false }));
|
|
495
|
+
return application;
|
|
496
|
+
})(),
|
|
525
497
|
};
|
|
526
498
|
//# sourceMappingURL=orchestrateTestWrite.js.map
|