@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
|
@@ -25,6 +25,8 @@ export interface IAutoBeAnalyzeReviewApplication {
|
|
|
25
25
|
export declare namespace IAutoBeAnalyzeReviewApplication {
|
|
26
26
|
interface IProps {
|
|
27
27
|
/**
|
|
28
|
+
* Step 1 (CoT: Review Phase) - Enhancement Criteria
|
|
29
|
+
*
|
|
28
30
|
* The enhancement criteria and guidelines that the agent must follow.
|
|
29
31
|
*
|
|
30
32
|
* This includes:
|
|
@@ -50,6 +52,8 @@ export declare namespace IAutoBeAnalyzeReviewApplication {
|
|
|
50
52
|
*/
|
|
51
53
|
review: string;
|
|
52
54
|
/**
|
|
55
|
+
* Step 2 (CoT: Plan Phase) - Original Document Plan
|
|
56
|
+
*
|
|
53
57
|
* The document plan that was used to create the content.
|
|
54
58
|
*
|
|
55
59
|
* This helps the reviewer understand:
|
|
@@ -64,6 +68,8 @@ export declare namespace IAutoBeAnalyzeReviewApplication {
|
|
|
64
68
|
*/
|
|
65
69
|
plan: string;
|
|
66
70
|
/**
|
|
71
|
+
* Step 3 (CoT: Content Phase) - Complete Document Content
|
|
72
|
+
*
|
|
67
73
|
* The actual markdown document content that incorporates review feedback.
|
|
68
74
|
*
|
|
69
75
|
* This field contains a COMPLETE MARKDOWN DOCUMENT that has already
|
|
@@ -15,6 +15,8 @@ export interface IAutoBeAnalyzeWriteApplication {
|
|
|
15
15
|
export declare namespace IAutoBeAnalyzeWriteApplication {
|
|
16
16
|
interface IProps {
|
|
17
17
|
/**
|
|
18
|
+
* Step 1 (CoT: Plan Phase) - Document Planning Structure
|
|
19
|
+
*
|
|
18
20
|
* The document planning structure that outlines what needs to be written.
|
|
19
21
|
*
|
|
20
22
|
* This includes:
|
|
@@ -39,6 +41,8 @@ export declare namespace IAutoBeAnalyzeWriteApplication {
|
|
|
39
41
|
*/
|
|
40
42
|
plan: string;
|
|
41
43
|
/**
|
|
44
|
+
* Step 2 (CoT: Write Phase) - Document Content Creation
|
|
45
|
+
*
|
|
42
46
|
* The initial content or context for the document being written.
|
|
43
47
|
*
|
|
44
48
|
* This may include:
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
+
import { AutoBeOpenApi } from "@autobe/interface";
|
|
3
|
+
import { AutoBeState } from "../../../context/AutoBeState";
|
|
4
|
+
export declare const transformInterfaceEndpointsReviewHistories: (state: AutoBeState, endpoints: AutoBeOpenApi.IEndpoint[]) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
2
|
import { AutoBeOpenApi } from "@autobe/interface";
|
|
3
3
|
import { AutoBeState } from "../../../context/AutoBeState";
|
|
4
|
-
export declare const transformInterfaceSchemasReviewHistories: (state: AutoBeState, operations: AutoBeOpenApi.IOperation[], schemaDescriptive: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive
|
|
4
|
+
export declare const transformInterfaceSchemasReviewHistories: (state: AutoBeState, operations: AutoBeOpenApi.IOperation[], schemaDescriptive: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AutoBeOpenApi } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
|
-
export declare function orchestrateInterfaceComplement<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, document: AutoBeOpenApi.IDocument
|
|
4
|
+
export declare function orchestrateInterfaceComplement<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, document: AutoBeOpenApi.IDocument): Promise<Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IAgenticaController } from "@agentica/core";
|
|
2
|
+
import { AutoBeOpenApi } from "@autobe/interface";
|
|
3
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
4
|
+
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
5
|
+
import { IAutoBeInterfaceEndpointsReviewApplication } from "./structures/IAutoBeInterfaceEndpointsReviewApplication";
|
|
6
|
+
export declare function orchestrateInterfaceEndpointsReview<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, endpoints: AutoBeOpenApi.IEndpoint[], message?: string): Promise<AutoBeOpenApi.IEndpoint[]>;
|
|
7
|
+
export declare function createController<Model extends ILlmSchema.Model>(props: {
|
|
8
|
+
model: Model;
|
|
9
|
+
build: (props: IAutoBeInterfaceEndpointsReviewApplication.IProps) => void;
|
|
10
|
+
}): IAgenticaController.IClass<Model>;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { AutoBeOpenApi, AutoBeProgressEventBase } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
|
-
export declare function orchestrateInterfaceSchemasReview<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, operations: AutoBeOpenApi.IOperation[], schemas: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive
|
|
4
|
+
export declare function orchestrateInterfaceSchemasReview<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, operations: AutoBeOpenApi.IOperation[], schemas: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>): Promise<Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>>;
|
|
5
|
+
export declare function step<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, operations: AutoBeOpenApi.IOperation[], schemas: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>, progress: AutoBeProgressEventBase, promptCacheKey: string): Promise<Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>>;
|
|
6
|
+
export interface IProgress {
|
|
7
|
+
total: number;
|
|
8
|
+
completed: number;
|
|
9
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { AutoBeOpenApi } from "@autobe/interface";
|
|
2
|
+
/**
|
|
3
|
+
* Interface for reviewing and refining API endpoints through holistic analysis.
|
|
4
|
+
*
|
|
5
|
+
* This application performs comprehensive review of all endpoints generated
|
|
6
|
+
* through divide-and-conquer strategy, ensuring consistency, eliminating
|
|
7
|
+
* redundancy, and preventing over-engineering across the entire API surface.
|
|
8
|
+
*/
|
|
9
|
+
export interface IAutoBeInterfaceEndpointsReviewApplication {
|
|
10
|
+
/**
|
|
11
|
+
* Reviews and refines the complete collection of API endpoints.
|
|
12
|
+
*
|
|
13
|
+
* This method consolidates all endpoints generated independently by different
|
|
14
|
+
* groups and performs holistic review to:
|
|
15
|
+
* - Ensure naming consistency across all endpoints
|
|
16
|
+
* - Remove duplicate or overlapping endpoints
|
|
17
|
+
* - Eliminate over-engineered solutions
|
|
18
|
+
* - Standardize path structures and HTTP methods
|
|
19
|
+
* - Verify REST API design principles
|
|
20
|
+
*
|
|
21
|
+
* The review process examines the entire API as a cohesive system rather
|
|
22
|
+
* than individual endpoints, ensuring the final API is intuitive, maintainable,
|
|
23
|
+
* and follows best practices.
|
|
24
|
+
*
|
|
25
|
+
* @param next - The review results and refined endpoint collection
|
|
26
|
+
*/
|
|
27
|
+
reviewEndpoints(next: IAutoBeInterfaceEndpointsReviewApplication.IProps): void;
|
|
28
|
+
}
|
|
29
|
+
export declare namespace IAutoBeInterfaceEndpointsReviewApplication {
|
|
30
|
+
interface IProps {
|
|
31
|
+
/**
|
|
32
|
+
* Comprehensive review analysis of all collected endpoints.
|
|
33
|
+
*
|
|
34
|
+
* Contains detailed findings from the holistic review including:
|
|
35
|
+
* - Identified inconsistencies in naming conventions
|
|
36
|
+
* - Duplicate endpoints that serve the same purpose
|
|
37
|
+
* - Over-engineered solutions that add unnecessary complexity
|
|
38
|
+
* - Violations of REST API design principles
|
|
39
|
+
* - Recommendations for improvement and standardization
|
|
40
|
+
*
|
|
41
|
+
* The review provides actionable feedback for creating a clean,
|
|
42
|
+
* consistent, and maintainable API structure.
|
|
43
|
+
*/
|
|
44
|
+
review: string;
|
|
45
|
+
/**
|
|
46
|
+
* Refined collection of API endpoints after review and cleanup.
|
|
47
|
+
*
|
|
48
|
+
* The final optimized set of endpoints after:
|
|
49
|
+
* - Removing duplicates and redundant endpoints
|
|
50
|
+
* - Standardizing naming conventions across all paths
|
|
51
|
+
* - Simplifying over-engineered solutions
|
|
52
|
+
* - Ensuring consistent REST patterns
|
|
53
|
+
* - Aligning HTTP methods with their semantic meanings
|
|
54
|
+
*
|
|
55
|
+
* This collection represents the production-ready API structure
|
|
56
|
+
* that balances functionality with simplicity and maintainability.
|
|
57
|
+
*/
|
|
58
|
+
endpoints: AutoBeOpenApi.IEndpoint[];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -85,44 +85,6 @@ export declare namespace IAutoBeInterfaceOperationApplication {
|
|
|
85
85
|
* ```
|
|
86
86
|
*/
|
|
87
87
|
interface IOperation extends Omit<AutoBeOpenApi.IOperation, "authorizationRole" | "authorizationType"> {
|
|
88
|
-
/**
|
|
89
|
-
* Prisma schema models relevant to this operation.
|
|
90
|
-
*
|
|
91
|
-
* Contains the complete Prisma schema definitions for all entities involved
|
|
92
|
-
* in this operation, including their fields, relations, and database
|
|
93
|
-
* constraints. This enables comprehensive validation and schema-aware
|
|
94
|
-
* operation design.
|
|
95
|
-
*
|
|
96
|
-
* The schema information serves multiple critical purposes:
|
|
97
|
-
*
|
|
98
|
-
* - **Field Verification**: Ensures all referenced fields actually exist in
|
|
99
|
-
* the database schema and have the correct types
|
|
100
|
-
* - **Relationship Validation**: Confirms that entity relationships are
|
|
101
|
-
* properly defined and can support the operation's data access patterns
|
|
102
|
-
* - **Soft-Delete Detection**: For DELETE operations, identifies whether
|
|
103
|
-
* entities have soft-delete fields (deleted_at, is_deleted, etc.) to
|
|
104
|
-
* determine if the operation should perform logical deletion instead of
|
|
105
|
-
* physical removal
|
|
106
|
-
* - **Constraint Awareness**: Understands unique constraints, required
|
|
107
|
-
* fields, and default values to generate accurate request/response
|
|
108
|
-
* schemas
|
|
109
|
-
*
|
|
110
|
-
* Example content might include:
|
|
111
|
-
*
|
|
112
|
-
* ```prisma
|
|
113
|
-
* model User {
|
|
114
|
-
* id String @id @default(uuid())
|
|
115
|
-
* email String @unique
|
|
116
|
-
* name String
|
|
117
|
-
* deleted_at DateTime? // Indicates soft-delete capability
|
|
118
|
-
* posts Post[]
|
|
119
|
-
* }
|
|
120
|
-
* ```
|
|
121
|
-
*
|
|
122
|
-
* This schema context ensures operations are fully aligned with the actual
|
|
123
|
-
* database structure and business logic requirements.
|
|
124
|
-
*/
|
|
125
|
-
prisma_schemas: string;
|
|
126
88
|
/**
|
|
127
89
|
* Authorization roles required to access this API operation.
|
|
128
90
|
*
|
package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts
CHANGED
|
@@ -4,19 +4,21 @@ import { AutoBeOpenApi } from "@autobe/interface";
|
|
|
4
4
|
*
|
|
5
5
|
* Provides functionality to systematically review generated API operations
|
|
6
6
|
* against business requirements, technical specifications, and OpenAPI
|
|
7
|
-
* standards. The review process
|
|
8
|
-
*
|
|
7
|
+
* standards. The review process outputs a structured thinking process with
|
|
8
|
+
* analytical findings and actionable improvements, along with the final
|
|
9
|
+
* enhanced operations ready for implementation.
|
|
9
10
|
*/
|
|
10
11
|
export interface IAutoBeInterfaceOperationsReviewApplication {
|
|
11
12
|
/**
|
|
12
13
|
* Reviews a batch of API operations for quality and correctness.
|
|
13
14
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* Analyzes operations for security vulnerabilities, schema compliance,
|
|
16
|
+
* logical consistency, and standard adherence. Outputs a structured thinking
|
|
17
|
+
* process containing review findings and improvement plans, plus the final
|
|
18
|
+
* production-ready operations with all critical issues resolved.
|
|
17
19
|
*
|
|
18
|
-
* @param input
|
|
19
|
-
*
|
|
20
|
+
* @param input Properties containing the thinking process (review & plan)
|
|
21
|
+
* and the enhanced operations content
|
|
20
22
|
*/
|
|
21
23
|
reviewOperations(input: IAutoBeInterfaceOperationsReviewApplication.IProps): void;
|
|
22
24
|
}
|
|
@@ -29,6 +31,45 @@ export declare namespace IAutoBeInterfaceOperationsReviewApplication {
|
|
|
29
31
|
* of the AutoBeInterfaceOperationsReviewEvent.
|
|
30
32
|
*/
|
|
31
33
|
interface IProps {
|
|
34
|
+
/**
|
|
35
|
+
* Comprehensive thinking process for API operation review.
|
|
36
|
+
*
|
|
37
|
+
* Encapsulates the agent's analytical review findings and actionable
|
|
38
|
+
* improvement plan. This structured thinking process ensures systematic
|
|
39
|
+
* evaluation of API operations against AutoBE's quality standards before
|
|
40
|
+
* generating the final enhanced operations.
|
|
41
|
+
*/
|
|
42
|
+
think: IThink;
|
|
43
|
+
/**
|
|
44
|
+
* Production-ready operations with all critical issues resolved.
|
|
45
|
+
*
|
|
46
|
+
* Final API operations after systematic enhancement:
|
|
47
|
+
*
|
|
48
|
+
* - **Security Fixes Applied**: All authentication boundaries enforced,
|
|
49
|
+
* sensitive data removed from responses, proper authorization
|
|
50
|
+
* implemented
|
|
51
|
+
* - **Logic Corrections Made**: Return types match operation intent, HTTP
|
|
52
|
+
* methods align with semantics, parameters properly utilized
|
|
53
|
+
* - **Schema Alignment Verified**: All fields exist in Prisma schema, types
|
|
54
|
+
* correctly mapped, relationships properly defined
|
|
55
|
+
* - **Quality Improvements Added**: Enhanced documentation, format
|
|
56
|
+
* specifications, validation rules, consistent naming patterns
|
|
57
|
+
*
|
|
58
|
+
* If no issues were found during review, this contains the exact original
|
|
59
|
+
* operations unchanged. These operations are validated and ready for schema
|
|
60
|
+
* generation and subsequent implementation phases.
|
|
61
|
+
*/
|
|
62
|
+
content: AutoBeOpenApi.IOperation[];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Structured thinking process for comprehensive API operation review.
|
|
66
|
+
*
|
|
67
|
+
* Combines analytical review findings with actionable improvement planning
|
|
68
|
+
* to guide the systematic enhancement of API operations. This thinking
|
|
69
|
+
* structure ensures all aspects of API quality are evaluated and addressed
|
|
70
|
+
* before producing the final operations.
|
|
71
|
+
*/
|
|
72
|
+
interface IThink {
|
|
32
73
|
/**
|
|
33
74
|
* Comprehensive review analysis with prioritized findings.
|
|
34
75
|
*
|
|
@@ -72,99 +113,5 @@ export declare namespace IAutoBeInterfaceOperationsReviewApplication {
|
|
|
72
113
|
* needed, and the rationale for the modification.
|
|
73
114
|
*/
|
|
74
115
|
plan: string;
|
|
75
|
-
/**
|
|
76
|
-
* Production-ready operations with all critical issues resolved.
|
|
77
|
-
*
|
|
78
|
-
* Final API operations after systematic enhancement:
|
|
79
|
-
*
|
|
80
|
-
* - **Security Fixes Applied**: All authentication boundaries enforced,
|
|
81
|
-
* sensitive data removed from responses, proper authorization
|
|
82
|
-
* implemented
|
|
83
|
-
* - **Logic Corrections Made**: Return types match operation intent, HTTP
|
|
84
|
-
* methods align with semantics, parameters properly utilized
|
|
85
|
-
* - **Schema Alignment Verified**: All fields exist in Prisma schema, types
|
|
86
|
-
* correctly mapped, relationships properly defined
|
|
87
|
-
* - **Quality Improvements Added**: Enhanced documentation, format
|
|
88
|
-
* specifications, validation rules, consistent naming patterns
|
|
89
|
-
*
|
|
90
|
-
* If no issues were found during review, this contains the exact original
|
|
91
|
-
* operations unchanged. These operations are validated and ready for schema
|
|
92
|
-
* generation and subsequent implementation phases.
|
|
93
|
-
*/
|
|
94
|
-
content: IOperation[];
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Operation of the Restful API.
|
|
98
|
-
*
|
|
99
|
-
* This interface defines a single API endpoint with its HTTP {@link method},
|
|
100
|
-
* {@link path}, {@link parameters path parameters},
|
|
101
|
-
* {@link requestBody request body}, and {@link responseBody} structure. It
|
|
102
|
-
* corresponds to an individual operation in the paths section of an OpenAPI
|
|
103
|
-
* document.
|
|
104
|
-
*
|
|
105
|
-
* Each operation requires a detailed explanation of its purpose through the
|
|
106
|
-
* reason and description fields, making it clear why the API was designed and
|
|
107
|
-
* how it should be used.
|
|
108
|
-
*
|
|
109
|
-
* All request bodies and responses for this operation must be object types
|
|
110
|
-
* and must reference named types defined in the components section. The
|
|
111
|
-
* content-type is always `application/json`. For file upload/download
|
|
112
|
-
* operations, use `string & tags.Format<"uri">` in the appropriate schema
|
|
113
|
-
* instead of binary data formats.
|
|
114
|
-
*
|
|
115
|
-
* In OpenAPI, this might represent:
|
|
116
|
-
*
|
|
117
|
-
* ```json
|
|
118
|
-
* {
|
|
119
|
-
* "/shoppings/customers/orders": {
|
|
120
|
-
* "post": {
|
|
121
|
-
* "description": "Create a new order application from shopping cart...",
|
|
122
|
-
* "parameters": [...],
|
|
123
|
-
* "requestBody": {...},
|
|
124
|
-
* "responses": {...}
|
|
125
|
-
* }
|
|
126
|
-
* }
|
|
127
|
-
* }
|
|
128
|
-
* ```
|
|
129
|
-
*/
|
|
130
|
-
interface IOperation extends Omit<AutoBeOpenApi.IOperation, "authorizationType"> {
|
|
131
|
-
/**
|
|
132
|
-
* Prisma schema models relevant to this operation.
|
|
133
|
-
*
|
|
134
|
-
* Contains the complete Prisma schema definitions for all entities involved
|
|
135
|
-
* in this operation, including their fields, relations, and database
|
|
136
|
-
* constraints. This enables comprehensive validation and schema-aware
|
|
137
|
-
* operation design.
|
|
138
|
-
*
|
|
139
|
-
* The schema information serves multiple critical purposes:
|
|
140
|
-
*
|
|
141
|
-
* - **Field Verification**: Ensures all referenced fields actually exist in
|
|
142
|
-
* the database schema and have the correct types
|
|
143
|
-
* - **Relationship Validation**: Confirms that entity relationships are
|
|
144
|
-
* properly defined and can support the operation's data access patterns
|
|
145
|
-
* - **Soft-Delete Detection**: For DELETE operations, identifies whether
|
|
146
|
-
* entities have soft-delete fields (deleted_at, is_deleted, etc.) to
|
|
147
|
-
* determine if the operation should perform logical deletion instead of
|
|
148
|
-
* physical removal
|
|
149
|
-
* - **Constraint Awareness**: Understands unique constraints, required
|
|
150
|
-
* fields, and default values to generate accurate request/response
|
|
151
|
-
* schemas
|
|
152
|
-
*
|
|
153
|
-
* Example content might include:
|
|
154
|
-
*
|
|
155
|
-
* ```prisma
|
|
156
|
-
* model User {
|
|
157
|
-
* id String @id @default(uuid())
|
|
158
|
-
* email String @unique
|
|
159
|
-
* name String
|
|
160
|
-
* deleted_at DateTime? // Indicates soft-delete capability
|
|
161
|
-
* posts Post[]
|
|
162
|
-
* }
|
|
163
|
-
* ```
|
|
164
|
-
*
|
|
165
|
-
* This schema context ensures operations are fully aligned with the actual
|
|
166
|
-
* database structure and business logic requirements.
|
|
167
|
-
*/
|
|
168
|
-
prisma_schemas: string;
|
|
169
116
|
}
|
|
170
117
|
}
|
|
@@ -27,15 +27,42 @@ export declare namespace IAutoBeInterfaceSchemasReviewApplication {
|
|
|
27
27
|
* interface to understand what outputs are required.
|
|
28
28
|
*/
|
|
29
29
|
interface IProps {
|
|
30
|
+
think: IThink;
|
|
31
|
+
/**
|
|
32
|
+
* Final validated and enhanced schemas ready for production use.
|
|
33
|
+
*
|
|
34
|
+
* DO:
|
|
35
|
+
*
|
|
36
|
+
* - Include valid OpenAPI schema definitions
|
|
37
|
+
* - Include all entities that were in the original input
|
|
38
|
+
* - Provide fixed versions if original schemas have issues
|
|
39
|
+
* - Rename entities correctly if names are wrong
|
|
40
|
+
* - Include created variants if schemas are missing them
|
|
41
|
+
*
|
|
42
|
+
* DO NOT:
|
|
43
|
+
*
|
|
44
|
+
* - Return an empty object {} (this will delete all schemas)
|
|
45
|
+
* - Return undefined or null
|
|
46
|
+
* - Include explanations or excuses in schema descriptions
|
|
47
|
+
* - Leave broken schemas unfixed
|
|
48
|
+
*
|
|
49
|
+
* When original schemas are beyond repair, recreate them properly based on
|
|
50
|
+
* entity names and context. This field becomes the final schemas used by
|
|
51
|
+
* the system, so it must always contain complete, valid schemas.
|
|
52
|
+
*/
|
|
53
|
+
content: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>;
|
|
54
|
+
}
|
|
55
|
+
interface IThink {
|
|
30
56
|
/**
|
|
31
57
|
* Issues and problems found during schema analysis.
|
|
32
58
|
*
|
|
33
|
-
* DO: Document only problems that need fixing.
|
|
34
|
-
*
|
|
59
|
+
* DO: Document only problems that need fixing. DO NOT: Include positive
|
|
60
|
+
* feedback, compliments, or confirmations
|
|
35
61
|
*
|
|
36
62
|
* Focus exclusively on issues organized by severity:
|
|
37
63
|
*
|
|
38
64
|
* Severity levels:
|
|
65
|
+
*
|
|
39
66
|
* - Security vulnerabilities (exposed passwords, missing auth boundaries)
|
|
40
67
|
* - Missing required variants, incorrect type mappings
|
|
41
68
|
* - Missing format specifications, incomplete relationships
|
|
@@ -60,26 +87,5 @@ export declare namespace IAutoBeInterfaceSchemasReviewApplication {
|
|
|
60
87
|
* field.
|
|
61
88
|
*/
|
|
62
89
|
plan: string;
|
|
63
|
-
/**
|
|
64
|
-
* Final validated and enhanced schemas ready for production use.
|
|
65
|
-
*
|
|
66
|
-
* DO:
|
|
67
|
-
* - Include valid OpenAPI schema definitions
|
|
68
|
-
* - Include all entities that were in the original input
|
|
69
|
-
* - Provide fixed versions if original schemas have issues
|
|
70
|
-
* - Rename entities correctly if names are wrong
|
|
71
|
-
* - Include created variants if schemas are missing them
|
|
72
|
-
*
|
|
73
|
-
* DO NOT:
|
|
74
|
-
* - Return an empty object {} (this will delete all schemas)
|
|
75
|
-
* - Return undefined or null
|
|
76
|
-
* - Include explanations or excuses in schema descriptions
|
|
77
|
-
* - Leave broken schemas unfixed
|
|
78
|
-
*
|
|
79
|
-
* When original schemas are beyond repair, recreate them properly based on
|
|
80
|
-
* entity names and context. This field becomes the final schemas used by
|
|
81
|
-
* the system, so it must always contain complete, valid schemas.
|
|
82
|
-
*/
|
|
83
|
-
content: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>;
|
|
84
90
|
}
|
|
85
91
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AutoBeOpenApi } from "@autobe/interface";
|
|
2
|
+
export declare namespace JsonSchemaFactory {
|
|
3
|
+
const presets: (typeNames: Set<string>) => Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>;
|
|
4
|
+
const authorize: (schemas: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>) => void;
|
|
5
|
+
const page: (key: string) => AutoBeOpenApi.IJsonSchemaDescriptive.IObject;
|
|
6
|
+
const fix: (path: string, input: unknown) => void;
|
|
7
|
+
const isPage: (key: string) => boolean;
|
|
8
|
+
const getPageName: (key: string) => string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AutoBeOpenApi } from "@autobe/interface";
|
|
2
|
+
export declare namespace JsonSchemaNamingConvention {
|
|
3
|
+
const operations: (operations: AutoBeOpenApi.IOperation[]) => void;
|
|
4
|
+
const schemas: (operations: AutoBeOpenApi.IOperation[], ...componentSchemas: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>[]) => void;
|
|
5
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AutoBePrisma, IAutoBePrismaValidation } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
|
-
export declare function orchestratePrismaCorrect<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, application: AutoBePrisma.IApplication
|
|
4
|
+
export declare function orchestratePrismaCorrect<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, application: AutoBePrisma.IApplication): Promise<IAutoBePrismaValidation>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
-
import { AutoBeRealizeAuthorization
|
|
2
|
+
import { AutoBeRealizeAuthorization } from "@autobe/interface";
|
|
3
3
|
import { AutoBeState } from "../../../context/AutoBeState";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { IAutoBeRealizeFunctionFailure } from "../structures/IAutoBeRealizeFunctionFailure";
|
|
5
|
+
import { IAutoBeRealizeScenarioResult } from "../structures/IAutoBeRealizeScenarioResult";
|
|
6
6
|
export declare function transformRealizeCorrectHistories(props: {
|
|
7
7
|
state: AutoBeState;
|
|
8
|
-
scenario:
|
|
9
|
-
artifacts: IAutoBeTestScenarioArtifacts;
|
|
8
|
+
scenario: IAutoBeRealizeScenarioResult;
|
|
10
9
|
authorization: AutoBeRealizeAuthorization | null;
|
|
11
10
|
totalAuthorizations: AutoBeRealizeAuthorization[];
|
|
12
11
|
code: string;
|
|
13
|
-
|
|
12
|
+
dto: Record<string, string>;
|
|
13
|
+
failures: IAutoBeRealizeFunctionFailure[];
|
|
14
14
|
}): Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
2
|
import { AutoBeRealizeAuthorization } from "@autobe/interface";
|
|
3
3
|
import { AutoBeState } from "../../../context/AutoBeState";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
export declare const transformRealizeWriteHistories: (props: IProps) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
|
|
7
|
-
interface IProps {
|
|
4
|
+
import { IAutoBeRealizeScenarioResult } from "../structures/IAutoBeRealizeScenarioResult";
|
|
5
|
+
export declare const transformRealizeWriteHistories: (props: {
|
|
8
6
|
state: AutoBeState;
|
|
9
|
-
scenario:
|
|
10
|
-
artifacts: IAutoBeTestScenarioArtifacts;
|
|
7
|
+
scenario: IAutoBeRealizeScenarioResult;
|
|
11
8
|
authorization: AutoBeRealizeAuthorization | null;
|
|
12
9
|
totalAuthorizations: AutoBeRealizeAuthorization[];
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
dto: Record<string, string>;
|
|
11
|
+
}) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AutoBeRealizeAuthorization, AutoBeRealizeFunction,
|
|
1
|
+
import { AutoBeRealizeAuthorization, AutoBeRealizeFunction, AutoBeRealizeValidateEvent } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
4
4
|
export declare function compileRealizeFiles<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
|
|
5
5
|
authorizations: AutoBeRealizeAuthorization[];
|
|
6
6
|
functions: AutoBeRealizeFunction[];
|
|
7
|
-
}): Promise<
|
|
7
|
+
}): Promise<AutoBeRealizeValidateEvent>;
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
import { AutoBeProgressEventBase, AutoBeRealizeAuthorization, AutoBeRealizeCorrectEvent,
|
|
1
|
+
import { AutoBeProgressEventBase, AutoBeRealizeAuthorization, AutoBeRealizeCorrectEvent, AutoBeRealizeFunction, AutoBeRealizeValidateEvent } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { IAutoBeRealizeFunctionFailure } from "./structures/IAutoBeRealizeFunctionFailure";
|
|
5
|
+
import { IAutoBeRealizeScenarioResult } from "./structures/IAutoBeRealizeScenarioResult";
|
|
6
|
+
export declare function orchestrateRealizeCorrect<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, scenarios: IAutoBeRealizeScenarioResult[], authorizations: AutoBeRealizeAuthorization[], functions: AutoBeRealizeFunction[], failures: IAutoBeRealizeFunctionFailure[], progress: IProgress, life?: number): Promise<AutoBeRealizeValidateEvent>;
|
|
7
|
+
export declare function correct<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
|
|
6
8
|
authorization: AutoBeRealizeAuthorization | null;
|
|
7
9
|
totalAuthorizations: AutoBeRealizeAuthorization[];
|
|
8
|
-
scenario:
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
scenario: IAutoBeRealizeScenarioResult;
|
|
11
|
+
function: AutoBeRealizeFunction;
|
|
12
|
+
failures: IAutoBeRealizeFunctionFailure[];
|
|
11
13
|
progress: AutoBeProgressEventBase;
|
|
12
14
|
}): Promise<AutoBeRealizeCorrectEvent>;
|
|
15
|
+
interface IProgress {
|
|
16
|
+
total: number;
|
|
17
|
+
completed: number;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AutoBeOpenApi, AutoBeRealizeAuthorization } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
|
-
import {
|
|
4
|
+
import { IAutoBeRealizeScenarioResult } from "./structures/IAutoBeRealizeScenarioResult";
|
|
5
5
|
/**
|
|
6
6
|
* Generates a planning result that defines what kind of function should be
|
|
7
7
|
* created, based solely on the provided Swagger (OpenAPI) operation — without
|
|
@@ -22,4 +22,4 @@ import { IAutoBeRealizeScenarioApplication } from "./structures/IAutoBeRealizeSc
|
|
|
22
22
|
* @returns A planning object containing all structural information needed to
|
|
23
23
|
* generate the function
|
|
24
24
|
*/
|
|
25
|
-
export declare const orchestrateRealizeScenario: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, operation: AutoBeOpenApi.IOperation, authorization?: AutoBeRealizeAuthorization) =>
|
|
25
|
+
export declare const orchestrateRealizeScenario: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, operation: AutoBeOpenApi.IOperation, authorization?: AutoBeRealizeAuthorization) => IAutoBeRealizeScenarioResult;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AutoBeProgressEventBase, AutoBeRealizeAuthorization, AutoBeRealizeWriteEvent } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
|
-
import {
|
|
4
|
+
import { IAutoBeRealizeScenarioResult } from "./structures/IAutoBeRealizeScenarioResult";
|
|
5
5
|
export declare function orchestrateRealizeWrite<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
|
|
6
6
|
totalAuthorizations: AutoBeRealizeAuthorization[];
|
|
7
7
|
authorization: AutoBeRealizeAuthorization | null;
|
|
8
|
-
scenario:
|
|
8
|
+
scenario: IAutoBeRealizeScenarioResult;
|
|
9
9
|
progress: AutoBeProgressEventBase;
|
|
10
10
|
promptCacheKey: string;
|
|
11
11
|
}): Promise<AutoBeRealizeWriteEvent>;
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
import { CamelPattern, PascalPattern } from "@autobe/interface";
|
|
2
2
|
export interface IAutoBeRealizeAuthorizationApplication {
|
|
3
|
+
/**
|
|
4
|
+
* Generates authentication provider, decorator, and payload type for role-based authorization.
|
|
5
|
+
*
|
|
6
|
+
* This method creates a complete authentication infrastructure for a specific
|
|
7
|
+
* role in the NestJS application. It generates three interconnected components
|
|
8
|
+
* that work together to provide JWT-based authentication and authorization.
|
|
9
|
+
*
|
|
10
|
+
* The generated components include:
|
|
11
|
+
* - **Provider Function**: Handles JWT verification and user validation from database
|
|
12
|
+
* - **Decorator**: NestJS parameter decorator for injecting authenticated user data
|
|
13
|
+
* - **Payload Type**: TypeScript interface defining the authenticated user structure
|
|
14
|
+
*
|
|
15
|
+
* All components follow strict naming conventions and integrate with the existing
|
|
16
|
+
* authentication architecture using the shared jwtAuthorize function.
|
|
17
|
+
*
|
|
18
|
+
* @param next Properties containing provider, decorator, and payload type configurations
|
|
19
|
+
*/
|
|
3
20
|
createDecorator: (next: IAutoBeRealizeAuthorizationApplication.IProps) => void;
|
|
4
21
|
}
|
|
5
22
|
export declare namespace IAutoBeRealizeAuthorizationApplication {
|
package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
import { IAutoBeRealizeAuthorizationApplication } from "./IAutoBeRealizeAuthorizationApplication";
|
|
2
2
|
export interface IAutoBeRealizeAuthorizationCorrectApplication {
|
|
3
|
+
/**
|
|
4
|
+
* Corrects TypeScript compilation errors in authentication components.
|
|
5
|
+
*
|
|
6
|
+
* This method analyzes and fixes compilation errors in previously generated
|
|
7
|
+
* authentication provider, decorator, and payload type implementations. It
|
|
8
|
+
* performs systematic error diagnosis and generates corrected versions of
|
|
9
|
+
* all three components while maintaining their interconnected functionality.
|
|
10
|
+
*
|
|
11
|
+
* The correction process includes:
|
|
12
|
+
* - TypeScript error analysis and categorization by component
|
|
13
|
+
* - Identification of type mismatches, import issues, and syntax errors
|
|
14
|
+
* - Clear solution guidance for each identified problem
|
|
15
|
+
* - Regeneration of all components with fixes applied
|
|
16
|
+
*
|
|
17
|
+
* The corrected components maintain the same naming conventions and
|
|
18
|
+
* architectural patterns as the original generation while resolving all
|
|
19
|
+
* compilation issues.
|
|
20
|
+
*
|
|
21
|
+
* @param next Properties containing error analysis, solution guidance, and corrected components
|
|
22
|
+
*/
|
|
3
23
|
correctDecorator: (next: IAutoBeRealizeAuthorizationCorrectApplication.IProps) => void;
|
|
4
24
|
}
|
|
5
25
|
export declare namespace IAutoBeRealizeAuthorizationCorrectApplication {
|