@autobe/agent 0.17.1 → 0.19.1
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 +2 -10
- package/lib/agent/src/AutoBeAgent.d.ts +52 -0
- package/lib/{AutoBeAgent.js → agent/src/AutoBeAgent.js} +34 -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 +7 -0
- package/lib/{AutoBeMockAgent.js → agent/src/AutoBeMockAgent.js} +40 -5
- package/lib/agent/src/AutoBeMockAgent.js.map +1 -0
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +28 -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 +117 -0
- package/lib/{context → agent/src/context}/AutoBeTokenUsageComponent.js +33 -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/consentFunctionCall.d.ts +10 -0
- package/lib/agent/src/factory/consentFunctionCall.js +212 -0
- package/lib/agent/src/factory/consentFunctionCall.js.map +1 -0
- package/lib/agent/src/factory/createAgenticaHistory.d.ts +7 -0
- package/lib/{factory → agent/src/factory}/createAgenticaHistory.js +1 -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/agent/src/factory/createAutoBeContext.js +271 -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 +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 +6 -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 +6 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +61 -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 +69 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +5 -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 +714 -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 +244 -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/{orchestrate → agent/src/orchestrate}/interface/histories/transformInterfaceAssetHistories.js +1 -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 +41 -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 +59 -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 +34 -9
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +1731 -0
- 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 +42 -36
- 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 +24 -38
- 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 +1774 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +1328 -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/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js +561 -0
- 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 +473 -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 +93 -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 +171 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +132 -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 +107 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +85 -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/interface/utils/validateAuthorizationSchema.d.ts +7 -0
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js +35 -0
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.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 +79 -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/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +52 -0
- 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 +40 -14
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/prisma/orchestratePrismaComponent.js +43 -48
- 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 +154 -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} +180 -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 +1662 -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/transformRealizeCorrectHistories.d.ts +14 -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/transformRealizeWriteAuthorizationsHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +278 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +14 -0
- package/lib/{orchestrate/realize/transformRealizeCoderHistories.js → agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js} +31 -92
- 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 +44 -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 +130 -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 +16 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +352 -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 +14 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +345 -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/IAutoBeRealizeCorrectApplication.d.ts +79 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.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/{orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts → agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts} +22 -88
- 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 +6 -1
- 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 +34 -0
- 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 +4 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +101 -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 +16 -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 +31 -47
- 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 +961 -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 +122 -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/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.js +3 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.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/agent/src/utils/predicateStateMessage.d.ts +4 -0
- package/lib/agent/src/utils/predicateStateMessage.js +87 -0
- package/lib/agent/src/utils/predicateStateMessage.js.map +1 -0
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +24 -28
- package/lib/context/AutoBeContext.d.ts +16 -5
- package/lib/context/AutoBeTokenUsageComponent.d.ts +1 -0
- package/lib/factory/consentFunctionCall.d.ts +10 -0
- package/lib/index.mjs +11323 -5336
- 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 +6 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +4 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +6 -0
- package/lib/orchestrate/analyze/orchestrateAnalyze.d.ts +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +5 -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 +2 -2
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +4 -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/IAutoBeInterfaceComplementApplication.d.ts +38 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.d.ts +2 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +16 -16
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +64 -15
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +132 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +46 -14
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +85 -0
- package/lib/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +7 -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 -2
- 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/transformRealizeCorrectHistories.d.ts +14 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +3 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +14 -0
- package/lib/orchestrate/realize/internal/compile.d.ts +7 -0
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +16 -0
- package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +91 -0
- package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +14 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +10 -3
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +79 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +38 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +279 -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 +4 -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/IAutoBeTestCorrectApplication.d.ts +6 -5
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +25 -24
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -1
- package/lib/utils/predicateStateMessage.d.ts +4 -0
- package/package.json +9 -9
- package/src/AutoBeAgent.ts +51 -3
- package/src/AutoBeMockAgent.ts +44 -16
- package/src/constants/AutoBeSystemPromptConstant.ts +24 -28
- package/src/context/AutoBeContext.ts +30 -4
- package/src/context/AutoBeTokenUsage.ts +8 -0
- package/src/context/AutoBeTokenUsageComponent.ts +40 -2
- package/src/factory/consentFunctionCall.ts +128 -0
- package/src/factory/createAgenticaHistory.ts +1 -0
- package/src/factory/createAutoBeApplication.ts +3 -11
- package/src/factory/createAutoBeContext.ts +149 -1
- package/src/factory/getAutoBeGenerated.ts +3 -3
- package/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.ts +60 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +34 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +78 -0
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +66 -80
- package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +89 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +99 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +53 -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/transformInterfaceAssetHistories.ts +1 -0
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +40 -0
- package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +17 -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 +69 -0
- package/src/orchestrate/interface/orchestrateInterface.ts +57 -10
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +209 -0
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +27 -44
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +28 -34
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +18 -48
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +216 -107
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +101 -0
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +180 -96
- package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +145 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.ts +49 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.ts +39 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.ts +2 -1
- package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +16 -16
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +67 -15
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +139 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +47 -14
- package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +92 -0
- package/src/orchestrate/interface/utils/validateAuthorizationSchema.ts +41 -0
- package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +9 -16
- package/src/orchestrate/prisma/histories/transformPrismaReviewHistories.ts +66 -0
- package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +2 -2
- package/src/orchestrate/prisma/orchestratePrisma.ts +55 -17
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +19 -49
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +96 -58
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +124 -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/histories/transformRealizeAuthorization.ts +48 -0
- package/src/orchestrate/realize/{transformRealizeAuthorizationCorrectHistories.ts → histories/transformRealizeAuthorizationCorrectHistories.ts} +28 -30
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +49 -0
- package/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.ts +285 -0
- package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +184 -0
- package/src/orchestrate/realize/internal/compile.ts +67 -0
- package/src/orchestrate/realize/orchestrateRealize.ts +125 -30
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +45 -57
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +19 -41
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +122 -0
- package/src/orchestrate/realize/{orchestrateRealizePlanner.ts → orchestrateRealizeScenario.ts} +15 -15
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +128 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +11 -3
- package/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.ts +81 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.ts +43 -0
- package/src/orchestrate/realize/structures/{IAutoBeRealizeCoderApplication.ts → IAutoBeRealizeWriteApplication.ts} +22 -95
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +10 -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 +121 -0
- package/src/orchestrate/test/{transformTestWriteHistories.ts → histories/transformTestWriteHistories.ts} +3 -3
- package/src/orchestrate/test/orchestrateTest.ts +17 -6
- package/src/orchestrate/test/orchestrateTestCorrect.ts +32 -62
- package/src/orchestrate/test/orchestrateTestScenario.ts +241 -168
- package/src/orchestrate/test/orchestrateTestWrite.ts +48 -71
- package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +6 -5
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +25 -24
- package/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.ts +7 -0
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +3 -1
- package/src/utils/predicateStateMessage.ts +107 -0
- 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 +0 -141
- 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 +0 -1643
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js +0 -411
- 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 +0 -85
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +0 -52
- 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.d.ts +0 -5
- 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 +0 -3
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +0 -56
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.js +0 -3
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +0 -2
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js +0 -5
- 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 +0 -34
- 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.d.ts +0 -5
- package/lib/utils/pipe.js +0 -14
- 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/structures/IAutoBeRealizeCompile.ts +0 -70
- package/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.ts +0 -2
- package/src/orchestrate/realize/transformRealizeAuthorization.ts +0 -44
- package/src/orchestrate/realize/transformRealizeCoderHistories.ts +0 -248
- 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/src/utils/pipe.ts +0 -39
- /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}/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/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/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 → 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/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}/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
|
@@ -1,30 +1,25 @@
|
|
|
1
|
+
import { IAgenticaController } from "@agentica/core";
|
|
1
2
|
import {
|
|
2
|
-
|
|
3
|
-
IAgenticaHistoryJson,
|
|
4
|
-
MicroAgentica,
|
|
5
|
-
} from "@agentica/core";
|
|
6
|
-
import {
|
|
3
|
+
AutoBeInterfaceAuthorization,
|
|
7
4
|
AutoBeOpenApi,
|
|
5
|
+
AutoBeProgressEventBase,
|
|
8
6
|
AutoBeTestScenario,
|
|
9
|
-
AutoBeTestScenarioEvent,
|
|
10
7
|
} from "@autobe/interface";
|
|
11
|
-
import { AutoBeEndpointComparator } from "@autobe/utils";
|
|
8
|
+
import { AutoBeEndpointComparator, MapUtil, StringUtil } from "@autobe/utils";
|
|
12
9
|
import { ILlmApplication, ILlmSchema, IValidation } from "@samchon/openapi";
|
|
13
10
|
import { HashMap, IPointer, Pair } from "tstl";
|
|
14
11
|
import typia from "typia";
|
|
15
|
-
import { v4 } from "uuid";
|
|
16
12
|
|
|
17
|
-
import { AutoBeSystemPromptConstant } from "../../constants/AutoBeSystemPromptConstant";
|
|
18
13
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
19
14
|
import { assertSchemaModel } from "../../context/assertSchemaModel";
|
|
20
15
|
import { divideArray } from "../../utils/divideArray";
|
|
21
|
-
import {
|
|
22
|
-
import { forceRetry } from "../../utils/forceRetry";
|
|
16
|
+
import { transformTestScenarioHistories } from "./histories/transformTestScenarioHistories";
|
|
23
17
|
import { IAutoBeTestScenarioApplication } from "./structures/IAutoBeTestScenarioApplication";
|
|
18
|
+
import { IAutoBeTestScenarioAuthorizationRole } from "./structures/IAutoBeTestScenarioAuthorizationRole";
|
|
24
19
|
|
|
25
20
|
export async function orchestrateTestScenario<Model extends ILlmSchema.Model>(
|
|
26
21
|
ctx: AutoBeContext<Model>,
|
|
27
|
-
): Promise<
|
|
22
|
+
): Promise<AutoBeTestScenario[]> {
|
|
28
23
|
const operations: AutoBeOpenApi.IOperation[] =
|
|
29
24
|
ctx.state().interface?.document.operations ?? [];
|
|
30
25
|
if (operations.length === 0) {
|
|
@@ -48,6 +43,7 @@ export async function orchestrateTestScenario<Model extends ILlmSchema.Model>(
|
|
|
48
43
|
AutoBeEndpointComparator.hashCode,
|
|
49
44
|
AutoBeEndpointComparator.equals,
|
|
50
45
|
);
|
|
46
|
+
|
|
51
47
|
const endpointNotFound: string = [
|
|
52
48
|
`You have to select one of the endpoints below`,
|
|
53
49
|
"",
|
|
@@ -56,6 +52,10 @@ export async function orchestrateTestScenario<Model extends ILlmSchema.Model>(
|
|
|
56
52
|
...operations.map((op) => `\`${op.method}\` | \`${op.path}\``).join("\n"),
|
|
57
53
|
].join("\n");
|
|
58
54
|
|
|
55
|
+
const progress: AutoBeProgressEventBase = {
|
|
56
|
+
total: operations.length,
|
|
57
|
+
completed: 0,
|
|
58
|
+
};
|
|
59
59
|
const exclude: IAutoBeTestScenarioApplication.IScenarioGroup[] = [];
|
|
60
60
|
let include: AutoBeOpenApi.IOperation[] = Array.from(operations);
|
|
61
61
|
|
|
@@ -67,15 +67,14 @@ export async function orchestrateTestScenario<Model extends ILlmSchema.Model>(
|
|
|
67
67
|
await Promise.all(
|
|
68
68
|
matrix.map(async (include) => {
|
|
69
69
|
exclude.push(
|
|
70
|
-
...(await
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
),
|
|
70
|
+
...(await divideAndConquer(
|
|
71
|
+
ctx,
|
|
72
|
+
dict,
|
|
73
|
+
endpointNotFound,
|
|
74
|
+
operations,
|
|
75
|
+
include,
|
|
76
|
+
exclude.map((x) => x.endpoint),
|
|
77
|
+
progress,
|
|
79
78
|
)),
|
|
80
79
|
);
|
|
81
80
|
}),
|
|
@@ -93,164 +92,99 @@ export async function orchestrateTestScenario<Model extends ILlmSchema.Model>(
|
|
|
93
92
|
});
|
|
94
93
|
} while (include.length > 0);
|
|
95
94
|
|
|
96
|
-
return {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
} satisfies AutoBeTestScenario;
|
|
107
|
-
});
|
|
108
|
-
}),
|
|
109
|
-
created_at: new Date().toISOString(),
|
|
110
|
-
} as AutoBeTestScenarioEvent;
|
|
95
|
+
return exclude.flatMap((pg) => {
|
|
96
|
+
return pg.scenarios.map((plan) => {
|
|
97
|
+
return {
|
|
98
|
+
endpoint: pg.endpoint,
|
|
99
|
+
draft: plan.draft,
|
|
100
|
+
functionName: plan.functionName,
|
|
101
|
+
dependencies: plan.dependencies,
|
|
102
|
+
} satisfies AutoBeTestScenario;
|
|
103
|
+
});
|
|
104
|
+
});
|
|
111
105
|
}
|
|
112
106
|
|
|
113
|
-
const
|
|
107
|
+
const divideAndConquer = async <Model extends ILlmSchema.Model>(
|
|
114
108
|
ctx: AutoBeContext<Model>,
|
|
115
109
|
dict: HashMap<AutoBeOpenApi.IEndpoint, AutoBeOpenApi.IOperation>,
|
|
116
110
|
endpointNotFound: string,
|
|
117
111
|
entire: AutoBeOpenApi.IOperation[],
|
|
118
|
-
include: AutoBeOpenApi.
|
|
112
|
+
include: AutoBeOpenApi.IOperation[],
|
|
119
113
|
exclude: AutoBeOpenApi.IEndpoint[],
|
|
114
|
+
progress: AutoBeProgressEventBase,
|
|
120
115
|
) => {
|
|
121
116
|
const pointer: IPointer<IAutoBeTestScenarioApplication.IScenarioGroup[]> = {
|
|
122
117
|
value: [],
|
|
123
118
|
};
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
119
|
+
|
|
120
|
+
const authorizations: AutoBeInterfaceAuthorization[] =
|
|
121
|
+
ctx.state().interface?.authorizations ?? [];
|
|
122
|
+
|
|
123
|
+
const { tokenUsage } = await ctx.conversate({
|
|
124
|
+
source: "testScenarios",
|
|
125
|
+
histories: transformTestScenarioHistories(
|
|
126
|
+
ctx.state(),
|
|
127
|
+
entire,
|
|
128
|
+
include,
|
|
129
|
+
exclude,
|
|
130
|
+
),
|
|
131
|
+
controller: createController({
|
|
132
|
+
model: ctx.model,
|
|
133
|
+
endpointNotFound,
|
|
134
|
+
dict,
|
|
135
|
+
authorizations,
|
|
136
|
+
build: (next) => {
|
|
137
|
+
pointer.value ??= [];
|
|
138
|
+
pointer.value.push(...next.scenarioGroups);
|
|
131
139
|
},
|
|
132
|
-
},
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
createApplication({
|
|
136
|
-
model: ctx.model,
|
|
137
|
-
endpointNotFound,
|
|
138
|
-
dict,
|
|
139
|
-
build: (next) => {
|
|
140
|
-
pointer.value ??= [];
|
|
141
|
-
pointer.value.push(...next.scenarioGroups);
|
|
142
|
-
},
|
|
143
|
-
}),
|
|
144
|
-
],
|
|
140
|
+
}),
|
|
141
|
+
enforceFunctionCall: true,
|
|
142
|
+
message: `Create e2e test scenarios.`,
|
|
145
143
|
});
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
144
|
+
if (pointer.value.length === 0) return [];
|
|
145
|
+
ctx.dispatch({
|
|
146
|
+
type: "testScenarios",
|
|
147
|
+
tokenUsage,
|
|
148
|
+
scenarios: pointer.value
|
|
149
|
+
.map((v) =>
|
|
150
|
+
v.scenarios.map(
|
|
151
|
+
(s) =>
|
|
152
|
+
({
|
|
153
|
+
endpoint: v.endpoint,
|
|
154
|
+
draft: s.draft,
|
|
155
|
+
functionName: s.functionName,
|
|
156
|
+
dependencies: s.dependencies,
|
|
157
|
+
}) satisfies AutoBeTestScenario,
|
|
158
|
+
),
|
|
159
|
+
)
|
|
160
|
+
.flat(),
|
|
161
|
+
completed: ++progress.completed,
|
|
162
|
+
total: progress.total,
|
|
163
|
+
step: ctx.state().interface?.step ?? 0,
|
|
164
|
+
created_at: new Date().toISOString(),
|
|
151
165
|
});
|
|
152
|
-
if (pointer.value.length === 0) {
|
|
153
|
-
console.error("Failed to create test plans. No function called.");
|
|
154
|
-
return [];
|
|
155
|
-
// @todo
|
|
156
|
-
// throw new Error("Failed to create test plans.");
|
|
157
|
-
}
|
|
158
166
|
return pointer.value;
|
|
159
167
|
};
|
|
160
168
|
|
|
161
|
-
|
|
162
|
-
entire: AutoBeOpenApi.IOperation[],
|
|
163
|
-
include: Pick<AutoBeOpenApi.IOperation, "method" | "path">[],
|
|
164
|
-
exclude: Pick<AutoBeOpenApi.IOperation, "method" | "path">[],
|
|
165
|
-
): Array<
|
|
166
|
-
IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage
|
|
167
|
-
> => [
|
|
168
|
-
{
|
|
169
|
-
id: v4(),
|
|
170
|
-
created_at: new Date().toISOString(),
|
|
171
|
-
type: "systemMessage",
|
|
172
|
-
text: AutoBeSystemPromptConstant.TEST_SCENARIO,
|
|
173
|
-
} satisfies IAgenticaHistoryJson.ISystemMessage,
|
|
174
|
-
{
|
|
175
|
-
id: v4(),
|
|
176
|
-
created_at: new Date().toISOString(),
|
|
177
|
-
type: "systemMessage",
|
|
178
|
-
text: [
|
|
179
|
-
"# Operations",
|
|
180
|
-
"Below are the full operations. Please refer to this.",
|
|
181
|
-
"Your role is to draft all test cases for each given Operation.",
|
|
182
|
-
"It is also permissible to write multiple test codes on a single endpoint.",
|
|
183
|
-
"However, rather than meaningless tests, business logic tests should be written and an E2E test situation should be assumed.",
|
|
184
|
-
"",
|
|
185
|
-
"Please carefully analyze each operation to identify all dependencies required for testing.",
|
|
186
|
-
"For example, if you want to test liking and then deleting a post,",
|
|
187
|
-
"you might think to test post creation, liking, and unlike operations.",
|
|
188
|
-
"However, even if not explicitly mentioned, user registration and login are essential prerequisites.",
|
|
189
|
-
"Pay close attention to IDs and related values in the API,",
|
|
190
|
-
"and ensure you identify all dependencies between endpoints.",
|
|
191
|
-
"",
|
|
192
|
-
"```json",
|
|
193
|
-
JSON.stringify(
|
|
194
|
-
entire.map((el) => ({
|
|
195
|
-
...el,
|
|
196
|
-
specification: undefined,
|
|
197
|
-
})),
|
|
198
|
-
),
|
|
199
|
-
"```",
|
|
200
|
-
].join("\n"),
|
|
201
|
-
} satisfies IAgenticaHistoryJson.ISystemMessage,
|
|
202
|
-
{
|
|
203
|
-
id: v4(),
|
|
204
|
-
created_at: new Date().toISOString(),
|
|
205
|
-
type: "systemMessage",
|
|
206
|
-
text: [
|
|
207
|
-
"# Included in Test Plan",
|
|
208
|
-
include
|
|
209
|
-
.map((el) => `- ${el.method.toUpperCase()}: ${el.path}`)
|
|
210
|
-
.join("\n"),
|
|
211
|
-
"",
|
|
212
|
-
"# Excluded from Test Plan",
|
|
213
|
-
"These are the endpoints that have already been used in test codes generated as part of a plan group.",
|
|
214
|
-
"These endpoints do not need to be tested again.",
|
|
215
|
-
"However, it is allowed to reference or depend on these endpoints when writing test codes for other purposes.",
|
|
216
|
-
exclude
|
|
217
|
-
.map((el) => `- ${el.method.toUpperCase()}: ${el.path}`)
|
|
218
|
-
.join("\n"),
|
|
219
|
-
].join("\n"),
|
|
220
|
-
} satisfies IAgenticaHistoryJson.ISystemMessage,
|
|
221
|
-
];
|
|
222
|
-
|
|
223
|
-
function createApplication<Model extends ILlmSchema.Model>(props: {
|
|
169
|
+
function createController<Model extends ILlmSchema.Model>(props: {
|
|
224
170
|
model: Model;
|
|
225
171
|
endpointNotFound: string;
|
|
226
172
|
dict: HashMap<AutoBeOpenApi.IEndpoint, AutoBeOpenApi.IOperation>;
|
|
173
|
+
authorizations: AutoBeInterfaceAuthorization[];
|
|
227
174
|
build: (next: IAutoBeTestScenarioApplication.IProps) => void;
|
|
228
175
|
}): IAgenticaController.IClass<Model> {
|
|
229
176
|
assertSchemaModel(props.model);
|
|
230
177
|
|
|
231
|
-
const
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
application.functions[0].validate = (next: unknown): IValidation => {
|
|
178
|
+
const validate = (
|
|
179
|
+
next: unknown,
|
|
180
|
+
): IValidation<IAutoBeTestScenarioApplication.IProps> => {
|
|
236
181
|
const result: IValidation<IAutoBeTestScenarioApplication.IProps> =
|
|
237
182
|
typia.validate<IAutoBeTestScenarioApplication.IProps>(next);
|
|
238
183
|
if (result.success === false) return result;
|
|
239
184
|
|
|
240
185
|
// merge to unique scenario groups
|
|
241
|
-
const scenarioGroups: IAutoBeTestScenarioApplication.IScenarioGroup[] =
|
|
242
|
-
|
|
243
|
-
const created = scenarioGroups.find(
|
|
244
|
-
(el) =>
|
|
245
|
-
el.endpoint.method === sg.endpoint.method &&
|
|
246
|
-
el.endpoint.path === sg.endpoint.path,
|
|
247
|
-
);
|
|
248
|
-
if (created) {
|
|
249
|
-
created.scenarios.push(...sg.scenarios);
|
|
250
|
-
} else {
|
|
251
|
-
scenarioGroups.push(sg);
|
|
252
|
-
}
|
|
253
|
-
});
|
|
186
|
+
const scenarioGroups: IAutoBeTestScenarioApplication.IScenarioGroup[] =
|
|
187
|
+
uniqueScenarioGroups(result.data.scenarioGroups);
|
|
254
188
|
|
|
255
189
|
// validate endpoints
|
|
256
190
|
const errors: IValidation.IError[] = [];
|
|
@@ -274,17 +208,145 @@ function createApplication<Model extends ILlmSchema.Model>(props: {
|
|
|
274
208
|
});
|
|
275
209
|
});
|
|
276
210
|
});
|
|
211
|
+
|
|
212
|
+
// Authentication Correction
|
|
213
|
+
const entireRoles: Map<string, IAutoBeTestScenarioAuthorizationRole> =
|
|
214
|
+
new Map();
|
|
215
|
+
for (const authorization of props.authorizations) {
|
|
216
|
+
for (const op of authorization.operations) {
|
|
217
|
+
if (op.authorizationType === null) continue;
|
|
218
|
+
const value: IAutoBeTestScenarioAuthorizationRole = MapUtil.take(
|
|
219
|
+
entireRoles,
|
|
220
|
+
authorization.role,
|
|
221
|
+
() => ({
|
|
222
|
+
name: authorization.role,
|
|
223
|
+
join: null,
|
|
224
|
+
login: null,
|
|
225
|
+
}),
|
|
226
|
+
);
|
|
227
|
+
if (op.authorizationType === "join") value.join = op;
|
|
228
|
+
else if (op.authorizationType === "login") value.login = op;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
scenarioGroups.forEach((group) => {
|
|
233
|
+
if (props.dict.has(group.endpoint) === false) return;
|
|
234
|
+
|
|
235
|
+
const operation: AutoBeOpenApi.IOperation = props.dict.get(
|
|
236
|
+
group.endpoint,
|
|
237
|
+
);
|
|
238
|
+
group.scenarios.forEach((scenario) => {
|
|
239
|
+
// gathere authorization roles
|
|
240
|
+
const localRoles: Map<string, IAutoBeTestScenarioAuthorizationRole> =
|
|
241
|
+
new Map();
|
|
242
|
+
const add = (operation: AutoBeOpenApi.IOperation) => {
|
|
243
|
+
const role: string | null = operation.authorizationRole;
|
|
244
|
+
if (role === null) return;
|
|
245
|
+
MapUtil.take(localRoles, role, () => ({
|
|
246
|
+
name: role,
|
|
247
|
+
join: null,
|
|
248
|
+
login: null,
|
|
249
|
+
}));
|
|
250
|
+
};
|
|
251
|
+
add(operation);
|
|
252
|
+
scenario.dependencies.forEach((d) => {
|
|
253
|
+
if (props.dict.has(d.endpoint) === false) return;
|
|
254
|
+
const depOperation: AutoBeOpenApi.IOperation = props.dict.get(
|
|
255
|
+
d.endpoint,
|
|
256
|
+
);
|
|
257
|
+
add(depOperation);
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
// Single role case - add join operation
|
|
261
|
+
if (localRoles.size === 1) {
|
|
262
|
+
const role: IAutoBeTestScenarioAuthorizationRole = localRoles
|
|
263
|
+
.values()
|
|
264
|
+
.next().value!;
|
|
265
|
+
if (role.join === null) {
|
|
266
|
+
const joinOperation: AutoBeOpenApi.IOperation | null =
|
|
267
|
+
entireRoles.get(role.name)?.join ?? null;
|
|
268
|
+
if (joinOperation === null) throw new Error("Unreachable code");
|
|
269
|
+
|
|
270
|
+
scenario.dependencies.push({
|
|
271
|
+
endpoint: {
|
|
272
|
+
method: joinOperation.method,
|
|
273
|
+
path: joinOperation.path,
|
|
274
|
+
},
|
|
275
|
+
purpose: StringUtil.trim`
|
|
276
|
+
Essential authentication prerequisite:
|
|
277
|
+
This join operation (${joinOperation.method} ${joinOperation.path}) must be executed before any operations requiring '${role.name}' role authorization.
|
|
278
|
+
It establishes the necessary user account and authentication context for the '${role.name}' role, enabling subsequent API calls that depend on this specific authorization level.
|
|
279
|
+
Without this join operation, the main scenario endpoint and its dependencies will fail due to insufficient authentication credentials.
|
|
280
|
+
`,
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// Multiple roles case - add both join and login operations
|
|
286
|
+
if (localRoles.size > 1) {
|
|
287
|
+
for (const role of localRoles.values()) {
|
|
288
|
+
if (role.join === null) {
|
|
289
|
+
const joinOperation: AutoBeOpenApi.IOperation | null =
|
|
290
|
+
entireRoles.get(role.name)?.join ?? null;
|
|
291
|
+
if (joinOperation === null) throw new Error("Unreachable code");
|
|
292
|
+
|
|
293
|
+
scenario.dependencies.push({
|
|
294
|
+
endpoint: {
|
|
295
|
+
path: joinOperation.path,
|
|
296
|
+
method: joinOperation.method,
|
|
297
|
+
},
|
|
298
|
+
purpose: StringUtil.trim`
|
|
299
|
+
Multi-actor authentication setup:
|
|
300
|
+
This join operation (${joinOperation.method} ${joinOperation.path}) is required to establish a '${role.name}' role user account in the system.
|
|
301
|
+
This scenario involves multiple authorization roles, requiring separate user accounts for each role to properly test cross-role interactions and authorization boundaries.
|
|
302
|
+
The join operation creates the foundational user identity that will be used throughout the test scenario for '${role.name}' specific operations.
|
|
303
|
+
This join operation is required for the '${role.name}' role authentication.
|
|
304
|
+
`,
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
if (role.login === null) {
|
|
308
|
+
const loginOperation: AutoBeOpenApi.IOperation | null =
|
|
309
|
+
entireRoles.get(role.name)?.login ?? null;
|
|
310
|
+
if (loginOperation === null) throw new Error("Unreachable code");
|
|
311
|
+
|
|
312
|
+
scenario.dependencies.push({
|
|
313
|
+
endpoint: {
|
|
314
|
+
path: loginOperation.path,
|
|
315
|
+
method: loginOperation.method,
|
|
316
|
+
},
|
|
317
|
+
purpose: StringUtil.trim`
|
|
318
|
+
Role switching authentication:
|
|
319
|
+
This login operation (${loginOperation.method} ${loginOperation.path}) enables dynamic user role switching during test execution for the '${role.name}' role.
|
|
320
|
+
In scenarios with multiple actors, the test agent needs to authenticate as different users to simulate real-world multi-user interactions.
|
|
321
|
+
This login operation ensures proper session management and authorization context switching, allowing the test to validate permissions, access controls, and business logic that span across different user roles within a single test scenario.
|
|
322
|
+
This login operation may be required for user role swapping between multiple actors.
|
|
323
|
+
`,
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
});
|
|
277
330
|
return errors.length === 0
|
|
278
331
|
? {
|
|
279
332
|
success: true,
|
|
280
|
-
data:
|
|
333
|
+
data: {
|
|
334
|
+
scenarioGroups,
|
|
335
|
+
},
|
|
281
336
|
}
|
|
282
337
|
: {
|
|
283
338
|
success: false,
|
|
284
|
-
data:
|
|
339
|
+
data: {
|
|
340
|
+
scenarioGroups,
|
|
341
|
+
},
|
|
285
342
|
errors,
|
|
286
343
|
};
|
|
287
344
|
};
|
|
345
|
+
const application: ILlmApplication<Model> = collection[
|
|
346
|
+
props.model === "chatgpt" ? "chatgpt" : "claude"
|
|
347
|
+
](
|
|
348
|
+
validate,
|
|
349
|
+
) satisfies ILlmApplication<any> as unknown as ILlmApplication<Model>;
|
|
288
350
|
return {
|
|
289
351
|
protocol: "class",
|
|
290
352
|
name: "Make test plans",
|
|
@@ -297,21 +359,32 @@ function createApplication<Model extends ILlmSchema.Model>(props: {
|
|
|
297
359
|
};
|
|
298
360
|
}
|
|
299
361
|
|
|
300
|
-
const
|
|
301
|
-
IAutoBeTestScenarioApplication,
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
362
|
+
const uniqueScenarioGroups = (
|
|
363
|
+
groups: IAutoBeTestScenarioApplication.IScenarioGroup[],
|
|
364
|
+
): IAutoBeTestScenarioApplication.IScenarioGroup[] =>
|
|
365
|
+
new HashMap(
|
|
366
|
+
groups.map((g) => new Pair(g.endpoint, g)),
|
|
367
|
+
AutoBeEndpointComparator.hashCode,
|
|
368
|
+
AutoBeEndpointComparator.equals,
|
|
369
|
+
)
|
|
370
|
+
.toJSON()
|
|
371
|
+
.map((it) => it.second);
|
|
372
|
+
|
|
307
373
|
const collection = {
|
|
308
|
-
chatgpt:
|
|
309
|
-
IAutoBeTestScenarioApplication,
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
374
|
+
chatgpt: (validate: Validator) =>
|
|
375
|
+
typia.llm.application<IAutoBeTestScenarioApplication, "chatgpt">({
|
|
376
|
+
validate: {
|
|
377
|
+
makeScenario: validate,
|
|
378
|
+
},
|
|
379
|
+
}),
|
|
380
|
+
claude: (validate: Validator) =>
|
|
381
|
+
typia.llm.application<IAutoBeTestScenarioApplication, "claude">({
|
|
382
|
+
validate: {
|
|
383
|
+
makeScenario: validate,
|
|
384
|
+
},
|
|
385
|
+
}),
|
|
317
386
|
};
|
|
387
|
+
|
|
388
|
+
type Validator = (
|
|
389
|
+
input: unknown,
|
|
390
|
+
) => IValidation<IAutoBeTestScenarioApplication.IProps>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { IAgenticaController
|
|
1
|
+
import { IAgenticaController } from "@agentica/core";
|
|
2
2
|
import {
|
|
3
|
+
AutoBeProgressEventBase,
|
|
3
4
|
AutoBeTestScenario,
|
|
4
5
|
AutoBeTestWriteEvent,
|
|
5
6
|
IAutoBeCompiler,
|
|
@@ -10,22 +11,21 @@ import typia from "typia";
|
|
|
10
11
|
|
|
11
12
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
12
13
|
import { assertSchemaModel } from "../../context/assertSchemaModel";
|
|
13
|
-
import { enforceToolCall } from "../../utils/enforceToolCall";
|
|
14
|
-
import { forceRetry } from "../../utils/forceRetry";
|
|
15
14
|
import { completeTestCode } from "./compile/completeTestCode";
|
|
16
15
|
import { getTestScenarioArtifacts } from "./compile/getTestScenarioArtifacts";
|
|
16
|
+
import { transformTestWriteHistories } from "./histories/transformTestWriteHistories";
|
|
17
17
|
import { IAutoBeTestScenarioArtifacts } from "./structures/IAutoBeTestScenarioArtifacts";
|
|
18
18
|
import { IAutoBeTestWriteApplication } from "./structures/IAutoBeTestWriteApplication";
|
|
19
19
|
import { IAutoBeTestWriteResult } from "./structures/IAutoBeTestWriteResult";
|
|
20
|
-
import { transformTestWriteHistories } from "./transformTestWriteHistories";
|
|
21
20
|
|
|
22
21
|
export async function orchestrateTestWrite<Model extends ILlmSchema.Model>(
|
|
23
22
|
ctx: AutoBeContext<Model>,
|
|
24
23
|
scenarios: AutoBeTestScenario[],
|
|
25
24
|
): Promise<IAutoBeTestWriteResult[]> {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
const progress: AutoBeProgressEventBase = {
|
|
26
|
+
total: scenarios.length,
|
|
27
|
+
completed: 0,
|
|
28
|
+
};
|
|
29
29
|
const result: Array<IAutoBeTestWriteResult | null> = await Promise.all(
|
|
30
30
|
/**
|
|
31
31
|
* Generate test code for each scenario. Maps through plans array to create
|
|
@@ -34,31 +34,20 @@ export async function orchestrateTestWrite<Model extends ILlmSchema.Model>(
|
|
|
34
34
|
*/
|
|
35
35
|
scenarios.map(async (scenario) => {
|
|
36
36
|
try {
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
total: scenarios.length,
|
|
52
|
-
step: ctx.state().interface?.step ?? 0,
|
|
53
|
-
};
|
|
54
|
-
ctx.dispatch(event);
|
|
55
|
-
return {
|
|
56
|
-
scenario,
|
|
57
|
-
artifacts,
|
|
58
|
-
event,
|
|
59
|
-
};
|
|
60
|
-
});
|
|
61
|
-
return r;
|
|
37
|
+
const artifacts: IAutoBeTestScenarioArtifacts =
|
|
38
|
+
await getTestScenarioArtifacts(ctx, scenario);
|
|
39
|
+
const event: AutoBeTestWriteEvent = await process(
|
|
40
|
+
ctx,
|
|
41
|
+
scenario,
|
|
42
|
+
artifacts,
|
|
43
|
+
progress,
|
|
44
|
+
);
|
|
45
|
+
ctx.dispatch(event);
|
|
46
|
+
return {
|
|
47
|
+
scenario,
|
|
48
|
+
artifacts,
|
|
49
|
+
event,
|
|
50
|
+
};
|
|
62
51
|
} catch {
|
|
63
52
|
return null;
|
|
64
53
|
}
|
|
@@ -75,48 +64,46 @@ export async function orchestrateTestWrite<Model extends ILlmSchema.Model>(
|
|
|
75
64
|
* @param ctx - The AutoBeContext containing model, vendor and configuration
|
|
76
65
|
* @param scenario - The test scenario information to generate code for
|
|
77
66
|
* @param artifacts - The artifacts containing the reference files and schemas
|
|
78
|
-
* @returns Promise resolving to IAutoBeTestWriteApplication.IProps containing
|
|
79
|
-
* the generated test code
|
|
80
67
|
*/
|
|
81
68
|
async function process<Model extends ILlmSchema.Model>(
|
|
82
69
|
ctx: AutoBeContext<Model>,
|
|
83
70
|
scenario: AutoBeTestScenario,
|
|
84
71
|
artifacts: IAutoBeTestScenarioArtifacts,
|
|
85
|
-
|
|
72
|
+
progress: AutoBeProgressEventBase,
|
|
73
|
+
): Promise<AutoBeTestWriteEvent> {
|
|
86
74
|
const pointer: IPointer<IAutoBeTestWriteApplication.IProps | null> = {
|
|
87
75
|
value: null,
|
|
88
76
|
};
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
vendor: ctx.vendor,
|
|
92
|
-
config: {
|
|
93
|
-
...(ctx.config ?? {}),
|
|
94
|
-
},
|
|
77
|
+
const { tokenUsage } = await ctx.conversate({
|
|
78
|
+
source: "testWrite",
|
|
95
79
|
histories: transformTestWriteHistories(scenario, artifacts),
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
});
|
|
106
|
-
enforceToolCall(agentica);
|
|
107
|
-
|
|
108
|
-
await agentica.conversate("Create e2e test functions.").finally(() => {
|
|
109
|
-
const tokenUsage = agentica.getTokenUsage().aggregate;
|
|
110
|
-
ctx.usage().record(tokenUsage, ["test"]);
|
|
80
|
+
controller: createController({
|
|
81
|
+
model: ctx.model,
|
|
82
|
+
artifacts,
|
|
83
|
+
build: (next) => {
|
|
84
|
+
pointer.value = next;
|
|
85
|
+
},
|
|
86
|
+
}),
|
|
87
|
+
enforceFunctionCall: true,
|
|
88
|
+
message: "Create e2e test functions.",
|
|
111
89
|
});
|
|
112
90
|
if (pointer.value === null) throw new Error("Failed to create test code.");
|
|
113
91
|
|
|
114
92
|
const compiler: IAutoBeCompiler = await ctx.compiler();
|
|
115
93
|
pointer.value.final = await compiler.typescript.beautify(pointer.value.final);
|
|
116
|
-
return
|
|
94
|
+
return {
|
|
95
|
+
type: "testWrite",
|
|
96
|
+
created_at: new Date().toISOString(),
|
|
97
|
+
location: `test/features/api/${pointer.value.domain}/${scenario.functionName}.ts`,
|
|
98
|
+
...pointer.value,
|
|
99
|
+
tokenUsage,
|
|
100
|
+
completed: ++progress.completed,
|
|
101
|
+
total: progress.total,
|
|
102
|
+
step: ctx.state().interface?.step ?? 0,
|
|
103
|
+
} satisfies AutoBeTestWriteEvent;
|
|
117
104
|
}
|
|
118
105
|
|
|
119
|
-
function
|
|
106
|
+
function createController<Model extends ILlmSchema.Model>(props: {
|
|
120
107
|
model: Model;
|
|
121
108
|
artifacts: IAutoBeTestScenarioArtifacts;
|
|
122
109
|
build: (next: IAutoBeTestWriteApplication.IProps) => void;
|
|
@@ -125,7 +112,7 @@ function createApplication<Model extends ILlmSchema.Model>(props: {
|
|
|
125
112
|
|
|
126
113
|
const application: ILlmApplication<Model> = collection[
|
|
127
114
|
props.model
|
|
128
|
-
] as unknown as ILlmApplication<Model>;
|
|
115
|
+
] satisfies ILlmApplication<any> as unknown as ILlmApplication<Model>;
|
|
129
116
|
return {
|
|
130
117
|
protocol: "class",
|
|
131
118
|
name: "Create Test Code",
|
|
@@ -140,19 +127,9 @@ function createApplication<Model extends ILlmSchema.Model>(props: {
|
|
|
140
127
|
};
|
|
141
128
|
}
|
|
142
129
|
|
|
143
|
-
const claude = typia.llm.application<
|
|
144
|
-
IAutoBeTestWriteApplication,
|
|
145
|
-
"claude",
|
|
146
|
-
{
|
|
147
|
-
reference: true;
|
|
148
|
-
}
|
|
149
|
-
>();
|
|
130
|
+
const claude = typia.llm.application<IAutoBeTestWriteApplication, "claude">();
|
|
150
131
|
const collection = {
|
|
151
|
-
chatgpt: typia.llm.application<
|
|
152
|
-
IAutoBeTestWriteApplication,
|
|
153
|
-
"chatgpt",
|
|
154
|
-
{ reference: true }
|
|
155
|
-
>(),
|
|
132
|
+
chatgpt: typia.llm.application<IAutoBeTestWriteApplication, "chatgpt">(),
|
|
156
133
|
claude,
|
|
157
134
|
llama: claude,
|
|
158
135
|
deepseek: claude,
|