@autobe/agent 0.20.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/agent/src/AutoBeAgent.js +2 -2
- package/lib/agent/src/AutoBeAgent.js.map +1 -1
- package/lib/agent/src/AutoBeMockAgent.js +1 -0
- package/lib/agent/src/AutoBeMockAgent.js.map +1 -1
- package/lib/agent/src/constants/AutoBeConfigConstant.d.ts +3 -0
- package/lib/agent/src/{orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js → constants/AutoBeConfigConstant.js} +1 -1
- package/lib/agent/src/constants/AutoBeConfigConstant.js.map +1 -0
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +27 -26
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/agent/src/context/AutoBeContext.d.ts +3 -2
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js +4 -3
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js.map +1 -1
- package/lib/agent/src/factory/consentFunctionCall.js +4 -4
- package/lib/agent/src/factory/consentFunctionCall.js.map +1 -1
- package/lib/agent/src/factory/createAutoBeContext.js +16 -11
- package/lib/agent/src/factory/createAutoBeContext.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +2 -2
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +6 -6
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +50 -8
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +4 -4
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +6 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +4 -0
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.js +1 -1
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +19 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +3 -3
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +33 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +2 -2
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +2 -2
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +2 -2
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js +5 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +16 -10
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.d.ts +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js +3731 -228
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js +5 -3
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +10 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +365 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +43 -63
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +244 -176
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js +3466 -103
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +6 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +3672 -358
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.d.ts +60 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +0 -38
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +48 -101
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +29 -23
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaFactory.d.ts +9 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaFactory.js +1385 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaFactory.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaNamingConvention.d.ts +5 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaNamingConvention.js +78 -0
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaNamingConvention.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.d.ts +2 -0
- package/lib/agent/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.js +81 -0
- package/lib/agent/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +2 -2
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.d.ts +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js +2 -2
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +2 -2
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +6 -6
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +22 -7
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -8
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +13 -29
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.d.ts +2 -2
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js +2 -8
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +6 -49
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js +4 -2
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +5 -3
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +13 -6
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +206 -118
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts +2 -2
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js +2 -2
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +2 -2
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +24 -39
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +17 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +20 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +33 -73
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.js.map +1 -0
- package/{src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.ts → lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.d.ts} +3 -10
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +40 -24
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.d.ts +31 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js +86 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteDto.d.ts +4 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteDto.js +55 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteDto.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteImportStatements.d.ts +2 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteImportStatements.js +20 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteImportStatements.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteInputType.d.ts +30 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteInputType.js +73 -0
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteInputType.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.d.ts +6 -2
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js +63 -69
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js +15 -14
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +1 -1
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js +1 -1
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -1
- package/lib/agent/src/orchestrate/test/compile/getTestImportStatements.d.ts +2 -0
- package/lib/agent/src/orchestrate/test/compile/getTestImportStatements.js +19 -0
- package/lib/agent/src/orchestrate/test/compile/getTestImportStatements.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.js +2 -0
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -1
- package/lib/agent/src/orchestrate/test/compile/getTestTemplateCode.d.ts +2 -0
- package/lib/agent/src/orchestrate/test/compile/getTestTemplateCode.js +21 -0
- package/lib/agent/src/orchestrate/test/compile/getTestTemplateCode.js.map +1 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.d.ts +4 -2
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +40 -25
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +5 -4
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.d.ts +3 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +137 -96
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTest.js +6 -0
- package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js +126 -72
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +54 -48
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js +122 -43
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +48 -45
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.d.ts +6 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.js +3 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +28 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.d.ts +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +13 -0
- package/lib/agent/src/orchestrate/test/utils/getReferenceIds.d.ts +5 -0
- package/lib/agent/src/orchestrate/test/utils/getReferenceIds.js +28 -0
- package/lib/agent/src/orchestrate/test/utils/getReferenceIds.js.map +1 -0
- package/lib/agent/src/structures/IAutoBeConfig.d.ts +2 -0
- package/lib/constants/AutoBeConfigConstant.d.ts +3 -0
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +27 -26
- package/lib/context/AutoBeContext.d.ts +3 -2
- package/lib/index.mjs +13778 -3055
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +6 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +4 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.d.ts +4 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.d.ts +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +10 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +6 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.d.ts +60 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +0 -38
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +48 -101
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +29 -23
- package/lib/orchestrate/interface/utils/JsonSchemaFactory.d.ts +9 -0
- package/lib/orchestrate/interface/utils/JsonSchemaNamingConvention.d.ts +5 -0
- package/lib/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.d.ts +2 -0
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.d.ts +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +6 -6
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -8
- package/lib/orchestrate/realize/internal/compileRealizeFiles.d.ts +2 -2
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +13 -6
- package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +2 -2
- package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +2 -2
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +17 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +20 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +33 -73
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.d.ts +5 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.d.ts +36 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +40 -24
- package/lib/orchestrate/realize/utils/getRealizeWriteCodeTemplate.d.ts +31 -0
- package/lib/orchestrate/realize/utils/getRealizeWriteDto.d.ts +4 -0
- package/lib/orchestrate/realize/utils/getRealizeWriteImportStatements.d.ts +2 -0
- package/lib/orchestrate/realize/utils/getRealizeWriteInputType.d.ts +30 -0
- package/lib/orchestrate/realize/utils/replaceImportStatements.d.ts +6 -2
- package/lib/orchestrate/test/compile/getTestImportStatements.d.ts +2 -0
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +1 -1
- package/lib/orchestrate/test/compile/getTestTemplateCode.d.ts +2 -0
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +4 -2
- package/lib/orchestrate/test/histories/transformTestWriteHistories.d.ts +3 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +1 -1
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +48 -45
- package/lib/orchestrate/test/structures/IAutoBeTestFunctionFailure.d.ts +6 -0
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +28 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.d.ts +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +13 -0
- package/lib/orchestrate/test/utils/getReferenceIds.d.ts +5 -0
- package/lib/structures/IAutoBeConfig.d.ts +2 -0
- package/package.json +6 -6
- package/src/AutoBeAgent.ts +2 -0
- package/src/AutoBeMockAgent.ts +1 -0
- package/src/constants/AutoBeConfigConstant.ts +3 -0
- package/src/constants/AutoBeSystemPromptConstant.ts +27 -26
- package/src/context/AutoBeContext.ts +3 -0
- package/src/context/AutoBeTokenUsageComponent.ts +3 -3
- package/src/factory/consentFunctionCall.ts +2 -0
- package/src/factory/createAutoBeContext.ts +145 -135
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +6 -0
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.ts +4 -0
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +19 -1
- package/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.ts +39 -0
- package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +1 -4
- package/src/orchestrate/interface/orchestrateInterface.ts +15 -4
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +13 -5
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +58 -19
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +5 -1
- package/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.ts +95 -0
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +11 -11
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +7 -3
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +33 -91
- package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +72 -95
- package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.ts +65 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +0 -39
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +50 -104
- package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +31 -27
- package/src/orchestrate/interface/utils/JsonSchemaFactory.ts +171 -0
- package/src/orchestrate/interface/utils/JsonSchemaNamingConvention.ts +83 -0
- package/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.ts +90 -0
- package/src/orchestrate/interface/utils/validateAuthorizationSchema.ts +2 -2
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +1 -2
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +30 -15
- package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +27 -49
- package/src/orchestrate/realize/internal/compileRealizeFiles.ts +4 -11
- package/src/orchestrate/realize/orchestrateRealize.ts +19 -75
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +1 -1
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +114 -25
- package/src/orchestrate/realize/orchestrateRealizeScenario.ts +9 -5
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +11 -15
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +17 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.ts +20 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.ts +40 -74
- package/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.ts +9 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.ts +45 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +43 -27
- package/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.ts +97 -0
- package/src/orchestrate/realize/utils/getRealizeWriteDto.ts +64 -0
- package/src/orchestrate/realize/utils/getRealizeWriteImportStatements.ts +29 -0
- package/src/orchestrate/realize/utils/getRealizeWriteInputType.ts +82 -0
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +101 -111
- package/src/orchestrate/test/compile/completeTestCode.ts +15 -26
- package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +3 -0
- package/src/orchestrate/test/compile/getTestImportStatements.ts +25 -0
- package/src/orchestrate/test/compile/getTestScenarioArtifacts.ts +6 -1
- package/src/orchestrate/test/compile/getTestTemplateCode.ts +25 -0
- package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +48 -36
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +6 -5
- package/src/orchestrate/test/histories/transformTestWriteHistories.ts +43 -4
- package/src/orchestrate/test/orchestrateTest.ts +6 -0
- package/src/orchestrate/test/orchestrateTestCorrect.ts +46 -11
- package/src/orchestrate/test/orchestrateTestScenario.ts +52 -48
- package/src/orchestrate/test/orchestrateTestWrite.ts +24 -6
- package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +49 -46
- package/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.ts +8 -0
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +28 -1
- package/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.ts +1 -0
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +14 -0
- package/src/orchestrate/test/utils/getReferenceIds.ts +25 -0
- package/src/structures/IAutoBeConfig.ts +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +0 -38
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.d.ts +0 -3
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js +0 -75
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +0 -38
- package/lib/orchestrate/test/histories/transformTestHistories.d.ts +0 -3
- package/src/orchestrate/test/histories/transformTestHistories.ts +0 -78
|
@@ -50,7 +50,7 @@ export async function orchestrateTestWrite<Model extends ILlmSchema.Model>(
|
|
|
50
50
|
artifacts,
|
|
51
51
|
event,
|
|
52
52
|
};
|
|
53
|
-
} catch {
|
|
53
|
+
} catch (error) {
|
|
54
54
|
return null;
|
|
55
55
|
}
|
|
56
56
|
}),
|
|
@@ -73,7 +73,7 @@ async function process<Model extends ILlmSchema.Model>(
|
|
|
73
73
|
};
|
|
74
74
|
const { tokenUsage } = await ctx.conversate({
|
|
75
75
|
source: "testWrite",
|
|
76
|
-
histories: transformTestWriteHistories(scenario, artifacts),
|
|
76
|
+
histories: await transformTestWriteHistories(ctx, scenario, artifacts),
|
|
77
77
|
controller: createController({
|
|
78
78
|
model: ctx.model,
|
|
79
79
|
artifacts,
|
|
@@ -85,16 +85,30 @@ async function process<Model extends ILlmSchema.Model>(
|
|
|
85
85
|
promptCacheKey,
|
|
86
86
|
message: "Create e2e test functions.",
|
|
87
87
|
});
|
|
88
|
-
if (pointer.value === null)
|
|
88
|
+
if (pointer.value === null) {
|
|
89
|
+
++progress.completed;
|
|
90
|
+
throw new Error("Failed to create test code.");
|
|
91
|
+
}
|
|
89
92
|
|
|
90
93
|
const compiler: IAutoBeCompiler = await ctx.compiler();
|
|
91
|
-
|
|
94
|
+
if (pointer.value.revise)
|
|
95
|
+
pointer.value.revise.final = await compiler.typescript.beautify(
|
|
96
|
+
pointer.value.revise.final,
|
|
97
|
+
);
|
|
98
|
+
else
|
|
99
|
+
pointer.value.draft = await compiler.typescript.beautify(
|
|
100
|
+
pointer.value.draft,
|
|
101
|
+
);
|
|
92
102
|
return {
|
|
93
103
|
type: "testWrite",
|
|
94
104
|
id: v7(),
|
|
95
105
|
created_at: new Date().toISOString(),
|
|
96
106
|
location: `test/features/api/${pointer.value.domain}/${scenario.functionName}.ts`,
|
|
97
|
-
|
|
107
|
+
scenario: pointer.value.scenario,
|
|
108
|
+
domain: pointer.value.domain,
|
|
109
|
+
draft: pointer.value.draft,
|
|
110
|
+
review: pointer.value.revise?.review,
|
|
111
|
+
final: pointer.value.revise?.final,
|
|
98
112
|
tokenUsage,
|
|
99
113
|
completed: ++progress.completed,
|
|
100
114
|
total: progress.total,
|
|
@@ -119,7 +133,11 @@ function createController<Model extends ILlmSchema.Model>(props: {
|
|
|
119
133
|
execute: {
|
|
120
134
|
write: (next) => {
|
|
121
135
|
next.draft = completeTestCode(props.artifacts, next.draft);
|
|
122
|
-
|
|
136
|
+
if (next.revise)
|
|
137
|
+
next.revise.final = completeTestCode(
|
|
138
|
+
props.artifacts,
|
|
139
|
+
next.revise.final,
|
|
140
|
+
);
|
|
123
141
|
props.build(next);
|
|
124
142
|
},
|
|
125
143
|
} satisfies IAutoBeTestWriteApplication,
|
|
@@ -4,16 +4,14 @@ export interface IAutoBeTestCorrectApplication {
|
|
|
4
4
|
* generates corrected E2E test code.
|
|
5
5
|
*
|
|
6
6
|
* The AI executes this function to perform the complete error correction
|
|
7
|
-
* workflow: error
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* workflow: compilation error analysis → draft correction → code review →
|
|
8
|
+
* final corrected implementation. This multi-step process ensures systematic
|
|
9
|
+
* error resolution while preserving original test functionality and
|
|
10
|
+
* maintaining code quality.
|
|
11
11
|
*
|
|
12
|
-
* The corrector
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* corrected code through iterative refinement with comprehensive review and
|
|
16
|
-
* validation.
|
|
12
|
+
* The corrector analyzes compilation diagnostics to identify specific issues,
|
|
13
|
+
* develops correction strategies, and produces corrected code through
|
|
14
|
+
* iterative refinement with comprehensive review and validation.
|
|
17
15
|
*
|
|
18
16
|
* @param props Complete specification for error correction workflow including
|
|
19
17
|
* analysis steps, draft implementation, review process, and final code
|
|
@@ -25,47 +23,30 @@ export interface IAutoBeTestCorrectApplication {
|
|
|
25
23
|
export namespace IAutoBeTestCorrectApplication {
|
|
26
24
|
export interface IProps {
|
|
27
25
|
/**
|
|
28
|
-
* Step 1:
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* accomplishes, the expected business workflow, and the correct API
|
|
35
|
-
* integration patterns.
|
|
36
|
-
*
|
|
37
|
-
* This step ensures that error correction doesn't lose sight of the
|
|
38
|
-
* original test purpose and helps maintain the intended business logic
|
|
39
|
-
* while addressing technical compilation issues. The AI develops a
|
|
40
|
-
* comprehensive understanding of the test requirements before diving into
|
|
41
|
-
* error-specific details.
|
|
42
|
-
*
|
|
43
|
-
* Workflow: Scenario understanding → Business logic analysis → Intended
|
|
44
|
-
* functionality mapping
|
|
45
|
-
*/
|
|
46
|
-
think_without_compile_error: string;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Step 2: Compilation error analysis and root cause identification.
|
|
26
|
+
* Step 1: Deep compilation error analysis and correction strategy.
|
|
27
|
+
*
|
|
28
|
+
* AI performs comprehensive analysis of compilation errors to develop
|
|
29
|
+
* targeted correction strategies. This step involves deep examination of
|
|
30
|
+
* error messages, identification of error patterns, understanding root
|
|
31
|
+
* causes, and planning systematic corrections.
|
|
50
32
|
*
|
|
51
|
-
* AI
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
33
|
+
* The AI examines each compilation diagnostic to understand where the
|
|
34
|
+
* implementation diverged from correct TypeScript usage, identifies the
|
|
35
|
+
* business logic intent behind the failed code, and formulates strategies
|
|
36
|
+
* to fix errors while preserving the original test purpose. This analysis
|
|
37
|
+
* correlates error patterns with code structure to ensure corrections
|
|
38
|
+
* address root causes rather than symptoms.
|
|
56
39
|
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* usage while maintaining the business logic intent. This analysis forms
|
|
60
|
-
* the foundation for targeted error correction strategies.
|
|
40
|
+
* This deep analysis forms the foundation for all subsequent correction
|
|
41
|
+
* efforts, ensuring a methodical approach to resolving compilation issues.
|
|
61
42
|
*
|
|
62
43
|
* Workflow: Error diagnostic analysis → Root cause identification →
|
|
63
|
-
* Correction strategy planning
|
|
44
|
+
* Correction strategy planning → Business logic preservation strategy
|
|
64
45
|
*/
|
|
65
|
-
|
|
46
|
+
think: string;
|
|
66
47
|
|
|
67
48
|
/**
|
|
68
|
-
* Step
|
|
49
|
+
* Step 2: Draft corrected TypeScript E2E test code implementation.
|
|
69
50
|
*
|
|
70
51
|
* AI generates the first corrected version of the test code based on error
|
|
71
52
|
* analysis and correction strategies. This draft addresses all identified
|
|
@@ -86,7 +67,29 @@ export namespace IAutoBeTestCorrectApplication {
|
|
|
86
67
|
draft: string;
|
|
87
68
|
|
|
88
69
|
/**
|
|
89
|
-
* Step 4:
|
|
70
|
+
* Step 3-4: Review and finalization process.
|
|
71
|
+
*
|
|
72
|
+
* Encapsulates the review and final implementation phases into a single
|
|
73
|
+
* revision process. This structured approach ensures systematic validation
|
|
74
|
+
* and refinement of the corrected code through comprehensive review
|
|
75
|
+
* followed by production-ready implementation.
|
|
76
|
+
*
|
|
77
|
+
* The revision process maintains clear separation between review feedback
|
|
78
|
+
* and final deliverable while ensuring all corrections are properly
|
|
79
|
+
* validated and integrated.
|
|
80
|
+
*/
|
|
81
|
+
revise: IReviseProps;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Revision properties for the final review and implementation phases.
|
|
86
|
+
*
|
|
87
|
+
* This interface encapsulates the final two steps of the error correction
|
|
88
|
+
* workflow, ensuring systematic review and production-ready code delivery.
|
|
89
|
+
*/
|
|
90
|
+
export interface IReviseProps {
|
|
91
|
+
/**
|
|
92
|
+
* Step 3: Code review and correction validation.
|
|
90
93
|
*
|
|
91
94
|
* AI performs a comprehensive review of the corrected draft implementation,
|
|
92
95
|
* validating that all compilation errors have been resolved and that the
|
|
@@ -105,7 +108,7 @@ export namespace IAutoBeTestCorrectApplication {
|
|
|
105
108
|
review: string;
|
|
106
109
|
|
|
107
110
|
/**
|
|
108
|
-
* Step
|
|
111
|
+
* Step 4: Final production-ready corrected test code.
|
|
109
112
|
*
|
|
110
113
|
* AI produces the final, polished version of the corrected test code
|
|
111
114
|
* incorporating all review feedback and validation results. This code
|
|
@@ -119,7 +122,7 @@ export namespace IAutoBeTestCorrectApplication {
|
|
|
119
122
|
* behaviors and user workflows.
|
|
120
123
|
*
|
|
121
124
|
* Workflow: Review integration → Final refinement → Production-ready
|
|
122
|
-
* implementation This is the ultimate deliverable that will replace the
|
|
125
|
+
* implementation. This is the ultimate deliverable that will replace the
|
|
123
126
|
* compilation-failed code.
|
|
124
127
|
*/
|
|
125
128
|
final: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IAutoBeTypeScriptCompileResult } from "@autobe/interface";
|
|
2
|
+
|
|
3
|
+
import { IAutoBeTestFunction } from "./IAutoBeTestFunction";
|
|
4
|
+
|
|
5
|
+
export interface IAutoBeTestFunctionFailure {
|
|
6
|
+
function: IAutoBeTestFunction;
|
|
7
|
+
failure: IAutoBeTypeScriptCompileResult.IFailure;
|
|
8
|
+
}
|
|
@@ -32,6 +32,18 @@ export namespace IAutoBeTestScenarioApplication {
|
|
|
32
32
|
*
|
|
33
33
|
* Each scenario represents a specific test case for the same `path` and
|
|
34
34
|
* `method`.
|
|
35
|
+
*
|
|
36
|
+
* IMPORTANT: Each scenario must be actually implementable. A scenario's
|
|
37
|
+
* implementability is determined by the existence of ALL APIs (endpoints)
|
|
38
|
+
* required to test it. This includes not only the primary endpoint being
|
|
39
|
+
* tested, but also ALL dependency endpoints needed for setup,
|
|
40
|
+
* authentication, and data preparation. If even one required dependency API
|
|
41
|
+
* is missing from the available operations, the scenario cannot be
|
|
42
|
+
* implemented and should not be generated.
|
|
43
|
+
*
|
|
44
|
+
* Example: A "test banned user login" scenario requires both a login API
|
|
45
|
+
* AND a ban user API. If the ban API doesn't exist, this scenario is not
|
|
46
|
+
* implementable regardless of database schema fields.
|
|
35
47
|
*/
|
|
36
48
|
scenarios: IScenario[] & tags.MinItems<1>;
|
|
37
49
|
}
|
|
@@ -42,6 +54,11 @@ export namespace IAutoBeTestScenarioApplication {
|
|
|
42
54
|
* This interface defines a structured, user-centric test draft that includes
|
|
43
55
|
* a descriptive function name, a detailed scenario draft, and logical
|
|
44
56
|
* dependencies on other endpoints required for context or setup.
|
|
57
|
+
*
|
|
58
|
+
* CRITICAL: All referenced endpoints MUST exist in the provided API
|
|
59
|
+
* operations. Do NOT create scenarios for non-existent APIs, even if database
|
|
60
|
+
* schema fields suggest their existence. Test scenarios must be implementable
|
|
61
|
+
* with available APIs only.
|
|
45
62
|
*/
|
|
46
63
|
export interface IScenario {
|
|
47
64
|
/**
|
|
@@ -120,12 +137,22 @@ export namespace IAutoBeTestScenarioApplication {
|
|
|
120
137
|
* authentication, resource creation, or data setup, that are relevant to
|
|
121
138
|
* the test. This list is not a strict execution order — if ordering is
|
|
122
139
|
* important, it must be described explicitly in the `purpose`.
|
|
140
|
+
*
|
|
141
|
+
* WARNING: Every endpoint referenced here MUST exist in the provided API
|
|
142
|
+
* operations. Do NOT reference endpoints that are not explicitly available,
|
|
143
|
+
* even if they seem logically necessary based on database schema or
|
|
144
|
+
* business logic.
|
|
123
145
|
*/
|
|
124
146
|
dependencies: IDependencies[];
|
|
125
147
|
}
|
|
126
148
|
|
|
127
149
|
export interface IDependencies {
|
|
128
|
-
/**
|
|
150
|
+
/**
|
|
151
|
+
* Target API endpoint that this scenario depends on.
|
|
152
|
+
*
|
|
153
|
+
* This endpoint MUST exist in the available API operations list.
|
|
154
|
+
* Non-existent endpoints will cause test implementation failures.
|
|
155
|
+
*/
|
|
129
156
|
endpoint: AutoBeOpenApi.IEndpoint;
|
|
130
157
|
|
|
131
158
|
/**
|
|
@@ -60,6 +60,20 @@ export namespace IAutoBeTestWriteApplication {
|
|
|
60
60
|
*/
|
|
61
61
|
draft: string;
|
|
62
62
|
|
|
63
|
+
/**
|
|
64
|
+
* Steps 4-5: Code review and final refinement process.
|
|
65
|
+
*
|
|
66
|
+
* Contains the iterative improvement workflow that transforms the initial
|
|
67
|
+
* draft into production-ready test code. This two-phase process ensures
|
|
68
|
+
* systematic quality enhancement through comprehensive review followed by
|
|
69
|
+
* targeted refinement based on identified issues.
|
|
70
|
+
*
|
|
71
|
+
* Workflow: Draft → Review analysis → Final implementation
|
|
72
|
+
*/
|
|
73
|
+
revise: IReviseProps;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface IReviseProps {
|
|
63
77
|
/**
|
|
64
78
|
* Step 4: Code review and quality assessment.
|
|
65
79
|
*
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AutoBeOpenApi } from "@autobe/interface";
|
|
2
|
+
import { OpenApiTypeChecker } from "@samchon/openapi";
|
|
3
|
+
|
|
4
|
+
export const getReferenceIds = (props: {
|
|
5
|
+
document: AutoBeOpenApi.IDocument;
|
|
6
|
+
operation: AutoBeOpenApi.IOperation;
|
|
7
|
+
}): string[] => {
|
|
8
|
+
const result: Set<string> = new Set();
|
|
9
|
+
const emplace = (key: string) => {
|
|
10
|
+
if (key.endsWith("_id")) result.add(key);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
props.operation.parameters.forEach((p) => emplace(p.name));
|
|
14
|
+
if (props.operation.requestBody) {
|
|
15
|
+
OpenApiTypeChecker.visit({
|
|
16
|
+
components: props.document.components,
|
|
17
|
+
schema: { $ref: props.operation.requestBody.typeName },
|
|
18
|
+
closure: (schema) => {
|
|
19
|
+
if (OpenApiTypeChecker.isObject(schema) === false) return;
|
|
20
|
+
for (const key of Object.keys(schema.properties ?? {})) emplace(key);
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return Array.from(result);
|
|
25
|
+
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { AutoBeOpenApi, AutoBeRealizeAuthorization } from "@autobe/interface";
|
|
2
|
-
export declare namespace IAutoBeRealizeScenarioApplication {
|
|
3
|
-
interface IProps {
|
|
4
|
-
/** The OpenAPI operation to be realized. */
|
|
5
|
-
operation: AutoBeOpenApi.IOperation;
|
|
6
|
-
/**
|
|
7
|
-
* The name of the function to be generated.
|
|
8
|
-
*
|
|
9
|
-
* Derived from the Swagger path and method. The function name must be
|
|
10
|
-
* written in snake_case. It serves as the entry point in both code
|
|
11
|
-
* generation and test code.
|
|
12
|
-
*
|
|
13
|
-
* Once the function is generated, the function name and file name will be
|
|
14
|
-
* the same. The generated file will be located at
|
|
15
|
-
* `src/providers/${function_name}.ts`.
|
|
16
|
-
*/
|
|
17
|
-
functionName: string;
|
|
18
|
-
/** For example, `src/providers/${function_name}.ts`. */
|
|
19
|
-
location: string;
|
|
20
|
-
/**
|
|
21
|
-
* List of scenario descriptions for test code generation.
|
|
22
|
-
*
|
|
23
|
-
* Each scenario describes the expected behavior of the function under
|
|
24
|
-
* certain conditions. Used as a basis for TDD-style automated test
|
|
25
|
-
* generation.
|
|
26
|
-
*/
|
|
27
|
-
testScenarios: string[];
|
|
28
|
-
/**
|
|
29
|
-
* Optional decorator event for customizing code generation behavior.
|
|
30
|
-
*
|
|
31
|
-
* Provides additional metadata or instructions that can modify how the
|
|
32
|
-
* function implementation is generated. Can include custom annotations,
|
|
33
|
-
* middleware configurations, or special handling directives that affect the
|
|
34
|
-
* final code output.
|
|
35
|
-
*/
|
|
36
|
-
decoratorEvent?: AutoBeRealizeAuthorization;
|
|
37
|
-
}
|
|
38
|
-
}
|
package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IAutoBeRealizeScenarioApplication.js","sourceRoot":"","sources":["../../../../../../src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.ts"],"names":[],"mappings":""}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformTestHistories = void 0;
|
|
4
|
-
const utils_1 = require("@autobe/utils");
|
|
5
|
-
const uuid_1 = require("uuid");
|
|
6
|
-
const transformTestHistories = (state) => {
|
|
7
|
-
if (state.analyze === null)
|
|
8
|
-
return [
|
|
9
|
-
{
|
|
10
|
-
id: (0, uuid_1.v7)(),
|
|
11
|
-
created_at: new Date().toISOString(),
|
|
12
|
-
type: "systemMessage",
|
|
13
|
-
text: utils_1.StringUtil.trim `
|
|
14
|
-
Requirement analysis is not yet completed.
|
|
15
|
-
Don't call the any tool function,
|
|
16
|
-
but say to process the requirement analysis.
|
|
17
|
-
`,
|
|
18
|
-
},
|
|
19
|
-
];
|
|
20
|
-
else if (state.prisma === null)
|
|
21
|
-
return [
|
|
22
|
-
{
|
|
23
|
-
id: (0, uuid_1.v7)(),
|
|
24
|
-
created_at: new Date().toISOString(),
|
|
25
|
-
type: "systemMessage",
|
|
26
|
-
text: utils_1.StringUtil.trim `
|
|
27
|
-
Prisma DB schema generation is not yet completed.
|
|
28
|
-
Don't call the any tool function,
|
|
29
|
-
but say to process the Prisma DB schema generation.
|
|
30
|
-
`,
|
|
31
|
-
},
|
|
32
|
-
];
|
|
33
|
-
else if (state.analyze.step !== state.prisma.step)
|
|
34
|
-
return [
|
|
35
|
-
{
|
|
36
|
-
id: (0, uuid_1.v7)(),
|
|
37
|
-
created_at: new Date().toISOString(),
|
|
38
|
-
type: "systemMessage",
|
|
39
|
-
text: utils_1.StringUtil.trim `
|
|
40
|
-
Prisma DB schema generation has not been updated
|
|
41
|
-
for the latest requirement analysis.
|
|
42
|
-
Don't call the any tool function,
|
|
43
|
-
but say to re-process the Prisma DB schema generation.
|
|
44
|
-
`,
|
|
45
|
-
},
|
|
46
|
-
];
|
|
47
|
-
else if (state.prisma.compiled.type !== "success")
|
|
48
|
-
return [
|
|
49
|
-
{
|
|
50
|
-
id: (0, uuid_1.v7)(),
|
|
51
|
-
created_at: new Date().toISOString(),
|
|
52
|
-
type: "systemMessage",
|
|
53
|
-
text: utils_1.StringUtil.trim `
|
|
54
|
-
Prisma DB schema generation has not been updated
|
|
55
|
-
for the latest requirement analysis.
|
|
56
|
-
Don't call the any tool function,
|
|
57
|
-
but say to re-process the Prisma DB schema generation.
|
|
58
|
-
`,
|
|
59
|
-
},
|
|
60
|
-
];
|
|
61
|
-
return [
|
|
62
|
-
{
|
|
63
|
-
id: (0, uuid_1.v7)(),
|
|
64
|
-
created_at: new Date().toISOString(),
|
|
65
|
-
type: "systemMessage",
|
|
66
|
-
text: utils_1.StringUtil.trim `
|
|
67
|
-
Interface generation is not yet completed.
|
|
68
|
-
Don't call the any tool function,
|
|
69
|
-
but say to process the interface generation.
|
|
70
|
-
`,
|
|
71
|
-
},
|
|
72
|
-
];
|
|
73
|
-
};
|
|
74
|
-
exports.transformTestHistories = transformTestHistories;
|
|
75
|
-
//# sourceMappingURL=transformTestHistories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transformTestHistories.js","sourceRoot":"","sources":["../../../../../../src/orchestrate/test/histories/transformTestHistories.ts"],"names":[],"mappings":";;;AACA,yCAA2C;AAC3C,+BAA0B;AAInB,MAAM,sBAAsB,GAAG,CACpC,KAAkB,EAGlB,EAAE;IACF,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI;QACxB,OAAO;YACL;gBACE,EAAE,EAAE,IAAA,SAAE,GAAE;gBACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACpC,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;;;SAIpB;aACF;SACF,CAAC;SACC,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI;QAC5B,OAAO;YACL;gBACE,EAAE,EAAE,IAAA,SAAE,GAAE;gBACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACpC,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;;;SAIpB;aACF;SACF,CAAC;SACC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,KAAK,CAAC,MAAM,CAAC,IAAI;QAC/C,OAAO;YACL;gBACE,EAAE,EAAE,IAAA,SAAE,GAAE;gBACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACpC,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;;;;SAKpB;aACF;SACF,CAAC;SACC,IAAI,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,KAAK,SAAS;QAC/C,OAAO;YACL;gBACE,EAAE,EAAE,IAAA,SAAE,GAAE;gBACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACpC,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;;;;SAKpB;aACF;SACF,CAAC;IACJ,OAAO;QACL;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;;;OAIpB;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAvEW,QAAA,sBAAsB,0BAuEjC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { AutoBeOpenApi, AutoBeRealizeAuthorization } from "@autobe/interface";
|
|
2
|
-
export declare namespace IAutoBeRealizeScenarioApplication {
|
|
3
|
-
interface IProps {
|
|
4
|
-
/** The OpenAPI operation to be realized. */
|
|
5
|
-
operation: AutoBeOpenApi.IOperation;
|
|
6
|
-
/**
|
|
7
|
-
* The name of the function to be generated.
|
|
8
|
-
*
|
|
9
|
-
* Derived from the Swagger path and method. The function name must be
|
|
10
|
-
* written in snake_case. It serves as the entry point in both code
|
|
11
|
-
* generation and test code.
|
|
12
|
-
*
|
|
13
|
-
* Once the function is generated, the function name and file name will be
|
|
14
|
-
* the same. The generated file will be located at
|
|
15
|
-
* `src/providers/${function_name}.ts`.
|
|
16
|
-
*/
|
|
17
|
-
functionName: string;
|
|
18
|
-
/** For example, `src/providers/${function_name}.ts`. */
|
|
19
|
-
location: string;
|
|
20
|
-
/**
|
|
21
|
-
* List of scenario descriptions for test code generation.
|
|
22
|
-
*
|
|
23
|
-
* Each scenario describes the expected behavior of the function under
|
|
24
|
-
* certain conditions. Used as a basis for TDD-style automated test
|
|
25
|
-
* generation.
|
|
26
|
-
*/
|
|
27
|
-
testScenarios: string[];
|
|
28
|
-
/**
|
|
29
|
-
* Optional decorator event for customizing code generation behavior.
|
|
30
|
-
*
|
|
31
|
-
* Provides additional metadata or instructions that can modify how the
|
|
32
|
-
* function implementation is generated. Can include custom annotations,
|
|
33
|
-
* middleware configurations, or special handling directives that affect the
|
|
34
|
-
* final code output.
|
|
35
|
-
*/
|
|
36
|
-
decoratorEvent?: AutoBeRealizeAuthorization;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
-
import { StringUtil } from "@autobe/utils";
|
|
3
|
-
import { v7 } from "uuid";
|
|
4
|
-
|
|
5
|
-
import { AutoBeState } from "../../../context/AutoBeState";
|
|
6
|
-
|
|
7
|
-
export const transformTestHistories = (
|
|
8
|
-
state: AutoBeState,
|
|
9
|
-
): Array<
|
|
10
|
-
IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage
|
|
11
|
-
> => {
|
|
12
|
-
if (state.analyze === null)
|
|
13
|
-
return [
|
|
14
|
-
{
|
|
15
|
-
id: v7(),
|
|
16
|
-
created_at: new Date().toISOString(),
|
|
17
|
-
type: "systemMessage",
|
|
18
|
-
text: StringUtil.trim`
|
|
19
|
-
Requirement analysis is not yet completed.
|
|
20
|
-
Don't call the any tool function,
|
|
21
|
-
but say to process the requirement analysis.
|
|
22
|
-
`,
|
|
23
|
-
},
|
|
24
|
-
];
|
|
25
|
-
else if (state.prisma === null)
|
|
26
|
-
return [
|
|
27
|
-
{
|
|
28
|
-
id: v7(),
|
|
29
|
-
created_at: new Date().toISOString(),
|
|
30
|
-
type: "systemMessage",
|
|
31
|
-
text: StringUtil.trim`
|
|
32
|
-
Prisma DB schema generation is not yet completed.
|
|
33
|
-
Don't call the any tool function,
|
|
34
|
-
but say to process the Prisma DB schema generation.
|
|
35
|
-
`,
|
|
36
|
-
},
|
|
37
|
-
];
|
|
38
|
-
else if (state.analyze.step !== state.prisma.step)
|
|
39
|
-
return [
|
|
40
|
-
{
|
|
41
|
-
id: v7(),
|
|
42
|
-
created_at: new Date().toISOString(),
|
|
43
|
-
type: "systemMessage",
|
|
44
|
-
text: StringUtil.trim`
|
|
45
|
-
Prisma DB schema generation has not been updated
|
|
46
|
-
for the latest requirement analysis.
|
|
47
|
-
Don't call the any tool function,
|
|
48
|
-
but say to re-process the Prisma DB schema generation.
|
|
49
|
-
`,
|
|
50
|
-
},
|
|
51
|
-
];
|
|
52
|
-
else if (state.prisma.compiled.type !== "success")
|
|
53
|
-
return [
|
|
54
|
-
{
|
|
55
|
-
id: v7(),
|
|
56
|
-
created_at: new Date().toISOString(),
|
|
57
|
-
type: "systemMessage",
|
|
58
|
-
text: StringUtil.trim`
|
|
59
|
-
Prisma DB schema generation has not been updated
|
|
60
|
-
for the latest requirement analysis.
|
|
61
|
-
Don't call the any tool function,
|
|
62
|
-
but say to re-process the Prisma DB schema generation.
|
|
63
|
-
`,
|
|
64
|
-
},
|
|
65
|
-
];
|
|
66
|
-
return [
|
|
67
|
-
{
|
|
68
|
-
id: v7(),
|
|
69
|
-
created_at: new Date().toISOString(),
|
|
70
|
-
type: "systemMessage",
|
|
71
|
-
text: StringUtil.trim`
|
|
72
|
-
Interface generation is not yet completed.
|
|
73
|
-
Don't call the any tool function,
|
|
74
|
-
but say to process the interface generation.
|
|
75
|
-
`,
|
|
76
|
-
},
|
|
77
|
-
];
|
|
78
|
-
};
|