@autobe/agent 0.9.1 → 0.10.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.js +16 -5
- package/lib/AutoBeAgent.js.map +1 -1
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +6 -4
- package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/context/AutoBeTokenUsage.d.ts +15 -1
- package/lib/context/AutoBeTokenUsage.js +56 -1
- package/lib/context/AutoBeTokenUsage.js.map +1 -1
- package/lib/context/IAutoBeApplicationProps.d.ts +0 -61
- package/lib/factory/createAutoBeApplication.js +298 -773
- package/lib/factory/createAutoBeApplication.js.map +1 -1
- package/lib/index.mjs +5116 -7271
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js +82 -319
- package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js.map +1 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js +0 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyze.js +97 -294
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/orchestrate/facade/transformFacadeStateMessage.js +2 -2
- package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
- package/lib/orchestrate/index.d.ts +2 -2
- package/lib/orchestrate/index.js +4 -4
- package/lib/orchestrate/index.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterface.js +9 -3
- package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +56 -142
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +195 -199
- package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +75 -172
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +772 -1097
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/orchestrate/interface/transformInterfaceHistories.js +2 -0
- package/lib/orchestrate/interface/transformInterfaceHistories.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js +64 -175
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +552 -1073
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchema.js +571 -1119
- package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -1
- package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js +9 -0
- package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js +8 -0
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealize.d.ts +11 -0
- package/lib/orchestrate/realize/orchestrateRealize.js +109 -0
- package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealizeCoder.d.ts +25 -0
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js +337 -0
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealizeIntegrator.d.ts +52 -0
- package/lib/orchestrate/realize/orchestrateRealizeIntegrator.js +57 -0
- package/lib/orchestrate/realize/orchestrateRealizeIntegrator.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealizePlanner.d.ts +80 -0
- package/lib/orchestrate/realize/orchestrateRealizePlanner.js +53 -0
- package/lib/orchestrate/realize/orchestrateRealizePlanner.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealizeValidator.d.ts +46 -0
- package/lib/orchestrate/realize/orchestrateRealizeValidator.js +37 -0
- package/lib/orchestrate/realize/orchestrateRealizeValidator.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +33 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js +3 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +1 -0
- package/lib/orchestrate/realize/transformRealizeCoderHistories.d.ts +5 -0
- package/lib/orchestrate/realize/transformRealizeCoderHistories.js +127 -0
- package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +1 -0
- package/lib/orchestrate/test/compile/completeTestCode.d.ts +2 -0
- package/lib/orchestrate/test/compile/completeTestCode.js +21 -0
- package/lib/orchestrate/test/compile/completeTestCode.js.map +1 -0
- package/lib/orchestrate/test/{filterTestFileName.js → compile/filterTestFileName.js} +1 -1
- package/lib/orchestrate/test/compile/filterTestFileName.js.map +1 -0
- package/lib/orchestrate/test/compile/getTestExternalDeclarations.d.ts +3 -0
- package/lib/orchestrate/test/compile/getTestExternalDeclarations.js +27 -0
- package/lib/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -0
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +5 -0
- package/lib/orchestrate/test/{compileTestScenario.js → compile/getTestScenarioArtifacts.js} +11 -5
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -0
- package/lib/orchestrate/test/orchestrateTest.js +14 -9
- package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +3 -2
- package/lib/orchestrate/test/orchestrateTestCorrect.js +150 -349
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenario.js +323 -566
- package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestWrite.d.ts +3 -2
- package/lib/orchestrate/test/orchestrateTestWrite.js +139 -76
- package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +121 -0
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js +3 -0
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestFunction.d.ts +8 -0
- package/lib/{utils/types/BackoffOptions.js → orchestrate/test/structures/IAutoBeTestFunction.js} +1 -1
- package/lib/orchestrate/test/structures/IAutoBeTestFunction.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +32 -22
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.d.ts +2 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +112 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js +3 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.d.ts +7 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js +3 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +1 -0
- package/lib/orchestrate/test/transformTestCorrectHistories.d.ts +3 -2
- package/lib/orchestrate/test/transformTestCorrectHistories.js +28 -41
- package/lib/orchestrate/test/transformTestCorrectHistories.js.map +1 -1
- package/lib/orchestrate/test/transformTestWriteHistories.d.ts +5 -4
- package/lib/orchestrate/test/transformTestWriteHistories.js +169 -32
- package/lib/orchestrate/test/transformTestWriteHistories.js.map +1 -1
- package/lib/structures/IAutoBeConfig.d.ts +11 -0
- package/lib/structures/IAutoBeProps.d.ts +12 -1
- package/lib/utils/backoffRetry.d.ts +4 -7
- package/lib/utils/backoffRetry.js +19 -37
- package/lib/utils/backoffRetry.js.map +1 -1
- package/lib/utils/forceRetry.d.ts +1 -0
- package/lib/{orchestrate/orchestrateRealize.js → utils/forceRetry.js} +15 -8
- package/lib/utils/forceRetry.js.map +1 -0
- package/package.json +8 -8
- package/src/AutoBeAgent.ts +26 -4
- package/src/constants/AutoBeSystemPromptConstant.ts +6 -4
- package/src/context/AutoBeTokenUsage.ts +85 -1
- package/src/context/IAutoBeApplicationProps.ts +0 -62
- package/src/factory/createAutoBeApplication.ts +2 -3
- package/src/orchestrate/analyze/AutoBeAnalyzeAgent.ts +8 -3
- package/src/orchestrate/analyze/AutoBeAnalyzeReviewer.ts +0 -1
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +8 -37
- package/src/orchestrate/facade/transformFacadeStateMessage.ts +2 -1
- package/src/orchestrate/index.ts +2 -2
- package/src/orchestrate/interface/orchestrateInterface.ts +7 -0
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +4 -3
- package/src/orchestrate/interface/orchestrateInterfaceComponents.ts +26 -23
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +6 -4
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +14 -11
- package/src/orchestrate/interface/transformInterfaceHistories.ts +2 -0
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +10 -5
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +11 -5
- package/src/orchestrate/prisma/orchestratePrismaSchema.ts +16 -8
- package/src/orchestrate/prisma/transformPrismaComponentsHistories.ts +9 -0
- package/src/orchestrate/prisma/transformPrismaSchemaHistories.ts +8 -0
- package/src/orchestrate/realize/orchestrateRealize.ts +169 -0
- package/src/orchestrate/realize/orchestrateRealizeCoder.ts +156 -0
- package/src/orchestrate/realize/orchestrateRealizeIntegrator.ts +75 -0
- package/src/orchestrate/realize/orchestrateRealizePlanner.ts +115 -0
- package/src/orchestrate/realize/orchestrateRealizeValidator.ts +64 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +36 -0
- package/src/orchestrate/realize/transformRealizeCoderHistories.ts +136 -0
- package/src/orchestrate/test/compile/completeTestCode.ts +35 -0
- package/src/orchestrate/test/{filterTestFileName.ts → compile/filterTestFileName.ts} +1 -1
- package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +24 -0
- package/src/orchestrate/test/{compileTestScenario.ts → compile/getTestScenarioArtifacts.ts} +17 -8
- package/src/orchestrate/test/experimental/orchestrateTestCorrect.ast +240 -0
- package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +316 -0
- package/src/orchestrate/test/experimental/transformTestCorrectHistories.ast +52 -0
- package/src/orchestrate/test/orchestrateTest.ts +38 -16
- package/src/orchestrate/test/orchestrateTestCorrect.ts +111 -338
- package/src/orchestrate/test/orchestrateTestScenario.ts +114 -69
- package/src/orchestrate/test/orchestrateTestWrite.ts +55 -153
- package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +126 -0
- package/src/orchestrate/test/structures/IAutoBeTestFunction.ts +10 -0
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +32 -22
- package/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.ts +3 -0
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +117 -0
- package/src/orchestrate/test/structures/IAutoBeTestWriteResult.ts +9 -0
- package/src/orchestrate/test/transformTestCorrectHistories.ts +38 -43
- package/src/orchestrate/test/transformTestWriteHistories.ts +89 -35
- package/src/structures/IAutoBeConfig.ts +9 -0
- package/src/structures/IAutoBeProps.ts +17 -1
- package/src/utils/backoffRetry.ts +25 -36
- package/src/utils/forceRetry.ts +13 -0
- package/lib/factory/invertOpenApiDocument.d.ts +0 -3
- package/lib/factory/invertOpenApiDocument.js +0 -51
- package/lib/factory/invertOpenApiDocument.js.map +0 -1
- package/lib/orchestrate/orchestrateRealize.d.ts +0 -5
- package/lib/orchestrate/orchestrateRealize.js.map +0 -1
- package/lib/orchestrate/test/compileTestScenario.d.ts +0 -5
- package/lib/orchestrate/test/compileTestScenario.js.map +0 -1
- package/lib/orchestrate/test/filterTestFileName.js.map +0 -1
- package/lib/utils/StringUtil.d.ts +0 -4
- package/lib/utils/StringUtil.js +0 -43
- package/lib/utils/StringUtil.js.map +0 -1
- package/lib/utils/types/BackoffOptions.d.ts +0 -12
- package/lib/utils/types/BackoffOptions.js.map +0 -1
- package/src/factory/invertOpenApiDocument.ts +0 -63
- package/src/orchestrate/orchestrateRealize.ts +0 -18
- package/src/utils/StringUtil.ts +0 -45
- package/src/utils/types/BackoffOptions.ts +0 -15
- /package/lib/orchestrate/test/{filterTestFileName.d.ts → compile/filterTestFileName.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateTestScenario.js","sourceRoot":"","sources":["../../../src/orchestrate/test/orchestrateTestScenario.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"orchestrateTestScenario.js","sourceRoot":"","sources":["../../../src/orchestrate/test/orchestrateTestScenario.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,0DAsFC;;AA9GD,yCAIwB;AAMxB,yCAAyD;AAEzD,+BAA+C;AAC/C,kDAA0B;AAC1B,+BAA0B;AAI1B,uEAAoE;AACpE,yDAAsD;AACtD,iEAA8D;AAC9D,uDAAoD;AAGpD,SAAsB,uBAAuB,CAC3C,GAAyB;;;QAEzB,MAAM,UAAU,GACd,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,SAAS,0CAAE,QAAQ,CAAC,UAAU,mCAAI,EAAE,CAAC;QACnD,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK,CACb,8DAA8D,CAC/D,CAAC;QACJ,CAAC;QAED,MAAM,IAAI,GACR,IAAI,cAAO,CACT,UAAU,CAAC,GAAG,CACZ,CAAC,EAAE,EAAE,EAAE,CACL,IAAI,WAAI,CACN;YACE,IAAI,EAAE,EAAE,CAAC,IAAI;YACb,MAAM,EAAE,EA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMT,CAAC;AACJ,MAAM,UAAU,GAAG;IACjB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAIJ;IACH,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;CACd,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { AutoBeTestScenario
|
|
1
|
+
import { AutoBeTestScenario } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
|
-
|
|
4
|
+
import { IAutoBeTestWriteResult } from "./structures/IAutoBeTestWriteResult";
|
|
5
|
+
export declare function orchestrateTestWrite<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, scenarios: AutoBeTestScenario[]): Promise<IAutoBeTestWriteResult[]>;
|
|
@@ -51,34 +51,32 @@ const core_1 = require("@agentica/core");
|
|
|
51
51
|
const typia_1 = __importDefault(require("typia"));
|
|
52
52
|
const assertSchemaModel_1 = require("../../context/assertSchemaModel");
|
|
53
53
|
const enforceToolCall_1 = require("../../utils/enforceToolCall");
|
|
54
|
-
const
|
|
54
|
+
const forceRetry_1 = require("../../utils/forceRetry");
|
|
55
|
+
const completeTestCode_1 = require("./compile/completeTestCode");
|
|
56
|
+
const getTestScenarioArtifacts_1 = require("./compile/getTestScenarioArtifacts");
|
|
55
57
|
const transformTestWriteHistories_1 = require("./transformTestWriteHistories");
|
|
56
58
|
function orchestrateTestWrite(ctx, scenarios) {
|
|
57
59
|
return __awaiter(this, void 0, void 0, function* () {
|
|
58
60
|
const start = new Date();
|
|
59
61
|
let complete = 0;
|
|
60
|
-
|
|
62
|
+
return Promise.all(
|
|
61
63
|
/**
|
|
62
64
|
* Generate test code for each scenario. Maps through plans array to create
|
|
63
65
|
* individual test code implementations. Each scenario is processed to
|
|
64
66
|
* generate corresponding test code and progress events.
|
|
65
67
|
*/
|
|
66
|
-
scenarios.map((scenario) => __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
scenarios.map((scenario) => (0, forceRetry_1.forceRetry)(() => __awaiter(this, void 0, void 0, function* () {
|
|
67
69
|
var _a, _b;
|
|
68
|
-
const
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
created_at: start.toISOString(),
|
|
72
|
-
filename: `test/features/api/${code.domain}/${scenario.functionName}.ts`,
|
|
73
|
-
content: code.content,
|
|
74
|
-
completed: ++complete,
|
|
75
|
-
total: scenarios.length,
|
|
76
|
-
step: (_b = (_a = ctx.state().interface) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
|
|
77
|
-
};
|
|
70
|
+
const artifacts = yield (0, getTestScenarioArtifacts_1.getTestScenarioArtifacts)(ctx, scenario);
|
|
71
|
+
const result = yield process(ctx, scenario, artifacts);
|
|
72
|
+
const event = Object.assign(Object.assign({ type: "testWrite", created_at: start.toISOString(), location: `test/features/api/${result.domain}/${scenario.functionName}.ts` }, result), { completed: ++complete, total: scenarios.length, step: (_b = (_a = ctx.state().interface) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0 });
|
|
78
73
|
ctx.dispatch(event);
|
|
79
|
-
return
|
|
80
|
-
|
|
81
|
-
|
|
74
|
+
return {
|
|
75
|
+
scenario,
|
|
76
|
+
artifacts,
|
|
77
|
+
event,
|
|
78
|
+
};
|
|
79
|
+
}))));
|
|
82
80
|
});
|
|
83
81
|
}
|
|
84
82
|
/**
|
|
@@ -88,36 +86,36 @@ function orchestrateTestWrite(ctx, scenarios) {
|
|
|
88
86
|
*
|
|
89
87
|
* @param ctx - The AutoBeContext containing model, vendor and configuration
|
|
90
88
|
* @param scenario - The test scenario information to generate code for
|
|
91
|
-
* @
|
|
92
|
-
*
|
|
89
|
+
* @param artifacts - The artifacts containing the reference files and schemas
|
|
90
|
+
* @returns Promise resolving to IAutoBeTestWriteApplication.IProps containing
|
|
91
|
+
* the generated test code
|
|
93
92
|
*/
|
|
94
|
-
function process(ctx, scenario) {
|
|
93
|
+
function process(ctx, scenario, artifacts) {
|
|
95
94
|
return __awaiter(this, void 0, void 0, function* () {
|
|
96
95
|
var _a;
|
|
97
96
|
const pointer = {
|
|
98
97
|
value: null,
|
|
99
98
|
};
|
|
100
|
-
const artifacts = yield (0, compileTestScenario_1.compileTestScenario)(ctx, scenario);
|
|
101
99
|
const agentica = new core_1.MicroAgentica({
|
|
102
100
|
model: ctx.model,
|
|
103
101
|
vendor: ctx.vendor,
|
|
104
102
|
config: Object.assign({}, ((_a = ctx.config) !== null && _a !== void 0 ? _a : {})),
|
|
105
|
-
histories: (0, transformTestWriteHistories_1.transformTestWriteHistories)(
|
|
106
|
-
scenario,
|
|
107
|
-
artifacts,
|
|
108
|
-
}),
|
|
103
|
+
histories: (0, transformTestWriteHistories_1.transformTestWriteHistories)(scenario, artifacts),
|
|
109
104
|
controllers: [
|
|
110
105
|
createApplication({
|
|
111
106
|
model: ctx.model,
|
|
107
|
+
artifacts,
|
|
112
108
|
build: (next) => {
|
|
113
109
|
pointer.value = next;
|
|
114
110
|
},
|
|
115
111
|
}),
|
|
116
112
|
],
|
|
117
|
-
tokenUsage: ctx.usage(),
|
|
118
113
|
});
|
|
119
114
|
(0, enforceToolCall_1.enforceToolCall)(agentica);
|
|
120
|
-
yield agentica.conversate("Create e2e test functions.")
|
|
115
|
+
yield agentica.conversate("Create e2e test functions.").finally(() => {
|
|
116
|
+
const tokenUsage = agentica.getTokenUsage();
|
|
117
|
+
ctx.usage().record(tokenUsage, ["test"]);
|
|
118
|
+
});
|
|
121
119
|
if (pointer.value === null)
|
|
122
120
|
throw new Error("Failed to create test code.");
|
|
123
121
|
return pointer.value;
|
|
@@ -131,7 +129,9 @@ function createApplication(props) {
|
|
|
131
129
|
name: "Create Test Code",
|
|
132
130
|
application,
|
|
133
131
|
execute: {
|
|
134
|
-
|
|
132
|
+
write: (next) => {
|
|
133
|
+
next.draft = (0, completeTestCode_1.completeTestCode)(props.artifacts, next.draft);
|
|
134
|
+
next.final = (0, completeTestCode_1.completeTestCode)(props.artifacts, next.final);
|
|
135
135
|
props.build(next);
|
|
136
136
|
},
|
|
137
137
|
},
|
|
@@ -145,36 +145,49 @@ const claude = {
|
|
|
145
145
|
},
|
|
146
146
|
functions: [
|
|
147
147
|
{
|
|
148
|
-
name: "
|
|
148
|
+
name: "write",
|
|
149
149
|
parameters: {
|
|
150
|
-
description: "
|
|
150
|
+
description: " Complete specification for test generation including scenario,\ndomain, and implementation steps\n\n------------------------------\n\nCurrent Type: {@link IAutoBeTestWriteApplication.IProps}",
|
|
151
151
|
type: "object",
|
|
152
152
|
properties: {
|
|
153
153
|
scenario: {
|
|
154
|
-
title: "
|
|
155
|
-
description: "
|
|
154
|
+
title: "Step 1: Strategic test planning and scenario analysis",
|
|
155
|
+
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",
|
|
156
156
|
type: "string"
|
|
157
157
|
},
|
|
158
158
|
domain: {
|
|
159
|
-
title: "Functional domain classification for test organization",
|
|
160
|
-
description: "Functional domain classification for test organization.\n\
|
|
159
|
+
title: "Step 2: Functional domain classification for test organization",
|
|
160
|
+
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 that\nrepresents the primary API resource.\n\nWorkflow: Scenario analysis \u2192 Domain identification \u2192 Test organization\nstructure",
|
|
161
161
|
type: "string"
|
|
162
162
|
},
|
|
163
|
-
|
|
164
|
-
title: "
|
|
165
|
-
description: "
|
|
163
|
+
draft: {
|
|
164
|
+
title: "Step 3: Initial TypeScript E2E test code implementation",
|
|
165
|
+
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",
|
|
166
|
+
type: "string"
|
|
167
|
+
},
|
|
168
|
+
review: {
|
|
169
|
+
title: "Step 4: Code review and quality assessment",
|
|
170
|
+
description: "Step 4: Code review and quality assessment.\n\nAI performs a thorough review of the draft implementation, examining:\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-",
|
|
171
|
+
type: "string"
|
|
172
|
+
},
|
|
173
|
+
final: {
|
|
174
|
+
title: "Step 5: Final production-ready test code",
|
|
175
|
+
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. All identified issues\nmust be resolved, and the code must meet the highest quality standards.\n\nWorkflow: Review feedback \u2192 Code refinement \u2192 Production-ready\nimplementation\n\nThis is the ultimate deliverable that will be used in the actual test\nsuite.",
|
|
166
176
|
type: "string"
|
|
167
177
|
}
|
|
168
178
|
},
|
|
169
179
|
required: [
|
|
170
180
|
"scenario",
|
|
171
181
|
"domain",
|
|
172
|
-
"
|
|
182
|
+
"draft",
|
|
183
|
+
"review",
|
|
184
|
+
"final"
|
|
173
185
|
],
|
|
174
186
|
additionalProperties: false,
|
|
175
187
|
$defs: {}
|
|
176
188
|
},
|
|
177
|
-
|
|
189
|
+
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.",
|
|
190
|
+
validate: (() => { const _io0 = input => "string" === typeof input.scenario && "string" === typeof input.domain && "string" === typeof input.draft && "string" === typeof input.review && "string" === typeof input.final; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.scenario || _report(_exceptionable, {
|
|
178
191
|
path: _path + ".scenario",
|
|
179
192
|
expected: "string",
|
|
180
193
|
value: input.scenario
|
|
@@ -182,21 +195,29 @@ const claude = {
|
|
|
182
195
|
path: _path + ".domain",
|
|
183
196
|
expected: "string",
|
|
184
197
|
value: input.domain
|
|
185
|
-
}), "string" === typeof input.
|
|
186
|
-
path: _path + ".
|
|
198
|
+
}), "string" === typeof input.draft || _report(_exceptionable, {
|
|
199
|
+
path: _path + ".draft",
|
|
187
200
|
expected: "string",
|
|
188
|
-
value: input.
|
|
201
|
+
value: input.draft
|
|
202
|
+
}), "string" === typeof input.review || _report(_exceptionable, {
|
|
203
|
+
path: _path + ".review",
|
|
204
|
+
expected: "string",
|
|
205
|
+
value: input.review
|
|
206
|
+
}), "string" === typeof input.final || _report(_exceptionable, {
|
|
207
|
+
path: _path + ".final",
|
|
208
|
+
expected: "string",
|
|
209
|
+
value: input.final
|
|
189
210
|
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
190
211
|
if (false === __is(input)) {
|
|
191
212
|
errors = [];
|
|
192
213
|
_report = __typia_transform__validateReport._validateReport(errors);
|
|
193
214
|
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
194
215
|
path: _path + "",
|
|
195
|
-
expected: "
|
|
216
|
+
expected: "IAutoBeTestWriteApplication.IProps",
|
|
196
217
|
value: input
|
|
197
218
|
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
198
219
|
path: _path + "",
|
|
199
|
-
expected: "
|
|
220
|
+
expected: "IAutoBeTestWriteApplication.IProps",
|
|
200
221
|
value: input
|
|
201
222
|
}))(input, "$input", true);
|
|
202
223
|
const success = 0 === errors.length;
|
|
@@ -227,36 +248,49 @@ const collection = {
|
|
|
227
248
|
},
|
|
228
249
|
functions: [
|
|
229
250
|
{
|
|
230
|
-
name: "
|
|
251
|
+
name: "write",
|
|
231
252
|
parameters: {
|
|
232
|
-
description: "
|
|
253
|
+
description: " Complete specification for test generation including scenario,\ndomain, and implementation steps\n\n------------------------------\n\nCurrent Type: {@link IAutoBeTestWriteApplication.IProps}",
|
|
233
254
|
type: "object",
|
|
234
255
|
properties: {
|
|
235
256
|
scenario: {
|
|
236
|
-
title: "
|
|
237
|
-
description: "
|
|
257
|
+
title: "Step 1: Strategic test planning and scenario analysis",
|
|
258
|
+
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",
|
|
238
259
|
type: "string"
|
|
239
260
|
},
|
|
240
261
|
domain: {
|
|
241
|
-
title: "Functional domain classification for test organization",
|
|
242
|
-
description: "Functional domain classification for test organization.\n\
|
|
262
|
+
title: "Step 2: Functional domain classification for test organization",
|
|
263
|
+
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 that\nrepresents the primary API resource.\n\nWorkflow: Scenario analysis \u2192 Domain identification \u2192 Test organization\nstructure",
|
|
243
264
|
type: "string"
|
|
244
265
|
},
|
|
245
|
-
|
|
246
|
-
title: "
|
|
247
|
-
description: "
|
|
266
|
+
draft: {
|
|
267
|
+
title: "Step 3: Initial TypeScript E2E test code implementation",
|
|
268
|
+
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",
|
|
269
|
+
type: "string"
|
|
270
|
+
},
|
|
271
|
+
review: {
|
|
272
|
+
title: "Step 4: Code review and quality assessment",
|
|
273
|
+
description: "Step 4: Code review and quality assessment.\n\nAI performs a thorough review of the draft implementation, examining:\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-",
|
|
274
|
+
type: "string"
|
|
275
|
+
},
|
|
276
|
+
final: {
|
|
277
|
+
title: "Step 5: Final production-ready test code",
|
|
278
|
+
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. All identified issues\nmust be resolved, and the code must meet the highest quality standards.\n\nWorkflow: Review feedback \u2192 Code refinement \u2192 Production-ready\nimplementation\n\nThis is the ultimate deliverable that will be used in the actual test\nsuite.",
|
|
248
279
|
type: "string"
|
|
249
280
|
}
|
|
250
281
|
},
|
|
251
282
|
required: [
|
|
252
283
|
"scenario",
|
|
253
284
|
"domain",
|
|
254
|
-
"
|
|
285
|
+
"draft",
|
|
286
|
+
"review",
|
|
287
|
+
"final"
|
|
255
288
|
],
|
|
256
289
|
additionalProperties: false,
|
|
257
290
|
$defs: {}
|
|
258
291
|
},
|
|
259
|
-
|
|
292
|
+
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.",
|
|
293
|
+
validate: (() => { const _io0 = input => "string" === typeof input.scenario && "string" === typeof input.domain && "string" === typeof input.draft && "string" === typeof input.review && "string" === typeof input.final; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.scenario || _report(_exceptionable, {
|
|
260
294
|
path: _path + ".scenario",
|
|
261
295
|
expected: "string",
|
|
262
296
|
value: input.scenario
|
|
@@ -264,21 +298,29 @@ const collection = {
|
|
|
264
298
|
path: _path + ".domain",
|
|
265
299
|
expected: "string",
|
|
266
300
|
value: input.domain
|
|
267
|
-
}), "string" === typeof input.
|
|
268
|
-
path: _path + ".
|
|
301
|
+
}), "string" === typeof input.draft || _report(_exceptionable, {
|
|
302
|
+
path: _path + ".draft",
|
|
303
|
+
expected: "string",
|
|
304
|
+
value: input.draft
|
|
305
|
+
}), "string" === typeof input.review || _report(_exceptionable, {
|
|
306
|
+
path: _path + ".review",
|
|
269
307
|
expected: "string",
|
|
270
|
-
value: input.
|
|
308
|
+
value: input.review
|
|
309
|
+
}), "string" === typeof input.final || _report(_exceptionable, {
|
|
310
|
+
path: _path + ".final",
|
|
311
|
+
expected: "string",
|
|
312
|
+
value: input.final
|
|
271
313
|
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
272
314
|
if (false === __is(input)) {
|
|
273
315
|
errors = [];
|
|
274
316
|
_report = __typia_transform__validateReport._validateReport(errors);
|
|
275
317
|
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
276
318
|
path: _path + "",
|
|
277
|
-
expected: "
|
|
319
|
+
expected: "IAutoBeTestWriteApplication.IProps",
|
|
278
320
|
value: input
|
|
279
321
|
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
280
322
|
path: _path + "",
|
|
281
|
-
expected: "
|
|
323
|
+
expected: "IAutoBeTestWriteApplication.IProps",
|
|
282
324
|
value: input
|
|
283
325
|
}))(input, "$input", true);
|
|
284
326
|
const success = 0 === errors.length;
|
|
@@ -306,41 +348,54 @@ const collection = {
|
|
|
306
348
|
"3.0": {
|
|
307
349
|
model: "3.0",
|
|
308
350
|
options: {
|
|
309
|
-
constraint: true,
|
|
310
351
|
recursive: 3,
|
|
352
|
+
constraint: true,
|
|
311
353
|
separate: null
|
|
312
354
|
},
|
|
313
355
|
functions: [
|
|
314
356
|
{
|
|
315
|
-
name: "
|
|
357
|
+
name: "write",
|
|
316
358
|
parameters: {
|
|
317
359
|
type: "object",
|
|
318
360
|
properties: {
|
|
319
361
|
scenario: {
|
|
320
362
|
type: "string",
|
|
321
|
-
title: "
|
|
322
|
-
description: "
|
|
363
|
+
title: "Step 1: Strategic test planning and scenario analysis",
|
|
364
|
+
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"
|
|
323
365
|
},
|
|
324
366
|
domain: {
|
|
325
367
|
type: "string",
|
|
326
|
-
title: "Functional domain classification for test organization",
|
|
327
|
-
description: "Functional domain classification for test organization.\n\
|
|
368
|
+
title: "Step 2: Functional domain classification for test organization",
|
|
369
|
+
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 that\nrepresents the primary API resource.\n\nWorkflow: Scenario analysis \u2192 Domain identification \u2192 Test organization\nstructure"
|
|
328
370
|
},
|
|
329
|
-
|
|
371
|
+
draft: {
|
|
330
372
|
type: "string",
|
|
331
|
-
title: "
|
|
332
|
-
description: "
|
|
373
|
+
title: "Step 3: Initial TypeScript E2E test code implementation",
|
|
374
|
+
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"
|
|
375
|
+
},
|
|
376
|
+
review: {
|
|
377
|
+
type: "string",
|
|
378
|
+
title: "Step 4: Code review and quality assessment",
|
|
379
|
+
description: "Step 4: Code review and quality assessment.\n\nAI performs a thorough review of the draft implementation, examining:\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-"
|
|
380
|
+
},
|
|
381
|
+
final: {
|
|
382
|
+
type: "string",
|
|
383
|
+
title: "Step 5: Final production-ready test code",
|
|
384
|
+
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. All identified issues\nmust be resolved, and the code must meet the highest quality standards.\n\nWorkflow: Review feedback \u2192 Code refinement \u2192 Production-ready\nimplementation\n\nThis is the ultimate deliverable that will be used in the actual test\nsuite."
|
|
333
385
|
}
|
|
334
386
|
},
|
|
335
387
|
required: [
|
|
336
388
|
"scenario",
|
|
337
389
|
"domain",
|
|
338
|
-
"
|
|
390
|
+
"draft",
|
|
391
|
+
"review",
|
|
392
|
+
"final"
|
|
339
393
|
],
|
|
340
|
-
description: "
|
|
394
|
+
description: " Complete specification for test generation including scenario,\ndomain, and implementation steps\n\n------------------------------\n\nCurrent Type: {@link IAutoBeTestWriteApplication.IProps}",
|
|
341
395
|
additionalProperties: false
|
|
342
396
|
},
|
|
343
|
-
|
|
397
|
+
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.",
|
|
398
|
+
validate: (() => { const _io0 = input => "string" === typeof input.scenario && "string" === typeof input.domain && "string" === typeof input.draft && "string" === typeof input.review && "string" === typeof input.final; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.scenario || _report(_exceptionable, {
|
|
344
399
|
path: _path + ".scenario",
|
|
345
400
|
expected: "string",
|
|
346
401
|
value: input.scenario
|
|
@@ -348,21 +403,29 @@ const collection = {
|
|
|
348
403
|
path: _path + ".domain",
|
|
349
404
|
expected: "string",
|
|
350
405
|
value: input.domain
|
|
351
|
-
}), "string" === typeof input.
|
|
352
|
-
path: _path + ".
|
|
406
|
+
}), "string" === typeof input.draft || _report(_exceptionable, {
|
|
407
|
+
path: _path + ".draft",
|
|
408
|
+
expected: "string",
|
|
409
|
+
value: input.draft
|
|
410
|
+
}), "string" === typeof input.review || _report(_exceptionable, {
|
|
411
|
+
path: _path + ".review",
|
|
412
|
+
expected: "string",
|
|
413
|
+
value: input.review
|
|
414
|
+
}), "string" === typeof input.final || _report(_exceptionable, {
|
|
415
|
+
path: _path + ".final",
|
|
353
416
|
expected: "string",
|
|
354
|
-
value: input.
|
|
417
|
+
value: input.final
|
|
355
418
|
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
356
419
|
if (false === __is(input)) {
|
|
357
420
|
errors = [];
|
|
358
421
|
_report = __typia_transform__validateReport._validateReport(errors);
|
|
359
422
|
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
360
423
|
path: _path + "",
|
|
361
|
-
expected: "
|
|
424
|
+
expected: "IAutoBeTestWriteApplication.IProps",
|
|
362
425
|
value: input
|
|
363
426
|
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
364
427
|
path: _path + "",
|
|
365
|
-
expected: "
|
|
428
|
+
expected: "IAutoBeTestWriteApplication.IProps",
|
|
366
429
|
value: input
|
|
367
430
|
}))(input, "$input", true);
|
|
368
431
|
const success = 0 === errors.length;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateTestWrite.js","sourceRoot":"","sources":["../../../src/orchestrate/test/orchestrateTestWrite.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"orchestrateTestWrite.js","sourceRoot":"","sources":["../../../src/orchestrate/test/orchestrateTestWrite.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,oDAwCC;;AAzDD,yCAAoE;AAIpE,kDAA0B;AAG1B,uEAAoE;AACpE,iEAA8D;AAC9D,uDAAoD;AACpD,iEAA8D;AAC9D,iFAA8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