@autobe/agent 0.22.1 → 0.23.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/AutoBeAgent.d.ts +2 -1
- package/lib/{agent/src/AutoBeAgent.js → AutoBeAgent.js} +17 -3
- package/lib/AutoBeAgent.js.map +1 -0
- package/lib/AutoBeAgentBase.js.map +1 -0
- package/lib/{agent/src/AutoBeMockAgent.js → AutoBeMockAgent.js} +16 -0
- package/lib/AutoBeMockAgent.js.map +1 -0
- package/lib/constants/AutoBeConfigConstant.d.ts +3 -1
- package/lib/constants/AutoBeConfigConstant.js.map +1 -0
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +17 -15
- package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -0
- package/lib/context/AutoBeContext.js.map +1 -0
- package/lib/context/AutoBeState.js.map +1 -0
- package/lib/context/AutoBeTokenUsage.d.ts +1 -0
- package/lib/{agent/src/context → context}/AutoBeTokenUsage.js +8 -0
- package/lib/context/AutoBeTokenUsage.js.map +1 -0
- package/lib/context/AutoBeTokenUsageComponent.d.ts +1 -0
- package/lib/{agent/src/context → context}/AutoBeTokenUsageComponent.js +8 -0
- package/lib/context/AutoBeTokenUsageComponent.js.map +1 -0
- package/lib/context/IAutoBeApplication.js.map +1 -0
- package/lib/context/IAutoBeApplicationProps.js.map +1 -0
- package/lib/context/IAutoBeApplicationResult.js.map +1 -0
- package/lib/context/assertSchemaModel.js.map +1 -0
- package/lib/{agent/src/factory → factory}/consentFunctionCall.js +1 -1
- package/lib/factory/consentFunctionCall.js.map +1 -0
- package/lib/factory/createAgenticaHistory.js.map +1 -0
- package/lib/factory/createAutoBeApplication.js.map +1 -0
- package/lib/{agent/src/factory → factory}/createAutoBeContext.js +66 -20
- package/lib/factory/createAutoBeContext.js.map +1 -0
- package/lib/factory/createAutoBeState.js.map +1 -0
- package/lib/factory/getAutoBeGenerated.js.map +1 -0
- package/lib/factory/getAutoBeRealizeGenerated.js.map +1 -0
- package/lib/factory/getCriticalCompiler.d.ts +3 -0
- package/lib/factory/getCriticalCompiler.js +55 -0
- package/lib/factory/getCriticalCompiler.js.map +1 -0
- package/lib/factory/index.js.map +1 -0
- package/lib/index.js.map +1 -0
- package/lib/index.mjs +4827 -3025
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -0
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/analyze/orchestrateAnalyzeWrite.js +2 -4
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.js.map +1 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.js.map +1 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.js.map +1 -0
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.d.ts +8 -0
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.js +31 -0
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.js.map +1 -0
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.d.ts +18 -0
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +411 -0
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js.map +1 -0
- package/lib/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.d.ts +122 -0
- package/lib/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.js +3 -0
- package/lib/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.js.map +1 -0
- package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -0
- package/lib/orchestrate/index.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/interface/histories/transformInterfaceAuthorizationsHistories.js +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +63 -0
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/interface/histories/transformInterfaceEndpointsReviewHistories.js +4 -4
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +52 -0
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +36 -0
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +29 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +60 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/interface/orchestrateInterfaceComplement.js +2 -2
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/interface/orchestrateInterfaceOperations.js +193 -274
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js +1747 -0
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/interface/orchestrateInterfaceSchemas.js +2 -2
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +1 -1
- package/lib/{agent/src/orchestrate → orchestrate}/interface/orchestrateInterfaceSchemasReview.js +5 -7
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +247 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.js.map +1 -0
- package/lib/orchestrate/interface/utils/JsonSchemaFactory.js.map +1 -0
- package/lib/orchestrate/interface/utils/JsonSchemaNamingConvention.js.map +1 -0
- package/lib/orchestrate/interface/utils/JsonSchemaValidator.d.ts +6 -1
- package/lib/{agent/src/orchestrate → orchestrate}/interface/utils/JsonSchemaValidator.js +26 -24
- package/lib/orchestrate/interface/utils/JsonSchemaValidator.js.map +1 -0
- package/lib/orchestrate/interface/utils/OpenApiEndpointComparator.js.map +1 -0
- package/lib/{agent/src/orchestrate/interface/utils/JsonSchemaValidator.d.ts → orchestrate/interface/utils/OperationValidator.d.ts} +2 -2
- package/lib/orchestrate/interface/utils/OperationValidator.js +114 -0
- package/lib/orchestrate/interface/utils/OperationValidator.js.map +1 -0
- package/lib/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.js.map +1 -0
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -0
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -0
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -0
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -0
- package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -0
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/prisma/orchestratePrismaCorrect.js +2 -2
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -0
- package/lib/orchestrate/prisma/orchestratePrismaReview.js.map +1 -0
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -0
- package/lib/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.js.map +1 -0
- package/lib/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.js.map +1 -0
- package/lib/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.js.map +1 -0
- package/lib/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.js.map +1 -0
- package/lib/orchestrate/realize/ProviderCodeComparator.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/realize/histories/transformRealizeAuthorization.js +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/realize/histories/transformRealizeAuthorizationCorrectHistories.js +2 -2
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -0
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js +57 -0
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js +141 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -0
- package/lib/orchestrate/realize/internal/compileRealizeFiles.js.map +1 -0
- package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.d.ts +4 -0
- package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.js +505 -0
- package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/realize/orchestrateRealize.js +18 -8
- package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/realize/orchestrateRealizeAuthorizationCorrect.js +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +2 -15
- package/lib/{agent/src/orchestrate → orchestrate}/realize/orchestrateRealizeCorrect.js +48 -43
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.js.map +1 -0
- package/lib/orchestrate/realize/utils/AuthorizationFileSystem.js.map +1 -0
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.js.map +1 -0
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js.map +1 -0
- package/lib/orchestrate/realize/utils/InternalFileSystem.js.map +1 -0
- package/lib/orchestrate/realize/utils/ProviderFileSystem.js.map +1 -0
- package/lib/orchestrate/realize/utils/generateRealizeScenario.d.ts +25 -0
- package/lib/orchestrate/realize/utils/generateRealizeScenario.js +85 -0
- package/lib/orchestrate/realize/utils/generateRealizeScenario.js.map +1 -0
- package/lib/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js.map +1 -0
- package/lib/orchestrate/realize/utils/getRealizeWriteDto.js.map +1 -0
- package/lib/orchestrate/realize/utils/getRealizeWriteImportStatements.js.map +1 -0
- package/lib/orchestrate/realize/utils/getRealizeWriteInputType.js.map +1 -0
- package/lib/orchestrate/realize/utils/replaceImportStatements.js +98 -0
- package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +1 -0
- package/lib/orchestrate/test/compile/completeTestCode.js.map +1 -0
- package/lib/orchestrate/test/compile/filterTestFileName.js.map +1 -0
- package/lib/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -0
- package/lib/orchestrate/test/compile/getTestImportStatements.js.map +1 -0
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -0
- package/lib/orchestrate/test/compile/getTestTemplateCode.js.map +1 -0
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.js +51 -0
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -0
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.d.ts +4 -0
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.js +33 -0
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.js.map +1 -0
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.d.ts +1 -1
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.js +159 -0
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -0
- package/lib/orchestrate/test/histories/transformTestValidateEvent.d.ts +4 -0
- package/lib/orchestrate/test/histories/transformTestValidateEvent.js +11 -0
- package/lib/orchestrate/test/histories/transformTestValidateEvent.js.map +1 -0
- package/lib/orchestrate/test/histories/transformTestWriteHistories.js +220 -0
- package/lib/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/test/orchestrateTest.js +13 -7
- package/lib/orchestrate/test/orchestrateTest.js.map +1 -0
- package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +2 -2
- package/lib/orchestrate/test/orchestrateTestCorrect.js +513 -0
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -0
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.d.ts +7 -0
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js +425 -0
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/test/orchestrateTestScenario.js +32 -36
- package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/test/orchestrateTestWrite.js +23 -35
- package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectInvalidRequestApplication.d.ts +140 -0
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectInvalidRequestApplication.js +3 -0
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectInvalidRequestApplication.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestFunction.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestFunctionFailure.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +2 -2
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +38 -15
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/test/utils/getReferenceIds.js +1 -1
- package/lib/orchestrate/test/utils/getReferenceIds.js.map +1 -0
- package/lib/structures/IAutoBeConfig.d.ts +1 -0
- package/lib/structures/IAutoBeConfig.js.map +1 -0
- package/lib/structures/IAutoBeProps.js.map +1 -0
- package/lib/structures/IAutoBeVendor.js.map +1 -0
- package/lib/utils/AutoBeTimeoutError.d.ts +4 -0
- package/lib/utils/AutoBeTimeoutError.js +18 -0
- package/lib/utils/AutoBeTimeoutError.js.map +1 -0
- package/lib/utils/TimeoutConversation.d.ts +24 -0
- package/lib/utils/TimeoutConversation.js +65 -0
- package/lib/utils/TimeoutConversation.js.map +1 -0
- package/lib/utils/arrayToRecord.js.map +1 -0
- package/lib/utils/backoffRetry.js.map +1 -0
- package/lib/utils/divideArray.js.map +1 -0
- package/lib/utils/emplaceMap.js.map +1 -0
- package/lib/utils/executeCachedBatch.js.map +1 -0
- package/lib/utils/predicateStateMessage.js.map +1 -0
- package/package.json +6 -6
- package/src/AutoBeAgent.ts +16 -1
- package/src/AutoBeMockAgent.ts +13 -3
- package/src/constants/AutoBeConfigConstant.ts +3 -1
- package/src/constants/AutoBeSystemPromptConstant.ts +17 -15
- package/src/context/AutoBeTokenUsage.ts +9 -0
- package/src/context/AutoBeTokenUsageComponent.ts +9 -0
- package/src/factory/consentFunctionCall.ts +1 -1
- package/src/factory/createAutoBeContext.ts +68 -20
- package/src/factory/getCriticalCompiler.ts +47 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +2 -4
- package/src/orchestrate/common/histories/transformCommonCorrectCastingHistories.ts +43 -0
- package/src/orchestrate/common/orchestrateCommonCorrectCasting.ts +170 -0
- package/src/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.ts +127 -0
- package/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.ts +4 -4
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +2 -2
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +10 -94
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +49 -13
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +3 -2
- package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +5 -5
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +254 -4
- package/src/orchestrate/interface/utils/JsonSchemaValidator.ts +31 -26
- package/src/orchestrate/interface/utils/OperationValidator.ts +127 -0
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +2 -2
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +6 -0
- package/src/orchestrate/realize/orchestRateRealizeCorrectCasting.ts +317 -0
- package/src/orchestrate/realize/orchestrateRealize.ts +29 -14
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +1 -1
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +79 -67
- package/src/orchestrate/realize/utils/generateRealizeScenario.ts +104 -0
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +60 -32
- package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +4 -3
- package/src/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.ts +39 -0
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +75 -17
- package/src/orchestrate/test/histories/transformTestValidateEvent.ts +14 -0
- package/src/orchestrate/test/orchestrateTest.ts +11 -7
- package/src/orchestrate/test/orchestrateTestCorrect.ts +111 -33
- package/src/orchestrate/test/orchestrateTestCorrectInvalidRequest.ts +145 -0
- package/src/orchestrate/test/orchestrateTestScenario.ts +29 -13
- package/src/orchestrate/test/orchestrateTestWrite.ts +3 -1
- package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +233 -0
- package/src/orchestrate/test/structures/IAutoBeTestCorrectInvalidRequestApplication.ts +146 -0
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +2 -2
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +110 -15
- package/src/orchestrate/test/utils/getReferenceIds.ts +1 -1
- package/src/structures/IAutoBeConfig.ts +2 -0
- package/src/utils/AutoBeTimeoutError.ts +13 -0
- package/src/utils/TimeoutConversation.ts +82 -0
- package/lib/agent/src/AutoBeAgent.d.ts +0 -52
- package/lib/agent/src/AutoBeAgent.js.map +0 -1
- package/lib/agent/src/AutoBeAgentBase.d.ts +0 -18
- package/lib/agent/src/AutoBeAgentBase.js.map +0 -1
- package/lib/agent/src/AutoBeMockAgent.d.ts +0 -7
- package/lib/agent/src/AutoBeMockAgent.js.map +0 -1
- package/lib/agent/src/constants/AutoBeConfigConstant.d.ts +0 -3
- package/lib/agent/src/constants/AutoBeConfigConstant.js.map +0 -1
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +0 -29
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +0 -1
- package/lib/agent/src/context/AutoBeContext.d.ts +0 -43
- package/lib/agent/src/context/AutoBeContext.js.map +0 -1
- package/lib/agent/src/context/AutoBeState.d.ts +0 -8
- package/lib/agent/src/context/AutoBeState.js.map +0 -1
- package/lib/agent/src/context/AutoBeTokenUsage.d.ts +0 -173
- package/lib/agent/src/context/AutoBeTokenUsage.js.map +0 -1
- package/lib/agent/src/context/AutoBeTokenUsageComponent.d.ts +0 -117
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js.map +0 -1
- package/lib/agent/src/context/IAutoBeApplication.d.ts +0 -107
- package/lib/agent/src/context/IAutoBeApplication.js.map +0 -1
- package/lib/agent/src/context/IAutoBeApplicationProps.d.ts +0 -4
- package/lib/agent/src/context/IAutoBeApplicationProps.js.map +0 -1
- package/lib/agent/src/context/IAutoBeApplicationResult.d.ts +0 -4
- package/lib/agent/src/context/IAutoBeApplicationResult.js.map +0 -1
- package/lib/agent/src/context/assertSchemaModel.d.ts +0 -2
- package/lib/agent/src/context/assertSchemaModel.js.map +0 -1
- package/lib/agent/src/factory/consentFunctionCall.d.ts +0 -10
- package/lib/agent/src/factory/consentFunctionCall.js.map +0 -1
- package/lib/agent/src/factory/createAgenticaHistory.d.ts +0 -7
- package/lib/agent/src/factory/createAgenticaHistory.js.map +0 -1
- package/lib/agent/src/factory/createAutoBeApplication.d.ts +0 -7
- package/lib/agent/src/factory/createAutoBeApplication.js.map +0 -1
- package/lib/agent/src/factory/createAutoBeContext.d.ts +0 -19
- package/lib/agent/src/factory/createAutoBeContext.js.map +0 -1
- package/lib/agent/src/factory/createAutoBeState.d.ts +0 -3
- package/lib/agent/src/factory/createAutoBeState.js.map +0 -1
- package/lib/agent/src/factory/getAutoBeGenerated.d.ts +0 -4
- package/lib/agent/src/factory/getAutoBeGenerated.js.map +0 -1
- package/lib/agent/src/factory/getAutoBeRealizeGenerated.d.ts +0 -7
- package/lib/agent/src/factory/getAutoBeRealizeGenerated.js.map +0 -1
- package/lib/agent/src/factory/index.d.ts +0 -1
- package/lib/agent/src/factory/index.js.map +0 -1
- package/lib/agent/src/index.d.ts +0 -6
- package/lib/agent/src/index.js.map +0 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +0 -6
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +0 -4
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +0 -6
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.d.ts +0 -5
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js.map +0 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +0 -11
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js.map +0 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.d.ts +0 -4
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +0 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +0 -10
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +0 -1
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +0 -111
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +0 -78
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +0 -74
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.d.ts +0 -2
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.js.map +0 -1
- package/lib/agent/src/orchestrate/index.d.ts +0 -5
- package/lib/agent/src/orchestrate/index.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.d.ts +0 -3
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +0 -63
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +0 -5
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.d.ts +0 -3
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +0 -52
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.d.ts +0 -5
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +0 -36
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.d.ts +0 -3
- package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +0 -29
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +0 -60
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.d.ts +0 -5
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +0 -5
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +0 -10
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +0 -1416
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +0 -9
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.d.ts +0 -47
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +0 -93
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.d.ts +0 -24
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.d.ts +0 -60
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +0 -108
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +0 -171
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +0 -117
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +0 -107
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +0 -91
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaFactory.d.ts +0 -9
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaFactory.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaNamingConvention.d.ts +0 -5
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaNamingConvention.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaValidator.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/utils/OpenApiEndpointComparator.d.ts +0 -6
- package/lib/agent/src/orchestrate/interface/utils/OpenApiEndpointComparator.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.d.ts +0 -2
- package/lib/agent/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.d.ts +0 -3
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.d.ts +0 -3
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.d.ts +0 -8
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +0 -3
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.d.ts +0 -5
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.d.ts +0 -4
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.d.ts +0 -4
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.d.ts +0 -5
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.d.ts +0 -5
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.d.ts +0 -121
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.d.ts +0 -142
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.d.ts +0 -105
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.d.ts +0 -99
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/ProviderCodeComparator.d.ts +0 -5
- package/lib/agent/src/orchestrate/realize/ProviderCodeComparator.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.d.ts +0 -5
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.d.ts +0 -5
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +0 -14
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +0 -51
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +0 -3
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +0 -11
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +0 -141
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.d.ts +0 -7
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.d.ts +0 -5
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.d.ts +0 -10
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.d.ts +0 -4
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +0 -19
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -25
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js +0 -44
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +0 -11
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +0 -109
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +0 -47
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +0 -39
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.d.ts +0 -5
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.d.ts +0 -36
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +0 -295
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/utils/AuthorizationFileSystem.d.ts +0 -5
- package/lib/agent/src/orchestrate/realize/utils/AuthorizationFileSystem.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.d.ts +0 -5
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.d.ts +0 -4
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/utils/InternalFileSystem.d.ts +0 -8
- package/lib/agent/src/orchestrate/realize/utils/InternalFileSystem.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/utils/ProviderFileSystem.d.ts +0 -3
- package/lib/agent/src/orchestrate/realize/utils/ProviderFileSystem.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.d.ts +0 -31
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteDto.d.ts +0 -4
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteDto.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteImportStatements.d.ts +0 -2
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteImportStatements.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteInputType.d.ts +0 -30
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteInputType.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.d.ts +0 -8
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js +0 -77
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js.map +0 -1
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.d.ts +0 -4
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +0 -1
- package/lib/agent/src/orchestrate/test/compile/filterTestFileName.d.ts +0 -1
- package/lib/agent/src/orchestrate/test/compile/filterTestFileName.js.map +0 -1
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.d.ts +0 -3
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js.map +0 -1
- package/lib/agent/src/orchestrate/test/compile/getTestImportStatements.d.ts +0 -2
- package/lib/agent/src/orchestrate/test/compile/getTestImportStatements.js.map +0 -1
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +0 -5
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.js.map +0 -1
- package/lib/agent/src/orchestrate/test/compile/getTestTemplateCode.d.ts +0 -2
- package/lib/agent/src/orchestrate/test/compile/getTestTemplateCode.js.map +0 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.d.ts +0 -6
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +0 -50
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.d.ts +0 -4
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +0 -105
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.d.ts +0 -10
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +0 -220
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/test/orchestrateTest.d.ts +0 -5
- package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +0 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.d.ts +0 -5
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js +0 -405
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +0 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.d.ts +0 -4
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +0 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.d.ts +0 -5
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +0 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +0 -125
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunction.d.ts +0 -8
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunction.js.map +0 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.d.ts +0 -6
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.js.map +0 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +0 -161
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.d.ts +0 -8
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.js.map +0 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +0 -6
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.js.map +0 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +0 -126
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteResult.d.ts +0 -7
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +0 -1
- package/lib/agent/src/orchestrate/test/utils/getReferenceIds.d.ts +0 -5
- package/lib/agent/src/orchestrate/test/utils/getReferenceIds.js.map +0 -1
- package/lib/agent/src/structures/IAutoBeConfig.d.ts +0 -75
- package/lib/agent/src/structures/IAutoBeConfig.js.map +0 -1
- package/lib/agent/src/structures/IAutoBeProps.d.ts +0 -109
- package/lib/agent/src/structures/IAutoBeProps.js.map +0 -1
- package/lib/agent/src/structures/IAutoBeVendor.d.ts +0 -87
- package/lib/agent/src/structures/IAutoBeVendor.js.map +0 -1
- package/lib/agent/src/utils/arrayToRecord.d.ts +0 -17
- package/lib/agent/src/utils/arrayToRecord.js.map +0 -1
- package/lib/agent/src/utils/backoffRetry.d.ts +0 -22
- package/lib/agent/src/utils/backoffRetry.js.map +0 -1
- package/lib/agent/src/utils/divideArray.d.ts +0 -4
- package/lib/agent/src/utils/divideArray.js.map +0 -1
- package/lib/agent/src/utils/emplaceMap.d.ts +0 -1
- package/lib/agent/src/utils/emplaceMap.js.map +0 -1
- package/lib/agent/src/utils/executeCachedBatch.d.ts +0 -1
- package/lib/agent/src/utils/executeCachedBatch.js.map +0 -1
- package/lib/agent/src/utils/predicateStateMessage.d.ts +0 -4
- package/lib/agent/src/utils/predicateStateMessage.js.map +0 -1
- package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.d.ts +0 -153
- package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.js +0 -3
- package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -25
- package/src/orchestrate/realize/orchestrateRealizeScenario.ts +0 -57
- /package/lib/{agent/src/AutoBeAgentBase.js → AutoBeAgentBase.js} +0 -0
- /package/lib/{agent/src/constants → constants}/AutoBeConfigConstant.js +0 -0
- /package/lib/{agent/src/constants → constants}/AutoBeSystemPromptConstant.js +0 -0
- /package/lib/{agent/src/context → context}/AutoBeContext.js +0 -0
- /package/lib/{agent/src/context → context}/AutoBeState.js +0 -0
- /package/lib/{agent/src/context → context}/IAutoBeApplication.js +0 -0
- /package/lib/{agent/src/context → context}/IAutoBeApplicationProps.js +0 -0
- /package/lib/{agent/src/context → context}/IAutoBeApplicationResult.js +0 -0
- /package/lib/{agent/src/context → context}/assertSchemaModel.js +0 -0
- /package/lib/{agent/src/factory → factory}/createAgenticaHistory.js +0 -0
- /package/lib/{agent/src/factory → factory}/createAutoBeApplication.js +0 -0
- /package/lib/{agent/src/factory → factory}/createAutoBeState.js +0 -0
- /package/lib/{agent/src/factory → factory}/getAutoBeGenerated.js +0 -0
- /package/lib/{agent/src/factory → factory}/getAutoBeRealizeGenerated.js +0 -0
- /package/lib/{agent/src/factory → factory}/index.js +0 -0
- /package/lib/{agent/src/index.js → index.js} +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/analyze/histories/transformAnalyzeReviewHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/analyze/histories/transformAnalyzeScenarioHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/analyze/histories/transformAnalyzeWriteHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/analyze/orchestrateAnalyze.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/analyze/orchestrateAnalyzeReview.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/analyze/orchestrateAnalyzeScenario.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/analyze/structures/IAutoBeAnalyzeReviewApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/analyze/structures/IAutoBeAnalyzeScenarioApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/analyze/structures/IAutoBeAnalyzeWriteApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/facade/transformFacadeStateMessage.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/index.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/histories/transformInterfaceAssetHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/histories/transformInterfaceEndpointHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/histories/transformInterfaceGroupHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/histories/transformInterfacePrerequisiteHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/orchestrateInterface.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/orchestrateInterfaceAuthorizations.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/orchestrateInterfaceEndpoints.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/orchestrateInterfaceEndpointsReview.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/orchestrateInterfaceGroups.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/structures/IAutoBeInterfaceAuthorizationsApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/structures/IAutoBeInterfaceComplementApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/structures/IAutoBeInterfaceEndpointApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/structures/IAutoBeInterfaceGroupApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/structures/IAutoBeInterfaceOperationApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/structures/IAutoBeInterfaceOperationsReviewApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/structures/IAutoBeInterfaceSchemaApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/structures/IAutobeInterfaceSchemasReviewApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/utils/JsonSchemaFactory.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/utils/JsonSchemaNamingConvention.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/utils/OpenApiEndpointComparator.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/utils/fulfillJsonSchemaErrorMessages.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/histories/transformPrismaComponentsHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/histories/transformPrismaCorrectHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/histories/transformPrismaReviewHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/histories/transformPrismaSchemaHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/orchestratePrisma.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/orchestratePrismaComponent.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/orchestratePrismaReview.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/orchestratePrismaSchemas.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/structures/IAutoBePrismaComponentApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/structures/IAutoBePrismaCorrectApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/structures/IAutoBePrismaReviewApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/structures/IAutoBePrismaSchemaApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/ProviderCodeComparator.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/histories/transformRealizeWriteAuthorizationsHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/internal/compileRealizeFiles.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/orchestrateRealizeAuthorization.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/orchestrateRealizeWrite.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/structures/IAutoBeRealizeAuthorizationApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/structures/IAutoBeRealizeCorrectApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/structures/IAutoBeRealizeFunctionFailure.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/structures/IAutoBeRealizeScenarioResult.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/structures/IAutoBeRealizeWriteApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/utils/AuthorizationFileSystem.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/utils/AutoBeRealizeAuthorizationFileSystem.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/utils/InternalFileSystem.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/utils/ProviderFileSystem.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/utils/getRealizeWriteCodeTemplate.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/utils/getRealizeWriteDto.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/utils/getRealizeWriteImportStatements.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/utils/getRealizeWriteInputType.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/compile/completeTestCode.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/compile/filterTestFileName.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/compile/getTestExternalDeclarations.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/compile/getTestImportStatements.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/compile/getTestScenarioArtifacts.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/compile/getTestTemplateCode.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/structures/IAutoBeTestCorrectApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/structures/IAutoBeTestFunction.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/structures/IAutoBeTestFunctionFailure.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/structures/IAutoBeTestScenarioApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/structures/IAutoBeTestScenarioArtifacts.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/structures/IAutoBeTestScenarioAuthorizationRole.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/structures/IAutoBeTestWriteApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/structures/IAutoBeTestWriteResult.js +0 -0
- /package/lib/{agent/src/structures → structures}/IAutoBeConfig.js +0 -0
- /package/lib/{agent/src/structures → structures}/IAutoBeProps.js +0 -0
- /package/lib/{agent/src/structures → structures}/IAutoBeVendor.js +0 -0
- /package/lib/{agent/src/utils → utils}/arrayToRecord.js +0 -0
- /package/lib/{agent/src/utils → utils}/backoffRetry.js +0 -0
- /package/lib/{agent/src/utils → utils}/divideArray.js +0 -0
- /package/lib/{agent/src/utils → utils}/emplaceMap.js +0 -0
- /package/lib/{agent/src/utils → utils}/executeCachedBatch.js +0 -0
- /package/lib/{agent/src/utils → utils}/predicateStateMessage.js +0 -0
|
@@ -58,22 +58,26 @@ export const orchestrateTest =
|
|
|
58
58
|
|
|
59
59
|
// PLAN
|
|
60
60
|
const scenarios: AutoBeTestScenario[] = await orchestrateTestScenario(ctx);
|
|
61
|
+
if (scenarios.length === 0)
|
|
62
|
+
throw new Error("No scenarios generated. Please check the logs.");
|
|
61
63
|
|
|
62
64
|
// TEST CODE
|
|
63
65
|
const written: IAutoBeTestWriteResult[] = await orchestrateTestWrite(
|
|
64
66
|
ctx,
|
|
65
67
|
scenarios,
|
|
66
68
|
);
|
|
69
|
+
if (written.length === 0)
|
|
70
|
+
throw new Error("No test code written. Please check the logs.");
|
|
71
|
+
|
|
67
72
|
const corrects: AutoBeTestValidateEvent[] = await orchestrateTestCorrect(
|
|
68
73
|
ctx,
|
|
69
|
-
written
|
|
74
|
+
written.map((w) => ({
|
|
75
|
+
scenario: w.scenario,
|
|
76
|
+
artifacts: w.artifacts,
|
|
77
|
+
location: w.event.location,
|
|
78
|
+
script: w.event.final ?? w.event.draft,
|
|
79
|
+
})),
|
|
70
80
|
);
|
|
71
|
-
// for (const c of corrects)
|
|
72
|
-
// if (c.result.type !== "success")
|
|
73
|
-
// c.file.content = c.file.content
|
|
74
|
-
// .split("\n")
|
|
75
|
-
// .map((s) => `// ${s}`)
|
|
76
|
-
// .join("\n");
|
|
77
81
|
|
|
78
82
|
// DO COMPILE
|
|
79
83
|
const compiler: IAutoBeCompiler = await ctx.compiler();
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { IAgenticaController } from "@agentica/core";
|
|
2
2
|
import {
|
|
3
|
+
AutoBeTestCorrectEvent,
|
|
3
4
|
AutoBeTestValidateEvent,
|
|
4
5
|
IAutoBeCompiler,
|
|
5
6
|
IAutoBeTypeScriptCompileResult,
|
|
6
7
|
} from "@autobe/interface";
|
|
7
8
|
import { StringUtil } from "@autobe/utils";
|
|
8
|
-
import { ILlmApplication, ILlmSchema } from "@samchon/openapi";
|
|
9
|
+
import { ILlmApplication, ILlmSchema, IValidation } from "@samchon/openapi";
|
|
9
10
|
import { IPointer } from "tstl";
|
|
10
11
|
import typia from "typia";
|
|
11
12
|
import { v7 } from "uuid";
|
|
@@ -13,37 +14,64 @@ import { v7 } from "uuid";
|
|
|
13
14
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
14
15
|
import { assertSchemaModel } from "../../context/assertSchemaModel";
|
|
15
16
|
import { executeCachedBatch } from "../../utils/executeCachedBatch";
|
|
17
|
+
import { orchestrateCommonCorrectCasting } from "../common/orchestrateCommonCorrectCasting";
|
|
16
18
|
import { completeTestCode } from "./compile/completeTestCode";
|
|
17
19
|
import { transformTestCorrectHistories } from "./histories/transformTestCorrectHistories";
|
|
20
|
+
import { transformTestValidateEvent } from "./histories/transformTestValidateEvent";
|
|
21
|
+
import { orchestrateTestCorrectInvalidRequest } from "./orchestrateTestCorrectInvalidRequest";
|
|
18
22
|
import { IAutoBeTestCorrectApplication } from "./structures/IAutoBeTestCorrectApplication";
|
|
19
23
|
import { IAutoBeTestFunction } from "./structures/IAutoBeTestFunction";
|
|
20
24
|
import { IAutoBeTestFunctionFailure } from "./structures/IAutoBeTestFunctionFailure";
|
|
21
|
-
import { IAutoBeTestWriteResult } from "./structures/IAutoBeTestWriteResult";
|
|
22
25
|
|
|
23
26
|
export const orchestrateTestCorrect = async <Model extends ILlmSchema.Model>(
|
|
24
27
|
ctx: AutoBeContext<Model>,
|
|
25
|
-
|
|
28
|
+
writeResults: IAutoBeTestFunction[],
|
|
26
29
|
): Promise<AutoBeTestValidateEvent[]> => {
|
|
27
30
|
const result: Array<AutoBeTestValidateEvent | null> =
|
|
28
31
|
await executeCachedBatch(
|
|
29
|
-
|
|
32
|
+
writeResults.map((w) => async (promptCacheKey) => {
|
|
30
33
|
try {
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
const compile = (script: string) =>
|
|
35
|
+
compileTestFile(ctx, {
|
|
36
|
+
...w,
|
|
37
|
+
script,
|
|
38
|
+
});
|
|
39
|
+
const x: AutoBeTestValidateEvent =
|
|
40
|
+
await orchestrateTestCorrectInvalidRequest(ctx, compile, w);
|
|
41
|
+
const y: AutoBeTestValidateEvent =
|
|
42
|
+
await orchestrateCommonCorrectCasting(
|
|
43
|
+
ctx,
|
|
44
|
+
{
|
|
45
|
+
source: "testCorrect",
|
|
46
|
+
validate: compile,
|
|
47
|
+
correct: (next) =>
|
|
48
|
+
({
|
|
49
|
+
type: "testCorrect",
|
|
50
|
+
id: v7(),
|
|
51
|
+
created_at: new Date().toISOString(),
|
|
52
|
+
file: {
|
|
53
|
+
scenario: w.scenario,
|
|
54
|
+
location: w.location,
|
|
55
|
+
content: next.final ?? next.draft,
|
|
56
|
+
},
|
|
57
|
+
result: next.failure,
|
|
58
|
+
tokenUsage: next.tokenUsage,
|
|
59
|
+
think: next.think,
|
|
60
|
+
draft: next.draft,
|
|
61
|
+
review: next.review,
|
|
62
|
+
final: next.final,
|
|
63
|
+
step: ctx.state().analyze?.step ?? 0,
|
|
64
|
+
}) satisfies AutoBeTestCorrectEvent,
|
|
65
|
+
script: (event) => event.file.content,
|
|
66
|
+
},
|
|
67
|
+
x.file.content,
|
|
68
|
+
);
|
|
37
69
|
return await predicate(
|
|
38
70
|
ctx,
|
|
39
|
-
|
|
40
|
-
artifacts: w.artifacts,
|
|
41
|
-
scenario: w.scenario,
|
|
42
|
-
location: w.event.location,
|
|
43
|
-
script: w.event.final ?? w.event.draft,
|
|
44
|
-
},
|
|
71
|
+
transformTestValidateEvent(y, w.artifacts),
|
|
45
72
|
[],
|
|
46
|
-
|
|
73
|
+
y,
|
|
74
|
+
promptCacheKey,
|
|
47
75
|
ctx.retry,
|
|
48
76
|
);
|
|
49
77
|
} catch {
|
|
@@ -54,7 +82,7 @@ export const orchestrateTestCorrect = async <Model extends ILlmSchema.Model>(
|
|
|
54
82
|
return result.filter((r) => r !== null);
|
|
55
83
|
};
|
|
56
84
|
|
|
57
|
-
const
|
|
85
|
+
const compileTestFile = async <Model extends ILlmSchema.Model>(
|
|
58
86
|
ctx: AutoBeContext<Model>,
|
|
59
87
|
func: IAutoBeTestFunction,
|
|
60
88
|
): Promise<AutoBeTestValidateEvent> => {
|
|
@@ -73,7 +101,6 @@ const compile = async <Model extends ILlmSchema.Model>(
|
|
|
73
101
|
scenario: func.scenario,
|
|
74
102
|
location: func.location,
|
|
75
103
|
content: func.script,
|
|
76
|
-
// result,
|
|
77
104
|
},
|
|
78
105
|
result,
|
|
79
106
|
created_at: new Date().toISOString(),
|
|
@@ -86,11 +113,12 @@ const predicate = async <Model extends ILlmSchema.Model>(
|
|
|
86
113
|
content: IAutoBeTestFunction,
|
|
87
114
|
failures: IAutoBeTestFunctionFailure[],
|
|
88
115
|
event: AutoBeTestValidateEvent,
|
|
116
|
+
promptCacheKey: string,
|
|
89
117
|
life: number,
|
|
90
118
|
): Promise<AutoBeTestValidateEvent> => {
|
|
91
119
|
if (event.result.type === "failure") ctx.dispatch(event);
|
|
92
120
|
return event.result.type === "failure"
|
|
93
|
-
? await correct(ctx, content, failures, event, life - 1)
|
|
121
|
+
? await correct(ctx, content, failures, event, promptCacheKey, life - 1)
|
|
94
122
|
: event;
|
|
95
123
|
};
|
|
96
124
|
|
|
@@ -99,10 +127,11 @@ const correct = async <Model extends ILlmSchema.Model>(
|
|
|
99
127
|
content: IAutoBeTestFunction,
|
|
100
128
|
failures: IAutoBeTestFunctionFailure[],
|
|
101
129
|
validate: AutoBeTestValidateEvent,
|
|
130
|
+
promptCacheKey: string,
|
|
102
131
|
life: number,
|
|
103
132
|
): Promise<AutoBeTestValidateEvent> => {
|
|
104
133
|
if (validate.result.type !== "failure") return validate;
|
|
105
|
-
else if (
|
|
134
|
+
else if (life < 0) return validate;
|
|
106
135
|
|
|
107
136
|
const pointer: IPointer<IAutoBeTestCorrectApplication.IProps | null> = {
|
|
108
137
|
value: null,
|
|
@@ -118,6 +147,7 @@ const correct = async <Model extends ILlmSchema.Model>(
|
|
|
118
147
|
]),
|
|
119
148
|
controller: createController({
|
|
120
149
|
model: ctx.model,
|
|
150
|
+
failure: validate.result,
|
|
121
151
|
build: (next) => {
|
|
122
152
|
pointer.value = next;
|
|
123
153
|
},
|
|
@@ -129,8 +159,9 @@ const correct = async <Model extends ILlmSchema.Model>(
|
|
|
129
159
|
You don't need to explain me anything, but just fix it immediately
|
|
130
160
|
without any hesitation, explanation, and questions.
|
|
131
161
|
`,
|
|
162
|
+
promptCacheKey,
|
|
132
163
|
});
|
|
133
|
-
if (pointer.value === null) throw new Error("Failed to
|
|
164
|
+
if (pointer.value === null) throw new Error("Failed to correct test code.");
|
|
134
165
|
|
|
135
166
|
pointer.value.revise.final = await completeTestCode(
|
|
136
167
|
ctx,
|
|
@@ -155,12 +186,15 @@ const correct = async <Model extends ILlmSchema.Model>(
|
|
|
155
186
|
draft: pointer.value.draft,
|
|
156
187
|
review: pointer.value.revise?.review,
|
|
157
188
|
final: pointer.value.revise?.final,
|
|
158
|
-
});
|
|
189
|
+
} satisfies AutoBeTestCorrectEvent);
|
|
159
190
|
const newContent: IAutoBeTestFunction = {
|
|
160
191
|
...content,
|
|
161
192
|
script: pointer.value.revise?.final ?? pointer.value.draft,
|
|
162
193
|
};
|
|
163
|
-
const newValidate: AutoBeTestValidateEvent = await
|
|
194
|
+
const newValidate: AutoBeTestValidateEvent = await compileTestFile(
|
|
195
|
+
ctx,
|
|
196
|
+
newContent,
|
|
197
|
+
);
|
|
164
198
|
return predicate(
|
|
165
199
|
ctx,
|
|
166
200
|
newContent,
|
|
@@ -172,22 +206,56 @@ const correct = async <Model extends ILlmSchema.Model>(
|
|
|
172
206
|
},
|
|
173
207
|
],
|
|
174
208
|
newValidate,
|
|
209
|
+
promptCacheKey,
|
|
175
210
|
life,
|
|
176
211
|
);
|
|
177
212
|
};
|
|
178
213
|
|
|
179
214
|
const createController = <Model extends ILlmSchema.Model>(props: {
|
|
180
215
|
model: Model;
|
|
216
|
+
failure: IAutoBeTypeScriptCompileResult.IFailure;
|
|
181
217
|
build: (next: IAutoBeTestCorrectApplication.IProps) => void;
|
|
182
218
|
}): IAgenticaController.IClass<Model> => {
|
|
183
219
|
assertSchemaModel(props.model);
|
|
184
220
|
|
|
221
|
+
const validate = (
|
|
222
|
+
input: unknown,
|
|
223
|
+
): IValidation<IAutoBeTestCorrectApplication.IProps> => {
|
|
224
|
+
const result: IValidation<IAutoBeTestCorrectApplication.IProps> =
|
|
225
|
+
typia.validate<IAutoBeTestCorrectApplication.IProps>(input);
|
|
226
|
+
// if (result.success === false) return result;
|
|
227
|
+
|
|
228
|
+
// const expected: number = props.failure.diagnostics.length;
|
|
229
|
+
// const actual: number = result.data.think.analyses.length;
|
|
230
|
+
// if (expected !== actual)
|
|
231
|
+
// return {
|
|
232
|
+
// success: false,
|
|
233
|
+
// errors: [
|
|
234
|
+
// {
|
|
235
|
+
// path: "$input.think.analyses",
|
|
236
|
+
// expected: `Array<IValidation<IAutoBeTypeScriptCompileResult.IDiagnostic>> & MinItems<${expected}> & MaxItems<${expected}>`,
|
|
237
|
+
// value: result.data.think.analyses,
|
|
238
|
+
// description: StringUtil.trim`
|
|
239
|
+
// The 'think.analyses' must contain all the compilation errors.
|
|
240
|
+
|
|
241
|
+
// Therefore, the length of the 'think.analyses' must be not
|
|
242
|
+
// ${actual}, but exactly ${expected}, which is equal to the length of
|
|
243
|
+
// the 'diagnostics' of the compilation failure.
|
|
244
|
+
// `,
|
|
245
|
+
// },
|
|
246
|
+
// ],
|
|
247
|
+
// data: input,
|
|
248
|
+
// };
|
|
249
|
+
return result;
|
|
250
|
+
};
|
|
185
251
|
const application: ILlmApplication<Model> = collection[
|
|
186
|
-
props.model
|
|
187
|
-
]
|
|
252
|
+
props.model === "chatgpt" ? "chatgpt" : "claude"
|
|
253
|
+
](
|
|
254
|
+
validate,
|
|
255
|
+
) satisfies ILlmApplication<any> as unknown as ILlmApplication<Model>;
|
|
188
256
|
return {
|
|
189
257
|
protocol: "class",
|
|
190
|
-
name: "
|
|
258
|
+
name: "correct",
|
|
191
259
|
application,
|
|
192
260
|
execute: {
|
|
193
261
|
rewrite: (next) => {
|
|
@@ -197,11 +265,21 @@ const createController = <Model extends ILlmSchema.Model>(props: {
|
|
|
197
265
|
};
|
|
198
266
|
};
|
|
199
267
|
|
|
200
|
-
const claude = typia.llm.application<IAutoBeTestCorrectApplication, "claude">();
|
|
201
268
|
const collection = {
|
|
202
|
-
chatgpt:
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
269
|
+
chatgpt: (validate: Validator) =>
|
|
270
|
+
typia.llm.application<IAutoBeTestCorrectApplication, "chatgpt">({
|
|
271
|
+
validate: {
|
|
272
|
+
rewrite: validate,
|
|
273
|
+
},
|
|
274
|
+
}),
|
|
275
|
+
claude: (validate: Validator) =>
|
|
276
|
+
typia.llm.application<IAutoBeTestCorrectApplication, "claude">({
|
|
277
|
+
validate: {
|
|
278
|
+
rewrite: validate,
|
|
279
|
+
},
|
|
280
|
+
}),
|
|
207
281
|
};
|
|
282
|
+
|
|
283
|
+
type Validator = (
|
|
284
|
+
input: unknown,
|
|
285
|
+
) => IValidation<IAutoBeTestCorrectApplication.IProps>;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AutoBeTestCorrectEvent,
|
|
3
|
+
AutoBeTestValidateEvent,
|
|
4
|
+
} from "@autobe/interface";
|
|
5
|
+
import { StringUtil } from "@autobe/utils";
|
|
6
|
+
import { ILlmApplication, ILlmController, ILlmSchema } from "@samchon/openapi";
|
|
7
|
+
import { IPointer } from "tstl";
|
|
8
|
+
import typia from "typia";
|
|
9
|
+
import { v7 } from "uuid";
|
|
10
|
+
|
|
11
|
+
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
12
|
+
import { assertSchemaModel } from "../../context/assertSchemaModel";
|
|
13
|
+
import { transformTestCorrectInvalidRequestHistories } from "./histories/transformTestCorrectInvalidRequestHistories";
|
|
14
|
+
import { IAutoBeTestCorrectInvalidRequestApplication } from "./structures/IAutoBeTestCorrectInvalidRequestApplication";
|
|
15
|
+
import { IAutoBeTestFunction } from "./structures/IAutoBeTestFunction";
|
|
16
|
+
|
|
17
|
+
type CompileFunction = (script: string) => Promise<AutoBeTestValidateEvent>;
|
|
18
|
+
|
|
19
|
+
export const orchestrateTestCorrectInvalidRequest = async <
|
|
20
|
+
Model extends ILlmSchema.Model,
|
|
21
|
+
>(
|
|
22
|
+
ctx: AutoBeContext<Model>,
|
|
23
|
+
compile: CompileFunction,
|
|
24
|
+
write: IAutoBeTestFunction,
|
|
25
|
+
): Promise<AutoBeTestValidateEvent> => {
|
|
26
|
+
const event: AutoBeTestValidateEvent = await compile(write.script);
|
|
27
|
+
return await predicate(ctx, compile, write, event, ctx.retry);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const predicate = async <Model extends ILlmSchema.Model>(
|
|
31
|
+
ctx: AutoBeContext<Model>,
|
|
32
|
+
compile: CompileFunction,
|
|
33
|
+
write: IAutoBeTestFunction,
|
|
34
|
+
event: AutoBeTestValidateEvent,
|
|
35
|
+
life: number,
|
|
36
|
+
): Promise<AutoBeTestValidateEvent> => {
|
|
37
|
+
if (event.result.type === "failure") {
|
|
38
|
+
ctx.dispatch(event);
|
|
39
|
+
return await correct(ctx, compile, write, event, life - 1);
|
|
40
|
+
}
|
|
41
|
+
return event;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const correct = async <Model extends ILlmSchema.Model>(
|
|
45
|
+
ctx: AutoBeContext<Model>,
|
|
46
|
+
compile: CompileFunction,
|
|
47
|
+
write: IAutoBeTestFunction,
|
|
48
|
+
event: AutoBeTestValidateEvent,
|
|
49
|
+
life: number,
|
|
50
|
+
): Promise<AutoBeTestValidateEvent> => {
|
|
51
|
+
if (event.result.type !== "failure") return event;
|
|
52
|
+
else if (life < 0) return event;
|
|
53
|
+
|
|
54
|
+
const pointer: IPointer<
|
|
55
|
+
IAutoBeTestCorrectInvalidRequestApplication.IProps | false | null
|
|
56
|
+
> = {
|
|
57
|
+
value: null,
|
|
58
|
+
};
|
|
59
|
+
const { tokenUsage } = await ctx.conversate({
|
|
60
|
+
source: "testCorrect",
|
|
61
|
+
histories: await transformTestCorrectInvalidRequestHistories(
|
|
62
|
+
null!,
|
|
63
|
+
event.result.diagnostics,
|
|
64
|
+
),
|
|
65
|
+
controller: createController({
|
|
66
|
+
model: ctx.model,
|
|
67
|
+
then: (next) => {
|
|
68
|
+
pointer.value = next;
|
|
69
|
+
},
|
|
70
|
+
reject: () => {
|
|
71
|
+
pointer.value = false;
|
|
72
|
+
},
|
|
73
|
+
}),
|
|
74
|
+
enforceFunctionCall: true,
|
|
75
|
+
message: StringUtil.trim`
|
|
76
|
+
Fix the AutoBeTest.IFunction data to resolve the compilation error.
|
|
77
|
+
|
|
78
|
+
You don't need to explain me anything, but just fix or give it up
|
|
79
|
+
immediately without any hesitation, explanation, and questions.
|
|
80
|
+
`,
|
|
81
|
+
});
|
|
82
|
+
if (pointer.value === null) throw new Error("Failed to correct test code.");
|
|
83
|
+
else if (pointer.value === false) return event; // other's responsibility
|
|
84
|
+
|
|
85
|
+
ctx.dispatch({
|
|
86
|
+
type: "testCorrect",
|
|
87
|
+
id: v7(),
|
|
88
|
+
created_at: new Date().toISOString(),
|
|
89
|
+
file: {
|
|
90
|
+
scenario: write.scenario,
|
|
91
|
+
location: write.location,
|
|
92
|
+
content: write.script,
|
|
93
|
+
},
|
|
94
|
+
result: event.result,
|
|
95
|
+
tokenUsage,
|
|
96
|
+
step: ctx.state().analyze?.step ?? 0,
|
|
97
|
+
think: pointer.value.think,
|
|
98
|
+
draft: pointer.value.draft,
|
|
99
|
+
review: pointer.value.revise?.review,
|
|
100
|
+
final: pointer.value.revise?.final,
|
|
101
|
+
} satisfies AutoBeTestCorrectEvent);
|
|
102
|
+
const newWrite: IAutoBeTestFunction = {
|
|
103
|
+
artifacts: write.artifacts,
|
|
104
|
+
scenario: write.scenario,
|
|
105
|
+
location: write.location,
|
|
106
|
+
script: pointer.value.revise?.final ?? pointer.value.draft,
|
|
107
|
+
};
|
|
108
|
+
const newEvent: AutoBeTestValidateEvent = await compile(newWrite.script);
|
|
109
|
+
return await predicate(ctx, compile, newWrite, newEvent, life - 1);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
const createController = <Model extends ILlmSchema.Model>(props: {
|
|
113
|
+
model: Model;
|
|
114
|
+
then: (next: IAutoBeTestCorrectInvalidRequestApplication.IProps) => void;
|
|
115
|
+
reject: () => void;
|
|
116
|
+
}): ILlmController<Model> => {
|
|
117
|
+
assertSchemaModel(props.model);
|
|
118
|
+
const application = collection[
|
|
119
|
+
props.model === "chatgpt" ? "chatgpt" : "claude"
|
|
120
|
+
] satisfies ILlmApplication<any> as any as ILlmApplication<Model>;
|
|
121
|
+
return {
|
|
122
|
+
protocol: "class",
|
|
123
|
+
name: "correctInvalidRequest",
|
|
124
|
+
application,
|
|
125
|
+
execute: {
|
|
126
|
+
rewrite: (next) => {
|
|
127
|
+
props.then(next);
|
|
128
|
+
},
|
|
129
|
+
reject: () => {
|
|
130
|
+
props.reject();
|
|
131
|
+
},
|
|
132
|
+
} satisfies IAutoBeTestCorrectInvalidRequestApplication,
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
const collection = {
|
|
137
|
+
chatgpt: typia.llm.application<
|
|
138
|
+
IAutoBeTestCorrectInvalidRequestApplication,
|
|
139
|
+
"chatgpt"
|
|
140
|
+
>(),
|
|
141
|
+
claude: typia.llm.application<
|
|
142
|
+
IAutoBeTestCorrectInvalidRequestApplication,
|
|
143
|
+
"claude"
|
|
144
|
+
>(),
|
|
145
|
+
};
|
|
@@ -9,6 +9,7 @@ import { AutoBeEndpointComparator, MapUtil, StringUtil } from "@autobe/utils";
|
|
|
9
9
|
import { ILlmApplication, ILlmSchema, IValidation } from "@samchon/openapi";
|
|
10
10
|
import { HashMap, IPointer, Pair } from "tstl";
|
|
11
11
|
import typia from "typia";
|
|
12
|
+
import { NamingConvention } from "typia/lib/utils/NamingConvention";
|
|
12
13
|
import { v7 } from "uuid";
|
|
13
14
|
|
|
14
15
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
@@ -22,17 +23,19 @@ import { IAutoBeTestScenarioAuthorizationRole } from "./structures/IAutoBeTestSc
|
|
|
22
23
|
export async function orchestrateTestScenario<Model extends ILlmSchema.Model>(
|
|
23
24
|
ctx: AutoBeContext<Model>,
|
|
24
25
|
): Promise<AutoBeTestScenario[]> {
|
|
25
|
-
const
|
|
26
|
-
ctx.state().interface?.document
|
|
27
|
-
if (
|
|
26
|
+
const document: AutoBeOpenApi.IDocument | undefined =
|
|
27
|
+
ctx.state().interface?.document;
|
|
28
|
+
if (document === undefined) {
|
|
28
29
|
throw new Error(
|
|
29
30
|
"Cannot write test scenarios because these are no operations.",
|
|
30
31
|
);
|
|
31
32
|
}
|
|
32
33
|
|
|
34
|
+
Object.entries(document.components.schemas);
|
|
35
|
+
|
|
33
36
|
const dict: HashMap<AutoBeOpenApi.IEndpoint, AutoBeOpenApi.IOperation> =
|
|
34
37
|
new HashMap<AutoBeOpenApi.IEndpoint, AutoBeOpenApi.IOperation>(
|
|
35
|
-
operations.map(
|
|
38
|
+
document.operations.map(
|
|
36
39
|
(op) =>
|
|
37
40
|
new Pair(
|
|
38
41
|
{
|
|
@@ -51,15 +54,18 @@ export async function orchestrateTestScenario<Model extends ILlmSchema.Model>(
|
|
|
51
54
|
"",
|
|
52
55
|
" method | path ",
|
|
53
56
|
"--------|------",
|
|
54
|
-
...operations
|
|
57
|
+
...document.operations
|
|
58
|
+
.map((op) => `\`${op.method}\` | \`${op.path}\``)
|
|
59
|
+
.join("\n"),
|
|
55
60
|
].join("\n");
|
|
56
61
|
|
|
57
62
|
const progress: AutoBeProgressEventBase = {
|
|
58
|
-
total: operations.length,
|
|
63
|
+
total: document.operations.length,
|
|
59
64
|
completed: 0,
|
|
60
65
|
};
|
|
61
66
|
const exclude: IAutoBeTestScenarioApplication.IScenarioGroup[] = [];
|
|
62
|
-
let include: AutoBeOpenApi.IOperation[] =
|
|
67
|
+
let include: AutoBeOpenApi.IOperation[] = [...document.operations];
|
|
68
|
+
let trial: number = 0;
|
|
63
69
|
|
|
64
70
|
do {
|
|
65
71
|
const matrix: AutoBeOpenApi.IOperation[][] = divideArray({
|
|
@@ -72,7 +78,7 @@ export async function orchestrateTestScenario<Model extends ILlmSchema.Model>(
|
|
|
72
78
|
...(await divideAndConquer(ctx, {
|
|
73
79
|
dict,
|
|
74
80
|
endpointNotFound,
|
|
75
|
-
|
|
81
|
+
document,
|
|
76
82
|
include,
|
|
77
83
|
exclude: exclude.map((x) => x.endpoint),
|
|
78
84
|
progress,
|
|
@@ -92,7 +98,8 @@ export async function orchestrateTestScenario<Model extends ILlmSchema.Model>(
|
|
|
92
98
|
}
|
|
93
99
|
return true;
|
|
94
100
|
});
|
|
95
|
-
|
|
101
|
+
progress.total = include.length + exclude.length;
|
|
102
|
+
} while (include.length > 0 && ++trial < ctx.retry);
|
|
96
103
|
|
|
97
104
|
return exclude.flatMap((pg) => {
|
|
98
105
|
return pg.scenarios.map((plan) => {
|
|
@@ -111,7 +118,7 @@ const divideAndConquer = async <Model extends ILlmSchema.Model>(
|
|
|
111
118
|
props: {
|
|
112
119
|
dict: HashMap<AutoBeOpenApi.IEndpoint, AutoBeOpenApi.IOperation>;
|
|
113
120
|
endpointNotFound: string;
|
|
114
|
-
|
|
121
|
+
document: AutoBeOpenApi.IDocument;
|
|
115
122
|
include: AutoBeOpenApi.IOperation[];
|
|
116
123
|
exclude: AutoBeOpenApi.IEndpoint[];
|
|
117
124
|
progress: AutoBeProgressEventBase;
|
|
@@ -129,7 +136,7 @@ const divideAndConquer = async <Model extends ILlmSchema.Model>(
|
|
|
129
136
|
source: "testScenarios",
|
|
130
137
|
histories: transformTestScenarioHistories(
|
|
131
138
|
ctx.state(),
|
|
132
|
-
props.
|
|
139
|
+
props.document,
|
|
133
140
|
props.include,
|
|
134
141
|
props.exclude,
|
|
135
142
|
),
|
|
@@ -139,6 +146,11 @@ const divideAndConquer = async <Model extends ILlmSchema.Model>(
|
|
|
139
146
|
dict: props.dict,
|
|
140
147
|
authorizations,
|
|
141
148
|
build: (next) => {
|
|
149
|
+
next.scenarioGroups.forEach((sg) =>
|
|
150
|
+
sg.scenarios.forEach((s) => {
|
|
151
|
+
s.functionName = NamingConvention.snake(s.functionName);
|
|
152
|
+
}),
|
|
153
|
+
);
|
|
142
154
|
pointer.value ??= [];
|
|
143
155
|
pointer.value.push(...next.scenarioGroups);
|
|
144
156
|
},
|
|
@@ -148,6 +160,11 @@ const divideAndConquer = async <Model extends ILlmSchema.Model>(
|
|
|
148
160
|
message: `Create e2e test scenarios.`,
|
|
149
161
|
});
|
|
150
162
|
if (pointer.value.length === 0) return [];
|
|
163
|
+
|
|
164
|
+
props.progress.total = Math.max(
|
|
165
|
+
props.progress.total,
|
|
166
|
+
(props.progress.completed += pointer.value.length),
|
|
167
|
+
);
|
|
151
168
|
ctx.dispatch({
|
|
152
169
|
type: "testScenarios",
|
|
153
170
|
id: v7(),
|
|
@@ -165,14 +182,13 @@ const divideAndConquer = async <Model extends ILlmSchema.Model>(
|
|
|
165
182
|
),
|
|
166
183
|
)
|
|
167
184
|
.flat(),
|
|
168
|
-
completed:
|
|
185
|
+
completed: props.progress.completed,
|
|
169
186
|
total: props.progress.total,
|
|
170
187
|
step: ctx.state().interface?.step ?? 0,
|
|
171
188
|
created_at: new Date().toISOString(),
|
|
172
189
|
});
|
|
173
190
|
return pointer.value;
|
|
174
191
|
} catch {
|
|
175
|
-
console.log("test scenario, failed to function call", props.include);
|
|
176
192
|
return [];
|
|
177
193
|
}
|
|
178
194
|
};
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
import { ILlmApplication, ILlmSchema } from "@samchon/openapi";
|
|
8
8
|
import { IPointer } from "tstl";
|
|
9
9
|
import typia from "typia";
|
|
10
|
+
import { NamingConvention } from "typia/lib/utils/NamingConvention";
|
|
10
11
|
import { v7 } from "uuid";
|
|
11
12
|
|
|
12
13
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
@@ -49,7 +50,7 @@ export async function orchestrateTestWrite<Model extends ILlmSchema.Model>(
|
|
|
49
50
|
artifacts,
|
|
50
51
|
event,
|
|
51
52
|
};
|
|
52
|
-
} catch
|
|
53
|
+
} catch {
|
|
53
54
|
return null;
|
|
54
55
|
}
|
|
55
56
|
}),
|
|
@@ -76,6 +77,7 @@ async function process<Model extends ILlmSchema.Model>(
|
|
|
76
77
|
controller: createController({
|
|
77
78
|
model: ctx.model,
|
|
78
79
|
build: (next) => {
|
|
80
|
+
next.domain = NamingConvention.snake(next.domain);
|
|
79
81
|
pointer.value = next;
|
|
80
82
|
},
|
|
81
83
|
}),
|