@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateInterfaceAuthorizations.js","sourceRoot":"","sources":["../../../src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,
|
|
1
|
+
{"version":3,"file":"orchestrateInterfaceAuthorizations.js","sourceRoot":"","sources":["../../../src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,gFA6BC;;;AAzCD,yCAA2C;AAG3C,kDAA0B;AAC1B,+BAA0B;AAG1B,uEAAoE;AACpE,uEAAoE;AACpE,qHAAkH;AAGlH,SAAsB,kCAAkC,CAGtD,GAAyB,EACzB,WAAmB;;;QAEnB,MAAM,KAAK,GAAwB,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,0CAAE,KAAK,mCAAI,EAAE,CAAC;QACpE,MAAM,QAAQ,GAA4B;YACxC,KAAK,EAAE,KAAK,CAAC,MAAM;YACnB,SAAS,EAAE,CAAC;SACb,CAAC;QACF,MAAM,cAAc,GAClB,MAAM,IAAA,uCAAkB,EACtB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAO,cAAc,EAAE,EAAE;YAC3C,MAAM,KAAK,GAAsC,MAAM,OAAO,CAAC,GAAG,EAAE;gBAClE,IAAI;gBACJ,QAAQ;gBACR,cAAc;gBACd,WAAW;aAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uHAC6C;YACzE,QAAQ,EAAE;gBACR,cAAc,EAAE,QAAQ;aACzB;SACF;;QAAC;CACL,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
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>,
|
|
4
|
+
export declare function orchestrateInterfaceComplement<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
|
|
5
|
+
instruction: string;
|
|
6
|
+
document: AutoBeOpenApi.IDocument;
|
|
7
|
+
}): Promise<Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>>;
|
|
@@ -49,7 +49,7 @@ exports.orchestrateInterfaceComplement = orchestrateInterfaceComplement;
|
|
|
49
49
|
const __typia_transform__accessExpressionAsString = __importStar(require("typia/lib/internal/_accessExpressionAsString.js"));
|
|
50
50
|
const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
|
|
51
51
|
const __typia_transform__llmApplicationFinalize = __importStar(require("typia/lib/internal/_llmApplicationFinalize.js"));
|
|
52
|
-
const
|
|
52
|
+
const utils_1 = require("@autobe/utils");
|
|
53
53
|
const OpenApiV3_1Emender_1 = require("@samchon/openapi/lib/converters/OpenApiV3_1Emender");
|
|
54
54
|
const typia_1 = __importDefault(require("typia"));
|
|
55
55
|
const uuid_1 = require("uuid");
|
|
@@ -59,22 +59,26 @@ const JsonSchemaFactory_1 = require("./utils/JsonSchemaFactory");
|
|
|
59
59
|
const JsonSchemaNamingConvention_1 = require("./utils/JsonSchemaNamingConvention");
|
|
60
60
|
const JsonSchemaValidator_1 = require("./utils/JsonSchemaValidator");
|
|
61
61
|
const fulfillJsonSchemaErrorMessages_1 = require("./utils/fulfillJsonSchemaErrorMessages");
|
|
62
|
-
function orchestrateInterfaceComplement(ctx,
|
|
63
|
-
return step(ctx,
|
|
62
|
+
function orchestrateInterfaceComplement(ctx, props) {
|
|
63
|
+
return step(ctx, props, false);
|
|
64
64
|
}
|
|
65
|
-
function step(ctx,
|
|
65
|
+
function step(ctx, props, wasEmpty) {
|
|
66
66
|
return __awaiter(this, void 0, void 0, function* () {
|
|
67
67
|
var _a, _b;
|
|
68
|
-
const missed =
|
|
69
|
-
if (missed.length === 0
|
|
70
|
-
return document.components.schemas;
|
|
71
|
-
}
|
|
68
|
+
const missed = (0, utils_1.missedOpenApiSchemas)(props.document);
|
|
69
|
+
if (missed.length === 0)
|
|
70
|
+
return props.document.components.schemas;
|
|
72
71
|
const pointer = {
|
|
73
72
|
value: null,
|
|
74
73
|
};
|
|
75
74
|
const { tokenUsage } = yield ctx.conversate({
|
|
76
75
|
source: "interfaceComplement",
|
|
77
|
-
histories: (0, transformInterfaceComplementHistories_1.transformInterfaceComplementHistories)(
|
|
76
|
+
histories: (0, transformInterfaceComplementHistories_1.transformInterfaceComplementHistories)({
|
|
77
|
+
state: ctx.state(),
|
|
78
|
+
instruction: props.instruction,
|
|
79
|
+
document: props.document,
|
|
80
|
+
missed,
|
|
81
|
+
}),
|
|
78
82
|
controller: createController({
|
|
79
83
|
model: ctx.model,
|
|
80
84
|
build: (next) => {
|
|
@@ -100,39 +104,22 @@ function step(ctx, document, life) {
|
|
|
100
104
|
step: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
|
|
101
105
|
created_at: new Date().toISOString(),
|
|
102
106
|
});
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
107
|
+
const empty = Object.keys(pointer.value).length === 0;
|
|
108
|
+
if (empty === true && wasEmpty === true)
|
|
109
|
+
return props.document.components.schemas;
|
|
110
|
+
const newSchemas = Object.assign(Object.assign({}, pointer.value), props.document.components.schemas);
|
|
111
|
+
JsonSchemaNamingConvention_1.JsonSchemaNamingConvention.schemas(props.document.operations, newSchemas);
|
|
112
|
+
return step(ctx, {
|
|
113
|
+
instruction: props.instruction,
|
|
114
|
+
document: Object.assign(Object.assign({}, props.document), { components: Object.assign(Object.assign({}, props.document.components), { schemas: newSchemas }) }),
|
|
115
|
+
}, empty);
|
|
106
116
|
});
|
|
107
117
|
}
|
|
108
|
-
const getMissed = (document) => {
|
|
109
|
-
const missed = new Set();
|
|
110
|
-
const check = (name) => {
|
|
111
|
-
if (document.components.schemas[name] === undefined)
|
|
112
|
-
missed.add(name);
|
|
113
|
-
};
|
|
114
|
-
for (const op of document.operations) {
|
|
115
|
-
if (op.requestBody !== null)
|
|
116
|
-
check(op.requestBody.typeName);
|
|
117
|
-
if (op.responseBody !== null)
|
|
118
|
-
check(op.responseBody.typeName);
|
|
119
|
-
}
|
|
120
|
-
for (const value of Object.values(document.components.schemas))
|
|
121
|
-
openapi_1.OpenApiTypeChecker.visit({
|
|
122
|
-
components: document.components,
|
|
123
|
-
schema: value,
|
|
124
|
-
closure: (next) => {
|
|
125
|
-
if (openapi_1.OpenApiTypeChecker.isReference(next))
|
|
126
|
-
check(next.$ref.split("/").pop());
|
|
127
|
-
},
|
|
128
|
-
});
|
|
129
|
-
return Array.from(missed);
|
|
130
|
-
};
|
|
131
118
|
function createController(props) {
|
|
132
119
|
(0, assertSchemaModel_1.assertSchemaModel)(props.model);
|
|
133
120
|
const validate = (next) => {
|
|
134
|
-
JsonSchemaFactory_1.JsonSchemaFactory.
|
|
135
|
-
const result = (() => { const _io0 = input => "
|
|
121
|
+
JsonSchemaFactory_1.JsonSchemaFactory.fixPage("schemas", next);
|
|
122
|
+
const result = (() => { const _io0 = input => "object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && _io1(input.schemas); const _io1 = input => Object.keys(input).every(key => {
|
|
136
123
|
const value = input[key];
|
|
137
124
|
if (undefined === value)
|
|
138
125
|
return true;
|
|
@@ -142,7 +129,7 @@ function createController(props) {
|
|
|
142
129
|
if (undefined === value)
|
|
143
130
|
return true;
|
|
144
131
|
return "string" === typeof value;
|
|
145
|
-
}); const _io20 = input => "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && _io1(input.properties) && (null !== input.additionalProperties && (undefined === input.additionalProperties || false === input.additionalProperties || "object" === typeof input.additionalProperties && null !== input.additionalProperties && _iu2(input.additionalProperties))) && (Array.isArray(input.required) && input.required.every(elem => "string" === typeof elem)) && "object" === input.type && "string" === typeof input.description; const _io21 = input => "string" === typeof input.$ref && "string" === typeof input.description; const _io22 = input => Array.isArray(input.oneOf) && input.oneOf.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)) && (undefined === input.discriminator || "object" === typeof input.discriminator && null !== input.discriminator && _io18(input.discriminator)) && "string" === typeof input.description; const _io23 = input => "null" === input.type && "string" === typeof input.description; const _iu0 = input => (() => {
|
|
132
|
+
}); const _io20 = input => (null === input["x-autobe-prisma-schema"] || undefined === input["x-autobe-prisma-schema"] || "string" === typeof input["x-autobe-prisma-schema"]) && ("object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && _io1(input.properties)) && (null !== input.additionalProperties && (undefined === input.additionalProperties || false === input.additionalProperties || "object" === typeof input.additionalProperties && null !== input.additionalProperties && _iu2(input.additionalProperties))) && (Array.isArray(input.required) && input.required.every(elem => "string" === typeof elem)) && "object" === input.type && "string" === typeof input.description; const _io21 = input => "string" === typeof input.$ref && "string" === typeof input.description; const _io22 = input => Array.isArray(input.oneOf) && input.oneOf.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)) && (undefined === input.discriminator || "object" === typeof input.discriminator && null !== input.discriminator && _io18(input.discriminator)) && "string" === typeof input.description; const _io23 = input => "null" === input.type && "string" === typeof input.description; const _iu0 = input => (() => {
|
|
146
133
|
if ("number" === input.type)
|
|
147
134
|
return _io9(input);
|
|
148
135
|
else if ("integer" === input.type)
|
|
@@ -209,11 +196,7 @@ function createController(props) {
|
|
|
209
196
|
return _io16(input);
|
|
210
197
|
else
|
|
211
198
|
return false;
|
|
212
|
-
})(); const _vo0 = (input, _path, _exceptionable = true) => ["
|
|
213
|
-
path: _path + ".draft",
|
|
214
|
-
expected: "string",
|
|
215
|
-
value: input.draft
|
|
216
|
-
}), ("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) || _report(_exceptionable, {
|
|
199
|
+
})(); const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) || _report(_exceptionable, {
|
|
217
200
|
path: _path + ".schemas",
|
|
218
201
|
expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>",
|
|
219
202
|
value: input.schemas
|
|
@@ -627,7 +610,11 @@ function createController(props) {
|
|
|
627
610
|
expected: "string",
|
|
628
611
|
value: value
|
|
629
612
|
});
|
|
630
|
-
}).every(flag => flag)].every(flag => flag); const _vo20 = (input, _path, _exceptionable = true) => [
|
|
613
|
+
}).every(flag => flag)].every(flag => flag); const _vo20 = (input, _path, _exceptionable = true) => [null === input["x-autobe-prisma-schema"] || undefined === input["x-autobe-prisma-schema"] || "string" === typeof input["x-autobe-prisma-schema"] || _report(_exceptionable, {
|
|
614
|
+
path: _path + "[\"x-autobe-prisma-schema\"]",
|
|
615
|
+
expected: "(null | string | undefined)",
|
|
616
|
+
value: input["x-autobe-prisma-schema"]
|
|
617
|
+
}), ("object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) || _report(_exceptionable, {
|
|
631
618
|
path: _path + ".properties",
|
|
632
619
|
expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>",
|
|
633
620
|
value: input.properties
|
|
@@ -864,16 +851,11 @@ const collection = {
|
|
|
864
851
|
description: "Current Type: {@link IAutoBeInterfaceComplementApplication.IProps}\n\n### Description of {@link schemas} property:\n\n> A collection of missing schema definitions that need to be added to the\n> OpenAPI document's `components.schemas` section.\n> \n> This object contains schema definitions for types that are referenced but\n> not yet defined:\n> \n> - Key: Schema name (`string`): The name of the schema type that will be\n> referenced in $ref statements\n> - Value: `AutoBeOpenApi.IJsonSchema` - The complete JSON Schema definition\n> for that type\n> \n> Example structure:\n> \n> ```typescript\n> {\n> \"UserProfile\": {\n> \"type\": \"object\",\n> \"properties\": {\n> \"id\": { \"type\": \"string\" },\n> \"name\": { \"type\": \"string\" },\n> \"email\": { \"type\": \"string\", \"format\": \"email\" }\n> },\n> \"required\": [\"id\", \"name\", \"email\"]\n> }\n> }\n> ```\n> \n> Each schema definition follows the JSON Schema specification and will be\n> directly inserted into the OpenAPI document's components.schemas section,\n> making them available for $ref references throughout the API\n> specification.",
|
|
865
852
|
type: "object",
|
|
866
853
|
properties: {
|
|
867
|
-
draft: {
|
|
868
|
-
description: "TypeScript draft code for complement schema definitions.\n\nThis property contains TypeScript interface definitions for missing schema\ntypes that were referenced but not defined in the initial schema generation.\nSimilar to the main schema draft, this serves as a preliminary TypeScript\nrepresentation before converting to JSON Schema format.\n\nThe draft helps ensure that complementary schemas maintain consistency with\nthe existing type system and follow the same conventions as the primary schemas.\n\nThis draft typically includes:\n- Missing entity interfaces referenced via $ref\n- Nested object types used within other schemas\n- Shared utility types or enumerations\n- Any transitively referenced types\n\nThe final schemas in the `schemas` property should be validated against and\nderived from this TypeScript draft to ensure type safety and consistency\nacross the entire API specification.\n\nExample complement draft:\n```typescript\ninterface IUserProfile {\n id: string;\n userId: string;\n displayName: string;\n avatarUrl?: string;\n}\n\ninterface IAddress {\n street: string;\n city: string;\n postalCode: string;\n}\n```",
|
|
869
|
-
type: "string"
|
|
870
|
-
},
|
|
871
854
|
schemas: {
|
|
872
855
|
$ref: "#/$defs/RecordstringAutoBeOpenApi.IJsonSchemaDescriptive"
|
|
873
856
|
}
|
|
874
857
|
},
|
|
875
858
|
required: [
|
|
876
|
-
"draft",
|
|
877
859
|
"schemas"
|
|
878
860
|
],
|
|
879
861
|
additionalProperties: false,
|
|
@@ -1519,6 +1501,17 @@ const collection = {
|
|
|
1519
1501
|
description: "Object type info.\n\n### Description of {@link properties} property:\n\n> Properties of the object.\n> \n> The `properties` means a list of key-value pairs of the object's\n> regular properties. The key is the name of the regular property, and\n> the value is the type schema info.\n> \n> IMPORTANT: Each property in this object MUST have a detailed\n> description that references and aligns with the description comments\n> from the corresponding Prisma DB schema column.\n> \n> If you need additional properties that is represented by dynamic key,\n> you can use the {@link additionalProperties} instead.",
|
|
1520
1502
|
type: "object",
|
|
1521
1503
|
properties: {
|
|
1504
|
+
"x-autobe-prisma-schema": {
|
|
1505
|
+
description: "Related Prisma schema.\n\nIf the type is directly related to a specific Prisma schema model,\ninclude the exact model name here to establish a clear link between the\nOpenAPI schema and the Prisma model.\n\nThis field is optional and should only be included when there is a\ndirect correspondence to a Prisma model. If there's not any Prisma\nmodel association, this field can be omitted.",
|
|
1506
|
+
anyOf: [
|
|
1507
|
+
{
|
|
1508
|
+
type: "null"
|
|
1509
|
+
},
|
|
1510
|
+
{
|
|
1511
|
+
type: "string"
|
|
1512
|
+
}
|
|
1513
|
+
]
|
|
1514
|
+
},
|
|
1522
1515
|
properties: {
|
|
1523
1516
|
$ref: "#/$defs/RecordstringAutoBeOpenApi.IJsonSchemaDescriptive"
|
|
1524
1517
|
},
|
|
@@ -1683,7 +1676,7 @@ const collection = {
|
|
|
1683
1676
|
}
|
|
1684
1677
|
},
|
|
1685
1678
|
description: "Complements missing schema types\n\nThis method fills in schema definitions that are referenced via $ref but\nnot yet defined in the `components.schemas` section. For example, if an API\noperation references `{ \"$ref\": \"#/components/schemas/UserProfile\" }` but\n`UserProfile` type is not defined in `components.schemas`, this method will\nadd the missing schema definition.\n\nThis function is designed to be called via AI function calling mechanism to\nensure the OpenAPI document is complete and all referenced schemas are\nproperly defined.",
|
|
1686
|
-
validate: (() => { const _io0 = input => "
|
|
1679
|
+
validate: (() => { const _io0 = input => "object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && _io1(input.schemas); const _io1 = input => Object.keys(input).every(key => {
|
|
1687
1680
|
const value = input[key];
|
|
1688
1681
|
if (undefined === value)
|
|
1689
1682
|
return true;
|
|
@@ -1693,7 +1686,7 @@ const collection = {
|
|
|
1693
1686
|
if (undefined === value)
|
|
1694
1687
|
return true;
|
|
1695
1688
|
return "string" === typeof value;
|
|
1696
|
-
}); const _io20 = input => "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && _io1(input.properties) && (null !== input.additionalProperties && (undefined === input.additionalProperties || false === input.additionalProperties || "object" === typeof input.additionalProperties && null !== input.additionalProperties && _iu2(input.additionalProperties))) && (Array.isArray(input.required) && input.required.every(elem => "string" === typeof elem)) && "object" === input.type && "string" === typeof input.description; const _io21 = input => "string" === typeof input.$ref && "string" === typeof input.description; const _io22 = input => Array.isArray(input.oneOf) && input.oneOf.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)) && (undefined === input.discriminator || "object" === typeof input.discriminator && null !== input.discriminator && _io18(input.discriminator)) && "string" === typeof input.description; const _io23 = input => "null" === input.type && "string" === typeof input.description; const _iu0 = input => (() => {
|
|
1689
|
+
}); const _io20 = input => (null === input["x-autobe-prisma-schema"] || undefined === input["x-autobe-prisma-schema"] || "string" === typeof input["x-autobe-prisma-schema"]) && ("object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && _io1(input.properties)) && (null !== input.additionalProperties && (undefined === input.additionalProperties || false === input.additionalProperties || "object" === typeof input.additionalProperties && null !== input.additionalProperties && _iu2(input.additionalProperties))) && (Array.isArray(input.required) && input.required.every(elem => "string" === typeof elem)) && "object" === input.type && "string" === typeof input.description; const _io21 = input => "string" === typeof input.$ref && "string" === typeof input.description; const _io22 = input => Array.isArray(input.oneOf) && input.oneOf.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)) && (undefined === input.discriminator || "object" === typeof input.discriminator && null !== input.discriminator && _io18(input.discriminator)) && "string" === typeof input.description; const _io23 = input => "null" === input.type && "string" === typeof input.description; const _iu0 = input => (() => {
|
|
1697
1690
|
if ("number" === input.type)
|
|
1698
1691
|
return _io9(input);
|
|
1699
1692
|
else if ("integer" === input.type)
|
|
@@ -1760,11 +1753,7 @@ const collection = {
|
|
|
1760
1753
|
return _io16(input);
|
|
1761
1754
|
else
|
|
1762
1755
|
return false;
|
|
1763
|
-
})(); const _vo0 = (input, _path, _exceptionable = true) => ["
|
|
1764
|
-
path: _path + ".draft",
|
|
1765
|
-
expected: "string",
|
|
1766
|
-
value: input.draft
|
|
1767
|
-
}), ("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) || _report(_exceptionable, {
|
|
1756
|
+
})(); const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) || _report(_exceptionable, {
|
|
1768
1757
|
path: _path + ".schemas",
|
|
1769
1758
|
expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>",
|
|
1770
1759
|
value: input.schemas
|
|
@@ -2178,7 +2167,11 @@ const collection = {
|
|
|
2178
2167
|
expected: "string",
|
|
2179
2168
|
value: value
|
|
2180
2169
|
});
|
|
2181
|
-
}).every(flag => flag)].every(flag => flag); const _vo20 = (input, _path, _exceptionable = true) => [
|
|
2170
|
+
}).every(flag => flag)].every(flag => flag); const _vo20 = (input, _path, _exceptionable = true) => [null === input["x-autobe-prisma-schema"] || undefined === input["x-autobe-prisma-schema"] || "string" === typeof input["x-autobe-prisma-schema"] || _report(_exceptionable, {
|
|
2171
|
+
path: _path + "[\"x-autobe-prisma-schema\"]",
|
|
2172
|
+
expected: "(null | string | undefined)",
|
|
2173
|
+
value: input["x-autobe-prisma-schema"]
|
|
2174
|
+
}), ("object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) || _report(_exceptionable, {
|
|
2182
2175
|
path: _path + ".properties",
|
|
2183
2176
|
expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>",
|
|
2184
2177
|
value: input.properties
|
|
@@ -2393,17 +2386,12 @@ const collection = {
|
|
|
2393
2386
|
description: "Current Type: {@link IAutoBeInterfaceComplementApplication.IProps}",
|
|
2394
2387
|
type: "object",
|
|
2395
2388
|
properties: {
|
|
2396
|
-
draft: {
|
|
2397
|
-
description: "TypeScript draft code for complement schema definitions.\n\nThis property contains TypeScript interface definitions for missing schema\ntypes that were referenced but not defined in the initial schema generation.\nSimilar to the main schema draft, this serves as a preliminary TypeScript\nrepresentation before converting to JSON Schema format.\n\nThe draft helps ensure that complementary schemas maintain consistency with\nthe existing type system and follow the same conventions as the primary schemas.\n\nThis draft typically includes:\n- Missing entity interfaces referenced via $ref\n- Nested object types used within other schemas\n- Shared utility types or enumerations\n- Any transitively referenced types\n\nThe final schemas in the `schemas` property should be validated against and\nderived from this TypeScript draft to ensure type safety and consistency\nacross the entire API specification.\n\nExample complement draft:\n```typescript\ninterface IUserProfile {\n id: string;\n userId: string;\n displayName: string;\n avatarUrl?: string;\n}\n\ninterface IAddress {\n street: string;\n city: string;\n postalCode: string;\n}\n```",
|
|
2398
|
-
type: "string"
|
|
2399
|
-
},
|
|
2400
2389
|
schemas: {
|
|
2401
2390
|
description: "A collection of missing schema definitions that need to be added to the\nOpenAPI document's `components.schemas` section.\n\nThis object contains schema definitions for types that are referenced but\nnot yet defined:\n\n- Key: Schema name (`string`): The name of the schema type that will be\n referenced in $ref statements\n- Value: `AutoBeOpenApi.IJsonSchema` - The complete JSON Schema definition\n for that type\n\nExample structure:\n\n```typescript\n{\n \"UserProfile\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": { \"type\": \"string\" },\n \"name\": { \"type\": \"string\" },\n \"email\": { \"type\": \"string\", \"format\": \"email\" }\n },\n \"required\": [\"id\", \"name\", \"email\"]\n }\n}\n```\n\nEach schema definition follows the JSON Schema specification and will be\ndirectly inserted into the OpenAPI document's components.schemas section,\nmaking them available for $ref references throughout the API\nspecification.",
|
|
2402
2391
|
$ref: "#/$defs/RecordstringAutoBeOpenApi.IJsonSchemaDescriptive"
|
|
2403
2392
|
}
|
|
2404
2393
|
},
|
|
2405
2394
|
required: [
|
|
2406
|
-
"draft",
|
|
2407
2395
|
"schemas"
|
|
2408
2396
|
],
|
|
2409
2397
|
additionalProperties: false,
|
|
@@ -3027,6 +3015,17 @@ const collection = {
|
|
|
3027
3015
|
description: "Object type info.",
|
|
3028
3016
|
type: "object",
|
|
3029
3017
|
properties: {
|
|
3018
|
+
"x-autobe-prisma-schema": {
|
|
3019
|
+
description: "Related Prisma schema.\n\nIf the type is directly related to a specific Prisma schema model,\ninclude the exact model name here to establish a clear link between the\nOpenAPI schema and the Prisma model.\n\nThis field is optional and should only be included when there is a\ndirect correspondence to a Prisma model. If there's not any Prisma\nmodel association, this field can be omitted.",
|
|
3020
|
+
oneOf: [
|
|
3021
|
+
{
|
|
3022
|
+
type: "null"
|
|
3023
|
+
},
|
|
3024
|
+
{
|
|
3025
|
+
type: "string"
|
|
3026
|
+
}
|
|
3027
|
+
]
|
|
3028
|
+
},
|
|
3030
3029
|
properties: {
|
|
3031
3030
|
description: "Properties of the object.\n\nThe `properties` means a list of key-value pairs of the object's\nregular properties. The key is the name of the regular property, and\nthe value is the type schema info.\n\nIMPORTANT: Each property in this object MUST have a detailed\ndescription that references and aligns with the description comments\nfrom the corresponding Prisma DB schema column.\n\nIf you need additional properties that is represented by dynamic key,\nyou can use the {@link additionalProperties} instead.",
|
|
3032
3031
|
$ref: "#/$defs/RecordstringAutoBeOpenApi.IJsonSchemaDescriptive"
|
|
@@ -3184,7 +3183,7 @@ const collection = {
|
|
|
3184
3183
|
}
|
|
3185
3184
|
},
|
|
3186
3185
|
description: "Complements missing schema types\n\nThis method fills in schema definitions that are referenced via $ref but\nnot yet defined in the `components.schemas` section. For example, if an API\noperation references `{ \"$ref\": \"#/components/schemas/UserProfile\" }` but\n`UserProfile` type is not defined in `components.schemas`, this method will\nadd the missing schema definition.\n\nThis function is designed to be called via AI function calling mechanism to\nensure the OpenAPI document is complete and all referenced schemas are\nproperly defined.",
|
|
3187
|
-
validate: (() => { const _io0 = input => "
|
|
3186
|
+
validate: (() => { const _io0 = input => "object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) && _io1(input.schemas); const _io1 = input => Object.keys(input).every(key => {
|
|
3188
3187
|
const value = input[key];
|
|
3189
3188
|
if (undefined === value)
|
|
3190
3189
|
return true;
|
|
@@ -3194,7 +3193,7 @@ const collection = {
|
|
|
3194
3193
|
if (undefined === value)
|
|
3195
3194
|
return true;
|
|
3196
3195
|
return "string" === typeof value;
|
|
3197
|
-
}); const _io20 = input => "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && _io1(input.properties) && (null !== input.additionalProperties && (undefined === input.additionalProperties || false === input.additionalProperties || "object" === typeof input.additionalProperties && null !== input.additionalProperties && _iu2(input.additionalProperties))) && (Array.isArray(input.required) && input.required.every(elem => "string" === typeof elem)) && "object" === input.type && "string" === typeof input.description; const _io21 = input => "string" === typeof input.$ref && "string" === typeof input.description; const _io22 = input => Array.isArray(input.oneOf) && input.oneOf.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)) && (undefined === input.discriminator || "object" === typeof input.discriminator && null !== input.discriminator && _io18(input.discriminator)) && "string" === typeof input.description; const _io23 = input => "null" === input.type && "string" === typeof input.description; const _iu0 = input => (() => {
|
|
3196
|
+
}); const _io20 = input => (null === input["x-autobe-prisma-schema"] || undefined === input["x-autobe-prisma-schema"] || "string" === typeof input["x-autobe-prisma-schema"]) && ("object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && _io1(input.properties)) && (null !== input.additionalProperties && (undefined === input.additionalProperties || false === input.additionalProperties || "object" === typeof input.additionalProperties && null !== input.additionalProperties && _iu2(input.additionalProperties))) && (Array.isArray(input.required) && input.required.every(elem => "string" === typeof elem)) && "object" === input.type && "string" === typeof input.description; const _io21 = input => "string" === typeof input.$ref && "string" === typeof input.description; const _io22 = input => Array.isArray(input.oneOf) && input.oneOf.every(elem => "object" === typeof elem && null !== elem && _iu0(elem)) && (undefined === input.discriminator || "object" === typeof input.discriminator && null !== input.discriminator && _io18(input.discriminator)) && "string" === typeof input.description; const _io23 = input => "null" === input.type && "string" === typeof input.description; const _iu0 = input => (() => {
|
|
3198
3197
|
if ("number" === input.type)
|
|
3199
3198
|
return _io9(input);
|
|
3200
3199
|
else if ("integer" === input.type)
|
|
@@ -3261,11 +3260,7 @@ const collection = {
|
|
|
3261
3260
|
return _io16(input);
|
|
3262
3261
|
else
|
|
3263
3262
|
return false;
|
|
3264
|
-
})(); const _vo0 = (input, _path, _exceptionable = true) => ["
|
|
3265
|
-
path: _path + ".draft",
|
|
3266
|
-
expected: "string",
|
|
3267
|
-
value: input.draft
|
|
3268
|
-
}), ("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) || _report(_exceptionable, {
|
|
3263
|
+
})(); const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.schemas && null !== input.schemas && false === Array.isArray(input.schemas) || _report(_exceptionable, {
|
|
3269
3264
|
path: _path + ".schemas",
|
|
3270
3265
|
expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>",
|
|
3271
3266
|
value: input.schemas
|
|
@@ -3679,7 +3674,11 @@ const collection = {
|
|
|
3679
3674
|
expected: "string",
|
|
3680
3675
|
value: value
|
|
3681
3676
|
});
|
|
3682
|
-
}).every(flag => flag)].every(flag => flag); const _vo20 = (input, _path, _exceptionable = true) => [
|
|
3677
|
+
}).every(flag => flag)].every(flag => flag); const _vo20 = (input, _path, _exceptionable = true) => [null === input["x-autobe-prisma-schema"] || undefined === input["x-autobe-prisma-schema"] || "string" === typeof input["x-autobe-prisma-schema"] || _report(_exceptionable, {
|
|
3678
|
+
path: _path + "[\"x-autobe-prisma-schema\"]",
|
|
3679
|
+
expected: "(null | string | undefined)",
|
|
3680
|
+
value: input["x-autobe-prisma-schema"]
|
|
3681
|
+
}), ("object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) || _report(_exceptionable, {
|
|
3683
3682
|
path: _path + ".properties",
|
|
3684
3683
|
expected: "Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>",
|
|
3685
3684
|
value: input.properties
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateInterfaceComplement.js","sourceRoot":"","sources":["../../../src/orchestrate/interface/orchestrateInterfaceComplement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"orchestrateInterfaceComplement.js","sourceRoot":"","sources":["../../../src/orchestrate/interface/orchestrateInterfaceComplement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,wEAQC;;;;AAxBD,yCAAqD;AAErD,2FAAwF;AAExF,kDAA0B;AAC1B,+BAA0B;AAG1B,uEAAoE;AACpE,6GAA0G;AAE1G,iEAA8D;AAC9D,mFAAgF;AAChF,qEAAkE;AAClE,2FAAwF;AAExF,SAAgB,8BAA8B,CAC5C,GAAyB,EACzB,KAGC;IAED,OAAO,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AACjC,CAAC;AAED,SAAe,IAAI,CACjB,GAAyB,EACzB,KAGC,EACD,QAAiB;;;QAEjB,MAAM,MAAM,GAAa,IAAA,4BAAoB,EAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC9D,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC,QAAQ,CAAC,UA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uHACyC;YACrE,QAAQ,EAAE;gBACR,oBAAoB,EAAE,QAAQ;aAC/B;SACF;;QAAC;CACL,CAAC"}
|
|
@@ -2,4 +2,9 @@ import { AutoBeOpenApi } from "@autobe/interface";
|
|
|
2
2
|
import { AutoBeInterfaceGroup } from "@autobe/interface/src/histories/contents/AutoBeInterfaceGroup";
|
|
3
3
|
import { ILlmSchema } from "@samchon/openapi";
|
|
4
4
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
5
|
-
export declare function orchestrateInterfaceEndpoints<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>,
|
|
5
|
+
export declare function orchestrateInterfaceEndpoints<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
|
|
6
|
+
groups: AutoBeInterfaceGroup[];
|
|
7
|
+
authorizations: AutoBeOpenApi.IOperation[];
|
|
8
|
+
instruction: string;
|
|
9
|
+
message?: string;
|
|
10
|
+
}): Promise<AutoBeOpenApi.IEndpoint[]>;
|
|
@@ -47,6 +47,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
48
|
exports.orchestrateInterfaceEndpoints = orchestrateInterfaceEndpoints;
|
|
49
49
|
const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
|
|
50
|
+
const utils_1 = require("@autobe/utils");
|
|
50
51
|
const tstl_1 = require("tstl");
|
|
51
52
|
const typia_1 = __importDefault(require("typia"));
|
|
52
53
|
const uuid_1 = require("uuid");
|
|
@@ -54,19 +55,28 @@ const assertSchemaModel_1 = require("../../context/assertSchemaModel");
|
|
|
54
55
|
const executeCachedBatch_1 = require("../../utils/executeCachedBatch");
|
|
55
56
|
const transformInterfaceEndpointHistories_1 = require("./histories/transformInterfaceEndpointHistories");
|
|
56
57
|
const orchestrateInterfaceEndpointsReview_1 = require("./orchestrateInterfaceEndpointsReview");
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
return __awaiter(this, arguments, void 0, function* (ctx, groups, authorizations, content = `Make endpoints for the given assets`) {
|
|
58
|
+
function orchestrateInterfaceEndpoints(ctx, props) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
60
|
const progress = {
|
|
61
|
-
total: groups.length,
|
|
61
|
+
total: props.groups.length,
|
|
62
62
|
completed: 0,
|
|
63
63
|
};
|
|
64
|
-
const endpoints = (yield (0, executeCachedBatch_1.executeCachedBatch)(groups.map((
|
|
65
|
-
|
|
64
|
+
const endpoints = (yield (0, executeCachedBatch_1.executeCachedBatch)(props.groups.map((group) => (promptCacheKey) => {
|
|
65
|
+
var _a;
|
|
66
|
+
return process(ctx, {
|
|
67
|
+
group,
|
|
68
|
+
authorizations: props.authorizations,
|
|
69
|
+
instruction: props.instruction,
|
|
70
|
+
message: (_a = props.message) !== null && _a !== void 0 ? _a : "Make endpoints for the given assets.",
|
|
71
|
+
progress,
|
|
72
|
+
promptCacheKey,
|
|
73
|
+
});
|
|
74
|
+
}))).flat();
|
|
75
|
+
const deduplicated = new tstl_1.HashSet(endpoints, utils_1.AutoBeOpenApiEndpointComparator.hashCode, utils_1.AutoBeOpenApiEndpointComparator.equals).toJSON();
|
|
66
76
|
return (0, orchestrateInterfaceEndpointsReview_1.orchestrateInterfaceEndpointsReview)(ctx, deduplicated);
|
|
67
77
|
});
|
|
68
78
|
}
|
|
69
|
-
function process(ctx,
|
|
79
|
+
function process(ctx, props) {
|
|
70
80
|
return __awaiter(this, void 0, void 0, function* () {
|
|
71
81
|
var _a, _b;
|
|
72
82
|
const start = new Date();
|
|
@@ -75,7 +85,12 @@ function process(ctx, group, message, progress, authorizations, promptCacheKey)
|
|
|
75
85
|
};
|
|
76
86
|
const { tokenUsage } = yield ctx.conversate({
|
|
77
87
|
source: "interfaceEndpoints",
|
|
78
|
-
histories: (0, transformInterfaceEndpointHistories_1.transformInterfaceEndpointHistories)(
|
|
88
|
+
histories: (0, transformInterfaceEndpointHistories_1.transformInterfaceEndpointHistories)({
|
|
89
|
+
state: ctx.state(),
|
|
90
|
+
group: props.group,
|
|
91
|
+
authorizations: props.authorizations,
|
|
92
|
+
instruction: props.instruction,
|
|
93
|
+
}),
|
|
79
94
|
controller: createController({
|
|
80
95
|
model: ctx.model,
|
|
81
96
|
build: (endpoints) => {
|
|
@@ -85,20 +100,20 @@ function process(ctx, group, message, progress, authorizations, promptCacheKey)
|
|
|
85
100
|
},
|
|
86
101
|
}),
|
|
87
102
|
enforceFunctionCall: true,
|
|
88
|
-
promptCacheKey,
|
|
89
|
-
message,
|
|
103
|
+
promptCacheKey: props.promptCacheKey,
|
|
104
|
+
message: props.message,
|
|
90
105
|
});
|
|
91
106
|
if (pointer.value === null)
|
|
92
107
|
throw new Error("Failed to generate endpoints."); // unreachable
|
|
93
108
|
const event = {
|
|
94
109
|
type: "interfaceEndpoints",
|
|
95
110
|
id: (0, uuid_1.v7)(),
|
|
96
|
-
endpoints: new tstl_1.HashSet(pointer.value,
|
|
111
|
+
endpoints: new tstl_1.HashSet(pointer.value, utils_1.AutoBeOpenApiEndpointComparator.hashCode, utils_1.AutoBeOpenApiEndpointComparator.equals).toJSON(),
|
|
97
112
|
tokenUsage,
|
|
98
113
|
created_at: start.toISOString(),
|
|
99
114
|
step: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
|
|
100
|
-
completed: ++progress.completed,
|
|
101
|
-
total: progress.total,
|
|
115
|
+
completed: ++props.progress.completed,
|
|
116
|
+
total: props.progress.total,
|
|
102
117
|
};
|
|
103
118
|
ctx.dispatch(event);
|
|
104
119
|
return pointer.value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateInterfaceEndpoints.js","sourceRoot":"","sources":["../../../src/orchestrate/interface/orchestrateInterfaceEndpoints.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,
|
|
1
|
+
{"version":3,"file":"orchestrateInterfaceEndpoints.js","sourceRoot":"","sources":["../../../src/orchestrate/interface/orchestrateInterfaceEndpoints.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,sEAoCC;;AAjDD,yCAAgE;AAEhE,+BAAyC;AACzC,kDAA0B;AAC1B,+BAA0B;AAG1B,uEAAoE;AACpE,uEAAoE;AACpE,yGAAsG;AACtG,+FAA4F;AAG5F,SAAsB,6BAA6B,CAGjD,GAAyB,EACzB,KAKC;;QAED,MAAM,QAAQ,GAA4B;YACxC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM;YAC1B,SAAS,EAAE,CAAC;SACb,CAAC;QACF,MAAM,SAAS,GAA8B,CAC3C,MAAM,IAAA,uCAAkB,EACtB,KAAK,CAAC,MAAM,CAAC,GAAG,CACd,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,cAAc,EAAE,EAAE;;YAC5B,OAAA,OAAO,CAAC,GAAG,EAAE;gBACX,KAAK;gBACL,cAAc,EAAE,KAAK,CAAC,cAAc;gBACpC,WAAW,EAAE,KAAK,CAAC,WAAW;gBAC9B,OAAO,EAAE,MAAA,KAAK,CAAC,OAAO,mCAAI,sCAAsC;gBAChE,QAAQ;gBACR,cAAc;aACf,CAAC,CAAA;SAAA,CACL,CACF,CACF,CAAC,IAAI,EAAE,CAAC;QACT,MAAM,YAAY,GAA8B,IAAI,cAAO,CACzD,SAAS,EACT,uCAA+B,CAAC,QAAQ,EACxC,uCAA+B,CAAC,MAAM,CACvC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IAChB,KAAK,EAAE,MAAM;CACd,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { AutoBeInterfaceGroupsEvent } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
|
-
export declare function orchestrateInterfaceGroups<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>,
|
|
4
|
+
export declare function orchestrateInterfaceGroups<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
|
|
5
|
+
instruction: string;
|
|
6
|
+
message?: string;
|
|
7
|
+
}): Promise<AutoBeInterfaceGroupsEvent>;
|
|
@@ -51,16 +51,19 @@ const typia_1 = __importDefault(require("typia"));
|
|
|
51
51
|
const uuid_1 = require("uuid");
|
|
52
52
|
const assertSchemaModel_1 = require("../../context/assertSchemaModel");
|
|
53
53
|
const transformInterfaceGroupHistories_1 = require("./histories/transformInterfaceGroupHistories");
|
|
54
|
-
function orchestrateInterfaceGroups(
|
|
55
|
-
return __awaiter(this,
|
|
56
|
-
var _a, _b;
|
|
54
|
+
function orchestrateInterfaceGroups(ctx, props) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
var _a, _b, _c;
|
|
57
57
|
const start = new Date();
|
|
58
58
|
const pointer = {
|
|
59
59
|
value: null,
|
|
60
60
|
};
|
|
61
61
|
const { tokenUsage } = yield ctx.conversate({
|
|
62
62
|
source: "interfaceGroups",
|
|
63
|
-
histories: (0, transformInterfaceGroupHistories_1.transformInterfaceGroupHistories)(
|
|
63
|
+
histories: (0, transformInterfaceGroupHistories_1.transformInterfaceGroupHistories)({
|
|
64
|
+
state: ctx.state(),
|
|
65
|
+
instruction: props.instruction,
|
|
66
|
+
}),
|
|
64
67
|
controller: createController({
|
|
65
68
|
model: ctx.model,
|
|
66
69
|
build: (next) => {
|
|
@@ -68,7 +71,7 @@ function orchestrateInterfaceGroups(ctx_1) {
|
|
|
68
71
|
},
|
|
69
72
|
}),
|
|
70
73
|
enforceFunctionCall: true,
|
|
71
|
-
message,
|
|
74
|
+
message: (_a = props.message) !== null && _a !== void 0 ? _a : "Design API operations for the given assets.",
|
|
72
75
|
});
|
|
73
76
|
if (pointer.value === null)
|
|
74
77
|
throw new Error("Failed to generate groups."); // unreachable
|
|
@@ -78,7 +81,7 @@ function orchestrateInterfaceGroups(ctx_1) {
|
|
|
78
81
|
created_at: start.toISOString(),
|
|
79
82
|
groups: pointer.value.groups,
|
|
80
83
|
tokenUsage,
|
|
81
|
-
step: (
|
|
84
|
+
step: (_c = (_b = ctx.state().analyze) === null || _b === void 0 ? void 0 : _b.step) !== null && _c !== void 0 ? _c : 0,
|
|
82
85
|
};
|
|
83
86
|
});
|
|
84
87
|
}
|
|
@@ -133,7 +136,7 @@ const claude = {
|
|
|
133
136
|
minLength: 1
|
|
134
137
|
},
|
|
135
138
|
description: {
|
|
136
|
-
description: "
|
|
139
|
+
description: "Concise description of the group's core purpose.\n\n**Requirements:**\n- Keep it brief and focused (50-200 characters)\n- State the main purpose and key entities\n- Avoid detailed explanations or mappings\n\nExample: \"Handles shopping-related entities and operations\"",
|
|
137
140
|
type: "string",
|
|
138
141
|
minLength: 1
|
|
139
142
|
}
|
|
@@ -249,7 +252,7 @@ const chatgpt = {
|
|
|
249
252
|
type: "string"
|
|
250
253
|
},
|
|
251
254
|
description: {
|
|
252
|
-
description: "
|
|
255
|
+
description: "Concise description of the group's core purpose.\n\n**Requirements:**\n- Keep it brief and focused (50-200 characters)\n- State the main purpose and key entities\n- Avoid detailed explanations or mappings\n\nExample: \"Handles shopping-related entities and operations\"\n\n\n@minLength 1",
|
|
253
256
|
type: "string"
|
|
254
257
|
}
|
|
255
258
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateInterfaceGroups.js","sourceRoot":"","sources":["../../../src/orchestrate/interface/orchestrateInterfaceGroups.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,
|
|
1
|
+
{"version":3,"file":"orchestrateInterfaceGroups.js","sourceRoot":"","sources":["../../../src/orchestrate/interface/orchestrateInterfaceGroups.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,gEAqCC;;AA7CD,kDAA0B;AAC1B,+BAA0B;AAG1B,uEAAoE;AACpE,mGAAgG;AAGhG,SAAsB,0BAA0B,CAG9C,GAAyB,EACzB,KAGC;;;QAED,MAAM,KAAK,GAAS,IAAI,IAAI,EAAE,CAAC;QAC/B,MAAM,OAAO,GAA6D;YACxE,KAAK,EAAE,IAAI;SACZ,CAAC;QACF,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC;YAC1C,MAAM,EAAE,iBAAiB;YACzB,SAAS,EAAE,IAAA,mEAAgC,EAAC;gBAC1C,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE;gBAClB,WAAW,EAAE,KAAK,CAAC,WAAW;aAC/B,CAAC;YACF,UAAU,EAAE,gBAAgB,CAAC;gBAC3B,KAAK,EAAE,GAAG,CAAC,KAAK;gBAChB,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE;oBACd,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;gBACvB,CAAC;aACF,CAAC;YACF,mBAAmB,EAAE,IAAI;YACzB,OAAO,EAAE,MAAA,KAAK,CAAC,OAAO,mCAAI,6CAA6C;SACxE,CAAC,CAAC;QACH,IAAI,OAAO,CAAC,KAAK,KAAK,IAAI;YAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC,CAAC,cAAc;QACzF,OAAO;YACL,IAAI,EAAE,iBAAiB;YACvB,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,KAAK,CAAC,WAAW,EAAE;YAC/B,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM;YAC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