@autobe/agent 0.9.2 → 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 +11 -4
- package/lib/AutoBeAgent.js.map +1 -1
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +6 -6
- 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/factory/createAutoBeApplication.js +288 -643
- package/lib/factory/createAutoBeApplication.js.map +1 -1
- package/lib/index.mjs +5057 -7211
- 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 +95 -266
- 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/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} +10 -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 -448
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenario.js +272 -530
- 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 -90
- 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 +14 -2
- 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 -67
- package/lib/orchestrate/test/transformTestCorrectHistories.js.map +1 -1
- package/lib/orchestrate/test/transformTestWriteHistories.d.ts +5 -4
- package/lib/orchestrate/test/transformTestWriteHistories.js +168 -43
- package/lib/orchestrate/test/transformTestWriteHistories.js.map +1 -1
- package/lib/structures/IAutoBeConfig.d.ts +11 -0
- 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 -7
- package/src/AutoBeAgent.ts +17 -3
- package/src/constants/AutoBeSystemPromptConstant.ts +6 -6
- package/src/context/AutoBeTokenUsage.ts +85 -1
- 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 +6 -5
- package/src/orchestrate/facade/transformFacadeStateMessage.ts +2 -1
- package/src/orchestrate/index.ts +2 -2
- 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} +16 -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 +33 -16
- package/src/orchestrate/test/orchestrateTestCorrect.ts +109 -497
- package/src/orchestrate/test/orchestrateTestScenario.ts +102 -71
- package/src/orchestrate/test/orchestrateTestWrite.ts +55 -181
- 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 +14 -2
- 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 -71
- package/src/orchestrate/test/transformTestWriteHistories.ts +88 -46
- package/src/structures/IAutoBeConfig.ts +9 -0
- 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,EAAE,CAAC,MAAM;SAClB,EACD,EAAE,CACH,CACJ,EACD,gCAAwB,CAAC,QAAQ,EACjC,gCAAwB,CAAC,MAAM,CAChC,CAAC;QACJ,MAAM,gBAAgB,GAAW;YAC/B,+CAA+C;YAC/C,EAAE;YACF,iBAAiB;YACjB,iBAAiB;YACjB,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,MAAM,UAAU,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;SAC1E,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QA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AM;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,52 +86,38 @@ 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
|
-
const typeReferences = Array.from(new Set(Object.keys(artifacts.document.components.schemas).map((key) => key.split(".")[0])));
|
|
124
|
-
pointer.value.content = pointer.value.content
|
|
125
|
-
.replace(/^[ \t]*import\b[\s\S]*?;[ \t]*$/gm, "")
|
|
126
|
-
.trim();
|
|
127
|
-
pointer.value.content = [
|
|
128
|
-
`import { TestValidator } from "@nestia/e2e";`,
|
|
129
|
-
`import typia, { tags } from "typia";`,
|
|
130
|
-
"",
|
|
131
|
-
`import api from "@ORGANIZATION/PROJECT-api";`,
|
|
132
|
-
...typeReferences.map((ref) => `import type { ${ref} } from "@ORGANIZATION/PROJECT-api/lib/structures/${ref}";`),
|
|
133
|
-
"",
|
|
134
|
-
pointer.value.content,
|
|
135
|
-
].join("\n");
|
|
136
|
-
pointer.value.content = pointer.value.content.replaceAll('string & Format<"uuid">', 'string & tags.Format<"uuid">');
|
|
137
121
|
return pointer.value;
|
|
138
122
|
});
|
|
139
123
|
}
|
|
@@ -145,7 +129,9 @@ function createApplication(props) {
|
|
|
145
129
|
name: "Create Test Code",
|
|
146
130
|
application,
|
|
147
131
|
execute: {
|
|
148
|
-
|
|
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);
|
|
149
135
|
props.build(next);
|
|
150
136
|
},
|
|
151
137
|
},
|
|
@@ -159,36 +145,49 @@ const claude = {
|
|
|
159
145
|
},
|
|
160
146
|
functions: [
|
|
161
147
|
{
|
|
162
|
-
name: "
|
|
148
|
+
name: "write",
|
|
163
149
|
parameters: {
|
|
164
|
-
description: "
|
|
150
|
+
description: " Complete specification for test generation including scenario,\ndomain, and implementation steps\n\n------------------------------\n\nCurrent Type: {@link IAutoBeTestWriteApplication.IProps}",
|
|
165
151
|
type: "object",
|
|
166
152
|
properties: {
|
|
167
153
|
scenario: {
|
|
168
|
-
title: "
|
|
169
|
-
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",
|
|
170
156
|
type: "string"
|
|
171
157
|
},
|
|
172
158
|
domain: {
|
|
173
|
-
title: "Functional domain classification for test organization",
|
|
174
|
-
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",
|
|
175
161
|
type: "string"
|
|
176
162
|
},
|
|
177
|
-
|
|
178
|
-
title: "
|
|
179
|
-
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.",
|
|
180
176
|
type: "string"
|
|
181
177
|
}
|
|
182
178
|
},
|
|
183
179
|
required: [
|
|
184
180
|
"scenario",
|
|
185
181
|
"domain",
|
|
186
|
-
"
|
|
182
|
+
"draft",
|
|
183
|
+
"review",
|
|
184
|
+
"final"
|
|
187
185
|
],
|
|
188
186
|
additionalProperties: false,
|
|
189
187
|
$defs: {}
|
|
190
188
|
},
|
|
191
|
-
|
|
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, {
|
|
192
191
|
path: _path + ".scenario",
|
|
193
192
|
expected: "string",
|
|
194
193
|
value: input.scenario
|
|
@@ -196,21 +195,29 @@ const claude = {
|
|
|
196
195
|
path: _path + ".domain",
|
|
197
196
|
expected: "string",
|
|
198
197
|
value: input.domain
|
|
199
|
-
}), "string" === typeof input.
|
|
200
|
-
path: _path + ".
|
|
198
|
+
}), "string" === typeof input.draft || _report(_exceptionable, {
|
|
199
|
+
path: _path + ".draft",
|
|
201
200
|
expected: "string",
|
|
202
|
-
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
|
|
203
210
|
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
204
211
|
if (false === __is(input)) {
|
|
205
212
|
errors = [];
|
|
206
213
|
_report = __typia_transform__validateReport._validateReport(errors);
|
|
207
214
|
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
208
215
|
path: _path + "",
|
|
209
|
-
expected: "
|
|
216
|
+
expected: "IAutoBeTestWriteApplication.IProps",
|
|
210
217
|
value: input
|
|
211
218
|
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
212
219
|
path: _path + "",
|
|
213
|
-
expected: "
|
|
220
|
+
expected: "IAutoBeTestWriteApplication.IProps",
|
|
214
221
|
value: input
|
|
215
222
|
}))(input, "$input", true);
|
|
216
223
|
const success = 0 === errors.length;
|
|
@@ -241,36 +248,49 @@ const collection = {
|
|
|
241
248
|
},
|
|
242
249
|
functions: [
|
|
243
250
|
{
|
|
244
|
-
name: "
|
|
251
|
+
name: "write",
|
|
245
252
|
parameters: {
|
|
246
|
-
description: "
|
|
253
|
+
description: " Complete specification for test generation including scenario,\ndomain, and implementation steps\n\n------------------------------\n\nCurrent Type: {@link IAutoBeTestWriteApplication.IProps}",
|
|
247
254
|
type: "object",
|
|
248
255
|
properties: {
|
|
249
256
|
scenario: {
|
|
250
|
-
title: "
|
|
251
|
-
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",
|
|
252
259
|
type: "string"
|
|
253
260
|
},
|
|
254
261
|
domain: {
|
|
255
|
-
title: "Functional domain classification for test organization",
|
|
256
|
-
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",
|
|
257
264
|
type: "string"
|
|
258
265
|
},
|
|
259
|
-
|
|
260
|
-
title: "
|
|
261
|
-
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.",
|
|
262
279
|
type: "string"
|
|
263
280
|
}
|
|
264
281
|
},
|
|
265
282
|
required: [
|
|
266
283
|
"scenario",
|
|
267
284
|
"domain",
|
|
268
|
-
"
|
|
285
|
+
"draft",
|
|
286
|
+
"review",
|
|
287
|
+
"final"
|
|
269
288
|
],
|
|
270
289
|
additionalProperties: false,
|
|
271
290
|
$defs: {}
|
|
272
291
|
},
|
|
273
|
-
|
|
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, {
|
|
274
294
|
path: _path + ".scenario",
|
|
275
295
|
expected: "string",
|
|
276
296
|
value: input.scenario
|
|
@@ -278,21 +298,29 @@ const collection = {
|
|
|
278
298
|
path: _path + ".domain",
|
|
279
299
|
expected: "string",
|
|
280
300
|
value: input.domain
|
|
281
|
-
}), "string" === typeof input.
|
|
282
|
-
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",
|
|
283
307
|
expected: "string",
|
|
284
|
-
value: input.
|
|
308
|
+
value: input.review
|
|
309
|
+
}), "string" === typeof input.final || _report(_exceptionable, {
|
|
310
|
+
path: _path + ".final",
|
|
311
|
+
expected: "string",
|
|
312
|
+
value: input.final
|
|
285
313
|
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
286
314
|
if (false === __is(input)) {
|
|
287
315
|
errors = [];
|
|
288
316
|
_report = __typia_transform__validateReport._validateReport(errors);
|
|
289
317
|
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
290
318
|
path: _path + "",
|
|
291
|
-
expected: "
|
|
319
|
+
expected: "IAutoBeTestWriteApplication.IProps",
|
|
292
320
|
value: input
|
|
293
321
|
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
294
322
|
path: _path + "",
|
|
295
|
-
expected: "
|
|
323
|
+
expected: "IAutoBeTestWriteApplication.IProps",
|
|
296
324
|
value: input
|
|
297
325
|
}))(input, "$input", true);
|
|
298
326
|
const success = 0 === errors.length;
|
|
@@ -320,41 +348,54 @@ const collection = {
|
|
|
320
348
|
"3.0": {
|
|
321
349
|
model: "3.0",
|
|
322
350
|
options: {
|
|
323
|
-
constraint: true,
|
|
324
351
|
recursive: 3,
|
|
352
|
+
constraint: true,
|
|
325
353
|
separate: null
|
|
326
354
|
},
|
|
327
355
|
functions: [
|
|
328
356
|
{
|
|
329
|
-
name: "
|
|
357
|
+
name: "write",
|
|
330
358
|
parameters: {
|
|
331
359
|
type: "object",
|
|
332
360
|
properties: {
|
|
333
361
|
scenario: {
|
|
334
362
|
type: "string",
|
|
335
|
-
title: "
|
|
336
|
-
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"
|
|
337
365
|
},
|
|
338
366
|
domain: {
|
|
339
367
|
type: "string",
|
|
340
|
-
title: "Functional domain classification for test organization",
|
|
341
|
-
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"
|
|
342
370
|
},
|
|
343
|
-
|
|
371
|
+
draft: {
|
|
344
372
|
type: "string",
|
|
345
|
-
title: "
|
|
346
|
-
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."
|
|
347
385
|
}
|
|
348
386
|
},
|
|
349
387
|
required: [
|
|
350
388
|
"scenario",
|
|
351
389
|
"domain",
|
|
352
|
-
"
|
|
390
|
+
"draft",
|
|
391
|
+
"review",
|
|
392
|
+
"final"
|
|
353
393
|
],
|
|
354
|
-
description: "
|
|
394
|
+
description: " Complete specification for test generation including scenario,\ndomain, and implementation steps\n\n------------------------------\n\nCurrent Type: {@link IAutoBeTestWriteApplication.IProps}",
|
|
355
395
|
additionalProperties: false
|
|
356
396
|
},
|
|
357
|
-
|
|
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, {
|
|
358
399
|
path: _path + ".scenario",
|
|
359
400
|
expected: "string",
|
|
360
401
|
value: input.scenario
|
|
@@ -362,21 +403,29 @@ const collection = {
|
|
|
362
403
|
path: _path + ".domain",
|
|
363
404
|
expected: "string",
|
|
364
405
|
value: input.domain
|
|
365
|
-
}), "string" === typeof input.
|
|
366
|
-
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",
|
|
367
416
|
expected: "string",
|
|
368
|
-
value: input.
|
|
417
|
+
value: input.final
|
|
369
418
|
})].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
370
419
|
if (false === __is(input)) {
|
|
371
420
|
errors = [];
|
|
372
421
|
_report = __typia_transform__validateReport._validateReport(errors);
|
|
373
422
|
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
374
423
|
path: _path + "",
|
|
375
|
-
expected: "
|
|
424
|
+
expected: "IAutoBeTestWriteApplication.IProps",
|
|
376
425
|
value: input
|
|
377
426
|
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
378
427
|
path: _path + "",
|
|
379
|
-
expected: "
|
|
428
|
+
expected: "IAutoBeTestWriteApplication.IProps",
|
|
380
429
|
value: input
|
|
381
430
|
}))(input, "$input", true);
|
|
382
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":[],"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