@autobe/agent 0.19.1 → 0.20.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/agent/src/AutoBeAgent.js +3 -2
- package/lib/agent/src/AutoBeAgent.js.map +1 -1
- package/lib/agent/src/AutoBeMockAgent.js +3 -3
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +6 -6
- package/lib/agent/src/context/AutoBeContext.d.ts +1 -0
- package/lib/agent/src/factory/consentFunctionCall.js +3 -2
- package/lib/agent/src/factory/consentFunctionCall.js.map +1 -1
- package/lib/agent/src/factory/createAutoBeContext.js +8 -5
- package/lib/agent/src/factory/createAutoBeContext.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +6 -0
- package/lib/agent/src/orchestrate/analyze/histories/{transformAnalyzeReviewerHistories.js → transformAnalyzeReviewHistories.js} +24 -29
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +12 -9
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +31 -29
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js +19 -5
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +7 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +9 -6
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +11 -9
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -4
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +5 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js +45 -46
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +13 -13
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +31 -30
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +23 -22
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +2 -2
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +27 -26
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +13 -12
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js +4 -4
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +11 -10
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +31 -30
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js +3 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +22 -18
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js +2 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js +6 -2
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js +2 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +74 -48
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +24 -4
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js +30 -24
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +2 -5
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +178 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +38 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +38 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +54 -54
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +18 -29
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +37 -34
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +38 -25
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js +3 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js +2 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js +3 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js +19 -9
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js +28 -21
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +24 -21
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +58 -56
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +17 -13
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +12 -3
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +35 -30
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
- package/lib/{orchestrate/realize/internal/compile.d.ts → agent/src/orchestrate/realize/internal/compileRealizeFiles.d.ts} +1 -1
- package/lib/agent/src/orchestrate/realize/internal/{compile.js → compileRealizeFiles.js} +6 -6
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +26 -12
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js +9 -3
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +3 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +2 -6
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +8 -4
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -66
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +3 -6
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +21 -17
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js +13 -10
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +16 -15
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js +33 -32
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +62 -59
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +2 -2
- package/lib/agent/src/orchestrate/test/orchestrateTest.js +6 -5
- package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js +16 -7
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +20 -8
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js +17 -17
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +2 -2
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -2
- package/lib/agent/src/utils/executeCachedBatch.d.ts +1 -0
- package/lib/agent/src/utils/executeCachedBatch.js +23 -0
- package/lib/agent/src/utils/executeCachedBatch.js.map +1 -0
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +6 -6
- package/lib/context/AutoBeContext.d.ts +1 -0
- package/lib/index.mjs +1044 -270
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +6 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +7 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -4
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +2 -5
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +38 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +38 -0
- package/lib/{agent/src/orchestrate/realize/internal/compile.d.ts → orchestrate/realize/internal/compileRealizeFiles.d.ts} +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +2 -6
- package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -66
- package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +3 -6
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +2 -2
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -2
- package/lib/utils/executeCachedBatch.d.ts +1 -0
- package/package.json +6 -6
- package/src/AutoBeAgent.ts +4 -3
- package/src/AutoBeMockAgent.ts +4 -4
- package/src/constants/AutoBeSystemPromptConstant.ts +6 -6
- package/src/context/AutoBeContext.ts +1 -0
- package/src/factory/consentFunctionCall.ts +4 -3
- package/src/factory/createAutoBeContext.ts +9 -6
- package/src/orchestrate/analyze/histories/{transformAnalyzeReviewerHistories.ts → transformAnalyzeReviewHistories.ts} +23 -30
- package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +13 -10
- package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +60 -61
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +20 -13
- package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +20 -9
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +13 -11
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +10 -5
- package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +47 -48
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +14 -14
- package/src/orchestrate/interface/histories/transformInterfaceComplementHistories.ts +31 -30
- package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +20 -19
- package/src/orchestrate/interface/histories/transformInterfaceGroupHistories.ts +3 -3
- package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +23 -22
- package/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.ts +12 -11
- package/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.ts +5 -5
- package/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts +11 -10
- package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +31 -30
- package/src/orchestrate/interface/orchestrateInterface.ts +4 -2
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +36 -29
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +2 -0
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +13 -9
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +2 -0
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +53 -50
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +2 -0
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +47 -23
- package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +85 -1
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +39 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +40 -1
- package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +57 -55
- package/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.ts +19 -30
- package/src/orchestrate/prisma/histories/transformPrismaReviewHistories.ts +38 -35
- package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +36 -23
- package/src/orchestrate/prisma/orchestratePrisma.ts +4 -2
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +2 -0
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +3 -0
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +26 -13
- package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +25 -17
- package/src/orchestrate/realize/histories/transformRealizeAuthorization.ts +24 -21
- package/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.ts +42 -40
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +17 -13
- package/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.ts +14 -5
- package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +35 -30
- package/src/orchestrate/realize/internal/{compile.ts → compileRealizeFiles.ts} +15 -11
- package/src/orchestrate/realize/orchestrateRealize.ts +59 -40
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +19 -10
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +3 -0
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +10 -10
- package/src/orchestrate/realize/orchestrateRealizeScenario.ts +0 -74
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +24 -23
- package/src/orchestrate/test/compile/completeTestCode.ts +17 -13
- package/src/orchestrate/test/experimental/transformTestCorrectHistories.ast +4 -4
- package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +17 -16
- package/src/orchestrate/test/histories/transformTestHistories.ts +35 -34
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +62 -57
- package/src/orchestrate/test/histories/transformTestWriteHistories.ts +3 -3
- package/src/orchestrate/test/orchestrateTest.ts +7 -9
- package/src/orchestrate/test/orchestrateTestCorrect.ts +34 -24
- package/src/orchestrate/test/orchestrateTestScenario.ts +28 -21
- package/src/orchestrate/test/orchestrateTestWrite.ts +16 -17
- package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +3 -3
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +2 -2
- package/src/utils/executeCachedBatch.ts +15 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +0 -6
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/internal/compile.js.map +0 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +0 -6
|
@@ -8,9 +8,11 @@ import {
|
|
|
8
8
|
import { ILlmApplication, ILlmSchema } from "@samchon/openapi";
|
|
9
9
|
import { IPointer } from "tstl";
|
|
10
10
|
import typia from "typia";
|
|
11
|
+
import { v7 } from "uuid";
|
|
11
12
|
|
|
12
13
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
13
14
|
import { assertSchemaModel } from "../../context/assertSchemaModel";
|
|
15
|
+
import { executeCachedBatch } from "../../utils/executeCachedBatch";
|
|
14
16
|
import { completeTestCode } from "./compile/completeTestCode";
|
|
15
17
|
import { getTestScenarioArtifacts } from "./compile/getTestScenarioArtifacts";
|
|
16
18
|
import { transformTestWriteHistories } from "./histories/transformTestWriteHistories";
|
|
@@ -26,22 +28,22 @@ export async function orchestrateTestWrite<Model extends ILlmSchema.Model>(
|
|
|
26
28
|
total: scenarios.length,
|
|
27
29
|
completed: 0,
|
|
28
30
|
};
|
|
29
|
-
const result: Array<IAutoBeTestWriteResult | null> = await
|
|
31
|
+
const result: Array<IAutoBeTestWriteResult | null> = await executeCachedBatch(
|
|
30
32
|
/**
|
|
31
33
|
* Generate test code for each scenario. Maps through plans array to create
|
|
32
34
|
* individual test code implementations. Each scenario is processed to
|
|
33
35
|
* generate corresponding test code and progress events.
|
|
34
36
|
*/
|
|
35
|
-
scenarios.map(async (
|
|
37
|
+
scenarios.map((scenario) => async (promptCacheKey) => {
|
|
36
38
|
try {
|
|
37
39
|
const artifacts: IAutoBeTestScenarioArtifacts =
|
|
38
40
|
await getTestScenarioArtifacts(ctx, scenario);
|
|
39
|
-
const event: AutoBeTestWriteEvent = await process(
|
|
40
|
-
ctx,
|
|
41
|
+
const event: AutoBeTestWriteEvent = await process(ctx, {
|
|
41
42
|
scenario,
|
|
42
43
|
artifacts,
|
|
43
44
|
progress,
|
|
44
|
-
|
|
45
|
+
promptCacheKey,
|
|
46
|
+
});
|
|
45
47
|
ctx.dispatch(event);
|
|
46
48
|
return {
|
|
47
49
|
scenario,
|
|
@@ -56,21 +58,16 @@ export async function orchestrateTestWrite<Model extends ILlmSchema.Model>(
|
|
|
56
58
|
return result.filter((r) => r !== null);
|
|
57
59
|
}
|
|
58
60
|
|
|
59
|
-
/**
|
|
60
|
-
* Process function that generates test code for each individual scenario. Takes
|
|
61
|
-
* the AutoBeContext and scenario information as input and uses MicroAgentica to
|
|
62
|
-
* generate appropriate test code through LLM interaction.
|
|
63
|
-
*
|
|
64
|
-
* @param ctx - The AutoBeContext containing model, vendor and configuration
|
|
65
|
-
* @param scenario - The test scenario information to generate code for
|
|
66
|
-
* @param artifacts - The artifacts containing the reference files and schemas
|
|
67
|
-
*/
|
|
68
61
|
async function process<Model extends ILlmSchema.Model>(
|
|
69
62
|
ctx: AutoBeContext<Model>,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
63
|
+
props: {
|
|
64
|
+
scenario: AutoBeTestScenario;
|
|
65
|
+
artifacts: IAutoBeTestScenarioArtifacts;
|
|
66
|
+
progress: AutoBeProgressEventBase;
|
|
67
|
+
promptCacheKey: string;
|
|
68
|
+
},
|
|
73
69
|
): Promise<AutoBeTestWriteEvent> {
|
|
70
|
+
const { scenario, artifacts, progress, promptCacheKey } = props;
|
|
74
71
|
const pointer: IPointer<IAutoBeTestWriteApplication.IProps | null> = {
|
|
75
72
|
value: null,
|
|
76
73
|
};
|
|
@@ -85,6 +82,7 @@ async function process<Model extends ILlmSchema.Model>(
|
|
|
85
82
|
},
|
|
86
83
|
}),
|
|
87
84
|
enforceFunctionCall: true,
|
|
85
|
+
promptCacheKey,
|
|
88
86
|
message: "Create e2e test functions.",
|
|
89
87
|
});
|
|
90
88
|
if (pointer.value === null) throw new Error("Failed to create test code.");
|
|
@@ -93,6 +91,7 @@ async function process<Model extends ILlmSchema.Model>(
|
|
|
93
91
|
pointer.value.final = await compiler.typescript.beautify(pointer.value.final);
|
|
94
92
|
return {
|
|
95
93
|
type: "testWrite",
|
|
94
|
+
id: v7(),
|
|
96
95
|
created_at: new Date().toISOString(),
|
|
97
96
|
location: `test/features/api/${pointer.value.domain}/${scenario.functionName}.ts`,
|
|
98
97
|
...pointer.value,
|
|
@@ -70,8 +70,8 @@ export namespace IAutoBeTestCorrectApplication {
|
|
|
70
70
|
* AI generates the first corrected version of the test code based on error
|
|
71
71
|
* analysis and correction strategies. This draft addresses all identified
|
|
72
72
|
* compilation errors while preserving the original business logic and test
|
|
73
|
-
* workflow. The code is compilation-error-free and follows all
|
|
74
|
-
*
|
|
73
|
+
* workflow. The code is compilation-error-free and follows all established
|
|
74
|
+
* conventions.
|
|
75
75
|
*
|
|
76
76
|
* The implementation incorporates lessons learned from error analysis to
|
|
77
77
|
* produce properly typed, syntactically correct code that maintains the
|
|
@@ -80,7 +80,7 @@ export namespace IAutoBeTestCorrectApplication {
|
|
|
80
80
|
*
|
|
81
81
|
* Workflow: Error correction → TypeScript implementation → Functional
|
|
82
82
|
* preservation
|
|
83
|
-
*
|
|
83
|
+
*
|
|
84
84
|
* DO: Resolve all compilation errors while maintaining original test intent
|
|
85
85
|
*/
|
|
86
86
|
draft: string;
|
|
@@ -35,8 +35,8 @@ export namespace IAutoBeTestWriteApplication {
|
|
|
35
35
|
*
|
|
36
36
|
* AI determines the appropriate domain category based on the scenario
|
|
37
37
|
* analysis. This classification drives file structure, test categorization,
|
|
38
|
-
* and logical grouping. The domain must be a single, lowercase word
|
|
39
|
-
* represents the primary API resource.
|
|
38
|
+
* and logical grouping. The domain must be a single, lowercase word in
|
|
39
|
+
* snake_case format that represents the primary API resource.
|
|
40
40
|
*
|
|
41
41
|
* Workflow: Scenario analysis → Domain identification → Test organization
|
|
42
42
|
* structure
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { v7 } from "uuid";
|
|
2
|
+
|
|
3
|
+
export const executeCachedBatch = async <T>(
|
|
4
|
+
tasks: Array<(user: string) => Promise<T>>,
|
|
5
|
+
promptCacheKey?: string,
|
|
6
|
+
): Promise<T[]> => {
|
|
7
|
+
if (tasks.length === 0) return [];
|
|
8
|
+
|
|
9
|
+
promptCacheKey ??= v7();
|
|
10
|
+
const first: T = await tasks[0]!(promptCacheKey);
|
|
11
|
+
const tail: T[] = await Promise.all(
|
|
12
|
+
tasks.slice(1).map((task) => task(promptCacheKey)),
|
|
13
|
+
);
|
|
14
|
+
return [first, ...tail];
|
|
15
|
+
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
-
import { AutoBeAnalyzeScenarioEvent } from "@autobe/interface";
|
|
3
|
-
import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
|
|
4
|
-
import { ILlmSchema } from "@samchon/openapi";
|
|
5
|
-
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
6
|
-
export declare const transformAnalyzeReviewerHistories: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, scenario: AutoBeAnalyzeScenarioEvent, otherFiles: AutoBeAnalyzeFile[], myFile: AutoBeAnalyzeFile) => Array<IAgenticaHistoryJson.IUserMessage | IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
|
package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transformAnalyzeReviewerHistories.js","sourceRoot":"","sources":["../../../../../../src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.ts"],"names":[],"mappings":";;;AAIA,+BAA0B;AAI1B,qFAAkF;AAE3E,MAAM,iCAAiC,GAAG,CAG/C,GAAyB,EACzB,QAAoC,EACpC,UAA+B,EAC/B,MAAyB,EAKzB,EAAE;IACF,OAAO;QACL,GAAG,IAAA,+DAA8B,EAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,CAAC;QACxD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE;gBACJ,uDAAuD;gBACvD,EAAE;gBACF,SAAS;gBACT,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;gBAC1B,KAAK;gBACL,EAAE;gBACF,kEAAkE;gBAClE,EAAE;gBACF,SAAS;gBACT,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;gBACtB,KAAK;aACN,CAAC,IAAI,CAAC,IAAI,CAAC;SACb;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,eAAe;YACrB,IAAI,godAA2C;SAChD;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE;gBACJ,cAAc,MAAM,CAAC,QAAQ,YAAY;gBACzC,EAAE;gBACF,iCAAiC;aAClC,CAAC,IAAI,CAAC,IAAI,CAAC;SACb;KACF,CAAC;AACJ,CAAC,CAAC;AAjDW,QAAA,iCAAiC,qCAiD5C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compile.js","sourceRoot":"","sources":["../../../../../../src/orchestrate/realize/internal/compile.ts"],"names":[],"mappings":";;;;;;;;;;;AAUA,0BAwDC;AAxDD,SAAsB,OAAO,CAC3B,GAAyB,EACzB,KAGC;;;QAED,MAAM,MAAM,GAAG,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,MAAM,0CAAE,QAAQ,CAAC;QAC5C,MAAM,QAAQ,GAA2B,MAAM,CAAC,WAAW,CACzD,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAC5E,CAAC;QACF,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,QAAQ,EAAE,CAAC;QACtC,MAAM,aAAa,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;QAC3D,MAAM,WAAW,GAAG,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,MAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;QAEzE,MAAM,aAAa,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAErE,MAAM,KAAK,6EACN,WAAW,GACX,QAAQ,GACR,MAAM,CAAC,WAAW,CACnB,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CACnE,aAAa,CAAC,GAAG,CAAC,CACnB,CACF,GACE,MAAM,CAAC,WAAW,CACnB,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CACpE,GACE,MAAM,CAAC,WAAW,CACnB,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CACvD,CACF,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC;YACjD,KAAK,EAAE,KAAK;SACb,CAAC,CAAC;QAEH,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAChC,OAAO,QAAQ,CAAC;QAClB,CAAC;aAAM,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QACzC,CAAC;QAED,MAAM,KAAK,GAA+B;YACxC,IAAI,EAAE,iBAAiB;YACvB,MAAM,EAAE,QAAQ;YAChB,KAAK,EAAE,MAAM,CAAC,WAAW,CACvB,QAAQ,CAAC,IAAI,KAAK,SAAS;gBACzB,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;gBACnD,CAAC,CAAC,EAAE,CACP;YACD,IAAI,EAAE,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,0CAAE,IAAI,mCAAI,CAAC;YACpC,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACrC,CAAC;QACF,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAEpB,OAAO,QAAQ,CAAC;IAClB,CAAC;CAAA"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
-
import { AutoBeAnalyzeScenarioEvent } from "@autobe/interface";
|
|
3
|
-
import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
|
|
4
|
-
import { ILlmSchema } from "@samchon/openapi";
|
|
5
|
-
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
6
|
-
export declare const transformAnalyzeReviewerHistories: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, scenario: AutoBeAnalyzeScenarioEvent, otherFiles: AutoBeAnalyzeFile[], myFile: AutoBeAnalyzeFile) => Array<IAgenticaHistoryJson.IUserMessage | IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
|