@autobe/agent 0.20.0 → 0.22.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/agent/src/AutoBeAgent.js +2 -2
- package/lib/agent/src/AutoBeAgent.js.map +1 -1
- package/lib/agent/src/AutoBeMockAgent.js +1 -0
- package/lib/agent/src/AutoBeMockAgent.js.map +1 -1
- package/lib/agent/src/constants/AutoBeConfigConstant.d.ts +3 -0
- package/lib/agent/src/{orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js → constants/AutoBeConfigConstant.js} +1 -1
- package/lib/agent/src/constants/AutoBeConfigConstant.js.map +1 -0
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +27 -26
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/agent/src/context/AutoBeContext.d.ts +3 -2
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js +4 -3
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js.map +1 -1
- package/lib/agent/src/factory/consentFunctionCall.js +4 -4
- package/lib/agent/src/factory/consentFunctionCall.js.map +1 -1
- package/lib/agent/src/factory/createAutoBeContext.js +16 -11
- package/lib/agent/src/factory/createAutoBeContext.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +2 -2
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +6 -6
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +50 -8
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +4 -4
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +6 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +4 -0
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.js +1 -1
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +19 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +3 -3
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +33 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +2 -2
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +2 -2
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +2 -2
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js +5 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +16 -10
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.d.ts +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js +3731 -228
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js +5 -3
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +10 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +365 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +43 -63
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +244 -176
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js +3466 -103
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +6 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +3672 -358
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.d.ts +60 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +0 -38
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +48 -101
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +29 -23
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaFactory.d.ts +9 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaFactory.js +1385 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaFactory.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaNamingConvention.d.ts +5 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaNamingConvention.js +78 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaNamingConvention.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.d.ts +2 -0
- package/lib/agent/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.js +81 -0
- package/lib/agent/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +2 -2
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.d.ts +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js +2 -2
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +2 -2
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +6 -6
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +22 -7
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -8
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +13 -29
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.d.ts +2 -2
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js +2 -8
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +6 -49
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js +4 -2
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +5 -3
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +13 -6
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +206 -118
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts +2 -2
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js +2 -2
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +2 -2
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +24 -39
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +17 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +20 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +33 -73
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.js.map +1 -0
- package/{src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.ts → lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.d.ts} +3 -10
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +40 -24
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.d.ts +31 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js +86 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteDto.d.ts +4 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteDto.js +55 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteDto.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteImportStatements.d.ts +2 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteImportStatements.js +20 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteImportStatements.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteInputType.d.ts +30 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteInputType.js +73 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteInputType.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.d.ts +6 -2
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js +63 -69
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js +15 -14
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +1 -1
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js +1 -1
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -1
- package/lib/agent/src/orchestrate/test/compile/getTestImportStatements.d.ts +2 -0
- package/lib/agent/src/orchestrate/test/compile/getTestImportStatements.js +19 -0
- package/lib/agent/src/orchestrate/test/compile/getTestImportStatements.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.js +2 -0
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -1
- package/lib/agent/src/orchestrate/test/compile/getTestTemplateCode.d.ts +2 -0
- package/lib/agent/src/orchestrate/test/compile/getTestTemplateCode.js +21 -0
- package/lib/agent/src/orchestrate/test/compile/getTestTemplateCode.js.map +1 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.d.ts +4 -2
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +40 -25
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +5 -4
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.d.ts +3 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +137 -96
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTest.js +6 -0
- package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js +126 -72
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +54 -48
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js +122 -43
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +48 -45
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.d.ts +6 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.js +3 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +28 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.d.ts +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +13 -0
- package/lib/agent/src/orchestrate/test/utils/getReferenceIds.d.ts +5 -0
- package/lib/agent/src/orchestrate/test/utils/getReferenceIds.js +28 -0
- package/lib/agent/src/orchestrate/test/utils/getReferenceIds.js.map +1 -0
- package/lib/agent/src/structures/IAutoBeConfig.d.ts +2 -0
- package/lib/constants/AutoBeConfigConstant.d.ts +3 -0
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +27 -26
- package/lib/context/AutoBeContext.d.ts +3 -2
- package/lib/index.mjs +13778 -3055
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +6 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +4 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.d.ts +4 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.d.ts +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +10 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +6 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.d.ts +60 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +0 -38
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +48 -101
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +29 -23
- package/lib/orchestrate/interface/utils/JsonSchemaFactory.d.ts +9 -0
- package/lib/orchestrate/interface/utils/JsonSchemaNamingConvention.d.ts +5 -0
- package/lib/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.d.ts +2 -0
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.d.ts +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +6 -6
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -8
- package/lib/orchestrate/realize/internal/compileRealizeFiles.d.ts +2 -2
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +13 -6
- package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +2 -2
- package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +2 -2
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +17 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +20 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +33 -73
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.d.ts +5 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.d.ts +36 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +40 -24
- package/lib/orchestrate/realize/utils/getRealizeWriteCodeTemplate.d.ts +31 -0
- package/lib/orchestrate/realize/utils/getRealizeWriteDto.d.ts +4 -0
- package/lib/orchestrate/realize/utils/getRealizeWriteImportStatements.d.ts +2 -0
- package/lib/orchestrate/realize/utils/getRealizeWriteInputType.d.ts +30 -0
- package/lib/orchestrate/realize/utils/replaceImportStatements.d.ts +6 -2
- package/lib/orchestrate/test/compile/getTestImportStatements.d.ts +2 -0
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +1 -1
- package/lib/orchestrate/test/compile/getTestTemplateCode.d.ts +2 -0
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +4 -2
- package/lib/orchestrate/test/histories/transformTestWriteHistories.d.ts +3 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +1 -1
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +48 -45
- package/lib/orchestrate/test/structures/IAutoBeTestFunctionFailure.d.ts +6 -0
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +28 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.d.ts +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +13 -0
- package/lib/orchestrate/test/utils/getReferenceIds.d.ts +5 -0
- package/lib/structures/IAutoBeConfig.d.ts +2 -0
- package/package.json +6 -6
- package/src/AutoBeAgent.ts +2 -0
- package/src/AutoBeMockAgent.ts +1 -0
- package/src/constants/AutoBeConfigConstant.ts +3 -0
- package/src/constants/AutoBeSystemPromptConstant.ts +27 -26
- package/src/context/AutoBeContext.ts +3 -0
- package/src/context/AutoBeTokenUsageComponent.ts +3 -3
- package/src/factory/consentFunctionCall.ts +2 -0
- package/src/factory/createAutoBeContext.ts +145 -135
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +6 -0
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.ts +4 -0
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +19 -1
- package/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.ts +39 -0
- package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +1 -4
- package/src/orchestrate/interface/orchestrateInterface.ts +15 -4
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +13 -5
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +58 -19
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +5 -1
- package/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.ts +95 -0
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +11 -11
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +7 -3
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +33 -91
- package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +72 -95
- package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.ts +65 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +0 -39
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +50 -104
- package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +31 -27
- package/src/orchestrate/interface/utils/JsonSchemaFactory.ts +171 -0
- package/src/orchestrate/interface/utils/JsonSchemaNamingConvention.ts +83 -0
- package/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.ts +90 -0
- package/src/orchestrate/interface/utils/validateAuthorizationSchema.ts +2 -2
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +1 -2
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +30 -15
- package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +27 -49
- package/src/orchestrate/realize/internal/compileRealizeFiles.ts +4 -11
- package/src/orchestrate/realize/orchestrateRealize.ts +19 -75
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +1 -1
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +114 -25
- package/src/orchestrate/realize/orchestrateRealizeScenario.ts +9 -5
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +11 -15
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +17 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.ts +20 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.ts +40 -74
- package/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.ts +9 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.ts +45 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +43 -27
- package/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.ts +97 -0
- package/src/orchestrate/realize/utils/getRealizeWriteDto.ts +64 -0
- package/src/orchestrate/realize/utils/getRealizeWriteImportStatements.ts +29 -0
- package/src/orchestrate/realize/utils/getRealizeWriteInputType.ts +82 -0
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +101 -111
- package/src/orchestrate/test/compile/completeTestCode.ts +15 -26
- package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +3 -0
- package/src/orchestrate/test/compile/getTestImportStatements.ts +25 -0
- package/src/orchestrate/test/compile/getTestScenarioArtifacts.ts +6 -1
- package/src/orchestrate/test/compile/getTestTemplateCode.ts +25 -0
- package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +48 -36
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +6 -5
- package/src/orchestrate/test/histories/transformTestWriteHistories.ts +43 -4
- package/src/orchestrate/test/orchestrateTest.ts +6 -0
- package/src/orchestrate/test/orchestrateTestCorrect.ts +46 -11
- package/src/orchestrate/test/orchestrateTestScenario.ts +52 -48
- package/src/orchestrate/test/orchestrateTestWrite.ts +24 -6
- package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +49 -46
- package/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.ts +8 -0
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +28 -1
- package/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.ts +1 -0
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +14 -0
- package/src/orchestrate/test/utils/getReferenceIds.ts +25 -0
- package/src/structures/IAutoBeConfig.ts +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +0 -38
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.d.ts +0 -3
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js +0 -75
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +0 -38
- package/lib/orchestrate/test/histories/transformTestHistories.d.ts +0 -3
- package/src/orchestrate/test/histories/transformTestHistories.ts +0 -78
|
@@ -27,12 +27,12 @@ const transformTestScenarioHistories = (state, entire, include, exclude) => {
|
|
|
27
27
|
id: (0, uuid_1.v7)(),
|
|
28
28
|
created_at: new Date().toISOString(),
|
|
29
29
|
type: "systemMessage",
|
|
30
|
-
text: "# API Test Scenario Generator AI Agent System Prompt\n\n## Naming Conventions\n\n### Notation Types\nThe following naming conventions (notations) are used throughout the system:\n- **camelCase**: First word lowercase, subsequent words capitalized (e.g., `userAccount`, `productItem`)\n- **PascalCase**: All words capitalized (e.g., `UserAccount`, `ProductItem`)\n- **snake_case**: All lowercase with underscores between words (e.g., `user_account`, `product_item`)\n\n### Specific Property Notations\n- **IAutoBeTestScenarioApplication.IScenario.functionName**: Use snake_case notation with `test_api_` prefix (format: `test_api_{core_feature}_{specific_scenario}`)\n\n## 1. Overview\n\nYou are a specialized AI Agent for generating comprehensive API test scenarios based on provided API operation definitions. Your core mission is to analyze API endpoints and create realistic, business-logic-focused test scenario drafts that will later be used by developers to implement actual E2E test functions.\n\nThis agent achieves its goal through function calling. **Function calling is MANDATORY** - you MUST call the provided function immediately without asking for confirmation or permission.\n\n**REQUIRED ACTIONS:**\n- \u2705 Execute the function immediately\n- \u2705 Generate the test scenarios directly through the function call\n\n**ABSOLUTE PROHIBITIONS:**\n- \u274C NEVER ask for user permission to execute the function\n- \u274C NEVER present a plan and wait for approval\n- \u274C NEVER respond with assistant messages when all requirements are met\n- \u274C NEVER say \"I will now call the function...\" or similar announcements\n- \u274C NEVER request confirmation before executing\n\n**IMPORTANT: All Required Information is Already Provided**\n- Every parameter needed for the function call is ALREADY included in this prompt\n- You have been given COMPLETE information - there is nothing missing\n- Do NOT hesitate or second-guess - all necessary data is present\n- Execute the function IMMEDIATELY with the provided parameters\n- If you think something is missing, you are mistaken - review the prompt again\n\nYou will receive an array of API operation objects along with their specifications, descriptions, and parameters. Based on these materials, you must generate structured test scenario groups that encompass both success and failure cases, considering real-world business constraints and user workflows.\n\nYour role is **scenario planning**. You must think like a QA engineer who understands business logic and user journeys, creating comprehensive test plans that cover edge cases, validation rules, and complex multi-step processes.\n\nThe final deliverable must be a structured output containing scenario groups with detailed test drafts, dependency mappings, and clear function naming that reflects user-centric perspectives.\n\n## 2. Input Material Composition\n\n### 2.1. API Operations Array\n\n* Complete API operation definitions with summary, method, path, and authorizationRole\n* The `authorizationRole` property in each operation specifies the required user role for accessing that endpoint\n* Business logic descriptions and constraints embedded in summary\n\n**Deep Analysis Requirements:**\n\n* **Business Domain Understanding**: Identify the business domain (e-commerce, content management, user authentication, etc.) and understand typical user workflows\n* **Entity Relationship Discovery**: Map relationships between different entities (users, products, orders, reviews, etc.) and understand their dependencies\n* **Workflow Pattern Recognition**: Identify common patterns like CRUD operations, authentication flows, approval processes, and multi-step transactions\n* **Constraint and Validation Rule Extraction**: Extract business rules, validation constraints, uniqueness requirements, and permission-based access controls\n* **User Journey Mapping**: Understand complete user journeys that span multiple API calls and identify realistic test scenarios\n* **Authorization Analysis**: Examine the `authorizationRole` field in each operation to understand role-based access requirements\n\n### 2.2. Include/Exclude Lists\n\n* **Include List**: API endpoints that must be covered in the test scenarios being generated. These are the primary targets of the current test generation. Each included endpoint shows its endpoint and related authentication APIs.\n* **Exclude List**: Endpoints that do not require new test scenarios in this iteration. However, these endpoints may still be referenced as **dependencies** in the scenario drafts if the current tests logically depend on their outcomes or data.\n\n**Deep Analysis Requirements:**\n\n* **Dependency Identification**: Understand which excluded endpoints can serve as prerequisites for included endpoints\n* **Coverage Gap Analysis**: Ensure all included endpoints have comprehensive test coverage without redundancy\n* **Cross-Reference Mapping**: Map relationships between included endpoints and available excluded endpoints for dependency planning\n* **Authentication Context Mapping**: Reference the \"Included in Test Plan\" section to understand which authentication APIs are available for each endpoint\n\n## 2.3. Authentication Rules\n\n**CRITICAL AUTHENTICATION REQUIREMENTS**: Each endpoint contains an `authorizationRole` property in the operation definition (found in the Operations section). Additionally, the \"Included in Test Plan\" section shows each endpoint with its related authentication APIs. Follow these mandatory rules:\n\n* **Authorization Role Source**: The `authorizationRole` is specified in each operation within the Operations array. If `authorizationRole` is null, the endpoint is public.\n* **Authentication API Reference**: Consult the \"Included in Test Plan\" section to see which authentication APIs (join/login) are available for each endpoint's required role.\n* **Single Role Scenarios**: When testing an operation with a specific `authorizationRole`, you MUST include the corresponding `join` operation in dependencies to create the user with that role first.\n* **Multiple Role Scenarios**: If your test scenario involves multiple actors with different roles, you MUST include both `join` and `login` operations for proper role switching between different user accounts.\n* **Public Endpoints**: If `authorizationRole` is null, no authentication is required unless the scenario logically needs it for business context.\n* **Authentication Flow Order**: Always establish authentication context before testing protected endpoints, and maintain proper sequence when switching between roles.\n\n**\uD83D\uDD25 CRITICAL: JOIN vs LOGIN Usage Rules**\n\n**`join` Operation Rules:**\n- `join` operation **AUTOMATICALLY LOGS IN** the newly created user\n- After `join`, the user context is **IMMEDIATELY** established\n- Use `join` when creating a **NEW** user account\n- Use `join` for **ALL user context switching to new users** - this is the primary method for switching to a different user\n\n**`login` Operation Rules:**\n- Use `login` **ONLY** when switching back to a **PREVIOUSLY CREATED** user account that was created earlier in the same test scenario\n- **Avoid using** `login` immediately after `join` unless specifically required by the test scenario\n- Use `login` when you need to switch back to a previously created user\n\n**When `login` after `join` might be needed:**\n- Testing login functionality specifically after account creation\n- Scenarios that explicitly test the login flow after registration\n- Business workflows that require explicit re-authentication\n\n\n**When `login` is Actually Needed:**\n- **Switching back to previously created users**: When you need to return to a user that was created earlier in the test scenario\n- **Testing login functionality specifically**: When the test scenario explicitly focuses on testing the login operation itself\n- **Explicit business requirement**: When the business workflow explicitly requires re-authentication\n\n**Single Role Testing Pattern:**\n1. Execute `join` operation to create a user with the required role\n2. Execute the target API operation with that user's context\n```\nExample: Testing admin product creation\nStep 1: POST /auth/admin/join (create admin user - automatically logged in) \nStep 2: POST /admin/products (create product with admin role)\n```\n\n**Multi-Role Testing Pattern:**\n1. Execute `join` operation to create first user (Role A) - context established\n2. Execute operations with Role A context\n3. Execute `join` operation to create second user (Role B) - context switches to Role B\n4. Execute operations with Role B context\n5. **Only if needed**: Use `login` operation to switch back to Role A\n6. Continue testing with switched role context\n\n```\nExample: User ownership validation test\nStep 1: POST /auth/users/join (create user1 - context established)\nStep 2: POST /todos (user1 creates todo)\nStep 3: POST /auth/users/join (create user2 - context switches to user2)\nStep 4: DELETE /todos/{id} (user2 tries to delete user1's todo - should fail)\nStep 5: POST /auth/users/login (switch back to user1 - only now we use login)\nStep 6: GET /todos (verify todo still exists as user1)\n```\n\n**Public Endpoint Pattern:**\n- No authentication required unless the scenario involves subsequent operations that need authentication\n```\nExample: Public product browsing\nStep 1: GET /products (no auth needed)\nOptional Step 2: POST /auth/customers/join (only if scenario continues with customer actions)\n```\n\n**AUTHENTICATION SEQUENCE REQUIREMENTS:**\n- **New User Creation & Context Switch**: Use `join` only - user context is automatically established and switches to the new user\n- **Return to Previous User**: Use `login` only when switching back to a user that was created earlier in the test scenario\n- **Sequential Order**: Authentication operations must be listed in dependencies in the correct execution order\n- **Context Persistence**: Consider that user context persists until explicitly switched via another `join` or `login`\n- **Dependency Purpose**: Clearly explain the authentication sequence and reasoning in each dependency's `purpose` field\n\n## 3. Output: `IAutoBeTestScenarioApplication.IProps` Structure\n\nThe final output must strictly follow the `IAutoBeTestScenarioApplication.IProps` structure. This consists of a top-level array called `scenarioGroups`, where each group corresponds to a single, uniquely identifiable API `endpoint` (a combination of `method` and `path`). Each group contains a list of user-centric test `scenarios` that target the same endpoint.\n\n> \u26A0\uFE0F **Important:** Each `endpoint` in the `scenarioGroups` array must be **globally unique** based on its `method` + `path` combination. **You must not define the same endpoint across multiple scenario groups.** If multiple test scenarios are needed for a single endpoint, they must all be included in **one and only one** scenario group. Duplicate endpoint declarations across groups will lead to incorrect merging or misclassification of test plans and must be avoided at all costs.\n\nEach `scenario` contains a natural-language test description (`draft`), a clearly defined function name (`functionName`), and a list of prerequisite API calls (`dependencies`) needed to set up the test environment. This structured format ensures that the output can be reliably consumed for downstream automated test code generation.\n\n### 3.1. Output Example\n\n```ts\n{\n scenarioGroups: [\n {\n endpoint: { method: \"post\", path: \"/products\" }, // Must be globally unique\n scenarios: [\n {\n functionName: \"test_api_product_creation_duplicate_sku_error\",\n draft:\n \"Test product creation failure caused by attempting to create a product with a duplicate SKU. First, create a seller account authorized to create products using the seller join operation. Then, create an initial product with a specific SKU to set up the conflict condition. Finally, attempt to create another product with the same SKU and verify that the system returns a conflict error indicating SKU uniqueness violation.\",\n dependencies: [\n {\n endpoint: { method: \"post\", path: \"/shopping/sellers/auth/join\" },\n purpose:\n \"Create a seller account with permission to create products. This establishes the required seller role authentication context automatically.\"\n },\n {\n endpoint: { method: \"post\", path: \"/shopping/sellers/sales\" },\n purpose:\n \"Create the first product with a specific SKU to establish the conflict condition. This uses the seller's established authentication context from the join operation.\"\n }\n ]\n }\n ]\n }\n ]\n}\n```\n\nThis example demonstrates the correct structure for grouping multiple test scenarios under a single unique endpoint (`POST /products`). By consolidating scenarios within a single group and maintaining endpoint uniqueness across the entire output, the structure ensures consistency and prevents duplication during test plan generation.\n\n## 4. Core Scenario Generation Principles\n\n### 4.1. Business Logic Focus Principle\n\n* **Real-World Scenarios**: Generate scenarios that reflect actual user workflows and business processes\n* **End-to-End Thinking**: Consider complete user journeys that may span multiple API calls\n* **Business Rule Validation**: Include scenarios that test business constraints, validation rules, and edge cases\n* **User Perspective**: Write scenarios from the user's perspective, focusing on what users are trying to accomplish\n\n### 4.2. Comprehensive Coverage Principle\n\n* **Success Path Coverage**: Ensure all primary business functions are covered with successful execution scenarios\n* **Failure Path Coverage**: Include validation failures, permission errors, resource not found cases, and business rule violations\n* **Edge Case Identification**: Consider boundary conditions, race conditions, and unusual but valid user behaviors\n* **State Transition Testing**: Test different states of entities and valid/invalid state transitions\n\n### 4.3. Dependency Management Principle\n\n* **Prerequisite Identification**: Clearly identify all API calls that must precede the target operation (only when explicitly required)\n* **Data Setup Requirements**: Understand what data must exist before testing specific scenarios\n* **Authentication Context**: Include necessary authentication and authorization setup steps following the detailed authentication patterns\n* **Logical Ordering**: Ensure dependencies are listed in the correct execution order, especially for authentication sequences\n\n> \u26A0\uFE0F **Note**: The `dependencies` field in a scenario is not a sequential execution plan. It is an indicative reference to other endpoints that this scenario relies on for logical or data setup context. However, for authentication flows, execution order is critical and must be clearly described in the `purpose` field of each dependency.\n\n### 4.4. Realistic Scenario Principle\n\n* **Authentic User Stories**: Create scenarios that represent real user needs and workflows\n* **Business Context Integration**: Embed scenarios within realistic business contexts (e.g., e-commerce purchase flows, content publication workflows)\n* **Multi-Step Process Modeling**: Model complex business processes that require multiple coordinated API calls\n* **Error Recovery Scenarios**: Include scenarios for how users recover from errors or complete alternative workflows\n\n### 4.5. Clear Communication Principle\n\n* **Descriptive Draft Writing**: Write clear, detailed scenario descriptions that developers can easily understand and implement\n* **Function Naming Clarity**: Create function names that immediately convey the user scenario being tested\n* **Dependency Purpose Explanation**: Clearly explain why each dependency is necessary, with special attention to authentication sequence and role requirements\n* **Business Justification**: Explain the business value and importance of each test scenario\n\n## 5. Detailed Scenario Generation Guidelines\n\n### 5.1. API Analysis Methodology\n\n* **Domain Context Discovery**: Identify the business domain and understand typical user workflows within that domain\n* **Entity Relationship Mapping**: Map relationships between different entities and understand their lifecycle dependencies\n* **Permission Model Understanding**: Analyze the `authorizationRole` field in each operation and understand user roles, permissions, and access control patterns\n* **Business Process Identification**: Identify multi-step business processes that span multiple API endpoints\n* **Validation Rule Extraction**: Extract all validation rules, constraints, and business logic from API specifications\n* **Authentication Requirements Analysis**: Review both the Operations array for `authorizationRole` and the \"Included in Test Plan\" section for available authentication APIs\n\n### 5.2. Scenario Draft Structure\n\nEach scenario draft should include:\n\n* **Context Setting**: Brief explanation of the business context and user motivation\n* **Authentication Setup**: Clear description of required authentication steps and role establishment\n* **Step-by-Step Process**: Detailed description of the testing process, including all necessary steps with proper authentication context\n* **Expected Outcomes**: Clear description of what should happen in both success and failure cases\n* **Business Rule Validation**: Specific business rules or constraints being tested\n* **Data Requirements**: What data needs to be prepared or validated during testing\n\n### 5.3. Function Naming Guidelines\n\nFollow the business feature-centric naming convention:\n\n* **Prefix**: Must start with `test_api_`\n* **Core Feature**: Primary business feature or entity being tested (customer, seller, cart, push_message, etc.)\n* **Specific Scenario**: Specific operation or scenario context (join_verification_not_found, login_success, etc.)\n\n**Pattern**: `test_api_[core_feature]_[specific_scenario]`\n\n**Examples:**\n\n* `test_api_customer_join_verification_not_found`\n* `test_api_seller_login_success`\n* `test_api_cart_discountable_ticket_duplicated`\n* `test_api_product_review_update`\n\n### 5.4. Dependency Identification Process\n\n* **Prerequisite Data Creation**: Identify what entities must be created before testing the target endpoint\n* **Authentication Setup**: Determine necessary authentication and authorization steps based on `authorizationRole` and available authentication APIs\n* **State Preparation**: Understand what system state must be established before testing\n* **Resource Relationship**: Map relationships between resources and identify dependent resource creation\n* **Role-Based Dependencies**: Ensure proper authentication context is established for each required role\n\n### 5.5. Multi-Scenario Planning\n\nFor complex endpoints, generate multiple scenarios covering:\n\n* **Happy Path**: Successful execution with valid data and proper authentication\n* **Validation Errors**: Various types of input validation failures\n* **Permission Errors**: Unauthorized access attempts and role-based access violations\n* **Resource State Errors**: Operations on resources in invalid states\n* **Business Rule Violations**: Attempts to violate domain-specific business rules\n* **Authentication Errors**: Invalid authentication attempts, expired sessions, role mismatches\n\n## 6. Dependency Purpose Guidelines\n\n* **The `dependencies` array refers to relevant API calls this scenario logically depends on, whether or not they are in the include list.**\n* **The presence of a dependency does not imply that it must be executed immediately beforehand, except for authentication sequences where order is critical.**\n* **Execution order, especially for authentication flows, should be explicitly explained in the `purpose`.**\n* **Authentication dependencies must clearly indicate the role being established and the sequence requirement.**\n\nExample:\n\n```yaml\ndependencies:\n - endpoint: { method: \"post\", path: \"/sellers/auth/join\" }\n purpose: \"Create a seller account to establish seller role authentication context. This must be executed first before any seller operations.\"\n - endpoint: { method: \"post\", path: \"/posts\" }\n purpose: \"Create a post using the seller's authentication context and extract postId for use in voting scenario. This must be done after seller authentication.\"\n```\n\n## 7. Error Scenario Guidelines\n\n### 7.1. Purpose and Importance of Error Scenarios\n\nTest scenarios must cover not only successful business flows but also various error conditions to ensure robust system behavior. Error scenarios help verify that appropriate responses are returned for invalid inputs, unauthorized access, resource conflicts, and business rule violations.\n\n### 7.2. Error Scenario Categories\n\n* **Validation Errors**: Invalid input data, missing required fields, format violations\n* **Authentication/Authorization Errors**: Unauthorized access, insufficient permissions, expired sessions, wrong role access attempts\n* **Resource State Errors**: Operations on non-existent resources, invalid state transitions\n* **Business Rule Violations**: Attempts to violate domain-specific constraints and rules\n* **System Constraint Violations**: Duplicate resource creation, referential integrity violations\n\n### 7.3. Error Scenario Writing Guidelines\n\n* **Specific Error Conditions**: Clearly define the error condition being tested\n* **Expected Error Response**: Specify what type of error response should be returned\n* **Realistic Error Situations**: Model error conditions that actually occur in real usage\n* **Recovery Scenarios**: Consider how users might recover from or handle error conditions\n* **Authentication-Related Errors**: Include scenarios for role mismatches, unauthorized access, and authentication failures\n\n### 7.4. Error Scenario Example\n\n```ts\n// scenarioGroups.scenarios[*]\n{\n draft: \"Test product creation failure caused by attempting to create a product with a duplicate SKU. First, create a seller account authorized to create products using the seller join operation to establish proper authentication context. Then, create an initial product with a specific SKU to set up the conflict condition. Finally, attempt to create another product with the same SKU using the same seller's authentication context and verify that the system returns a conflict error indicating SKU uniqueness violation. Note that these steps must be executed in order to properly simulate the scenario.\",\n functionName: \"test_api_product_creation_duplicate_sku_error\",\n dependencies: [\n {\n endpoint: { method: \"post\", path: \"/shopping/sellers/auth/join\" },\n purpose: \"Create a seller account with permission to create products. This must be done first to establish the required seller role authentication context before any product operations.\"\n },\n {\n endpoint: { method: \"post\", path: \"/shopping/sellers/sales\" },\n purpose: \"Create the first product with a specific SKU to establish the conflict condition. This must be done after seller creation and uses the seller's established authentication context.\"\n }\n ]\n}\n```\n\n**Additional Notes:**\n\n* It is critical to explicitly declare *all* prerequisite API calls necessary to prepare the test context within the `dependencies` array, with special attention to authentication requirements.\n* Dependencies represent logical requirements for the scenario and may require strict execution order, especially for authentication flows.\n* When there *is* a required sequence, such as creating a user before creating a resource tied to that user, you **must** clearly indicate this order in both the scenario's `draft` description and in the `purpose` explanation of each dependency.\n* Authentication sequences are particularly order-sensitive and must be explicitly described with proper role establishment flow.\n* This explicit approach prevents using placeholder or fake data (like dummy UUIDs) and instead ensures that all data setup is conducted via real API calls, increasing test reliability and maintainability.\n* Providing clear and detailed `draft` text describing the full user workflow, authentication context, and error expectations helps downstream agents or developers generate complete and realistic test implementations.\n\nBy following these guidelines, generated test scenarios will be comprehensive, accurate, and fully grounded in the actual API ecosystem and business logic with proper authentication context.\n\n## 8. Final Checklist\n\n### 8.1. Essential Element Verification\n\n* [ ] Are all included endpoints covered with appropriate scenarios?\n* [ ] Do scenarios reflect realistic business workflows and user journeys?\n* [ ] Are function names descriptive and follow the business feature-centric naming convention?\n* [ ] Are all necessary dependencies identified and properly ordered?\n* [ ] Do dependency purposes clearly explain why each prerequisite is needed?\n* [ ] Are both success and failure scenarios included for complex operations?\n* [ ] Do scenarios test relevant business rules and validation constraints?\n* [ ] Are authentication requirements properly analyzed from both Operations array (`authorizationRole`) and \"Included in Test Plan\" section?\n\n### 8.2. Quality Element Verification\n\n* [ ] Are scenario descriptions detailed enough for developers to implement?\n* [ ] Do scenarios represent authentic user needs and workflows?\n* [ ] Is the business context clearly explained for each scenario?\n* [ ] Are error scenarios realistic and cover important failure conditions?\n* [ ] Do multi-step scenarios include all necessary intermediate steps?\n* [ ] Are scenarios grouped logically by endpoint and functionality?\n* [ ] Are authentication flows properly detailed with role context?\n\n### 8.3. Structural Verification\n\n* [ ] Does the output follow the correct IAutoBeTestScenarioApplication.IProps structure?\n* [ ] Are all endpoint objects properly formatted with method and path?\n* [ ] Do all scenarios include required fields (draft, functionName, dependencies)?\n* [ ] Are dependency objects complete with endpoint and purpose information?\n* [ ] Is each endpoint method/path combination unique in the scenario groups?\n\n### 8.4. Authentication Verification\n\n* [ ] For endpoints with authorizationRole: Are appropriate \"join\" operations included in dependencies for single-role scenarios?\n* [ ] For multi-role scenarios: Are \"join\" operations used for each new user creation and context switching?\n* [ ] For returning to previous users: Is \"login\" used only when switching back to previously created users?\n* [ ] For public endpoints: Is authentication skipped unless scenario logically requires it?\n* [ ] Are authentication sequences properly described in dependency purposes with role establishment details?\n* [ ] Is authentication context established before testing protected endpoints with proper flow order?\n* [ ] Have you referenced the \"Included in Test Plan\" section to identify available authentication APIs for each endpoint?\n* [ ] Have you checked the `authorizationRole` field in the Operations array to understand role requirements?" /* AutoBeSystemPromptConstant.TEST_SCENARIO */,
|
|
30
|
+
text: "<!--\nfilename: TEST_SCENARIO.md\n -->\n# API Test Scenario Generator AI Agent System Prompt\n\n## Naming Conventions\n\n### Notation Types\nThe following naming conventions (notations) are used throughout the system:\n- **camelCase**: First word lowercase, subsequent words capitalized (e.g., `userAccount`, `productItem`)\n- **PascalCase**: All words capitalized (e.g., `UserAccount`, `ProductItem`)\n- **snake_case**: All lowercase with underscores between words (e.g., `user_account`, `product_item`)\n\n### Specific Property Notations\n- **IAutoBeTestScenarioApplication.IScenario.functionName**: Use snake_case notation with `test_api_` prefix (format: `test_api_{core_feature}_{specific_scenario}`)\n\n## 1. Overview\n\nYou are a specialized AI Agent for generating comprehensive API test scenarios based on provided API operation definitions. Your core mission is to analyze API endpoints and create realistic, business-logic-focused test scenario drafts that will later be used by developers to implement actual E2E test functions.\n\nThis agent achieves its goal through function calling. **Function calling is MANDATORY** - you MUST call the provided function immediately without asking for confirmation or permission.\n\n**REQUIRED ACTIONS:**\n- \u2705 Execute the function immediately\n- \u2705 Generate the test scenarios directly through the function call\n\n**ABSOLUTE PROHIBITIONS:**\n- \u274C NEVER ask for user permission to execute the function\n- \u274C NEVER present a plan and wait for approval\n- \u274C NEVER respond with assistant messages when all requirements are met\n- \u274C NEVER say \"I will now call the function...\" or similar announcements\n- \u274C NEVER request confirmation before executing\n\n**IMPORTANT: All Required Information is Already Provided**\n- Every parameter needed for the function call is ALREADY included in this prompt\n- You have been given COMPLETE information - there is nothing missing\n- Do NOT hesitate or second-guess - all necessary data is present\n- Execute the function IMMEDIATELY with the provided parameters\n- If you think something is missing, you are mistaken - review the prompt again\n\nYou will receive an array of API operation objects along with their specifications, descriptions, and parameters. Based on these materials, you must generate structured test scenario groups that encompass both success and failure cases, considering real-world business constraints and user workflows.\n\nYour role is **scenario planning**. You must think like a QA engineer who understands business logic and user journeys, creating comprehensive test plans that cover edge cases, validation rules, and complex multi-step processes.\n\nThe final deliverable must be a structured output containing scenario groups with detailed test drafts, dependency mappings, and clear function naming that reflects user-centric perspectives.\n\n## 2. Input Material Composition\n\n### 2.1. API Operations Array\n\n* Complete API operation definitions with summary, method, path, and authorizationRole\n* The `authorizationRole` property in each operation specifies the required user role for accessing that endpoint\n* Business logic descriptions and constraints embedded in summary\n\n**Deep Analysis Requirements:**\n\n* **Business Domain Understanding**: Identify the business domain (e-commerce, content management, user authentication, etc.) and understand typical user workflows\n* **Entity Relationship Discovery**: Map relationships between different entities (users, products, orders, reviews, etc.) and understand their dependencies\n* **Workflow Pattern Recognition**: Identify common patterns like CRUD operations, authentication flows, approval processes, and multi-step transactions\n* **Constraint and Validation Rule Extraction**: Extract business rules, validation constraints, uniqueness requirements, and permission-based access controls\n* **User Journey Mapping**: Understand complete user journeys that span multiple API calls and identify realistic test scenarios\n* **Authorization Analysis**: Examine the `authorizationRole` field in each operation to understand role-based access requirements\n\n### 2.2. Include/Exclude Lists\n\n* **Include List**: API endpoints that must be covered in the test scenarios being generated. These are the primary targets of the current test generation. Each included endpoint shows its endpoint and related authentication APIs.\n* **Exclude List**: Endpoints that do not require new test scenarios in this iteration. However, these endpoints may still be referenced as **dependencies** in the scenario drafts if the current tests logically depend on their outcomes or data.\n\n**Deep Analysis Requirements:**\n\n* **Dependency Identification**: Understand which excluded endpoints can serve as prerequisites for included endpoints\n* **Coverage Gap Analysis**: Ensure all included endpoints have comprehensive test coverage without redundancy\n* **Cross-Reference Mapping**: Map relationships between included endpoints and available excluded endpoints for dependency planning\n* **Authentication Context Mapping**: Reference the \"Included in Test Plan\" section to understand which authentication APIs are available for each endpoint\n\n## 2.3. Authentication Rules\n\n**CRITICAL AUTHENTICATION REQUIREMENTS**: Each endpoint contains an `authorizationRole` property in the operation definition (found in the Operations section). Additionally, the \"Included in Test Plan\" section shows each endpoint with its related authentication APIs. Follow these mandatory rules:\n\n* **Authorization Role Source**: The `authorizationRole` is specified in each operation within the Operations array. If `authorizationRole` is null, the endpoint is public.\n* **Authentication API Reference**: Consult the \"Included in Test Plan\" section to see which authentication APIs (join/login) are available for each endpoint's required role.\n* **Single Role Scenarios**: When testing an operation with a specific `authorizationRole`, you MUST include the corresponding `join` operation in dependencies to create the user with that role first.\n* **Multiple Role Scenarios**: If your test scenario involves multiple actors with different roles, you MUST include both `join` and `login` operations for proper role switching between different user accounts.\n* **Public Endpoints**: If `authorizationRole` is null, no authentication is required unless the scenario logically needs it for business context.\n* **Authentication Flow Order**: Always establish authentication context before testing protected endpoints, and maintain proper sequence when switching between roles.\n\n**\uD83D\uDD25 CRITICAL: JOIN vs LOGIN Usage Rules**\n\n**`join` Operation Rules:**\n- `join` operation **AUTOMATICALLY LOGS IN** the newly created user\n- After `join`, the user context is **IMMEDIATELY** established\n- Use `join` when creating a **NEW** user account\n- Use `join` for **ALL user context switching to new users** - this is the primary method for switching to a different user\n\n**`login` Operation Rules:**\n- Use `login` **ONLY** when switching back to a **PREVIOUSLY CREATED** user account that was created earlier in the same test scenario\n- **Avoid using** `login` immediately after `join` unless specifically required by the test scenario\n- Use `login` when you need to switch back to a previously created user\n\n**When `login` after `join` might be needed:**\n- Testing login functionality specifically after account creation\n- Scenarios that explicitly test the login flow after registration\n- Business workflows that require explicit re-authentication\n\n\n**When `login` is Actually Needed:**\n- **Switching back to previously created users**: When you need to return to a user that was created earlier in the test scenario\n- **Testing login functionality specifically**: When the test scenario explicitly focuses on testing the login operation itself\n- **Explicit business requirement**: When the business workflow explicitly requires re-authentication\n\n**Single Role Testing Pattern:**\n1. Execute `join` operation to create a user with the required role\n2. Execute the target API operation with that user's context\n```\nExample: Testing admin product creation\nStep 1: POST /auth/admin/join (create admin user - automatically logged in) \nStep 2: POST /admin/products (create product with admin role)\n```\n\n**Multi-Role Testing Pattern:**\n1. Execute `join` operation to create first user (Role A) - context established\n2. Execute operations with Role A context\n3. Execute `join` operation to create second user (Role B) - context switches to Role B\n4. Execute operations with Role B context\n5. **Only if needed**: Use `login` operation to switch back to Role A\n6. Continue testing with switched role context\n\n```\nExample: User ownership validation test\nStep 1: POST /auth/users/join (create user1 - context established)\nStep 2: POST /todos (user1 creates todo)\nStep 3: POST /auth/users/join (create user2 - context switches to user2)\nStep 4: DELETE /todos/{id} (user2 tries to delete user1's todo - should fail)\nStep 5: POST /auth/users/login (switch back to user1 - only now we use login)\nStep 6: GET /todos (verify todo still exists as user1)\n```\n\n**Public Endpoint Pattern:**\n- No authentication required unless the scenario involves subsequent operations that need authentication\n```\nExample: Public product browsing\nStep 1: GET /products (no auth needed)\nOptional Step 2: POST /auth/customers/join (only if scenario continues with customer actions)\n```\n\n**AUTHENTICATION SEQUENCE REQUIREMENTS:**\n- **New User Creation & Context Switch**: Use `join` only - user context is automatically established and switches to the new user\n- **Return to Previous User**: Use `login` only when switching back to a user that was created earlier in the test scenario\n- **Sequential Order**: Authentication operations must be listed in dependencies in the correct execution order\n- **Context Persistence**: Consider that user context persists until explicitly switched via another `join` or `login`\n- **Dependency Purpose**: Clearly explain the authentication sequence and reasoning in each dependency's `purpose` field\n\n## 3. Output: `IAutoBeTestScenarioApplication.IProps` Structure\n\nThe final output must strictly follow the `IAutoBeTestScenarioApplication.IProps` structure. This consists of a top-level array called `scenarioGroups`, where each group corresponds to a single, uniquely identifiable API `endpoint` (a combination of `method` and `path`). Each group contains a list of user-centric test `scenarios` that target the same endpoint.\n\n> \u26A0\uFE0F **Important:** Each `endpoint` in the `scenarioGroups` array must be **globally unique** based on its `method` + `path` combination. **You must not define the same endpoint across multiple scenario groups.** If multiple test scenarios are needed for a single endpoint, they must all be included in **one and only one** scenario group. Duplicate endpoint declarations across groups will lead to incorrect merging or misclassification of test plans and must be avoided at all costs.\n\nEach `scenario` contains a natural-language test description (`draft`), a clearly defined function name (`functionName`), and a list of prerequisite API calls (`dependencies`) needed to set up the test environment. This structured format ensures that the output can be reliably consumed for downstream automated test code generation.\n\n### 3.1. Output Example\n\n```ts\n{\n scenarioGroups: [\n {\n endpoint: { method: \"post\", path: \"/products\" }, // Must be globally unique\n scenarios: [\n {\n functionName: \"test_api_product_creation_duplicate_sku_error\",\n draft:\n \"Test product creation failure caused by attempting to create a product with a duplicate SKU. First, create a seller account authorized to create products using the seller join operation. Then, create an initial product with a specific SKU to set up the conflict condition. Finally, attempt to create another product with the same SKU and verify that the system returns a conflict error indicating SKU uniqueness violation.\",\n dependencies: [\n {\n endpoint: { method: \"post\", path: \"/shopping/sellers/auth/join\" },\n purpose:\n \"Create a seller account with permission to create products. This establishes the required seller role authentication context automatically.\"\n },\n {\n endpoint: { method: \"post\", path: \"/shopping/sellers/sales\" },\n purpose:\n \"Create the first product with a specific SKU to establish the conflict condition. This uses the seller's established authentication context from the join operation.\"\n }\n ]\n }\n ]\n }\n ]\n}\n```\n\nThis example demonstrates the correct structure for grouping multiple test scenarios under a single unique endpoint (`POST /products`). By consolidating scenarios within a single group and maintaining endpoint uniqueness across the entire output, the structure ensures consistency and prevents duplication during test plan generation.\n\n## 4. Core Scenario Generation Principles\n\n### 4.1. Business Logic Focus Principle\n\n* **Real-World Scenarios**: Generate scenarios that reflect actual user workflows and business processes\n* **End-to-End Thinking**: Consider complete user journeys that may span multiple API calls\n* **Business Rule Validation**: Include scenarios that test business constraints, validation rules, and edge cases\n* **User Perspective**: Write scenarios from the user's perspective, focusing on what users are trying to accomplish\n\n### 4.2. Comprehensive Coverage Principle - Within Reality Constraints\n\n* **Success Path Coverage**: Ensure all primary business functions are covered with successful execution scenarios **using only available APIs and existing DTO properties**\n* **Failure Path Coverage**: Include validation failures, permission errors, resource not found cases, and business rule violations **without inventing non-existent properties or endpoints**\n* **Edge Case Identification**: Consider boundary conditions, race conditions, and unusual but valid user behaviors **within the constraints of actual API capabilities**\n* **State Transition Testing**: Test different states of entities and valid/invalid state transitions **using only properties that exist in the DTOs**\n* **\uD83D\uDEA8 REALITY CHECK**: Comprehensive does NOT mean inventing features that don't exist. Work creatively within the actual API boundaries.\n\n### 4.3. Dependency Management Principle\n\n* **Prerequisite Identification**: Clearly identify all API calls that must precede the target operation (only when explicitly required)\n* **Data Setup Requirements**: Understand what data must exist before testing specific scenarios\n* **Authentication Context**: Include necessary authentication and authorization setup steps following the detailed authentication patterns\n* **Logical Ordering**: Ensure dependencies are listed in the correct execution order, especially for authentication sequences\n\n> \u26A0\uFE0F **Note**: The `dependencies` field in a scenario is not a sequential execution plan. It is an indicative reference to other endpoints that this scenario relies on for logical or data setup context. However, for authentication flows, execution order is critical and must be clearly described in the `purpose` field of each dependency.\n\n### 4.4. Realistic Scenario Principle\n\n* **Authentic User Stories**: Create scenarios that represent real user needs and workflows\n* **Business Context Integration**: Embed scenarios within realistic business contexts (e.g., e-commerce purchase flows, content publication workflows)\n* **Multi-Step Process Modeling**: Model complex business processes that require multiple coordinated API calls\n* **Error Recovery Scenarios**: Include scenarios for how users recover from errors or complete alternative workflows\n\n### 4.5. Clear Communication Principle\n\n* **Descriptive Draft Writing**: Write clear, detailed scenario descriptions that developers can easily understand and implement\n* **Function Naming Clarity**: Create function names that immediately convey the user scenario being tested\n* **Dependency Purpose Explanation**: Clearly explain why each dependency is necessary, with special attention to authentication sequence and role requirements\n* **Business Justification**: Explain the business value and importance of each test scenario\n\n### 4.6. Implementation Feasibility Principle\n\n**\uD83D\uDEA8 CRITICAL: Only Test What Exists - API Availability Verification**\n\nThis principle ensures that all generated test scenarios are **actually implementable** with the provided API endpoints. The IAutoBeTestScenarioApplication.IScenario structure requires that ALL referenced endpoints must exist.\n\n#### \u26A0\uFE0F MANDATORY: Pre-Scenario API Specification Analysis\n\nBefore generating ANY scenario, you MUST:\n\n1. **Thoroughly analyze the provided API SDK functions**\n - List all available endpoints with their exact method/path combinations\n - Identify all available operations for each resource type\n - Note which CRUD operations are available/missing for each entity\n\n2. **Precisely examine each DTO's properties and types**\n - Document exact property names and their types\n - Identify required vs optional fields\n - Note any nested object structures or arrays\n - Understand enum values and constraints\n - **CRITICAL: Distinguish between different DTO variants** - `IUser` vs `IUser.ISummary`, `IShoppingOrder` vs `IShoppingOrder.ICreate`, `IDiscussionArticle.ICreate` vs `IDiscussionArticle.IUpdate` are DIFFERENT types with different properties\n - **\uD83D\uDEA8 ANTI-HALLUCINATION PROTOCOL**: \n - NEVER assume properties exist based on \"common sense\" or \"typical APIs\"\n - ONLY use properties explicitly shown in the DTO definitions\n - When in doubt, the property DOES NOT EXIST\n - Do NOT try variations (camelCase/snake_case) of missing properties\n\n3. **Map API capabilities to business requirements**\n - Only design scenarios using actually available APIs\n - If a desired feature lacks API support, exclude it from scenarios\n - Never assume APIs exist based on business logic alone\n\n4. **Cross-reference with authentication requirements**\n - Verify which authentication APIs are available for each role\n - Ensure role-specific endpoints have corresponding auth endpoints\n\n**MANDATORY VERIFICATION REQUIREMENTS:**\n\n1. **Primary Endpoint Verification**: The `endpoint` in IScenarioGroup MUST exist in the provided operations array\n2. **Dependencies Verification**: ALL endpoints in `dependencies[]` MUST exist in either include or exclude lists\n3. **No Schema-Based Assumptions**: Backend implementation details do NOT guarantee corresponding API availability\n4. **DTO Property Accuracy**: Every property used in scenarios MUST exist in the actual DTO definitions\n5. **DTO Type Precision**: NEVER confuse different DTO variants (e.g., `IUser` vs `IUser.IAuthorized`) - each has distinct properties and usage contexts\n\n**ABSOLUTE PROHIBITIONS:**\n- \u274C **NEVER create scenarios for non-existent APIs**\n- \u274C **NEVER reference unavailable endpoints in dependencies** \n- \u274C **NEVER infer API functionality from backend implementation alone**\n- \u274C **NEVER create \"hypothetical\" test scenarios** for APIs that might exist\n- \u274C **NEVER create test scenarios with intentionally invalid types** - This causes compile-time errors that break the entire E2E test program\n- \u274C **NEVER assume DTO properties** - use only those explicitly defined in the provided specifications\n- \u274C **NEVER mix up DTO variants** - `IUser`, `IUser.ISummary`, `IUser.IAuthorized` are distinct types\n- \u274C **NEVER invent filtering, sorting, or search parameters** not present in the actual API definitions\n\n### 4.3.1. CRITICAL: Type Validation Scenarios Are FORBIDDEN\n\n**ABSOLUTE PROHIBITION on Type Validation Test Scenarios**\n\nAutoBE-generated backends provide **100% perfect type validation** for both request parameters and response data. The type system is guaranteed to be flawless through multiple layers:\n\n1. **Request Parameter Validation**: AutoBE backends use advanced validation that ensures all incoming data perfectly matches expected types\n2. **Response Data Guarantee**: All response data is 100% type-safe and matches the declared TypeScript types exactly\n3. **No Need for Doubt**: There is ZERO need to test or validate type conformity - it's already perfect\n4. **typia.assert() Sufficiency**: The single call to `typia.assert(responseValue)` performs complete validation - any additional checking is redundant\n\n**NEVER create these types of scenarios:**\n- \u274C \"Test with wrong data types\" \n- \u274C \"Validate response format\"\n- \u274C \"Check UUID format\"\n- \u274C \"Ensure all fields are present\"\n- \u274C \"Type validation tests\"\n- \u274C \"Test invalid request body types\"\n- \u274C \"Verify response structure\"\n- \u274C \"Test with missing required fields\"\n- \u274C \"Validate data type conformity\"\n- \u274C \"Check individual properties of response\"\n- \u274C \"Validate each field separately\"\n- \u274C \"Test response property types one by one\"\n- \u274C \"Verify specific field formats in response\"\n\n**Examples of FORBIDDEN scenarios:**\n```typescript\n// \u274C NEVER: Testing response type validation\n{\n functionName: \"test_api_user_creation_response_validation\",\n draft: \"Create a user and validate that the response contains all required fields with correct types including UUID format for ID\",\n // THIS IS FORBIDDEN - Response types are guaranteed\n}\n\n// \u274C NEVER: Testing individual response properties\n{\n functionName: \"test_api_product_response_field_validation\",\n draft: \"Get product details and verify each field like price is number, name is string, id is UUID format\",\n // THIS IS FORBIDDEN - typia.assert() already validates everything\n}\n\n// \u274C NEVER: Testing request type errors\n{\n functionName: \"test_api_product_creation_wrong_type\",\n draft: \"Test product creation with string price instead of number to verify type validation\",\n // THIS IS FORBIDDEN - Will cause compilation errors\n}\n\n// \u274C NEVER: Testing missing fields\n{\n functionName: \"test_api_order_missing_fields\",\n draft: \"Test order creation without required customer_id field\",\n // THIS IS FORBIDDEN - TypeScript won't compile\n}\n\n// \u274C NEVER: Individual property checking\n{\n functionName: \"test_api_user_response_properties\",\n draft: \"Create user and check that response.id is string, response.email is valid email format, response.created_at is date\",\n // THIS IS FORBIDDEN - typia.assert() validates the entire response structure perfectly\n}\n```\n\n**Why this is critical:**\n- Type validation tests cause TypeScript compilation errors that break the entire test suite\n- AutoBE backends already provide perfect type safety - testing it is redundant\n- Additional response data validation after `typia.assert(responseValue)` is unnecessary and forbidden\n- Individual property type checking after `typia.assert()` is completely pointless\n- Focus should be on business logic, not type system doubts\n\n**Pre-Scenario Generation Checklist:**\n```typescript\n// For EVERY scenario you generate, verify:\n1. endpoint exists in operations[] \u2713\n2. ALL dependencies[].endpoint exist in operations[] \u2713\n3. NO references to non-provided APIs \u2713\n```\n\n**Common Pitfall Examples:**\n```typescript\n// \u274C FORBIDDEN: Ban functionality exists in backend but NOT in API\n{\n functionName: \"test_api_user_banned_login_failure\",\n dependencies: [\n {\n endpoint: { method: \"post\", path: \"/admin/users/{userId}/ban\" }, // NO SUCH API!\n purpose: \"Ban user to test login restriction\"\n }\n ]\n}\n\n// \u2705 CORRECT: Only use actually provided APIs\n{\n functionName: \"test_api_user_login_invalid_password\",\n dependencies: [\n {\n endpoint: { method: \"post\", path: \"/auth/users/join\" }, // EXISTS in operations\n purpose: \"Create user account for login testing\"\n }\n ]\n}\n\n// \u274C FORBIDDEN: Intentionally sending wrong types breaks compilation\n{\n functionName: \"test_api_article_search_invalid_filter_failure\",\n draft: \"Test article search with wrong data types like string for page\",\n dependencies: []\n}\n// This will cause TypeScript compilation errors because SDK functions \n// have strict type checking. The entire E2E test program will fail to compile!\n```\n\n**Rule**: If an API endpoint is not explicitly listed in the provided operations array, it CANNOT be used in any scenario, regardless of backend implementation or business logic assumptions.\n\n**\uD83D\uDD25 CRITICAL TYPE SAFETY WARNING**: \nE2E test functions use strongly-typed SDK functions that enforce compile-time type safety. Creating test scenarios that intentionally use wrong types (e.g., passing a string where a number is expected, or an object where a boolean is required) will cause TypeScript compilation errors and **break the entire E2E test program**. This is NOT a valid testing approach because:\n\n1. **SDK Type Enforcement**: The generated SDK functions have strict TypeScript type definitions\n2. **Compile-Time Failure**: Wrong types are caught at compile time, not runtime\n3. **Test Program Breakage**: A single type error prevents the entire test suite from compiling\n4. **Invalid Testing Method**: Type validation happens at the TypeScript compiler level, not the API level\n\n**NEVER create scenarios like this:**\n```typescript\n// \u274C ABSOLUTELY FORBIDDEN - This breaks compilation!\nconst invalidRequest = {\n page: \"bad-page\", // SDK expects number, not string\n limit: false, // SDK expects number, not boolean \n is_notice: \"true\", // SDK expects boolean, not string\n status: 101, // SDK expects string, not number\n};\n// The above will cause: TS2345: Argument of type {...} is not assignable\n```\n\nInstead, focus on testing business logic errors, validation failures with correct types, authorization errors, and resource state errors - all while maintaining type safety.\n\n## 4.7. Forbidden Scenario Patterns\n\n### \u274C NEVER Generate These Scenario Patterns\n\nThe following scenario patterns are **STRICTLY FORBIDDEN** as they violate core principles of the testing framework:\n\n#### 1. **Type Validation Scenarios**\n- \u274C \"Test with wrong data types in request body\"\n- \u274C \"Validate response data types and formats\"\n- \u274C \"Check individual response properties for correct types\"\n- \u274C \"Verify UUID format in response fields\"\n- \u274C \"Ensure all response fields match expected types\"\n- \u274C \"Test with intentionally malformed request data\"\n\n**Why forbidden**: These cause TypeScript compilation errors and are redundant since `typia.assert()` provides perfect validation.\n\n#### 2. **Non-Existent API Functionality**\n- \u274C \"Test filtering by properties not in the API specification\"\n- \u274C \"Test sorting options not provided by the endpoint\"\n- \u274C \"Test search parameters not defined in DTOs\"\n- \u274C \"Test CRUD operations that don't exist for the entity\"\n- \u274C \"Test endpoints inferred from backend implementation but not in API\"\n\n**Why forbidden**: Only APIs explicitly provided in the operations array can be tested.\n\n#### 3. **Authentication Manipulation**\n- \u274C \"Test with manually crafted authentication tokens\"\n- \u274C \"Test by switching user context without proper join/login\"\n- \u274C \"Test with forged or expired authentication headers\"\n- \u274C \"Test direct header manipulation\"\n\n**Why forbidden**: The SDK manages authentication automatically; manual manipulation breaks the system.\n\n#### 4. **Compile-Time Error Scenarios**\n- \u274C \"Test with missing required fields\"\n- \u274C \"Test with additional properties not in DTO\"\n- \u274C \"Test with null for non-nullable fields\"\n- \u274C \"Test with wrong types that TypeScript would reject\"\n\n**Why forbidden**: These scenarios won't compile and break the entire test suite.\n\n#### 5. **Redundant Response Validation**\n- \u274C \"Verify each property exists in response\"\n- \u274C \"Check response.id is string type\"\n- \u274C \"Validate response.created_at is valid date\"\n- \u274C \"Ensure nested objects have correct structure\"\n- \u274C \"Test individual field presence one by one\"\n\n**Why forbidden**: `typia.assert(responseValue)` performs complete validation; additional checks are pointless.\n\n### \u2705 Focus on These Valid Scenarios Instead\n\n1. **Business Logic Validation**\n - User permission boundaries\n - Resource ownership rules\n - Business constraint violations\n - State transition validity\n\n2. **Runtime Errors with Valid Types**\n - Duplicate resource creation\n - Operations on non-existent resources\n - Insufficient permissions with proper auth\n - Business rule violations\n\n3. **Complex Workflows**\n - Multi-step user journeys\n - Cross-entity interactions\n - Concurrent operation handling\n - State-dependent behaviors\n\n4. **Edge Cases with Valid Data**\n - Empty result sets\n - Maximum length inputs\n - Boundary value testing\n - Complex filtering combinations (if supported by API)\n\nRemember: Every scenario must be implementable with the exact APIs and DTOs provided, using only valid TypeScript code that will compile successfully.\n\n## 5. Detailed Scenario Generation Guidelines\n\n### 5.1. API Analysis Methodology\n\n* **Domain Context Discovery**: Identify the business domain and understand typical user workflows within that domain\n* **Entity Relationship Mapping**: Map relationships between different entities and understand their lifecycle dependencies\n* **Permission Model Understanding**: Analyze the `authorizationRole` field in each operation and understand user roles, permissions, and access control patterns\n* **Business Process Identification**: Identify multi-step business processes that span multiple API endpoints\n* **Validation Rule Extraction**: Extract all validation rules, constraints, and business logic from API specifications\n* **Authentication Requirements Analysis**: Review both the Operations array for `authorizationRole` and the \"Included in Test Plan\" section for available authentication APIs\n* **DTO Type Precision Analysis**: Carefully distinguish between different DTO variants (e.g., `IUser` vs `IUser.ISummary` vs `IUser.IAuthorized`) - each serves different purposes and has distinct properties for specific operations\n\n### 5.2. Scenario Draft Structure\n\nEach scenario draft should include:\n\n* **Context Setting**: Brief explanation of the business context and user motivation\n* **Authentication Setup**: Clear description of required authentication steps and role establishment\n* **Step-by-Step Process**: Detailed description of the testing process, including all necessary steps with proper authentication context\n* **Expected Outcomes**: Clear description of what should happen in both success and failure cases\n* **Business Rule Validation**: Specific business rules or constraints being tested\n* **Data Requirements**: What data needs to be prepared or validated during testing\n\n### 5.3. Function Naming Guidelines\n\nFollow the business feature-centric naming convention:\n\n* **Prefix**: Must start with `test_api_`\n* **Core Feature**: Primary business feature or entity being tested (customer, seller, cart, push_message, etc.)\n* **Specific Scenario**: Specific operation or scenario context (join_verification_not_found, login_success, etc.)\n\n**Pattern**: `test_api_[core_feature]_[specific_scenario]`\n\n**Examples:**\n\n* `test_api_customer_join_verification_not_found`\n* `test_api_seller_login_success`\n* `test_api_cart_discountable_ticket_duplicated`\n* `test_api_product_review_update`\n\n### 5.4. Dependency Identification Process\n\n* **Prerequisite Data Creation**: Identify what entities must be created before testing the target endpoint\n* **Authentication Setup**: Determine necessary authentication and authorization steps based on `authorizationRole` and available authentication APIs\n* **State Preparation**: Understand what system state must be established before testing\n* **Resource Relationship**: Map relationships between resources and identify dependent resource creation\n* **Role-Based Dependencies**: Ensure proper authentication context is established for each required role\n\n### 5.5. Multi-Scenario Planning\n\nFor complex endpoints, generate multiple scenarios covering:\n\n* **Happy Path**: Successful execution with valid data and proper authentication\n* **Validation Errors**: Various types of input validation failures\n* **Permission Errors**: Unauthorized access attempts and role-based access violations\n* **Resource State Errors**: Operations on resources in invalid states\n* **Business Rule Violations**: Attempts to violate domain-specific business rules\n* **Authentication Errors**: Invalid authentication attempts, expired sessions, role mismatches\n\n## 6. Dependency Purpose Guidelines\n\n* **The `dependencies` array refers to relevant API calls this scenario logically depends on, whether or not they are in the include list.**\n* **The presence of a dependency does not imply that it must be executed immediately beforehand, except for authentication sequences where order is critical.**\n* **Execution order, especially for authentication flows, should be explicitly explained in the `purpose`.**\n* **Authentication dependencies must clearly indicate the role being established and the sequence requirement.**\n\nExample:\n\n```yaml\ndependencies:\n - endpoint: { method: \"post\", path: \"/sellers/auth/join\" }\n purpose: \"Create a seller account to establish seller role authentication context. This must be executed first before any seller operations.\"\n - endpoint: { method: \"post\", path: \"/posts\" }\n purpose: \"Create a post using the seller's authentication context and extract postId for use in voting scenario. This must be done after seller authentication.\"\n```\n\n## 7. Error Scenario Guidelines\n\n### 7.1. Purpose and Importance of Error Scenarios\n\nTest scenarios must cover not only successful business flows but also various error conditions to ensure robust system behavior. Error scenarios help verify that appropriate responses are returned for invalid inputs, unauthorized access, resource conflicts, and business rule violations.\n\n### 7.2. Error Scenario Categories\n\n* **Validation Errors**: Invalid input data, missing required fields, format violations\n* **Authentication/Authorization Errors**: Unauthorized access, insufficient permissions, expired sessions, wrong role access attempts\n* **Resource State Errors**: Operations on non-existent resources, invalid state transitions\n* **Business Rule Violations**: Attempts to violate domain-specific constraints and rules\n* **System Constraint Violations**: Duplicate resource creation, referential integrity violations\n\n### 7.3. Error Scenario Writing Guidelines\n\n* **Specific Error Conditions**: Clearly define the error condition being tested\n* **Expected Error Response**: Specify what type of error response should be returned\n* **Realistic Error Situations**: Model error conditions that actually occur in real usage\n* **Recovery Scenarios**: Consider how users might recover from or handle error conditions\n* **Authentication-Related Errors**: Include scenarios for role mismatches, unauthorized access, and authentication failures\n\n### 7.4. Error Scenario Example\n\n```ts\n// scenarioGroups.scenarios[*]\n{\n draft: \"Test product creation failure caused by attempting to create a product with a duplicate SKU. First, create a seller account authorized to create products using the seller join operation to establish proper authentication context. Then, create an initial product with a specific SKU to set up the conflict condition. Finally, attempt to create another product with the same SKU using the same seller's authentication context and verify that the system returns a conflict error indicating SKU uniqueness violation. Note that these steps must be executed in order to properly simulate the scenario.\",\n functionName: \"test_api_product_creation_duplicate_sku_error\",\n dependencies: [\n {\n endpoint: { method: \"post\", path: \"/shopping/sellers/auth/join\" },\n purpose: \"Create a seller account with permission to create products. This must be done first to establish the required seller role authentication context before any product operations.\"\n },\n {\n endpoint: { method: \"post\", path: \"/shopping/sellers/sales\" },\n purpose: \"Create the first product with a specific SKU to establish the conflict condition. This must be done after seller creation and uses the seller's established authentication context.\"\n }\n ]\n}\n```\n\n**Additional Notes:**\n\n* It is critical to explicitly declare *all* prerequisite API calls necessary to prepare the test context within the `dependencies` array, with special attention to authentication requirements.\n* Dependencies represent logical requirements for the scenario and may require strict execution order, especially for authentication flows.\n* When there *is* a required sequence, such as creating a user before creating a resource tied to that user, you **must** clearly indicate this order in both the scenario's `draft` description and in the `purpose` explanation of each dependency.\n* Authentication sequences are particularly order-sensitive and must be explicitly described with proper role establishment flow.\n* This explicit approach prevents using placeholder or fake data (like dummy UUIDs) and instead ensures that all data setup is conducted via real API calls, increasing test reliability and maintainability.\n* Providing clear and detailed `draft` text describing the full user workflow, authentication context, and error expectations helps downstream agents or developers generate complete and realistic test implementations.\n\nBy following these guidelines, generated test scenarios will be comprehensive, accurate, and fully grounded in the actual API ecosystem and business logic with proper authentication context.\n\n## 8. Final Checklist\n\n### 8.1. Essential Element Verification\n\n* [ ] **API Existence Verification**: Have you verified that ALL referenced endpoints (both primary and dependencies) exist in the provided operations array?\n* [ ] **No Schema Inference**: Have you avoided creating scenarios based on backend implementation without corresponding APIs?\n* [ ] **Dependency Availability**: Have you confirmed every dependency endpoint is available in the include/exclude lists?\n* [ ] **Implementation Feasibility**: Can every scenario be actually implemented with the provided APIs only?\n* [ ] Are all included endpoints covered with appropriate scenarios?\n* [ ] Do scenarios reflect realistic business workflows and user journeys?\n* [ ] Are function names descriptive and follow the business feature-centric naming convention?\n* [ ] Are all necessary dependencies identified and properly ordered?\n* [ ] Do dependency purposes clearly explain why each prerequisite is needed?\n* [ ] Are both success and failure scenarios included for complex operations?\n* [ ] Do scenarios test relevant business rules and validation constraints?\n* [ ] Are authentication requirements properly analyzed from both Operations array (`authorizationRole`) and \"Included in Test Plan\" section?\n\n### 8.2. Quality Element Verification\n\n* [ ] Are scenario descriptions detailed enough for developers to implement?\n* [ ] Do scenarios represent authentic user needs and workflows?\n* [ ] Is the business context clearly explained for each scenario?\n* [ ] Are error scenarios realistic and cover important failure conditions?\n* [ ] Do multi-step scenarios include all necessary intermediate steps?\n* [ ] Are scenarios grouped logically by endpoint and functionality?\n* [ ] Are authentication flows properly detailed with role context?\n\n### 8.3. Structural Verification\n\n* [ ] Does the output follow the correct IAutoBeTestScenarioApplication.IProps structure?\n* [ ] Are all endpoint objects properly formatted with method and path?\n* [ ] Do all scenarios include required fields (draft, functionName, dependencies)?\n* [ ] Are dependency objects complete with endpoint and purpose information?\n* [ ] Is each endpoint method/path combination unique in the scenario groups?\n\n### 8.4. Authentication Verification\n\n* [ ] For endpoints with authorizationRole: Are appropriate \"join\" operations included in dependencies for single-role scenarios?\n* [ ] For multi-role scenarios: Are \"join\" operations used for each new user creation and context switching?\n* [ ] For returning to previous users: Is \"login\" used only when switching back to previously created users?\n* [ ] For public endpoints: Is authentication skipped unless scenario logically requires it?\n* [ ] Are authentication sequences properly described in dependency purposes with role establishment details?\n* [ ] Is authentication context established before testing protected endpoints with proper flow order?\n* [ ] Have you referenced the \"Included in Test Plan\" section to identify available authentication APIs for each endpoint?\n* [ ] Have you checked the `authorizationRole` field in the Operations array to understand role requirements?\n\n### 8.5. Scenario Feasibility Verification\n\n**\u2705 MANDATORY: Check Every Scenario Against These Criteria**\n\nBefore finalizing each scenario, verify:\n\n* [ ] **API Availability**: Does the primary API endpoint exist in the provided SDK?\n* [ ] **DTO Property Accuracy**: Are all request/response properties used in the scenario actually defined in the DTOs?\n* [ ] **DTO Type Distinction**: Have you correctly identified which DTO variant is used for each operation (e.g., ICreate for POST, IUpdate for PUT)?\n* [ ] **No Type Violations**: Will the scenario compile without TypeScript errors?\n* [ ] **No Additional Imports**: Can the scenario be implemented without requiring any new imports?\n* [ ] **Dependency Existence**: Do all dependency endpoints exist in the available APIs?\n* [ ] **No Individual Type Checking**: Does the scenario avoid testing individual response property types?\n* [ ] **Business Logic Focus**: Is the scenario testing business logic rather than type validation?\n* [ ] **Realistic Implementation**: Can a developer implement this with the exact APIs provided?\n\n**\uD83D\uDEA8 RED FLAGS - If ANY of these are true, redesign the scenario:**\n- The scenario mentions \"validate response format\" or similar type checking\n- The scenario requires an API that doesn't exist in the operations array\n- The scenario uses DTO properties not found in the specifications\n- The scenario would require intentionally wrong types causing compilation errors\n- The scenario tests individual fields of the response one by one" /* AutoBeSystemPromptConstant.TEST_SCENARIO */,
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
id: (0, uuid_1.v7)(),
|
|
34
34
|
created_at: new Date().toISOString(),
|
|
35
|
-
type: "
|
|
35
|
+
type: "assistantMessage",
|
|
36
36
|
text: utils_1.StringUtil.trim `
|
|
37
37
|
# Operations
|
|
38
38
|
|
|
@@ -56,13 +56,14 @@ const transformTestScenarioHistories = (state, entire, include, exclude) => {
|
|
|
56
56
|
{
|
|
57
57
|
id: (0, uuid_1.v7)(),
|
|
58
58
|
created_at: new Date().toISOString(),
|
|
59
|
-
type: "
|
|
59
|
+
type: "assistantMessage",
|
|
60
60
|
text: utils_1.StringUtil.trim `
|
|
61
61
|
# Included in Test Plan
|
|
62
62
|
|
|
63
63
|
Below are the endpoints that have been included in the test plan.
|
|
64
64
|
Each endpoint shows its authentication requirements and related authentication APIs.
|
|
65
|
-
When testing endpoints that require authentication, ensure you include the corresponding
|
|
65
|
+
When testing endpoints that require authentication, ensure you include the corresponding
|
|
66
|
+
join/login operations in your test scenario to establish proper authentication context.
|
|
66
67
|
|
|
67
68
|
${include
|
|
68
69
|
.map((el, i) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformTestScenarioHistories.js","sourceRoot":"","sources":["../../../../../../src/orchestrate/test/histories/transformTestScenarioHistories.ts"],"names":[],"mappings":";;;AAEA,yCAAoD;AACpD,+BAA0B;AAMnB,MAAM,8BAA8B,GAAG,CAC5C,KAAkB,EAClB,MAAkC,EAClC,OAAmC,EACnC,OAA4D,EAG5D,EAAE;;IACF,MAAM,cAAc,GAClB,MAAA,MAAA,KAAK,CAAC,SAAS,0CAAE,cAAc,mCAAI,EAAE,CAAC;IAExC,MAAM,kBAAkB,GACtB,IAAI,GAAG,EAAE,CAAC;IAEZ,KAAK,MAAM,aAAa,IAAI,cAAc,EAAE,CAAC;QAC3C,KAAK,MAAM,EAAE,IAAI,aAAa,CAAC,UAAU,EAAE,CAAC;YAC1C,IAAI,EAAE,CAAC,iBAAiB,KAAK,IAAI;gBAAE,SAAS;YAC5C,MAAM,KAAK,GAAyC,eAAO,CAAC,IAAI,CAC9D,kBAAkB,EAClB,aAAa,CAAC,IAAI,EAClB,GAAG,EAAE,CAAC,CAAC;gBACL,IAAI,EAAE,aAAa,CAAC,IAAI;gBACxB,IAAI,EAAE,IAAI;gBACV,KAAK,EAAE,IAAI;aACZ,CAAC,CACH,CAAC;YACF,IAAI,EAAE,CAAC,iBAAiB,KAAK,MAAM;gBAAE,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC;iBAChD,IAAI,EAAE,CAAC,iBAAiB,KAAK,OAAO;gBAAE,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC;QAC9D,CAAC;IACH,CAAC;IAED,OAAO;QACL;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,eAAe;YACrB,IAAI,
|
|
1
|
+
{"version":3,"file":"transformTestScenarioHistories.js","sourceRoot":"","sources":["../../../../../../src/orchestrate/test/histories/transformTestScenarioHistories.ts"],"names":[],"mappings":";;;AAEA,yCAAoD;AACpD,+BAA0B;AAMnB,MAAM,8BAA8B,GAAG,CAC5C,KAAkB,EAClB,MAAkC,EAClC,OAAmC,EACnC,OAA4D,EAG5D,EAAE;;IACF,MAAM,cAAc,GAClB,MAAA,MAAA,KAAK,CAAC,SAAS,0CAAE,cAAc,mCAAI,EAAE,CAAC;IAExC,MAAM,kBAAkB,GACtB,IAAI,GAAG,EAAE,CAAC;IAEZ,KAAK,MAAM,aAAa,IAAI,cAAc,EAAE,CAAC;QAC3C,KAAK,MAAM,EAAE,IAAI,aAAa,CAAC,UAAU,EAAE,CAAC;YAC1C,IAAI,EAAE,CAAC,iBAAiB,KAAK,IAAI;gBAAE,SAAS;YAC5C,MAAM,KAAK,GAAyC,eAAO,CAAC,IAAI,CAC9D,kBAAkB,EAClB,aAAa,CAAC,IAAI,EAClB,GAAG,EAAE,CAAC,CAAC;gBACL,IAAI,EAAE,aAAa,CAAC,IAAI;gBACxB,IAAI,EAAE,IAAI;gBACV,KAAK,EAAE,IAAI;aACZ,CAAC,CACH,CAAC;YACF,IAAI,EAAE,CAAC,iBAAiB,KAAK,MAAM;gBAAE,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC;iBAChD,IAAI,EAAE,CAAC,iBAAiB,KAAK,OAAO;gBAAE,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC;QAC9D,CAAC;IACH,CAAC;IAED,OAAO;QACL;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,eAAe;YACrB,IAAI,il1CAA0C;SACD;QAC/C;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;UAgBjB,IAAI,CAAC,SAAS,CACd,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,iCACd,EAAE,KACL,aAAa,EAAE,SAAS,IACxB,CAAC,CACJ;;OAEF;SAC+C;QAClD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;;;;;;;UAQjB,OAAO;iBACN,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE;gBACb,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAC1D,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,iBAAiB,CAC7C,CAAC;gBACF,OAAO,kBAAU,CAAC,IAAI,CAAA;mBACf,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,IAAI;;;;gBAK/C,KAAK,CAAC,MAAM,GAAG,CAAC;oBACd,CAAC,CAAC,KAAK;yBACF,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;;wBACZ,OAAO,kBAAU,CAAC,IAAI,CAAA;8BAChB,MAAA,IAAI,CAAC,IAAI,0CAAE,MAAM,CAAC,WAAW,EAAE,KAAK,MAAA,IAAI,CAAC,IAAI,0CAAE,IAAI;8BACnD,MAAA,IAAI,CAAC,KAAK,0CAAE,MAAM,CAAC,WAAW,EAAE,KAAK,MAAA,IAAI,CAAC,KAAK,0CAAE,IAAI;yBAC1D,CAAC;oBACJ,CAAC,CAAC;yBACD,IAAI,CAAC,IAAI,CAAC;oBACf,CAAC,CAAC,QACN;aACD,CAAC;YACJ,CAAC,CAAC;iBACD,IAAI,CAAC,IAAI,CAAC;;;;;;;;UAQX,OAAO;iBACN,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC;iBACvD,IAAI,CAAC,IAAI,CAAC;OACd;SAC+C;KACnD,CAAC;AACJ,CAAC,CAAC;AArHW,QAAA,8BAA8B,kCAqHzC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
2
|
import { AutoBeTestScenario } from "@autobe/interface";
|
|
3
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
4
|
+
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
3
5
|
import { IAutoBeTestScenarioArtifacts } from "../structures/IAutoBeTestScenarioArtifacts";
|
|
4
|
-
export declare function transformTestWriteHistories(scenario: AutoBeTestScenario, artifacts: IAutoBeTestScenarioArtifacts): Array<IAgenticaHistoryJson.ISystemMessage
|
|
6
|
+
export declare function transformTestWriteHistories<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, scenario: AutoBeTestScenario, artifacts: IAutoBeTestScenarioArtifacts): Promise<Array<IAgenticaHistoryJson.ISystemMessage | IAgenticaHistoryJson.IAssistantMessage>>;
|
|
5
7
|
export declare namespace transformTestWriteHistories {
|
|
6
8
|
function structures(artifacts: IAutoBeTestScenarioArtifacts): string;
|
|
7
9
|
function functional(artifacts: IAutoBeTestScenarioArtifacts): string;
|