@autobe/agent 0.19.1 → 0.21.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 +4 -3
- package/lib/agent/src/AutoBeMockAgent.js.map +1 -1
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +12 -11
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/agent/src/context/AutoBeContext.d.ts +3 -2
- 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 +11 -6
- 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/transformInterfaceEndpointsReviewHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +33 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -0
- 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 +32 -31
- 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 +28 -24
- 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 +11 -5
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +10 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +365 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +1 -0
- 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 +80 -54
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +1635 -1180
- 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/IAutoBeInterfaceEndpointsReviewApplication.d.ts +60 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +38 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +78 -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 +12 -8
- 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 +2 -2
- 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 +25 -21
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +2 -2
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +7 -2
- 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/compile/getTestExternalDeclarations.js +1 -1
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.d.ts +3 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +44 -27
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +63 -60
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.d.ts +3 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +118 -96
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
- 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 +17 -8
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +30 -18
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js +18 -18
- 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/IAutoBeTestScenarioApplication.d.ts +28 -1
- 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 +12 -11
- package/lib/context/AutoBeContext.d.ts +3 -2
- package/lib/index.mjs +3265 -1702
- 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/histories/transformInterfaceEndpointsReviewHistories.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +10 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +2 -5
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.d.ts +60 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +38 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +78 -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/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +2 -2
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +7 -2
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +3 -1
- package/lib/orchestrate/test/histories/transformTestWriteHistories.d.ts +3 -1
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +2 -2
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +28 -1
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -2
- package/lib/utils/executeCachedBatch.d.ts +1 -0
- package/package.json +7 -7
- package/src/AutoBeAgent.ts +4 -3
- package/src/AutoBeMockAgent.ts +5 -4
- package/src/constants/AutoBeSystemPromptConstant.ts +12 -11
- package/src/context/AutoBeContext.ts +3 -0
- package/src/factory/consentFunctionCall.ts +4 -3
- package/src/factory/createAutoBeContext.ts +11 -7
- 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/transformInterfaceEndpointsReviewHistories.ts +39 -0
- 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 +18 -10
- package/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.ts +95 -0
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +2 -0
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +53 -50
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +120 -10
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +47 -23
- package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +85 -1
- package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.ts +65 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +39 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +82 -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 +7 -77
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +24 -23
- package/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.ts +6 -2
- package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +10 -5
- package/src/orchestrate/test/compile/completeTestCode.ts +17 -13
- package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +2 -0
- package/src/orchestrate/test/experimental/transformTestCorrectHistories.ast +4 -4
- package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +50 -37
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +62 -57
- package/src/orchestrate/test/histories/transformTestWriteHistories.ts +27 -7
- package/src/orchestrate/test/orchestrateTest.ts +7 -9
- package/src/orchestrate/test/orchestrateTestCorrect.ts +39 -25
- package/src/orchestrate/test/orchestrateTestScenario.ts +28 -21
- package/src/orchestrate/test/orchestrateTestWrite.ts +17 -18
- package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +3 -3
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +28 -1
- 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/agent/src/orchestrate/test/histories/transformTestHistories.d.ts +0 -3
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js +0 -74
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +0 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +0 -6
- package/lib/orchestrate/test/histories/transformTestHistories.d.ts +0 -3
- package/src/orchestrate/test/histories/transformTestHistories.ts +0 -77
|
@@ -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,27 +58,22 @@ 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
|
};
|
|
77
74
|
const { tokenUsage } = await ctx.conversate({
|
|
78
75
|
source: "testWrite",
|
|
79
|
-
histories: transformTestWriteHistories(scenario, artifacts),
|
|
76
|
+
histories: await transformTestWriteHistories(ctx, scenario, artifacts),
|
|
80
77
|
controller: createController({
|
|
81
78
|
model: ctx.model,
|
|
82
79
|
artifacts,
|
|
@@ -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;
|
|
@@ -32,6 +32,18 @@ export namespace IAutoBeTestScenarioApplication {
|
|
|
32
32
|
*
|
|
33
33
|
* Each scenario represents a specific test case for the same `path` and
|
|
34
34
|
* `method`.
|
|
35
|
+
*
|
|
36
|
+
* IMPORTANT: Each scenario must be actually implementable. A scenario's
|
|
37
|
+
* implementability is determined by the existence of ALL APIs (endpoints)
|
|
38
|
+
* required to test it. This includes not only the primary endpoint being
|
|
39
|
+
* tested, but also ALL dependency endpoints needed for setup,
|
|
40
|
+
* authentication, and data preparation. If even one required dependency API
|
|
41
|
+
* is missing from the available operations, the scenario cannot be
|
|
42
|
+
* implemented and should not be generated.
|
|
43
|
+
*
|
|
44
|
+
* Example: A "test banned user login" scenario requires both a login API
|
|
45
|
+
* AND a ban user API. If the ban API doesn't exist, this scenario is not
|
|
46
|
+
* implementable regardless of database schema fields.
|
|
35
47
|
*/
|
|
36
48
|
scenarios: IScenario[] & tags.MinItems<1>;
|
|
37
49
|
}
|
|
@@ -42,6 +54,11 @@ export namespace IAutoBeTestScenarioApplication {
|
|
|
42
54
|
* This interface defines a structured, user-centric test draft that includes
|
|
43
55
|
* a descriptive function name, a detailed scenario draft, and logical
|
|
44
56
|
* dependencies on other endpoints required for context or setup.
|
|
57
|
+
*
|
|
58
|
+
* CRITICAL: All referenced endpoints MUST exist in the provided API
|
|
59
|
+
* operations. Do NOT create scenarios for non-existent APIs, even if database
|
|
60
|
+
* schema fields suggest their existence. Test scenarios must be implementable
|
|
61
|
+
* with available APIs only.
|
|
45
62
|
*/
|
|
46
63
|
export interface IScenario {
|
|
47
64
|
/**
|
|
@@ -120,12 +137,22 @@ export namespace IAutoBeTestScenarioApplication {
|
|
|
120
137
|
* authentication, resource creation, or data setup, that are relevant to
|
|
121
138
|
* the test. This list is not a strict execution order — if ordering is
|
|
122
139
|
* important, it must be described explicitly in the `purpose`.
|
|
140
|
+
*
|
|
141
|
+
* WARNING: Every endpoint referenced here MUST exist in the provided API
|
|
142
|
+
* operations. Do NOT reference endpoints that are not explicitly available,
|
|
143
|
+
* even if they seem logically necessary based on database schema or
|
|
144
|
+
* business logic.
|
|
123
145
|
*/
|
|
124
146
|
dependencies: IDependencies[];
|
|
125
147
|
}
|
|
126
148
|
|
|
127
149
|
export interface IDependencies {
|
|
128
|
-
/**
|
|
150
|
+
/**
|
|
151
|
+
* Target API endpoint that this scenario depends on.
|
|
152
|
+
*
|
|
153
|
+
* This endpoint MUST exist in the available API operations list.
|
|
154
|
+
* Non-existent endpoints will cause test implementation failures.
|
|
155
|
+
*/
|
|
129
156
|
endpoint: AutoBeOpenApi.IEndpoint;
|
|
130
157
|
|
|
131
158
|
/**
|
|
@@ -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,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformTestHistories = void 0;
|
|
4
|
-
const uuid_1 = require("uuid");
|
|
5
|
-
const transformTestHistories = (state) => {
|
|
6
|
-
if (state.analyze === null)
|
|
7
|
-
return [
|
|
8
|
-
{
|
|
9
|
-
id: (0, uuid_1.v4)(),
|
|
10
|
-
created_at: new Date().toISOString(),
|
|
11
|
-
type: "systemMessage",
|
|
12
|
-
text: [
|
|
13
|
-
"Requirement analysis is not yet completed.",
|
|
14
|
-
"Don't call the any tool function,",
|
|
15
|
-
"but say to process the requirement analysis.",
|
|
16
|
-
].join(" "),
|
|
17
|
-
},
|
|
18
|
-
];
|
|
19
|
-
else if (state.prisma === null)
|
|
20
|
-
return [
|
|
21
|
-
{
|
|
22
|
-
id: (0, uuid_1.v4)(),
|
|
23
|
-
created_at: new Date().toISOString(),
|
|
24
|
-
type: "systemMessage",
|
|
25
|
-
text: [
|
|
26
|
-
"Prisma DB schema generation is not yet completed.",
|
|
27
|
-
"Don't call the any tool function,",
|
|
28
|
-
"but say to process the Prisma DB schema generation.",
|
|
29
|
-
].join(" "),
|
|
30
|
-
},
|
|
31
|
-
];
|
|
32
|
-
else if (state.analyze.step !== state.prisma.step)
|
|
33
|
-
return [
|
|
34
|
-
{
|
|
35
|
-
id: (0, uuid_1.v4)(),
|
|
36
|
-
created_at: new Date().toISOString(),
|
|
37
|
-
type: "systemMessage",
|
|
38
|
-
text: [
|
|
39
|
-
"Prisma DB schema generation has not been updated",
|
|
40
|
-
"for the latest requirement analysis.",
|
|
41
|
-
"Don't call the any tool function,",
|
|
42
|
-
"but say to re-process the Prisma DB schema generation.",
|
|
43
|
-
].join(" "),
|
|
44
|
-
},
|
|
45
|
-
];
|
|
46
|
-
else if (state.prisma.compiled.type !== "success")
|
|
47
|
-
return [
|
|
48
|
-
{
|
|
49
|
-
id: (0, uuid_1.v4)(),
|
|
50
|
-
created_at: new Date().toISOString(),
|
|
51
|
-
type: "systemMessage",
|
|
52
|
-
text: [
|
|
53
|
-
"Prisma DB schema generation has not been updated",
|
|
54
|
-
"for the latest requirement analysis.",
|
|
55
|
-
"Don't call the any tool function,",
|
|
56
|
-
"but say to re-process the Prisma DB schema generation.",
|
|
57
|
-
].join(" "),
|
|
58
|
-
},
|
|
59
|
-
];
|
|
60
|
-
return [
|
|
61
|
-
{
|
|
62
|
-
id: (0, uuid_1.v4)(),
|
|
63
|
-
created_at: new Date().toISOString(),
|
|
64
|
-
type: "systemMessage",
|
|
65
|
-
text: [
|
|
66
|
-
"Interface generation is not yet completed.",
|
|
67
|
-
"Don't call the any tool function,",
|
|
68
|
-
"but say to process the interface generation.",
|
|
69
|
-
].join(" "),
|
|
70
|
-
},
|
|
71
|
-
];
|
|
72
|
-
};
|
|
73
|
-
exports.transformTestHistories = transformTestHistories;
|
|
74
|
-
//# sourceMappingURL=transformTestHistories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transformTestHistories.js","sourceRoot":"","sources":["../../../../../../src/orchestrate/test/histories/transformTestHistories.ts"],"names":[],"mappings":";;;AACA,+BAA0B;AAInB,MAAM,sBAAsB,GAAG,CACpC,KAAkB,EAGlB,EAAE;IACF,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI;QACxB,OAAO;YACL;gBACE,EAAE,EAAE,IAAA,SAAE,GAAE;gBACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACpC,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE;oBACJ,4CAA4C;oBAC5C,mCAAmC;oBACnC,8CAA8C;iBAC/C,CAAC,IAAI,CAAC,GAAG,CAAC;aACZ;SACF,CAAC;SACC,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI;QAC5B,OAAO;YACL;gBACE,EAAE,EAAE,IAAA,SAAE,GAAE;gBACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACpC,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE;oBACJ,mDAAmD;oBACnD,mCAAmC;oBACnC,qDAAqD;iBACtD,CAAC,IAAI,CAAC,GAAG,CAAC;aACZ;SACF,CAAC;SACC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,KAAK,CAAC,MAAM,CAAC,IAAI;QAC/C,OAAO;YACL;gBACE,EAAE,EAAE,IAAA,SAAE,GAAE;gBACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACpC,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE;oBACJ,kDAAkD;oBAClD,sCAAsC;oBACtC,mCAAmC;oBACnC,wDAAwD;iBACzD,CAAC,IAAI,CAAC,GAAG,CAAC;aACZ;SACF,CAAC;SACC,IAAI,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,KAAK,SAAS;QAC/C,OAAO;YACL;gBACE,EAAE,EAAE,IAAA,SAAE,GAAE;gBACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACpC,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE;oBACJ,kDAAkD;oBAClD,sCAAsC;oBACtC,mCAAmC;oBACnC,wDAAwD;iBACzD,CAAC,IAAI,CAAC,GAAG,CAAC;aACZ;SACF,CAAC;IACJ,OAAO;QACL;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE;gBACJ,4CAA4C;gBAC5C,mCAAmC;gBACnC,8CAA8C;aAC/C,CAAC,IAAI,CAAC,GAAG,CAAC;SACZ;KACF,CAAC;AACJ,CAAC,CAAC;AAvEW,QAAA,sBAAsB,0BAuEjC"}
|
|
@@ -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>;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
-
import { v4 } from "uuid";
|
|
3
|
-
|
|
4
|
-
import { AutoBeState } from "../../../context/AutoBeState";
|
|
5
|
-
|
|
6
|
-
export const transformTestHistories = (
|
|
7
|
-
state: AutoBeState,
|
|
8
|
-
): Array<
|
|
9
|
-
IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage
|
|
10
|
-
> => {
|
|
11
|
-
if (state.analyze === null)
|
|
12
|
-
return [
|
|
13
|
-
{
|
|
14
|
-
id: v4(),
|
|
15
|
-
created_at: new Date().toISOString(),
|
|
16
|
-
type: "systemMessage",
|
|
17
|
-
text: [
|
|
18
|
-
"Requirement analysis is not yet completed.",
|
|
19
|
-
"Don't call the any tool function,",
|
|
20
|
-
"but say to process the requirement analysis.",
|
|
21
|
-
].join(" "),
|
|
22
|
-
},
|
|
23
|
-
];
|
|
24
|
-
else if (state.prisma === null)
|
|
25
|
-
return [
|
|
26
|
-
{
|
|
27
|
-
id: v4(),
|
|
28
|
-
created_at: new Date().toISOString(),
|
|
29
|
-
type: "systemMessage",
|
|
30
|
-
text: [
|
|
31
|
-
"Prisma DB schema generation is not yet completed.",
|
|
32
|
-
"Don't call the any tool function,",
|
|
33
|
-
"but say to process the Prisma DB schema generation.",
|
|
34
|
-
].join(" "),
|
|
35
|
-
},
|
|
36
|
-
];
|
|
37
|
-
else if (state.analyze.step !== state.prisma.step)
|
|
38
|
-
return [
|
|
39
|
-
{
|
|
40
|
-
id: v4(),
|
|
41
|
-
created_at: new Date().toISOString(),
|
|
42
|
-
type: "systemMessage",
|
|
43
|
-
text: [
|
|
44
|
-
"Prisma DB schema generation has not been updated",
|
|
45
|
-
"for the latest requirement analysis.",
|
|
46
|
-
"Don't call the any tool function,",
|
|
47
|
-
"but say to re-process the Prisma DB schema generation.",
|
|
48
|
-
].join(" "),
|
|
49
|
-
},
|
|
50
|
-
];
|
|
51
|
-
else if (state.prisma.compiled.type !== "success")
|
|
52
|
-
return [
|
|
53
|
-
{
|
|
54
|
-
id: v4(),
|
|
55
|
-
created_at: new Date().toISOString(),
|
|
56
|
-
type: "systemMessage",
|
|
57
|
-
text: [
|
|
58
|
-
"Prisma DB schema generation has not been updated",
|
|
59
|
-
"for the latest requirement analysis.",
|
|
60
|
-
"Don't call the any tool function,",
|
|
61
|
-
"but say to re-process the Prisma DB schema generation.",
|
|
62
|
-
].join(" "),
|
|
63
|
-
},
|
|
64
|
-
];
|
|
65
|
-
return [
|
|
66
|
-
{
|
|
67
|
-
id: v4(),
|
|
68
|
-
created_at: new Date().toISOString(),
|
|
69
|
-
type: "systemMessage",
|
|
70
|
-
text: [
|
|
71
|
-
"Interface generation is not yet completed.",
|
|
72
|
-
"Don't call the any tool function,",
|
|
73
|
-
"but say to process the interface generation.",
|
|
74
|
-
].join(" "),
|
|
75
|
-
},
|
|
76
|
-
];
|
|
77
|
-
};
|