@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
|
@@ -0,0 +1,6 @@
|
|
|
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 transformAnalyzeReviewHistories: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, scenario: AutoBeAnalyzeScenarioEvent, allFiles: AutoBeAnalyzeFile[], myFile: AutoBeAnalyzeFile) => Array<IAgenticaHistoryJson.IUserMessage | IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
|
|
@@ -2,4 +2,10 @@ import { AutoBeAnalyzeReviewEvent, AutoBeAnalyzeScenarioEvent, AutoBeProgressEve
|
|
|
2
2
|
import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
|
|
3
3
|
import { ILlmSchema } from "@samchon/openapi";
|
|
4
4
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
5
|
-
export declare const orchestrateAnalyzeReview: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>,
|
|
5
|
+
export declare const orchestrateAnalyzeReview: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
|
|
6
|
+
scenario: AutoBeAnalyzeScenarioEvent;
|
|
7
|
+
allFiles: AutoBeAnalyzeFile[];
|
|
8
|
+
myFile: AutoBeAnalyzeFile;
|
|
9
|
+
progress: AutoBeProgressEventBase;
|
|
10
|
+
promptCacheKey: string;
|
|
11
|
+
}) => Promise<AutoBeAnalyzeReviewEvent>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { AutoBeAnalyzeScenarioEvent, AutoBeAnalyzeWriteEvent } from "@autobe/interface";
|
|
1
|
+
import { AutoBeAnalyzeScenarioEvent, AutoBeAnalyzeWriteEvent, AutoBeProgressEventBase } from "@autobe/interface";
|
|
2
2
|
import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
|
|
3
3
|
import { ILlmSchema } from "@samchon/openapi";
|
|
4
4
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
5
|
-
export declare const orchestrateAnalyzeWrite: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>,
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
export declare const orchestrateAnalyzeWrite: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
|
|
6
|
+
scenario: AutoBeAnalyzeScenarioEvent;
|
|
7
|
+
file: AutoBeAnalyzeFile.Scenario;
|
|
8
|
+
progress: AutoBeProgressEventBase;
|
|
9
|
+
promptCacheKey: string;
|
|
8
10
|
}) => Promise<AutoBeAnalyzeWriteEvent>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
+
import { AutoBeOpenApi } from "@autobe/interface";
|
|
3
|
+
import { AutoBeState } from "../../../context/AutoBeState";
|
|
4
|
+
export declare const transformInterfaceEndpointsReviewHistories: (state: AutoBeState, endpoints: AutoBeOpenApi.IEndpoint[]) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IAgenticaController } from "@agentica/core";
|
|
2
|
+
import { AutoBeOpenApi } from "@autobe/interface";
|
|
3
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
4
|
+
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
5
|
+
import { IAutoBeInterfaceEndpointsReviewApplication } from "./structures/IAutoBeInterfaceEndpointsReviewApplication";
|
|
6
|
+
export declare function orchestrateInterfaceEndpointsReview<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, endpoints: AutoBeOpenApi.IEndpoint[], message?: string): Promise<AutoBeOpenApi.IEndpoint[]>;
|
|
7
|
+
export declare function createController<Model extends ILlmSchema.Model>(props: {
|
|
8
|
+
model: Model;
|
|
9
|
+
build: (props: IAutoBeInterfaceEndpointsReviewApplication.IProps) => void;
|
|
10
|
+
}): IAgenticaController.IClass<Model>;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { AutoBeOpenApi } from "@autobe/interface";
|
|
1
|
+
import { AutoBeOpenApi, AutoBeProgressEventBase } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
|
-
export declare function orchestrateInterfaceSchemasReview<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, operations: AutoBeOpenApi.IOperation[], schemas: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>, progress:
|
|
5
|
-
total: number;
|
|
6
|
-
completed: number;
|
|
7
|
-
}): Promise<Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>>;
|
|
4
|
+
export declare function orchestrateInterfaceSchemasReview<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, operations: AutoBeOpenApi.IOperation[], schemas: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>, progress: AutoBeProgressEventBase): Promise<Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { AutoBeOpenApi } from "@autobe/interface";
|
|
2
|
+
/**
|
|
3
|
+
* Interface for reviewing and refining API endpoints through holistic analysis.
|
|
4
|
+
*
|
|
5
|
+
* This application performs comprehensive review of all endpoints generated
|
|
6
|
+
* through divide-and-conquer strategy, ensuring consistency, eliminating
|
|
7
|
+
* redundancy, and preventing over-engineering across the entire API surface.
|
|
8
|
+
*/
|
|
9
|
+
export interface IAutoBeInterfaceEndpointsReviewApplication {
|
|
10
|
+
/**
|
|
11
|
+
* Reviews and refines the complete collection of API endpoints.
|
|
12
|
+
*
|
|
13
|
+
* This method consolidates all endpoints generated independently by different
|
|
14
|
+
* groups and performs holistic review to:
|
|
15
|
+
* - Ensure naming consistency across all endpoints
|
|
16
|
+
* - Remove duplicate or overlapping endpoints
|
|
17
|
+
* - Eliminate over-engineered solutions
|
|
18
|
+
* - Standardize path structures and HTTP methods
|
|
19
|
+
* - Verify REST API design principles
|
|
20
|
+
*
|
|
21
|
+
* The review process examines the entire API as a cohesive system rather
|
|
22
|
+
* than individual endpoints, ensuring the final API is intuitive, maintainable,
|
|
23
|
+
* and follows best practices.
|
|
24
|
+
*
|
|
25
|
+
* @param next - The review results and refined endpoint collection
|
|
26
|
+
*/
|
|
27
|
+
reviewEndpoints(next: IAutoBeInterfaceEndpointsReviewApplication.IProps): void;
|
|
28
|
+
}
|
|
29
|
+
export declare namespace IAutoBeInterfaceEndpointsReviewApplication {
|
|
30
|
+
interface IProps {
|
|
31
|
+
/**
|
|
32
|
+
* Comprehensive review analysis of all collected endpoints.
|
|
33
|
+
*
|
|
34
|
+
* Contains detailed findings from the holistic review including:
|
|
35
|
+
* - Identified inconsistencies in naming conventions
|
|
36
|
+
* - Duplicate endpoints that serve the same purpose
|
|
37
|
+
* - Over-engineered solutions that add unnecessary complexity
|
|
38
|
+
* - Violations of REST API design principles
|
|
39
|
+
* - Recommendations for improvement and standardization
|
|
40
|
+
*
|
|
41
|
+
* The review provides actionable feedback for creating a clean,
|
|
42
|
+
* consistent, and maintainable API structure.
|
|
43
|
+
*/
|
|
44
|
+
review: string;
|
|
45
|
+
/**
|
|
46
|
+
* Refined collection of API endpoints after review and cleanup.
|
|
47
|
+
*
|
|
48
|
+
* The final optimized set of endpoints after:
|
|
49
|
+
* - Removing duplicates and redundant endpoints
|
|
50
|
+
* - Standardizing naming conventions across all paths
|
|
51
|
+
* - Simplifying over-engineered solutions
|
|
52
|
+
* - Ensuring consistent REST patterns
|
|
53
|
+
* - Aligning HTTP methods with their semantic meanings
|
|
54
|
+
*
|
|
55
|
+
* This collection represents the production-ready API structure
|
|
56
|
+
* that balances functionality with simplicity and maintainability.
|
|
57
|
+
*/
|
|
58
|
+
endpoints: AutoBeOpenApi.IEndpoint[];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -85,6 +85,44 @@ export declare namespace IAutoBeInterfaceOperationApplication {
|
|
|
85
85
|
* ```
|
|
86
86
|
*/
|
|
87
87
|
interface IOperation extends Omit<AutoBeOpenApi.IOperation, "authorizationRole" | "authorizationType"> {
|
|
88
|
+
/**
|
|
89
|
+
* Prisma schema models relevant to this operation.
|
|
90
|
+
*
|
|
91
|
+
* Contains the complete Prisma schema definitions for all entities involved
|
|
92
|
+
* in this operation, including their fields, relations, and database
|
|
93
|
+
* constraints. This enables comprehensive validation and schema-aware
|
|
94
|
+
* operation design.
|
|
95
|
+
*
|
|
96
|
+
* The schema information serves multiple critical purposes:
|
|
97
|
+
*
|
|
98
|
+
* - **Field Verification**: Ensures all referenced fields actually exist in
|
|
99
|
+
* the database schema and have the correct types
|
|
100
|
+
* - **Relationship Validation**: Confirms that entity relationships are
|
|
101
|
+
* properly defined and can support the operation's data access patterns
|
|
102
|
+
* - **Soft-Delete Detection**: For DELETE operations, identifies whether
|
|
103
|
+
* entities have soft-delete fields (deleted_at, is_deleted, etc.) to
|
|
104
|
+
* determine if the operation should perform logical deletion instead of
|
|
105
|
+
* physical removal
|
|
106
|
+
* - **Constraint Awareness**: Understands unique constraints, required
|
|
107
|
+
* fields, and default values to generate accurate request/response
|
|
108
|
+
* schemas
|
|
109
|
+
*
|
|
110
|
+
* Example content might include:
|
|
111
|
+
*
|
|
112
|
+
* ```prisma
|
|
113
|
+
* model User {
|
|
114
|
+
* id String @id @default(uuid())
|
|
115
|
+
* email String @unique
|
|
116
|
+
* name String
|
|
117
|
+
* deleted_at DateTime? // Indicates soft-delete capability
|
|
118
|
+
* posts Post[]
|
|
119
|
+
* }
|
|
120
|
+
* ```
|
|
121
|
+
*
|
|
122
|
+
* This schema context ensures operations are fully aligned with the actual
|
|
123
|
+
* database structure and business logic requirements.
|
|
124
|
+
*/
|
|
125
|
+
prisma_schemas: string;
|
|
88
126
|
/**
|
|
89
127
|
* Authorization roles required to access this API operation.
|
|
90
128
|
*
|
package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts
CHANGED
|
@@ -128,5 +128,83 @@ export declare namespace IAutoBeInterfaceOperationsReviewApplication {
|
|
|
128
128
|
* ```
|
|
129
129
|
*/
|
|
130
130
|
interface IOperation extends Omit<AutoBeOpenApi.IOperation, "authorizationType"> {
|
|
131
|
+
/**
|
|
132
|
+
* Prisma schema models relevant to this operation.
|
|
133
|
+
*
|
|
134
|
+
* Contains the complete Prisma schema definitions for all entities involved
|
|
135
|
+
* in this operation, including their fields, relations, and database
|
|
136
|
+
* constraints. This enables comprehensive validation and schema-aware
|
|
137
|
+
* operation design.
|
|
138
|
+
*
|
|
139
|
+
* The schema information serves multiple critical purposes:
|
|
140
|
+
*
|
|
141
|
+
* - **Field Verification**: Ensures all referenced fields actually exist in
|
|
142
|
+
* the database schema and have the correct types
|
|
143
|
+
* - **Relationship Validation**: Confirms that entity relationships are
|
|
144
|
+
* properly defined and can support the operation's data access patterns
|
|
145
|
+
* - **Soft-Delete Detection**: For DELETE operations, identifies whether
|
|
146
|
+
* entities have soft-delete fields (deleted_at, is_deleted, etc.) to
|
|
147
|
+
* determine if the operation should perform logical deletion instead of
|
|
148
|
+
* physical removal
|
|
149
|
+
* - **Constraint Awareness**: Understands unique constraints, required
|
|
150
|
+
* fields, and default values to generate accurate request/response
|
|
151
|
+
* schemas
|
|
152
|
+
*
|
|
153
|
+
* Example content might include:
|
|
154
|
+
*
|
|
155
|
+
* ```prisma
|
|
156
|
+
* model User {
|
|
157
|
+
* id String @id @default(uuid())
|
|
158
|
+
* email String @unique
|
|
159
|
+
* name String
|
|
160
|
+
* deleted_at DateTime? // Indicates soft-delete capability
|
|
161
|
+
* posts Post[]
|
|
162
|
+
* }
|
|
163
|
+
* ```
|
|
164
|
+
*
|
|
165
|
+
* This schema context ensures operations are fully aligned with the actual
|
|
166
|
+
* database structure and business logic requirements.
|
|
167
|
+
*/
|
|
168
|
+
prisma_schemas: string;
|
|
169
|
+
/**
|
|
170
|
+
* Primary Prisma model name for this operation.
|
|
171
|
+
*
|
|
172
|
+
* Identifies the main database table/model that this operation targets.
|
|
173
|
+
* This must match exactly with the Prisma model name defined in the schema.
|
|
174
|
+
* When soft deletion is specified, this model name indicates which table
|
|
175
|
+
* should be soft-deleted.
|
|
176
|
+
*
|
|
177
|
+
* For example:
|
|
178
|
+
* - In a "GET /users/:id" operation, this would be "User"
|
|
179
|
+
* - In a "POST /articles" operation, this would be "Article"
|
|
180
|
+
* - In a "DELETE /comments/:id" with soft delete, this specifies the "Comment" model to soft-delete
|
|
181
|
+
*
|
|
182
|
+
* This property is essential for:
|
|
183
|
+
* - Determining the primary entity for CRUD operations
|
|
184
|
+
* - Identifying which table to apply soft deletion to
|
|
185
|
+
* - Validating operations against the correct Prisma model
|
|
186
|
+
* - Generating appropriate database queries and validations
|
|
187
|
+
*/
|
|
188
|
+
model_name: string;
|
|
189
|
+
/**
|
|
190
|
+
* Soft delete column name for the Prisma models.
|
|
191
|
+
*
|
|
192
|
+
* Specifies the column name used for soft deletion in the database tables
|
|
193
|
+
* associated with this operation. When set to a non-null value, it indicates
|
|
194
|
+
* that the related entities support soft deletion through this column
|
|
195
|
+
* (typically a timestamp field like `deleted_at` or `deletedAt`).
|
|
196
|
+
*
|
|
197
|
+
* When null, it means the entities involved in this operation use hard
|
|
198
|
+
* deletion or don't support deletion at all. This information is crucial
|
|
199
|
+
* for generating appropriate CRUD operations and ensuring data integrity
|
|
200
|
+
* policies are correctly implemented.
|
|
201
|
+
*
|
|
202
|
+
* Common soft delete patterns:
|
|
203
|
+
* - `"deleted_at"`: Records deletion timestamp
|
|
204
|
+
* - `"deletedAt"`: Camel-cased deletion timestamp
|
|
205
|
+
* - `"is_deleted"`: Boolean flag for deletion status
|
|
206
|
+
* - `null`: No soft deletion (hard delete only)
|
|
207
|
+
*/
|
|
208
|
+
soft_delete_column: string | null;
|
|
131
209
|
}
|
|
132
210
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AutoBeRealizeAuthorization, AutoBeRealizeFunction, IAutoBeTypeScriptCompileResult } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
4
|
-
export declare function
|
|
4
|
+
export declare function compileRealizeFiles<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
|
|
5
5
|
authorizations: AutoBeRealizeAuthorization[];
|
|
6
6
|
functions: AutoBeRealizeFunction[];
|
|
7
7
|
}): Promise<IAutoBeTypeScriptCompileResult>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AutoBeRealizeAuthorization, AutoBeRealizeCorrectEvent, IAutoBeTypeScriptCompileResult } from "@autobe/interface";
|
|
1
|
+
import { AutoBeProgressEventBase, AutoBeRealizeAuthorization, AutoBeRealizeCorrectEvent, IAutoBeTypeScriptCompileResult } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
4
|
import { IAutoBeRealizeScenarioApplication } from "./structures/IAutoBeRealizeScenarioApplication";
|
|
@@ -8,9 +8,5 @@ export declare function orchestrateRealizeCorrect<Model extends ILlmSchema.Model
|
|
|
8
8
|
scenario: IAutoBeRealizeScenarioApplication.IProps;
|
|
9
9
|
code: string;
|
|
10
10
|
diagnostic: IAutoBeTypeScriptCompileResult.IDiagnostic;
|
|
11
|
-
progress:
|
|
11
|
+
progress: AutoBeProgressEventBase;
|
|
12
12
|
}): Promise<AutoBeRealizeCorrectEvent>;
|
|
13
|
-
export interface IProgress {
|
|
14
|
-
total: number;
|
|
15
|
-
completed: number;
|
|
16
|
-
}
|
|
@@ -2,72 +2,6 @@ import { AutoBeOpenApi, AutoBeRealizeAuthorization } from "@autobe/interface";
|
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
4
|
import { IAutoBeRealizeScenarioApplication } from "./structures/IAutoBeRealizeScenarioApplication";
|
|
5
|
-
export interface IAutoBeRealizeScenario {
|
|
6
|
-
/**
|
|
7
|
-
* The name of the function to be generated.
|
|
8
|
-
*
|
|
9
|
-
* Derived from the Swagger path and method. The function name must be written
|
|
10
|
-
* in snake_case. It serves as the entry point in both code generation and
|
|
11
|
-
* test code.
|
|
12
|
-
*
|
|
13
|
-
* Once the function is generated, the function name and file name will be the
|
|
14
|
-
* same. The generated file will be located at
|
|
15
|
-
* `src/providers/${function_name}.ts`.
|
|
16
|
-
*/
|
|
17
|
-
functionName: string;
|
|
18
|
-
/**
|
|
19
|
-
* Definition of path and query parameters extracted from the OpenAPI spec.
|
|
20
|
-
*
|
|
21
|
-
* Includes input values passed via URL path or query string. Used for type
|
|
22
|
-
* definitions, validation, and function signature construction.
|
|
23
|
-
*/
|
|
24
|
-
parameters: AutoBeOpenApi.IParameter[];
|
|
25
|
-
/**
|
|
26
|
-
* Schema definition for the request body input.
|
|
27
|
-
*
|
|
28
|
-
* Extracted from the requestBody section of Swagger. Represents the input
|
|
29
|
-
* data passed in the body (e.g., JSON). Used for generating function
|
|
30
|
-
* arguments or DTOs.
|
|
31
|
-
*/
|
|
32
|
-
inputSchema: AutoBeOpenApi.IRequestBody | null;
|
|
33
|
-
/**
|
|
34
|
-
* Schema definition for the response body.
|
|
35
|
-
*
|
|
36
|
-
* Extracted from the responses section of Swagger. Used to define the return
|
|
37
|
-
* type and expected output in test code.
|
|
38
|
-
*/
|
|
39
|
-
outputSchema: AutoBeOpenApi.IResponseBody | null;
|
|
40
|
-
/**
|
|
41
|
-
* Natural language description of the function’s purpose.
|
|
42
|
-
*
|
|
43
|
-
* Extracted from the summary or description field of Swagger. Used for code
|
|
44
|
-
* documentation, test scenario generation, and conveying function intent.
|
|
45
|
-
*/
|
|
46
|
-
description: string;
|
|
47
|
-
/**
|
|
48
|
-
* HTTP method information.
|
|
49
|
-
*
|
|
50
|
-
* Extracted from the Swagger operation method. Used to define the request
|
|
51
|
-
* type during code and test generation.
|
|
52
|
-
*/
|
|
53
|
-
method: "get" | "post" | "put" | "delete" | "patch";
|
|
54
|
-
/**
|
|
55
|
-
* List of scenario descriptions for test code generation.
|
|
56
|
-
*
|
|
57
|
-
* Each scenario describes the expected behavior of the function under certain
|
|
58
|
-
* conditions. Used as a basis for TDD-style automated test generation.
|
|
59
|
-
*/
|
|
60
|
-
testScenarios: string[];
|
|
61
|
-
/**
|
|
62
|
-
* Optional decorator event for customizing code generation behavior.
|
|
63
|
-
*
|
|
64
|
-
* Provides additional metadata or instructions that can modify how the
|
|
65
|
-
* function implementation is generated. Can include custom annotations,
|
|
66
|
-
* middleware configurations, or special handling directives that affect the
|
|
67
|
-
* final code output.
|
|
68
|
-
*/
|
|
69
|
-
decoratorEvent?: AutoBeRealizeAuthorization;
|
|
70
|
-
}
|
|
71
5
|
/**
|
|
72
6
|
* Generates a planning result that defines what kind of function should be
|
|
73
7
|
* created, based solely on the provided Swagger (OpenAPI) operation — without
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AutoBeRealizeAuthorization, AutoBeRealizeWriteEvent } from "@autobe/interface";
|
|
1
|
+
import { AutoBeProgressEventBase, AutoBeRealizeAuthorization, AutoBeRealizeWriteEvent } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
4
|
import { IAutoBeRealizeScenarioApplication } from "./structures/IAutoBeRealizeScenarioApplication";
|
|
@@ -6,9 +6,6 @@ export declare function orchestrateRealizeWrite<Model extends ILlmSchema.Model>(
|
|
|
6
6
|
totalAuthorizations: AutoBeRealizeAuthorization[];
|
|
7
7
|
authorization: AutoBeRealizeAuthorization | null;
|
|
8
8
|
scenario: IAutoBeRealizeScenarioApplication.IProps;
|
|
9
|
-
progress:
|
|
9
|
+
progress: AutoBeProgressEventBase;
|
|
10
|
+
promptCacheKey: string;
|
|
10
11
|
}): Promise<AutoBeRealizeWriteEvent>;
|
|
11
|
-
export interface IProgress {
|
|
12
|
-
total: number;
|
|
13
|
-
completed: number;
|
|
14
|
-
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AutoBeOpenApi, AutoBeRealizeAuthorization } from "@autobe/interface";
|
|
1
|
+
import { AutoBeOpenApi, AutoBeRealizeAuthorization, AutoBeTestFile } from "@autobe/interface";
|
|
2
2
|
export declare namespace IAutoBeRealizeScenarioApplication {
|
|
3
3
|
interface IProps {
|
|
4
4
|
/** The OpenAPI operation to be realized. */
|
|
@@ -24,7 +24,7 @@ export declare namespace IAutoBeRealizeScenarioApplication {
|
|
|
24
24
|
* certain conditions. Used as a basis for TDD-style automated test
|
|
25
25
|
* generation.
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
testFiles: AutoBeTestFile[];
|
|
28
28
|
/**
|
|
29
29
|
* Optional decorator event for customizing code generation behavior.
|
|
30
30
|
*
|
|
@@ -17,13 +17,16 @@ export declare namespace IAutoBeRealizeWriteApplication {
|
|
|
17
17
|
* 📋 STEP 1 - PRISMA SCHEMA VERIFICATION:
|
|
18
18
|
*
|
|
19
19
|
* DO:
|
|
20
|
+
*
|
|
20
21
|
* - Examine the actual Prisma schema model definition
|
|
21
22
|
* - List EVERY field that exists in the model with exact types
|
|
22
23
|
* - Explicitly note fields that DO NOT exist
|
|
23
24
|
*
|
|
24
25
|
* DO NOT:
|
|
26
|
+
*
|
|
25
27
|
* - Assume common fields exist without verification
|
|
26
|
-
* - Use fields like deleted_at, created_by, updated_by, is_deleted, is_active
|
|
28
|
+
* - Use fields like deleted_at, created_by, updated_by, is_deleted, is_active
|
|
29
|
+
* without checking
|
|
27
30
|
*
|
|
28
31
|
* 📋 STEP 2 - FIELD INVENTORY:
|
|
29
32
|
*
|
|
@@ -171,10 +174,12 @@ export declare namespace IAutoBeRealizeWriteApplication {
|
|
|
171
174
|
* Import rules:
|
|
172
175
|
*
|
|
173
176
|
* DO NOT:
|
|
177
|
+
*
|
|
174
178
|
* - Add any new import statements manually
|
|
175
179
|
* - Write import statements directly (this causes compile errors)
|
|
176
180
|
*
|
|
177
|
-
* Note: All necessary imports are provided globally or by the system
|
|
181
|
+
* Note: All necessary imports are provided globally or by the system
|
|
182
|
+
* automatically.
|
|
178
183
|
*
|
|
179
184
|
* ✅ Requirements:
|
|
180
185
|
*
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
2
|
import { IAutoBeTypeScriptCompileResult } from "@autobe/interface";
|
|
3
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
4
|
+
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
3
5
|
import { IAutoBeTestFunction } from "../structures/IAutoBeTestFunction";
|
|
4
|
-
export declare const transformTestCorrectHistories: (func: IAutoBeTestFunction, failure: IAutoBeTypeScriptCompileResult.IFailure) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage
|
|
6
|
+
export declare const transformTestCorrectHistories: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, func: IAutoBeTestFunction, failure: IAutoBeTypeScriptCompileResult.IFailure) => Promise<Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
2
|
import { AutoBeTestScenario } from "@autobe/interface";
|
|
3
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
4
|
+
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
3
5
|
import { IAutoBeTestScenarioArtifacts } from "../structures/IAutoBeTestScenarioArtifacts";
|
|
4
|
-
export declare function transformTestWriteHistories(scenario: AutoBeTestScenario, artifacts: IAutoBeTestScenarioArtifacts): Array<IAgenticaHistoryJson.ISystemMessage
|
|
6
|
+
export declare function transformTestWriteHistories<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, scenario: AutoBeTestScenario, artifacts: IAutoBeTestScenarioArtifacts): Promise<Array<IAgenticaHistoryJson.ISystemMessage | IAgenticaHistoryJson.IAssistantMessage>>;
|
|
5
7
|
export declare namespace transformTestWriteHistories {
|
|
6
8
|
function structures(artifacts: IAutoBeTestScenarioArtifacts): string;
|
|
7
9
|
function functional(artifacts: IAutoBeTestScenarioArtifacts): string;
|
|
@@ -67,8 +67,8 @@ export declare namespace IAutoBeTestCorrectApplication {
|
|
|
67
67
|
* AI generates the first corrected version of the test code based on error
|
|
68
68
|
* analysis and correction strategies. This draft addresses all identified
|
|
69
69
|
* compilation errors while preserving the original business logic and test
|
|
70
|
-
* workflow. The code is compilation-error-free and follows all
|
|
71
|
-
*
|
|
70
|
+
* workflow. The code is compilation-error-free and follows all established
|
|
71
|
+
* conventions.
|
|
72
72
|
*
|
|
73
73
|
* The implementation incorporates lessons learned from error analysis to
|
|
74
74
|
* produce properly typed, syntactically correct code that maintains the
|
|
@@ -28,6 +28,18 @@ export declare namespace IAutoBeTestScenarioApplication {
|
|
|
28
28
|
*
|
|
29
29
|
* Each scenario represents a specific test case for the same `path` and
|
|
30
30
|
* `method`.
|
|
31
|
+
*
|
|
32
|
+
* IMPORTANT: Each scenario must be actually implementable. A scenario's
|
|
33
|
+
* implementability is determined by the existence of ALL APIs (endpoints)
|
|
34
|
+
* required to test it. This includes not only the primary endpoint being
|
|
35
|
+
* tested, but also ALL dependency endpoints needed for setup,
|
|
36
|
+
* authentication, and data preparation. If even one required dependency API
|
|
37
|
+
* is missing from the available operations, the scenario cannot be
|
|
38
|
+
* implemented and should not be generated.
|
|
39
|
+
*
|
|
40
|
+
* Example: A "test banned user login" scenario requires both a login API
|
|
41
|
+
* AND a ban user API. If the ban API doesn't exist, this scenario is not
|
|
42
|
+
* implementable regardless of database schema fields.
|
|
31
43
|
*/
|
|
32
44
|
scenarios: IScenario[] & tags.MinItems<1>;
|
|
33
45
|
}
|
|
@@ -37,6 +49,11 @@ export declare namespace IAutoBeTestScenarioApplication {
|
|
|
37
49
|
* This interface defines a structured, user-centric test draft that includes
|
|
38
50
|
* a descriptive function name, a detailed scenario draft, and logical
|
|
39
51
|
* dependencies on other endpoints required for context or setup.
|
|
52
|
+
*
|
|
53
|
+
* CRITICAL: All referenced endpoints MUST exist in the provided API
|
|
54
|
+
* operations. Do NOT create scenarios for non-existent APIs, even if database
|
|
55
|
+
* schema fields suggest their existence. Test scenarios must be implementable
|
|
56
|
+
* with available APIs only.
|
|
40
57
|
*/
|
|
41
58
|
interface IScenario {
|
|
42
59
|
/**
|
|
@@ -113,11 +130,21 @@ export declare namespace IAutoBeTestScenarioApplication {
|
|
|
113
130
|
* authentication, resource creation, or data setup, that are relevant to
|
|
114
131
|
* the test. This list is not a strict execution order — if ordering is
|
|
115
132
|
* important, it must be described explicitly in the `purpose`.
|
|
133
|
+
*
|
|
134
|
+
* WARNING: Every endpoint referenced here MUST exist in the provided API
|
|
135
|
+
* operations. Do NOT reference endpoints that are not explicitly available,
|
|
136
|
+
* even if they seem logically necessary based on database schema or
|
|
137
|
+
* business logic.
|
|
116
138
|
*/
|
|
117
139
|
dependencies: IDependencies[];
|
|
118
140
|
}
|
|
119
141
|
interface IDependencies {
|
|
120
|
-
/**
|
|
142
|
+
/**
|
|
143
|
+
* Target API endpoint that this scenario depends on.
|
|
144
|
+
*
|
|
145
|
+
* This endpoint MUST exist in the available API operations list.
|
|
146
|
+
* Non-existent endpoints will cause test implementation failures.
|
|
147
|
+
*/
|
|
121
148
|
endpoint: AutoBeOpenApi.IEndpoint;
|
|
122
149
|
/**
|
|
123
150
|
* A concise explanation of why this API call is relevant or required for
|
|
@@ -32,8 +32,8 @@ export declare namespace IAutoBeTestWriteApplication {
|
|
|
32
32
|
*
|
|
33
33
|
* AI determines the appropriate domain category based on the scenario
|
|
34
34
|
* analysis. This classification drives file structure, test categorization,
|
|
35
|
-
* and logical grouping. The domain must be a single, lowercase word
|
|
36
|
-
* represents the primary API resource.
|
|
35
|
+
* and logical grouping. The domain must be a single, lowercase word in
|
|
36
|
+
* snake_case format that represents the primary API resource.
|
|
37
37
|
*
|
|
38
38
|
* Workflow: Scenario analysis → Domain identification → Test organization
|
|
39
39
|
* structure
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const executeCachedBatch: <T>(tasks: Array<(user: string) => Promise<T>>, promptCacheKey?: string) => Promise<T[]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autobe/agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"description": "AI backend server code generator",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"author": "Wrtn Technologies",
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
"README.md"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@agentica/core": "
|
|
23
|
+
"@agentica/core": "0.32.3-dev.3",
|
|
24
24
|
"@prisma/internals": "^6.7.0",
|
|
25
25
|
"@samchon/openapi": "^4.7.1",
|
|
26
26
|
"openai": "^5.12.2",
|
|
27
27
|
"tstl": "^3.0.0",
|
|
28
|
-
"typia": "^9.7.
|
|
28
|
+
"typia": "^9.7.2",
|
|
29
29
|
"uuid": "^11.1.0",
|
|
30
|
-
"@autobe/
|
|
31
|
-
"@autobe/
|
|
30
|
+
"@autobe/utils": "^0.21.0",
|
|
31
|
+
"@autobe/interface": "^0.21.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@rollup/plugin-json": "^6.1.0",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"ts-node": "^10.9.2",
|
|
41
41
|
"ts-patch": "^3.3.0",
|
|
42
42
|
"typescript": "~5.9.2",
|
|
43
|
-
"@autobe/filesystem": "^0.
|
|
44
|
-
"@autobe/compiler": "^0.
|
|
43
|
+
"@autobe/filesystem": "^0.21.0",
|
|
44
|
+
"@autobe/compiler": "^0.21.0"
|
|
45
45
|
},
|
|
46
46
|
"keywords": [
|
|
47
47
|
"ai",
|
package/src/AutoBeAgent.ts
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "@autobe/interface";
|
|
14
14
|
import { ILlmSchema } from "@samchon/openapi";
|
|
15
15
|
import { Semaphore, Singleton } from "tstl";
|
|
16
|
-
import {
|
|
16
|
+
import { v7 } from "uuid";
|
|
17
17
|
|
|
18
18
|
import { AutoBeAgentBase } from "./AutoBeAgentBase";
|
|
19
19
|
import { AutoBeContext } from "./context/AutoBeContext";
|
|
@@ -202,7 +202,7 @@ export class AutoBeAgent<Model extends ILlmSchema.Model>
|
|
|
202
202
|
this.agentica_.on("assistantMessage", async (message) => {
|
|
203
203
|
const start = new Date();
|
|
204
204
|
const history: AutoBeAssistantMessageHistory = {
|
|
205
|
-
id:
|
|
205
|
+
id: v7(),
|
|
206
206
|
type: "assistantMessage",
|
|
207
207
|
text: await message.join(),
|
|
208
208
|
created_at: start.toISOString(),
|
|
@@ -212,6 +212,7 @@ export class AutoBeAgent<Model extends ILlmSchema.Model>
|
|
|
212
212
|
this.histories_.push(history);
|
|
213
213
|
this.dispatch({
|
|
214
214
|
type: "assistantMessage",
|
|
215
|
+
id: history.id,
|
|
215
216
|
text: history.text,
|
|
216
217
|
created_at: history.created_at,
|
|
217
218
|
}).catch(() => {});
|
|
@@ -253,7 +254,7 @@ export class AutoBeAgent<Model extends ILlmSchema.Model>
|
|
|
253
254
|
): Promise<AutoBeHistory[]> {
|
|
254
255
|
const index: number = this.histories_.length;
|
|
255
256
|
const userMessageHistory: AutoBeUserMessageHistory = {
|
|
256
|
-
id:
|
|
257
|
+
id: v7(),
|
|
257
258
|
type: "userMessage",
|
|
258
259
|
contents:
|
|
259
260
|
typeof content === "string"
|
package/src/AutoBeMockAgent.ts
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
IAutoBePlaygroundReplay,
|
|
12
12
|
} from "@autobe/interface";
|
|
13
13
|
import { Singleton, randint, sleep_for } from "tstl";
|
|
14
|
-
import {
|
|
14
|
+
import { v7 } from "uuid";
|
|
15
15
|
|
|
16
16
|
import { AutoBeAgentBase } from "./AutoBeAgentBase";
|
|
17
17
|
import { AutoBeState } from "./context/AutoBeState";
|
|
@@ -50,7 +50,7 @@ export class AutoBeMockAgent extends AutoBeAgentBase implements IAutoBeAgent {
|
|
|
50
50
|
): Promise<AutoBeHistory[]> {
|
|
51
51
|
// THE USER-MESSAGE
|
|
52
52
|
const userMessage: AutoBeUserMessageHistory = {
|
|
53
|
-
id:
|
|
53
|
+
id: v7(),
|
|
54
54
|
type: "userMessage",
|
|
55
55
|
contents:
|
|
56
56
|
typeof content === "string"
|
|
@@ -72,7 +72,7 @@ export class AutoBeMockAgent extends AutoBeAgentBase implements IAutoBeAgent {
|
|
|
72
72
|
if (state.realize !== null) {
|
|
73
73
|
await sleep_for(2_000);
|
|
74
74
|
const assistantMessage: AutoBeAssistantMessageHistory = {
|
|
75
|
-
id:
|
|
75
|
+
id: v7(),
|
|
76
76
|
type: "assistantMessage",
|
|
77
77
|
text: [
|
|
78
78
|
"AutoBE has successfully realized the application.",
|
|
@@ -94,7 +94,7 @@ export class AutoBeMockAgent extends AutoBeAgentBase implements IAutoBeAgent {
|
|
|
94
94
|
if (snapshots === null) {
|
|
95
95
|
this.histories_.push(userMessage);
|
|
96
96
|
this.histories_.push({
|
|
97
|
-
id:
|
|
97
|
+
id: v7(),
|
|
98
98
|
type: "assistantMessage",
|
|
99
99
|
text: [
|
|
100
100
|
"The histories are prepared until current state.",
|
|
@@ -175,6 +175,7 @@ const sleepMap: Record<AutoBeEvent.Type, number> = {
|
|
|
175
175
|
interfaceStart: 1_000,
|
|
176
176
|
interfaceGroups: 1_000,
|
|
177
177
|
interfaceEndpoints: 1_000,
|
|
178
|
+
interfaceEndpointsReview: 1_000,
|
|
178
179
|
interfaceOperations: 400,
|
|
179
180
|
interfaceOperationsReview: 400,
|
|
180
181
|
interfaceAuthorization: 400,
|