@autobe/agent 0.17.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} +29 -1
- 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/{context → agent/src/context}/AutoBeTokenUsage.js +7 -0
- package/lib/agent/src/context/AutoBeTokenUsage.js.map +1 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.d.ts +116 -0
- package/lib/{context → agent/src/context}/AutoBeTokenUsageComponent.js +19 -2
- 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/agent/src/factory/createAutoBeApplication.js.map +1 -0
- package/lib/agent/src/factory/createAutoBeContext.d.ts +19 -0
- package/lib/{factory → agent/src/factory}/createAutoBeContext.js +90 -17
- 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 +3 -3
- 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.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/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 +7 -2
- 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/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.d.ts +3 -0
- package/lib/{orchestrate → 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/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +3 -0
- 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 +30 -13
- 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 +43 -44
- 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 +121 -83
- 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} +139 -248
- 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.map +1 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.d.ts +142 -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.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 +4 -4
- 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 +18 -16
- package/lib/context/AutoBeContext.d.ts +16 -5
- package/lib/index.mjs +8876 -4277
- 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/transformPrismaReviewHistories.d.ts +8 -0
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.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 +2 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.d.ts +105 -0
- package/lib/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.d.ts +43 -153
- 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 +9 -9
- package/src/AutoBeAgent.ts +37 -3
- package/src/AutoBeMockAgent.ts +41 -11
- package/src/constants/AutoBeSystemPromptConstant.ts +18 -16
- package/src/context/AutoBeContext.ts +30 -4
- package/src/context/AutoBeTokenUsage.ts +8 -0
- package/src/context/AutoBeTokenUsageComponent.ts +20 -2
- package/src/factory/createAutoBeApplication.ts +3 -11
- package/src/factory/createAutoBeContext.ts +64 -1
- package/src/factory/getAutoBeGenerated.ts +3 -3
- 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 -80
- 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 +10 -2
- 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/histories/transformPrismaReviewHistories.ts +66 -0
- package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +2 -2
- package/src/orchestrate/prisma/orchestratePrisma.ts +44 -15
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +16 -33
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +96 -58
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +118 -0
- package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +133 -139
- package/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.ts +2 -1
- package/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.ts +108 -0
- package/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.ts +43 -156
- 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 +100 -9
- 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 +5 -6
- 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.map +0 -1
- package/lib/context/AutoBeTokenUsageComponent.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/createAutoBeContext.js.map +0 -1
- package/lib/factory/createAutoBeState.js.map +0 -1
- package/lib/factory/getAutoBeGenerated.js.map +0 -1
- package/lib/factory/getAutoBeRealizeGenerated.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 -98
- 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/histories/transformPrismaComponentsHistories.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaHistories.d.ts +0 -3
- package/lib/orchestrate/prisma/histories/transformPrismaHistories.js +0 -55
- package/lib/orchestrate/prisma/histories/transformPrismaHistories.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +0 -48
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.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/structures/IAutoBePrismaComponentApplication.js.map +0 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.js.map +0 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.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 -63
- 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/histories/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}/createAutoBeApplication.js +0 -0
- /package/lib/{factory → agent/src/factory}/createAutoBeState.js +0 -0
- /package/lib/{factory → agent/src/factory}/getAutoBeRealizeGenerated.js +0 -0
- /package/lib/{factory → agent/src/factory}/index.js +0 -0
- /package/lib/{index.js → agent/src/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 → agent/src/orchestrate}/prisma/histories/transformPrismaComponentsHistories.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/prisma/structures/IAutoBePrismaComponentApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/prisma/structures/IAutoBePrismaCorrectApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/prisma/structures/IAutoBePrismaSchemaApplication.js +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
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
IAgenticaVendor,
|
|
3
|
+
IMicroAgenticaHistoryJson,
|
|
4
|
+
MicroAgenticaHistory,
|
|
5
|
+
} from "@agentica/core";
|
|
2
6
|
import {
|
|
3
7
|
AutoBeAnalyzeHistory,
|
|
4
8
|
AutoBeAssistantMessageEvent,
|
|
5
9
|
AutoBeAssistantMessageHistory,
|
|
6
10
|
AutoBeEvent,
|
|
11
|
+
AutoBeEventSource,
|
|
7
12
|
AutoBeHistory,
|
|
8
13
|
AutoBeInterfaceHistory,
|
|
9
14
|
AutoBePrismaHistory,
|
|
@@ -12,29 +17,39 @@ import {
|
|
|
12
17
|
IAutoBeCompiler,
|
|
13
18
|
IAutoBeCompilerListener,
|
|
14
19
|
IAutoBeGetFilesOptions,
|
|
20
|
+
IAutoBeTokenUsageJson,
|
|
15
21
|
} from "@autobe/interface";
|
|
16
|
-
import { ILlmSchema } from "@samchon/openapi";
|
|
22
|
+
import { ILlmController, ILlmSchema } from "@samchon/openapi";
|
|
17
23
|
|
|
18
|
-
import { IAutoBeConfig } from "../structures/IAutoBeConfig";
|
|
19
24
|
import { AutoBeState } from "./AutoBeState";
|
|
20
25
|
import { AutoBeTokenUsage } from "./AutoBeTokenUsage";
|
|
21
26
|
|
|
22
27
|
export interface AutoBeContext<Model extends ILlmSchema.Model> {
|
|
28
|
+
// configuration
|
|
23
29
|
model: Model;
|
|
24
30
|
vendor: IAgenticaVendor;
|
|
25
|
-
|
|
31
|
+
locale: string;
|
|
32
|
+
|
|
33
|
+
// accessors
|
|
26
34
|
compilerListener: IAutoBeCompilerListener;
|
|
27
35
|
compiler: () => Promise<IAutoBeCompiler>;
|
|
28
36
|
files: (options: IAutoBeGetFilesOptions) => Promise<Record<string, string>>;
|
|
29
37
|
histories: () => Readonly<AutoBeHistory[]>;
|
|
30
38
|
state: () => Readonly<AutoBeState>;
|
|
31
39
|
usage: () => AutoBeTokenUsage;
|
|
40
|
+
|
|
41
|
+
// events
|
|
32
42
|
dispatch: <Event extends Exclude<AutoBeEvent, AutoBeAssistantMessageEvent>>(
|
|
33
43
|
event: Event,
|
|
34
44
|
) => AutoBeContext.DispatchHistory<Event>;
|
|
35
45
|
assistantMessage: (
|
|
36
46
|
message: AutoBeAssistantMessageHistory,
|
|
37
47
|
) => AutoBeAssistantMessageHistory;
|
|
48
|
+
|
|
49
|
+
// factories
|
|
50
|
+
conversate(
|
|
51
|
+
props: AutoBeContext.IConversate<Model>,
|
|
52
|
+
): Promise<AutoBeContext.IResult<Model>>;
|
|
38
53
|
}
|
|
39
54
|
export namespace AutoBeContext {
|
|
40
55
|
export type DispatchHistory<
|
|
@@ -50,4 +65,15 @@ export namespace AutoBeContext {
|
|
|
50
65
|
testComplete: AutoBeTestHistory;
|
|
51
66
|
realizeComplete: AutoBeRealizeHistory;
|
|
52
67
|
};
|
|
68
|
+
export interface IConversate<Model extends ILlmSchema.Model> {
|
|
69
|
+
source: AutoBeEventSource;
|
|
70
|
+
controller: ILlmController<Model>;
|
|
71
|
+
histories: Array<IMicroAgenticaHistoryJson>;
|
|
72
|
+
enforceFunctionCall: boolean;
|
|
73
|
+
message: string;
|
|
74
|
+
}
|
|
75
|
+
export interface IResult<Model extends ILlmSchema.Model> {
|
|
76
|
+
histories: MicroAgenticaHistory<Model>[];
|
|
77
|
+
tokenUsage: IAutoBeTokenUsageJson.IComponent;
|
|
78
|
+
}
|
|
53
79
|
}
|
|
@@ -234,6 +234,14 @@ export class AutoBeTokenUsage implements IAutoBeTokenUsageJson {
|
|
|
234
234
|
return this;
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
+
/** @internal */
|
|
238
|
+
public decrement(usage: AutoBeTokenUsage) {
|
|
239
|
+
AutoBeTokenUsage.keys().forEach((key) => {
|
|
240
|
+
this[key].decrement(usage[key]);
|
|
241
|
+
});
|
|
242
|
+
return this;
|
|
243
|
+
}
|
|
244
|
+
|
|
237
245
|
/**
|
|
238
246
|
* Create a new instance combining token usage from two sources.
|
|
239
247
|
*
|
|
@@ -114,8 +114,16 @@ export class AutoBeTokenUsageComponent
|
|
|
114
114
|
public toJSON(): IAutoBeTokenUsageJson.IComponent {
|
|
115
115
|
return {
|
|
116
116
|
total: this.total,
|
|
117
|
-
input:
|
|
118
|
-
|
|
117
|
+
input: {
|
|
118
|
+
total: this.input.total,
|
|
119
|
+
cached: this.input.cached,
|
|
120
|
+
},
|
|
121
|
+
output: {
|
|
122
|
+
total: this.output.total,
|
|
123
|
+
reasoning: this.output.reasoning,
|
|
124
|
+
accepted_prediction: this.output.accepted_prediction,
|
|
125
|
+
rejected_prediction: this.output.rejected_prediction,
|
|
126
|
+
},
|
|
119
127
|
};
|
|
120
128
|
}
|
|
121
129
|
|
|
@@ -146,6 +154,16 @@ export class AutoBeTokenUsageComponent
|
|
|
146
154
|
this.output.rejected_prediction += props.output.rejected_prediction;
|
|
147
155
|
}
|
|
148
156
|
|
|
157
|
+
/** @internal */
|
|
158
|
+
public decrement(props: IAutoBeTokenUsageJson.IComponent) {
|
|
159
|
+
this.input.total -= props.input.total;
|
|
160
|
+
this.input.cached -= props.input.cached;
|
|
161
|
+
this.output.total -= props.output.total;
|
|
162
|
+
this.output.reasoning -= props.output.reasoning;
|
|
163
|
+
this.output.accepted_prediction -= props.output.accepted_prediction;
|
|
164
|
+
this.output.rejected_prediction -= props.output.rejected_prediction;
|
|
165
|
+
}
|
|
166
|
+
|
|
149
167
|
/**
|
|
150
168
|
* Create new component combining two token usage statistics.
|
|
151
169
|
*
|
|
@@ -19,7 +19,7 @@ export const createAutoBeController = <Model extends ILlmSchema.Model>(props: {
|
|
|
19
19
|
assertSchemaModel(props.model);
|
|
20
20
|
const application: ILlmApplication<Model> = collection[
|
|
21
21
|
props.model
|
|
22
|
-
] as unknown as ILlmApplication<Model>;
|
|
22
|
+
] satisfies ILlmApplication<any> as unknown as ILlmApplication<Model>;
|
|
23
23
|
return {
|
|
24
24
|
protocol: "class",
|
|
25
25
|
name: "autobe",
|
|
@@ -113,17 +113,9 @@ export const createAutoBeController = <Model extends ILlmSchema.Model>(props: {
|
|
|
113
113
|
};
|
|
114
114
|
};
|
|
115
115
|
|
|
116
|
-
const claude = typia.llm.application<
|
|
117
|
-
IAutoBeApplication,
|
|
118
|
-
"claude",
|
|
119
|
-
{ reference: true }
|
|
120
|
-
>();
|
|
116
|
+
const claude = typia.llm.application<IAutoBeApplication, "claude">();
|
|
121
117
|
const collection = {
|
|
122
|
-
chatgpt: typia.llm.application<
|
|
123
|
-
IAutoBeApplication,
|
|
124
|
-
"chatgpt",
|
|
125
|
-
{ reference: true }
|
|
126
|
-
>(),
|
|
118
|
+
chatgpt: typia.llm.application<IAutoBeApplication, "chatgpt">(),
|
|
127
119
|
claude,
|
|
128
120
|
llama: claude,
|
|
129
121
|
deepseek: claude,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MicroAgentica, MicroAgenticaHistory } from "@agentica/core";
|
|
1
2
|
import {
|
|
2
3
|
AutoBeAnalyzeCompleteEvent,
|
|
3
4
|
AutoBeAnalyzeHistory,
|
|
@@ -20,13 +21,16 @@ import {
|
|
|
20
21
|
IAutoBeCompiler,
|
|
21
22
|
IAutoBeCompilerListener,
|
|
22
23
|
IAutoBeGetFilesOptions,
|
|
24
|
+
IAutoBeTokenUsageJson,
|
|
23
25
|
} from "@autobe/interface";
|
|
24
26
|
import { ILlmSchema } from "@samchon/openapi";
|
|
27
|
+
import typia from "typia";
|
|
25
28
|
import { v4 } from "uuid";
|
|
26
29
|
|
|
27
30
|
import { AutoBeContext } from "../context/AutoBeContext";
|
|
28
31
|
import { AutoBeState } from "../context/AutoBeState";
|
|
29
32
|
import { AutoBeTokenUsage } from "../context/AutoBeTokenUsage";
|
|
33
|
+
import { IAutoBeApplication } from "../context/IAutoBeApplication";
|
|
30
34
|
import { IAutoBeConfig } from "../structures/IAutoBeConfig";
|
|
31
35
|
import { IAutoBeVendor } from "../structures/IAutoBeVendor";
|
|
32
36
|
|
|
@@ -44,7 +48,7 @@ export const createAutoBeContext = <Model extends ILlmSchema.Model>(props: {
|
|
|
44
48
|
}): AutoBeContext<Model> => ({
|
|
45
49
|
model: props.model,
|
|
46
50
|
vendor: props.vendor,
|
|
47
|
-
|
|
51
|
+
locale: props.config.locale ?? "en-US",
|
|
48
52
|
compilerListener: props.compilerListener,
|
|
49
53
|
compiler: props.compiler,
|
|
50
54
|
files: props.files,
|
|
@@ -57,6 +61,49 @@ export const createAutoBeContext = <Model extends ILlmSchema.Model>(props: {
|
|
|
57
61
|
setTimeout(() => props.dispatch(message).catch(() => {}));
|
|
58
62
|
return message;
|
|
59
63
|
},
|
|
64
|
+
conversate: async (next) => {
|
|
65
|
+
const execute = async (): Promise<AutoBeContext.IResult<Model>> => {
|
|
66
|
+
const agent: MicroAgentica<Model> = new MicroAgentica<Model>({
|
|
67
|
+
model: props.model,
|
|
68
|
+
vendor: props.vendor,
|
|
69
|
+
config: {
|
|
70
|
+
...(props.config ?? {}),
|
|
71
|
+
executor: {
|
|
72
|
+
describe: null,
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
histories: next.histories,
|
|
76
|
+
controllers: [next.controller],
|
|
77
|
+
});
|
|
78
|
+
if (next.enforceFunctionCall === true)
|
|
79
|
+
agent.on("request", (event) => {
|
|
80
|
+
if (event.body.tools) event.body.tool_choice = "required";
|
|
81
|
+
if (event.body.parallel_tool_calls !== undefined)
|
|
82
|
+
delete event.body.parallel_tool_calls;
|
|
83
|
+
});
|
|
84
|
+
const histories: MicroAgenticaHistory<Model>[] = await agent.conversate(
|
|
85
|
+
next.message,
|
|
86
|
+
);
|
|
87
|
+
const tokenUsage: IAutoBeTokenUsageJson.IComponent = agent
|
|
88
|
+
.getTokenUsage()
|
|
89
|
+
.toJSON().aggregate;
|
|
90
|
+
props
|
|
91
|
+
.usage()
|
|
92
|
+
.record(tokenUsage, [
|
|
93
|
+
STAGES.find((stage) => next.source.startsWith(stage)) ?? "analyze",
|
|
94
|
+
]);
|
|
95
|
+
if (
|
|
96
|
+
next.enforceFunctionCall === true &&
|
|
97
|
+
histories.every((h) => h.type !== "execute")
|
|
98
|
+
)
|
|
99
|
+
throw new Error(
|
|
100
|
+
`Failed to function calling in the ${next.source} step`,
|
|
101
|
+
);
|
|
102
|
+
return { histories, tokenUsage };
|
|
103
|
+
};
|
|
104
|
+
if (next.enforceFunctionCall === true) return forceRetry(() => execute());
|
|
105
|
+
else return execute();
|
|
106
|
+
},
|
|
60
107
|
});
|
|
61
108
|
|
|
62
109
|
const createDispatch = (props: {
|
|
@@ -191,3 +238,19 @@ const transformAndDispatch = <
|
|
|
191
238
|
props.dispatch(props.event).catch(() => {});
|
|
192
239
|
return props.history;
|
|
193
240
|
};
|
|
241
|
+
|
|
242
|
+
const forceRetry = async <T>(
|
|
243
|
+
task: () => Promise<T>,
|
|
244
|
+
count: number = 2,
|
|
245
|
+
): Promise<T> => {
|
|
246
|
+
let error: unknown = undefined;
|
|
247
|
+
for (let i: number = 0; i <= count; ++i)
|
|
248
|
+
try {
|
|
249
|
+
return await task();
|
|
250
|
+
} catch (e) {
|
|
251
|
+
error = e;
|
|
252
|
+
}
|
|
253
|
+
throw error;
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
const STAGES = typia.misc.literals<keyof IAutoBeApplication>();
|
|
@@ -21,9 +21,9 @@ export async function getAutoBeGenerated(
|
|
|
21
21
|
Object.assign<Record<string, string>, Record<string, string>>(
|
|
22
22
|
ret,
|
|
23
23
|
Object.fromEntries(
|
|
24
|
-
|
|
25
|
-
`docs/analysis/${
|
|
26
|
-
|
|
24
|
+
state.analyze.files.map((file) => [
|
|
25
|
+
`docs/analysis/${file.filename.split("/").at(-1)}`,
|
|
26
|
+
file.content,
|
|
27
27
|
]),
|
|
28
28
|
),
|
|
29
29
|
);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
+
import { AutoBeAnalyzeScenarioEvent } from "@autobe/interface";
|
|
3
|
+
import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
|
|
4
|
+
import { v4 } from "uuid";
|
|
5
|
+
|
|
6
|
+
import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
|
|
7
|
+
import { transformAnalyzeWriteHistories } from "./transformAnalyzeWriteHistories";
|
|
8
|
+
|
|
9
|
+
export const transformAnalyzeReviewerHistories = (
|
|
10
|
+
scenario: AutoBeAnalyzeScenarioEvent,
|
|
11
|
+
otherFiles: AutoBeAnalyzeFile[],
|
|
12
|
+
myFile: AutoBeAnalyzeFile,
|
|
13
|
+
): Array<
|
|
14
|
+
IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage
|
|
15
|
+
> => {
|
|
16
|
+
return [
|
|
17
|
+
...transformAnalyzeWriteHistories(scenario, myFile),
|
|
18
|
+
{
|
|
19
|
+
id: v4(),
|
|
20
|
+
created_at: new Date().toISOString(),
|
|
21
|
+
type: "assistantMessage",
|
|
22
|
+
text: [
|
|
23
|
+
"Here are the other documents written in other agents:",
|
|
24
|
+
"",
|
|
25
|
+
"```json",
|
|
26
|
+
JSON.stringify(otherFiles),
|
|
27
|
+
"```",
|
|
28
|
+
"",
|
|
29
|
+
"And here is the target document to review what you have written:",
|
|
30
|
+
"",
|
|
31
|
+
"```json",
|
|
32
|
+
JSON.stringify(myFile),
|
|
33
|
+
"```",
|
|
34
|
+
].join("\n"),
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: v4(),
|
|
38
|
+
created_at: new Date().toISOString(),
|
|
39
|
+
type: "systemMessage",
|
|
40
|
+
text: AutoBeSystemPromptConstant.ANALYZE_REVIEW,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: v4(),
|
|
44
|
+
created_at: new Date().toISOString(),
|
|
45
|
+
type: "assistantMessage",
|
|
46
|
+
text: [
|
|
47
|
+
`You have to review the ${myFile.filename} document.`,
|
|
48
|
+
"",
|
|
49
|
+
"Note that, never review others.",
|
|
50
|
+
].join("\n"),
|
|
51
|
+
},
|
|
52
|
+
];
|
|
53
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { IMicroAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
+
import { v4 } from "uuid";
|
|
4
|
+
|
|
5
|
+
import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
|
|
6
|
+
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
7
|
+
|
|
8
|
+
export function transformAnalyzeSceHistories<Model extends ILlmSchema.Model>(
|
|
9
|
+
ctx: AutoBeContext<Model>,
|
|
10
|
+
): Array<IMicroAgenticaHistoryJson> {
|
|
11
|
+
return [
|
|
12
|
+
...ctx
|
|
13
|
+
.histories()
|
|
14
|
+
.filter((h) => h.type === "userMessage" || h.type === "assistantMessage"),
|
|
15
|
+
{
|
|
16
|
+
id: v4(),
|
|
17
|
+
type: "systemMessage",
|
|
18
|
+
text: AutoBeSystemPromptConstant.ANALYZE_SCENARIO,
|
|
19
|
+
created_at: new Date().toISOString(),
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: v4(),
|
|
23
|
+
type: "systemMessage",
|
|
24
|
+
text: [
|
|
25
|
+
"One agent per page of the document you specify will write according to the instructions below.",
|
|
26
|
+
"You should also refer to the content to define the document list.",
|
|
27
|
+
"```",
|
|
28
|
+
AutoBeSystemPromptConstant.ANALYZE_WRITE,
|
|
29
|
+
"```",
|
|
30
|
+
].join("\n"),
|
|
31
|
+
created_at: new Date().toISOString(),
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
+
import { AutoBeAnalyzeScenarioEvent } from "@autobe/interface";
|
|
3
|
+
import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
|
|
4
|
+
import { v4 } from "uuid";
|
|
5
|
+
|
|
6
|
+
import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
|
|
7
|
+
|
|
8
|
+
export const transformAnalyzeWriteHistories = (
|
|
9
|
+
scenario: AutoBeAnalyzeScenarioEvent,
|
|
10
|
+
file: AutoBeAnalyzeFile.Scenario,
|
|
11
|
+
): Array<
|
|
12
|
+
IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage
|
|
13
|
+
> => {
|
|
14
|
+
return [
|
|
15
|
+
{
|
|
16
|
+
id: v4(),
|
|
17
|
+
created_at: new Date().toISOString(),
|
|
18
|
+
type: "systemMessage",
|
|
19
|
+
text: AutoBeSystemPromptConstant.ANALYZE_WRITE,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: v4(),
|
|
23
|
+
created_at: new Date().toISOString(),
|
|
24
|
+
type: "assistantMessage",
|
|
25
|
+
text: [
|
|
26
|
+
"## Metadata",
|
|
27
|
+
"",
|
|
28
|
+
`Prefix name of the service to create is ${scenario.prefix},`,
|
|
29
|
+
"and here is the list of the roles you should reference:",
|
|
30
|
+
"",
|
|
31
|
+
"```json",
|
|
32
|
+
JSON.stringify(scenario.roles),
|
|
33
|
+
"```",
|
|
34
|
+
"",
|
|
35
|
+
"Here is the entire list of the documents that would be published",
|
|
36
|
+
"in someday, and your role is to writing a document of them:",
|
|
37
|
+
"",
|
|
38
|
+
"## The other documents that would be published in someday",
|
|
39
|
+
"```json",
|
|
40
|
+
JSON.stringify(
|
|
41
|
+
scenario.files.filter((f) => f.filename !== file.filename),
|
|
42
|
+
),
|
|
43
|
+
"```",
|
|
44
|
+
"",
|
|
45
|
+
"## The document what you have to write",
|
|
46
|
+
"```json",
|
|
47
|
+
JSON.stringify(file),
|
|
48
|
+
"```",
|
|
49
|
+
"",
|
|
50
|
+
"## Language",
|
|
51
|
+
"",
|
|
52
|
+
`The language of the document is ${scenario.language ?? "en-US"}.`,
|
|
53
|
+
].join("\n"),
|
|
54
|
+
},
|
|
55
|
+
];
|
|
56
|
+
};
|
|
@@ -1,108 +1,89 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AutoBeAnalyzeHistory,
|
|
3
|
+
AutoBeAnalyzeReviewEvent,
|
|
4
|
+
AutoBeAnalyzeScenarioEvent,
|
|
5
|
+
AutoBeAnalyzeWriteEvent,
|
|
3
6
|
AutoBeAssistantMessageHistory,
|
|
4
7
|
} from "@autobe/interface";
|
|
8
|
+
import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
|
|
5
9
|
import { ILlmSchema } from "@samchon/openapi";
|
|
6
|
-
import { IPointer } from "tstl";
|
|
7
|
-
import { v4 } from "uuid";
|
|
8
10
|
|
|
9
11
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
10
12
|
import { IAutoBeApplicationProps } from "../../context/IAutoBeApplicationProps";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
13
|
+
import { IProgress } from "../internal/IProgress";
|
|
14
|
+
import { orchestrateAnalyzeReview } from "./orchestrateAnalyzeReview";
|
|
15
|
+
import { orchestrateAnalyzeScenario } from "./orchestrateAnalyzeScenario";
|
|
16
|
+
import { orchestrateAnalyzeWrite } from "./orchestrateAnalyzeWrite";
|
|
14
17
|
|
|
15
|
-
/** @todo Kakasoo */
|
|
16
18
|
export const orchestrateAnalyze =
|
|
17
19
|
<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>) =>
|
|
18
20
|
async (
|
|
19
21
|
props: IAutoBeApplicationProps,
|
|
20
22
|
): Promise<AutoBeAssistantMessageHistory | AutoBeAnalyzeHistory> => {
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
+
// Initialize analysis state
|
|
24
|
+
const step: number = (ctx.state().analyze?.step ?? -1) + 1;
|
|
25
|
+
const startTime: Date = new Date();
|
|
26
|
+
|
|
23
27
|
ctx.dispatch({
|
|
24
28
|
type: "analyzeStart",
|
|
25
29
|
reason: props.reason,
|
|
26
30
|
step,
|
|
27
|
-
created_at,
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
const composeInputPointer: IPointer<IComposeInput | null> = { value: null };
|
|
31
|
-
const agentica = orchestrateAnalyzeComposer(ctx, (v) => {
|
|
32
|
-
composeInputPointer.value = v;
|
|
31
|
+
created_at: startTime.toISOString(),
|
|
33
32
|
});
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
].join("\n"),
|
|
42
|
-
)
|
|
43
|
-
.finally(() => {
|
|
44
|
-
const tokenUsage = agentica.getTokenUsage().aggregate;
|
|
45
|
-
ctx.usage().record(tokenUsage, ["analyze"]);
|
|
46
|
-
});
|
|
34
|
+
// Generate analysis scenario
|
|
35
|
+
const scenario: AutoBeAnalyzeScenarioEvent | AutoBeAssistantMessageHistory =
|
|
36
|
+
await orchestrateAnalyzeScenario(ctx);
|
|
37
|
+
if (scenario.type === "assistantMessage")
|
|
38
|
+
return ctx.assistantMessage(scenario);
|
|
39
|
+
else ctx.dispatch(scenario);
|
|
47
40
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
id: v4(),
|
|
52
|
-
text: "Failed to analyze your request. please request again.",
|
|
53
|
-
type: "assistantMessage",
|
|
54
|
-
completed_at: new Date().toISOString(),
|
|
55
|
-
created_at: new Date().toISOString(),
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
const { files: tableOfContents, prefix, roles } = composeInput;
|
|
59
|
-
if (tableOfContents.length === 0)
|
|
60
|
-
return ctx.assistantMessage({
|
|
61
|
-
id: v4(),
|
|
62
|
-
type: "assistantMessage",
|
|
63
|
-
text: "The current requirements are insufficient, so file generation will be suspended. It would be better to continue the conversation.",
|
|
64
|
-
created_at,
|
|
65
|
-
completed_at: new Date().toISOString(),
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
const retryCount = 3 as const;
|
|
69
|
-
const progress = {
|
|
70
|
-
total: tableOfContents.length * retryCount,
|
|
41
|
+
// write documents
|
|
42
|
+
const writeProgress: IProgress = {
|
|
43
|
+
total: scenario.files.length,
|
|
71
44
|
completed: 0,
|
|
72
45
|
};
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
46
|
+
const fileList: AutoBeAnalyzeFile[] = await Promise.all(
|
|
47
|
+
scenario.files.map(async (file) => {
|
|
48
|
+
const event: AutoBeAnalyzeWriteEvent = await orchestrateAnalyzeWrite(
|
|
49
|
+
ctx,
|
|
50
|
+
scenario,
|
|
51
|
+
file,
|
|
52
|
+
writeProgress,
|
|
53
|
+
);
|
|
54
|
+
return event.file;
|
|
82
55
|
}),
|
|
83
56
|
);
|
|
84
57
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
58
|
+
// review documents
|
|
59
|
+
const reviewProgress: IProgress = {
|
|
60
|
+
total: fileList.length,
|
|
61
|
+
completed: 0,
|
|
62
|
+
};
|
|
63
|
+
const newFiles: AutoBeAnalyzeFile[] = await Promise.all(
|
|
64
|
+
fileList.map(async (file, i) => {
|
|
65
|
+
const event: AutoBeAnalyzeReviewEvent = await orchestrateAnalyzeReview(
|
|
66
|
+
ctx,
|
|
67
|
+
scenario,
|
|
68
|
+
fileList.filter((_, j) => j !== i), // other files
|
|
69
|
+
file,
|
|
70
|
+
reviewProgress,
|
|
71
|
+
);
|
|
72
|
+
return {
|
|
73
|
+
...event.file,
|
|
74
|
+
content: event.content,
|
|
75
|
+
};
|
|
76
|
+
}),
|
|
77
|
+
);
|
|
90
78
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
return ctx.assistantMessage({
|
|
102
|
-
id: v4(),
|
|
103
|
-
type: "assistantMessage",
|
|
104
|
-
text: determined.find((el) => el.type === "assistantMessage")?.text ?? "",
|
|
105
|
-
created_at,
|
|
106
|
-
completed_at: new Date().toISOString(),
|
|
107
|
-
});
|
|
79
|
+
// Complete the analysis
|
|
80
|
+
return ctx.dispatch({
|
|
81
|
+
type: "analyzeComplete",
|
|
82
|
+
roles: scenario.roles,
|
|
83
|
+
prefix: scenario.prefix,
|
|
84
|
+
files: newFiles,
|
|
85
|
+
step,
|
|
86
|
+
elapsed: new Date().getTime() - startTime.getTime(),
|
|
87
|
+
created_at: new Date().toISOString(),
|
|
88
|
+
}) satisfies AutoBeAnalyzeHistory;
|
|
108
89
|
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { IAgenticaController } from "@agentica/core";
|
|
2
|
+
import {
|
|
3
|
+
AutoBeAnalyzeReviewEvent,
|
|
4
|
+
AutoBeAnalyzeScenarioEvent,
|
|
5
|
+
} from "@autobe/interface";
|
|
6
|
+
import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
|
|
7
|
+
import { ILlmApplication, ILlmSchema } from "@samchon/openapi";
|
|
8
|
+
import { IPointer } from "tstl";
|
|
9
|
+
import typia from "typia";
|
|
10
|
+
|
|
11
|
+
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
12
|
+
import { assertSchemaModel } from "../../context/assertSchemaModel";
|
|
13
|
+
import { IProgress } from "../internal/IProgress";
|
|
14
|
+
import { transformAnalyzeReviewerHistories } from "./histories/transformAnalyzeReviewerHistories";
|
|
15
|
+
import { IAutoBeAnalyzeReviewApplication } from "./structures/IAutoBeAnalyzeReviewApplication";
|
|
16
|
+
|
|
17
|
+
export const orchestrateAnalyzeReview = async <Model extends ILlmSchema.Model>(
|
|
18
|
+
ctx: AutoBeContext<Model>,
|
|
19
|
+
scenario: AutoBeAnalyzeScenarioEvent,
|
|
20
|
+
otherFiles: AutoBeAnalyzeFile[],
|
|
21
|
+
myFile: AutoBeAnalyzeFile,
|
|
22
|
+
progress: IProgress,
|
|
23
|
+
): Promise<AutoBeAnalyzeReviewEvent> => {
|
|
24
|
+
const pointer: IPointer<IAutoBeAnalyzeReviewApplication.IProps | null> = {
|
|
25
|
+
value: null,
|
|
26
|
+
};
|
|
27
|
+
const { tokenUsage } = await ctx.conversate({
|
|
28
|
+
source: "analyzeReview",
|
|
29
|
+
controller: createController({
|
|
30
|
+
model: ctx.model,
|
|
31
|
+
pointer,
|
|
32
|
+
}),
|
|
33
|
+
histories: [
|
|
34
|
+
...transformAnalyzeReviewerHistories(scenario, otherFiles, myFile),
|
|
35
|
+
],
|
|
36
|
+
enforceFunctionCall: true,
|
|
37
|
+
message: "Review the requirement document",
|
|
38
|
+
});
|
|
39
|
+
if (pointer.value === null)
|
|
40
|
+
throw new Error("Failed to extract review information.");
|
|
41
|
+
|
|
42
|
+
const event: AutoBeAnalyzeReviewEvent = {
|
|
43
|
+
type: "analyzeReview",
|
|
44
|
+
file: myFile,
|
|
45
|
+
plan: pointer.value.plan,
|
|
46
|
+
review: pointer.value.review,
|
|
47
|
+
content: pointer.value.content,
|
|
48
|
+
tokenUsage,
|
|
49
|
+
total: progress.total,
|
|
50
|
+
completed: ++progress.completed,
|
|
51
|
+
step: (ctx.state().analyze?.step ?? -1) + 1,
|
|
52
|
+
created_at: new Date().toISOString(),
|
|
53
|
+
};
|
|
54
|
+
ctx.dispatch(event);
|
|
55
|
+
return event;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
function createController<Model extends ILlmSchema.Model>(props: {
|
|
59
|
+
model: Model;
|
|
60
|
+
pointer: IPointer<IAutoBeAnalyzeReviewApplication.IProps | null>;
|
|
61
|
+
}): IAgenticaController.IClass<Model> {
|
|
62
|
+
assertSchemaModel(props.model);
|
|
63
|
+
|
|
64
|
+
const application: ILlmApplication<Model> = collection[
|
|
65
|
+
props.model === "chatgpt" ? "chatgpt" : "claude"
|
|
66
|
+
] satisfies ILlmApplication<any> as unknown as ILlmApplication<Model>;
|
|
67
|
+
return {
|
|
68
|
+
protocol: "class",
|
|
69
|
+
name: "Reviewer",
|
|
70
|
+
application,
|
|
71
|
+
execute: {
|
|
72
|
+
review: (input) => {
|
|
73
|
+
props.pointer.value = input;
|
|
74
|
+
},
|
|
75
|
+
} satisfies IAutoBeAnalyzeReviewApplication,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const claude = typia.llm.application<
|
|
80
|
+
IAutoBeAnalyzeReviewApplication,
|
|
81
|
+
"claude"
|
|
82
|
+
>();
|
|
83
|
+
const collection = {
|
|
84
|
+
chatgpt: typia.llm.application<IAutoBeAnalyzeReviewApplication, "chatgpt">(),
|
|
85
|
+
claude,
|
|
86
|
+
llama: claude,
|
|
87
|
+
deepseek: claude,
|
|
88
|
+
"3.1": claude,
|
|
89
|
+
};
|