@autobe/agent 0.24.2 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AutoBeAgent.js +11 -1
- package/lib/AutoBeAgent.js.map +1 -1
- package/lib/AutoBeMockAgent.js +1 -0
- package/lib/AutoBeMockAgent.js.map +1 -1
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +21 -21
- package/lib/context/IAutoBeApplication.d.ts +101 -6
- package/lib/context/IAutoBeApplicationProps.d.ts +6 -2
- package/lib/factory/createAgenticaHistory.js +1 -1
- package/lib/factory/createAgenticaHistory.js.map +1 -1
- package/lib/factory/createAutoBeApplication.js +80 -90
- package/lib/factory/createAutoBeApplication.js.map +1 -1
- package/lib/factory/createAutoBeContext.js +6 -5
- package/lib/factory/createAutoBeContext.js.map +1 -1
- package/lib/index.mjs +3914 -2594
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js +5 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +18 -3
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +5 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +19 -7
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyze.js +3 -2
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.d.ts +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +2 -2
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +1 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +2 -2
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.js +1 -1
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.js.map +1 -1
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +36 -23
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js.map +1 -1
- package/lib/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.d.ts +22 -42
- package/lib/orchestrate/facade/transformFacadeStateMessage.js +1 -1
- package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js +2 -1
- package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +5 -1
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +20 -7
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceCommonPrerequisiteHistories.d.ts +3 -0
- package/lib/orchestrate/interface/histories/{transformInterfacePrerequisiteHistories.js → transformInterfaceCommonPrerequisiteHistories.js} +4 -4
- package/lib/orchestrate/interface/histories/transformInterfaceCommonPrerequisiteHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.d.ts +6 -1
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +31 -23
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +6 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +22 -6
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.d.ts +4 -1
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +27 -6
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.d.ts +5 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +21 -5
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.d.ts +3 -0
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.js +102 -0
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.d.ts +5 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +20 -4
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +2 -2
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterface.js +45 -11
- package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js +277 -37
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.d.ts +4 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +69 -70
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +6 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +28 -13
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.d.ts +4 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js +11 -8
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.d.ts +5 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +36 -21
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js +260 -29
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.d.ts +5 -0
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js +713 -0
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.d.ts +5 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js +83 -53
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.js +41 -7
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +0 -38
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +6 -10
- package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisitesApplication.d.ts +52 -0
- package/lib/orchestrate/{common/structures/IAutoBeCommonCorrectDateApplication.js → interface/structures/IAutoBeInterfacePrerequisitesApplication.js} +1 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisitesApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +0 -33
- package/lib/orchestrate/interface/utils/JsonSchemaFactory.d.ts +6 -2
- package/lib/orchestrate/interface/utils/JsonSchemaFactory.js +105 -5
- package/lib/orchestrate/interface/utils/JsonSchemaFactory.js.map +1 -1
- package/lib/orchestrate/interface/utils/JsonSchemaValidator.js +20 -1
- package/lib/orchestrate/interface/utils/JsonSchemaValidator.js.map +1 -1
- package/lib/orchestrate/interface/utils/OperationValidator.d.ts +3 -4
- package/lib/orchestrate/interface/utils/OperationValidator.js +1 -1
- package/lib/orchestrate/interface/utils/OperationValidator.js.map +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.d.ts +4 -1
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +19 -8
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +6 -1
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +20 -6
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrisma.js +3 -3
- package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js +6 -3
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.d.ts +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js +12 -6
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
- package/lib/orchestrate/{common/histories/transformCommonCorrectDateHistories.d.ts → realize/histories/transformRealizeCorrectCastingHistories.d.ts} +1 -2
- package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.js +32 -0
- package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.js.map +1 -0
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js +14 -22
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +6 -6
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js +8 -2
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
- package/lib/orchestrate/realize/internal/compileRealizeFiles.js +1 -2
- package/lib/orchestrate/realize/internal/compileRealizeFiles.js.map +1 -1
- package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.d.ts +2 -1
- package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.js +119 -42
- package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealize.js +82 -52
- package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js +128 -88
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +2 -1
- package/lib/orchestrate/realize/orchestrateRealizeWrite.js +117 -54
- package/lib/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +52 -26
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +44 -34
- package/lib/orchestrate/realize/utils/InternalFileSystem.js +1 -1
- package/lib/orchestrate/realize/utils/InternalFileSystem.js.map +1 -1
- package/lib/orchestrate/realize/utils/generateRealizeScenario.js +1 -5
- package/lib/orchestrate/realize/utils/generateRealizeScenario.js.map +1 -1
- package/lib/orchestrate/realize/utils/getRealizeWriteCodeTemplate.d.ts +8 -3
- package/lib/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js +44 -17
- package/lib/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js.map +1 -1
- package/lib/orchestrate/realize/utils/getRealizeWriteImportStatements.d.ts +4 -1
- package/lib/orchestrate/realize/utils/getRealizeWriteImportStatements.js +24 -9
- package/lib/orchestrate/realize/utils/getRealizeWriteImportStatements.js.map +1 -1
- package/lib/orchestrate/realize/utils/printErrorHints.d.ts +8 -0
- package/lib/orchestrate/realize/utils/printErrorHints.js +48 -0
- package/lib/orchestrate/realize/utils/printErrorHints.js.map +1 -0
- package/lib/orchestrate/realize/utils/replaceImportStatements.d.ts +1 -0
- package/lib/orchestrate/realize/utils/replaceImportStatements.js +93 -53
- package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +5 -1
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.js +11 -7
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.js +1 -1
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.d.ts +7 -1
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.js +35 -96
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.d.ts +6 -3
- package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js +33 -77
- package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestWriteHistories.d.ts +5 -1
- package/lib/orchestrate/test/histories/transformTestWriteHistories.js +111 -94
- package/lib/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTest.js +20 -14
- package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +4 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.js +81 -50
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js +31 -13
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenario.d.ts +1 -1
- package/lib/orchestrate/test/orchestrateTestScenario.js +18 -7
- package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenarioReview.d.ts +5 -1
- package/lib/orchestrate/test/orchestrateTestScenarioReview.js +20 -12
- package/lib/orchestrate/test/orchestrateTestScenarioReview.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestWrite.d.ts +4 -1
- package/lib/orchestrate/test/orchestrateTestWrite.js +46 -25
- package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +9 -5
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectInvalidRequestApplication.d.ts +8 -2
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +11 -7
- package/lib/orchestrate/test/utils/getPrerequisites.d.ts +5 -0
- package/lib/orchestrate/test/utils/getPrerequisites.js +36 -0
- package/lib/orchestrate/test/utils/getPrerequisites.js.map +1 -0
- package/lib/orchestrate/test/utils/getReferenceIds.js +1 -1
- package/lib/orchestrate/test/utils/getReferenceIds.js.map +1 -1
- package/package.json +5 -5
- package/src/AutoBeAgent.ts +17 -1
- package/src/AutoBeMockAgent.ts +1 -0
- package/src/constants/AutoBeSystemPromptConstant.ts +21 -21
- package/src/context/IAutoBeApplication.ts +101 -6
- package/src/context/IAutoBeApplicationProps.ts +6 -2
- package/src/factory/createAgenticaHistory.ts +11 -5
- package/src/factory/createAutoBeContext.ts +6 -5
- package/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.ts +5 -1
- package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +16 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +22 -7
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +3 -2
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +2 -1
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +3 -2
- package/src/orchestrate/common/orchestrateCommonCorrectCasting.ts +2 -2
- package/src/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.ts +25 -45
- package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +2 -1
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +23 -9
- package/src/orchestrate/interface/histories/{transformInterfacePrerequisiteHistories.ts → transformInterfaceCommonPrerequisiteHistories.ts} +1 -1
- package/src/orchestrate/interface/histories/transformInterfaceComplementHistories.ts +33 -24
- package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +26 -9
- package/src/orchestrate/interface/histories/transformInterfaceGroupHistories.ts +30 -6
- package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +24 -7
- package/src/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.ts +118 -0
- package/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts +23 -6
- package/src/orchestrate/interface/orchestrateInterface.ts +65 -20
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +22 -12
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +34 -47
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +40 -28
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +9 -3
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +51 -35
- package/src/orchestrate/interface/orchestrateInterfacePrerequisites.ts +274 -0
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +52 -33
- package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +1 -1
- package/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.ts +0 -39
- package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +6 -10
- package/src/orchestrate/interface/structures/IAutoBeInterfacePrerequisitesApplication.ts +58 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +0 -34
- package/src/orchestrate/interface/utils/JsonSchemaFactory.ts +92 -4
- package/src/orchestrate/interface/utils/JsonSchemaValidator.ts +19 -1
- package/src/orchestrate/interface/utils/OperationValidator.ts +9 -7
- package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +20 -6
- package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +24 -9
- package/src/orchestrate/prisma/orchestratePrisma.ts +7 -3
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +5 -1
- package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +15 -10
- package/src/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.ts +44 -0
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +13 -24
- package/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.ts +6 -6
- package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +6 -4
- package/src/orchestrate/realize/internal/compileRealizeFiles.ts +1 -5
- package/src/orchestrate/realize/orchestRateRealizeCorrectCasting.ts +102 -16
- package/src/orchestrate/realize/orchestrateRealize.ts +121 -81
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +50 -7
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +14 -4
- package/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.ts +54 -29
- package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +46 -35
- package/src/orchestrate/realize/utils/InternalFileSystem.ts +1 -1
- package/src/orchestrate/realize/utils/generateRealizeScenario.ts +1 -5
- package/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.ts +54 -22
- package/src/orchestrate/realize/utils/getRealizeWriteImportStatements.ts +28 -16
- package/src/orchestrate/realize/utils/printErrorHints.ts +55 -0
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +99 -97
- package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +14 -7
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +50 -115
- package/src/orchestrate/test/histories/transformTestScenarioReviewHistories.ts +41 -111
- package/src/orchestrate/test/histories/transformTestWriteHistories.ts +35 -12
- package/src/orchestrate/test/orchestrateTest.ts +19 -13
- package/src/orchestrate/test/orchestrateTestCorrect.ts +71 -51
- package/src/orchestrate/test/orchestrateTestCorrectInvalidRequest.ts +13 -1
- package/src/orchestrate/test/orchestrateTestScenario.ts +27 -17
- package/src/orchestrate/test/orchestrateTestScenarioReview.ts +32 -19
- package/src/orchestrate/test/orchestrateTestWrite.ts +20 -10
- package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +9 -228
- package/src/orchestrate/test/structures/IAutoBeTestCorrectInvalidRequestApplication.ts +8 -2
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +11 -78
- package/src/orchestrate/test/utils/getPrerequisites.ts +51 -0
- package/src/orchestrate/test/utils/getReferenceIds.ts +2 -1
- package/lib/orchestrate/common/histories/transformCommonCorrectDateHistories.js +0 -48
- package/lib/orchestrate/common/histories/transformCommonCorrectDateHistories.js.map +0 -1
- package/lib/orchestrate/common/structures/IAutoBeCommonCorrectDateApplication.d.ts +0 -35
- package/lib/orchestrate/common/structures/IAutoBeCommonCorrectDateApplication.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.d.ts +0 -3
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js.map +0 -1
- package/lib/orchestrate/interface/utils/OpenApiEndpointComparator.d.ts +0 -6
- package/lib/orchestrate/interface/utils/OpenApiEndpointComparator.js +0 -22
- package/lib/orchestrate/interface/utils/OpenApiEndpointComparator.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizeCorrectDate.d.ts +0 -4
- package/lib/orchestrate/realize/orchestrateRealizeCorrectDate.js +0 -540
- package/lib/orchestrate/realize/orchestrateRealizeCorrectDate.js.map +0 -1
- package/src/orchestrate/common/histories/transformCommonCorrectDateHistories.ts +0 -60
- package/src/orchestrate/common/structures/IAutoBeCommonCorrectDateApplication.ts +0 -40
- package/src/orchestrate/interface/utils/OpenApiEndpointComparator.ts +0 -23
- package/src/orchestrate/realize/orchestrateRealizeCorrectDate.ts +0 -372
|
@@ -19,8 +19,10 @@ const orchestrateInterfaceComplement_1 = require("./orchestrateInterfaceCompleme
|
|
|
19
19
|
const orchestrateInterfaceEndpoints_1 = require("./orchestrateInterfaceEndpoints");
|
|
20
20
|
const orchestrateInterfaceGroups_1 = require("./orchestrateInterfaceGroups");
|
|
21
21
|
const orchestrateInterfaceOperations_1 = require("./orchestrateInterfaceOperations");
|
|
22
|
+
const orchestrateInterfacePrerequisites_1 = require("./orchestrateInterfacePrerequisites");
|
|
22
23
|
const orchestrateInterfaceSchemas_1 = require("./orchestrateInterfaceSchemas");
|
|
23
24
|
const orchestrateInterfaceSchemasReview_1 = require("./orchestrateInterfaceSchemasReview");
|
|
25
|
+
const JsonSchemaFactory_1 = require("./utils/JsonSchemaFactory");
|
|
24
26
|
const orchestrateInterface = (ctx) => (props) => __awaiter(void 0, void 0, void 0, function* () {
|
|
25
27
|
var _a, _b, _c, _d, _e, _f;
|
|
26
28
|
// PREDICATION
|
|
@@ -38,24 +40,33 @@ const orchestrateInterface = (ctx) => (props) => __awaiter(void 0, void 0, void
|
|
|
38
40
|
type: "interfaceStart",
|
|
39
41
|
id: (0, uuid_1.v7)(),
|
|
40
42
|
created_at: start.toISOString(),
|
|
41
|
-
reason: props.
|
|
43
|
+
reason: props.instruction,
|
|
42
44
|
step: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
|
|
43
45
|
});
|
|
44
46
|
// ENDPOINTS
|
|
45
|
-
const init = yield (0, orchestrateInterfaceGroups_1.orchestrateInterfaceGroups)(ctx
|
|
47
|
+
const init = yield (0, orchestrateInterfaceGroups_1.orchestrateInterfaceGroups)(ctx, {
|
|
48
|
+
instruction: props.instruction,
|
|
49
|
+
});
|
|
46
50
|
ctx.dispatch(init);
|
|
47
51
|
// AUTHORIZATION
|
|
48
|
-
const authorizations = yield (0, orchestrateInterfaceAuthorizations_1.orchestrateInterfaceAuthorizations)(ctx);
|
|
52
|
+
const authorizations = yield (0, orchestrateInterfaceAuthorizations_1.orchestrateInterfaceAuthorizations)(ctx, props.instruction);
|
|
49
53
|
const authOperations = authorizations
|
|
50
54
|
.map((authorization) => authorization.operations)
|
|
51
55
|
.flat();
|
|
52
56
|
// ENDPOINTS & OPERATIONS
|
|
53
|
-
const endpoints = yield (0, orchestrateInterfaceEndpoints_1.orchestrateInterfaceEndpoints)(ctx,
|
|
54
|
-
|
|
57
|
+
const endpoints = yield (0, orchestrateInterfaceEndpoints_1.orchestrateInterfaceEndpoints)(ctx, {
|
|
58
|
+
groups: init.groups,
|
|
59
|
+
authorizations: authOperations,
|
|
60
|
+
instruction: props.instruction,
|
|
61
|
+
});
|
|
62
|
+
const firstOperations = yield (0, orchestrateInterfaceOperations_1.orchestrateInterfaceOperations)(ctx, {
|
|
63
|
+
endpoints,
|
|
64
|
+
instruction: props.instruction,
|
|
65
|
+
});
|
|
55
66
|
const operations = new tstl_1.HashMap([...authOperations, ...firstOperations].map((o) => new tstl_1.Pair({
|
|
56
67
|
path: o.path,
|
|
57
68
|
method: o.method,
|
|
58
|
-
}, o)), utils_1.
|
|
69
|
+
}, o)), utils_1.AutoBeOpenApiEndpointComparator.hashCode, utils_1.AutoBeOpenApiEndpointComparator.equals)
|
|
59
70
|
.toJSON()
|
|
60
71
|
.map((it) => it.second);
|
|
61
72
|
// TYPE SCHEMAS
|
|
@@ -63,18 +74,41 @@ const orchestrateInterface = (ctx) => (props) => __awaiter(void 0, void 0, void
|
|
|
63
74
|
operations,
|
|
64
75
|
components: {
|
|
65
76
|
authorization: (_d = (_c = ctx.state().analyze) === null || _c === void 0 ? void 0 : _c.roles) !== null && _d !== void 0 ? _d : [],
|
|
66
|
-
schemas: yield (0, orchestrateInterfaceSchemas_1.orchestrateInterfaceSchemas)(ctx,
|
|
77
|
+
schemas: yield (0, orchestrateInterfaceSchemas_1.orchestrateInterfaceSchemas)(ctx, {
|
|
78
|
+
instruction: props.instruction,
|
|
79
|
+
operations,
|
|
80
|
+
}),
|
|
67
81
|
},
|
|
68
82
|
};
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
83
|
+
const complement = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
84
|
+
return Object.assign(document.components.schemas, yield (0, orchestrateInterfaceComplement_1.orchestrateInterfaceComplement)(ctx, {
|
|
85
|
+
instruction: props.instruction,
|
|
86
|
+
document,
|
|
87
|
+
}));
|
|
88
|
+
});
|
|
89
|
+
yield complement();
|
|
90
|
+
Object.assign(document.components.schemas, yield (0, orchestrateInterfaceSchemasReview_1.orchestrateInterfaceSchemasReview)(ctx, operations, document.components.schemas));
|
|
91
|
+
if ((0, utils_1.missedOpenApiSchemas)(document).length !== 0)
|
|
92
|
+
yield complement();
|
|
93
|
+
JsonSchemaFactory_1.JsonSchemaFactory.finalize({
|
|
94
|
+
document,
|
|
95
|
+
application: ctx.state().prisma.result.data,
|
|
96
|
+
});
|
|
97
|
+
// CONNECT PRE-REQUISITES
|
|
98
|
+
const prerequisites = yield (0, orchestrateInterfacePrerequisites_1.orchestrateInterfacePrerequisites)(ctx, document);
|
|
99
|
+
document.operations.forEach((op) => {
|
|
100
|
+
var _a, _b;
|
|
101
|
+
op.prerequisites =
|
|
102
|
+
(_b = (_a = prerequisites.find((p) => p.endpoint.method === op.method && p.endpoint.path === op.path)) === null || _a === void 0 ? void 0 : _a.prerequisites) !== null && _b !== void 0 ? _b : [];
|
|
103
|
+
});
|
|
104
|
+
// NORMALIZE ACCESSORS
|
|
105
|
+
(0, utils_1.revertOpenApiAccessor)(document);
|
|
73
106
|
// DO COMPILE
|
|
74
107
|
return ctx.dispatch({
|
|
75
108
|
type: "interfaceComplete",
|
|
76
109
|
id: (0, uuid_1.v7)(),
|
|
77
110
|
document,
|
|
111
|
+
missed: (0, utils_1.missedOpenApiSchemas)(document),
|
|
78
112
|
authorizations,
|
|
79
113
|
created_at: new Date().toISOString(),
|
|
80
114
|
elapsed: new Date().getTime() - start.getTime(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateInterface.js","sourceRoot":"","sources":["../../../src/orchestrate/interface/orchestrateInterface.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"orchestrateInterface.js","sourceRoot":"","sources":["../../../src/orchestrate/interface/orchestrateInterface.ts"],"names":[],"mappings":";;;;;;;;;;;;AASA,yCAIuB;AAEvB,+BAAqC;AACrC,+BAA0B;AAI1B,6EAA0E;AAC1E,6FAA0F;AAC1F,qFAAkF;AAClF,mFAAgF;AAChF,6EAA0E;AAC1E,qFAAkF;AAClF,2FAAwF;AACxF,+EAA4E;AAC5E,2FAAwF;AACxF,iEAA8D;AAEvD,MAAM,oBAAoB,GAC/B,CAAiC,GAAyB,EAAE,EAAE,CAC9D,CACE,KAA8B,EACmC,EAAE;;IACnE,cAAc;IACd,MAAM,KAAK,GAAS,IAAI,IAAI,EAAE,CAAC;IAC/B,MAAM,SAAS,GAAkB,IAAA,6CAAqB,EACpD,GAAG,CAAC,KAAK,EAAE,EACX,WAAW,CACZ,CAAC;IACF,IAAI,SAAS,KAAK,IAAI;QACpB,OAAO,GAAG,CAAC,gBAAgB,CAAC;YAC1B,IAAI,EAAE,kBAAkB;YACxB,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,KAAK,CAAC,WAAW,EAAE;YAC/B,IAAI,EAAE,SAAS;YACf,YAAY,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACvC,CAAC,CAAC;IACL,GAAG,CAAC,QAAQ,CAAC;QACX,IAA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U,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE;;QACjC,EAAE,CAAC,aAAa;YACd,MAAA,MAAA,aAAa,CAAC,IAAI,CAChB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,KAAK,EAAE,CAAC,MAAM,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC,IAAI,CACtE,0CAAE,aAAa,mCAAI,EAAE,CAAC;IAC3B,CAAC,CAAC,CAAC;IAEH,sBAAsB;IACtB,IAAA,6BAAqB,EAAC,QAAQ,CAAC,CAAC;IAEhC,aAAa;IACb,OAAO,GAAG,CAAC,QAAQ,CAAC;QAClB,IAAI,EAAE,mBAAmB;QACzB,EAAE,EAAE,IAAA,SAAE,GAAE;QACR,QAAQ;QACR,MAAM,EAAE,IAAA,4BAAoB,EAAC,QAAQ,CAAC;QACtC,cAAc;QACd,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACpC,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,OAAO,EAAE;QAC/C,IAAI,EAAE,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,0CAAE,IAAI,mCAAI,CAAC;KACE,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAxIS,QAAA,oBAAoB,wBAwI7B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AutoBeInterfaceAuthorization } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
|
-
export declare function orchestrateInterfaceAuthorizations<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model
|
|
4
|
+
export declare function orchestrateInterfaceAuthorizations<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, instruction: string): Promise<AutoBeInterfaceAuthorization[]>;
|