@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,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AutoBeTokenUsageComponent = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Token usage component for individual AI agents in the vibe coding pipeline.
|
|
6
|
+
*
|
|
7
|
+
* Represents detailed token consumption statistics for a specific processing
|
|
8
|
+
* phase (facade, analyze, prisma, interface, test, or realize). This class
|
|
9
|
+
* tracks both input and output token usage with granular breakdowns, enabling
|
|
10
|
+
* precise cost analysis and performance optimization for each agent.
|
|
11
|
+
*
|
|
12
|
+
* The component structure includes:
|
|
13
|
+
*
|
|
14
|
+
* - Total token count for quick cost calculations
|
|
15
|
+
* - Input token breakdown with cache efficiency metrics
|
|
16
|
+
* - Output token categorization by generation type
|
|
17
|
+
*
|
|
18
|
+
* This granular tracking helps identify optimization opportunities and
|
|
19
|
+
* understand the computational characteristics of each agent phase.
|
|
20
|
+
*
|
|
21
|
+
* @author SunRabbit123
|
|
22
|
+
*/
|
|
23
|
+
class AutoBeTokenUsageComponent {
|
|
24
|
+
/**
|
|
25
|
+
* Total token count combining all input and output tokens.
|
|
26
|
+
*
|
|
27
|
+
* Represents the complete token consumption for this component, providing a
|
|
28
|
+
* single metric for overall resource utilization. This value is critical for
|
|
29
|
+
* cost calculations and comparing efficiency across different agents or
|
|
30
|
+
* processing phases.
|
|
31
|
+
*/
|
|
32
|
+
get total() {
|
|
33
|
+
return this.input.total + this.output.total;
|
|
34
|
+
}
|
|
35
|
+
constructor(props) {
|
|
36
|
+
if (props === undefined) {
|
|
37
|
+
this.input = { total: 0, cached: 0 };
|
|
38
|
+
this.output = {
|
|
39
|
+
total: 0,
|
|
40
|
+
reasoning: 0,
|
|
41
|
+
accepted_prediction: 0,
|
|
42
|
+
rejected_prediction: 0,
|
|
43
|
+
};
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
this.input = props.input;
|
|
47
|
+
this.output = props.output;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Export token usage data as JSON.
|
|
51
|
+
*
|
|
52
|
+
* Converts the component's token usage statistics to the standardized
|
|
53
|
+
* IAutoBeTokenUsageJson.IComponent format. This serialization maintains the
|
|
54
|
+
* complete structure including total counts and detailed breakdowns for both
|
|
55
|
+
* input and output tokens.
|
|
56
|
+
*
|
|
57
|
+
* @returns JSON representation of the token usage component
|
|
58
|
+
*/
|
|
59
|
+
toJSON() {
|
|
60
|
+
return {
|
|
61
|
+
total: this.total,
|
|
62
|
+
input: {
|
|
63
|
+
total: this.input.total,
|
|
64
|
+
cached: this.input.cached,
|
|
65
|
+
},
|
|
66
|
+
output: {
|
|
67
|
+
total: this.output.total,
|
|
68
|
+
reasoning: this.output.reasoning,
|
|
69
|
+
accepted_prediction: this.output.accepted_prediction,
|
|
70
|
+
rejected_prediction: this.output.rejected_prediction,
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/* -----------------------------------------------------------
|
|
75
|
+
OPERATORS
|
|
76
|
+
----------------------------------------------------------- */
|
|
77
|
+
/**
|
|
78
|
+
* Add token usage data to current statistics.
|
|
79
|
+
*
|
|
80
|
+
* Increments all token counters in this component by the corresponding values
|
|
81
|
+
* from the provided component data. This method performs in-place updates,
|
|
82
|
+
* modifying the current instance rather than creating a new one.
|
|
83
|
+
*
|
|
84
|
+
* Updates include:
|
|
85
|
+
*
|
|
86
|
+
* - Total token count
|
|
87
|
+
* - Input tokens (both total and cached)
|
|
88
|
+
* - Output tokens (reasoning, accepted/rejected predictions)
|
|
89
|
+
*
|
|
90
|
+
* @param props - Token usage component data to add to current values
|
|
91
|
+
*/
|
|
92
|
+
increment(props) {
|
|
93
|
+
this.input.total += props.input.total;
|
|
94
|
+
this.input.cached += props.input.cached;
|
|
95
|
+
this.output.total += props.output.total;
|
|
96
|
+
this.output.reasoning += props.output.reasoning;
|
|
97
|
+
this.output.accepted_prediction += props.output.accepted_prediction;
|
|
98
|
+
this.output.rejected_prediction += props.output.rejected_prediction;
|
|
99
|
+
}
|
|
100
|
+
/** @internal */
|
|
101
|
+
decrement(props) {
|
|
102
|
+
this.input.total -= props.input.total;
|
|
103
|
+
this.input.cached -= props.input.cached;
|
|
104
|
+
this.output.total -= props.output.total;
|
|
105
|
+
this.output.reasoning -= props.output.reasoning;
|
|
106
|
+
this.output.accepted_prediction -= props.output.accepted_prediction;
|
|
107
|
+
this.output.rejected_prediction -= props.output.rejected_prediction;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Create new component combining two token usage statistics.
|
|
111
|
+
*
|
|
112
|
+
* Performs element-wise addition of all token counters from two components,
|
|
113
|
+
* creating a new AutoBeTokenUsageComponent instance with the combined totals.
|
|
114
|
+
* This static method is useful for aggregating token usage across multiple
|
|
115
|
+
* agent invocations or combining statistics from parallel processing.
|
|
116
|
+
*
|
|
117
|
+
* @param a - First token usage component
|
|
118
|
+
* @param b - Second token usage component
|
|
119
|
+
* @returns New component with combined token statistics
|
|
120
|
+
*/
|
|
121
|
+
static plus(a, b) {
|
|
122
|
+
return new AutoBeTokenUsageComponent({
|
|
123
|
+
input: {
|
|
124
|
+
total: a.input.total + b.input.total,
|
|
125
|
+
cached: a.input.cached + b.input.cached,
|
|
126
|
+
},
|
|
127
|
+
output: {
|
|
128
|
+
total: a.output.total + b.output.total,
|
|
129
|
+
reasoning: a.output.reasoning + b.output.reasoning,
|
|
130
|
+
accepted_prediction: a.output.accepted_prediction + b.output.accepted_prediction,
|
|
131
|
+
rejected_prediction: a.output.rejected_prediction + b.output.rejected_prediction,
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
exports.AutoBeTokenUsageComponent = AutoBeTokenUsageComponent;
|
|
137
|
+
//# sourceMappingURL=AutoBeTokenUsageComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoBeTokenUsageComponent.js","sourceRoot":"","sources":["../../../../src/context/AutoBeTokenUsageComponent.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAa,yBAAyB;IA+BpC;;;;;;;OAOG;IACH,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;IAC9C,CAAC;IA0BD,YAAmB,KAAuD;QACxE,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,IAAI,CAAC,KAAK,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;YACrC,IAAI,CAAC,MAAM,GAAG;gBACZ,KAAK,EAAE,CAAC;gBACR,SAAS,EAAE,CAAC;gBACZ,mBAAmB,EAAE,CAAC;gBACtB,mBAAmB,EAAE,CAAC;aACvB,CAAC;YACF,OAAO;QACT,CAAC;QACD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED;;;;;;;;;OASG;IACI,MAAM;QACX,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE;gBACL,KAAK,EAAE,IAAI,CAA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AAC;QAChD,IAAI,CAAC,MAAM,CAAC,mBAAmB,IAAI,KAAK,CAAC,MAAM,CAAC,mBAAmB,CAAC;QACpE,IAAI,CAAC,MAAM,CAAC,mBAAmB,IAAI,KAAK,CAAC,MAAM,CAAC,mBAAmB,CAAC;IACtE,CAAC;IAED;;;;;;;;;;;OAWG;IACI,MAAM,CAAC,IAAI,CAChB,CAA4B,EAC5B,CAA4B;QAE5B,OAAO,IAAI,yBAAyB,CAAC;YACnC,KAAK,EAAE;gBACL,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,KAAK;gBACpC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,MAAM;aACxC;YACD,MAAM,EAAE;gBACN,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK;gBACtC,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC,SAAS;gBAClD,mBAAmB,EACjB,CAAC,CAAC,MAAM,CAAC,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,mBAAmB;gBAC7D,mBAAmB,EACjB,CAAC,CAAC,MAAM,CAAC,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,mBAAmB;aAC9D;SACF,CAAC,CAAC;IACL,CAAC;CACF;AAhLD,8DAgLC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { IAutoBeApplicationProps } from "./IAutoBeApplicationProps";
|
|
2
|
+
import { IAutoBeApplicationResult } from "./IAutoBeApplicationResult";
|
|
3
|
+
/**
|
|
4
|
+
* Application for AutoBE function calling.
|
|
5
|
+
*
|
|
6
|
+
* @author Samchon
|
|
7
|
+
*/
|
|
8
|
+
export interface IAutoBeApplication {
|
|
9
|
+
/**
|
|
10
|
+
* Run Analyze Agent.
|
|
11
|
+
*
|
|
12
|
+
* Executes the Analyze agent to process user requirements and generate a
|
|
13
|
+
* structured specification document. This agent analyzes all conversation
|
|
14
|
+
* history between users and AI, separates business logic from technical
|
|
15
|
+
* requirements, and establishes development priorities and scope.
|
|
16
|
+
*
|
|
17
|
+
* **IMPORTANT**: Only call this function when sufficient requirements have
|
|
18
|
+
* been discussed to generate a comprehensive specification. The context must
|
|
19
|
+
* contain enough detail about the system's purpose, core features, data
|
|
20
|
+
* models, and business rules. If requirements are unclear or incomplete,
|
|
21
|
+
* continue gathering information through conversation instead.
|
|
22
|
+
*
|
|
23
|
+
* The agent will automatically generate follow-up questions for any ambiguous
|
|
24
|
+
* requirements and continuously refine its understanding through iterative
|
|
25
|
+
* conversation. When executed after other agents have generated code, it can
|
|
26
|
+
* also interpret change requests in the context of existing implementations.
|
|
27
|
+
*/
|
|
28
|
+
analyze(props: IAutoBeApplicationProps): Promise<IAutoBeApplicationResult>;
|
|
29
|
+
/**
|
|
30
|
+
* Run prisma agent.
|
|
31
|
+
*
|
|
32
|
+
* Executes the Prisma agent to generate database schema files and ERD
|
|
33
|
+
* documentation. This agent reads the requirements specification created by
|
|
34
|
+
* the {@link analyze Analyze agent} and produces a complete Prisma schema with
|
|
35
|
+
* comprehensive documentation for each entity and attribute.
|
|
36
|
+
*
|
|
37
|
+
* **PREREQUISITE**: Only call this function after the {@link analyze} function
|
|
38
|
+
* has been successfully executed and a requirements specification document
|
|
39
|
+
* has been generated. The Prisma agent depends on the structured requirements
|
|
40
|
+
* analysis to design the database schema properly. Without a completed
|
|
41
|
+
* requirements specification, this function should NOT be called.
|
|
42
|
+
*
|
|
43
|
+
* The agent will automatically validate the generated schema using the Prisma
|
|
44
|
+
* compiler, self-correct any compilation errors through feedback loops, and
|
|
45
|
+
* generate ERD documentation using prisma-markdown. An internal review
|
|
46
|
+
* process ensures schema quality and optimization.
|
|
47
|
+
*/
|
|
48
|
+
prisma(props: IAutoBeApplicationProps): Promise<IAutoBeApplicationResult>;
|
|
49
|
+
/**
|
|
50
|
+
* Run interface agent.
|
|
51
|
+
*
|
|
52
|
+
* Executes the Interface agent to design and generate API interfaces. This
|
|
53
|
+
* agent creates OpenAPI schemas and TypeScript/NestJS code based on the
|
|
54
|
+
* requirements specification and ERD documentation from previous agents.
|
|
55
|
+
*
|
|
56
|
+
* The agent follows a sophisticated pipeline: first constructing formal
|
|
57
|
+
* OpenAPI Operation Schemas and JSON Schemas, then validating these schemas,
|
|
58
|
+
* and finally transforming them into NestJS controllers and DTOs. Each
|
|
59
|
+
* generated interface includes comprehensive JSDoc comments and undergoes
|
|
60
|
+
* internal review for consistency.
|
|
61
|
+
*/
|
|
62
|
+
interface(props: IAutoBeApplicationProps): Promise<IAutoBeApplicationResult>;
|
|
63
|
+
/**
|
|
64
|
+
* Run test program agent.
|
|
65
|
+
*
|
|
66
|
+
* Executes the Test agent to generate comprehensive E2E test suites for all
|
|
67
|
+
* {@link interface API interfaces}. This agent synthesizes outputs from
|
|
68
|
+
* previous agents to create tests that validate both individual endpoints and
|
|
69
|
+
* their interactions.
|
|
70
|
+
*
|
|
71
|
+
* **PREREQUISITE**: Only call this function after the {@link interface}
|
|
72
|
+
* function has been successfully executed and API interfaces have been
|
|
73
|
+
* generated. The Test agent requires the completed API interface definitions,
|
|
74
|
+
* OpenAPI schemas, and TypeScript code to generate appropriate test
|
|
75
|
+
* scenarios. Without completed interface design, this function should NOT be
|
|
76
|
+
* called.
|
|
77
|
+
*
|
|
78
|
+
* The agent will analyze dependency relationships between API functions,
|
|
79
|
+
* structure integrated test scenarios with correct execution sequences, and
|
|
80
|
+
* enhance pre-generated test scaffolds with business logic validation.
|
|
81
|
+
* TypeScript compiler validation and internal review ensure test quality and
|
|
82
|
+
* optimal coverage.
|
|
83
|
+
*/
|
|
84
|
+
test(props: IAutoBeApplicationProps): Promise<IAutoBeApplicationResult>;
|
|
85
|
+
/**
|
|
86
|
+
* Run realize agent.
|
|
87
|
+
*
|
|
88
|
+
* Executes the Realize agent to implement the actual business logic for each
|
|
89
|
+
* API endpoint. This agent synthesizes all outputs from previous agents to
|
|
90
|
+
* generate fully functional service provider code.
|
|
91
|
+
*
|
|
92
|
+
* **PREREQUISITE**: Only call this function after the {@link interface}
|
|
93
|
+
* function has been successfully executed and API interfaces have been
|
|
94
|
+
* generated. The Realize agent requires the completed API interface
|
|
95
|
+
* definitions to implement the corresponding service logic. It also benefits
|
|
96
|
+
* from having test code available for validation. Without completed interface
|
|
97
|
+
* design, this function should NOT be called.
|
|
98
|
+
*
|
|
99
|
+
* The agent will create service implementations with multiple validation
|
|
100
|
+
* layers: TypeScript compiler feedback, runtime validation through test
|
|
101
|
+
* execution, and quality optimization through internal review. The generated
|
|
102
|
+
* code handles database interactions through Prisma, implements security and
|
|
103
|
+
* validation checks, and processes business rules according to
|
|
104
|
+
* specifications.
|
|
105
|
+
*/
|
|
106
|
+
realize(props: IAutoBeApplicationProps): Promise<IAutoBeApplicationResult>;
|
|
107
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAutoBeApplication.js","sourceRoot":"","sources":["../../../../src/context/IAutoBeApplication.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAutoBeApplicationProps.js","sourceRoot":"","sources":["../../../../src/context/IAutoBeApplicationProps.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAutoBeApplicationResult.js","sourceRoot":"","sources":["../../../../src/context/IAutoBeApplicationResult.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assertSchemaModel.js","sourceRoot":"","sources":["../../../../src/context/assertSchemaModel.ts"],"names":[],"mappings":";;AAEA,8CAcC;AAdD,SAAgB,iBAAiB,CAC/B,KAAY;IAEZ,IAAI,KAAK,KAAK,QAAQ;QACpB,MAAM,IAAI,KAAK,CACb;YACE,6DAA6D;YAC7D,gEAAgE;YAChE,+EAA+E;YAC/E,gEAAgE;YAChE,kEAAkE;YAClE,2CAA2C;SAC5C,CAAC,IAAI,CAAC,GAAG,CAAC,CACZ,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AgenticaOperation, MicroAgenticaHistory } from "@agentica/core";
|
|
2
|
+
import { AutoBeHistory } from "@autobe/interface";
|
|
3
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
4
|
+
export declare function createAgenticaHistory<Model extends ILlmSchema.Model>(props: {
|
|
5
|
+
operations: readonly AgenticaOperation<Model>[];
|
|
6
|
+
history: AutoBeHistory;
|
|
7
|
+
}): MicroAgenticaHistory<Model> | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createAgenticaHistory.js","sourceRoot":"","sources":["../../../../src/factory/createAgenticaHistory.ts"],"names":[],"mappings":";;AAQA,sDA2CC;AA3CD,SAAgB,qBAAqB,CAAiC,KAGrE;IACC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,aAAa;QACtC,uCACK,KAAK,CAAC,OAAO,KAChB,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,OAAmC,IACvD;SACC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,kBAAkB;QAChD,uCACK,KAAK,CAAC,OAAO,KAChB,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,OAAwC,IAC5D;IAEJ,MAAM,SAAS,GAAyC,KAAK,CAAC,UAAU,CAAC,IAAI,CAC3E,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,KAAK,KAAK,CAAC,OAAO,CAAC,IAAI,CAChD,CAAC;IACF,IAAI,SAAS,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACzC,MAAM,OAAO,GAAG;QACd,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE;QACpB,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU;QACpC,IAAI,EAAE,SAAkB;QACxB,SAAS,EAAE;YACT,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM;SAC7B;QACD,KAAK,EAAE;YACL,OAAO,EACL,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW;gBACpE,CAAC,CAAC,IAAI;gBACN,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,KAAK,SAAS;SAChD;KACF,CAAC;IACF,uCACK,OAAO,KACV,QAAQ,EAAE,SAAS,CAAC,QAAmB,EACvC,SAAS,EAAE,SAA2C,EACtD,MAAM,EAAE,GAAG,EAAE,CAAC,iCACT,OAAO,KACV,QAAQ,EAAE,SAAS,CAAC,QAAmB,EACvC,SAAS,EAAE,SAAS,CAAC,MAAM,EAAE,IAC7B,IACF;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IAgenticaController } from "@agentica/core";
|
|
2
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
+
import { AutoBeContext } from "../context/AutoBeContext";
|
|
4
|
+
export declare const createAutoBeController: <Model extends ILlmSchema.Model>(props: {
|
|
5
|
+
model: Model;
|
|
6
|
+
context: AutoBeContext<Model>;
|
|
7
|
+
}) => IAgenticaController.IClass<Model>;
|
|
@@ -80,7 +80,7 @@ const createAutoBeController = (props) => {
|
|
|
80
80
|
};
|
|
81
81
|
}),
|
|
82
82
|
prisma: (next) => __awaiter(void 0, void 0, void 0, function* () {
|
|
83
|
-
const r = yield (0, orchestratePrisma_1.orchestratePrisma)(props.context
|
|
83
|
+
const r = yield (0, orchestratePrisma_1.orchestratePrisma)(props.context, next);
|
|
84
84
|
if (r.type === "prisma")
|
|
85
85
|
return {
|
|
86
86
|
type: r.compiled.type,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createAutoBeApplication.js","sourceRoot":"","sources":["../../../../src/factory/createAutoB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAwD;IAC/D,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;CACd,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AutoBeEvent, AutoBeHistory, IAutoBeCompiler, IAutoBeCompilerListener, IAutoBeGetFilesOptions } from "@autobe/interface";
|
|
2
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
+
import { AutoBeContext } from "../context/AutoBeContext";
|
|
4
|
+
import { AutoBeState } from "../context/AutoBeState";
|
|
5
|
+
import { AutoBeTokenUsage } from "../context/AutoBeTokenUsage";
|
|
6
|
+
import { IAutoBeConfig } from "../structures/IAutoBeConfig";
|
|
7
|
+
import { IAutoBeVendor } from "../structures/IAutoBeVendor";
|
|
8
|
+
export declare const createAutoBeContext: <Model extends ILlmSchema.Model>(props: {
|
|
9
|
+
model: Model;
|
|
10
|
+
vendor: IAutoBeVendor;
|
|
11
|
+
compiler: () => Promise<IAutoBeCompiler>;
|
|
12
|
+
compilerListener: IAutoBeCompilerListener;
|
|
13
|
+
config: IAutoBeConfig;
|
|
14
|
+
state: () => AutoBeState;
|
|
15
|
+
files: (options: IAutoBeGetFilesOptions) => Promise<Record<string, string>>;
|
|
16
|
+
histories: () => AutoBeHistory[];
|
|
17
|
+
usage: () => AutoBeTokenUsage;
|
|
18
|
+
dispatch: (event: AutoBeEvent) => Promise<void>;
|
|
19
|
+
}) => AutoBeContext<Model>;
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.createAutoBeContext = void 0;
|
|
16
|
+
const core_1 = require("@agentica/core");
|
|
17
|
+
const typia_1 = __importDefault(require("typia"));
|
|
18
|
+
const uuid_1 = require("uuid");
|
|
19
|
+
const createAutoBeContext = (props) => {
|
|
20
|
+
var _a;
|
|
21
|
+
return ({
|
|
22
|
+
model: props.model,
|
|
23
|
+
vendor: props.vendor,
|
|
24
|
+
locale: (_a = props.config.locale) !== null && _a !== void 0 ? _a : "en-US",
|
|
25
|
+
compilerListener: props.compilerListener,
|
|
26
|
+
compiler: props.compiler,
|
|
27
|
+
files: props.files,
|
|
28
|
+
histories: props.histories,
|
|
29
|
+
state: props.state,
|
|
30
|
+
usage: props.usage,
|
|
31
|
+
dispatch: createDispatch(props),
|
|
32
|
+
assistantMessage: (message) => {
|
|
33
|
+
props.histories().push(message);
|
|
34
|
+
setTimeout(() => props.dispatch(message).catch(() => { }));
|
|
35
|
+
return message;
|
|
36
|
+
},
|
|
37
|
+
conversate: (next) => __awaiter(void 0, void 0, void 0, function* () {
|
|
38
|
+
const execute = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
39
|
+
var _a, _b;
|
|
40
|
+
const agent = new core_1.MicroAgentica({
|
|
41
|
+
model: props.model,
|
|
42
|
+
vendor: props.vendor,
|
|
43
|
+
config: Object.assign(Object.assign({}, ((_a = props.config) !== null && _a !== void 0 ? _a : {})), { executor: {
|
|
44
|
+
describe: null,
|
|
45
|
+
} }),
|
|
46
|
+
histories: next.histories,
|
|
47
|
+
controllers: [next.controller],
|
|
48
|
+
});
|
|
49
|
+
if (next.enforceFunctionCall === true)
|
|
50
|
+
agent.on("request", (event) => {
|
|
51
|
+
if (event.body.tools)
|
|
52
|
+
event.body.tool_choice = "required";
|
|
53
|
+
if (event.body.parallel_tool_calls !== undefined)
|
|
54
|
+
delete event.body.parallel_tool_calls;
|
|
55
|
+
});
|
|
56
|
+
const histories = yield agent.conversate(next.message);
|
|
57
|
+
const tokenUsage = agent
|
|
58
|
+
.getTokenUsage()
|
|
59
|
+
.toJSON().aggregate;
|
|
60
|
+
props
|
|
61
|
+
.usage()
|
|
62
|
+
.record(tokenUsage, [
|
|
63
|
+
(_b = STAGES.find((stage) => next.source.startsWith(stage))) !== null && _b !== void 0 ? _b : "analyze",
|
|
64
|
+
]);
|
|
65
|
+
if (next.enforceFunctionCall === true &&
|
|
66
|
+
histories.every((h) => h.type !== "execute"))
|
|
67
|
+
throw new Error(`Failed to function calling in the ${next.source} step`);
|
|
68
|
+
return { histories, tokenUsage };
|
|
69
|
+
});
|
|
70
|
+
if (next.enforceFunctionCall === true)
|
|
71
|
+
return forceRetry(() => execute());
|
|
72
|
+
else
|
|
73
|
+
return execute();
|
|
74
|
+
}),
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
exports.createAutoBeContext = createAutoBeContext;
|
|
78
|
+
const createDispatch = (props) => {
|
|
79
|
+
let analyzeStart = null;
|
|
80
|
+
let prismaStart = null;
|
|
81
|
+
let interfaceStart = null;
|
|
82
|
+
let testStart = null;
|
|
83
|
+
let realizeStart = null;
|
|
84
|
+
return (event) => {
|
|
85
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
86
|
+
// starts
|
|
87
|
+
if (event.type === "analyzeStart")
|
|
88
|
+
analyzeStart = event;
|
|
89
|
+
else if (event.type === "prismaStart")
|
|
90
|
+
prismaStart = event;
|
|
91
|
+
else if (event.type === "interfaceStart")
|
|
92
|
+
interfaceStart = event;
|
|
93
|
+
else if (event.type === "testStart")
|
|
94
|
+
testStart = event;
|
|
95
|
+
else if (event.type === "realizeStart")
|
|
96
|
+
realizeStart = event;
|
|
97
|
+
// completes
|
|
98
|
+
else if (event.type === "analyzeComplete")
|
|
99
|
+
return transformAndDispatch({
|
|
100
|
+
dispatch: props.dispatch,
|
|
101
|
+
histories: props.histories,
|
|
102
|
+
state: props.state,
|
|
103
|
+
event,
|
|
104
|
+
history: {
|
|
105
|
+
type: "analyze",
|
|
106
|
+
id: (0, uuid_1.v4)(),
|
|
107
|
+
reason: (_a = analyzeStart === null || analyzeStart === void 0 ? void 0 : analyzeStart.reason) !== null && _a !== void 0 ? _a : "",
|
|
108
|
+
prefix: event.prefix,
|
|
109
|
+
roles: event.roles,
|
|
110
|
+
files: event.files,
|
|
111
|
+
created_at: (_b = analyzeStart === null || analyzeStart === void 0 ? void 0 : analyzeStart.created_at) !== null && _b !== void 0 ? _b : new Date().toISOString(),
|
|
112
|
+
completed_at: event.created_at,
|
|
113
|
+
step: event.step,
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
else if (event.type === "prismaComplete")
|
|
117
|
+
return transformAndDispatch({
|
|
118
|
+
dispatch: props.dispatch,
|
|
119
|
+
histories: props.histories,
|
|
120
|
+
state: props.state,
|
|
121
|
+
event,
|
|
122
|
+
history: {
|
|
123
|
+
type: "prisma",
|
|
124
|
+
id: (0, uuid_1.v4)(),
|
|
125
|
+
reason: (_c = prismaStart === null || prismaStart === void 0 ? void 0 : prismaStart.reason) !== null && _c !== void 0 ? _c : "",
|
|
126
|
+
schemas: event.schemas,
|
|
127
|
+
result: event.result,
|
|
128
|
+
compiled: event.compiled,
|
|
129
|
+
created_at: (_d = prismaStart === null || prismaStart === void 0 ? void 0 : prismaStart.created_at) !== null && _d !== void 0 ? _d : new Date().toISOString(),
|
|
130
|
+
completed_at: event.created_at,
|
|
131
|
+
step: event.step,
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
else if (event.type === "interfaceComplete")
|
|
135
|
+
return transformAndDispatch({
|
|
136
|
+
dispatch: props.dispatch,
|
|
137
|
+
histories: props.histories,
|
|
138
|
+
state: props.state,
|
|
139
|
+
event,
|
|
140
|
+
history: {
|
|
141
|
+
type: "interface",
|
|
142
|
+
id: (0, uuid_1.v4)(),
|
|
143
|
+
reason: (_e = interfaceStart === null || interfaceStart === void 0 ? void 0 : interfaceStart.reason) !== null && _e !== void 0 ? _e : "",
|
|
144
|
+
document: event.document,
|
|
145
|
+
created_at: (_f = interfaceStart === null || interfaceStart === void 0 ? void 0 : interfaceStart.created_at) !== null && _f !== void 0 ? _f : new Date().toISOString(),
|
|
146
|
+
completed_at: new Date().toISOString(),
|
|
147
|
+
step: event.step,
|
|
148
|
+
},
|
|
149
|
+
});
|
|
150
|
+
else if (event.type === "testComplete")
|
|
151
|
+
return transformAndDispatch({
|
|
152
|
+
dispatch: props.dispatch,
|
|
153
|
+
histories: props.histories,
|
|
154
|
+
state: props.state,
|
|
155
|
+
event,
|
|
156
|
+
history: {
|
|
157
|
+
type: "test",
|
|
158
|
+
id: (0, uuid_1.v4)(),
|
|
159
|
+
reason: (_g = testStart === null || testStart === void 0 ? void 0 : testStart.reason) !== null && _g !== void 0 ? _g : "",
|
|
160
|
+
files: event.files,
|
|
161
|
+
compiled: event.compiled,
|
|
162
|
+
created_at: (_h = testStart === null || testStart === void 0 ? void 0 : testStart.created_at) !== null && _h !== void 0 ? _h : new Date().toISOString(),
|
|
163
|
+
completed_at: new Date().toISOString(),
|
|
164
|
+
step: event.step,
|
|
165
|
+
},
|
|
166
|
+
});
|
|
167
|
+
else if (event.type === "realizeComplete")
|
|
168
|
+
return transformAndDispatch({
|
|
169
|
+
dispatch: props.dispatch,
|
|
170
|
+
histories: props.histories,
|
|
171
|
+
state: props.state,
|
|
172
|
+
event,
|
|
173
|
+
history: {
|
|
174
|
+
type: "realize",
|
|
175
|
+
id: (0, uuid_1.v4)(),
|
|
176
|
+
reason: (_j = realizeStart === null || realizeStart === void 0 ? void 0 : realizeStart.reason) !== null && _j !== void 0 ? _j : "",
|
|
177
|
+
authorizations: event.authorizations,
|
|
178
|
+
functions: event.functions,
|
|
179
|
+
controllers: event.controllers,
|
|
180
|
+
compiled: event.compiled,
|
|
181
|
+
created_at: (_k = realizeStart === null || realizeStart === void 0 ? void 0 : realizeStart.created_at) !== null && _k !== void 0 ? _k : new Date().toISOString(),
|
|
182
|
+
completed_at: new Date().toISOString(),
|
|
183
|
+
step: event.step,
|
|
184
|
+
},
|
|
185
|
+
});
|
|
186
|
+
props.dispatch(event).catch(() => { });
|
|
187
|
+
return null;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
const transformAndDispatch = (props) => {
|
|
191
|
+
props.histories().push(props.history);
|
|
192
|
+
props.state()[props.history.type] = props.history;
|
|
193
|
+
props.dispatch(props.event).catch(() => { });
|
|
194
|
+
return props.history;
|
|
195
|
+
};
|
|
196
|
+
const forceRetry = (task_1, ...args_1) => __awaiter(void 0, [task_1, ...args_1], void 0, function* (task, count = 2) {
|
|
197
|
+
let error = undefined;
|
|
198
|
+
for (let i = 0; i <= count; ++i)
|
|
199
|
+
try {
|
|
200
|
+
return yield task();
|
|
201
|
+
}
|
|
202
|
+
catch (e) {
|
|
203
|
+
error = e;
|
|
204
|
+
}
|
|
205
|
+
throw error;
|
|
206
|
+
});
|
|
207
|
+
const STAGES = [
|
|
208
|
+
"analyze",
|
|
209
|
+
"interface",
|
|
210
|
+
"prisma",
|
|
211
|
+
"realize",
|
|
212
|
+
"test"
|
|
213
|
+
];
|
|
214
|
+
//# sourceMappingURL=createAutoBeContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createAutoBeContext.js","sourceRoot":"","sources":["../../../../src/factory/createAutoBeContext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,yCAAqE;AA0BrE,kDAA0B;AAC1B,+BAA0B;AASnB,MAAM,mBAAmB,GAAG,CAAiC,KAWnE,EAAwB,EAAE;;IAAC,OAAA,CAAC;QAC3B,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,MAAM,EAAE,MAAA,KAAK,CAAC,MAAM,CAAC,MAAM,mCAAI,OAAO;QACtC,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;QACxC,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,QAAQ,EAAE,cAAc,CAAC,KAAK,CAAC;QAC/B,gBAAgB,EAAE,CAAC,OAAO,EAAE,EAAE;YAC5B,KAAK,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAChC,UAAU,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC,CAAC;YAC1D,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,UAAU,EAAE,CAAO,IAAI,EAAE,EAAE;YACzB,MAAM,OAAO,GAAG,GAAgD,EAAE;;gBAChE,MAAM,KAAK,GAAyB,IAAI,oBAAa,CAAQ;oBAC3D,KAAK,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,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,mCAAI,IAAI;KAC5D,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,iBAAiB,qBAS5B"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AutoBeHistory, IAutoBeCompiler, IAutoBeGetFilesOptions } from "@autobe/interface";
|
|
2
|
+
import { AutoBeState } from "../context/AutoBeState";
|
|
3
|
+
import { AutoBeTokenUsage } from "../context/AutoBeTokenUsage";
|
|
4
|
+
export declare function getAutoBeGenerated(compiler: IAutoBeCompiler, state: AutoBeState, histories: Readonly<AutoBeHistory[]>, tokenUsage: AutoBeTokenUsage, options?: Partial<IAutoBeGetFilesOptions>): Promise<Record<string, string>>;
|