@autobe/agent 0.28.1 → 0.29.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 +5 -4
- package/lib/AutoBeAgent.js.map +1 -1
- package/lib/AutoBeMockAgent.js +1 -0
- package/lib/AutoBeMockAgent.js.map +1 -1
- package/lib/constants/AutoBeConfigConstant.d.ts +3 -1
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +39 -26
- package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/context/AutoBeContext.d.ts +1 -1
- package/lib/factory/createAutoBeContext.js +13 -13
- package/lib/factory/createAutoBeContext.js.map +1 -1
- package/lib/index.mjs +43499 -23744
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +7 -2
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js +11 -21
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +2 -2
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +12 -5
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +2 -2
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +53 -50
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyze.js +2 -2
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js +855 -258
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +2 -14
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +2 -9
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +110 -36
- package/lib/orchestrate/common/AutoBePreliminaryController.d.ts +40 -0
- package/lib/orchestrate/common/AutoBePreliminaryController.js +97 -0
- package/lib/orchestrate/common/AutoBePreliminaryController.js.map +1 -0
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistory.d.ts +8 -0
- package/lib/orchestrate/{realize/histories/transformRealizeCorrectCastingHistories.js → common/histories/transformCommonCorrectCastingHistory.js} +16 -13
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistory.js.map +1 -0
- package/lib/orchestrate/common/histories/transformPreliminaryHistory.d.ts +4 -0
- package/lib/orchestrate/common/histories/transformPreliminaryHistory.js +285 -0
- package/lib/orchestrate/common/histories/transformPreliminaryHistory.js.map +1 -0
- package/lib/orchestrate/common/histories/{transformPreviousAndLatestCorrectHistories.d.ts → transformPreviousAndLatestCorrectHistory.d.ts} +1 -1
- package/lib/orchestrate/common/histories/{transformPreviousAndLatestCorrectHistories.js → transformPreviousAndLatestCorrectHistory.js} +4 -4
- package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistory.js.map +1 -0
- package/lib/orchestrate/common/internal/complementPreliminaryCollection.d.ts +7 -0
- package/lib/orchestrate/common/internal/complementPreliminaryCollection.js +99 -0
- package/lib/orchestrate/common/internal/complementPreliminaryCollection.js.map +1 -0
- package/lib/orchestrate/common/internal/createPreliminaryCollection.d.ts +3 -0
- package/lib/orchestrate/common/internal/createPreliminaryCollection.js +20 -0
- package/lib/orchestrate/common/internal/createPreliminaryCollection.js.map +1 -0
- package/lib/orchestrate/common/internal/validatePreliminary.d.ts +5 -0
- package/lib/orchestrate/common/internal/validatePreliminary.js +217 -0
- package/lib/orchestrate/common/internal/validatePreliminary.js.map +1 -0
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +10 -22
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js.map +1 -1
- package/lib/orchestrate/common/orchestratePreliminary.d.ts +12 -0
- package/lib/orchestrate/common/orchestratePreliminary.js +231 -0
- package/lib/orchestrate/common/orchestratePreliminary.js.map +1 -0
- package/lib/orchestrate/common/structures/AutoBePreliminaryRequest.d.ts +16 -0
- package/lib/orchestrate/{realize/structures/IAutoBeRealizeAuthorizationApplication.js → common/structures/AutoBePreliminaryRequest.js} +1 -1
- package/lib/orchestrate/common/structures/AutoBePreliminaryRequest.js.map +1 -0
- package/lib/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.d.ts +1 -4
- package/lib/orchestrate/common/structures/IAutoBeOrchestrateResult.d.ts +9 -0
- package/lib/orchestrate/{interface/structures/IAutoBeInterfacePrerequisitesApplication.js → common/structures/IAutoBeOrchestrateResult.js} +1 -1
- package/lib/orchestrate/common/structures/IAutoBeOrchestrateResult.js.map +1 -0
- package/lib/orchestrate/common/structures/IAutoBePreliminaryCollection.d.ts +8 -0
- package/lib/orchestrate/{interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js → common/structures/IAutoBePreliminaryCollection.js} +1 -1
- package/lib/orchestrate/common/structures/IAutoBePreliminaryCollection.js.map +1 -0
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetAnalysisFiles.d.ts +27 -0
- package/lib/orchestrate/{interface/structures/IAutoBeInterfaceOperationsReviewApplication.js → common/structures/IAutoBePreliminaryGetAnalysisFiles.js} +1 -1
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetAnalysisFiles.js.map +1 -0
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.d.ts +28 -0
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.js +3 -0
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.js.map +1 -0
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.d.ts +27 -0
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.js +3 -0
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.js.map +1 -0
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPrismaSchemas.d.ts +27 -0
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPrismaSchemas.js +3 -0
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPrismaSchemas.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationHistory.d.ts +10 -0
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationHistory.js +70 -0
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationHistory.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceCommonHistory.d.ts +3 -0
- package/lib/orchestrate/interface/histories/{transformInterfaceCommonHistories.js → transformInterfaceCommonHistory.js} +4 -4
- package/lib/orchestrate/interface/histories/transformInterfaceCommonHistory.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistory.d.ts +9 -0
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistory.js +60 -0
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistory.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistory.d.ts +12 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistory.js +63 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistory.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointReviewHistory.d.ts +7 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointReviewHistory.js +36 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointReviewHistory.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistory.d.ts +6 -0
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistory.js +68 -0
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistory.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistory.d.ts +9 -0
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistory.js +72 -0
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistory.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceOperationReviewHistory.d.ts +7 -0
- package/lib/orchestrate/interface/histories/transformInterfaceOperationReviewHistory.js +38 -0
- package/lib/orchestrate/interface/histories/transformInterfaceOperationReviewHistory.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistory.d.ts +8 -0
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistory.js +73 -0
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistory.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistory.d.ts +11 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistory.js +95 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistory.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistory.d.ts +5 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistory.js +54 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistory.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistory.d.ts +12 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistory.js +75 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistory.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterface.js +90 -46
- package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorization.d.ts +6 -0
- package/lib/orchestrate/interface/{orchestrateInterfaceAuthorizations.js → orchestrateInterfaceAuthorization.js} +1370 -226
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorization.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.d.ts +4 -3
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +2807 -532
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/orchestrate/interface/{orchestrateInterfaceEndpoints.d.ts → orchestrateInterfaceEndpoint.d.ts} +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoint.js +1356 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoint.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointReview.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointReview.js +1337 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointReview.js.map +1 -0
- package/lib/orchestrate/interface/{orchestrateInterfaceGroups.d.ts → orchestrateInterfaceGroup.d.ts} +1 -2
- package/lib/orchestrate/interface/orchestrateInterfaceGroup.js +621 -0
- package/lib/orchestrate/interface/orchestrateInterfaceGroup.js.map +1 -0
- package/lib/orchestrate/interface/{orchestrateInterfaceOperations.d.ts → orchestrateInterfaceOperation.d.ts} +1 -2
- package/lib/orchestrate/interface/{orchestrateInterfaceOperations.js → orchestrateInterfaceOperation.js} +1275 -216
- package/lib/orchestrate/interface/orchestrateInterfaceOperation.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceOperationReview.d.ts +4 -0
- package/lib/orchestrate/interface/{orchestrateInterfaceOperationsReview.js → orchestrateInterfaceOperationReview.js} +1421 -247
- package/lib/orchestrate/interface/orchestrateInterfaceOperationReview.js.map +1 -0
- package/lib/orchestrate/interface/{orchestrateInterfacePrerequisites.d.ts → orchestrateInterfacePrerequisite.d.ts} +1 -1
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisite.js +2159 -0
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisite.js.map +1 -0
- package/lib/orchestrate/interface/{orchestrateInterfaceSchemas.d.ts → orchestrateInterfaceSchema.d.ts} +1 -2
- package/lib/orchestrate/interface/{orchestrateInterfaceSchemas.js → orchestrateInterfaceSchema.js} +2550 -546
- package/lib/orchestrate/interface/orchestrateInterfaceSchema.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js +7 -17
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.d.ts +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js +2823 -548
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js.map +1 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.d.ts +56 -5
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +57 -10
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.d.ts +55 -10
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.d.ts +96 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.js +3 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +6 -82
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +58 -13
- package/lib/orchestrate/interface/structures/{IAutoBeInterfaceOperationsReviewApplication.d.ts → IAutoBeInterfaceOperationReviewApplication.d.ts} +58 -28
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationReviewApplication.js +3 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationReviewApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.d.ts +98 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.js +3 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +56 -15
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaContentReviewApplication.d.ts +62 -22
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRelationReviewApplication.d.ts +60 -21
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaSecurityReviewApplication.d.ts +61 -19
- package/lib/orchestrate/interface/utils/JsonSchemaFactory.js +29 -23
- package/lib/orchestrate/interface/utils/JsonSchemaFactory.js.map +1 -1
- package/lib/orchestrate/interface/utils/JsonSchemaNamingConvention.js +67 -61
- package/lib/orchestrate/interface/utils/JsonSchemaNamingConvention.js.map +1 -1
- package/lib/orchestrate/interface/utils/JsonSchemaValidator.d.ts +2 -1
- package/lib/orchestrate/interface/utils/JsonSchemaValidator.js +52 -25
- package/lib/orchestrate/interface/utils/JsonSchemaValidator.js.map +1 -1
- package/lib/orchestrate/interface/utils/OperationValidator.js +59 -1
- package/lib/orchestrate/interface/utils/OperationValidator.js.map +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistory.d.ts +6 -0
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistory.js +98 -0
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistory.js.map +1 -0
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistory.d.ts +7 -0
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistory.js +31 -0
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistory.js.map +1 -0
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistory.d.ts +7 -0
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistory.js +38 -0
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistory.js.map +1 -0
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistory.d.ts +8 -0
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistory.js +79 -0
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistory.js.map +1 -0
- package/lib/orchestrate/prisma/orchestratePrisma.js +9 -6
- package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js +8 -14
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +2863 -1543
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaReview.d.ts +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaReview.js +2886 -1566
- package/lib/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
- package/lib/orchestrate/prisma/{orchestratePrismaSchemas.d.ts → orchestratePrismaSchema.d.ts} +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchema.js +3068 -0
- package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -0
- package/lib/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.d.ts +74 -76
- package/lib/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.d.ts +90 -72
- package/lib/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.d.ts +89 -66
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistory.d.ts +9 -0
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistory.js +79 -0
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistory.js.map +1 -0
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationWriteHistory.d.ts +7 -0
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationWriteHistory.js +41 -0
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationWriteHistory.js.map +1 -0
- package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistory.d.ts +12 -0
- package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistory.js +67 -0
- package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistory.js.map +1 -0
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistory.d.ts +18 -0
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistory.js +54 -0
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistory.js.map +1 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +4 -2
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js +140 -106
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeWriteMembershipHistory.d.ts +3 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteMembershipHistory.js +23 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteMembershipHistory.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealize.js +4 -4
- package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.d.ts +5 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +1288 -572
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
- package/lib/orchestrate/realize/{orchestrateRealizeAuthorization.d.ts → orchestrateRealizeAuthorizationWrite.d.ts} +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationWrite.js +1410 -0
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationWrite.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js +664 -140
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCorrectCasting.js +20 -65
- package/lib/orchestrate/realize/orchestrateRealizeCorrectCasting.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeWrite.js +660 -135
- package/lib/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +79 -19
- package/lib/orchestrate/realize/structures/{IAutoBeRealizeAuthorizationApplication.d.ts → IAutoBeRealizeAuthorizationWriteApplication.d.ts} +60 -27
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationWriteApplication.js +3 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationWriteApplication.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +54 -5
- package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.d.ts +6 -14
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +54 -6
- package/lib/orchestrate/realize/utils/generateRealizeScenario.d.ts +1 -3
- package/lib/orchestrate/realize/utils/generateRealizeScenario.js +1 -7
- package/lib/orchestrate/realize/utils/generateRealizeScenario.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +3 -3
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.js +23 -20
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistory.d.ts +4 -0
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistory.js +36 -0
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistory.js.map +1 -0
- package/lib/orchestrate/test/histories/transformTestScenarioHistory.d.ts +11 -0
- package/lib/orchestrate/test/histories/transformTestScenarioHistory.js +95 -0
- package/lib/orchestrate/test/histories/transformTestScenarioHistory.js.map +1 -0
- package/lib/orchestrate/test/histories/transformTestScenarioReviewHistory.d.ts +10 -0
- package/lib/orchestrate/test/histories/transformTestScenarioReviewHistory.js +67 -0
- package/lib/orchestrate/test/histories/transformTestScenarioReviewHistory.js.map +1 -0
- package/lib/orchestrate/test/histories/{transformTestWriteHistories.d.ts → transformTestWriteHistory.d.ts} +4 -4
- package/lib/orchestrate/test/histories/{transformTestWriteHistories.js → transformTestWriteHistory.js} +79 -76
- package/lib/orchestrate/test/histories/transformTestWriteHistory.js.map +1 -0
- package/lib/orchestrate/test/orchestrateTestCorrect.js +13 -26
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js +3 -15
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenario.d.ts +1 -1
- package/lib/orchestrate/test/orchestrateTestScenario.js +1370 -316
- package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenarioReview.d.ts +5 -3
- package/lib/orchestrate/test/orchestrateTestScenarioReview.js +1067 -288
- package/lib/orchestrate/test/orchestrateTestScenarioReview.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestWrite.js +8 -15
- package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +66 -4
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioReviewApplication.d.ts +82 -14
- package/lib/structures/IAutoBeOrchestrateHistory.d.ts +5 -0
- package/lib/structures/IAutoBeOrchestrateHistory.js +3 -0
- package/lib/structures/IAutoBeOrchestrateHistory.js.map +1 -0
- package/lib/utils/executeCachedBatch.d.ts +5 -1
- package/lib/utils/executeCachedBatch.js +23 -5
- package/lib/utils/executeCachedBatch.js.map +1 -1
- package/lib/utils/validateEmptyCode.js +2 -2
- package/lib/utils/validateEmptyCode.js.map +1 -1
- package/package.json +8 -6
- package/src/AutoBeAgent.ts +2 -1
- package/src/AutoBeMockAgent.ts +1 -0
- package/src/constants/AutoBeConfigConstant.ts +2 -0
- package/src/constants/AutoBeSystemPromptConstant.ts +39 -26
- package/src/context/AutoBeContext.ts +1 -1
- package/src/factory/createAutoBeContext.ts +10 -5
- package/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.ts +17 -28
- package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +12 -6
- package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +62 -61
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +2 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +97 -48
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +3 -16
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +1 -2
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +114 -36
- package/src/orchestrate/common/AutoBePreliminaryController.ts +161 -0
- package/src/orchestrate/common/histories/transformCommonCorrectCastingHistory.ts +32 -0
- package/src/orchestrate/common/histories/transformPreliminaryHistory.ts +383 -0
- package/src/orchestrate/common/histories/{transformPreviousAndLatestCorrectHistories.ts → transformPreviousAndLatestCorrectHistory.ts} +1 -1
- package/src/orchestrate/common/internal/complementPreliminaryCollection.ts +123 -0
- package/src/orchestrate/common/internal/createPreliminaryCollection.ts +32 -0
- package/src/orchestrate/common/internal/validatePreliminary.ts +315 -0
- package/src/orchestrate/common/orchestrateCommonCorrectCasting.ts +8 -15
- package/src/orchestrate/common/orchestratePreliminary.ts +361 -0
- package/src/orchestrate/common/structures/AutoBePreliminaryRequest.ts +18 -0
- package/src/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.ts +1 -4
- package/src/orchestrate/common/structures/IAutoBeOrchestrateResult.ts +13 -0
- package/src/orchestrate/common/structures/IAutoBePreliminaryCollection.ts +9 -0
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetAnalysisFiles.ts +29 -0
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.ts +30 -0
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.ts +29 -0
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetPrismaSchemas.ts +29 -0
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationHistory.ts +77 -0
- package/src/orchestrate/interface/histories/{transformInterfaceCommonHistories.ts → transformInterfaceCommonHistory.ts} +1 -1
- package/src/orchestrate/interface/histories/{transformInterfaceGroupHistories.ts → transformInterfaceComplementHistory.ts} +35 -21
- package/src/orchestrate/interface/histories/transformInterfaceEndpointHistory.ts +74 -0
- package/src/orchestrate/interface/histories/transformInterfaceEndpointReviewHistory.ts +40 -0
- package/src/orchestrate/interface/histories/transformInterfaceGroupHistory.ts +72 -0
- package/src/orchestrate/interface/histories/transformInterfaceOperationHistory.ts +79 -0
- package/src/orchestrate/interface/histories/transformInterfaceOperationReviewHistory.ts +43 -0
- package/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistory.ts +89 -0
- package/src/orchestrate/interface/histories/transformInterfaceSchemaHistory.ts +105 -0
- package/src/orchestrate/interface/histories/transformInterfaceSchemaRenameHistory.ts +56 -0
- package/src/orchestrate/interface/histories/transformInterfaceSchemaReviewHistory.ts +88 -0
- package/src/orchestrate/interface/orchestrateInterface.ts +115 -51
- package/src/orchestrate/interface/{orchestrateInterfaceAuthorizations.ts → orchestrateInterfaceAuthorization.ts} +91 -67
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +174 -78
- package/src/orchestrate/interface/orchestrateInterfaceEndpoint.ts +207 -0
- package/src/orchestrate/interface/orchestrateInterfaceEndpointReview.ts +139 -0
- package/src/orchestrate/interface/orchestrateInterfaceGroup.ts +153 -0
- package/src/orchestrate/interface/{orchestrateInterfaceOperations.ts → orchestrateInterfaceOperation.ts} +109 -86
- package/src/orchestrate/interface/orchestrateInterfaceOperationReview.ts +186 -0
- package/src/orchestrate/interface/{orchestrateInterfacePrerequisites.ts → orchestrateInterfacePrerequisite.ts} +123 -58
- package/src/orchestrate/interface/{orchestrateInterfaceSchemas.ts → orchestrateInterfaceSchema.ts} +96 -90
- package/src/orchestrate/interface/orchestrateInterfaceSchemaRename.ts +10 -11
- package/src/orchestrate/interface/orchestrateInterfaceSchemaReview.ts +127 -60
- package/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.ts +63 -5
- package/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.ts +67 -12
- package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.ts +63 -10
- package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.ts +106 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +6 -84
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +65 -13
- package/src/orchestrate/interface/structures/{IAutoBeInterfaceOperationsReviewApplication.ts → IAutoBeInterfaceOperationReviewApplication.ts} +65 -30
- package/src/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.ts +111 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +65 -15
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaContentReviewApplication.ts +71 -24
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaRelationReviewApplication.ts +68 -23
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaSecurityReviewApplication.ts +69 -21
- package/src/orchestrate/interface/utils/JsonSchemaFactory.ts +31 -23
- package/src/orchestrate/interface/utils/JsonSchemaNamingConvention.ts +73 -61
- package/src/orchestrate/interface/utils/JsonSchemaValidator.ts +53 -26
- package/src/orchestrate/interface/utils/OperationValidator.ts +69 -1
- package/src/orchestrate/prisma/histories/transformPrismaComponentsHistory.ts +109 -0
- package/src/orchestrate/prisma/histories/{transformPrismaCorrectHistories.ts → transformPrismaCorrectHistory.ts} +13 -22
- package/src/orchestrate/prisma/histories/transformPrismaReviewHistory.ts +42 -0
- package/src/orchestrate/prisma/histories/{transformPrismaSchemaHistories.ts → transformPrismaSchemaHistory.ts} +7 -8
- package/src/orchestrate/prisma/orchestratePrisma.ts +12 -17
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +7 -15
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +129 -64
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +115 -59
- package/src/orchestrate/prisma/{orchestratePrismaSchemas.ts → orchestratePrismaSchema.ts} +92 -60
- package/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.ts +81 -76
- package/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.ts +97 -72
- package/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.ts +93 -66
- package/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistory.ts +89 -0
- package/src/orchestrate/realize/histories/transformRealizeAuthorizationWriteHistory.ts +45 -0
- package/src/orchestrate/realize/histories/transformRealizeCorrectCastingHistory.ts +85 -0
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistory.ts +77 -0
- package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +152 -121
- package/src/orchestrate/realize/histories/{transformRealizeWriteAuthorizationsHistories.ts → transformRealizeWriteMembershipHistory.ts} +2 -2
- package/src/orchestrate/realize/orchestrateRealize.ts +4 -3
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +155 -97
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationWrite.ts +241 -0
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +88 -86
- package/src/orchestrate/realize/orchestrateRealizeCorrectCasting.ts +17 -56
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +82 -78
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.ts +85 -22
- package/src/orchestrate/realize/structures/{IAutoBeRealizeAuthorizationApplication.ts → IAutoBeRealizeAuthorizationWriteApplication.ts} +64 -29
- package/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.ts +58 -5
- package/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.ts +6 -19
- package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +58 -6
- package/src/orchestrate/realize/utils/generateRealizeScenario.ts +2 -20
- package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +30 -30
- package/src/orchestrate/test/histories/transformTestCorrectInvalidRequestHistory.ts +40 -0
- package/src/orchestrate/test/histories/transformTestScenarioHistory.ts +116 -0
- package/src/orchestrate/test/histories/transformTestScenarioReviewHistory.ts +85 -0
- package/src/orchestrate/test/histories/transformTestWriteHistory.ts +169 -0
- package/src/orchestrate/test/orchestrateTestCorrect.ts +13 -19
- package/src/orchestrate/test/orchestrateTestCorrectInvalidRequest.ts +5 -12
- package/src/orchestrate/test/orchestrateTestScenario.ts +143 -83
- package/src/orchestrate/test/orchestrateTestScenarioReview.ts +93 -76
- package/src/orchestrate/test/orchestrateTestWrite.ts +7 -7
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +74 -4
- package/src/orchestrate/test/structures/IAutoBeTestScenarioReviewApplication.ts +89 -14
- package/src/structures/IAutoBeOrchestrateHistory.ts +6 -0
- package/src/utils/executeCachedBatch.ts +33 -7
- package/src/utils/validateEmptyCode.ts +2 -2
- package/lib/factory/AutoBeFunctionCallingMetricFactory.d.ts +0 -7
- package/lib/factory/AutoBeFunctionCallingMetricFactory.js +0 -35
- package/lib/factory/AutoBeFunctionCallingMetricFactory.js.map +0 -1
- package/lib/factory/AutoBeProcessAggregateFactory.d.ts +0 -13
- package/lib/factory/AutoBeProcessAggregateFactory.js +0 -100
- package/lib/factory/AutoBeProcessAggregateFactory.js.map +0 -1
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.d.ts +0 -8
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.js +0 -16
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.js.map +0 -1
- package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.d.ts +0 -3
- package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js +0 -62
- package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +0 -8
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +0 -68
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceCommonHistories.d.ts +0 -3
- package/lib/orchestrate/interface/histories/transformInterfaceCommonHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.d.ts +0 -9
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +0 -74
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +0 -10
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +0 -61
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.d.ts +0 -4
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +0 -34
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.d.ts +0 -6
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +0 -52
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.d.ts +0 -8
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +0 -71
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.d.ts +0 -5
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +0 -36
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.d.ts +0 -3
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.js +0 -102
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.d.ts +0 -9
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +0 -74
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.d.ts +0 -5
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.js +0 -51
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.d.ts +0 -11
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.js +0 -81
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +0 -4
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +0 -508
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +0 -4
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +0 -488
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js +0 -458
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +0 -4
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js +0 -917
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.d.ts +0 -60
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisitesApplication.d.ts +0 -52
- package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisitesApplication.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.d.ts +0 -6
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +0 -95
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.d.ts +0 -3
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +0 -41
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.d.ts +0 -8
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js +0 -62
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +0 -8
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +0 -78
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js +0 -1678
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +0 -1
- package/lib/orchestrate/realize/histories/transformRealizeAuthorization.d.ts +0 -5
- package/lib/orchestrate/realize/histories/transformRealizeAuthorization.js +0 -44
- package/lib/orchestrate/realize/histories/transformRealizeAuthorization.js.map +0 -1
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.d.ts +0 -5
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +0 -82
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +0 -1
- package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.d.ts +0 -5
- package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.js.map +0 -1
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +0 -13
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js +0 -29
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +0 -1
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +0 -3
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +0 -23
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js +0 -710
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js.map +0 -1
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.d.ts +0 -4
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.js +0 -33
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.js.map +0 -1
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.d.ts +0 -10
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.js +0 -101
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.js.map +0 -1
- package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.d.ts +0 -8
- package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js +0 -72
- package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js.map +0 -1
- package/lib/orchestrate/test/histories/transformTestWriteHistories.js.map +0 -1
- package/lib/utils/TokenUsageComputer.d.ts +0 -5
- package/lib/utils/TokenUsageComputer.js +0 -29
- package/lib/utils/TokenUsageComputer.js.map +0 -1
- package/src/factory/AutoBeFunctionCallingMetricFactory.ts +0 -44
- package/src/factory/AutoBeProcessAggregateFactory.ts +0 -141
- package/src/orchestrate/common/histories/transformCommonCorrectCastingHistories.ts +0 -25
- package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +0 -72
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +0 -75
- package/src/orchestrate/interface/histories/transformInterfaceComplementHistories.ts +0 -82
- package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +0 -72
- package/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.ts +0 -40
- package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +0 -78
- package/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.ts +0 -44
- package/src/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.ts +0 -118
- package/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts +0 -80
- package/src/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.ts +0 -55
- package/src/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.ts +0 -90
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +0 -152
- package/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.ts +0 -98
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +0 -91
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +0 -157
- package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.ts +0 -65
- package/src/orchestrate/interface/structures/IAutoBeInterfacePrerequisitesApplication.ts +0 -58
- package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +0 -104
- package/src/orchestrate/prisma/histories/transformPrismaReviewHistories.ts +0 -69
- package/src/orchestrate/realize/histories/transformRealizeAuthorization.ts +0 -52
- package/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.ts +0 -95
- package/src/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.ts +0 -30
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +0 -46
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +0 -185
- package/src/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.ts +0 -39
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +0 -125
- package/src/orchestrate/test/histories/transformTestScenarioReviewHistories.ts +0 -89
- package/src/orchestrate/test/histories/transformTestWriteHistories.ts +0 -172
- package/src/utils/TokenUsageComputer.ts +0 -35
|
@@ -80,7 +80,7 @@ export namespace AutoBeContext {
|
|
|
80
80
|
controller: ILlmController<Model>;
|
|
81
81
|
histories: Array<IMicroAgenticaHistoryJson>;
|
|
82
82
|
enforceFunctionCall: boolean;
|
|
83
|
-
|
|
83
|
+
userMessage: string;
|
|
84
84
|
promptCacheKey?: string;
|
|
85
85
|
}
|
|
86
86
|
export interface IResult<Model extends ILlmSchema.Model> {
|
|
@@ -26,7 +26,11 @@ import {
|
|
|
26
26
|
IAutoBeGetFilesOptions,
|
|
27
27
|
IAutoBeTokenUsageJson,
|
|
28
28
|
} from "@autobe/interface";
|
|
29
|
-
import {
|
|
29
|
+
import {
|
|
30
|
+
AutoBeProcessAggregateFactory,
|
|
31
|
+
StringUtil,
|
|
32
|
+
TokenUsageComputer,
|
|
33
|
+
} from "@autobe/utils";
|
|
30
34
|
import { ILlmSchema } from "@samchon/openapi";
|
|
31
35
|
import { Semaphore } from "tstl";
|
|
32
36
|
import typia from "typia";
|
|
@@ -42,8 +46,6 @@ import { IAutoBeConfig } from "../structures/IAutoBeConfig";
|
|
|
42
46
|
import { IAutoBeVendor } from "../structures/IAutoBeVendor";
|
|
43
47
|
import { AutoBeTimeoutError } from "../utils/AutoBeTimeoutError";
|
|
44
48
|
import { TimedConversation } from "../utils/TimedConversation";
|
|
45
|
-
import { TokenUsageComputer } from "../utils/TokenUsageComputer";
|
|
46
|
-
import { AutoBeProcessAggregateFactory } from "./AutoBeProcessAggregateFactory";
|
|
47
49
|
import { consentFunctionCall } from "./consentFunctionCall";
|
|
48
50
|
import { getCommonPrompt } from "./getCommonPrompt";
|
|
49
51
|
import { getCriticalCompiler } from "./getCriticalCompiler";
|
|
@@ -181,6 +183,7 @@ export const createAutoBeContext = <Model extends ILlmSchema.Model>(props: {
|
|
|
181
183
|
void props
|
|
182
184
|
.dispatch({
|
|
183
185
|
...event,
|
|
186
|
+
function: event.operation.function.name,
|
|
184
187
|
source: next.source,
|
|
185
188
|
})
|
|
186
189
|
.catch(() => {});
|
|
@@ -192,6 +195,7 @@ export const createAutoBeContext = <Model extends ILlmSchema.Model>(props: {
|
|
|
192
195
|
type: "jsonValidateError",
|
|
193
196
|
id: v7(),
|
|
194
197
|
source: next.source,
|
|
198
|
+
function: event.operation.function.name,
|
|
195
199
|
result: event.result,
|
|
196
200
|
life: event.life,
|
|
197
201
|
created_at: event.created_at,
|
|
@@ -204,7 +208,7 @@ export const createAutoBeContext = <Model extends ILlmSchema.Model>(props: {
|
|
|
204
208
|
const message: string =
|
|
205
209
|
next.enforceFunctionCall === true
|
|
206
210
|
? StringUtil.trim`
|
|
207
|
-
${next.
|
|
211
|
+
${next.userMessage}
|
|
208
212
|
|
|
209
213
|
> You have to call function(s) of below to accomplish my request.
|
|
210
214
|
>
|
|
@@ -220,7 +224,7 @@ export const createAutoBeContext = <Model extends ILlmSchema.Model>(props: {
|
|
|
220
224
|
.map((f) => `> - ${f.name}`)
|
|
221
225
|
.join("\n")}
|
|
222
226
|
`
|
|
223
|
-
: next.
|
|
227
|
+
: next.userMessage;
|
|
224
228
|
const result: TimedConversation.IResult<Model> =
|
|
225
229
|
await TimedConversation.process({
|
|
226
230
|
timeout: config.timeout,
|
|
@@ -243,6 +247,7 @@ export const createAutoBeContext = <Model extends ILlmSchema.Model>(props: {
|
|
|
243
247
|
histories,
|
|
244
248
|
tokenUsage: aggregate.tokenUsage,
|
|
245
249
|
metric: aggregate.metric,
|
|
250
|
+
__agent: agent,
|
|
246
251
|
};
|
|
247
252
|
};
|
|
248
253
|
if (result.type === "error") throw result.error;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
1
|
import { AutoBeAnalyzeScenarioEvent } from "@autobe/interface";
|
|
3
2
|
import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
|
|
4
3
|
import { StringUtil } from "@autobe/utils";
|
|
@@ -7,50 +6,40 @@ import { v7 } from "uuid";
|
|
|
7
6
|
|
|
8
7
|
import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
|
|
9
8
|
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
9
|
+
import { IAutoBeOrchestrateHistory } from "../../../structures/IAutoBeOrchestrateHistory";
|
|
10
|
+
import { AutoBePreliminaryController } from "../../common/AutoBePreliminaryController";
|
|
10
11
|
import { transformAnalyzeWriteHistories } from "./transformAnalyzeWriteHistories";
|
|
11
12
|
|
|
12
13
|
export const transformAnalyzeReviewHistories = <Model extends ILlmSchema.Model>(
|
|
13
14
|
ctx: AutoBeContext<Model>,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
> => {
|
|
22
|
-
return [
|
|
15
|
+
props: {
|
|
16
|
+
scenario: AutoBeAnalyzeScenarioEvent;
|
|
17
|
+
myFile: AutoBeAnalyzeFile;
|
|
18
|
+
preliminary: AutoBePreliminaryController<"analysisFiles">;
|
|
19
|
+
},
|
|
20
|
+
): IAutoBeOrchestrateHistory => ({
|
|
21
|
+
histories: [
|
|
23
22
|
...transformAnalyzeWriteHistories(ctx, {
|
|
24
|
-
scenario,
|
|
25
|
-
file: myFile,
|
|
26
|
-
}).slice(0, -2),
|
|
23
|
+
scenario: props.scenario,
|
|
24
|
+
file: props.myFile,
|
|
25
|
+
}).histories.slice(0, -2),
|
|
27
26
|
{
|
|
28
27
|
id: v7(),
|
|
29
28
|
created_at: new Date().toISOString(),
|
|
30
29
|
type: "systemMessage",
|
|
31
30
|
text: AutoBeSystemPromptConstant.ANALYZE_REVIEW,
|
|
32
31
|
},
|
|
32
|
+
...props.preliminary.getHistories(),
|
|
33
33
|
{
|
|
34
34
|
id: v7(),
|
|
35
35
|
created_at: new Date().toISOString(),
|
|
36
36
|
type: "assistantMessage",
|
|
37
37
|
text: StringUtil.trim`
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
\`\`\`json
|
|
41
|
-
${JSON.stringify(allFiles)}
|
|
42
|
-
\`\`\`
|
|
43
|
-
`,
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
id: v7(),
|
|
47
|
-
created_at: new Date().toISOString(),
|
|
48
|
-
type: "assistantMessage",
|
|
49
|
-
text: StringUtil.trim`
|
|
50
|
-
Review the ${myFile.filename} document.
|
|
38
|
+
Review the ${props.myFile.filename} document.
|
|
51
39
|
|
|
52
40
|
Note that, never review others.
|
|
53
41
|
`,
|
|
54
42
|
},
|
|
55
|
-
]
|
|
56
|
-
|
|
43
|
+
],
|
|
44
|
+
userMessage: "Review the requirement document",
|
|
45
|
+
});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { IMicroAgenticaHistoryJson } from "@agentica/core";
|
|
2
1
|
import { StringUtil } from "@autobe/utils";
|
|
3
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
4
3
|
import { v7 } from "uuid";
|
|
5
4
|
|
|
6
5
|
import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
|
|
7
6
|
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
7
|
+
import { IAutoBeOrchestrateHistory } from "../../../structures/IAutoBeOrchestrateHistory";
|
|
8
8
|
|
|
9
|
-
export
|
|
9
|
+
export const transformAnalyzeSceHistories = <Model extends ILlmSchema.Model>(
|
|
10
10
|
ctx: AutoBeContext<Model>,
|
|
11
|
-
):
|
|
12
|
-
|
|
11
|
+
): IAutoBeOrchestrateHistory => ({
|
|
12
|
+
histories: [
|
|
13
13
|
...ctx
|
|
14
14
|
.histories()
|
|
15
15
|
.filter((h) => h.type === "userMessage" || h.type === "assistantMessage"),
|
|
@@ -33,5 +33,11 @@ export function transformAnalyzeSceHistories<Model extends ILlmSchema.Model>(
|
|
|
33
33
|
`,
|
|
34
34
|
created_at: new Date().toISOString(),
|
|
35
35
|
},
|
|
36
|
-
]
|
|
37
|
-
|
|
36
|
+
],
|
|
37
|
+
userMessage: StringUtil.trim`
|
|
38
|
+
Design a complete list of documents and user actors for this project.
|
|
39
|
+
Define user actors that can authenticate via API and create appropriate documentation files.
|
|
40
|
+
You must respect the number of documents specified by the user.
|
|
41
|
+
Note that the user's locale is in ${ctx.locale}.
|
|
42
|
+
`,
|
|
43
|
+
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
1
|
import { AutoBeAnalyzeScenarioEvent } from "@autobe/interface";
|
|
3
2
|
import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
|
|
4
3
|
import { StringUtil } from "@autobe/utils";
|
|
@@ -7,6 +6,7 @@ import { v7 } from "uuid";
|
|
|
7
6
|
|
|
8
7
|
import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
|
|
9
8
|
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
9
|
+
import { IAutoBeOrchestrateHistory } from "../../../structures/IAutoBeOrchestrateHistory";
|
|
10
10
|
|
|
11
11
|
export const transformAnalyzeWriteHistories = <Model extends ILlmSchema.Model>(
|
|
12
12
|
ctx: AutoBeContext<Model>,
|
|
@@ -14,66 +14,67 @@ export const transformAnalyzeWriteHistories = <Model extends ILlmSchema.Model>(
|
|
|
14
14
|
scenario: AutoBeAnalyzeScenarioEvent;
|
|
15
15
|
file: AutoBeAnalyzeFile.Scenario;
|
|
16
16
|
},
|
|
17
|
-
):
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
Prefix name of the service to create is ${props.scenario.prefix}
|
|
56
|
-
and here is the list of the actors to reference.
|
|
17
|
+
): IAutoBeOrchestrateHistory => ({
|
|
18
|
+
histories: [
|
|
19
|
+
...ctx
|
|
20
|
+
.histories()
|
|
21
|
+
.filter((h) => h.type === "userMessage" || h.type === "assistantMessage")
|
|
22
|
+
.map((h) => {
|
|
23
|
+
const text =
|
|
24
|
+
h.type === "userMessage"
|
|
25
|
+
? h.contents
|
|
26
|
+
.filter((el) => el.type === "text")
|
|
27
|
+
.map((el) => el.text)
|
|
28
|
+
.join("\n")
|
|
29
|
+
: h.text;
|
|
30
|
+
return {
|
|
31
|
+
...h,
|
|
32
|
+
text,
|
|
33
|
+
};
|
|
34
|
+
}),
|
|
35
|
+
{
|
|
36
|
+
id: v7(),
|
|
37
|
+
created_at: new Date().toISOString(),
|
|
38
|
+
type: "systemMessage",
|
|
39
|
+
text: AutoBeSystemPromptConstant.ANALYZE_WRITE,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: v7(),
|
|
43
|
+
created_at: new Date().toISOString(),
|
|
44
|
+
type: "assistantMessage",
|
|
45
|
+
text: StringUtil.trim`
|
|
46
|
+
## Language
|
|
47
|
+
|
|
48
|
+
The language of the document is ${JSON.stringify(props.scenario.language ?? "en-US")}.
|
|
49
|
+
|
|
50
|
+
## Metadata
|
|
51
|
+
|
|
52
|
+
Prefix name of the service to create is ${props.scenario.prefix}
|
|
53
|
+
and here is the list of the actors to reference.
|
|
57
54
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
\`\`\`json
|
|
56
|
+
${JSON.stringify(props.scenario.actors)}
|
|
57
|
+
\`\`\`
|
|
61
58
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
Here is the entire list of the documents that would be published
|
|
60
|
+
in someday, and your task is to write a document of them:
|
|
61
|
+
|
|
62
|
+
## The other documents that would be published in someday
|
|
66
63
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
64
|
+
\`\`\`json
|
|
65
|
+
${JSON.stringify(
|
|
66
|
+
props.scenario.files.filter(
|
|
67
|
+
(f) => f.filename !== props.file.filename,
|
|
68
|
+
),
|
|
69
|
+
)}
|
|
70
|
+
\`\`\`
|
|
71
|
+
|
|
72
|
+
## The document to write
|
|
73
|
+
\`\`\`json
|
|
74
|
+
${JSON.stringify(props.file)}
|
|
75
|
+
\`\`\`
|
|
76
|
+
`,
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
userMessage: "Write requirement analysis report.",
|
|
80
|
+
});
|
|
@@ -43,6 +43,7 @@ export const orchestrateAnalyze = async <Model extends ILlmSchema.Model>(
|
|
|
43
43
|
completed: 0,
|
|
44
44
|
};
|
|
45
45
|
const fileList: AutoBeAnalyzeFile[] = await executeCachedBatch(
|
|
46
|
+
ctx,
|
|
46
47
|
scenario.files.map((file) => async (promptCacheKey) => {
|
|
47
48
|
const event: AutoBeAnalyzeWriteEvent = await orchestrateAnalyzeWrite(
|
|
48
49
|
ctx,
|
|
@@ -63,6 +64,7 @@ export const orchestrateAnalyze = async <Model extends ILlmSchema.Model>(
|
|
|
63
64
|
completed: 0,
|
|
64
65
|
};
|
|
65
66
|
const newFiles: AutoBeAnalyzeFile[] = await executeCachedBatch(
|
|
67
|
+
ctx,
|
|
66
68
|
fileList.map((file) => async (promptCacheKey) => {
|
|
67
69
|
try {
|
|
68
70
|
const event: AutoBeAnalyzeReviewEvent = await orchestrateAnalyzeReview(
|
|
@@ -2,16 +2,18 @@ import { IAgenticaController } from "@agentica/core";
|
|
|
2
2
|
import {
|
|
3
3
|
AutoBeAnalyzeReviewEvent,
|
|
4
4
|
AutoBeAnalyzeScenarioEvent,
|
|
5
|
+
AutoBeEventSource,
|
|
5
6
|
AutoBeProgressEventBase,
|
|
6
7
|
} from "@autobe/interface";
|
|
7
8
|
import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
|
|
8
|
-
import { ILlmApplication, ILlmSchema } from "@samchon/openapi";
|
|
9
|
+
import { ILlmApplication, ILlmSchema, IValidation } from "@samchon/openapi";
|
|
9
10
|
import { IPointer } from "tstl";
|
|
10
11
|
import typia from "typia";
|
|
11
12
|
import { v7 } from "uuid";
|
|
12
13
|
|
|
13
14
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
14
15
|
import { assertSchemaModel } from "../../context/assertSchemaModel";
|
|
16
|
+
import { AutoBePreliminaryController } from "../common/AutoBePreliminaryController";
|
|
15
17
|
import { transformAnalyzeReviewHistories } from "./histories/transformAnalyzeReviewHistories";
|
|
16
18
|
import { IAutoBeAnalyzeReviewApplication } from "./structures/IAutoBeAnalyzeReviewApplication";
|
|
17
19
|
|
|
@@ -25,75 +27,122 @@ export const orchestrateAnalyzeReview = async <Model extends ILlmSchema.Model>(
|
|
|
25
27
|
promptCacheKey: string;
|
|
26
28
|
},
|
|
27
29
|
): Promise<AutoBeAnalyzeReviewEvent> => {
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
30
|
+
const preliminary: AutoBePreliminaryController<"analysisFiles"> =
|
|
31
|
+
new AutoBePreliminaryController({
|
|
32
|
+
application: typia.json.application<IAutoBeAnalyzeReviewApplication>(),
|
|
33
|
+
source: SOURCE,
|
|
34
|
+
kinds: ["analysisFiles"],
|
|
35
|
+
state: ctx.state(),
|
|
36
|
+
all: {
|
|
37
|
+
analysisFiles: props.allFiles,
|
|
38
|
+
},
|
|
39
|
+
local: {
|
|
40
|
+
analysisFiles: [props.myFile],
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
return await preliminary.orchestrate(ctx, async (out) => {
|
|
44
|
+
const pointer: IPointer<IAutoBeAnalyzeReviewApplication.IComplete | null> =
|
|
45
|
+
{
|
|
46
|
+
value: null,
|
|
47
|
+
};
|
|
48
|
+
const result: AutoBeContext.IResult<Model> = await ctx.conversate({
|
|
49
|
+
source: SOURCE,
|
|
50
|
+
controller: createController({
|
|
51
|
+
model: ctx.model,
|
|
52
|
+
pointer,
|
|
53
|
+
preliminary,
|
|
54
|
+
}),
|
|
55
|
+
enforceFunctionCall: true,
|
|
56
|
+
promptCacheKey: props.promptCacheKey,
|
|
57
|
+
...transformAnalyzeReviewHistories(ctx, {
|
|
58
|
+
preliminary,
|
|
59
|
+
scenario: props.scenario,
|
|
60
|
+
myFile: props.myFile,
|
|
61
|
+
}),
|
|
62
|
+
});
|
|
63
|
+
if (pointer.value === null) return out(result)(null);
|
|
51
64
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
const event: AutoBeAnalyzeReviewEvent = {
|
|
66
|
+
type: SOURCE,
|
|
67
|
+
id: v7(),
|
|
68
|
+
file: props.myFile,
|
|
69
|
+
plan: pointer.value.plan,
|
|
70
|
+
review: pointer.value.review,
|
|
71
|
+
content: pointer.value.content,
|
|
72
|
+
tokenUsage: result.tokenUsage,
|
|
73
|
+
metric: result.metric,
|
|
74
|
+
total: props.progress.total,
|
|
75
|
+
completed: ++props.progress.completed,
|
|
76
|
+
step: (ctx.state().analyze?.step ?? -1) + 1,
|
|
77
|
+
created_at: new Date().toISOString(),
|
|
78
|
+
};
|
|
79
|
+
ctx.dispatch(event);
|
|
80
|
+
return out(result)(event);
|
|
81
|
+
});
|
|
68
82
|
};
|
|
69
83
|
|
|
70
84
|
function createController<Model extends ILlmSchema.Model>(props: {
|
|
71
85
|
model: Model;
|
|
72
|
-
pointer: IPointer<IAutoBeAnalyzeReviewApplication.
|
|
86
|
+
pointer: IPointer<IAutoBeAnalyzeReviewApplication.IComplete | null>;
|
|
87
|
+
preliminary: AutoBePreliminaryController<"analysisFiles">;
|
|
73
88
|
}): IAgenticaController.IClass<Model> {
|
|
74
89
|
assertSchemaModel(props.model);
|
|
75
90
|
|
|
91
|
+
const validate: Validator = (input) => {
|
|
92
|
+
const result: IValidation<IAutoBeAnalyzeReviewApplication.IProps> =
|
|
93
|
+
typia.validate<IAutoBeAnalyzeReviewApplication.IProps>(input);
|
|
94
|
+
if (result.success === false || result.data.request.type === "complete")
|
|
95
|
+
return result;
|
|
96
|
+
return props.preliminary.validate({
|
|
97
|
+
thinking: result.data.thinking,
|
|
98
|
+
request: result.data.request,
|
|
99
|
+
});
|
|
100
|
+
};
|
|
76
101
|
const application: ILlmApplication<Model> = collection[
|
|
77
102
|
props.model === "chatgpt"
|
|
78
103
|
? "chatgpt"
|
|
79
104
|
: props.model === "gemini"
|
|
80
105
|
? "gemini"
|
|
81
106
|
: "claude"
|
|
82
|
-
]
|
|
107
|
+
](
|
|
108
|
+
validate,
|
|
109
|
+
) satisfies ILlmApplication<any> as unknown as ILlmApplication<Model>;
|
|
83
110
|
return {
|
|
84
111
|
protocol: "class",
|
|
85
|
-
name:
|
|
112
|
+
name: SOURCE,
|
|
86
113
|
application,
|
|
87
114
|
execute: {
|
|
88
|
-
|
|
89
|
-
|
|
115
|
+
process: (input) => {
|
|
116
|
+
if (input.request.type === "complete")
|
|
117
|
+
props.pointer.value = input.request;
|
|
90
118
|
},
|
|
91
119
|
} satisfies IAutoBeAnalyzeReviewApplication,
|
|
92
120
|
};
|
|
93
121
|
}
|
|
94
122
|
|
|
95
123
|
const collection = {
|
|
96
|
-
chatgpt:
|
|
97
|
-
|
|
98
|
-
|
|
124
|
+
chatgpt: (validate: Validator) =>
|
|
125
|
+
typia.llm.application<IAutoBeAnalyzeReviewApplication, "chatgpt">({
|
|
126
|
+
validate: {
|
|
127
|
+
process: validate,
|
|
128
|
+
},
|
|
129
|
+
}),
|
|
130
|
+
claude: (validate: Validator) =>
|
|
131
|
+
typia.llm.application<IAutoBeAnalyzeReviewApplication, "claude">({
|
|
132
|
+
validate: {
|
|
133
|
+
process: validate,
|
|
134
|
+
},
|
|
135
|
+
}),
|
|
136
|
+
gemini: (validate: Validator) =>
|
|
137
|
+
typia.llm.application<IAutoBeAnalyzeReviewApplication, "gemini">({
|
|
138
|
+
validate: {
|
|
139
|
+
process: validate,
|
|
140
|
+
},
|
|
141
|
+
}),
|
|
99
142
|
};
|
|
143
|
+
|
|
144
|
+
type Validator = (
|
|
145
|
+
input: unknown,
|
|
146
|
+
) => IValidation<IAutoBeAnalyzeReviewApplication.IProps>;
|
|
147
|
+
|
|
148
|
+
const SOURCE = "analyzeReview" satisfies AutoBeEventSource;
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
AutoBeAnalyzeScenarioEvent,
|
|
7
7
|
AutoBeAssistantMessageHistory,
|
|
8
8
|
} from "@autobe/interface";
|
|
9
|
-
import { StringUtil } from "@autobe/utils";
|
|
10
9
|
import { ILlmApplication, ILlmSchema } from "@samchon/openapi";
|
|
11
10
|
import { IPointer } from "tstl";
|
|
12
11
|
import typia from "typia";
|
|
@@ -32,14 +31,8 @@ export const orchestrateAnalyzeScenario = async <
|
|
|
32
31
|
model: ctx.model,
|
|
33
32
|
build: (value) => (pointer.value = value),
|
|
34
33
|
}),
|
|
35
|
-
histories: transformAnalyzeSceHistories(ctx),
|
|
36
34
|
enforceFunctionCall: false,
|
|
37
|
-
|
|
38
|
-
Design a complete list of documents and user actors for this project.
|
|
39
|
-
Define user actors that can authenticate via API and create appropriate documentation files.
|
|
40
|
-
You must respect the number of documents specified by the user.
|
|
41
|
-
Note that the user's locale is in ${ctx.locale}.
|
|
42
|
-
`,
|
|
35
|
+
...transformAnalyzeSceHistories(ctx),
|
|
43
36
|
});
|
|
44
37
|
if (histories.at(-1)?.type === "assistantMessage")
|
|
45
38
|
return {
|
|
@@ -95,12 +88,6 @@ const collection = {
|
|
|
95
88
|
IAutoBeAnalyzeScenarioApplication,
|
|
96
89
|
"chatgpt"
|
|
97
90
|
>(),
|
|
98
|
-
claude: typia.llm.application<
|
|
99
|
-
|
|
100
|
-
"claude"
|
|
101
|
-
>(),
|
|
102
|
-
gemini: typia.llm.application<
|
|
103
|
-
IAutoBeAnalyzeScenarioApplication,
|
|
104
|
-
"gemini"
|
|
105
|
-
>(),
|
|
91
|
+
claude: typia.llm.application<IAutoBeAnalyzeScenarioApplication, "claude">(),
|
|
92
|
+
gemini: typia.llm.application<IAutoBeAnalyzeScenarioApplication, "gemini">(),
|
|
106
93
|
};
|
|
@@ -34,10 +34,9 @@ export const orchestrateAnalyzeWrite = async <Model extends ILlmSchema.Model>(
|
|
|
34
34
|
model: ctx.model,
|
|
35
35
|
pointer,
|
|
36
36
|
}),
|
|
37
|
-
histories: transformAnalyzeWriteHistories(ctx, props),
|
|
38
37
|
enforceFunctionCall: true,
|
|
39
38
|
promptCacheKey,
|
|
40
|
-
|
|
39
|
+
...transformAnalyzeWriteHistories(ctx, props),
|
|
41
40
|
});
|
|
42
41
|
if (pointer.value === null)
|
|
43
42
|
throw new Error("The Analyze Agent failed to create the document.");
|