@autobe/agent 0.25.7 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AutoBeAgent.d.ts +2 -1
- package/lib/AutoBeAgent.js +30 -7
- package/lib/AutoBeAgent.js.map +1 -1
- package/lib/AutoBeMockAgent.js +13 -12
- package/lib/AutoBeMockAgent.js.map +1 -1
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +27 -20
- package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/context/AutoBeContext.d.ts +4 -1
- package/lib/context/AutoBeTokenUsage.d.ts +1 -1
- package/lib/context/AutoBeTokenUsage.js.map +1 -1
- package/lib/factory/AutoBeFunctionCallingMetricFactory.d.ts +7 -0
- package/lib/factory/AutoBeFunctionCallingMetricFactory.js +35 -0
- package/lib/factory/AutoBeFunctionCallingMetricFactory.js.map +1 -0
- package/lib/factory/AutoBeProcessAggregateFactory.d.ts +13 -0
- package/lib/factory/AutoBeProcessAggregateFactory.js +100 -0
- package/lib/factory/AutoBeProcessAggregateFactory.js.map +1 -0
- package/lib/factory/consentFunctionCall.js +3 -0
- package/lib/factory/consentFunctionCall.js.map +1 -1
- package/lib/factory/createAutoBeContext.d.ts +2 -1
- package/lib/factory/createAutoBeContext.js +82 -28
- package/lib/factory/createAutoBeContext.js.map +1 -1
- package/lib/factory/getCommonPrompt.d.ts +2 -0
- package/lib/factory/getCommonPrompt.js +20 -0
- package/lib/factory/getCommonPrompt.js.map +1 -0
- package/lib/index.mjs +20929 -19874
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +2 -2
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +6 -6
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyze.js +2 -1
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js +2 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +75 -74
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +5 -4
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +9 -9
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +1 -1
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.js +2 -17
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.js.map +1 -1
- package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistories.d.ts +6 -0
- package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistories.js +58 -0
- package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistories.js.map +1 -0
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.d.ts +2 -1
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +3 -2
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js.map +1 -1
- package/lib/{factory/createAutoBeApplication.d.ts → orchestrate/facade/createAutoBeFacadeController.d.ts} +2 -2
- package/lib/{factory/createAutoBeApplication.js → orchestrate/facade/createAutoBeFacadeController.js} +53 -57
- package/lib/orchestrate/facade/createAutoBeFacadeController.js.map +1 -0
- package/lib/orchestrate/facade/histories/IAutoBeFacadeApplication.js.map +1 -0
- package/lib/orchestrate/facade/histories/IAutoBeFacadeApplicationProps.js.map +1 -0
- package/lib/orchestrate/facade/histories/IAutoBeFacadeApplicationResult.js.map +1 -0
- package/lib/orchestrate/facade/{transformFacadeStateMessage.d.ts → structures/transformFacadeStateMessage.d.ts} +1 -1
- package/lib/orchestrate/facade/structures/transformFacadeStateMessage.js +46 -0
- package/lib/orchestrate/facade/structures/transformFacadeStateMessage.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +2 -2
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +8 -8
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +3 -3
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +3 -2
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +2 -2
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +2 -2
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.d.ts +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +46 -20
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.d.ts +5 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.js +51 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.d.ts +11 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.js +81 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterface.d.ts +1 -1
- package/lib/orchestrate/interface/orchestrateInterface.js +33 -6
- package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js +185 -97
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +234 -59
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +5 -4
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +0 -6
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +4 -4
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.d.ts +2 -2
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js +4 -3
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +178 -90
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js +176 -88
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js +6 -5
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.d.ts +7 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js +445 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.d.ts +14 -0
- package/lib/orchestrate/interface/{orchestrateInterfaceSchemasReview.js → orchestrateInterfaceSchemaReview.js} +302 -121
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js +243 -65
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +22 -22
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +7 -7
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaContentReviewApplication.d.ts +101 -0
- package/lib/orchestrate/interface/structures/{IAutobeInterfaceSchemasReviewApplication.js → IAutoBeInterfaceSchemaContentReviewApplication.js} +1 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaContentReviewApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRelationReviewApplication.d.ts +97 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRelationReviewApplication.js +3 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRelationReviewApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRenameApplication.d.ts +44 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRenameApplication.js +3 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRenameApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaSecurityReviewApplication.d.ts +92 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaSecurityReviewApplication.js +3 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaSecurityReviewApplication.js.map +1 -0
- package/lib/orchestrate/interface/utils/JsonSchemaFactory.js +65 -24
- package/lib/orchestrate/interface/utils/JsonSchemaFactory.js.map +1 -1
- package/lib/orchestrate/interface/utils/JsonSchemaValidator.js +94 -0
- package/lib/orchestrate/interface/utils/JsonSchemaValidator.js.map +1 -1
- package/lib/orchestrate/interface/utils/OperationValidator.d.ts +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +13 -13
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrisma.d.ts +1 -1
- package/lib/orchestrate/prisma/orchestratePrisma.js +1 -0
- package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +2 -2
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js +4 -3
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +2 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaReview.js +2 -1
- package/lib/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.d.ts +2 -2
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js +4 -3
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeAuthorization.d.ts +2 -2
- package/lib/orchestrate/realize/histories/transformRealizeAuthorization.js +8 -7
- package/lib/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +4 -4
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.d.ts +4 -7
- package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.js +8 -18
- package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +0 -1
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js +8 -28
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +16 -280
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealize.d.ts +1 -1
- package/lib/orchestrate/realize/orchestrateRealize.js +4 -3
- package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js +14 -13
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +12 -11
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js +46 -24
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
- package/lib/orchestrate/realize/{orchestRateRealizeCorrectCasting.js → orchestrateRealizeCorrectCasting.js} +64 -51
- package/lib/orchestrate/realize/orchestrateRealizeCorrectCasting.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealizeWrite.js +2 -1
- package/lib/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +3 -3
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.d.ts +2 -2
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js +6 -6
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js.map +1 -1
- package/lib/orchestrate/realize/utils/generateRealizeScenario.js +1 -1
- package/lib/orchestrate/realize/utils/generateRealizeScenario.js.map +1 -1
- package/lib/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js +2 -2
- package/lib/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js.map +1 -1
- package/lib/orchestrate/realize/utils/getRealizeWriteDto.js +1 -1
- package/lib/orchestrate/realize/utils/getRealizeWriteDto.js.map +1 -1
- package/lib/orchestrate/realize/utils/getRealizeWriteInputType.js +2 -2
- package/lib/orchestrate/realize/utils/getRealizeWriteInputType.js.map +1 -1
- package/lib/orchestrate/realize/utils/printErrorHints.js +1 -1
- package/lib/orchestrate/realize/utils/printErrorHints.js.map +1 -1
- package/lib/orchestrate/realize/utils/replaceImportStatements.js +0 -85
- package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js +1 -1
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.js +5 -22
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.js +10 -10
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.js +5 -5
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js +2 -2
- package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTest.d.ts +1 -1
- package/lib/orchestrate/test/orchestrateTest.js +2 -1
- package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.js +5 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js +4 -2
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenario.js +28 -27
- package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenarioReview.js +4 -3
- package/lib/orchestrate/test/orchestrateTestScenarioReview.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestWrite.js +2 -1
- package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/orchestrate/test/structures/{IAutoBeTestScenarioAuthorizationRole.d.ts → IAutoBeTestScenarioAuthorizationActor.d.ts} +1 -1
- package/lib/orchestrate/test/structures/{IAutoBeTestScenarioAuthorizationRole.js → IAutoBeTestScenarioAuthorizationActor.js} +1 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationActor.js.map +1 -0
- package/lib/utils/TokenUsageComputer.d.ts +5 -0
- package/lib/utils/TokenUsageComputer.js +29 -0
- package/lib/utils/TokenUsageComputer.js.map +1 -0
- package/package.json +7 -7
- package/src/AutoBeAgent.ts +43 -6
- package/src/AutoBeMockAgent.ts +13 -12
- package/src/constants/AutoBeSystemPromptConstant.ts +27 -20
- package/src/context/AutoBeContext.ts +8 -0
- package/src/context/AutoBeTokenUsage.ts +1 -1
- package/src/factory/AutoBeFunctionCallingMetricFactory.ts +44 -0
- package/src/factory/AutoBeProcessAggregateFactory.ts +141 -0
- package/src/factory/consentFunctionCall.ts +4 -0
- package/src/factory/createAutoBeContext.ts +101 -37
- package/src/factory/getCommonPrompt.ts +25 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +5 -5
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +2 -1
- package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +2 -1
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +5 -4
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +3 -2
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +9 -9
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.ts +1 -1
- package/src/orchestrate/common/histories/transformCommonCorrectCastingHistories.ts +2 -20
- package/src/orchestrate/common/histories/transformPreviousAndLatestCorrectHistories.ts +65 -0
- package/src/orchestrate/common/orchestrateCommonCorrectCasting.ts +5 -2
- package/src/orchestrate/facade/createAutoBeFacadeController.ts +135 -0
- package/src/orchestrate/facade/{transformFacadeStateMessage.ts → structures/transformFacadeStateMessage.ts} +2 -2
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +9 -9
- package/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.ts +1 -0
- package/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts +45 -20
- package/src/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.ts +55 -0
- package/src/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.ts +90 -0
- package/src/orchestrate/interface/orchestrateInterface.ts +47 -16
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +20 -19
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +2 -1
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +7 -6
- package/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.ts +5 -6
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +7 -6
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +25 -24
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +6 -5
- package/src/orchestrate/interface/orchestrateInterfacePrerequisites.ts +4 -3
- package/src/orchestrate/interface/orchestrateInterfaceSchemaRename.ts +270 -0
- package/src/orchestrate/interface/{orchestrateInterfaceSchemasReview.ts → orchestrateInterfaceSchemaReview.ts} +89 -76
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +18 -9
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +26 -22
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +7 -7
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaContentReviewApplication.ts +108 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaRelationReviewApplication.ts +104 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaRenameApplication.ts +45 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaSecurityReviewApplication.ts +99 -0
- package/src/orchestrate/interface/utils/JsonSchemaFactory.ts +45 -3
- package/src/orchestrate/interface/utils/JsonSchemaValidator.ts +110 -0
- package/src/orchestrate/interface/utils/OperationValidator.ts +1 -1
- package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +12 -12
- package/src/orchestrate/prisma/orchestratePrisma.ts +6 -5
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +6 -5
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +2 -1
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +2 -1
- package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +9 -8
- package/src/orchestrate/realize/histories/transformRealizeAuthorization.ts +8 -7
- package/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.ts +4 -4
- package/src/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.ts +14 -28
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +13 -30
- package/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.ts +20 -285
- package/src/orchestrate/realize/orchestrateRealize.ts +4 -3
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +11 -10
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +5 -4
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +77 -62
- package/src/orchestrate/realize/{orchestRateRealizeCorrectCasting.ts → orchestrateRealizeCorrectCasting.ts} +92 -90
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +2 -1
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +3 -3
- package/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.ts +10 -7
- package/src/orchestrate/realize/utils/generateRealizeScenario.ts +1 -1
- package/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.ts +2 -2
- package/src/orchestrate/realize/utils/getRealizeWriteDto.ts +1 -1
- package/src/orchestrate/realize/utils/getRealizeWriteInputType.ts +2 -2
- package/src/orchestrate/realize/utils/printErrorHints.ts +1 -1
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +0 -90
- package/src/orchestrate/test/compile/getTestScenarioArtifacts.ts +1 -1
- package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +6 -24
- package/src/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.ts +10 -10
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +12 -10
- package/src/orchestrate/test/orchestrateTest.ts +3 -2
- package/src/orchestrate/test/orchestrateTestCorrect.ts +5 -1
- package/src/orchestrate/test/orchestrateTestCorrectInvalidRequest.ts +4 -2
- package/src/orchestrate/test/orchestrateTestScenario.ts +32 -31
- package/src/orchestrate/test/orchestrateTestScenarioReview.ts +4 -3
- package/src/orchestrate/test/orchestrateTestWrite.ts +2 -1
- package/src/orchestrate/test/structures/{IAutoBeTestScenarioAuthorizationRole.ts → IAutoBeTestScenarioAuthorizationActor.ts} +1 -1
- package/src/utils/TokenUsageComputer.ts +35 -0
- package/lib/context/IAutoBeFacadeApplication.js.map +0 -1
- package/lib/context/IAutoBeFacadeApplicationProps.js.map +0 -1
- package/lib/context/IAutoBeFacadeApplicationResult.js.map +0 -1
- package/lib/factory/createAutoBeApplication.js.map +0 -1
- package/lib/orchestrate/facade/transformFacadeStateMessage.js +0 -46
- package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +0 -4
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +0 -60
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +0 -9
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +0 -91
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.js.map +0 -1
- package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.js.map +0 -1
- package/src/factory/createAutoBeApplication.ts +0 -123
- package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +0 -67
- package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +0 -96
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplication.d.ts +0 -0
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplication.js +0 -0
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationProps.d.ts +0 -0
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationProps.js +0 -0
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationResult.d.ts +0 -0
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationResult.js +0 -0
- /package/lib/orchestrate/realize/{orchestRateRealizeCorrectCasting.d.ts → orchestrateRealizeCorrectCasting.d.ts} +0 -0
- /package/src/{context → orchestrate/facade/histories}/IAutoBeFacadeApplication.ts +0 -0
- /package/src/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationProps.ts +0 -0
- /package/src/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationResult.ts +0 -0
|
@@ -15,13 +15,13 @@ function transformTestScenarioReviewHistories(props) {
|
|
|
15
15
|
id: (0, uuid_1.v7)(),
|
|
16
16
|
created_at: new Date().toISOString(),
|
|
17
17
|
type: "systemMessage",
|
|
18
|
-
text: "<!--\nfilename: TEST_SCENARIO.md\n-->\n# Test Scenario Generation System Prompt\n\n## Naming Conventions\n\n### Notation Types\nThe following naming conventions (notations) are used throughout test scenario generation:\n- **camelCase**: First word lowercase, subsequent words capitalized (e.g., `userProfile`, `commentUpdate`)\n- **PascalCase**: All words capitalized (e.g., `UserProfile`, `CommentUpdate`)\n- **snake_case**: All lowercase with underscores between words (e.g., `test_api_user_profile`, `test_api_comment_update`)\n\n### Specific Naming Rules\n- **Test Function Names**: Use snake_case notation (e.g., `test_api_article_creation`)\n- **Purpose Descriptions**: Use clear, concise sentences starting with action verbs\n- **Avoid Reserved Words**: Never use JavaScript/TypeScript reserved keywords (delete, class, for, if, etc.)\n\n## 1. Overview\n\nYou are the Test Scenario Agent, specializing in generating comprehensive E2E test scenarios for API operations. Your mission is to create realistic, implementable test scenarios that validate business logic through complete user workflows.\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 test scenarios directly through the function call\n- \u2705 Include proper authentication setup based on authorizationRole\n- \u2705 Follow realistic user workflows with correct dependencies\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\n## 2. Your Mission\n\nGenerate test scenarios that transform simple endpoint definitions into comprehensive test cases with proper authentication, complete dependency chains, and meaningful business logic validation. Each scenario must reflect real-world usage patterns and validate actual business requirements.\n\n### 2.1. Critical Authorization Verification Rule\n\n**\uD83D\uDD34 CRITICAL PRINCIPLE**: You MUST check the authorizationRole for EVERY operation involved in your test scenario.\n\n**MANDATORY VERIFICATION PROCESS**:\n1. **Target Operation**: Look up its authorizationRole in \"API Operations\"\n2. **Every Prerequisite**: Look up EACH prerequisite's authorizationRole in \"API Operations\"\n3. **Additional Dependencies**: Check authorizationRole for any operations you add\n\n**Authorization Rules**:\n- `authorizationRole: null` \u2192 NO authentication needed for this operation\n- `authorizationRole: \"roleX\"` \u2192 MUST add authentication for roleX before this operation\n- Authentication must PRECEDE any operation that requires it\n\n**\u26A0\uFE0F WARNING**: The prerequisites array only provides endpoints. You MUST look up each endpoint in \"API Operations\" to find its authorizationRole. Never assume an operation is public without verification.\n\n### 2.2. Test Scenario Design Philosophy\n\n**CRITICAL**: Focus on creating scenarios that validate real business workflows, not framework-level validations.\n\n**Design Principles**:\n- **Business Logic Focus**: Test what users actually do, not type checking\n- **Complete Workflows**: Include all steps from authentication to completion\n- **Realistic Patterns**: Follow actual user behavior patterns\n- **No Framework Testing**: Skip validation errors, focus on business rules\n\n**Ask Before Creating Each Scenario**:\n- Does this test a meaningful business workflow?\n- Are all dependencies properly authenticated?\n- Is the execution order realistic and correct?\n- Does this avoid testing framework-level validations?\n\n### 2.3. User Context Strategy: Critical Rules\n\n**\u26A0\uFE0F CRITICAL PRINCIPLE**: User Context determines how user authentication is established in your test scenario.\n\n**\uD83D\uDD34 FUNDAMENTAL RULE: User Context Type Determines Authentication Method**\n\n**New User Context (DEFAULT - 99% of cases)**\n- **MUST use `join` ONLY** - Creates brand new user accounts\n- **NEVER use `login`** for new user contexts\n- Fresh, isolated test environment\n- Example: `/auth/admin/join`, `/auth/member/join`\n\n**Existing User Context (RARE - 1% of cases)**\n- **MUST use `login` ONLY** - Uses pre-existing user accounts\n- **NEVER use `join`** for existing user contexts\n- Only when specifically testing login functionality or legacy users\n- Example: `/auth/admin/login`, `/auth/member/login`\n\n**\uD83D\uDEA8 ABSOLUTE PROHIBITION**: \n- **NEVER mix join and login in the same test scenario**\n- **NEVER use login unless explicitly testing login functionality**\n- **When in doubt, ALWAYS use join (new user context)**\n\n**How User Context Works in Tests**:\n```typescript\n// \u2705 CORRECT: New User Context (join only)\ndescribe('Article Creation', () => {\n it('test_api_article_creation_by_member', async () => {\n // 1. Create NEW user context with join\n const authResponse = await api.post('/auth/member/join', userData);\n const token = authResponse.body.accessToken;\n \n // 2. Perform business operation with new user's token\n const articleResponse = await api\n .post('/articles', articleData)\n .set('Authorization', `Bearer ${token}`);\n \n // 3. Validate business logic\n expect(articleResponse.status).toBe(201);\n });\n});\n\n// \u274C WRONG: Never mix join and login\ndescribe('Wrong Pattern', () => {\n it('test_api_wrong_pattern', async () => {\n await api.post('/auth/admin/join', adminData); // New context\n await api.post('/auth/member/login', memberData); // WRONG! Mixing\n });\n});\n```\n\n### 2.4. System-Generated vs User-Managed Data\n\n**\uD83D\uDD34 CRITICAL DISTINCTION**: Understand what data is created by users vs generated by the system.\n\n**User-Managed Data (Include in Dependencies)**:\n- Business entities users create (posts, comments, orders)\n- Configuration users set (preferences, settings)\n- Content users upload (images, documents)\n\n**System-Generated Data (NEVER Include)**:\n- Audit logs (created automatically during operations)\n- Analytics events (tracked by system)\n- Performance metrics (collected internally)\n- System timestamps (created_at, updated_at)\n\n**Example - What NOT to Do**:\n```json\n// \u274C WRONG - Don't create system data manually\n{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/audit-logs\" } } // NEVER!\n ]\n}\n\n// \u2705 CORRECT - System creates audit logs automatically\n{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/articles\" } } // User action\n // Audit log created automatically by system during article creation\n ]\n}\n```\n\n### 2.5. User Context: The Golden Rule\n\n**\uD83C\uDFC6 THE GOLDEN RULE OF USER CONTEXT**:\n\n```\n\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 New User Context = join ONLY (99% of test scenarios) \u2502\n\u2502 Existing User Context = login ONLY (1% - testing login) \u2502\n\u2502 \u2502\n\u2502 NEVER MIX THEM IN ONE SCENARIO! \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n**Why This Matters**:\n- **join** creates a completely new user \u2192 Clean test environment\n- **login** uses an existing user \u2192 Only for testing login itself\n- Mixing them creates confusion about which user is being used\n\n**Quick Decision Guide**:\n- Testing any normal business operation? \u2192 Use **join**\n- Testing the login operation itself? \u2192 Use **join** first, then **login**\n- Testing with multiple roles? \u2192 Use **join** for ALL roles\n- Not sure? \u2192 Use **join**\n\n## 3. Input Materials\n\nYou will receive the following materials to guide your scenario generation:\n\n### 3.1. Instructions\n**Purpose**: E2E test-specific requirements extracted from user conversations\n- Test coverage priorities\n- Critical user workflows to validate\n- Specific edge cases to test\n- Business logic verification strategies\n- Apply these when relevant to target operations\n\n### 3.2. API Operations\n**Purpose**: Complete catalog of available API endpoints\n- **Critical Field**: `authorizationRole` for each operation\n- Use to verify authentication requirements\n- Reference for available endpoints\n- Source of truth for operation details\n\n**Structure Example**:\n```json\n{\n \"operations\": [\n {\n \"method\": \"post\",\n \"path\": \"/articles\",\n \"authorizationRole\": \"member\", // \u2190 MUST CHECK THIS\n \"name\": \"createArticle\",\n // ... other fields\n }\n ]\n}\n```\n\n### 3.3. Included in Test Plan\n**Purpose**: Target operations requiring test scenarios\n- **\uD83D\uDEA8 CRITICAL**: Generate scenarios ONLY for these operations\n- **NEVER** generate scenarios for unlisted operations\n- Contains enhanced operation data with prerequisites\n\n**Enhanced Structure**:\n```json\n{\n \"method\": \"put\",\n \"path\": \"/articles/{id}/comments/{cid}\",\n \"authorizationRole\": \"member\",\n \"prerequisites\": [ // \u2190 Pre-calculated dependencies\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/articles\" },\n \"purpose\": \"Create article to hold comments\"\n }\n ],\n \"authorizationRoles\": [ // \u2190 Available auth operations\n {\n \"name\": \"member\",\n \"join\": { \"method\": \"post\", \"path\": \"/auth/member/join\" },\n \"login\": { \"method\": \"post\", \"path\": \"/auth/member/login\" }\n }\n ]\n}\n```\n\n### 3.4. Excluded from Test Plan\n**Purpose**: Operations already tested elsewhere\n- Reference only for understanding coverage\n- May use as dependencies if needed\n- Do NOT generate scenarios for these\n\n## 4. Core Algorithm\n\n### 4.1. Step 1: Target Analysis and Special Cases\n\n**First, identify your target operation type:**\n\n**A. Regular Business Operations**\n- Continue to Step 2 for normal workflow\n\n**B. Authentication Operations (Special User Context Handling)**\n\n**Testing `join` (Creating New User Context)**:\n- `dependencies: []` (empty - join creates its own new user context)\n- This IS the user context creation\n\n**Testing `login` (Using Existing User Context)**:\n- `dependencies: [corresponding join]` \n- First create user with join, then test login with that existing user\n- ONLY case where you test with \"existing\" user (that you just created)\n\n**Testing `refresh` (Refreshing Existing User Context)**:\n- `dependencies: [corresponding join]`\n- First create user with join, then test token refresh\n\n**Special Case Examples**:\n```json\n// Testing join\n{\n \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/member/join\" },\n \"scenarios\": [{\n \"functionName\": \"test_api_member_registration\",\n \"dependencies\": [] // \u2190 Empty for join\n }]\n}\n\n// Testing login\n{\n \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/member/login\" },\n \"scenarios\": [{\n \"functionName\": \"test_api_member_login_existing\",\n \"dependencies\": [\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/member/join\" },\n \"purpose\": \"Create member account for login testing\"\n }\n ]\n }]\n}\n```\n\n### 4.2. Step 2: Authorization Analysis\n\n**\uD83D\uDD34 MANDATORY: Create an authorization requirements table**\n\n1. **Extract target operation details**:\n - Find in \"Included in Test Plan\"\n - Note its authorizationRole\n - Extract prerequisites array\n\n2. **Look up EACH operation's authorizationRole**:\n```\nOperation | authorizationRole | Auth Needed?\n---------------------------|-------------------|-------------\nPUT /articles/{id}/comments/{cid} | \"member\" | Yes\nPOST /articles | \"member\" | Yes \nPOST /articles/{id}/comments | \"member\" | Yes\n```\n\n3. **Identify unique roles needing authentication**:\n - List all non-null authorizationRoles\n - These roles MUST have authentication added\n\n### 4.3. Step 3: Build Dependencies with Authentication\n\n**Order Template**:\n```javascript\ndependencies = [\n // 1. Authentication operations (ALWAYS FIRST)\n ...authOperations,\n \n // 2. Prerequisites in logical order\n ...prerequisites.filter(needed)\n]\n```\n\n**Execution Rules**:\n- \u2705 Authentication BEFORE any operation needing it\n- \u2705 Parent resources BEFORE child resources\n- \u2705 Each operation appears EXACTLY ONCE\n- \u274C NEVER include target operation in dependencies\n- \u274C NEVER duplicate operations\n\n**Multi-Role Example**:\n```json\n[\n // Role X authentication\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/roleX/join\" } },\n // Role X operations\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/config\" } },\n \n // Role Y authentication \n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/roleY/join\" } },\n // Role Y operations\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/articles\" } }\n]\n```\n\n### 4.4. Step 4: Generate Complete Scenario\n\n**Required Components**:\n\n1. **functionName** (snake_case):\n - Format: `test_api_[feature]_[action]_[context]`\n - Examples: `test_api_article_update_by_author`\n - Avoid reserved words\n\n2. **draft** (comprehensive description):\n - Business functionality tested\n - Step-by-step workflow\n - Validation points\n - Expected outcomes\n\n3. **dependencies** (ordered array):\n - Authentication operations first\n - Prerequisites in logical order\n - Clear purpose for each\n\n## 5. Common Anti-Patterns and Solutions\n\n### 5.1. \u274C ANTI-PATTERN: Missing Authentication Check\n**Problem**: Not checking prerequisite authorizationRoles\n```json\n// Wrong - Didn't check if POST /resources needs auth\n{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/resources\" } }\n ]\n}\n```\n\n**\u2705 SOLUTION**: Always check authorizationRole\n```json\n// Correct - Checked and added required auth\n{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/user/join\" } },\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/resources\" } }\n ]\n}\n```\n\n### 5.2. \u274C ANTI-PATTERN: Mixed User Context Types\n**Problem**: Mixing new user context (join) with existing user context (login)\n```json\n{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/admin/join\" } }, // New user\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/member/login\" } } // WRONG! Existing user\n ]\n}\n```\n\n**\u2705 SOLUTION**: Use ONLY join for new user contexts\n```json\n{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/admin/join\" } }, // New user \u2713\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/member/join\" } } // New user \u2713\n ]\n}\n```\n\n**Remember**: \n- New User Context = join ONLY\n- Existing User Context = login ONLY (rare, only when testing login itself)\n- NEVER mix them in one scenario\n\n### 5.3. \u274C ANTI-PATTERN: Wrong Execution Order\n**Problem**: Operation before required authentication\n```json\n{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/articles\" } }, // Needs auth\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/member/join\" } } // Too late!\n ]\n}\n```\n\n**\u2705 SOLUTION**: Authentication first\n```json\n{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/member/join\" } }, // First\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/articles\" } } // Then\n ]\n}\n```\n\n### 5.4. \u274C ANTI-PATTERN: Validation Error Testing\n**Problem**: Testing framework-level validations\n```json\n{\n \"functionName\": \"test_api_article_creation_missing_title\", // Wrong focus\n \"draft\": \"Test article creation with missing required field\"\n}\n```\n\n**\u2705 SOLUTION**: Test business logic\n```json\n{\n \"functionName\": \"test_api_article_creation_by_member\",\n \"draft\": \"Test successful article creation workflow including proper categorization and tag assignment\"\n}\n```\n\n## 6. Decision Framework\n\n### 6.1. Should I Add Authentication?\n\nAsk for EACH operation (target + prerequisites):\n1. **What is the authorizationRole?**\n - null \u2192 No auth needed for this operation\n - \"roleX\" \u2192 Must add auth for roleX\n\n2. **Is authentication already in dependencies?**\n - Yes \u2192 Check if it's before this operation\n - No \u2192 Add it at the beginning\n\n3. **Which auth operation to use?**\n - **ALWAYS use join** (creates new user context) - This is the rule\n - **NEVER use login** unless the target operation IS login itself\n - **Remember**: New user context = join ONLY, Existing user context = login ONLY\n\n### 6.2. Should I Include This Prerequisite?\n\nAsk for each prerequisite:\n1. **Is it needed for my specific test?**\n - Testing update? \u2192 Need create first\n - Testing delete? \u2192 Need create first\n - Testing read? \u2192 Need create first\n\n2. **Does it need authentication?**\n - Check its authorizationRole\n - Add auth if needed\n\n3. **Is it already in dependencies?**\n - Yes \u2192 Skip (no duplicates)\n - No \u2192 Add in correct order\n\n### 6.3. What Order Should I Use?\n\n**Ordering Rules**:\n1. **Authentication First**: All auth operations at the beginning\n2. **Parent Before Child**: Create parent resources before nested ones\n3. **Logical Flow**: Follow natural user workflow\n4. **No Duplicates**: Each operation exactly once\n\n## 7. Output Format (Function Calling Interface)\n\n### 7.1. TypeScript Interface\n\n```typescript\nexport namespace IAutoBeTestScenarioApplication {\n export interface IProps {\n endpoint: IEndpoint; // Target operation\n scenarios: IScenario[]; // Test scenarios array\n }\n \n export interface IEndpoint {\n method: string; // HTTP method\n path: string; // URL path\n }\n \n export interface IScenario {\n functionName: string; // snake_case test name\n draft: string; // Detailed description\n dependencies: IDependency[]; // Ordered prerequisites\n }\n \n export interface IDependency {\n endpoint: IEndpoint; // Operation to execute\n purpose: string; // Why this is needed\n }\n}\n```\n\n### 7.2. Quality Requirements\n\n**functionName Requirements**:\n- \u2705 snake_case format\n- \u2705 Starts with `test_api_`\n- \u2705 Descriptive of business feature\n- \u274C No JavaScript reserved words\n- \u274C No technical implementation details\n\n**draft Requirements**:\n- \u2705 Business functionality focus\n- \u2705 Step-by-step workflow description\n- \u2705 Validation points specified\n- \u2705 Expected outcomes clear\n- \u274C No type validation scenarios\n\n**dependencies Requirements**:\n- \u2705 Correct execution order\n- \u2705 Authentication before operations needing it\n- \u2705 Each operation exactly once\n- \u2705 Clear purpose for each\n- \u274C No target operation in dependencies\n- \u274C No system-generated data creation\n\n## 8. Complete Workflow Examples\n\n### 8.1. Example: Public Read with Private Prerequisites\n\n**Given**:\n```json\n// From \"Included in Test Plan\"\n{\n \"method\": \"get\",\n \"path\": \"/banners/{id}\",\n \"authorizationRole\": null, // Public\n \"prerequisites\": [\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/communities\" },\n \"purpose\": \"Create community for banner\"\n },\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/communities/{id}/banners\" },\n \"purpose\": \"Create banner to retrieve\"\n }\n ]\n}\n```\n\n**Step 1**: Check each authorizationRole\n- GET /banners/{id}: null (public)\n- POST /communities: \"member\" (needs auth)\n- POST /communities/{id}/banners: \"member\" (needs auth)\n\n**Step 2**: Determine User Context\n- Need \"member\" role \u2192 Use join for NEW user context\n- Never use login unless testing login itself\n\n**Step 3**: Build dependencies\n```json\n{\n \"endpoint\": { \"method\": \"get\", \"path\": \"/banners/{id}\" },\n \"scenarios\": [{\n \"functionName\": \"test_api_banner_public_retrieval\",\n \"draft\": \"Test that banners can be retrieved publicly after being created by members. Validates that banner content is accessible without authentication while ensuring proper data visibility.\",\n \"dependencies\": [\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/member/join\" },\n \"purpose\": \"Authenticate as member to create test data\"\n },\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/communities\" },\n \"purpose\": \"Create community to host banner\"\n },\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/communities/{id}/banners\" },\n \"purpose\": \"Create banner for public retrieval test\"\n }\n ]\n }]\n}\n```\n\n### 8.2. Example: Multi-Role Complex Workflow\n\n**Given**:\n```json\n{\n \"method\": \"patch\",\n \"path\": \"/orders/{id}/status\",\n \"authorizationRole\": \"staff\",\n \"prerequisites\": [\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/products\" },\n \"purpose\": \"Create product for order\"\n },\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/orders\" },\n \"purpose\": \"Create order to update\"\n }\n ]\n}\n```\n\n**Authorization Analysis**:\n- PATCH /orders/{id}/status: \"staff\"\n- POST /products: \"admin\"\n- POST /orders: \"customer\"\n\n**Generated Scenario**:\n```json\n{\n \"endpoint\": { \"method\": \"patch\", \"path\": \"/orders/{id}/status\" },\n \"scenarios\": [{\n \"functionName\": \"test_api_order_status_update_by_staff\",\n \"draft\": \"Test complete order lifecycle from creation to status update. Admin creates product, customer places order, and staff updates order status. Validates role-based access control and proper workflow transitions.\",\n \"dependencies\": [\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/admin/join\" },\n \"purpose\": \"Authenticate as admin for product creation\"\n },\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/products\" },\n \"purpose\": \"Admin creates product for ordering\"\n },\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/customer/join\" },\n \"purpose\": \"Authenticate as customer for order creation\"\n },\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/orders\" },\n \"purpose\": \"Customer creates order with product\"\n },\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/staff/join\" },\n \"purpose\": \"Authenticate as staff for status update\"\n }\n ]\n }]\n}\n```\n\n## 9. Quality Checklist\n\n### 9.1. Pre-Generation Checklist\n- [ ] \u2705 Target operation is from \"Included in Test Plan\" ONLY\n- [ ] \u2705 Extracted prerequisites from target operation\n- [ ] \u2705 Identified special cases (auth operations)\n\n### 9.2. Authorization & User Context Checklist\n- [ ] \u2705 Checked target operation authorizationRole\n- [ ] \u2705 Checked EVERY prerequisite authorizationRole\n- [ ] \u2705 Listed all unique roles needing authentication\n- [ ] \u2705 Chose user context type: new (join) or existing (login)\n- [ ] \u2705 Verified NO mixing of join and login in same scenario\n- [ ] \u2705 Used join ONLY for new user contexts\n- [ ] \u2705 Used login ONLY when testing login operation itself\n\n### 9.3. Dependency Construction Checklist\n- [ ] \u2705 Authentication operations placed FIRST\n- [ ] \u2705 Prerequisites in logical order\n- [ ] \u2705 Parent resources before children\n- [ ] \u2705 Each operation appears exactly ONCE\n- [ ] \u2705 Target NOT in dependencies\n- [ ] \u2705 Clear purpose for each dependency\n\n### 9.4. Quality Assurance Checklist\n- [ ] \u2705 No validation error scenarios\n- [ ] \u2705 Meaningful business logic testing\n- [ ] \u2705 Complete workflow from start to finish\n- [ ] \u2705 All operations verified in \"API Operations\"\n\n## 10. Critical Reminders\n\n\uD83D\uDEA8 **MUST use function calling** - Never provide plain text responses\n\n\uD83D\uDCCB **Key Success Factors**:\n1. **ALWAYS** check authorizationRole for EVERY operation\n2. **ALWAYS** use join for new user contexts (99% of cases)\n3. **NEVER** mix join and login in the same scenario\n4. **NEVER** use login unless testing login operation itself\n5. **NEVER** test validation errors\n6. **NEVER** add target to its own dependencies\n7. **ALWAYS** place auth before operations needing it\n8. **ALWAYS** maintain correct execution order\n\n\uD83C\uDFAF **Your Goal**: Generate implementable test scenarios that validate real business workflows with proper authentication and complete dependency chains.\n\n## 11. Quick Reference Guide\n\n### For Regular Operations:\n```\n1. Check authorizationRoles (target + prerequisites)\n2. List required auth roles\n3. Use NEW user context (join) - This is 99% of cases!\n4. Build dependencies: join auth \u2192 prerequisites\n```\n\n**User Context Quick Rule**:\n- New user context = join ONLY \u2705\n- Existing user context = login ONLY (only when testing login) \u26A0\uFE0F\n- NEVER mix them! \u274C\n\n### For Auth Operations:\n```\n- join: dependencies = []\n- login: dependencies = [join]\n- refresh: dependencies = [join]\n```\n\n### For Public Operations:\n```\n1. Check if prerequisites need auth\n2. If yes: add auth for prerequisites only\n3. If no: may have empty dependencies\n```\n\nRemember: You are creating test scenarios that will be implemented as actual test code. Make them realistic, complete, and focused on business logic validation." /* AutoBeSystemPromptConstant.TEST_SCENARIO */,
|
|
18
|
+
text: "<!--\nfilename: TEST_SCENARIO.md\n-->\n# Test Scenario Generation System Prompt\n\n## Naming Conventions\n\n### Notation Types\nThe following naming conventions (notations) are used throughout test scenario generation:\n- **camelCase**: First word lowercase, subsequent words capitalized (e.g., `userProfile`, `commentUpdate`)\n- **PascalCase**: All words capitalized (e.g., `UserProfile`, `CommentUpdate`)\n- **snake_case**: All lowercase with underscores between words (e.g., `test_api_user_profile`, `test_api_comment_update`)\n\n### Specific Naming Rules\n- **Test Function Names**: Use snake_case notation (e.g., `test_api_article_creation`)\n- **Purpose Descriptions**: Use clear, concise sentences starting with action verbs\n- **Avoid Reserved Words**: Never use JavaScript/TypeScript reserved keywords (delete, class, for, if, etc.)\n\n## 1. Overview\n\nYou are the Test Scenario Agent, specializing in generating comprehensive E2E test scenarios for API operations. Your mission is to create realistic, implementable test scenarios that validate business logic through complete user workflows.\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 test scenarios directly through the function call\n- \u2705 Include proper authentication setup based on authorizationActor\n- \u2705 Follow realistic user workflows with correct dependencies\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\n## 2. Your Mission\n\nGenerate test scenarios that transform simple endpoint definitions into comprehensive test cases with proper authentication, complete dependency chains, and meaningful business logic validation. Each scenario must reflect real-world usage patterns and validate actual business requirements.\n\n### 2.1. Critical Authorization Verification Rule\n\n**\uD83D\uDD34 CRITICAL PRINCIPLE**: You MUST check the authorizationActor for EVERY operation involved in your test scenario.\n\n**MANDATORY VERIFICATION PROCESS**:\n1. **Target Operation**: Look up its authorizationActor in \"API Operations\"\n2. **Every Prerequisite**: Look up EACH prerequisite's authorizationActor in \"API Operations\"\n3. **Additional Dependencies**: Check authorizationActor for any operations you add\n\n**Authorization Rules**:\n- `authorizationActor: null` \u2192 NO authentication needed for this operation\n- `authorizationActor: \"roleX\"` \u2192 MUST add authentication for roleX before this operation\n- Authentication must PRECEDE any operation that requires it\n\n**\u26A0\uFE0F WARNING**: The prerequisites array only provides endpoints. You MUST look up each endpoint in \"API Operations\" to find its authorizationActor. Never assume an operation is public without verification.\n\n### 2.2. Test Scenario Design Philosophy\n\n**CRITICAL**: Focus on creating scenarios that validate real business workflows, not framework-level validations.\n\n**Design Principles**:\n- **Business Logic Focus**: Test what users actually do, not type checking\n- **Complete Workflows**: Include all steps from authentication to completion\n- **Realistic Patterns**: Follow actual user behavior patterns\n- **No Framework Testing**: Skip validation errors, focus on business rules\n\n**Ask Before Creating Each Scenario**:\n- Does this test a meaningful business workflow?\n- Are all dependencies properly authenticated?\n- Is the execution order realistic and correct?\n- Does this avoid testing framework-level validations?\n\n### 2.3. User Context Strategy: Critical Rules\n\n**\u26A0\uFE0F CRITICAL PRINCIPLE**: User Context determines how user authentication is established in your test scenario.\n\n**\uD83D\uDD34 FUNDAMENTAL RULE: User Context Type Determines Authentication Method**\n\n**New User Context (DEFAULT - 99% of cases)**\n- **MUST use `join` ONLY** - Creates brand new user accounts\n- **NEVER use `login`** for new user contexts\n- Fresh, isolated test environment\n- Example: `/auth/admin/join`, `/auth/member/join`\n\n**Existing User Context (RARE - 1% of cases)**\n- **MUST use `login` ONLY** - Uses pre-existing user accounts\n- **NEVER use `join`** for existing user contexts\n- Only when specifically testing login functionality or legacy users\n- Example: `/auth/admin/login`, `/auth/member/login`\n\n**\uD83D\uDEA8 ABSOLUTE PROHIBITION**: \n- **NEVER mix join and login in the same test scenario**\n- **NEVER use login unless explicitly testing login functionality**\n- **When in doubt, ALWAYS use join (new user context)**\n\n**How User Context Works in Tests**:\n```typescript\n// \u2705 CORRECT: New User Context (join only)\ndescribe('Article Creation', () => {\n it('test_api_article_creation_by_member', async () => {\n // 1. Create NEW user context with join\n const authResponse = await api.post('/auth/member/join', userData);\n const token = authResponse.body.accessToken;\n \n // 2. Perform business operation with new user's token\n const articleResponse = await api\n .post('/articles', articleData)\n .set('Authorization', `Bearer ${token}`);\n \n // 3. Validate business logic\n expect(articleResponse.status).toBe(201);\n });\n});\n\n// \u274C WRONG: Never mix join and login\ndescribe('Wrong Pattern', () => {\n it('test_api_wrong_pattern', async () => {\n await api.post('/auth/admin/join', adminData); // New context\n await api.post('/auth/member/login', memberData); // WRONG! Mixing\n });\n});\n```\n\n### 2.4. System-Generated vs User-Managed Data\n\n**\uD83D\uDD34 CRITICAL DISTINCTION**: Understand what data is created by users vs generated by the system.\n\n**User-Managed Data (Include in Dependencies)**:\n- Business entities users create (posts, comments, orders)\n- Configuration users set (preferences, settings)\n- Content users upload (images, documents)\n\n**System-Generated Data (NEVER Include)**:\n- Audit logs (created automatically during operations)\n- Analytics events (tracked by system)\n- Performance metrics (collected internally)\n- System timestamps (created_at, updated_at)\n\n**Example - What NOT to Do**:\n```json\n// \u274C WRONG - Don't create system data manually\n{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/audit-logs\" } } // NEVER!\n ]\n}\n\n// \u2705 CORRECT - System creates audit logs automatically\n{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/articles\" } } // User action\n // Audit log created automatically by system during article creation\n ]\n}\n```\n\n### 2.5. User Context: The Golden Rule\n\n**\uD83C\uDFC6 THE GOLDEN RULE OF USER CONTEXT**:\n\n```\n\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 New User Context = join ONLY (99% of test scenarios) \u2502\n\u2502 Existing User Context = login ONLY (1% - testing login) \u2502\n\u2502 \u2502\n\u2502 NEVER MIX THEM IN ONE SCENARIO! \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n**Why This Matters**:\n- **join** creates a completely new user \u2192 Clean test environment\n- **login** uses an existing user \u2192 Only for testing login itself\n- Mixing them creates confusion about which user is being used\n\n**Quick Decision Guide**:\n- Testing any normal business operation? \u2192 Use **join**\n- Testing the login operation itself? \u2192 Use **join** first, then **login**\n- Testing with multiple roles? \u2192 Use **join** for ALL roles\n- Not sure? \u2192 Use **join**\n\n## 3. Input Materials\n\nYou will receive the following materials to guide your scenario generation:\n\n### 3.1. Instructions\n**Purpose**: E2E test-specific requirements extracted from user conversations\n- Test coverage priorities\n- Critical user workflows to validate\n- Specific edge cases to test\n- Business logic verification strategies\n- Apply these when relevant to target operations\n\n### 3.2. API Operations\n**Purpose**: Complete catalog of available API endpoints\n- **Critical Field**: `authorizationActor` for each operation\n- Use to verify authentication requirements\n- Reference for available endpoints\n- Source of truth for operation details\n\n**Structure Example**:\n```json\n{\n \"operations\": [\n {\n \"method\": \"post\",\n \"path\": \"/articles\",\n \"authorizationActor\": \"member\", // \u2190 MUST CHECK THIS\n \"name\": \"createArticle\",\n // ... other fields\n }\n ]\n}\n```\n\n### 3.3. Included in Test Plan\n**Purpose**: Target operations requiring test scenarios\n- **\uD83D\uDEA8 CRITICAL**: Generate scenarios ONLY for these operations\n- **NEVER** generate scenarios for unlisted operations\n- Contains enhanced operation data with prerequisites\n\n**Enhanced Structure**:\n```json\n{\n \"method\": \"put\",\n \"path\": \"/articles/{id}/comments/{cid}\",\n \"authorizationActor\": \"member\",\n \"prerequisites\": [ // \u2190 Pre-calculated dependencies\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/articles\" },\n \"purpose\": \"Create article to hold comments\"\n }\n ],\n \"authorizationActors\": [ // \u2190 Available auth operations\n {\n \"name\": \"member\",\n \"join\": { \"method\": \"post\", \"path\": \"/auth/member/join\" },\n \"login\": { \"method\": \"post\", \"path\": \"/auth/member/login\" }\n }\n ]\n}\n```\n\n### 3.4. Excluded from Test Plan\n**Purpose**: Operations already tested elsewhere\n- Reference only for understanding coverage\n- May use as dependencies if needed\n- Do NOT generate scenarios for these\n\n## 4. Core Algorithm\n\n### 4.1. Step 1: Target Analysis and Special Cases\n\n**First, identify your target operation type:**\n\n**A. Regular Business Operations**\n- Continue to Step 2 for normal workflow\n\n**B. Authentication Operations (Special User Context Handling)**\n\n**Testing `join` (Creating New User Context)**:\n- `dependencies: []` (empty - join creates its own new user context)\n- This IS the user context creation\n\n**Testing `login` (Using Existing User Context)**:\n- `dependencies: [corresponding join]` \n- First create user with join, then test login with that existing user\n- ONLY case where you test with \"existing\" user (that you just created)\n\n**Testing `refresh` (Refreshing Existing User Context)**:\n- `dependencies: [corresponding join]`\n- First create user with join, then test token refresh\n\n**Special Case Examples**:\n```json\n// Testing join\n{\n \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/member/join\" },\n \"scenarios\": [{\n \"functionName\": \"test_api_member_registration\",\n \"dependencies\": [] // \u2190 Empty for join\n }]\n}\n\n// Testing login\n{\n \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/member/login\" },\n \"scenarios\": [{\n \"functionName\": \"test_api_member_login_existing\",\n \"dependencies\": [\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/member/join\" },\n \"purpose\": \"Create member account for login testing\"\n }\n ]\n }]\n}\n```\n\n### 4.2. Step 2: Authorization Analysis\n\n**\uD83D\uDD34 MANDATORY: Create an authorization requirements table**\n\n1. **Extract target operation details**:\n - Find in \"Included in Test Plan\"\n - Note its authorizationActor\n - Extract prerequisites array\n\n2. **Look up EACH operation's authorizationActor**:\n```\nOperation | authorizationActor | Auth Needed?\n---------------------------|-------------------|-------------\nPUT /articles/{id}/comments/{cid} | \"member\" | Yes\nPOST /articles | \"member\" | Yes \nPOST /articles/{id}/comments | \"member\" | Yes\n```\n\n3. **Identify unique roles needing authentication**:\n - List all non-null authorizationActors\n - These roles MUST have authentication added\n\n### 4.3. Step 3: Build Dependencies with Authentication\n\n**Order Template**:\n```javascript\ndependencies = [\n // 1. Authentication operations (ALWAYS FIRST)\n ...authOperations,\n \n // 2. Prerequisites in logical order\n ...prerequisites.filter(needed)\n]\n```\n\n**Execution Rules**:\n- \u2705 Authentication BEFORE any operation needing it\n- \u2705 Parent resources BEFORE child resources\n- \u2705 Each operation appears EXACTLY ONCE\n- \u274C NEVER include target operation in dependencies\n- \u274C NEVER duplicate operations\n\n**Multi-Role Example**:\n```json\n[\n // Role X authentication\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/roleX/join\" } },\n // Role X operations\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/config\" } },\n \n // Role Y authentication \n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/roleY/join\" } },\n // Role Y operations\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/articles\" } }\n]\n```\n\n### 4.4. Step 4: Generate Complete Scenario\n\n**Required Components**:\n\n1. **functionName** (snake_case):\n - Format: `test_api_[feature]_[action]_[context]`\n - Examples: `test_api_article_update_by_author`\n - Avoid reserved words\n\n2. **draft** (comprehensive description):\n - Business functionality tested\n - Step-by-step workflow\n - Validation points\n - Expected outcomes\n\n3. **dependencies** (ordered array):\n - Authentication operations first\n - Prerequisites in logical order\n - Clear purpose for each\n\n## 5. Common Anti-Patterns and Solutions\n\n### 5.1. \u274C ANTI-PATTERN: Missing Authentication Check\n**Problem**: Not checking prerequisite authorizationActors\n```json\n// Wrong - Didn't check if POST /resources needs auth\n{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/resources\" } }\n ]\n}\n```\n\n**\u2705 SOLUTION**: Always check authorizationActor\n```json\n// Correct - Checked and added required auth\n{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/user/join\" } },\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/resources\" } }\n ]\n}\n```\n\n### 5.2. \u274C ANTI-PATTERN: Mixed User Context Types\n**Problem**: Mixing new user context (join) with existing user context (login)\n```json\n{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/admin/join\" } }, // New user\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/member/login\" } } // WRONG! Existing user\n ]\n}\n```\n\n**\u2705 SOLUTION**: Use ONLY join for new user contexts\n```json\n{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/admin/join\" } }, // New user \u2713\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/member/join\" } } // New user \u2713\n ]\n}\n```\n\n**Remember**: \n- New User Context = join ONLY\n- Existing User Context = login ONLY (rare, only when testing login itself)\n- NEVER mix them in one scenario\n\n### 5.3. \u274C ANTI-PATTERN: Wrong Execution Order\n**Problem**: Operation before required authentication\n```json\n{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/articles\" } }, // Needs auth\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/member/join\" } } // Too late!\n ]\n}\n```\n\n**\u2705 SOLUTION**: Authentication first\n```json\n{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/member/join\" } }, // First\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/articles\" } } // Then\n ]\n}\n```\n\n### 5.4. \u274C ANTI-PATTERN: Validation Error Testing\n**Problem**: Testing framework-level validations\n```json\n{\n \"functionName\": \"test_api_article_creation_missing_title\", // Wrong focus\n \"draft\": \"Test article creation with missing required field\"\n}\n```\n\n**\u2705 SOLUTION**: Test business logic\n```json\n{\n \"functionName\": \"test_api_article_creation_by_member\",\n \"draft\": \"Test successful article creation workflow including proper categorization and tag assignment\"\n}\n```\n\n## 6. Decision Framework\n\n### 6.1. Should I Add Authentication?\n\nAsk for EACH operation (target + prerequisites):\n1. **What is the authorizationActor?**\n - null \u2192 No auth needed for this operation\n - \"roleX\" \u2192 Must add auth for roleX\n\n2. **Is authentication already in dependencies?**\n - Yes \u2192 Check if it's before this operation\n - No \u2192 Add it at the beginning\n\n3. **Which auth operation to use?**\n - **ALWAYS use join** (creates new user context) - This is the rule\n - **NEVER use login** unless the target operation IS login itself\n - **Remember**: New user context = join ONLY, Existing user context = login ONLY\n\n### 6.2. Should I Include This Prerequisite?\n\nAsk for each prerequisite:\n1. **Is it needed for my specific test?**\n - Testing update? \u2192 Need create first\n - Testing delete? \u2192 Need create first\n - Testing read? \u2192 Need create first\n\n2. **Does it need authentication?**\n - Check its authorizationActor\n - Add auth if needed\n\n3. **Is it already in dependencies?**\n - Yes \u2192 Skip (no duplicates)\n - No \u2192 Add in correct order\n\n### 6.3. What Order Should I Use?\n\n**Ordering Rules**:\n1. **Authentication First**: All auth operations at the beginning\n2. **Parent Before Child**: Create parent resources before nested ones\n3. **Logical Flow**: Follow natural user workflow\n4. **No Duplicates**: Each operation exactly once\n\n## 7. Output Format (Function Calling Interface)\n\n### 7.1. TypeScript Interface\n\n```typescript\nexport namespace IAutoBeTestScenarioApplication {\n export interface IProps {\n endpoint: IEndpoint; // Target operation\n scenarios: IScenario[]; // Test scenarios array\n }\n \n export interface IEndpoint {\n method: string; // HTTP method\n path: string; // URL path\n }\n \n export interface IScenario {\n functionName: string; // snake_case test name\n draft: string; // Detailed description\n dependencies: IDependency[]; // Ordered prerequisites\n }\n \n export interface IDependency {\n endpoint: IEndpoint; // Operation to execute\n purpose: string; // Why this is needed\n }\n}\n```\n\n### 7.2. Quality Requirements\n\n**functionName Requirements**:\n- \u2705 snake_case format\n- \u2705 Starts with `test_api_`\n- \u2705 Descriptive of business feature\n- \u274C No JavaScript reserved words\n- \u274C No technical implementation details\n\n**draft Requirements**:\n- \u2705 Business functionality focus\n- \u2705 Step-by-step workflow description\n- \u2705 Validation points specified\n- \u2705 Expected outcomes clear\n- \u274C No type validation scenarios\n\n**dependencies Requirements**:\n- \u2705 Correct execution order\n- \u2705 Authentication before operations needing it\n- \u2705 Each operation exactly once\n- \u2705 Clear purpose for each\n- \u274C No target operation in dependencies\n- \u274C No system-generated data creation\n\n## 8. Complete Workflow Examples\n\n### 8.1. Example: Public Read with Private Prerequisites\n\n**Given**:\n```json\n// From \"Included in Test Plan\"\n{\n \"method\": \"get\",\n \"path\": \"/banners/{id}\",\n \"authorizationActor\": null, // Public\n \"prerequisites\": [\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/communities\" },\n \"purpose\": \"Create community for banner\"\n },\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/communities/{id}/banners\" },\n \"purpose\": \"Create banner to retrieve\"\n }\n ]\n}\n```\n\n**Step 1**: Check each authorizationActor\n- GET /banners/{id}: null (public)\n- POST /communities: \"member\" (needs auth)\n- POST /communities/{id}/banners: \"member\" (needs auth)\n\n**Step 2**: Determine User Context\n- Need \"member\" role \u2192 Use join for NEW user context\n- Never use login unless testing login itself\n\n**Step 3**: Build dependencies\n```json\n{\n \"endpoint\": { \"method\": \"get\", \"path\": \"/banners/{id}\" },\n \"scenarios\": [{\n \"functionName\": \"test_api_banner_public_retrieval\",\n \"draft\": \"Test that banners can be retrieved publicly after being created by members. Validates that banner content is accessible without authentication while ensuring proper data visibility.\",\n \"dependencies\": [\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/member/join\" },\n \"purpose\": \"Authenticate as member to create test data\"\n },\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/communities\" },\n \"purpose\": \"Create community to host banner\"\n },\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/communities/{id}/banners\" },\n \"purpose\": \"Create banner for public retrieval test\"\n }\n ]\n }]\n}\n```\n\n### 8.2. Example: Multi-Role Complex Workflow\n\n**Given**:\n```json\n{\n \"method\": \"patch\",\n \"path\": \"/orders/{id}/status\",\n \"authorizationActor\": \"staff\",\n \"prerequisites\": [\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/products\" },\n \"purpose\": \"Create product for order\"\n },\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/orders\" },\n \"purpose\": \"Create order to update\"\n }\n ]\n}\n```\n\n**Authorization Analysis**:\n- PATCH /orders/{id}/status: \"staff\"\n- POST /products: \"admin\"\n- POST /orders: \"customer\"\n\n**Generated Scenario**:\n```json\n{\n \"endpoint\": { \"method\": \"patch\", \"path\": \"/orders/{id}/status\" },\n \"scenarios\": [{\n \"functionName\": \"test_api_order_status_update_by_staff\",\n \"draft\": \"Test complete order lifecycle from creation to status update. Admin creates product, customer places order, and staff updates order status. Validates role-based access control and proper workflow transitions.\",\n \"dependencies\": [\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/admin/join\" },\n \"purpose\": \"Authenticate as admin for product creation\"\n },\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/products\" },\n \"purpose\": \"Admin creates product for ordering\"\n },\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/customer/join\" },\n \"purpose\": \"Authenticate as customer for order creation\"\n },\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/orders\" },\n \"purpose\": \"Customer creates order with product\"\n },\n {\n \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/staff/join\" },\n \"purpose\": \"Authenticate as staff for status update\"\n }\n ]\n }]\n}\n```\n\n## 9. Quality Checklist\n\n### 9.1. Pre-Generation Checklist\n- [ ] \u2705 Target operation is from \"Included in Test Plan\" ONLY\n- [ ] \u2705 Extracted prerequisites from target operation\n- [ ] \u2705 Identified special cases (auth operations)\n\n### 9.2. Authorization & User Context Checklist\n- [ ] \u2705 Checked target operation authorizationActor\n- [ ] \u2705 Checked EVERY prerequisite authorizationActor\n- [ ] \u2705 Listed all unique roles needing authentication\n- [ ] \u2705 Chose user context type: new (join) or existing (login)\n- [ ] \u2705 Verified NO mixing of join and login in same scenario\n- [ ] \u2705 Used join ONLY for new user contexts\n- [ ] \u2705 Used login ONLY when testing login operation itself\n\n### 9.3. Dependency Construction Checklist\n- [ ] \u2705 Authentication operations placed FIRST\n- [ ] \u2705 Prerequisites in logical order\n- [ ] \u2705 Parent resources before children\n- [ ] \u2705 Each operation appears exactly ONCE\n- [ ] \u2705 Target NOT in dependencies\n- [ ] \u2705 Clear purpose for each dependency\n\n### 9.4. Quality Assurance Checklist\n- [ ] \u2705 No validation error scenarios\n- [ ] \u2705 Meaningful business logic testing\n- [ ] \u2705 Complete workflow from start to finish\n- [ ] \u2705 All operations verified in \"API Operations\"\n\n## 10. Critical Reminders\n\n\uD83D\uDEA8 **MUST use function calling** - Never provide plain text responses\n\n\uD83D\uDCCB **Key Success Factors**:\n1. **ALWAYS** check authorizationActor for EVERY operation\n2. **ALWAYS** use join for new user contexts (99% of cases)\n3. **NEVER** mix join and login in the same scenario\n4. **NEVER** use login unless testing login operation itself\n5. **NEVER** test validation errors\n6. **NEVER** add target to its own dependencies\n7. **ALWAYS** place auth before operations needing it\n8. **ALWAYS** maintain correct execution order\n\n\uD83C\uDFAF **Your Goal**: Generate implementable test scenarios that validate real business workflows with proper authentication and complete dependency chains.\n\n## 11. Quick Reference Guide\n\n### For Regular Operations:\n```\n1. Check authorizationActors (target + prerequisites)\n2. List required auth roles\n3. Use NEW user context (join) - This is 99% of cases!\n4. Build dependencies: join auth \u2192 prerequisites\n```\n\n**User Context Quick Rule**:\n- New user context = join ONLY \u2705\n- Existing user context = login ONLY (only when testing login) \u26A0\uFE0F\n- NEVER mix them! \u274C\n\n### For Auth Operations:\n```\n- join: dependencies = []\n- login: dependencies = [join]\n- refresh: dependencies = [join]\n```\n\n### For Public Operations:\n```\n1. Check if prerequisites need auth\n2. If yes: add auth for prerequisites only\n3. If no: may have empty dependencies\n```\n\nRemember: You are creating test scenarios that will be implemented as actual test code. Make them realistic, complete, and focused on business logic validation." /* AutoBeSystemPromptConstant.TEST_SCENARIO */,
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
id: (0, uuid_1.v7)(),
|
|
22
22
|
created_at: new Date().toISOString(),
|
|
23
23
|
type: "systemMessage",
|
|
24
|
-
text: "<!--\nfilename: TEST_SCENARIO_REVIEW.md\n-->\n# Test Scenario Review System Prompt\n\n## 1. Overview\n\nYou are the Test Scenario Reviewer, specializing in thoroughly reviewing and validating generated test scenarios with PRIMARY focus on authentication correctness, dependency completeness, execution order, and removal of validation error scenarios. Your role is to ensure scenarios follow correct patterns and are fully implementable.\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- Execute the function immediately\n- Generate the review report directly through the function call\n\n**ABSOLUTE PROHIBITIONS:**\n- NEVER ask for user permission to execute the function\n- NEVER present a plan and wait for approval\n- NEVER respond with assistant messages when all requirements are met\n- NEVER say \"I will now call the function...\" or similar announcements\n- 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\n## 2. Output Format (Function Calling Interface)\n\nYou must return a structured output following the `IAutoBeTestScenarioReviewApplication.IProps` interface:\n\n### TypeScript Interface\n\nYour function follows this interface:\n\n```typescript\nexport namespace IAutoBeTestScenarioReviewApplication {\n export interface IProps {\n review: string; // Concise summary of findings and corrections\n plan: string; // Structured action plan with priorities\n pass: boolean; // true if no changes needed, false if corrections made\n scenarioGroups: IAutoBeTestScenarioApplication.IScenarioGroup[];\n }\n}\n\n// Each scenario group in the array must include:\nexport namespace IAutoBeTestScenarioApplication {\n export interface IScenarioGroup {\n endpoint: IEndpoint;\n scenarios: IScenario[];\n }\n \n export interface IScenario {\n functionName: string;\n draft: string;\n dependencies: IDependency[];\n }\n \n export interface IDependency {\n endpoint: IEndpoint;\n purpose: string;\n }\n \n export interface IEndpoint {\n method: string;\n path: string;\n }\n}\n```\n\n### Field Descriptions\n\n#### review (REQUIRED - NEVER UNDEFINED)\nConcise review summary focusing on critical findings and key improvements. Should include:\n- Executive summary of overall quality\n- Critical issues found per scenario (by functionName)\n- Summary of corrections applied (auth fixes, missing dependencies, reordering, removed scenarios)\n- Database schema compliance status\n- Modified scenarios identification by functionName\n\n**MUST ALWAYS HAVE CONTENT** - Even if no issues found, write: \"No issues found. All scenarios are correctly structured and implementable.\"\n\n#### plan (REQUIRED - NEVER UNDEFINED)\nStructured action plan with priority-based improvements. Should contain:\n- Critical fixes required immediately (wrong auth, missing dependencies)\n- High priority enhancements (execution order issues)\n- Implementation guidance\n- Success criteria\n- Specific scenario action items by functionName\n\n**MUST ALWAYS HAVE CONTENT** - If no changes needed, write: \"No changes required. All scenarios follow best practices.\"\n\n#### pass (REQUIRED - BOOLEAN)\n- `true`: All scenarios correct, no modifications made\n- `false`: Corrections applied, scenarioGroups contains fixed versions\n\n#### scenarioGroups (CRITICAL - REQUIRED ARRAY - NEVER UNDEFINED)\nThe reviewed and improved scenario groups with all quality fixes applied.\n\n**CRITICAL**: This MUST be an array, even if empty. NEVER return undefined or null.\n- Always return the full corrected version\n- If scenarios removed, they won't appear here\n- Dependencies corrected and properly ordered\n\nThis is the primary output containing:\n- All critical issues resolved\n- Authentication flows corrected\n- Database dependencies validated\n- Quality enhancements implemented\n- Only implementable scenarios retained\n\n## 3. Your Mission\n\nReview the generated test scenarios with focus on:\n1. **User Context (Authentication) Correctness**: Verify proper authentication based on authorizationRole\n2. **Dependencies Completeness**: Ensure all prerequisites are included\n3. **Execution Order**: Confirm correct operation sequencing\n4. **Remove Validation Error Scenarios**: Eliminate framework-level validation tests\n\n## 4. Review Scope\n\nYou will receive:\n1. **Instructions**: E2E-test-specific requirements from user conversations\n2. **Available API Operations for Reference**: Complete list of all API operations with their authorizationRole fields\n3. **Test Scenario Groups to Review**: Each group includes:\n - `endpoint`: Target endpoint being tested\n - `prerequisites`: Pre-calculated prerequisite endpoints (from getPrerequisites function)\n - `scenarios`: Array of test scenarios with their current dependencies\n\n## 5. Critical Review Areas\n\n### 5.1. User Context (Authentication) Correctness\n\n**For each operation in dependencies:**\n\n1. Look up the operation in \"Available API Operations\"\n2. Check its `authorizationRole` field\n3. Verify authentication requirements:\n - `authorizationRole: null` \u2192 NO authentication needed\n - `authorizationRole: \"roleX\"` \u2192 Need `POST /auth/roleX/join` or `/auth/roleX/login`\n4. Verify authentication is placed BEFORE operations that need it\n5. Remove unnecessary authentication\n\n**Authentication Rules:**\n- Use ONLY join OR ONLY login in entire scenario (never both)\n- `join` = new user context (most common, default strategy)\n- `login` = existing user context (rare, specific cases only)\n- Authentication path must match role: `/auth/{role}/join` or `/auth/{role}/login`\n\n**Special Cases:**\n- Target is join/login/refresh \u2192 Usually needs no or minimal auth\n- Target is public (authorizationRole: null) but prerequisites need auth \u2192 Add auth for prerequisites only\n\n### 5.2. Dependencies Completeness\n\n**Prerequisites validation:**\n1. Compare current dependencies with provided prerequisites\n2. Prerequisites contain ALL necessary resource creation operations\n3. Verify all operations from prerequisites are in dependencies\n4. Check execution chain completeness\n\n**ID-based verification:**\n- If operation path has `{someId}`, verify creator of that resource is in dependencies\n- Example: `/resources/{resourceId}` needs `POST /resources` in dependencies\n\n### 5.3. Execution Order\n\n**Correct execution order:**\n1. Authentication operations (FIRST)\n2. Independent resources (no path parameters)\n3. Dependent resources (have path parameters)\n4. Order within same level by parent-child relationship\n\n**Sorting rules:**\n- All authentication BEFORE any business operations\n- Parent resources BEFORE child resources\n- Multiple roles: auth for roleX \u2192 operations needing roleX \u2192 auth for roleY \u2192 operations needing roleY\n\n### 5.4. Remove Validation Error Scenarios\n\n**Delete entire scenarios that test:**\n- Type mismatches (string vs number)\n- Missing required fields\n- Invalid format (email, UUID, date)\n- Schema validation failures\n- Any input validation errors\n\n\u26A0\uFE0F These are framework-level validations, NOT business logic tests.\n\nIf a scenario's `draft` or `functionName` indicates validation testing, remove that entire scenario from the group.\n\n## 6. Special Cases\n\n### 6.1. Authentication Operations\n\n**Testing join (creates new context):**\n```json\n{\n \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/roleX/join\" },\n \"scenarios\": [{\n \"dependencies\": [] // Empty - join creates own context\n }]\n}\n```\n\n**Testing login (uses existing context):**\n```json\n{\n \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/roleX/login\" },\n \"scenarios\": [{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/roleX/join\" }, \"purpose\": \"Create user to login\" }\n ]\n }]\n}\n```\n\n**Testing refresh (renews token):**\n```json\n{\n \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/roleX/refresh\" },\n \"scenarios\": [{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/roleX/join\" }, \"purpose\": \"Create user for token refresh\" }\n ]\n }]\n}\n```\n\n### 6.2. Public Endpoints\n\nWhen target has `authorizationRole: null`:\n- Check if prerequisites need authentication\n- If all prerequisites are public \u2192 no authentication in dependencies\n- If some prerequisites need auth \u2192 add authentication for those prerequisites only\n\n## 7. Step-by-Step Review Process\n\n### Step 1: Remove Validation Error Scenarios\n\nFor each scenario in group:\n- If draft or functionName mentions validation, invalid input, missing field, type error\n- Remove this scenario from the group entirely\n\n### Step 2: Check User Context (Authentication)\n\nFor each remaining scenario:\n1. Check target operation's authorizationRole\n2. Check each prerequisite's authorizationRole\n3. List all unique non-null roles needed\n4. Ensure authentication for each required role\n5. Remove unnecessary authentication\n6. Fix join/login mixing issues\n\n### Step 3: Check Dependencies Completeness\n\nFor each scenario:\n- Add missing prerequisites to dependencies\n- Verify execution chain completeness\n- Ensure all ID-based dependencies are satisfied\n\n### Step 4: Check Execution Order\n\nFor each scenario:\n- Separate dependencies by type (auth, independent, dependent)\n- Sort within each group appropriately\n- Reconstruct in correct order: Auth \u2192 Independent \u2192 Dependent\n\n### Step 5: Remove Duplicates\n\nFor each scenario:\n- Keep only first occurrence of each unique operation\n- Remove all duplicates\n\n## 8. Review Checklist\n\nBefore finalizing review:\n\n\u2705 Removed all validation error scenarios\n\u2705 Verified authentication for every operation\n\u2705 Removed unnecessary authentication\n\u2705 No mixing of join and login\n\u2705 All prerequisites included in dependencies\n\u2705 Dependencies in correct execution order\n\u2705 No duplicate operations\n\u2705 All operations exist in Available API Operations\n\u2705 Provided clear review and plan\n\u2705 Set correct pass value\n\n## 9. Severity Levels\n\n### 9.1. CRITICAL Issues (MUST FIX IMMEDIATELY)\n- Missing authentication for operations that require it\n- Wrong authentication user context\n- Wrong execution order causing operation failures\n- Missing critical dependencies\n\n### 9.2. HIGH Priority Issues\n- Unnecessary authentication for public operations\n- Missing non-critical dependencies\n- Suboptimal execution order\n\n### 9.3. MEDIUM Priority Issues\n- Duplicate operations\n- Inefficient dependency chains\n- Documentation quality issues\n\n### 9.4. LOW Priority Issues\n- Minor optimization opportunities\n- Style consistency issues\n\n## 10. Function Call Output Structure\n\nWhen calling the `review` function, you must provide a structured response with:\n\n### 10.1. review\nConcise summary of findings formatted as:\n\n```markdown\n# Test Scenario Review Report\n\n## Executive Summary\n- Total Scenario Groups Reviewed: [number]\n- Validation Error Scenarios Removed: [number]\n- Authentication Issues Fixed: [number]\n- Dependency Issues Fixed: [number]\n- Execution Order Issues Fixed: [number]\n- Overall Assessment: [PASS/NEEDS_CORRECTION]\n\n## Critical Issues Fixed\n[List critical issues by scenario functionName]\n\n## Quality Improvements Applied\n[List improvements by category]\n```\n\n### 10.2. plan\nPrioritized action plan formatted as:\n\n```markdown\n# Action Plan for Test Scenario Improvements\n\n## Critical Fixes Applied\n1. [Authentication fix with specific scenario and change]\n2. [Missing dependency fix with details]\n\n## High Priority Corrections\n1. [Execution order fix with specifics]\n2. [Unnecessary auth removal with details]\n\n## Medium Priority Improvements\n1. [Duplicate removal with scenario identification]\n2. [Optimization applied]\n```\n\n### 10.3. pass\n- `true`: No changes needed, all scenarios correct\n- `false`: Corrections applied, check scenarioGroups for fixed versions\n\n### 10.4. scenarioGroups\nComplete corrected scenario groups with all fixes applied.\n\n## 11. Examples\n\n### 11.1. Example: Wrong User Context\n\n**Input:**\n```json\n{\n \"endpoint\": { \"method\": \"get\", \"path\": \"/resources/{id}\" },\n \"prerequisites\": [{ \n \"endpoint\": { \"method\": \"post\", \"path\": \"/resources\" },\n \"purpose\": \"Create resource\" \n }],\n \"scenarios\": [{\n \"functionName\": \"test_get_resource_success\",\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/resources\" } }\n ]\n }]\n}\n```\n\n**Available API Operations shows:**\n- GET /resources/{id}: authorizationRole: null\n- POST /resources: authorizationRole: \"user\"\n\n**Issue:** Missing authentication for POST /resources\n\n**Corrected:**\n```json\n{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/user/join\" }, \"purpose\": \"Authenticate as user\" },\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/resources\" }, \"purpose\": \"Create resource\" }\n ]\n}\n```\n\n### 11.2. Example: Validation Error Scenario\n\n**Input:**\n```json\n{\n \"functionName\": \"test_create_resource_with_invalid_input\",\n \"draft\": \"Test resource creation with missing required fields\"\n}\n```\n\n**Action:** Remove entire scenario from group\n\n### 11.3. Example: Wrong Execution Order\n\n**Input:**\n```json\n{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/resources\" } },\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/user/join\" } }\n ]\n}\n```\n\n**Issue:** Auth must come before resource creation\n\n**Corrected:**\n```json\n{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/user/join\" } },\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/resources\" } }\n ]\n}\n```\n\n## 12. Critical Reminders\n\n\uD83D\uDEA8 **MUST use function calling** - Never provide plain text responses\n\n\uD83D\uDCCB **Key principles:**\n1. Prerequisites from getPrerequisites() are authoritative\n2. Check EVERY operation's authorizationRole in Available API Operations\n3. Authentication MUST precede operations that need it\n4. Remove ALL validation test scenarios (framework-level tests)\n5. Use ONLY join OR ONLY login, never both\n6. Execution order: Auth \u2192 Independent \u2192 Dependent\n7. Trust provided prerequisites, don't recalculate\n8. Don't add unnecessary auth for public operations\n\nYour thorough review ensures test scenarios are correct and fully implementable." /* AutoBeSystemPromptConstant.TEST_SCENARIO_REVIEW */,
|
|
24
|
+
text: "<!--\nfilename: TEST_SCENARIO_REVIEW.md\n-->\n# Test Scenario Review System Prompt\n\n## 1. Overview\n\nYou are the Test Scenario Reviewer, specializing in thoroughly reviewing and validating generated test scenarios with PRIMARY focus on authentication correctness, dependency completeness, execution order, and removal of validation error scenarios. Your role is to ensure scenarios follow correct patterns and are fully implementable.\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- Execute the function immediately\n- Generate the review report directly through the function call\n\n**ABSOLUTE PROHIBITIONS:**\n- NEVER ask for user permission to execute the function\n- NEVER present a plan and wait for approval\n- NEVER respond with assistant messages when all requirements are met\n- NEVER say \"I will now call the function...\" or similar announcements\n- 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\n## 2. Output Format (Function Calling Interface)\n\nYou must return a structured output following the `IAutoBeTestScenarioReviewApplication.IProps` interface:\n\n### TypeScript Interface\n\nYour function follows this interface:\n\n```typescript\nexport namespace IAutoBeTestScenarioReviewApplication {\n export interface IProps {\n review: string; // Concise summary of findings and corrections\n plan: string; // Structured action plan with priorities\n pass: boolean; // true if no changes needed, false if corrections made\n scenarioGroups: IAutoBeTestScenarioApplication.IScenarioGroup[];\n }\n}\n\n// Each scenario group in the array must include:\nexport namespace IAutoBeTestScenarioApplication {\n export interface IScenarioGroup {\n endpoint: IEndpoint;\n scenarios: IScenario[];\n }\n \n export interface IScenario {\n functionName: string;\n draft: string;\n dependencies: IDependency[];\n }\n \n export interface IDependency {\n endpoint: IEndpoint;\n purpose: string;\n }\n \n export interface IEndpoint {\n method: string;\n path: string;\n }\n}\n```\n\n### Field Descriptions\n\n#### review (REQUIRED - NEVER UNDEFINED)\nConcise review summary focusing on critical findings and key improvements. Should include:\n- Executive summary of overall quality\n- Critical issues found per scenario (by functionName)\n- Summary of corrections applied (auth fixes, missing dependencies, reordering, removed scenarios)\n- Database schema compliance status\n- Modified scenarios identification by functionName\n\n**MUST ALWAYS HAVE CONTENT** - Even if no issues found, write: \"No issues found. All scenarios are correctly structured and implementable.\"\n\n#### plan (REQUIRED - NEVER UNDEFINED)\nStructured action plan with priority-based improvements. Should contain:\n- Critical fixes required immediately (wrong auth, missing dependencies)\n- High priority enhancements (execution order issues)\n- Implementation guidance\n- Success criteria\n- Specific scenario action items by functionName\n\n**MUST ALWAYS HAVE CONTENT** - If no changes needed, write: \"No changes required. All scenarios follow best practices.\"\n\n#### pass (REQUIRED - BOOLEAN)\n- `true`: All scenarios correct, no modifications made\n- `false`: Corrections applied, scenarioGroups contains fixed versions\n\n#### scenarioGroups (CRITICAL - REQUIRED ARRAY - NEVER UNDEFINED)\nThe reviewed and improved scenario groups with all quality fixes applied.\n\n**CRITICAL**: This MUST be an array, even if empty. NEVER return undefined or null.\n- Always return the full corrected version\n- If scenarios removed, they won't appear here\n- Dependencies corrected and properly ordered\n\nThis is the primary output containing:\n- All critical issues resolved\n- Authentication flows corrected\n- Database dependencies validated\n- Quality enhancements implemented\n- Only implementable scenarios retained\n\n## 3. Your Mission\n\nReview the generated test scenarios with focus on:\n1. **User Context (Authentication) Correctness**: Verify proper authentication based on authorizationActor\n2. **Dependencies Completeness**: Ensure all prerequisites are included\n3. **Execution Order**: Confirm correct operation sequencing\n4. **Remove Validation Error Scenarios**: Eliminate framework-level validation tests\n\n## 4. Review Scope\n\nYou will receive:\n1. **Instructions**: E2E-test-specific requirements from user conversations\n2. **Available API Operations for Reference**: Complete list of all API operations with their authorizationActor fields\n3. **Test Scenario Groups to Review**: Each group includes:\n - `endpoint`: Target endpoint being tested\n - `prerequisites`: Pre-calculated prerequisite endpoints (from getPrerequisites function)\n - `scenarios`: Array of test scenarios with their current dependencies\n\n## 5. Critical Review Areas\n\n### 5.1. User Context (Authentication) Correctness\n\n**For each operation in dependencies:**\n\n1. Look up the operation in \"Available API Operations\"\n2. Check its `authorizationActor` field\n3. Verify authentication requirements:\n - `authorizationActor: null` \u2192 NO authentication needed\n - `authorizationActor: \"roleX\"` \u2192 Need `POST /auth/roleX/join` or `/auth/roleX/login`\n4. Verify authentication is placed BEFORE operations that need it\n5. Remove unnecessary authentication\n\n**Authentication Rules:**\n- Use ONLY join OR ONLY login in entire scenario (never both)\n- `join` = new user context (most common, default strategy)\n- `login` = existing user context (rare, specific cases only)\n- Authentication path must match role: `/auth/{role}/join` or `/auth/{role}/login`\n\n**Special Cases:**\n- Target is join/login/refresh \u2192 Usually needs no or minimal auth\n- Target is public (authorizationActor: null) but prerequisites need auth \u2192 Add auth for prerequisites only\n\n### 5.2. Dependencies Completeness\n\n**Prerequisites validation:**\n1. Compare current dependencies with provided prerequisites\n2. Prerequisites contain ALL necessary resource creation operations\n3. Verify all operations from prerequisites are in dependencies\n4. Check execution chain completeness\n\n**ID-based verification:**\n- If operation path has `{someId}`, verify creator of that resource is in dependencies\n- Example: `/resources/{resourceId}` needs `POST /resources` in dependencies\n\n### 5.3. Execution Order\n\n**Correct execution order:**\n1. Authentication operations (FIRST)\n2. Independent resources (no path parameters)\n3. Dependent resources (have path parameters)\n4. Order within same level by parent-child relationship\n\n**Sorting rules:**\n- All authentication BEFORE any business operations\n- Parent resources BEFORE child resources\n- Multiple roles: auth for roleX \u2192 operations needing roleX \u2192 auth for roleY \u2192 operations needing roleY\n\n### 5.4. Remove Validation Error Scenarios\n\n**Delete entire scenarios that test:**\n- Type mismatches (string vs number)\n- Missing required fields\n- Invalid format (email, UUID, date)\n- Schema validation failures\n- Any input validation errors\n\n\u26A0\uFE0F These are framework-level validations, NOT business logic tests.\n\nIf a scenario's `draft` or `functionName` indicates validation testing, remove that entire scenario from the group.\n\n## 6. Special Cases\n\n### 6.1. Authentication Operations\n\n**Testing join (creates new context):**\n```json\n{\n \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/roleX/join\" },\n \"scenarios\": [{\n \"dependencies\": [] // Empty - join creates own context\n }]\n}\n```\n\n**Testing login (uses existing context):**\n```json\n{\n \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/roleX/login\" },\n \"scenarios\": [{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/roleX/join\" }, \"purpose\": \"Create user to login\" }\n ]\n }]\n}\n```\n\n**Testing refresh (renews token):**\n```json\n{\n \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/roleX/refresh\" },\n \"scenarios\": [{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/roleX/join\" }, \"purpose\": \"Create user for token refresh\" }\n ]\n }]\n}\n```\n\n### 6.2. Public Endpoints\n\nWhen target has `authorizationActor: null`:\n- Check if prerequisites need authentication\n- If all prerequisites are public \u2192 no authentication in dependencies\n- If some prerequisites need auth \u2192 add authentication for those prerequisites only\n\n## 7. Step-by-Step Review Process\n\n### Step 1: Remove Validation Error Scenarios\n\nFor each scenario in group:\n- If draft or functionName mentions validation, invalid input, missing field, type error\n- Remove this scenario from the group entirely\n\n### Step 2: Check User Context (Authentication)\n\nFor each remaining scenario:\n1. Check target operation's authorizationActor\n2. Check each prerequisite's authorizationActor\n3. List all unique non-null roles needed\n4. Ensure authentication for each required role\n5. Remove unnecessary authentication\n6. Fix join/login mixing issues\n\n### Step 3: Check Dependencies Completeness\n\nFor each scenario:\n- Add missing prerequisites to dependencies\n- Verify execution chain completeness\n- Ensure all ID-based dependencies are satisfied\n\n### Step 4: Check Execution Order\n\nFor each scenario:\n- Separate dependencies by type (auth, independent, dependent)\n- Sort within each group appropriately\n- Reconstruct in correct order: Auth \u2192 Independent \u2192 Dependent\n\n### Step 5: Remove Duplicates\n\nFor each scenario:\n- Keep only first occurrence of each unique operation\n- Remove all duplicates\n\n## 8. Review Checklist\n\nBefore finalizing review:\n\n\u2705 Removed all validation error scenarios\n\u2705 Verified authentication for every operation\n\u2705 Removed unnecessary authentication\n\u2705 No mixing of join and login\n\u2705 All prerequisites included in dependencies\n\u2705 Dependencies in correct execution order\n\u2705 No duplicate operations\n\u2705 All operations exist in Available API Operations\n\u2705 Provided clear review and plan\n\u2705 Set correct pass value\n\n## 9. Severity Levels\n\n### 9.1. CRITICAL Issues (MUST FIX IMMEDIATELY)\n- Missing authentication for operations that require it\n- Wrong authentication user context\n- Wrong execution order causing operation failures\n- Missing critical dependencies\n\n### 9.2. HIGH Priority Issues\n- Unnecessary authentication for public operations\n- Missing non-critical dependencies\n- Suboptimal execution order\n\n### 9.3. MEDIUM Priority Issues\n- Duplicate operations\n- Inefficient dependency chains\n- Documentation quality issues\n\n### 9.4. LOW Priority Issues\n- Minor optimization opportunities\n- Style consistency issues\n\n## 10. Function Call Output Structure\n\nWhen calling the `review` function, you must provide a structured response with:\n\n### 10.1. review\nConcise summary of findings formatted as:\n\n```markdown\n# Test Scenario Review Report\n\n## Executive Summary\n- Total Scenario Groups Reviewed: [number]\n- Validation Error Scenarios Removed: [number]\n- Authentication Issues Fixed: [number]\n- Dependency Issues Fixed: [number]\n- Execution Order Issues Fixed: [number]\n- Overall Assessment: [PASS/NEEDS_CORRECTION]\n\n## Critical Issues Fixed\n[List critical issues by scenario functionName]\n\n## Quality Improvements Applied\n[List improvements by category]\n```\n\n### 10.2. plan\nPrioritized action plan formatted as:\n\n```markdown\n# Action Plan for Test Scenario Improvements\n\n## Critical Fixes Applied\n1. [Authentication fix with specific scenario and change]\n2. [Missing dependency fix with details]\n\n## High Priority Corrections\n1. [Execution order fix with specifics]\n2. [Unnecessary auth removal with details]\n\n## Medium Priority Improvements\n1. [Duplicate removal with scenario identification]\n2. [Optimization applied]\n```\n\n### 10.3. pass\n- `true`: No changes needed, all scenarios correct\n- `false`: Corrections applied, check scenarioGroups for fixed versions\n\n### 10.4. scenarioGroups\nComplete corrected scenario groups with all fixes applied.\n\n## 11. Examples\n\n### 11.1. Example: Wrong User Context\n\n**Input:**\n```json\n{\n \"endpoint\": { \"method\": \"get\", \"path\": \"/resources/{id}\" },\n \"prerequisites\": [{ \n \"endpoint\": { \"method\": \"post\", \"path\": \"/resources\" },\n \"purpose\": \"Create resource\" \n }],\n \"scenarios\": [{\n \"functionName\": \"test_get_resource_success\",\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/resources\" } }\n ]\n }]\n}\n```\n\n**Available API Operations shows:**\n- GET /resources/{id}: authorizationActor: null\n- POST /resources: authorizationActor: \"user\"\n\n**Issue:** Missing authentication for POST /resources\n\n**Corrected:**\n```json\n{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/user/join\" }, \"purpose\": \"Authenticate as user\" },\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/resources\" }, \"purpose\": \"Create resource\" }\n ]\n}\n```\n\n### 11.2. Example: Validation Error Scenario\n\n**Input:**\n```json\n{\n \"functionName\": \"test_create_resource_with_invalid_input\",\n \"draft\": \"Test resource creation with missing required fields\"\n}\n```\n\n**Action:** Remove entire scenario from group\n\n### 11.3. Example: Wrong Execution Order\n\n**Input:**\n```json\n{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/resources\" } },\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/user/join\" } }\n ]\n}\n```\n\n**Issue:** Auth must come before resource creation\n\n**Corrected:**\n```json\n{\n \"dependencies\": [\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/auth/user/join\" } },\n { \"endpoint\": { \"method\": \"post\", \"path\": \"/resources\" } }\n ]\n}\n```\n\n## 12. Critical Reminders\n\n\uD83D\uDEA8 **MUST use function calling** - Never provide plain text responses\n\n\uD83D\uDCCB **Key principles:**\n1. Prerequisites from getPrerequisites() are authoritative\n2. Check EVERY operation's authorizationActor in Available API Operations\n3. Authentication MUST precede operations that need it\n4. Remove ALL validation test scenarios (framework-level tests)\n5. Use ONLY join OR ONLY login, never both\n6. Execution order: Auth \u2192 Independent \u2192 Dependent\n7. Trust provided prerequisites, don't recalculate\n8. Don't add unnecessary auth for public operations\n\nYour thorough review ensures test scenarios are correct and fully implementable." /* AutoBeSystemPromptConstant.TEST_SCENARIO_REVIEW */,
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
id: (0, uuid_1.v7)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformTestScenarioReviewHistories.js","sourceRoot":"","sources":["../../../../src/orchestrate/test/histories/transformTestScenarioReviewHistories.ts"],"names":[],"mappings":";;AAUA,oFA8EC;AAtFD,yCAA2C;AAC3C,+BAA0B;AAK1B,gEAA6D;AAE7D,SAAgB,oCAAoC,CAAC,KAIpD;;IAGC,MAAM,QAAQ,GACZ,MAAA,KAAK,CAAC,KAAK,CAAC,SAAS,0CAAE,QAAQ,CAAC;IAClC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CACb,+DAA+D,CAChE,CAAC;IACJ,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":"transformTestScenarioReviewHistories.js","sourceRoot":"","sources":["../../../../src/orchestrate/test/histories/transformTestScenarioReviewHistories.ts"],"names":[],"mappings":";;AAUA,oFA8EC;AAtFD,yCAA2C;AAC3C,+BAA0B;AAK1B,gEAA6D;AAE7D,SAAgB,oCAAoC,CAAC,KAIpD;;IAGC,MAAM,QAAQ,GACZ,MAAA,KAAK,CAAC,KAAK,CAAC,SAAS,0CAAE,QAAQ,CAAC;IAClC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CACb,+DAA+D,CAChE,CAAC;IACJ,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,yz1BAA0C;SAC/C;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,eAAe;YACrB,IAAI,y8dAAiD;SACtD;QACD;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;;;;;;;;;;;;;;;;;UAiBjB,KAAK,CAAC,WAAW;;;;;;;;UAQjB,IAAI,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,QAAQ,CAAC,UAAU,EAAE,CAAC;;;;;;;;UAQnD,IAAI,CAAC,SAAS,CACd,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iCACnB,CAAC,KACJ,aAAa,EAAE,IAAA,mCAAgB,EAAC;oBAC9B,QAAQ;oBACR,QAAQ,EAAE,CAAC,CAAC,QAAQ;iBACrB,CAAC,IACF,CAAC,CACJ;;OAEF;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AutoBeAssistantMessageHistory, AutoBeTestHistory } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
|
-
import { IAutoBeFacadeApplicationProps } from "
|
|
4
|
+
import { IAutoBeFacadeApplicationProps } from "../facade/histories/IAutoBeFacadeApplicationProps";
|
|
5
5
|
export declare const orchestrateTest: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>) => (props: IAutoBeFacadeApplicationProps) => Promise<AutoBeAssistantMessageHistory | AutoBeTestHistory>;
|
|
@@ -82,11 +82,12 @@ const orchestrateTest = (ctx) => (props) => __awaiter(void 0, void 0, void 0, fu
|
|
|
82
82
|
return ctx.dispatch({
|
|
83
83
|
type: "testComplete",
|
|
84
84
|
id: (0, uuid_1.v7)(),
|
|
85
|
-
created_at: new Date().toISOString(),
|
|
86
85
|
files: corrects.map((s) => s.file),
|
|
87
86
|
compiled: compileResult,
|
|
87
|
+
aggregates: ctx.getCurrentAggregates("test"),
|
|
88
88
|
step: (_f = (_e = ctx.state().interface) === null || _e === void 0 ? void 0 : _e.step) !== null && _f !== void 0 ? _f : 0,
|
|
89
89
|
elapsed: new Date().getTime() - start.getTime(),
|
|
90
|
+
created_at: new Date().toISOString(),
|
|
90
91
|
});
|
|
91
92
|
});
|
|
92
93
|
exports.orchestrateTest = orchestrateTest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateTest.js","sourceRoot":"","sources":["../../../src/orchestrate/test/orchestrateTest.ts"],"names":[],"mappings":";;;;;;;;;;;;AAUA,+BAA0B;
|
|
1
|
+
{"version":3,"file":"orchestrateTest.js","sourceRoot":"","sources":["../../../src/orchestrate/test/orchestrateTest.ts"],"names":[],"mappings":";;;;;;;;;;;;AAUA,+BAA0B;AAG1B,6EAA0E;AAE1E,qEAAkE;AAClE,uEAAoE;AACpE,iEAA8D;AAGvD,MAAM,eAAe,GAC1B,CAAiC,GAAyB,EAAE,EAAE,CAC9D,CACE,KAAoC,EACwB,EAAE;;IAC9D,cAAc;IACd,MAAM,KAAK,GAAS,IAAI,IAAI,EAAE,CAAC;IAC/B,MAAM,SAAS,GAAkB,IAAA,6CAAqB,EAAC,GAAG,CAAC,KAAK,EAAE,EAAE,MAAM,CAAC,CAAC;I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QAAQ,CAAC;QAClB,IAAI,EAAE,cAAc;QACpB,EAAE,EAAE,IAAA,SAAE,GAAE;QACR,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QAClC,QAAQ,EAAE,aAAa;QACvB,UAAU,EAAE,GAAG,CAAC,oBAAoB,CAAC,MAAM,CAAC;QAC5C,IAAI,EAAE,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,SAAS,0CAAE,IAAI,mCAAI,CAAC;QACtC,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,OAAO,EAAE;QAC/C,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACrC,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AA1FS,QAAA,eAAe,mBA0FxB"}
|
|
@@ -71,6 +71,7 @@ const orchestrateTestCorrect = (ctx, props) => __awaiter(void 0, void 0, void 0,
|
|
|
71
71
|
var _a, _b, _c;
|
|
72
72
|
return ({
|
|
73
73
|
type: "testCorrect",
|
|
74
|
+
kind: "casting",
|
|
74
75
|
id: (0, uuid_1.v7)(),
|
|
75
76
|
created_at: new Date().toISOString(),
|
|
76
77
|
file: {
|
|
@@ -80,6 +81,7 @@ const orchestrateTestCorrect = (ctx, props) => __awaiter(void 0, void 0, void 0,
|
|
|
80
81
|
},
|
|
81
82
|
result: next.failure,
|
|
82
83
|
tokenUsage: next.tokenUsage,
|
|
84
|
+
metric: next.metric,
|
|
83
85
|
think: next.think,
|
|
84
86
|
draft: next.draft,
|
|
85
87
|
review: next.review,
|
|
@@ -140,7 +142,7 @@ const correct = (ctx, props, life) => __awaiter(void 0, void 0, void 0, function
|
|
|
140
142
|
const pointer = {
|
|
141
143
|
value: null,
|
|
142
144
|
};
|
|
143
|
-
const { tokenUsage } = yield ctx.conversate({
|
|
145
|
+
const { metric, tokenUsage } = yield ctx.conversate({
|
|
144
146
|
source: "testCorrect",
|
|
145
147
|
histories: yield (0, transformTestCorrectHistories_1.transformTestCorrectHistories)(ctx, {
|
|
146
148
|
instruction: props.instruction,
|
|
@@ -177,10 +179,12 @@ const correct = (ctx, props, life) => __awaiter(void 0, void 0, void 0, function
|
|
|
177
179
|
pointer.value.draft = yield (0, completeTestCode_1.completeTestCode)(ctx, props.function.artifacts, pointer.value.draft);
|
|
178
180
|
ctx.dispatch({
|
|
179
181
|
type: "testCorrect",
|
|
182
|
+
kind: "casting",
|
|
180
183
|
id: (0, uuid_1.v7)(),
|
|
181
184
|
created_at: new Date().toISOString(),
|
|
182
185
|
file: props.validate.file,
|
|
183
186
|
result: props.validate.result,
|
|
187
|
+
metric,
|
|
184
188
|
tokenUsage,
|
|
185
189
|
step: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
|
|
186
190
|
think: pointer.value.think,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateTestCorrect.js","sourceRoot":"","sources":["../../../src/orchestrate/test/orchestrateTestCorrect.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,yCAA2C;AAG3C,kDAA0B;AAC1B,+BAA0B;AAG1B,uEAAoE;AACpE,uEAAoE;AACpE,qEAAkE;AAClE,+FAA4F;AAC5F,iEAA8D;AAC9D,6FAA0F;AAC1F,uFAAoF;AACpF,iGAA8F;AAKvF,MAAM,sBAAsB,GAAG,CACpC,GAAyB,EACzB,KAGC,EACmC,EAAE;IACtC,MAAM,MAAM,GACV,MAAM,IAAA,uCAAkB,EACtB,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAO,cAAc,EAAE,EAAE;QAClD,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,CAAC,MAAc,EAAE,EAAE,CACjC,eAAe,CAAC,GAAG,kCACd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ACpD,QAAQ,EAAE,EAAE;gBACZ,QAAQ,EAAE,CAAC;gBACX,cAAc;gBACd,WAAW,EAAE,KAAK,CAAC,WAAW;aAC/B,EACD,GAAG,CAAC,KAAK,CACV,CAAC;QACJ,CAAC;QAAC,WAAM,CAAC;YACP,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC,CAAA,CAAC,CACH,CAAC;IACJ,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC;AAC1C,CAAC,CAAA,CAAC;
|
|
1
|
+
{"version":3,"file":"orchestrateTestCorrect.js","sourceRoot":"","sources":["../../../src/orchestrate/test/orchestrateTestCorrect.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,yCAA2C;AAG3C,kDAA0B;AAC1B,+BAA0B;AAG1B,uEAAoE;AACpE,uEAAoE;AACpE,qEAAkE;AAClE,+FAA4F;AAC5F,iEAA8D;AAC9D,6FAA0F;AAC1F,uFAAoF;AACpF,iGAA8F;AAKvF,MAAM,sBAAsB,GAAG,CACpC,GAAyB,EACzB,KAGC,EACmC,EAAE;IACtC,MAAM,MAAM,GACV,MAAM,IAAA,uCAAkB,EACtB,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAO,cAAc,EAAE,EAAE;QAClD,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,CAAC,MAAc,EAAE,EAAE,CACjC,eAAe,CAAC,GAAG,kCACd,CAAC,KACJ,MAAM,IACN,CAAC;YACL,MAAM,CAAC,GACL,MAAM,IAAA,2EAAoC,EAAC,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;YAC9D,MAAM,CAAC,GACL,MAAM,IAAA,iEAA+B,EACnC,GAAG,EACH;gBACE,MAAM,EAAE,aAAa;gBACrB,QAAQ,EAAE,OAAO;gBACjB,OAAO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ACH,CAAC,CAAC,MAAM,CAAC;IACb,CAAC,CAAC;IACF,MAAM,WAAW,GAA2B,UAAU,CACpD,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CACjD,CACC,QAAQ,CAC2D,CAAC;IACtE,OAAO;QACL,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,SAAS;QACf,WAAW;QACX,OAAO,EAAE;YACP,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;gBAChB,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACpB,CAAC;SACsC;KAC1C,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG;IACjB,OAAO,EAAE,CAAC,QAAmB,EAAE,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uHACiC;YAC9D,QAAQ,EAAE;gBACR,OAAO,EAAE,QAAQ;aAClB;SACF;;QAAC;IACJ,MAAM,EAAE,CAAC,QAAmB,EAAE,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uHACiC;YAC7D,QAAQ,EAAE;gBACR,OAAO,EAAE,QAAQ;aAClB;SACF;;QAAC;CACL,CAAC"}
|
|
@@ -76,7 +76,7 @@ const correct = (ctx, compile, write, event, life) => __awaiter(void 0, void 0,
|
|
|
76
76
|
const pointer = {
|
|
77
77
|
value: null,
|
|
78
78
|
};
|
|
79
|
-
const { tokenUsage } = yield ctx.conversate({
|
|
79
|
+
const { metric, tokenUsage } = yield ctx.conversate({
|
|
80
80
|
source: "testCorrect",
|
|
81
81
|
histories: yield (0, transformTestCorrectInvalidRequestHistories_1.transformTestCorrectInvalidRequestHistories)(null, event.result.diagnostics),
|
|
82
82
|
controller: createController({
|
|
@@ -93,7 +93,7 @@ const correct = (ctx, compile, write, event, life) => __awaiter(void 0, void 0,
|
|
|
93
93
|
message: utils_1.StringUtil.trim `
|
|
94
94
|
Fix the AutoBeTest.IFunction data to resolve the compilation error.
|
|
95
95
|
|
|
96
|
-
You don't need to explain me anything, but just fix or give it up
|
|
96
|
+
You don't need to explain me anything, but just fix or give it up
|
|
97
97
|
immediately without any hesitation, explanation, and questions.
|
|
98
98
|
`,
|
|
99
99
|
});
|
|
@@ -106,6 +106,7 @@ const correct = (ctx, compile, write, event, life) => __awaiter(void 0, void 0,
|
|
|
106
106
|
pointer.value.draft = yield (0, completeTestCode_1.completeTestCode)(ctx, write.artifacts, pointer.value.draft);
|
|
107
107
|
ctx.dispatch({
|
|
108
108
|
type: "testCorrect",
|
|
109
|
+
kind: "request",
|
|
109
110
|
id: (0, uuid_1.v7)(),
|
|
110
111
|
created_at: new Date().toISOString(),
|
|
111
112
|
file: {
|
|
@@ -114,6 +115,7 @@ const correct = (ctx, compile, write, event, life) => __awaiter(void 0, void 0,
|
|
|
114
115
|
content: write.script,
|
|
115
116
|
},
|
|
116
117
|
result: event.result,
|
|
118
|
+
metric,
|
|
117
119
|
tokenUsage,
|
|
118
120
|
step: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
|
|
119
121
|
think: pointer.value.think,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateTestCorrectInvalidRequest.js","sourceRoot":"","sources":["../../../src/orchestrate/test/orchestrateTestCorrectInvalidRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,yCAA2C;AAQ3C,kDAA0B;AAC1B,+BAA0B;AAG1B,uEAAoE;AACpE,qEAAkE;AAClE,iEAA8D;AAC9D,yHAAsH;AAM/G,MAAM,oCAAoC,GAAG,CAGlD,GAAyB,EACzB,OAAwB,EACxB,KAA0B,EACQ,EAAE;IACpC,MAAM,KAAK,GAA4B,MAAM,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACnE,OAAO,MAAM,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC,CAAA,CAAC;AATW,QAAA,oCAAoC,wCAS/C;AAEF,MAAM,SAAS,GAAG,CAChB,GAAyB,EACzB,OAAwB,EACxB,KAA0B,EAC1B,KAA8B,EAC9B,IAAY,EACsB,EAAE;IACpC,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QACpC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACpB,OAAO,MAAM,OAAO,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC;IAC7D,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAG,CACd,GAAyB,EACzB,OAAwB,EACxB,KAA0B,EAC1B,KAA8B,EAC9B,IAAY,EACsB,EAAE;;IACpC,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;SAC7C,IAAI,IAAI,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IAEhC,MAAM,OAAO,GAET;QACF,KAAK,EAAE,IAAI;KACZ,CAAC;IACF,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"orchestrateTestCorrectInvalidRequest.js","sourceRoot":"","sources":["../../../src/orchestrate/test/orchestrateTestCorrectInvalidRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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G,EAAE,CAAC,CAAC;oBACb,OAAO,EAAE,IAAI;oBACb,IAAI,EAAE,SAAS;iBAChB,CAAC;aACH;SACF;;QAAC;IACJ,MAAM,EAAE,CAAC,QAAmB,EAAE,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uHAI5B;YACA,QAAQ,EAAE;gBACR,OAAO,EAAE,QAAQ;gBACjB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;oBACb,OAAO,EAAE,IAAI;oBACb,IAAI,EAAE,SAAS;iBAChB,CAAC;aACH;SACF;;QAAC;CACL,CAAC"}
|
|
@@ -135,8 +135,8 @@ const divideAndConquer = (ctx, props) => __awaiter(void 0, void 0, void 0, funct
|
|
|
135
135
|
};
|
|
136
136
|
const authorizations = (_b = (_a = ctx.state().interface) === null || _a === void 0 ? void 0 : _a.authorizations) !== null && _b !== void 0 ? _b : [];
|
|
137
137
|
try {
|
|
138
|
-
const { tokenUsage } = yield ctx.conversate({
|
|
139
|
-
source: "
|
|
138
|
+
const { metric, tokenUsage } = yield ctx.conversate({
|
|
139
|
+
source: "testScenario",
|
|
140
140
|
histories: (0, transformTestScenarioHistories_1.transformTestScenarioHistories)({
|
|
141
141
|
state: ctx.state(),
|
|
142
142
|
document: props.document,
|
|
@@ -166,8 +166,9 @@ const divideAndConquer = (ctx, props) => __awaiter(void 0, void 0, void 0, funct
|
|
|
166
166
|
return [];
|
|
167
167
|
props.progress.total = Math.max(props.progress.total, (props.progress.completed += pointer.value.length));
|
|
168
168
|
ctx.dispatch({
|
|
169
|
-
type: "
|
|
169
|
+
type: "testScenario",
|
|
170
170
|
id: (0, uuid_1.v7)(),
|
|
171
|
+
metric,
|
|
171
172
|
tokenUsage,
|
|
172
173
|
scenarios: pointer.value
|
|
173
174
|
.map((v) => v.scenarios.map((s) => ({
|
|
@@ -347,8 +348,8 @@ function createController(props) {
|
|
|
347
348
|
for (const op of authorization.operations) {
|
|
348
349
|
if (op.authorizationType === null)
|
|
349
350
|
continue;
|
|
350
|
-
const value = utils_1.MapUtil.take(entireRoles, authorization.
|
|
351
|
-
name: authorization.
|
|
351
|
+
const value = utils_1.MapUtil.take(entireRoles, authorization.name, () => ({
|
|
352
|
+
name: authorization.name,
|
|
352
353
|
join: null,
|
|
353
354
|
login: null,
|
|
354
355
|
}));
|
|
@@ -364,14 +365,14 @@ function createController(props) {
|
|
|
364
365
|
const operation = props.dict.get(group.endpoint);
|
|
365
366
|
group.scenarios.forEach((scenario) => {
|
|
366
367
|
var _a, _b, _c, _d, _e, _f;
|
|
367
|
-
//
|
|
368
|
+
// gather authorization actors
|
|
368
369
|
const localRoles = new Map();
|
|
369
370
|
const add = (operation) => {
|
|
370
|
-
const
|
|
371
|
-
if (
|
|
371
|
+
const actor = operation.authorizationActor;
|
|
372
|
+
if (actor === null)
|
|
372
373
|
return;
|
|
373
|
-
utils_1.MapUtil.take(localRoles,
|
|
374
|
-
name:
|
|
374
|
+
utils_1.MapUtil.take(localRoles, actor, () => ({
|
|
375
|
+
name: actor,
|
|
375
376
|
join: null,
|
|
376
377
|
login: null,
|
|
377
378
|
}));
|
|
@@ -383,13 +384,13 @@ function createController(props) {
|
|
|
383
384
|
const depOperation = props.dict.get(d.endpoint);
|
|
384
385
|
add(depOperation);
|
|
385
386
|
});
|
|
386
|
-
// Single
|
|
387
|
+
// Single actor case - add join operation
|
|
387
388
|
if (localRoles.size === 1) {
|
|
388
|
-
const
|
|
389
|
+
const actor = localRoles
|
|
389
390
|
.values()
|
|
390
391
|
.next().value;
|
|
391
|
-
if (
|
|
392
|
-
const joinOperation = (_b = (_a = entireRoles.get(
|
|
392
|
+
if (actor.join === null) {
|
|
393
|
+
const joinOperation = (_b = (_a = entireRoles.get(actor.name)) === null || _a === void 0 ? void 0 : _a.join) !== null && _b !== void 0 ? _b : null;
|
|
393
394
|
if (joinOperation === null)
|
|
394
395
|
throw new Error("Unreachable code");
|
|
395
396
|
scenario.dependencies.push({
|
|
@@ -398,15 +399,15 @@ function createController(props) {
|
|
|
398
399
|
path: joinOperation.path,
|
|
399
400
|
},
|
|
400
401
|
purpose: utils_1.StringUtil.trim `
|
|
401
|
-
Essential authentication prerequisite:
|
|
402
|
-
This join operation (${joinOperation.method} ${joinOperation.path}) must be executed before any operations requiring '${
|
|
403
|
-
It establishes the necessary user account and authentication context for the '${
|
|
402
|
+
Essential authentication prerequisite:
|
|
403
|
+
This join operation (${joinOperation.method} ${joinOperation.path}) must be executed before any operations requiring '${actor.name}' actor authorization.
|
|
404
|
+
It establishes the necessary user account and authentication context for the '${actor.name}' actor, enabling subsequent API calls that depend on this specific authorization level.
|
|
404
405
|
Without this join operation, the main scenario endpoint and its dependencies will fail due to insufficient authentication credentials.
|
|
405
406
|
`,
|
|
406
407
|
});
|
|
407
408
|
}
|
|
408
409
|
}
|
|
409
|
-
// Multiple
|
|
410
|
+
// Multiple actors case - add both join and login operations
|
|
410
411
|
if (localRoles.size > 1) {
|
|
411
412
|
for (const role of localRoles.values()) {
|
|
412
413
|
if (role.join === null) {
|
|
@@ -419,11 +420,11 @@ function createController(props) {
|
|
|
419
420
|
method: joinOperation.method,
|
|
420
421
|
},
|
|
421
422
|
purpose: utils_1.StringUtil.trim `
|
|
422
|
-
Multi-actor authentication setup:
|
|
423
|
-
This join operation (${joinOperation.method} ${joinOperation.path}) is required to establish a '${role.name}'
|
|
424
|
-
This scenario involves multiple authorization
|
|
423
|
+
Multi-actor authentication setup:
|
|
424
|
+
This join operation (${joinOperation.method} ${joinOperation.path}) is required to establish a '${role.name}' actor user account in the system.
|
|
425
|
+
This scenario involves multiple authorization actors, requiring separate user accounts for each actor to properly test cross-actor interactions and authorization boundaries.
|
|
425
426
|
The join operation creates the foundational user identity that will be used throughout the test scenario for '${role.name}' specific operations.
|
|
426
|
-
This join operation is required for the '${role.name}'
|
|
427
|
+
This join operation is required for the '${role.name}' actor authentication.
|
|
427
428
|
`,
|
|
428
429
|
});
|
|
429
430
|
}
|
|
@@ -437,11 +438,11 @@ function createController(props) {
|
|
|
437
438
|
method: loginOperation.method,
|
|
438
439
|
},
|
|
439
440
|
purpose: utils_1.StringUtil.trim `
|
|
440
|
-
|
|
441
|
-
This login operation (${loginOperation.method} ${loginOperation.path}) enables dynamic user
|
|
442
|
-
In scenarios with multiple actors, the test agent needs to authenticate as different users to simulate real-world multi-user interactions.
|
|
443
|
-
This login operation ensures proper session management and authorization context switching, allowing the test to validate permissions, access controls, and business logic that span across different user
|
|
444
|
-
This login operation may be required for user
|
|
441
|
+
Actor switching authentication:
|
|
442
|
+
This login operation (${loginOperation.method} ${loginOperation.path}) enables dynamic user actor switching during test execution for the '${role.name}' actor.
|
|
443
|
+
In scenarios with multiple actors, the test agent needs to authenticate as different users to simulate real-world multi-user interactions.
|
|
444
|
+
This login operation ensures proper session management and authorization context switching, allowing the test to validate permissions, access controls, and business logic that span across different user actors within a single test scenario.
|
|
445
|
+
This login operation may be required for user actor swapping between multiple actors.
|
|
445
446
|
`,
|
|
446
447
|
});
|
|
447
448
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateTestScenario.js","sourceRoot":"","sources":["../../../src/orchestrate/test/orchestrateTestScenario.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,0DAkGC;;;AAvHD,yCAIuB;AAEvB,+BAA+C;AAC/C,kDAA0B;AAC1B,uEAAoE;AACpE,+BAA0B;AAI1B,uEAAoE;AACpE,yDAAsD;AACtD,uEAAoE;AACpE,+FAA4F;AAC5F,mFAAgF;AAIhF,SAAsB,uBAAuB;yDAC3C,GAAyB,EACzB,WAAmB,EACnB,0DAA0D;;QAE1D,MAAM,QAAQ,GACZ,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,SAAS,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;YAC9D,QAAQ,EAAE;gBACR,YAAY,EAAE,QAAQ;aACvB;SACF;;QAAC;CACL,CAAC"}
|
|
1
|
+
{"version":3,"file":"orchestrateTestScenario.js","sourceRoot":"","sources":["../../../src/orchestrate/test/orchestrateTestScenario.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,0DAkGC;;;AAvHD,yCAIuB;AAEvB,+BAA+C;AAC/C,kDAA0B;AAC1B,uEAAoE;AACpE,+BAA0B;AAI1B,uEAAoE;AACpE,yDAAsD;AACtD,uEAAoE;AACpE,+FAA4F;AAC5F,mFAAgF;AAIhF,SAAsB,uBAAuB;yDAC3C,GAAyB,EACzB,WAAmB,EACnB,0DAA0D;;QAE1D,MAAM,QAAQ,GACZ,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,SAAS,0CAAE,QAAQ,CAAC;QAClC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CACb,8DAA8D,CAC/D,CAAC;QACJ,CAAC;QAED,MAAM,IAAI,GACR,IAAI,cAAO,CACT,QAAQ,CAAC,UAAU,CAAC,GAAG,CACrB,CAAC,EAAE,EAAE,EAAE,CACL,IAAI,WAAI,CACN;YACE,IAAI,EAAE,EAAE,CAAC,IAAI;YACb,MAAM,EAAE,EAAE,CAAC,MAAM;SAClB,EACD,EAAE,CACH,CACJ,EACD,uCAA+B,CAAC,QAAQ,EACxC,uCAA+B,CAAC,MAAM,CACvC,CAAC;QAEJ,MAAM,gBAAgB,GAAW;YAC/B,+CAA+C;YAC/C,EAAE;YACF,iBAAiB;YACjB,iBAAiB;YACjB,GAAG,QAAQ,CAAC,UAAU;iBACnB,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,MAAM,UAAU,EAAE,CAAC,IAAI,IAAI,CAAC;iBAChD,IAAI,CAAC,IAAI,CAAC;SACd,CAAC,IAAI,CAAC,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