@autobe/agent 0.16.1 → 0.18.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/AutoBeMockAgent.d.ts +5 -5
- package/lib/agent/src/AutoBeAgent.d.ts +52 -0
- package/lib/{AutoBeAgent.js → agent/src/AutoBeAgent.js} +37 -9
- package/lib/agent/src/AutoBeAgent.js.map +1 -0
- package/lib/agent/src/AutoBeAgentBase.d.ts +18 -0
- package/lib/agent/src/AutoBeAgentBase.js.map +1 -0
- package/lib/agent/src/AutoBeMockAgent.d.ts +15 -0
- package/lib/{AutoBeMockAgent.js → agent/src/AutoBeMockAgent.js} +34 -4
- package/lib/agent/src/AutoBeMockAgent.js.map +1 -0
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +34 -0
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +1 -0
- package/lib/agent/src/context/AutoBeContext.d.ts +41 -0
- package/lib/agent/src/context/AutoBeContext.js.map +1 -0
- package/lib/agent/src/context/AutoBeState.d.ts +8 -0
- package/lib/agent/src/context/AutoBeState.js.map +1 -0
- package/lib/agent/src/context/AutoBeTokenUsage.d.ts +173 -0
- package/lib/agent/src/context/AutoBeTokenUsage.js +188 -0
- package/lib/agent/src/context/AutoBeTokenUsage.js.map +1 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.d.ts +116 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js +137 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js.map +1 -0
- package/lib/agent/src/context/IAutoBeApplication.d.ts +107 -0
- package/lib/agent/src/context/IAutoBeApplication.js.map +1 -0
- package/lib/agent/src/context/IAutoBeApplicationProps.d.ts +4 -0
- package/lib/agent/src/context/IAutoBeApplicationProps.js.map +1 -0
- package/lib/agent/src/context/IAutoBeApplicationResult.d.ts +4 -0
- package/lib/agent/src/context/IAutoBeApplicationResult.js.map +1 -0
- package/lib/agent/src/context/assertSchemaModel.d.ts +2 -0
- package/lib/agent/src/context/assertSchemaModel.js.map +1 -0
- package/lib/agent/src/factory/createAgenticaHistory.d.ts +7 -0
- package/lib/agent/src/factory/createAgenticaHistory.js.map +1 -0
- package/lib/agent/src/factory/createAutoBeApplication.d.ts +7 -0
- package/lib/{factory → agent/src/factory}/createAutoBeApplication.js +1 -1
- package/lib/agent/src/factory/createAutoBeApplication.js.map +1 -0
- package/lib/agent/src/factory/createAutoBeContext.d.ts +19 -0
- package/lib/agent/src/factory/createAutoBeContext.js +214 -0
- package/lib/agent/src/factory/createAutoBeContext.js.map +1 -0
- package/lib/agent/src/factory/createAutoBeState.d.ts +3 -0
- package/lib/agent/src/factory/createAutoBeState.js.map +1 -0
- package/lib/agent/src/factory/getAutoBeGenerated.d.ts +4 -0
- package/lib/{factory → agent/src/factory}/getAutoBeGenerated.js +17 -14
- package/lib/agent/src/factory/getAutoBeGenerated.js.map +1 -0
- package/lib/agent/src/factory/getAutoBeRealizeGenerated.d.ts +7 -0
- package/lib/agent/src/factory/getAutoBeRealizeGenerated.js +27 -0
- package/lib/agent/src/factory/getAutoBeRealizeGenerated.js.map +1 -0
- package/lib/agent/src/factory/index.d.ts +1 -0
- package/lib/agent/src/factory/index.js.map +1 -0
- package/lib/agent/src/index.d.ts +6 -0
- package/lib/{index.js → agent/src/index.js} +1 -0
- package/lib/agent/src/index.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js +46 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +30 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +49 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.d.ts +5 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js +64 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +6 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +265 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.d.ts +4 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +727 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +8 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +242 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +105 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +78 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.js +3 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +70 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.js +3 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.d.ts +2 -0
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.js.map +1 -0
- package/lib/agent/src/orchestrate/index.d.ts +5 -0
- package/lib/agent/src/orchestrate/index.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +34 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +62 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +5 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +49 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +28 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +51 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.d.ts +5 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +35 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +28 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +53 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterface.js +12 -24
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +4 -0
- package/lib/{orchestrate/interface/orchestrateInterfaceOperations.js → agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js} +227 -562
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceComplement.js +20 -32
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceEndpoints.js +40 -41
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceGroups.js +15 -25
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +1768 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +5 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +1317 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceSchemas.js +59 -71
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +7 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +467 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.d.ts +47 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.js +3 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +55 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.d.ts +24 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +108 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +126 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +96 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +75 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +91 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/utils/OpenApiEndpointComparator.d.ts +6 -0
- package/lib/agent/src/orchestrate/interface/utils/OpenApiEndpointComparator.js.map +1 -0
- package/lib/agent/src/orchestrate/internal/IProgress.d.ts +4 -0
- package/lib/agent/src/orchestrate/internal/IProgress.js +3 -0
- package/lib/agent/src/orchestrate/internal/IProgress.js.map +1 -0
- package/lib/{orchestrate/prisma → agent/src/orchestrate/prisma/histories}/transformPrismaComponentsHistories.d.ts +1 -1
- package/lib/{orchestrate/prisma → agent/src/orchestrate/prisma/histories}/transformPrismaComponentsHistories.js +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -0
- package/lib/{orchestrate/prisma → agent/src/orchestrate/prisma/histories}/transformPrismaCorrectHistories.js +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.d.ts +8 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +59 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -0
- package/lib/{orchestrate/prisma → agent/src/orchestrate/prisma/histories}/transformPrismaSchemaHistories.d.ts +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +48 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/prisma/orchestratePrisma.js +37 -40
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/prisma/orchestratePrismaComponent.js +164 -58
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/prisma/orchestratePrismaCorrect.js +130 -92
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.d.ts +5 -0
- package/lib/{orchestrate/prisma/orchestratePrismaSchemas.js → agent/src/orchestrate/prisma/orchestratePrismaReview.js} +197 -328
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.d.ts +5 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js +1625 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.d.ts +121 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.js +3 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.d.ts +142 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.js +3 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.d.ts +105 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.d.ts +99 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.js +3 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/ProviderCodeComparator.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/ProviderCodeComparator.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +40 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +80 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.d.ts +7 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +13 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +32 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +11 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +160 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/internal/compile.d.ts +7 -0
- package/lib/agent/src/orchestrate/realize/internal/compile.js +61 -0
- package/lib/agent/src/orchestrate/realize/internal/compile.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +113 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.d.ts +10 -0
- package/lib/{orchestrate → agent/src/orchestrate}/realize/orchestrateRealizeAuthorization.js +84 -70
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/realize/orchestrateRealizeAuthorizationCorrect.js +66 -52
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +9 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +351 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -0
- package/lib/{orchestrate/realize/orchestrateRealizePlanner.d.ts → agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts} +5 -3
- package/lib/{orchestrate/realize/orchestrateRealizePlanner.js → agent/src/orchestrate/realize/orchestrateRealizeScenario.js} +14 -24
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +9 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +340 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +92 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +27 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +345 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +56 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +2 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.d.ts +79 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +38 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +276 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/AuthorizationFileSystem.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/utils/AuthorizationFileSystem.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.d.ts +4 -0
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/InternalFileSystem.d.ts +8 -0
- package/lib/agent/src/orchestrate/realize/utils/InternalFileSystem.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/ProviderFileSystem.d.ts +3 -0
- package/lib/agent/src/orchestrate/realize/utils/ProviderFileSystem.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/replaceImportStatements.js +1 -0
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.d.ts +2 -0
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/filterTestFileName.d.ts +1 -0
- package/lib/agent/src/orchestrate/test/compile/filterTestFileName.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.d.ts +3 -0
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +5 -0
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -0
- package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestCorrectHistories.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -0
- package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestHistories.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +56 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -0
- package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestWriteHistories.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +179 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/test/orchestrateTest.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/test/orchestrateTest.js +12 -30
- package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/test/orchestrateTestCorrect.js +27 -43
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.d.ts +4 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +858 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/test/orchestrateTestWrite.js +53 -54
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +121 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunction.d.ts +8 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunction.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +134 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.d.ts +7 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +113 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteResult.d.ts +7 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +1 -0
- package/lib/agent/src/structures/IAutoBeConfig.d.ts +73 -0
- package/lib/agent/src/structures/IAutoBeConfig.js.map +1 -0
- package/lib/agent/src/structures/IAutoBeProps.d.ts +109 -0
- package/lib/agent/src/structures/IAutoBeProps.js.map +1 -0
- package/lib/agent/src/structures/IAutoBeVendor.d.ts +87 -0
- package/lib/agent/src/structures/IAutoBeVendor.js.map +1 -0
- package/lib/agent/src/utils/arrayToRecord.d.ts +17 -0
- package/lib/agent/src/utils/arrayToRecord.js.map +1 -0
- package/lib/agent/src/utils/backoffRetry.d.ts +22 -0
- package/lib/agent/src/utils/backoffRetry.js.map +1 -0
- package/lib/agent/src/utils/divideArray.d.ts +4 -0
- package/lib/agent/src/utils/divideArray.js.map +1 -0
- package/lib/agent/src/utils/emplaceMap.d.ts +1 -0
- package/lib/agent/src/utils/emplaceMap.js.map +1 -0
- package/lib/{orchestrate/realize/RealizePipe.d.ts → agent/src/utils/pipe.d.ts} +1 -1
- package/lib/agent/src/utils/pipe.js.map +1 -0
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +19 -17
- package/lib/context/AutoBeContext.d.ts +31 -8
- package/lib/context/AutoBeTokenUsage.d.ts +168 -11
- package/lib/context/AutoBeTokenUsageComponent.d.ts +116 -0
- package/lib/factory/createAutoBeContext.d.ts +19 -0
- package/lib/factory/getAutoBeGenerated.d.ts +1 -1
- package/lib/factory/getAutoBeRealizeGenerated.d.ts +7 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.mjs +10629 -5867
- package/lib/index.mjs.map +1 -1
- package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.d.ts +153 -0
- package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.js +3 -0
- package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.js.map +1 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +4 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +4 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +4 -0
- package/lib/orchestrate/analyze/orchestrateAnalyze.d.ts +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +6 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.d.ts +4 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -12
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +105 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +78 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +70 -0
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +4 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +2 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.d.ts +5 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.d.ts +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +5 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +7 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.d.ts +47 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.d.ts +2 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +6 -2
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +96 -0
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +91 -0
- package/lib/orchestrate/internal/IProgress.d.ts +4 -0
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.d.ts +3 -0
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.d.ts +3 -0
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.d.ts +8 -0
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +3 -0
- package/lib/orchestrate/prisma/orchestratePrisma.d.ts +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaReview.d.ts +5 -0
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.d.ts +1 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.d.ts +121 -0
- package/lib/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.d.ts +142 -0
- package/lib/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.d.ts +105 -0
- package/lib/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.d.ts +99 -0
- package/lib/orchestrate/realize/histories/transformRealizeAuthorization.d.ts +5 -0
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.d.ts +5 -0
- package/lib/orchestrate/realize/histories/transformRealizeCoderHistories.d.ts +7 -0
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +13 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +11 -0
- package/lib/orchestrate/realize/internal/compile.d.ts +7 -0
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +9 -0
- package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +91 -0
- package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +9 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +10 -3
- package/lib/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.d.ts +79 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +38 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +276 -0
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +4 -0
- package/lib/orchestrate/test/histories/transformTestHistories.d.ts +3 -0
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.d.ts +3 -0
- package/lib/orchestrate/test/histories/transformTestWriteHistories.d.ts +8 -0
- package/lib/orchestrate/test/orchestrateTestScenario.d.ts +2 -2
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +25 -24
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -1
- package/package.json +10 -10
- package/src/AutoBeAgent.ts +45 -10
- package/src/AutoBeMockAgent.ts +41 -11
- package/src/constants/AutoBeSystemPromptConstant.ts +19 -17
- package/src/context/AutoBeContext.ts +60 -7
- package/src/context/AutoBeTokenUsage.ts +260 -54
- package/src/context/AutoBeTokenUsageComponent.ts +198 -0
- package/src/factory/createAutoBeApplication.ts +4 -12
- package/src/factory/createAutoBeContext.ts +256 -0
- package/src/factory/getAutoBeGenerated.ts +17 -24
- package/src/factory/getAutoBeRealizeGenerated.ts +30 -0
- package/src/index.ts +1 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.ts +53 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +34 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +56 -0
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +61 -109
- package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +89 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +123 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +51 -52
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +108 -0
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +85 -0
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.ts +71 -0
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +40 -0
- package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +27 -0
- package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +45 -22
- package/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.ts +43 -0
- package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +63 -0
- package/src/orchestrate/interface/orchestrateInterface.ts +14 -23
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +106 -0
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +27 -44
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +28 -34
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +15 -32
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +207 -103
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +84 -0
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +72 -82
- package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +143 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.ts +49 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.ts +2 -1
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +6 -2
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +102 -0
- package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +98 -0
- package/src/orchestrate/internal/IProgress.ts +4 -0
- package/src/orchestrate/prisma/{transformPrismaComponentsHistories.ts → histories/transformPrismaComponentsHistories.ts} +2 -2
- package/src/orchestrate/prisma/{transformPrismaCorrectHistories.ts → histories/transformPrismaCorrectHistories.ts} +1 -1
- package/src/orchestrate/prisma/histories/transformPrismaReviewHistories.ts +66 -0
- package/src/orchestrate/prisma/{transformPrismaSchemaHistories.ts → histories/transformPrismaSchemaHistories.ts} +3 -3
- package/src/orchestrate/prisma/orchestratePrisma.ts +73 -67
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +27 -112
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +100 -202
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +118 -0
- package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +137 -210
- package/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.ts +125 -0
- package/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.ts +144 -0
- package/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.ts +108 -0
- package/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.ts +101 -0
- package/src/orchestrate/realize/{transformRealizeAuthorization.ts → histories/transformRealizeAuthorization.ts} +14 -10
- package/src/orchestrate/realize/{transformRealizeAuthorizationCorrectHistories.ts → histories/transformRealizeAuthorizationCorrectHistories.ts} +9 -7
- package/src/orchestrate/realize/{transformRealizeCoderHistories.ts → histories/transformRealizeCoderHistories.ts} +6 -6
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +47 -0
- package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +184 -0
- package/src/orchestrate/realize/internal/compile.ts +84 -0
- package/src/orchestrate/realize/orchestrateRealize.ts +118 -40
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +45 -57
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +19 -41
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +118 -0
- package/src/orchestrate/realize/{orchestrateRealizePlanner.ts → orchestrateRealizeScenario.ts} +15 -15
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +120 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +11 -3
- package/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.ts +81 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.ts +43 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +282 -0
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +3 -1
- package/src/orchestrate/test/experimental/orchestrateTestCorrect.ast +5 -9
- package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +23 -22
- package/src/orchestrate/test/{transformTestCorrectHistories.ts → histories/transformTestCorrectHistories.ts} +2 -2
- package/src/orchestrate/test/{transformTestHistories.ts → histories/transformTestHistories.ts} +1 -1
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +70 -0
- package/src/orchestrate/test/{transformTestWriteHistories.ts → histories/transformTestWriteHistories.ts} +3 -3
- package/src/orchestrate/test/orchestrateTest.ts +11 -32
- package/src/orchestrate/test/orchestrateTestCorrect.ts +32 -62
- package/src/orchestrate/test/orchestrateTestScenario.ts +95 -158
- package/src/orchestrate/test/orchestrateTestWrite.ts +48 -71
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +25 -24
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +3 -1
- package/lib/AutoBeAgent.js.map +0 -1
- package/lib/AutoBeAgentBase.js.map +0 -1
- package/lib/AutoBeMockAgent.js.map +0 -1
- package/lib/constants/AutoBeSystemPromptConstant.js.map +0 -1
- package/lib/context/AutoBeContext.js.map +0 -1
- package/lib/context/AutoBeState.js.map +0 -1
- package/lib/context/AutoBeTokenUsage.js +0 -61
- package/lib/context/AutoBeTokenUsage.js.map +0 -1
- package/lib/context/IAutoBeApplication.js.map +0 -1
- package/lib/context/IAutoBeApplicationProps.js.map +0 -1
- package/lib/context/IAutoBeApplicationResult.js.map +0 -1
- package/lib/context/assertSchemaModel.js.map +0 -1
- package/lib/factory/createAgenticaHistory.js.map +0 -1
- package/lib/factory/createAutoBeApplication.js.map +0 -1
- package/lib/factory/createAutoBeState.js.map +0 -1
- package/lib/factory/getAutoBeGenerated.js.map +0 -1
- package/lib/factory/index.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.d.ts +0 -45
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js +0 -27
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js.map +0 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzePointer.d.ts +0 -9
- package/lib/orchestrate/analyze/AutoBeAnalyzePointer.js +0 -3
- package/lib/orchestrate/analyze/AutoBeAnalyzePointer.js.map +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyze.js +0 -125
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.d.ts +0 -5
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js +0 -561
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js.map +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.d.ts +0 -12
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js +0 -395
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js.map +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +0 -347
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +0 -1
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.d.ts +0 -68
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.js +0 -3
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.js.map +0 -1
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.d.ts +0 -5
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js +0 -27
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js.map +0 -1
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.d.ts +0 -12
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js +0 -78
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js.map +0 -1
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.d.ts +0 -16
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js +0 -79
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js.map +0 -1
- package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +0 -1
- package/lib/orchestrate/index.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +0 -62
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +0 -28
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +0 -28
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +0 -28
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +0 -28
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterface.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js.map +0 -1
- package/lib/orchestrate/interface/utils/OpenApiEndpointComparator.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrisma.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +0 -1
- package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +0 -1
- package/lib/orchestrate/prisma/transformPrismaCorrectHistories.js.map +0 -1
- package/lib/orchestrate/prisma/transformPrismaHistories.d.ts +0 -3
- package/lib/orchestrate/prisma/transformPrismaHistories.js +0 -55
- package/lib/orchestrate/prisma/transformPrismaHistories.js.map +0 -1
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js +0 -48
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js.map +0 -1
- package/lib/orchestrate/realize/ProviderCodeComparator.js.map +0 -1
- package/lib/orchestrate/realize/RealizePipe.js +0 -14
- package/lib/orchestrate/realize/RealizePipe.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealize.js +0 -74
- package/lib/orchestrate/realize/orchestrateRealize.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizeCoder.d.ts +0 -26
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js +0 -420
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizePlanner.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js.map +0 -1
- package/lib/orchestrate/realize/transformRealizeAuthorization.d.ts +0 -4
- package/lib/orchestrate/realize/transformRealizeAuthorization.js +0 -39
- package/lib/orchestrate/realize/transformRealizeAuthorization.js.map +0 -1
- package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.d.ts +0 -5
- package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.js +0 -80
- package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.js.map +0 -1
- package/lib/orchestrate/realize/transformRealizeCoderHistories.d.ts +0 -7
- package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +0 -1
- package/lib/orchestrate/realize/utils/AuthorizationFileSystem.js.map +0 -1
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.js.map +0 -1
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js.map +0 -1
- package/lib/orchestrate/realize/utils/InternalFileSystem.js.map +0 -1
- package/lib/orchestrate/realize/utils/ProviderFileSystem.js.map +0 -1
- package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +0 -1
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.d.ts +0 -11
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js +0 -221
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js.map +0 -1
- package/lib/orchestrate/test/compile/completeTestCode.js.map +0 -1
- package/lib/orchestrate/test/compile/filterTestFileName.js.map +0 -1
- package/lib/orchestrate/test/compile/getTestExternalDeclarations.js.map +0 -1
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +0 -1
- package/lib/orchestrate/test/orchestrateTest.js.map +0 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +0 -1
- package/lib/orchestrate/test/orchestrateTestScenario.js +0 -866
- package/lib/orchestrate/test/orchestrateTestScenario.js.map +0 -1
- package/lib/orchestrate/test/orchestrateTestWrite.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestFunction.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +0 -1
- package/lib/orchestrate/test/transformTestCorrectHistories.js.map +0 -1
- package/lib/orchestrate/test/transformTestHistories.js.map +0 -1
- package/lib/orchestrate/test/transformTestScenarioHistories.d.ts +0 -3
- package/lib/orchestrate/test/transformTestScenarioHistories.js +0 -100
- package/lib/orchestrate/test/transformTestScenarioHistories.js.map +0 -1
- package/lib/orchestrate/test/transformTestWriteHistories.js +0 -178
- package/lib/orchestrate/test/transformTestWriteHistories.js.map +0 -1
- package/lib/structures/IAutoBeConfig.js.map +0 -1
- package/lib/structures/IAutoBeProps.js.map +0 -1
- package/lib/structures/IAutoBeVendor.js.map +0 -1
- package/lib/utils/arrayToRecord.js.map +0 -1
- package/lib/utils/backoffRetry.js.map +0 -1
- package/lib/utils/divideArray.js.map +0 -1
- package/lib/utils/emplaceMap.js.map +0 -1
- package/lib/utils/enforceToolCall.d.ts +0 -3
- package/lib/utils/enforceToolCall.js +0 -13
- package/lib/utils/enforceToolCall.js.map +0 -1
- package/lib/utils/forceRetry.d.ts +0 -1
- package/lib/utils/forceRetry.js +0 -26
- package/lib/utils/forceRetry.js.map +0 -1
- package/lib/utils/pipe.js.map +0 -1
- package/src/orchestrate/analyze/AutoBeAnalyzeFileSystem.ts +0 -58
- package/src/orchestrate/analyze/AutoBeAnalyzePointer.ts +0 -10
- package/src/orchestrate/analyze/orchestrateAnalyzeComposer.ts +0 -112
- package/src/orchestrate/analyze/orchestrateAnalyzeReviewer.ts +0 -131
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.ts +0 -75
- package/src/orchestrate/analyze/transformAnalyzeReviewerHistories.ts +0 -31
- package/src/orchestrate/analyze/transformAnalyzeWriteHistories.ts +0 -94
- package/src/orchestrate/analyze/writeDocumentUntilReviewPassed.ts +0 -96
- package/src/orchestrate/prisma/transformPrismaHistories.ts +0 -59
- package/src/orchestrate/realize/RealizePipe.ts +0 -39
- package/src/orchestrate/realize/orchestrateRealizeCoder.ts +0 -182
- package/src/orchestrate/realize/writeCodeUntilCompilePassed.ts +0 -308
- package/src/orchestrate/test/transformTestScenarioHistories.ts +0 -105
- package/src/utils/enforceToolCall.ts +0 -13
- package/src/utils/forceRetry.ts +0 -13
- /package/lib/{AutoBeAgentBase.js → agent/src/AutoBeAgentBase.js} +0 -0
- /package/lib/{constants → agent/src/constants}/AutoBeSystemPromptConstant.js +0 -0
- /package/lib/{context → agent/src/context}/AutoBeContext.js +0 -0
- /package/lib/{context → agent/src/context}/AutoBeState.js +0 -0
- /package/lib/{context → agent/src/context}/IAutoBeApplication.js +0 -0
- /package/lib/{context → agent/src/context}/IAutoBeApplicationProps.js +0 -0
- /package/lib/{context → agent/src/context}/IAutoBeApplicationResult.js +0 -0
- /package/lib/{context → agent/src/context}/assertSchemaModel.js +0 -0
- /package/lib/{factory → agent/src/factory}/createAgenticaHistory.js +0 -0
- /package/lib/{factory → agent/src/factory}/createAutoBeState.js +0 -0
- /package/lib/{factory → agent/src/factory}/index.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/facade/transformFacadeStateMessage.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/index.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/histories/transformInterfaceAssetHistories.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/histories/transformInterfacePrerequisiteHistories.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceComplementApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceEndpointApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceGroupApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceOperationApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceSchemaApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/utils/OpenApiEndpointComparator.js +0 -0
- /package/lib/{orchestrate/prisma → agent/src/orchestrate/prisma/histories}/transformPrismaCorrectHistories.d.ts +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/ProviderCodeComparator.js +0 -0
- /package/lib/{orchestrate/realize → agent/src/orchestrate/realize/histories}/transformRealizeCoderHistories.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeAuthorizationApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeCoderApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeCompile.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeFailedSymbol.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/AuthorizationFileSystem.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/AutoBeRealizeAuthorizationFileSystem.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/InternalFileSystem.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/ProviderFileSystem.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/completeTestCode.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/filterTestFileName.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/getTestExternalDeclarations.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/getTestScenarioArtifacts.js +0 -0
- /package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestCorrectHistories.js +0 -0
- /package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestHistories.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestCorrectApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestFunction.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestScenarioApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestScenarioArtifacts.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestWriteApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestWriteResult.js +0 -0
- /package/lib/{structures → agent/src/structures}/IAutoBeConfig.js +0 -0
- /package/lib/{structures → agent/src/structures}/IAutoBeProps.js +0 -0
- /package/lib/{structures → agent/src/structures}/IAutoBeVendor.js +0 -0
- /package/lib/{utils → agent/src/utils}/arrayToRecord.js +0 -0
- /package/lib/{utils → agent/src/utils}/backoffRetry.js +0 -0
- /package/lib/{utils → agent/src/utils}/divideArray.js +0 -0
- /package/lib/{utils → agent/src/utils}/emplaceMap.js +0 -0
- /package/lib/{utils → agent/src/utils}/pipe.js +0 -0
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
export interface IAutoBeRealizeWriteApplication {
|
|
2
|
+
coding: (next: IAutoBeRealizeWriteApplication.IProps) => void;
|
|
3
|
+
}
|
|
4
|
+
export declare namespace IAutoBeRealizeWriteApplication {
|
|
5
|
+
interface IProps {
|
|
6
|
+
/**
|
|
7
|
+
* Step 1.
|
|
8
|
+
*
|
|
9
|
+
* 🧠 Provider Function Implementation Plan
|
|
10
|
+
*
|
|
11
|
+
* This field outlines the strategic plan for implementing the provider
|
|
12
|
+
* function according to the Realize Coder Agent specification. Before
|
|
13
|
+
* writing the actual code, think through the logic and structure.
|
|
14
|
+
*
|
|
15
|
+
* The plan MUST follow MANDATORY SCHEMA-FIRST APPROACH:
|
|
16
|
+
*
|
|
17
|
+
* 📋 STEP 1 - PRISMA SCHEMA VERIFICATION (MOST CRITICAL):
|
|
18
|
+
*
|
|
19
|
+
* - EXAMINE the actual Prisma schema model definition
|
|
20
|
+
* - LIST EVERY field that exists in the model with exact types
|
|
21
|
+
* - EXPLICITLY NOTE fields that DO NOT exist (e.g., "Note: deleted_at field
|
|
22
|
+
* DOES NOT EXIST")
|
|
23
|
+
* - Common assumption errors to avoid: `deleted_at`, `created_by`,
|
|
24
|
+
* `updated_by`, `is_deleted`, `is_active`
|
|
25
|
+
*
|
|
26
|
+
* 📋 STEP 2 - FIELD INVENTORY:
|
|
27
|
+
*
|
|
28
|
+
* - List ONLY fields confirmed to exist in schema
|
|
29
|
+
* - Example: "Verified fields in user model: id (String), email (String),
|
|
30
|
+
* created_at (DateTime), updated_at (DateTime)"
|
|
31
|
+
* - Example: "Fields that DO NOT exist: deleted_at, is_active, created_by"
|
|
32
|
+
*
|
|
33
|
+
* 📋 STEP 3 - FIELD ACCESS STRATEGY:
|
|
34
|
+
*
|
|
35
|
+
* - Plan which verified fields will be used in select, update, create
|
|
36
|
+
* operations
|
|
37
|
+
* - For complex operations with type errors, plan to use separate queries
|
|
38
|
+
* instead of nested operations
|
|
39
|
+
*
|
|
40
|
+
* 📋 STEP 4 - TYPE COMPATIBILITY:
|
|
41
|
+
*
|
|
42
|
+
* - Plan DateTime to ISO string conversions using toISOStringSafe()
|
|
43
|
+
* - Plan handling of nullable vs required fields
|
|
44
|
+
*
|
|
45
|
+
* 📋 STEP 5 - IMPLEMENTATION APPROACH:
|
|
46
|
+
*
|
|
47
|
+
* - 🧩 Required business entities (e.g., users, posts, logs) and their
|
|
48
|
+
* relationships
|
|
49
|
+
* - 🛠 Operations needed to fulfill the business scenario (e.g., fetch,
|
|
50
|
+
* create, update) using ONLY verified fields
|
|
51
|
+
* - 🔄 Data dependencies between steps (e.g., use userId to fetch related
|
|
52
|
+
* data)
|
|
53
|
+
* - ✅ Validation points (based on business rules, not field presence)
|
|
54
|
+
* - 🚧 Error and edge cases that must be handled explicitly (e.g., missing
|
|
55
|
+
* records)
|
|
56
|
+
* - 🏗 Structure: always a single `async function`, using only `parameters`
|
|
57
|
+
* and `body`
|
|
58
|
+
*
|
|
59
|
+
* ⚠️ Important Constraints:
|
|
60
|
+
*
|
|
61
|
+
* - Do NOT perform input validation — assume `parameters` and `body` are
|
|
62
|
+
* already valid
|
|
63
|
+
* - Use `typia.random<T>()` with an explanatory comment if logic can't be
|
|
64
|
+
* implemented
|
|
65
|
+
* - Never use `any` or make assumptions without sufficient context
|
|
66
|
+
* - Use only allowed imports — DTOs and Prisma types
|
|
67
|
+
* - Use `MyGlobal.prisma` for DB access and respect Prisma typing rules
|
|
68
|
+
*
|
|
69
|
+
* ⚠️ TypeScript-specific considerations:
|
|
70
|
+
*
|
|
71
|
+
* - Do **not** use native `Date` objects directly; always convert all dates
|
|
72
|
+
* using `toISOStringSafe()` and brand as `string &
|
|
73
|
+
* tags.Format<'date-time'>`. This rule applies throughout all phases.
|
|
74
|
+
* - Prefer `satisfies` for DTO conformance instead of unsafe `as` casts
|
|
75
|
+
* - Avoid weak typing such as `any`, `as any`, or `satisfies any`
|
|
76
|
+
* - Use branded types (e.g., `tags.Format<'uuid'>`) and literal unions where
|
|
77
|
+
* applicable
|
|
78
|
+
*
|
|
79
|
+
* ✅ Example Structure:
|
|
80
|
+
*
|
|
81
|
+
* ```ts
|
|
82
|
+
* export async function doSomething(
|
|
83
|
+
* user: { id: string & tags.Format<"uuid">; type: string },
|
|
84
|
+
* parameters: IParams,
|
|
85
|
+
* body: IBody
|
|
86
|
+
* ): Promise<IReturn> {
|
|
87
|
+
* const { id } = parameters;
|
|
88
|
+
* const { name } = body;
|
|
89
|
+
* const user = await MyGlobal.prisma.users.findFirst({ where: { id } });
|
|
90
|
+
* if (!user) throw new Error("User not found");
|
|
91
|
+
* ...
|
|
92
|
+
* return result;
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*
|
|
96
|
+
* 🔍 Feasibility Analysis Requirement:
|
|
97
|
+
*
|
|
98
|
+
* - Before generating any code, the agent **must analyze** whether the
|
|
99
|
+
* requested implementation is **feasible based on the given Prisma schema
|
|
100
|
+
* and DTO types**.
|
|
101
|
+
* - If required fields or relationships are **missing or incompatible**, the
|
|
102
|
+
* plan should explicitly state that the implementation is **not
|
|
103
|
+
* possible** with the current schema/DTO, and no code should be generated
|
|
104
|
+
* in later stages.
|
|
105
|
+
* - In such cases, only a detailed **comment in the `implementationCode`**
|
|
106
|
+
* should be returned explaining why the logic cannot be implemented.
|
|
107
|
+
*
|
|
108
|
+
* 🔥 Error Handling Plan:
|
|
109
|
+
*
|
|
110
|
+
* If an error is expected or encountered during implementation:
|
|
111
|
+
*
|
|
112
|
+
* - Clearly document the error message(s) and TypeScript error codes.
|
|
113
|
+
* - Analyze the root cause (e.g., type mismatch, missing field, nullability
|
|
114
|
+
* issue).
|
|
115
|
+
* - Define concrete steps to resolve the issue, such as:
|
|
116
|
+
*
|
|
117
|
+
* - Adjusting type declarations or using Prisma-generated input types.
|
|
118
|
+
* - Using `?? undefined` to normalize nullable fields.
|
|
119
|
+
* - Applying correct relation handling (e.g., `connect` instead of direct
|
|
120
|
+
* foreign key assignment).
|
|
121
|
+
* - Ensuring all date fields use `.toISOString()` and proper branding.
|
|
122
|
+
* - Include fallback or workaround plans if a direct fix is complex.
|
|
123
|
+
* - If no error is present, simply omit this section.
|
|
124
|
+
*
|
|
125
|
+
* This plan ensures the function will:
|
|
126
|
+
*
|
|
127
|
+
* - Respect the global architecture and coding conventions
|
|
128
|
+
* - Be safe, predictable, and aligned with upstream logic
|
|
129
|
+
*/
|
|
130
|
+
plan: string;
|
|
131
|
+
/**
|
|
132
|
+
* Step 2.
|
|
133
|
+
*
|
|
134
|
+
* The Prisma schema string that will be used to validate the implementation
|
|
135
|
+
* logic in this file.
|
|
136
|
+
*
|
|
137
|
+
* You must **explicitly specify only the relevant models and fields** from
|
|
138
|
+
* your full schema that are used in this implementation. This ensures that
|
|
139
|
+
* your logic is aligned with the expected database structure without
|
|
140
|
+
* accidentally introducing unrelated fields or models.
|
|
141
|
+
*
|
|
142
|
+
* ⚠️ Important: The value of this field must be a valid Prisma schema
|
|
143
|
+
* string containing only the models used in this code — not the entire
|
|
144
|
+
* schema.
|
|
145
|
+
*
|
|
146
|
+
* This acts as a safeguard against:
|
|
147
|
+
*
|
|
148
|
+
* - Forgetting required fields used in this implementation
|
|
149
|
+
* - Including fields or models that are not actually used
|
|
150
|
+
*/
|
|
151
|
+
prisma_schemas: string;
|
|
152
|
+
/**
|
|
153
|
+
* Step 3.
|
|
154
|
+
*
|
|
155
|
+
* Draft WITHOUT using native Date type.
|
|
156
|
+
*
|
|
157
|
+
* This is the initial drafting phase where you outline the basic skeleton
|
|
158
|
+
* of the function. CRITICAL: This draft must NEVER use the native Date
|
|
159
|
+
* type.
|
|
160
|
+
*
|
|
161
|
+
* - The function signature must correctly include `user`, `parameters`, and
|
|
162
|
+
* `body` arguments.
|
|
163
|
+
* - Design the main flow of business logic, such as DB fetches and early
|
|
164
|
+
* returns based on conditions.
|
|
165
|
+
* - Mark any incomplete or missing parts clearly with placeholders (e.g.,
|
|
166
|
+
* comments or temporary values).
|
|
167
|
+
*
|
|
168
|
+
* ⚠️ Import rules:
|
|
169
|
+
*
|
|
170
|
+
* - Do NOT add any new import statements manually.
|
|
171
|
+
* - All necessary imports are provided globally or by the system
|
|
172
|
+
* automatically.
|
|
173
|
+
* - Writing import statements directly is prohibited and may cause compile
|
|
174
|
+
* errors. If import errors occur, check your environment configuration.
|
|
175
|
+
*
|
|
176
|
+
* ✅ Requirements:
|
|
177
|
+
*
|
|
178
|
+
* - Avoid using the `any` type at all costs to ensure type safety.
|
|
179
|
+
* - NEVER declare variables with `: Date` type
|
|
180
|
+
* - ALWAYS use `string & tags.Format<'date-time'>` for date values
|
|
181
|
+
* - Use `toISOStringSafe(new Date())` for current timestamps
|
|
182
|
+
* - Maintain a single-function structure; avoid using classes.
|
|
183
|
+
*/
|
|
184
|
+
draft_without_date_type: string;
|
|
185
|
+
/**
|
|
186
|
+
* Step 4.
|
|
187
|
+
*
|
|
188
|
+
* A refined version of the draft with improved completeness.
|
|
189
|
+
*
|
|
190
|
+
* - Replace placeholder logic with real DTO-conformant operations.
|
|
191
|
+
* - Add error handling (`throw new Error(...)`) where necessary.
|
|
192
|
+
* - Begin resolving structural or type mismatches.
|
|
193
|
+
*
|
|
194
|
+
* ✅ Requirements:
|
|
195
|
+
*
|
|
196
|
+
* - Use `satisfies` to ensure DTO conformity.
|
|
197
|
+
* - Avoid unsafe `as` casts unless only for branding or literal narrowing.
|
|
198
|
+
* - Use `toISOStringSafe()` for all date conversions (NOT `.toISOString()`).
|
|
199
|
+
* - Ensure all object keys strictly conform to the expected type definitions.
|
|
200
|
+
*/
|
|
201
|
+
review: string;
|
|
202
|
+
/**
|
|
203
|
+
* 🛠 Phase 4-2: With compiler feedback (optional)
|
|
204
|
+
*
|
|
205
|
+
* A correction pass that applies fixes for compile-time errors that arose
|
|
206
|
+
* during the review stage (if any).
|
|
207
|
+
*
|
|
208
|
+
* ✅ Must:
|
|
209
|
+
*
|
|
210
|
+
* - Only include this field if TypeScript errors are detected in the Review
|
|
211
|
+
* phase.
|
|
212
|
+
* - Resolve all TypeScript errors without using `as any`.
|
|
213
|
+
* - Provide safe brand casting only if required (e.g., `as string &
|
|
214
|
+
* tags.Format<'uuid'>`).
|
|
215
|
+
* - If no TypeScript errors exist, this field MUST contain the text: "No
|
|
216
|
+
* TypeScript errors detected - skipping this phase"
|
|
217
|
+
*/
|
|
218
|
+
withCompilerFeedback: string;
|
|
219
|
+
/**
|
|
220
|
+
* Step 5.
|
|
221
|
+
*
|
|
222
|
+
* The complete and fully correct TypeScript function implementation.
|
|
223
|
+
*
|
|
224
|
+
* - Passes strict type checking without errors.
|
|
225
|
+
* - Uses only safe branding or literal type assertions.
|
|
226
|
+
* - Converts all date values properly using `toISOStringSafe()`.
|
|
227
|
+
* - Follows DTO structures using `satisfies`.
|
|
228
|
+
* - Avoids any weak typing such as `any`, `as any`, or `satisfies any`.
|
|
229
|
+
* - Uses only allowed imports (e.g., from `../api/structures` and
|
|
230
|
+
* `MyGlobal.prisma`).
|
|
231
|
+
* - NEVER creates intermediate variables for Prisma operations.
|
|
232
|
+
*
|
|
233
|
+
* ⚠️ Fallback Behavior:
|
|
234
|
+
*
|
|
235
|
+
* - If the `plan` phase explicitly determines that the requested logic is
|
|
236
|
+
* **not feasible** due to mismatches or limitations in the provided
|
|
237
|
+
* Prisma schema and DTO types:
|
|
238
|
+
*
|
|
239
|
+
* - The implementation must still return a syntactically valid function.
|
|
240
|
+
* - In such cases, return mock data using `typia.random<T>()` wrapped in the
|
|
241
|
+
* correct structure, along with a comment explaining the limitation.
|
|
242
|
+
*
|
|
243
|
+
* Example fallback:
|
|
244
|
+
*
|
|
245
|
+
* ```ts
|
|
246
|
+
* // ⚠️ Cannot implement logic due to missing relation between A and B
|
|
247
|
+
* export async function someFunction(...) {
|
|
248
|
+
* return typia.random<IReturn>(); // mocked output
|
|
249
|
+
* }
|
|
250
|
+
* ```
|
|
251
|
+
*
|
|
252
|
+
* ⚠️ Prohibited Practices:
|
|
253
|
+
*
|
|
254
|
+
* - Do NOT add or modify import statements manually. Imports are handled
|
|
255
|
+
* automatically by the system.
|
|
256
|
+
* - Do NOT use `any`, `as any`, or `satisfies any` to bypass type checking.
|
|
257
|
+
* - Do NOT assign native `Date` objects directly; always convert them using
|
|
258
|
+
* `toISOStringSafe()`.
|
|
259
|
+
* - Do NOT use unsafe type assertions except for safe branding or literal
|
|
260
|
+
* narrowing.
|
|
261
|
+
* - Do NOT write code outside the single async function structure (e.g., no
|
|
262
|
+
* classes or multiple functions).
|
|
263
|
+
* - Do NOT perform any input validation — assume all inputs are already
|
|
264
|
+
* validated.
|
|
265
|
+
* - Do NOT use dynamic import expressions (`import()`); all imports must be
|
|
266
|
+
* static.
|
|
267
|
+
* - Do NOT use Prisma-generated input types; always use types from
|
|
268
|
+
* `../api/structures`.
|
|
269
|
+
* - Do NOT use `Object.prototype.hasOwnProperty.call()` for field checks.
|
|
270
|
+
* - Do NOT escape newlines or quotes in the implementation string (e.g., no
|
|
271
|
+
* `\\n` or `\"`); use a properly formatted template literal with actual
|
|
272
|
+
* line breaks instead.
|
|
273
|
+
*/
|
|
274
|
+
implementationCode: string;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
+
import { IAutoBeTypeScriptCompileResult } from "@autobe/interface";
|
|
3
|
+
import { IAutoBeTestFunction } from "../structures/IAutoBeTestFunction";
|
|
4
|
+
export declare const transformTestCorrectHistories: (func: IAutoBeTestFunction, failure: IAutoBeTypeScriptCompileResult.IFailure) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
+
import { AutoBeOpenApi } from "@autobe/interface";
|
|
3
|
+
export declare const transformTestScenarioHistories: (entire: AutoBeOpenApi.IOperation[], include: AutoBeOpenApi.IOperation[], exclude: Pick<AutoBeOpenApi.IOperation, "method" | "path">[]) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
+
import { AutoBeTestScenario } from "@autobe/interface";
|
|
3
|
+
import { IAutoBeTestScenarioArtifacts } from "../structures/IAutoBeTestScenarioArtifacts";
|
|
4
|
+
export declare function transformTestWriteHistories(scenario: AutoBeTestScenario, artifacts: IAutoBeTestScenarioArtifacts): Array<IAgenticaHistoryJson.ISystemMessage>;
|
|
5
|
+
export declare namespace transformTestWriteHistories {
|
|
6
|
+
function structures(artifacts: IAutoBeTestScenarioArtifacts): string;
|
|
7
|
+
function functional(artifacts: IAutoBeTestScenarioArtifacts): string;
|
|
8
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AutoBeTestScenario } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
|
-
export declare function orchestrateTestScenario<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>): Promise<
|
|
4
|
+
export declare function orchestrateTestScenario<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>): Promise<AutoBeTestScenario[]>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { AutoBeOpenApi } from "@autobe/interface";
|
|
1
|
+
import { AutoBeOpenApi, SnakePattern } from "@autobe/interface";
|
|
2
|
+
import { tags } from "typia";
|
|
2
3
|
export interface IAutoBeTestScenarioApplication {
|
|
3
4
|
/**
|
|
4
5
|
* Make test scenarios for the given endpoints.
|
|
@@ -28,7 +29,7 @@ export declare namespace IAutoBeTestScenarioApplication {
|
|
|
28
29
|
* Each scenario represents a specific test case for the same `path` and
|
|
29
30
|
* `method`.
|
|
30
31
|
*/
|
|
31
|
-
scenarios: IScenario[]
|
|
32
|
+
scenarios: IScenario[] & tags.MinItems<1>;
|
|
32
33
|
}
|
|
33
34
|
/**
|
|
34
35
|
* Represents a test scenario for a single API operation.
|
|
@@ -56,36 +57,36 @@ export declare namespace IAutoBeTestScenarioApplication {
|
|
|
56
57
|
*
|
|
57
58
|
* ## Naming Convention
|
|
58
59
|
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* -
|
|
62
|
-
* -
|
|
63
|
-
* -
|
|
64
|
-
*
|
|
60
|
+
* MUST use snake_case naming convention.
|
|
61
|
+
*
|
|
62
|
+
* - Must start with `test_api_` prefix (mandatory requirement)
|
|
63
|
+
* - ALWAYS start with business feature, NOT action verbs
|
|
64
|
+
* - Business feature comes first, followed by scenario context
|
|
65
|
+
* - Embed action verbs within the scenario description, not at the beginning
|
|
65
66
|
*
|
|
66
67
|
* ## Content Structure
|
|
67
68
|
*
|
|
68
69
|
* Function names should follow this pattern:
|
|
69
|
-
* `
|
|
70
|
+
* `test_api_[core_feature]_[specific_scenario]`
|
|
70
71
|
*
|
|
71
72
|
* Where:
|
|
72
73
|
*
|
|
73
|
-
* - `
|
|
74
|
-
*
|
|
75
|
-
* - `
|
|
74
|
+
* - `core_feature`: The main business feature or entity being tested
|
|
75
|
+
* (customer, seller, cart, push_message, etc.)
|
|
76
|
+
* - `specific_scenario`: The specific operation or scenario context
|
|
77
|
+
* (join_verification_not_found, login_success,
|
|
78
|
+
* moderator_assignment_update, discountable_ticket_duplicated,
|
|
79
|
+
* csv_export, etc.)
|
|
76
80
|
*
|
|
77
|
-
* ##
|
|
81
|
+
* ## Business Feature-Based Examples
|
|
78
82
|
*
|
|
79
|
-
* - `
|
|
80
|
-
*
|
|
81
|
-
* - `
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
* - `
|
|
86
|
-
* account deletion without authorization
|
|
87
|
-
* - `test_search_user_profiles_with_pagination_preferences` - User browsing
|
|
88
|
-
* profiles with specific pagination
|
|
83
|
+
* - `test_api_customer_join_verification_not_found` - Customer join
|
|
84
|
+
* verification when verification code not found
|
|
85
|
+
* - `test_api_seller_login` - Seller login operation
|
|
86
|
+
* - `test_api_cart_discountable_ticket_duplicated` - Cart discountable ticket
|
|
87
|
+
* with duplication scenario
|
|
88
|
+
* - `test_api_push_message_csv` - Push message functionality with CSV format
|
|
89
|
+
* - `test_api_product_review_update` - Product review update operation
|
|
89
90
|
*
|
|
90
91
|
* ## Clarity Guidelines
|
|
91
92
|
*
|
|
@@ -104,7 +105,7 @@ export declare namespace IAutoBeTestScenarioApplication {
|
|
|
104
105
|
* - Don't imply dependency on other API operations
|
|
105
106
|
* - Represent complete user interactions
|
|
106
107
|
*/
|
|
107
|
-
functionName: string;
|
|
108
|
+
functionName: string & SnakePattern;
|
|
108
109
|
/**
|
|
109
110
|
* A list of other API endpoints that this scenario logically depends on.
|
|
110
111
|
*
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SnakePattern } from "@autobe/interface";
|
|
1
2
|
export interface IAutoBeTestWriteApplication {
|
|
2
3
|
/**
|
|
3
4
|
* Main entry point for AI Function Call - generates complete E2E test code.
|
|
@@ -37,7 +38,7 @@ export declare namespace IAutoBeTestWriteApplication {
|
|
|
37
38
|
* Workflow: Scenario analysis → Domain identification → Test organization
|
|
38
39
|
* structure
|
|
39
40
|
*/
|
|
40
|
-
domain: string;
|
|
41
|
+
domain: string & SnakePattern;
|
|
41
42
|
/**
|
|
42
43
|
* Step 3: Initial TypeScript E2E test code implementation.
|
|
43
44
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autobe/agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.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": "^0.
|
|
23
|
+
"@agentica/core": "^0.31.1",
|
|
24
24
|
"@prisma/internals": "^6.7.0",
|
|
25
|
-
"@samchon/openapi": "^4.
|
|
26
|
-
"openai": "^5.2
|
|
25
|
+
"@samchon/openapi": "^4.7.1",
|
|
26
|
+
"openai": "^5.12.2",
|
|
27
27
|
"tstl": "^3.0.0",
|
|
28
|
-
"typia": "^9.
|
|
28
|
+
"typia": "^9.7.1",
|
|
29
29
|
"uuid": "^11.1.0",
|
|
30
|
-
"@autobe/interface": "^0.
|
|
31
|
-
"@autobe/utils": "^0.
|
|
30
|
+
"@autobe/interface": "^0.18.0",
|
|
31
|
+
"@autobe/utils": "^0.18.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@rollup/plugin-json": "^6.1.0",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"rollup": "^4.40.1",
|
|
40
40
|
"ts-node": "^10.9.2",
|
|
41
41
|
"ts-patch": "^3.3.0",
|
|
42
|
-
"typescript": "~5.
|
|
43
|
-
"@autobe/compiler": "^0.
|
|
44
|
-
"@autobe/filesystem": "^0.
|
|
42
|
+
"typescript": "~5.9.2",
|
|
43
|
+
"@autobe/compiler": "^0.18.0",
|
|
44
|
+
"@autobe/filesystem": "^0.18.0"
|
|
45
45
|
},
|
|
46
46
|
"keywords": [
|
|
47
47
|
"ai",
|
package/src/AutoBeAgent.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
IAgenticaTokenUsageJson,
|
|
3
|
+
IAgenticaVendor,
|
|
4
|
+
MicroAgentica,
|
|
5
|
+
} from "@agentica/core";
|
|
2
6
|
import {
|
|
3
7
|
AutoBeAssistantMessageHistory,
|
|
4
8
|
AutoBeHistory,
|
|
@@ -17,6 +21,7 @@ import { AutoBeState } from "./context/AutoBeState";
|
|
|
17
21
|
import { AutoBeTokenUsage } from "./context/AutoBeTokenUsage";
|
|
18
22
|
import { createAgenticaHistory } from "./factory/createAgenticaHistory";
|
|
19
23
|
import { createAutoBeController } from "./factory/createAutoBeApplication";
|
|
24
|
+
import { createAutoBeContext } from "./factory/createAutoBeContext";
|
|
20
25
|
import { createAutoBeState } from "./factory/createAutoBeState";
|
|
21
26
|
import { transformFacadeStateMessage } from "./orchestrate/facade/transformFacadeStateMessage";
|
|
22
27
|
import { IAutoBeProps } from "./structures/IAutoBeProps";
|
|
@@ -118,23 +123,21 @@ export class AutoBeAgent<Model extends ILlmSchema.Model>
|
|
|
118
123
|
const compiler = new Singleton(async () =>
|
|
119
124
|
props.compiler(compilerListener),
|
|
120
125
|
);
|
|
121
|
-
this.context_ = {
|
|
122
|
-
vendor,
|
|
126
|
+
this.context_ = createAutoBeContext({
|
|
123
127
|
model: props.model,
|
|
128
|
+
vendor: props.vendor,
|
|
124
129
|
config: {
|
|
125
130
|
backoffStrategy: randomBackoffStrategy,
|
|
126
131
|
...props.config,
|
|
127
132
|
},
|
|
128
133
|
compiler: () => compiler.get(),
|
|
129
134
|
compilerListener,
|
|
130
|
-
histories: () => this.histories_,
|
|
131
135
|
state: () => this.state_,
|
|
132
|
-
usage: () => this.getTokenUsage(),
|
|
133
136
|
files: (options) => this.getFiles(options),
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
137
|
+
histories: () => this.histories_,
|
|
138
|
+
usage: () => this.usage_,
|
|
139
|
+
dispatch: (event) => this.dispatch(event),
|
|
140
|
+
});
|
|
138
141
|
this.agentica_ = new MicroAgentica({
|
|
139
142
|
vendor,
|
|
140
143
|
model: props.model,
|
|
@@ -147,7 +150,6 @@ export class AutoBeAgent<Model extends ILlmSchema.Model>
|
|
|
147
150
|
execute: () => transformFacadeStateMessage(this.state_),
|
|
148
151
|
},
|
|
149
152
|
},
|
|
150
|
-
tokenUsage: this.usage_.facade,
|
|
151
153
|
controllers: [
|
|
152
154
|
createAutoBeController({
|
|
153
155
|
model: props.model,
|
|
@@ -156,6 +158,7 @@ export class AutoBeAgent<Model extends ILlmSchema.Model>
|
|
|
156
158
|
],
|
|
157
159
|
});
|
|
158
160
|
|
|
161
|
+
// HISTORIES MANIPULATION
|
|
159
162
|
this.agentica_.getHistories().push(
|
|
160
163
|
...this.histories_
|
|
161
164
|
.map((history) =>
|
|
@@ -166,6 +169,34 @@ export class AutoBeAgent<Model extends ILlmSchema.Model>
|
|
|
166
169
|
)
|
|
167
170
|
.filter((h) => h !== null),
|
|
168
171
|
);
|
|
172
|
+
|
|
173
|
+
// TRACE FACADE TOKEN USAGE
|
|
174
|
+
let previous: IAgenticaTokenUsageJson.IComponent = this.agentica_
|
|
175
|
+
.getTokenUsage()
|
|
176
|
+
.toJSON().aggregate;
|
|
177
|
+
const increment = () => {
|
|
178
|
+
const current: IAgenticaTokenUsageJson.IComponent = this.agentica_
|
|
179
|
+
.getTokenUsage()
|
|
180
|
+
.toJSON().aggregate;
|
|
181
|
+
this.usage_.facade.increment({
|
|
182
|
+
total: current.total - previous.total,
|
|
183
|
+
input: {
|
|
184
|
+
total: current.input.total - previous.input.total,
|
|
185
|
+
cached: current.input.cached - previous.input.cached,
|
|
186
|
+
},
|
|
187
|
+
output: {
|
|
188
|
+
total: current.output.total - previous.output.total,
|
|
189
|
+
reasoning: current.output.reasoning - previous.output.reasoning,
|
|
190
|
+
accepted_prediction:
|
|
191
|
+
current.output.accepted_prediction -
|
|
192
|
+
previous.output.accepted_prediction,
|
|
193
|
+
rejected_prediction:
|
|
194
|
+
current.output.rejected_prediction -
|
|
195
|
+
previous.output.rejected_prediction,
|
|
196
|
+
},
|
|
197
|
+
});
|
|
198
|
+
previous = current;
|
|
199
|
+
};
|
|
169
200
|
this.agentica_.on("assistantMessage", async (message) => {
|
|
170
201
|
const start = new Date();
|
|
171
202
|
const history: AutoBeAssistantMessageHistory = {
|
|
@@ -175,6 +206,7 @@ export class AutoBeAgent<Model extends ILlmSchema.Model>
|
|
|
175
206
|
created_at: start.toISOString(),
|
|
176
207
|
completed_at: new Date().toISOString(),
|
|
177
208
|
};
|
|
209
|
+
increment();
|
|
178
210
|
this.histories_.push(history);
|
|
179
211
|
this.dispatch({
|
|
180
212
|
type: "assistantMessage",
|
|
@@ -182,6 +214,9 @@ export class AutoBeAgent<Model extends ILlmSchema.Model>
|
|
|
182
214
|
created_at: history.created_at,
|
|
183
215
|
}).catch(() => {});
|
|
184
216
|
});
|
|
217
|
+
this.agentica_.on("call", async () => {
|
|
218
|
+
increment();
|
|
219
|
+
});
|
|
185
220
|
this.agentica_.on("request", (e) => {
|
|
186
221
|
if (e.body.parallel_tool_calls !== undefined)
|
|
187
222
|
delete e.body.parallel_tool_calls;
|
package/src/AutoBeMockAgent.ts
CHANGED
|
@@ -88,7 +88,24 @@ export class AutoBeMockAgent extends AutoBeAgentBase implements IAutoBeAgent {
|
|
|
88
88
|
const take = async (
|
|
89
89
|
type: "analyze" | "prisma" | "interface" | "test" | "realize",
|
|
90
90
|
): Promise<void> => {
|
|
91
|
-
|
|
91
|
+
const snapshots: AutoBeEventSnapshot[] | null =
|
|
92
|
+
this.getEventSnapshots(type);
|
|
93
|
+
if (snapshots === null) {
|
|
94
|
+
this.histories_.push(userMessage);
|
|
95
|
+
this.histories_.push({
|
|
96
|
+
id: v4(),
|
|
97
|
+
type: "assistantMessage",
|
|
98
|
+
text: [
|
|
99
|
+
"The histories are prepared until current state.",
|
|
100
|
+
"",
|
|
101
|
+
"Thanks for using AutoBE!",
|
|
102
|
+
].join("\n"),
|
|
103
|
+
created_at: new Date().toISOString(),
|
|
104
|
+
completed_at: new Date().toISOString(),
|
|
105
|
+
});
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
for (const s of snapshots) {
|
|
92
109
|
const time: number = sleepMap[s.event.type] ?? 500;
|
|
93
110
|
await sleep_for(randint(time * 0.2, time * 1.8));
|
|
94
111
|
void this.dispatch(s.event).catch(() => {});
|
|
@@ -117,8 +134,8 @@ export class AutoBeMockAgent extends AutoBeAgentBase implements IAutoBeAgent {
|
|
|
117
134
|
|
|
118
135
|
private getEventSnapshots(
|
|
119
136
|
state: "analyze" | "prisma" | "interface" | "test" | "realize",
|
|
120
|
-
): AutoBeEventSnapshot[] {
|
|
121
|
-
return this.props_.preset[state];
|
|
137
|
+
): AutoBeEventSnapshot[] | null {
|
|
138
|
+
return this.props_.preset[state] ?? null;
|
|
122
139
|
}
|
|
123
140
|
}
|
|
124
141
|
export namespace AutoBeMockAgent {
|
|
@@ -130,17 +147,20 @@ export namespace AutoBeMockAgent {
|
|
|
130
147
|
}
|
|
131
148
|
export interface IPreset {
|
|
132
149
|
histories: AutoBeHistory[];
|
|
133
|
-
analyze
|
|
134
|
-
prisma
|
|
135
|
-
interface
|
|
136
|
-
test
|
|
137
|
-
realize
|
|
150
|
+
analyze?: AutoBeEventSnapshot[] | null;
|
|
151
|
+
prisma?: AutoBeEventSnapshot[] | null;
|
|
152
|
+
interface?: AutoBeEventSnapshot[] | null;
|
|
153
|
+
test?: AutoBeEventSnapshot[] | null;
|
|
154
|
+
realize?: AutoBeEventSnapshot[] | null;
|
|
138
155
|
}
|
|
139
156
|
}
|
|
140
157
|
|
|
141
|
-
const sleepMap:
|
|
158
|
+
const sleepMap: Record<AutoBeEvent.Type, number> = {
|
|
159
|
+
userMessage: 1_000,
|
|
160
|
+
assistantMessage: 1_000,
|
|
142
161
|
// ANALYZE
|
|
143
162
|
analyzeStart: 1_000,
|
|
163
|
+
analyzeScenario: 1_000,
|
|
144
164
|
analyzeWrite: 500,
|
|
145
165
|
analyzeReview: 300,
|
|
146
166
|
analyzeComplete: 1_000,
|
|
@@ -148,20 +168,25 @@ const sleepMap: Partial<Record<AutoBeEvent.Type, number>> = {
|
|
|
148
168
|
prismaStart: 1_000,
|
|
149
169
|
prismaComponents: 1_000,
|
|
150
170
|
prismaSchemas: 500,
|
|
171
|
+
prismaInsufficient: 1_000,
|
|
172
|
+
prismaReview: 500,
|
|
151
173
|
prismaValidate: 2_000,
|
|
152
174
|
prismaCorrect: 500,
|
|
153
|
-
prismaInsufficient: 1_000,
|
|
154
175
|
prismaComplete: 1_000,
|
|
155
176
|
// INTERFACE
|
|
156
177
|
interfaceStart: 1_000,
|
|
178
|
+
interfaceGroups: 1_000,
|
|
157
179
|
interfaceEndpoints: 1_000,
|
|
158
180
|
interfaceOperations: 400,
|
|
181
|
+
interfaceOperationsReview: 400,
|
|
182
|
+
interfaceAuthorization: 400,
|
|
159
183
|
interfaceSchemas: 400,
|
|
184
|
+
interfaceSchemasReview: 400,
|
|
160
185
|
interfaceComplement: 2_000,
|
|
161
186
|
interfaceComplete: 1_000,
|
|
162
187
|
// TEST
|
|
163
188
|
testStart: 1_000,
|
|
164
|
-
|
|
189
|
+
testScenarios: 40,
|
|
165
190
|
testWrite: 40,
|
|
166
191
|
testValidate: 100,
|
|
167
192
|
testCorrect: 100,
|
|
@@ -175,5 +200,10 @@ const sleepMap: Partial<Record<AutoBeEvent.Type, number>> = {
|
|
|
175
200
|
realizeAuthorizationStart: 1_000,
|
|
176
201
|
realizeAuthorizationWrite: 200,
|
|
177
202
|
realizeAuthorizationValidate: 200,
|
|
203
|
+
realizeAuthorizationCorrect: 200,
|
|
178
204
|
realizeAuthorizationComplete: 1_000,
|
|
205
|
+
realizeTestStart: 1_000,
|
|
206
|
+
realizeTestReset: 2_500,
|
|
207
|
+
realizeTestOperation: 400,
|
|
208
|
+
realizeTestComplete: 1_000,
|
|
179
209
|
};
|