@autobe/agent 0.22.1 → 0.23.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/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
|
@@ -3,7 +3,6 @@ import {
|
|
|
3
3
|
AutoBeRealizeAuthorization,
|
|
4
4
|
AutoBeRealizeCorrectEvent,
|
|
5
5
|
AutoBeRealizeFunction,
|
|
6
|
-
AutoBeRealizeValidateEvent,
|
|
7
6
|
} from "@autobe/interface";
|
|
8
7
|
import { StringUtil } from "@autobe/utils";
|
|
9
8
|
import { ILlmApplication, ILlmController, ILlmSchema } from "@samchon/openapi";
|
|
@@ -28,51 +27,75 @@ export async function orchestrateRealizeCorrect<Model extends ILlmSchema.Model>(
|
|
|
28
27
|
authorizations: AutoBeRealizeAuthorization[],
|
|
29
28
|
functions: AutoBeRealizeFunction[],
|
|
30
29
|
failures: IAutoBeRealizeFunctionFailure[],
|
|
31
|
-
progress:
|
|
32
|
-
life: number =
|
|
33
|
-
): Promise<
|
|
34
|
-
const event = await compileRealizeFiles(ctx, {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const locations: string[] =
|
|
43
|
-
(event.result.type === "failure"
|
|
44
|
-
? Array.from(new Set(event.result.diagnostics.map((d) => d.file)))
|
|
45
|
-
: null
|
|
46
|
-
)?.filter((el) => el !== null) ?? [];
|
|
47
|
-
|
|
48
|
-
progress.total += Object.keys(locations).length;
|
|
49
|
-
|
|
50
|
-
const diagnostics =
|
|
51
|
-
event.result.type === "failure" ? event.result.diagnostics : [];
|
|
52
|
-
|
|
53
|
-
const diagnosticsByFile = diagnostics.reduce<
|
|
54
|
-
Record<string, typeof diagnostics>
|
|
55
|
-
>((acc, diagnostic) => {
|
|
56
|
-
const location = diagnostic.file!;
|
|
57
|
-
if (!acc[location]) {
|
|
58
|
-
acc[location] = [];
|
|
59
|
-
}
|
|
60
|
-
acc[location].push(diagnostic);
|
|
61
|
-
return acc;
|
|
62
|
-
}, {});
|
|
30
|
+
progress: AutoBeProgressEventBase,
|
|
31
|
+
life: number = ctx.retry,
|
|
32
|
+
): Promise<AutoBeRealizeFunction[]> {
|
|
33
|
+
const event = await compileRealizeFiles(ctx, {
|
|
34
|
+
authorizations,
|
|
35
|
+
functions,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
if (event.result.type !== "failure") return functions;
|
|
39
|
+
else if (life < 0) return functions;
|
|
63
40
|
|
|
64
|
-
|
|
65
|
-
|
|
41
|
+
// Extract and process diagnostics
|
|
42
|
+
const diagnostics = event.result.diagnostics;
|
|
43
|
+
const locations: string[] = Array.from(
|
|
44
|
+
new Set(
|
|
45
|
+
diagnostics.map((d) => d.file).filter((f): f is string => f !== null),
|
|
46
|
+
),
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
progress.total += locations.length;
|
|
50
|
+
|
|
51
|
+
// Group diagnostics by file and add to failures
|
|
52
|
+
const diagnosticsByFile: Record<string, IAutoBeRealizeFunctionFailure> = {};
|
|
53
|
+
diagnostics.forEach((diagnostic) => {
|
|
54
|
+
const location: string | null = diagnostic.file;
|
|
55
|
+
if (location === null) return;
|
|
66
56
|
|
|
67
|
-
if (
|
|
68
|
-
|
|
57
|
+
if (!diagnosticsByFile[location]) {
|
|
58
|
+
const func = functions.find((f) => f.location === location)!;
|
|
59
|
+
const failure: IAutoBeRealizeFunctionFailure = {
|
|
69
60
|
function: func,
|
|
70
|
-
diagnostics,
|
|
71
|
-
}
|
|
61
|
+
diagnostics: [],
|
|
62
|
+
};
|
|
63
|
+
diagnosticsByFile[location] = failure;
|
|
72
64
|
}
|
|
73
|
-
|
|
65
|
+
diagnosticsByFile[location].diagnostics.push(diagnostic);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
await correct(
|
|
69
|
+
ctx,
|
|
70
|
+
locations,
|
|
71
|
+
scenarios,
|
|
72
|
+
authorizations,
|
|
73
|
+
functions,
|
|
74
|
+
[...failures, ...Object.values(diagnosticsByFile)],
|
|
75
|
+
progress,
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
return orchestrateRealizeCorrect(
|
|
79
|
+
ctx,
|
|
80
|
+
scenarios,
|
|
81
|
+
authorizations,
|
|
82
|
+
functions,
|
|
83
|
+
[...failures, ...Object.values(diagnosticsByFile)],
|
|
84
|
+
progress,
|
|
85
|
+
life - 1,
|
|
86
|
+
);
|
|
87
|
+
}
|
|
74
88
|
|
|
75
|
-
|
|
89
|
+
async function correct<Model extends ILlmSchema.Model>(
|
|
90
|
+
ctx: AutoBeContext<Model>,
|
|
91
|
+
locations: string[],
|
|
92
|
+
scenarios: IAutoBeRealizeScenarioResult[],
|
|
93
|
+
authorizations: AutoBeRealizeAuthorization[],
|
|
94
|
+
functions: AutoBeRealizeFunction[],
|
|
95
|
+
failures: IAutoBeRealizeFunctionFailure[],
|
|
96
|
+
progress: AutoBeProgressEventBase,
|
|
97
|
+
): Promise<AutoBeRealizeFunction[]> {
|
|
98
|
+
return executeCachedBatch(
|
|
76
99
|
locations.map((location) => async (): Promise<AutoBeRealizeFunction> => {
|
|
77
100
|
const scenario = scenarios.find((el) => el.location === location);
|
|
78
101
|
const func = functions.find((el) => el.location === location)!;
|
|
@@ -80,34 +103,28 @@ export async function orchestrateRealizeCorrect<Model extends ILlmSchema.Model>(
|
|
|
80
103
|
failures.filter((f) => f.function.location === location);
|
|
81
104
|
|
|
82
105
|
if (ReailzeFunctionFailures.length && scenario) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
106
|
+
try {
|
|
107
|
+
const correctEvent = await step(ctx, {
|
|
108
|
+
totalAuthorizations: authorizations,
|
|
109
|
+
authorization: scenario.decoratorEvent ?? null,
|
|
110
|
+
scenario,
|
|
111
|
+
function: func,
|
|
112
|
+
failures: ReailzeFunctionFailures,
|
|
113
|
+
progress: progress,
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
func.content = correctEvent.content;
|
|
117
|
+
} catch (err) {
|
|
118
|
+
return func;
|
|
119
|
+
}
|
|
93
120
|
}
|
|
94
121
|
|
|
95
122
|
return func;
|
|
96
123
|
}),
|
|
97
124
|
);
|
|
98
|
-
|
|
99
|
-
return orchestrateRealizeCorrect(
|
|
100
|
-
ctx,
|
|
101
|
-
scenarios,
|
|
102
|
-
authorizations,
|
|
103
|
-
functions,
|
|
104
|
-
failures,
|
|
105
|
-
progress,
|
|
106
|
-
life,
|
|
107
|
-
);
|
|
108
125
|
}
|
|
109
126
|
|
|
110
|
-
|
|
127
|
+
async function step<Model extends ILlmSchema.Model>(
|
|
111
128
|
ctx: AutoBeContext<Model>,
|
|
112
129
|
props: {
|
|
113
130
|
authorization: AutoBeRealizeAuthorization | null;
|
|
@@ -204,8 +221,3 @@ const collection = {
|
|
|
204
221
|
deepseek: claude,
|
|
205
222
|
"3.1": claude,
|
|
206
223
|
};
|
|
207
|
-
|
|
208
|
-
interface IProgress {
|
|
209
|
-
total: number;
|
|
210
|
-
completed: number;
|
|
211
|
-
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AutoBeOpenApi,
|
|
3
|
+
AutoBeRealizeAuthorization,
|
|
4
|
+
AutoBeTestFile,
|
|
5
|
+
} from "@autobe/interface";
|
|
6
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
7
|
+
|
|
8
|
+
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
9
|
+
import { IAutoBeRealizeScenarioResult } from "../structures/IAutoBeRealizeScenarioResult";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Generates a planning result that defines what kind of function should be
|
|
13
|
+
* created based on the provided Swagger (OpenAPI) operation.
|
|
14
|
+
*
|
|
15
|
+
* This function analyzes the structure of the OpenAPI operation (such as the
|
|
16
|
+
* path, method, parameters, request/response schema, and descriptions) to
|
|
17
|
+
* determine the appropriate function name, input/output types, and purpose of
|
|
18
|
+
* the function.
|
|
19
|
+
*
|
|
20
|
+
* The result of this function is passed to the next step in the AutoBE
|
|
21
|
+
* pipeline, which is responsible for generating the actual implementation
|
|
22
|
+
* code.
|
|
23
|
+
*
|
|
24
|
+
* @author Kakasoo
|
|
25
|
+
* @param ctx - AutoBE context including model and configuration
|
|
26
|
+
* @param operation - A single OpenAPI operation object to analyze and plan
|
|
27
|
+
* @param authorization - Optional authorization configuration
|
|
28
|
+
* @returns A scenario object containing all structural information needed to
|
|
29
|
+
* generate the function
|
|
30
|
+
*/
|
|
31
|
+
export function generateRealizeScenario<Model extends ILlmSchema.Model>(
|
|
32
|
+
ctx: AutoBeContext<Model>,
|
|
33
|
+
operation: AutoBeOpenApi.IOperation,
|
|
34
|
+
authorizations: AutoBeRealizeAuthorization[],
|
|
35
|
+
): IAutoBeRealizeScenarioResult {
|
|
36
|
+
const authorization = authorizations.find(
|
|
37
|
+
(el) => el.role.name === operation.authorizationRole,
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
const testFiles: AutoBeTestFile[] =
|
|
41
|
+
ctx
|
|
42
|
+
.state()
|
|
43
|
+
.test?.files.filter(
|
|
44
|
+
(el) =>
|
|
45
|
+
el.scenario.endpoint.method === operation.method &&
|
|
46
|
+
el.scenario.endpoint.path === operation.path,
|
|
47
|
+
) ?? [];
|
|
48
|
+
|
|
49
|
+
const functionName: string = transformFunctionName(operation);
|
|
50
|
+
|
|
51
|
+
return {
|
|
52
|
+
operation: operation,
|
|
53
|
+
functionName: functionName,
|
|
54
|
+
location: `src/providers/${functionName}.ts`,
|
|
55
|
+
testFiles: testFiles,
|
|
56
|
+
decoratorEvent: authorization,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Transforms an OpenAPI operation into a unique function name that will be used
|
|
62
|
+
* by Realize Write and Realize Correct agents to generate the actual
|
|
63
|
+
* implementation.
|
|
64
|
+
*
|
|
65
|
+
* The generated function name follows camelCase convention and ensures
|
|
66
|
+
* uniqueness by combining HTTP method with the URL path segments.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* POST /api/v1/users → postApiV1Users
|
|
70
|
+
* GET /users/{userId}/posts → getUsersUserIdPosts
|
|
71
|
+
* PUT /users/{user-id}/profile → putUsersUserIdProfile
|
|
72
|
+
*
|
|
73
|
+
* @param operation - The OpenAPI operation to transform
|
|
74
|
+
* @returns A unique function name that will be the actual function name in the
|
|
75
|
+
* generated code by Realize Write/Correct agents
|
|
76
|
+
*/
|
|
77
|
+
function transformFunctionName(operation: AutoBeOpenApi.IOperation): string {
|
|
78
|
+
const functionName = `${operation.method}${operation.path
|
|
79
|
+
.split("/")
|
|
80
|
+
.filter(Boolean)
|
|
81
|
+
.map((segment, index) => {
|
|
82
|
+
if (segment.startsWith("{") && segment.endsWith("}")) {
|
|
83
|
+
// {userId} → UserId
|
|
84
|
+
const paramName = segment.slice(1, -1);
|
|
85
|
+
return paramName
|
|
86
|
+
.split("-")
|
|
87
|
+
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
|
88
|
+
.join("");
|
|
89
|
+
}
|
|
90
|
+
// api → Api, v1 → V1
|
|
91
|
+
const words = segment.split("-");
|
|
92
|
+
return words
|
|
93
|
+
.map((word) => {
|
|
94
|
+
if (index === 0 && words.length === 1) {
|
|
95
|
+
// First segment without hyphens stays lowercase for first word
|
|
96
|
+
return word;
|
|
97
|
+
}
|
|
98
|
+
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
99
|
+
})
|
|
100
|
+
.join("");
|
|
101
|
+
})
|
|
102
|
+
.join("")}`;
|
|
103
|
+
return functionName;
|
|
104
|
+
}
|
|
@@ -4,32 +4,29 @@ import { ILlmSchema } from "@samchon/openapi";
|
|
|
4
4
|
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
5
5
|
import { getRealizeWriteImportStatements } from "./getRealizeWriteImportStatements";
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const compiler: IAutoBeCompiler = await ctx.compiler();
|
|
26
|
-
code = await compiler.typescript.beautify(code);
|
|
27
|
-
// Remove existing import statements using flexible regex patterns
|
|
28
|
-
code = code
|
|
7
|
+
/**
|
|
8
|
+
* Removes all import statements that LLM might have incorrectly added. This
|
|
9
|
+
* includes standard library imports, auto-injected imports, and any API
|
|
10
|
+
* structure imports with wrong paths.
|
|
11
|
+
*
|
|
12
|
+
* @param code - The code containing imports to remove
|
|
13
|
+
* @param typeReferences - List of type names to specifically remove
|
|
14
|
+
* @param decoratorType - Optional decorator type to remove
|
|
15
|
+
* @returns Code with all imports removed
|
|
16
|
+
*/
|
|
17
|
+
function removeAllImports(
|
|
18
|
+
code: string,
|
|
19
|
+
typeReferences: string[],
|
|
20
|
+
decoratorType?: string,
|
|
21
|
+
): string {
|
|
22
|
+
// Remove standard library and auto-injected imports
|
|
23
|
+
let cleanedCode = code
|
|
24
|
+
// MyGlobal - often with wrong path
|
|
29
25
|
.replace(
|
|
30
26
|
/import\s*{\s*MyGlobal\s*}\s*from\s*["']\.\.\/MyGlobal["']\s*;?\s*/gm,
|
|
31
27
|
"",
|
|
32
28
|
)
|
|
29
|
+
// typia - various import patterns
|
|
33
30
|
.replace(
|
|
34
31
|
/import\s+typia\s*,\s*{\s*tags\s*}\s*from\s*["']typia["']\s*;?\s*/gm,
|
|
35
32
|
"",
|
|
@@ -40,53 +37,84 @@ export async function replaceImportStatements<Model extends ILlmSchema.Model>(
|
|
|
40
37
|
"",
|
|
41
38
|
)
|
|
42
39
|
.replace(/import\s+typia\s*from\s*["']typia["']\s*;?\s*/gm, "")
|
|
40
|
+
// Prisma client
|
|
43
41
|
.replace(
|
|
44
42
|
/import\s*{\s*Prisma\s*}\s*from\s*["']@prisma\/client["']\s*;?\s*/gm,
|
|
45
43
|
"",
|
|
46
44
|
)
|
|
45
|
+
// uuid
|
|
47
46
|
.replace(/import\s*{\s*v4\s*}\s*from\s*["']uuid["']\s*;?\s*/gm, "")
|
|
47
|
+
// toISOStringSafe utility
|
|
48
48
|
.replace(
|
|
49
49
|
/import\s*{\s*toISOStringSafe\s*}\s*from\s*["']\.\.\/util\/toISOStringSafe["']\s*;?\s*/gm,
|
|
50
50
|
"",
|
|
51
51
|
)
|
|
52
|
-
//
|
|
52
|
+
// JWT imports (if LLM adds them)
|
|
53
53
|
.replace(/import\s+jwt\s+from\s*["']jsonwebtoken["']\s*;?\s*/gm, "")
|
|
54
54
|
.replace(
|
|
55
55
|
/import\s*\*\s*as\s+jwt\s+from\s*["']jsonwebtoken["']\s*;?\s*/gm,
|
|
56
56
|
"",
|
|
57
57
|
);
|
|
58
58
|
|
|
59
|
-
// Remove
|
|
60
|
-
// Pattern 1: ../api/structures path
|
|
61
|
-
|
|
59
|
+
// Remove API structure imports with wrong paths
|
|
60
|
+
// Pattern 1: ../api/structures path (LLM often uses this wrong path)
|
|
61
|
+
cleanedCode = cleanedCode.replace(
|
|
62
62
|
/import\s*(?:type\s*)?{\s*[^}]+\s*}\s*from\s*["']\.\.\/api\/structures\/[^"']+["']\s*;?\s*/gm,
|
|
63
63
|
"",
|
|
64
64
|
);
|
|
65
|
-
// Pattern 2: @ORGANIZATION/PROJECT-api
|
|
66
|
-
|
|
65
|
+
// Pattern 2: @ORGANIZATION/PROJECT-api path (correct path but LLM shouldn't write it)
|
|
66
|
+
cleanedCode = cleanedCode.replace(
|
|
67
67
|
/import\s*(?:type\s*)?{\s*[^}]+\s*}\s*from\s*["']@ORGANIZATION\/PROJECT-api\/lib\/structures\/[^"']+["']\s*;?\s*/gm,
|
|
68
68
|
"",
|
|
69
69
|
);
|
|
70
70
|
|
|
71
71
|
// Remove specific type imports that match our typeReferences
|
|
72
72
|
for (const ref of typeReferences) {
|
|
73
|
-
// Remove any import of this specific type from any path
|
|
74
73
|
const typeImportRegex = new RegExp(
|
|
75
74
|
`import\\s*(?:type\\s*)?{\\s*${ref}\\s*}\\s*from\\s*["'][^"']+["']\\s*;?\\s*`,
|
|
76
75
|
"gm",
|
|
77
76
|
);
|
|
78
|
-
|
|
77
|
+
cleanedCode = cleanedCode.replace(typeImportRegex, "");
|
|
79
78
|
}
|
|
80
79
|
|
|
81
|
-
// Remove
|
|
80
|
+
// Remove decorator type imports if LLM mistakenly added them
|
|
82
81
|
if (decoratorType) {
|
|
83
82
|
const decoratorTypeRegex = new RegExp(
|
|
84
83
|
`import\\s*(?:type\\s*)?{\\s*${decoratorType}\\s*}\\s*from\\s*["']\\.\\.\/decorators\/payload\/${decoratorType}["']\\s*;?\\s*`,
|
|
85
84
|
"gm",
|
|
86
85
|
);
|
|
87
|
-
|
|
86
|
+
cleanedCode = cleanedCode.replace(decoratorTypeRegex, "");
|
|
88
87
|
}
|
|
89
88
|
|
|
89
|
+
return cleanedCode;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export async function replaceImportStatements<Model extends ILlmSchema.Model>(
|
|
93
|
+
ctx: AutoBeContext<Model>,
|
|
94
|
+
props: {
|
|
95
|
+
operation: AutoBeOpenApi.IOperation;
|
|
96
|
+
code: string;
|
|
97
|
+
decoratorType?: string;
|
|
98
|
+
},
|
|
99
|
+
) {
|
|
100
|
+
let { operation, code, decoratorType } = props;
|
|
101
|
+
|
|
102
|
+
// Extract type references from operation
|
|
103
|
+
const typeReferences: string[] = Array.from(
|
|
104
|
+
new Set(
|
|
105
|
+
[operation.requestBody, operation.responseBody]
|
|
106
|
+
.filter((el) => el !== null)
|
|
107
|
+
.map((el) => el.typeName.split(".")[0]!),
|
|
108
|
+
),
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
// Beautify code first for consistent formatting
|
|
112
|
+
const compiler: IAutoBeCompiler = await ctx.compiler();
|
|
113
|
+
code = await compiler.typescript.beautify(code);
|
|
114
|
+
|
|
115
|
+
// Remove all LLM-generated imports
|
|
116
|
+
code = removeAllImports(code, typeReferences, decoratorType);
|
|
117
|
+
|
|
90
118
|
// Build the standard imports
|
|
91
119
|
const imports = getRealizeWriteImportStatements(operation);
|
|
92
120
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
2
|
import { StringUtil } from "@autobe/utils";
|
|
3
3
|
import { ILlmSchema } from "@samchon/openapi";
|
|
4
|
-
import {
|
|
4
|
+
import { v7 } from "uuid";
|
|
5
5
|
|
|
6
6
|
import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
|
|
7
7
|
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
@@ -33,12 +33,13 @@ export const transformTestCorrectHistories = async <
|
|
|
33
33
|
},
|
|
34
34
|
previous.at(-1)!,
|
|
35
35
|
...failures.map(
|
|
36
|
-
(f) =>
|
|
36
|
+
(f, i, array) =>
|
|
37
37
|
({
|
|
38
|
-
id:
|
|
38
|
+
id: v7(),
|
|
39
39
|
created_at: new Date().toISOString(),
|
|
40
40
|
type: "assistantMessage",
|
|
41
41
|
text: StringUtil.trim`
|
|
42
|
+
# ${i === array.length - 1 ? "Latest Failure" : "Previous Failure"}
|
|
42
43
|
## Generated TypeScript Code
|
|
43
44
|
|
|
44
45
|
\`\`\`typescript
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
+
import { IAutoBeTypeScriptCompileResult } from "@autobe/interface";
|
|
3
|
+
import { StringUtil } from "@autobe/utils";
|
|
4
|
+
import { v7 } from "uuid";
|
|
5
|
+
|
|
6
|
+
import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
|
|
7
|
+
import { IAutoBeTestFunction } from "../structures/IAutoBeTestFunction";
|
|
8
|
+
|
|
9
|
+
export const transformTestCorrectInvalidRequestHistories = (
|
|
10
|
+
func: IAutoBeTestFunction,
|
|
11
|
+
diagnostics: IAutoBeTypeScriptCompileResult.IDiagnostic[],
|
|
12
|
+
): Array<
|
|
13
|
+
IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage
|
|
14
|
+
> => [
|
|
15
|
+
{
|
|
16
|
+
id: v7(),
|
|
17
|
+
created_at: new Date().toISOString(),
|
|
18
|
+
type: "systemMessage",
|
|
19
|
+
text: AutoBeSystemPromptConstant.TEST_CORRECT_INVALID_REQUEST,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: v7(),
|
|
23
|
+
created_at: new Date().toISOString(),
|
|
24
|
+
type: "assistantMessage",
|
|
25
|
+
text: StringUtil.trim`
|
|
26
|
+
## TypeScript Code
|
|
27
|
+
|
|
28
|
+
\`\`\`typescript
|
|
29
|
+
${func.script}
|
|
30
|
+
\`\`\`
|
|
31
|
+
|
|
32
|
+
## Compile Errors
|
|
33
|
+
|
|
34
|
+
\`\`\`json
|
|
35
|
+
${JSON.stringify(diagnostics)}
|
|
36
|
+
\`\`\`
|
|
37
|
+
`,
|
|
38
|
+
},
|
|
39
|
+
];
|
|
@@ -6,20 +6,36 @@ import { v7 } from "uuid";
|
|
|
6
6
|
import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
|
|
7
7
|
import { AutoBeState } from "../../../context/AutoBeState";
|
|
8
8
|
import { IAutoBeTestScenarioAuthorizationRole } from "../structures/IAutoBeTestScenarioAuthorizationRole";
|
|
9
|
+
import { getReferenceIds } from "../utils/getReferenceIds";
|
|
9
10
|
|
|
10
11
|
export const transformTestScenarioHistories = (
|
|
11
12
|
state: AutoBeState,
|
|
12
|
-
|
|
13
|
+
document: AutoBeOpenApi.IDocument,
|
|
13
14
|
include: AutoBeOpenApi.IOperation[],
|
|
14
15
|
exclude: Pick<AutoBeOpenApi.IOperation, "method" | "path">[],
|
|
15
16
|
): Array<
|
|
16
17
|
IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage
|
|
17
18
|
> => {
|
|
19
|
+
interface IRelationship {
|
|
20
|
+
endpoint: AutoBeOpenApi.IEndpoint;
|
|
21
|
+
ids: string[];
|
|
22
|
+
}
|
|
18
23
|
const authorizations: AutoBeInterfaceAuthorization[] =
|
|
19
24
|
state.interface?.authorizations ?? [];
|
|
20
|
-
|
|
21
25
|
const authorizationRoles: Map<string, IAutoBeTestScenarioAuthorizationRole> =
|
|
22
26
|
new Map();
|
|
27
|
+
const relationships: IRelationship[] = document.operations
|
|
28
|
+
.map((o) => ({
|
|
29
|
+
endpoint: {
|
|
30
|
+
method: o.method,
|
|
31
|
+
path: o.path,
|
|
32
|
+
},
|
|
33
|
+
ids: getReferenceIds({
|
|
34
|
+
document,
|
|
35
|
+
operation: o,
|
|
36
|
+
}),
|
|
37
|
+
}))
|
|
38
|
+
.filter((v) => v.ids.length !== 0);
|
|
23
39
|
|
|
24
40
|
for (const authorization of authorizations) {
|
|
25
41
|
for (const op of authorization.operations) {
|
|
@@ -50,27 +66,22 @@ export const transformTestScenarioHistories = (
|
|
|
50
66
|
created_at: new Date().toISOString(),
|
|
51
67
|
type: "assistantMessage",
|
|
52
68
|
text: StringUtil.trim`
|
|
53
|
-
# Operations
|
|
69
|
+
# API Operations
|
|
70
|
+
|
|
71
|
+
Below are the complete API operations.
|
|
72
|
+
Use this information to understand capabilities and dependency relationships.
|
|
73
|
+
Generate scenarios only for endpoints listed in "Included in Test Plan".
|
|
74
|
+
Other operations may be referenced as dependencies only.
|
|
54
75
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
It is also permissible to write multiple test codes on a single endpoint.
|
|
58
|
-
However, rather than meaningless tests, business logic tests should be written and an E2E test situation should be assumed.
|
|
76
|
+
You may write multiple scenarios for a single included endpoint.
|
|
77
|
+
Focus on business-logic-oriented E2E flows rather than trivial CRUD.
|
|
59
78
|
|
|
60
|
-
Please
|
|
61
|
-
For example, if you want to test liking and then deleting a post,
|
|
62
|
-
you might think to test post creation, liking, and unlike operations.
|
|
63
|
-
However, even if not explicitly mentioned, user registration or login are essential prerequisites.
|
|
79
|
+
Please analyze the operations to identify all dependencies required for testing.
|
|
64
80
|
Pay close attention to IDs and related values in the API,
|
|
65
81
|
and ensure you identify all dependencies between endpoints.
|
|
66
82
|
|
|
67
83
|
\`\`\`json
|
|
68
|
-
${JSON.stringify(
|
|
69
|
-
entire.map((el) => ({
|
|
70
|
-
...el,
|
|
71
|
-
specification: undefined,
|
|
72
|
-
})),
|
|
73
|
-
)}
|
|
84
|
+
${JSON.stringify({ operations: document.operations })}
|
|
74
85
|
\`\`\`
|
|
75
86
|
`,
|
|
76
87
|
} satisfies IAgenticaHistoryJson.IAssistantMessage,
|
|
@@ -86,11 +97,16 @@ export const transformTestScenarioHistories = (
|
|
|
86
97
|
When testing endpoints that require authentication, ensure you include the corresponding
|
|
87
98
|
join/login operations in your test scenario to establish proper authentication context.
|
|
88
99
|
|
|
100
|
+
Generate test scenarios only for these included endpoints. Do not create scenarios for excluded endpoints. Operations not listed here may be used only as dependencies.
|
|
101
|
+
|
|
89
102
|
${include
|
|
90
103
|
.map((el, i) => {
|
|
91
104
|
const roles = Array.from(authorizationRoles.values()).filter(
|
|
92
105
|
(role) => role.name === el.authorizationRole,
|
|
93
106
|
);
|
|
107
|
+
|
|
108
|
+
const requiredIds = getReferenceIds({ document, operation: el });
|
|
109
|
+
|
|
94
110
|
return StringUtil.trim`
|
|
95
111
|
## ${i + 1}. ${el.method.toUpperCase()} ${el.path}
|
|
96
112
|
|
|
@@ -108,6 +124,14 @@ export const transformTestScenarioHistories = (
|
|
|
108
124
|
.join("\n")
|
|
109
125
|
: "- None"
|
|
110
126
|
}
|
|
127
|
+
|
|
128
|
+
Required IDs:
|
|
129
|
+
|
|
130
|
+
- ${
|
|
131
|
+
requiredIds.length > 0
|
|
132
|
+
? requiredIds.map((id) => `\`${id}\``).join(", ")
|
|
133
|
+
: "None"
|
|
134
|
+
}
|
|
111
135
|
`;
|
|
112
136
|
})
|
|
113
137
|
.join("\n")}
|
|
@@ -123,5 +147,39 @@ export const transformTestScenarioHistories = (
|
|
|
123
147
|
.join("\n")}
|
|
124
148
|
`,
|
|
125
149
|
} satisfies IAgenticaHistoryJson.IAssistantMessage,
|
|
150
|
+
{
|
|
151
|
+
id: v7(),
|
|
152
|
+
created_at: new Date().toISOString(),
|
|
153
|
+
type: "assistantMessage",
|
|
154
|
+
text: StringUtil.trim`
|
|
155
|
+
# Candidate Dependencies
|
|
156
|
+
|
|
157
|
+
List of candidate dependencies extracted from path parameters and request bodies.
|
|
158
|
+
|
|
159
|
+
Apply dependency resolution to the target endpoint from "Included in Test Plan" and to dependencies found recursively from it.
|
|
160
|
+
For each required ID, locate the operation that creates the resource. Include the creator only if that operation exists in the provided operations list. Do not assume or invent operations. If no creator exists, treat the ID as an external or pre-existing input.
|
|
161
|
+
|
|
162
|
+
Dependency resolution steps:
|
|
163
|
+
1. Starting from the target endpoint, collect required IDs.
|
|
164
|
+
2. For each ID, search for a creator operation (typically POST).
|
|
165
|
+
3. If found, add it to the dependency chain in execution order and repeat for its own required IDs.
|
|
166
|
+
4. Stop when no further creators exist or are needed.
|
|
167
|
+
|
|
168
|
+
For each some_entity_id pattern, use the same approach: include a creator only when it is present in the operations list.
|
|
169
|
+
|
|
170
|
+
Endpoint | Required IDs (MUST be created by other APIs)
|
|
171
|
+
---------|---------------------------------------------------
|
|
172
|
+
${relationships
|
|
173
|
+
.map((r) =>
|
|
174
|
+
[
|
|
175
|
+
`\`${r.endpoint.method} ${r.endpoint.path}\``,
|
|
176
|
+
r.ids.map((id) => `\`${id}\``).join(", "),
|
|
177
|
+
].join(" | "),
|
|
178
|
+
)
|
|
179
|
+
.join("\n")}
|
|
180
|
+
|
|
181
|
+
Example: If an endpoint requires \`articleId\` and \`POST /articles\` exists, include it in dependencies
|
|
182
|
+
`,
|
|
183
|
+
} satisfies IAgenticaHistoryJson.IAssistantMessage,
|
|
126
184
|
];
|
|
127
185
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AutoBeTestValidateEvent } from "@autobe/interface";
|
|
2
|
+
|
|
3
|
+
import { IAutoBeTestFunction } from "../structures/IAutoBeTestFunction";
|
|
4
|
+
import { IAutoBeTestScenarioArtifacts } from "../structures/IAutoBeTestScenarioArtifacts";
|
|
5
|
+
|
|
6
|
+
export const transformTestValidateEvent = (
|
|
7
|
+
event: AutoBeTestValidateEvent,
|
|
8
|
+
artifacts: IAutoBeTestScenarioArtifacts,
|
|
9
|
+
): IAutoBeTestFunction => ({
|
|
10
|
+
scenario: event.file.scenario,
|
|
11
|
+
artifacts,
|
|
12
|
+
location: event.file.location,
|
|
13
|
+
script: event.file.content,
|
|
14
|
+
});
|