@autobe/agent 0.17.1 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AutoBeMockAgent.d.ts +5 -5
- package/lib/agent/src/AutoBeAgent.d.ts +52 -0
- package/lib/{AutoBeAgent.js → agent/src/AutoBeAgent.js} +29 -1
- package/lib/agent/src/AutoBeAgent.js.map +1 -0
- package/lib/agent/src/AutoBeAgentBase.d.ts +18 -0
- package/lib/agent/src/AutoBeAgentBase.js.map +1 -0
- package/lib/agent/src/AutoBeMockAgent.d.ts +15 -0
- package/lib/{AutoBeMockAgent.js → agent/src/AutoBeMockAgent.js} +34 -4
- package/lib/agent/src/AutoBeMockAgent.js.map +1 -0
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +34 -0
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +1 -0
- package/lib/agent/src/context/AutoBeContext.d.ts +41 -0
- package/lib/agent/src/context/AutoBeContext.js.map +1 -0
- package/lib/agent/src/context/AutoBeState.d.ts +8 -0
- package/lib/agent/src/context/AutoBeState.js.map +1 -0
- package/lib/agent/src/context/AutoBeTokenUsage.d.ts +173 -0
- package/lib/{context → agent/src/context}/AutoBeTokenUsage.js +7 -0
- package/lib/agent/src/context/AutoBeTokenUsage.js.map +1 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.d.ts +116 -0
- package/lib/{context → agent/src/context}/AutoBeTokenUsageComponent.js +19 -2
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js.map +1 -0
- package/lib/agent/src/context/IAutoBeApplication.d.ts +107 -0
- package/lib/agent/src/context/IAutoBeApplication.js.map +1 -0
- package/lib/agent/src/context/IAutoBeApplicationProps.d.ts +4 -0
- package/lib/agent/src/context/IAutoBeApplicationProps.js.map +1 -0
- package/lib/agent/src/context/IAutoBeApplicationResult.d.ts +4 -0
- package/lib/agent/src/context/IAutoBeApplicationResult.js.map +1 -0
- package/lib/agent/src/context/assertSchemaModel.d.ts +2 -0
- package/lib/agent/src/context/assertSchemaModel.js.map +1 -0
- package/lib/agent/src/factory/createAgenticaHistory.d.ts +7 -0
- package/lib/agent/src/factory/createAgenticaHistory.js.map +1 -0
- package/lib/agent/src/factory/createAutoBeApplication.d.ts +7 -0
- package/lib/agent/src/factory/createAutoBeApplication.js.map +1 -0
- package/lib/agent/src/factory/createAutoBeContext.d.ts +19 -0
- package/lib/{factory → agent/src/factory}/createAutoBeContext.js +90 -17
- package/lib/agent/src/factory/createAutoBeContext.js.map +1 -0
- package/lib/agent/src/factory/createAutoBeState.d.ts +3 -0
- package/lib/agent/src/factory/createAutoBeState.js.map +1 -0
- package/lib/agent/src/factory/getAutoBeGenerated.d.ts +4 -0
- package/lib/{factory → agent/src/factory}/getAutoBeGenerated.js +3 -3
- package/lib/agent/src/factory/getAutoBeGenerated.js.map +1 -0
- package/lib/agent/src/factory/getAutoBeRealizeGenerated.d.ts +7 -0
- package/lib/agent/src/factory/getAutoBeRealizeGenerated.js.map +1 -0
- package/lib/agent/src/factory/index.d.ts +1 -0
- package/lib/agent/src/factory/index.js.map +1 -0
- package/lib/agent/src/index.d.ts +6 -0
- package/lib/agent/src/index.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js +46 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +30 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +49 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.d.ts +5 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js +64 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +6 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +265 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.d.ts +4 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +727 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +8 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +242 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +105 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +78 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.js +3 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +70 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.js +3 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.d.ts +2 -0
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.js.map +1 -0
- package/lib/agent/src/orchestrate/index.d.ts +5 -0
- package/lib/agent/src/orchestrate/index.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +34 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +62 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +5 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +49 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +28 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +51 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.d.ts +5 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +35 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +28 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +53 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterface.js +7 -2
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +4 -0
- package/lib/{orchestrate/interface/orchestrateInterfaceOperations.js → agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js} +227 -562
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceComplement.js +20 -32
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceEndpoints.js +40 -41
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceGroups.js +15 -25
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +1768 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +5 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +1317 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceSchemas.js +59 -71
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +7 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +467 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.d.ts +47 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.js +3 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +55 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.d.ts +24 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +108 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +126 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +96 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +75 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +91 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/utils/OpenApiEndpointComparator.d.ts +6 -0
- package/lib/agent/src/orchestrate/interface/utils/OpenApiEndpointComparator.js.map +1 -0
- package/lib/agent/src/orchestrate/internal/IProgress.d.ts +4 -0
- package/lib/agent/src/orchestrate/internal/IProgress.js +3 -0
- package/lib/agent/src/orchestrate/internal/IProgress.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.d.ts +3 -0
- package/lib/{orchestrate → agent/src/orchestrate}/prisma/histories/transformPrismaCorrectHistories.js +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.d.ts +8 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +59 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +48 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/prisma/orchestratePrisma.js +30 -13
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/prisma/orchestratePrismaComponent.js +43 -44
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/prisma/orchestratePrismaCorrect.js +121 -83
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.d.ts +5 -0
- package/lib/{orchestrate/prisma/orchestratePrismaSchemas.js → agent/src/orchestrate/prisma/orchestratePrismaReview.js} +139 -248
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.d.ts +5 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js +1625 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.d.ts +121 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.d.ts +142 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.d.ts +105 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.d.ts +99 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/ProviderCodeComparator.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/ProviderCodeComparator.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +40 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +80 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.d.ts +7 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +13 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +32 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +11 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +160 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/internal/compile.d.ts +7 -0
- package/lib/agent/src/orchestrate/realize/internal/compile.js +61 -0
- package/lib/agent/src/orchestrate/realize/internal/compile.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +113 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.d.ts +10 -0
- package/lib/{orchestrate → agent/src/orchestrate}/realize/orchestrateRealizeAuthorization.js +84 -70
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/realize/orchestrateRealizeAuthorizationCorrect.js +66 -52
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +9 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +351 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -0
- package/lib/{orchestrate/realize/orchestrateRealizePlanner.d.ts → agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts} +5 -3
- package/lib/{orchestrate/realize/orchestrateRealizePlanner.js → agent/src/orchestrate/realize/orchestrateRealizeScenario.js} +14 -24
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +9 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +340 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +92 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +27 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +345 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +56 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +2 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.d.ts +79 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +38 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +276 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/AuthorizationFileSystem.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/utils/AuthorizationFileSystem.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.d.ts +4 -0
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/InternalFileSystem.d.ts +8 -0
- package/lib/agent/src/orchestrate/realize/utils/InternalFileSystem.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/ProviderFileSystem.d.ts +3 -0
- package/lib/agent/src/orchestrate/realize/utils/ProviderFileSystem.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/replaceImportStatements.js +1 -0
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.d.ts +2 -0
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/filterTestFileName.d.ts +1 -0
- package/lib/agent/src/orchestrate/test/compile/filterTestFileName.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.d.ts +3 -0
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +5 -0
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -0
- package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestCorrectHistories.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -0
- package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestHistories.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +56 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -0
- package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestWriteHistories.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +179 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/test/orchestrateTest.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/test/orchestrateTest.js +4 -4
- package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/test/orchestrateTestCorrect.js +27 -43
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.d.ts +4 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +858 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/test/orchestrateTestWrite.js +53 -54
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +121 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunction.d.ts +8 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunction.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +134 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.d.ts +7 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +113 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteResult.d.ts +7 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +1 -0
- package/lib/agent/src/structures/IAutoBeConfig.d.ts +73 -0
- package/lib/agent/src/structures/IAutoBeConfig.js.map +1 -0
- package/lib/agent/src/structures/IAutoBeProps.d.ts +109 -0
- package/lib/agent/src/structures/IAutoBeProps.js.map +1 -0
- package/lib/agent/src/structures/IAutoBeVendor.d.ts +87 -0
- package/lib/agent/src/structures/IAutoBeVendor.js.map +1 -0
- package/lib/agent/src/utils/arrayToRecord.d.ts +17 -0
- package/lib/agent/src/utils/arrayToRecord.js.map +1 -0
- package/lib/agent/src/utils/backoffRetry.d.ts +22 -0
- package/lib/agent/src/utils/backoffRetry.js.map +1 -0
- package/lib/agent/src/utils/divideArray.d.ts +4 -0
- package/lib/agent/src/utils/divideArray.js.map +1 -0
- package/lib/agent/src/utils/emplaceMap.d.ts +1 -0
- package/lib/agent/src/utils/emplaceMap.js.map +1 -0
- package/lib/{orchestrate/realize/RealizePipe.d.ts → agent/src/utils/pipe.d.ts} +1 -1
- package/lib/agent/src/utils/pipe.js.map +1 -0
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +18 -16
- package/lib/context/AutoBeContext.d.ts +16 -5
- package/lib/index.mjs +8876 -4277
- package/lib/index.mjs.map +1 -1
- package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.d.ts +153 -0
- package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.js +3 -0
- package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.js.map +1 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +4 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +4 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +4 -0
- package/lib/orchestrate/analyze/orchestrateAnalyze.d.ts +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +6 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.d.ts +4 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -12
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +105 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +78 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +70 -0
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +4 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +2 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.d.ts +5 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.d.ts +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +5 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +7 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.d.ts +47 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.d.ts +2 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +6 -2
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +96 -0
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +91 -0
- package/lib/orchestrate/internal/IProgress.d.ts +4 -0
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.d.ts +8 -0
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaReview.d.ts +5 -0
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.d.ts +1 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.d.ts +2 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.d.ts +105 -0
- package/lib/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.d.ts +43 -153
- package/lib/orchestrate/realize/histories/transformRealizeAuthorization.d.ts +5 -0
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.d.ts +5 -0
- package/lib/orchestrate/realize/histories/transformRealizeCoderHistories.d.ts +7 -0
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +13 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +11 -0
- package/lib/orchestrate/realize/internal/compile.d.ts +7 -0
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +9 -0
- package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +91 -0
- package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +9 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +10 -3
- package/lib/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.d.ts +79 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +38 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +276 -0
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +4 -0
- package/lib/orchestrate/test/histories/transformTestHistories.d.ts +3 -0
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.d.ts +3 -0
- package/lib/orchestrate/test/histories/transformTestWriteHistories.d.ts +8 -0
- package/lib/orchestrate/test/orchestrateTestScenario.d.ts +2 -2
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +25 -24
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -1
- package/package.json +9 -9
- package/src/AutoBeAgent.ts +37 -3
- package/src/AutoBeMockAgent.ts +41 -11
- package/src/constants/AutoBeSystemPromptConstant.ts +18 -16
- package/src/context/AutoBeContext.ts +30 -4
- package/src/context/AutoBeTokenUsage.ts +8 -0
- package/src/context/AutoBeTokenUsageComponent.ts +20 -2
- package/src/factory/createAutoBeApplication.ts +3 -11
- package/src/factory/createAutoBeContext.ts +64 -1
- package/src/factory/getAutoBeGenerated.ts +3 -3
- package/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.ts +53 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +34 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +56 -0
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +61 -80
- package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +89 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +123 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +51 -52
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +108 -0
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +85 -0
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.ts +71 -0
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +40 -0
- package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +27 -0
- package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +45 -22
- package/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.ts +43 -0
- package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +63 -0
- package/src/orchestrate/interface/orchestrateInterface.ts +10 -2
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +106 -0
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +27 -44
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +28 -34
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +15 -32
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +207 -103
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +84 -0
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +72 -82
- package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +143 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.ts +49 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.ts +2 -1
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +6 -2
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +102 -0
- package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +98 -0
- package/src/orchestrate/internal/IProgress.ts +4 -0
- package/src/orchestrate/prisma/histories/transformPrismaReviewHistories.ts +66 -0
- package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +2 -2
- package/src/orchestrate/prisma/orchestratePrisma.ts +44 -15
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +16 -33
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +96 -58
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +118 -0
- package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +133 -139
- package/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.ts +2 -1
- package/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.ts +108 -0
- package/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.ts +43 -156
- package/src/orchestrate/realize/{transformRealizeAuthorization.ts → histories/transformRealizeAuthorization.ts} +14 -10
- package/src/orchestrate/realize/{transformRealizeAuthorizationCorrectHistories.ts → histories/transformRealizeAuthorizationCorrectHistories.ts} +9 -7
- package/src/orchestrate/realize/{transformRealizeCoderHistories.ts → histories/transformRealizeCoderHistories.ts} +6 -6
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +47 -0
- package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +184 -0
- package/src/orchestrate/realize/internal/compile.ts +84 -0
- package/src/orchestrate/realize/orchestrateRealize.ts +100 -9
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +45 -57
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +19 -41
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +118 -0
- package/src/orchestrate/realize/{orchestrateRealizePlanner.ts → orchestrateRealizeScenario.ts} +15 -15
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +120 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +11 -3
- package/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.ts +81 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.ts +43 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +282 -0
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +3 -1
- package/src/orchestrate/test/experimental/orchestrateTestCorrect.ast +5 -9
- package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +23 -22
- package/src/orchestrate/test/{transformTestCorrectHistories.ts → histories/transformTestCorrectHistories.ts} +2 -2
- package/src/orchestrate/test/{transformTestHistories.ts → histories/transformTestHistories.ts} +1 -1
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +70 -0
- package/src/orchestrate/test/{transformTestWriteHistories.ts → histories/transformTestWriteHistories.ts} +3 -3
- package/src/orchestrate/test/orchestrateTest.ts +5 -6
- package/src/orchestrate/test/orchestrateTestCorrect.ts +32 -62
- package/src/orchestrate/test/orchestrateTestScenario.ts +95 -158
- package/src/orchestrate/test/orchestrateTestWrite.ts +48 -71
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +25 -24
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +3 -1
- package/lib/AutoBeAgent.js.map +0 -1
- package/lib/AutoBeAgentBase.js.map +0 -1
- package/lib/AutoBeMockAgent.js.map +0 -1
- package/lib/constants/AutoBeSystemPromptConstant.js.map +0 -1
- package/lib/context/AutoBeContext.js.map +0 -1
- package/lib/context/AutoBeState.js.map +0 -1
- package/lib/context/AutoBeTokenUsage.js.map +0 -1
- package/lib/context/AutoBeTokenUsageComponent.js.map +0 -1
- package/lib/context/IAutoBeApplication.js.map +0 -1
- package/lib/context/IAutoBeApplicationProps.js.map +0 -1
- package/lib/context/IAutoBeApplicationResult.js.map +0 -1
- package/lib/context/assertSchemaModel.js.map +0 -1
- package/lib/factory/createAgenticaHistory.js.map +0 -1
- package/lib/factory/createAutoBeApplication.js.map +0 -1
- package/lib/factory/createAutoBeContext.js.map +0 -1
- package/lib/factory/createAutoBeState.js.map +0 -1
- package/lib/factory/getAutoBeGenerated.js.map +0 -1
- package/lib/factory/getAutoBeRealizeGenerated.js.map +0 -1
- package/lib/factory/index.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.d.ts +0 -45
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js +0 -27
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js.map +0 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzePointer.d.ts +0 -9
- package/lib/orchestrate/analyze/AutoBeAnalyzePointer.js +0 -3
- package/lib/orchestrate/analyze/AutoBeAnalyzePointer.js.map +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyze.js +0 -98
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.d.ts +0 -5
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js +0 -561
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js.map +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.d.ts +0 -12
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js +0 -395
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js.map +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +0 -347
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +0 -1
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.d.ts +0 -68
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.js +0 -3
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.js.map +0 -1
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.d.ts +0 -5
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js +0 -27
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js.map +0 -1
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.d.ts +0 -12
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js +0 -78
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js.map +0 -1
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.d.ts +0 -16
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js +0 -79
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js.map +0 -1
- package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +0 -1
- package/lib/orchestrate/index.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +0 -62
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +0 -28
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +0 -28
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +0 -28
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +0 -28
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterface.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js.map +0 -1
- package/lib/orchestrate/interface/utils/OpenApiEndpointComparator.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaHistories.d.ts +0 -3
- package/lib/orchestrate/prisma/histories/transformPrismaHistories.js +0 -55
- package/lib/orchestrate/prisma/histories/transformPrismaHistories.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +0 -48
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrisma.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +0 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.js.map +0 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.js.map +0 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.js.map +0 -1
- package/lib/orchestrate/realize/ProviderCodeComparator.js.map +0 -1
- package/lib/orchestrate/realize/RealizePipe.js +0 -14
- package/lib/orchestrate/realize/RealizePipe.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealize.js +0 -63
- package/lib/orchestrate/realize/orchestrateRealize.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizeCoder.d.ts +0 -26
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js +0 -420
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizePlanner.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js.map +0 -1
- package/lib/orchestrate/realize/transformRealizeAuthorization.d.ts +0 -4
- package/lib/orchestrate/realize/transformRealizeAuthorization.js +0 -39
- package/lib/orchestrate/realize/transformRealizeAuthorization.js.map +0 -1
- package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.d.ts +0 -5
- package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.js +0 -80
- package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.js.map +0 -1
- package/lib/orchestrate/realize/transformRealizeCoderHistories.d.ts +0 -7
- package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +0 -1
- package/lib/orchestrate/realize/utils/AuthorizationFileSystem.js.map +0 -1
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.js.map +0 -1
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js.map +0 -1
- package/lib/orchestrate/realize/utils/InternalFileSystem.js.map +0 -1
- package/lib/orchestrate/realize/utils/ProviderFileSystem.js.map +0 -1
- package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +0 -1
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.d.ts +0 -11
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js +0 -221
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js.map +0 -1
- package/lib/orchestrate/test/compile/completeTestCode.js.map +0 -1
- package/lib/orchestrate/test/compile/filterTestFileName.js.map +0 -1
- package/lib/orchestrate/test/compile/getTestExternalDeclarations.js.map +0 -1
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +0 -1
- package/lib/orchestrate/test/orchestrateTest.js.map +0 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +0 -1
- package/lib/orchestrate/test/orchestrateTestScenario.js +0 -866
- package/lib/orchestrate/test/orchestrateTestScenario.js.map +0 -1
- package/lib/orchestrate/test/orchestrateTestWrite.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestFunction.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +0 -1
- package/lib/orchestrate/test/transformTestCorrectHistories.js.map +0 -1
- package/lib/orchestrate/test/transformTestHistories.js.map +0 -1
- package/lib/orchestrate/test/transformTestScenarioHistories.d.ts +0 -3
- package/lib/orchestrate/test/transformTestScenarioHistories.js +0 -100
- package/lib/orchestrate/test/transformTestScenarioHistories.js.map +0 -1
- package/lib/orchestrate/test/transformTestWriteHistories.js +0 -178
- package/lib/orchestrate/test/transformTestWriteHistories.js.map +0 -1
- package/lib/structures/IAutoBeConfig.js.map +0 -1
- package/lib/structures/IAutoBeProps.js.map +0 -1
- package/lib/structures/IAutoBeVendor.js.map +0 -1
- package/lib/utils/arrayToRecord.js.map +0 -1
- package/lib/utils/backoffRetry.js.map +0 -1
- package/lib/utils/divideArray.js.map +0 -1
- package/lib/utils/emplaceMap.js.map +0 -1
- package/lib/utils/enforceToolCall.d.ts +0 -3
- package/lib/utils/enforceToolCall.js +0 -13
- package/lib/utils/enforceToolCall.js.map +0 -1
- package/lib/utils/forceRetry.d.ts +0 -1
- package/lib/utils/forceRetry.js +0 -26
- package/lib/utils/forceRetry.js.map +0 -1
- package/lib/utils/pipe.js.map +0 -1
- package/src/orchestrate/analyze/AutoBeAnalyzeFileSystem.ts +0 -58
- package/src/orchestrate/analyze/AutoBeAnalyzePointer.ts +0 -10
- package/src/orchestrate/analyze/orchestrateAnalyzeComposer.ts +0 -112
- package/src/orchestrate/analyze/orchestrateAnalyzeReviewer.ts +0 -131
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.ts +0 -75
- package/src/orchestrate/analyze/transformAnalyzeReviewerHistories.ts +0 -31
- package/src/orchestrate/analyze/transformAnalyzeWriteHistories.ts +0 -94
- package/src/orchestrate/analyze/writeDocumentUntilReviewPassed.ts +0 -96
- package/src/orchestrate/prisma/histories/transformPrismaHistories.ts +0 -59
- package/src/orchestrate/realize/RealizePipe.ts +0 -39
- package/src/orchestrate/realize/orchestrateRealizeCoder.ts +0 -182
- package/src/orchestrate/realize/writeCodeUntilCompilePassed.ts +0 -308
- package/src/orchestrate/test/transformTestScenarioHistories.ts +0 -105
- package/src/utils/enforceToolCall.ts +0 -13
- package/src/utils/forceRetry.ts +0 -13
- /package/lib/{AutoBeAgentBase.js → agent/src/AutoBeAgentBase.js} +0 -0
- /package/lib/{constants → agent/src/constants}/AutoBeSystemPromptConstant.js +0 -0
- /package/lib/{context → agent/src/context}/AutoBeContext.js +0 -0
- /package/lib/{context → agent/src/context}/AutoBeState.js +0 -0
- /package/lib/{context → agent/src/context}/IAutoBeApplication.js +0 -0
- /package/lib/{context → agent/src/context}/IAutoBeApplicationProps.js +0 -0
- /package/lib/{context → agent/src/context}/IAutoBeApplicationResult.js +0 -0
- /package/lib/{context → agent/src/context}/assertSchemaModel.js +0 -0
- /package/lib/{factory → agent/src/factory}/createAgenticaHistory.js +0 -0
- /package/lib/{factory → agent/src/factory}/createAutoBeApplication.js +0 -0
- /package/lib/{factory → agent/src/factory}/createAutoBeState.js +0 -0
- /package/lib/{factory → agent/src/factory}/getAutoBeRealizeGenerated.js +0 -0
- /package/lib/{factory → agent/src/factory}/index.js +0 -0
- /package/lib/{index.js → agent/src/index.js} +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/facade/transformFacadeStateMessage.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/index.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/histories/transformInterfaceAssetHistories.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/histories/transformInterfacePrerequisiteHistories.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceComplementApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceEndpointApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceGroupApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceOperationApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceSchemaApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/utils/OpenApiEndpointComparator.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/prisma/histories/transformPrismaComponentsHistories.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/prisma/structures/IAutoBePrismaComponentApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/prisma/structures/IAutoBePrismaCorrectApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/prisma/structures/IAutoBePrismaSchemaApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/ProviderCodeComparator.js +0 -0
- /package/lib/{orchestrate/realize → agent/src/orchestrate/realize/histories}/transformRealizeCoderHistories.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeAuthorizationApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeCoderApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeCompile.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeFailedSymbol.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/AuthorizationFileSystem.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/AutoBeRealizeAuthorizationFileSystem.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/InternalFileSystem.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/ProviderFileSystem.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/completeTestCode.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/filterTestFileName.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/getTestExternalDeclarations.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/getTestScenarioArtifacts.js +0 -0
- /package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestCorrectHistories.js +0 -0
- /package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestHistories.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestCorrectApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestFunction.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestScenarioApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestScenarioArtifacts.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestWriteApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestWriteResult.js +0 -0
- /package/lib/{structures → agent/src/structures}/IAutoBeConfig.js +0 -0
- /package/lib/{structures → agent/src/structures}/IAutoBeProps.js +0 -0
- /package/lib/{structures → agent/src/structures}/IAutoBeVendor.js +0 -0
- /package/lib/{utils → agent/src/utils}/arrayToRecord.js +0 -0
- /package/lib/{utils → agent/src/utils}/backoffRetry.js +0 -0
- /package/lib/{utils → agent/src/utils}/divideArray.js +0 -0
- /package/lib/{utils → agent/src/utils}/emplaceMap.js +0 -0
- /package/lib/{utils → agent/src/utils}/pipe.js +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
+
import { AutoBePrisma } from "@autobe/interface";
|
|
3
|
+
import { v4 } from "uuid";
|
|
4
|
+
|
|
5
|
+
import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
|
|
6
|
+
|
|
7
|
+
export const transformPrismaReviewHistories = (props: {
|
|
8
|
+
analysis: Record<string, string>;
|
|
9
|
+
application: AutoBePrisma.IApplication;
|
|
10
|
+
schemas: Record<string, string>;
|
|
11
|
+
component: AutoBePrisma.IComponent;
|
|
12
|
+
}): Array<
|
|
13
|
+
IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage
|
|
14
|
+
> => {
|
|
15
|
+
return [
|
|
16
|
+
{
|
|
17
|
+
id: v4(),
|
|
18
|
+
created_at: new Date().toISOString(),
|
|
19
|
+
type: "systemMessage",
|
|
20
|
+
text: AutoBeSystemPromptConstant.PRISMA_SCHEMA,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: v4(),
|
|
24
|
+
created_at: new Date().toISOString(),
|
|
25
|
+
type: "assistantMessage",
|
|
26
|
+
text: [
|
|
27
|
+
"Here is the requirement analysis report given by the user:",
|
|
28
|
+
"",
|
|
29
|
+
"```json",
|
|
30
|
+
JSON.stringify(props.analysis),
|
|
31
|
+
"```",
|
|
32
|
+
"",
|
|
33
|
+
"Reading the requirement analysis report, you AI made below AST definition for the database design:",
|
|
34
|
+
"",
|
|
35
|
+
"```json",
|
|
36
|
+
JSON.stringify(props.application),
|
|
37
|
+
"```",
|
|
38
|
+
"",
|
|
39
|
+
"And here are the Prisma schema files generated (compiled) from the above AST:",
|
|
40
|
+
"",
|
|
41
|
+
"```prisma",
|
|
42
|
+
JSON.stringify(props.schemas),
|
|
43
|
+
"```",
|
|
44
|
+
].join("\n"),
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: v4(),
|
|
48
|
+
created_at: new Date().toISOString(),
|
|
49
|
+
type: "systemMessage",
|
|
50
|
+
text: AutoBeSystemPromptConstant.PRISMA_REVIEW,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: v4(),
|
|
54
|
+
created_at: new Date().toISOString(),
|
|
55
|
+
type: "assistantMessage",
|
|
56
|
+
text: [
|
|
57
|
+
`Now, please review the tables in the "${props.component.namespace}" namespace.`,
|
|
58
|
+
"",
|
|
59
|
+
"Focus your review exclusively on these tables.",
|
|
60
|
+
"",
|
|
61
|
+
"**Tables in this namespace:**",
|
|
62
|
+
...props.component.tables.map((table) => `- ${table}`),
|
|
63
|
+
].join("\n"),
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
};
|
|
@@ -7,7 +7,7 @@ import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromp
|
|
|
7
7
|
export const transformPrismaSchemaHistories = (
|
|
8
8
|
requirementAnalysisReport: Record<string, string>,
|
|
9
9
|
targetComponent: AutoBePrisma.IComponent,
|
|
10
|
-
|
|
10
|
+
otherTables: string[],
|
|
11
11
|
): Array<
|
|
12
12
|
IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage
|
|
13
13
|
> => {
|
|
@@ -28,8 +28,8 @@ export const transformPrismaSchemaHistories = (
|
|
|
28
28
|
"```",
|
|
29
29
|
JSON.stringify({
|
|
30
30
|
requirementAnalysisReport,
|
|
31
|
-
otherComponents,
|
|
32
31
|
targetComponent,
|
|
32
|
+
otherTables,
|
|
33
33
|
}),
|
|
34
34
|
"```",
|
|
35
35
|
].join("\n"),
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AutoBeAssistantMessageHistory,
|
|
3
|
+
AutoBePrisma,
|
|
3
4
|
AutoBePrismaCompleteEvent,
|
|
4
5
|
AutoBePrismaComponentsEvent,
|
|
5
6
|
AutoBePrismaHistory,
|
|
7
|
+
AutoBePrismaReviewEvent,
|
|
6
8
|
IAutoBeCompiler,
|
|
7
9
|
IAutoBePrismaValidation,
|
|
8
10
|
} from "@autobe/interface";
|
|
@@ -13,6 +15,7 @@ import { AutoBeContext } from "../../context/AutoBeContext";
|
|
|
13
15
|
import { IAutoBeApplicationProps } from "../../context/IAutoBeApplicationProps";
|
|
14
16
|
import { orchestratePrismaComponents } from "./orchestratePrismaComponent";
|
|
15
17
|
import { orchestratePrismaCorrect } from "./orchestratePrismaCorrect";
|
|
18
|
+
import { orchestratePrismaReview } from "./orchestratePrismaReview";
|
|
16
19
|
import { orchestratePrismaSchemas } from "./orchestratePrismaSchemas";
|
|
17
20
|
|
|
18
21
|
export const orchestratePrisma = async <Model extends ILlmSchema.Model>(
|
|
@@ -28,27 +31,52 @@ export const orchestratePrisma = async <Model extends ILlmSchema.Model>(
|
|
|
28
31
|
});
|
|
29
32
|
|
|
30
33
|
// COMPONENTS
|
|
31
|
-
const
|
|
34
|
+
const componentEvent:
|
|
32
35
|
| AutoBeAssistantMessageHistory
|
|
33
36
|
| AutoBePrismaComponentsEvent = await orchestratePrismaComponents(ctx);
|
|
34
|
-
if (
|
|
35
|
-
return ctx.assistantMessage(
|
|
36
|
-
else ctx.dispatch(
|
|
37
|
+
if (componentEvent.type === "assistantMessage")
|
|
38
|
+
return ctx.assistantMessage(componentEvent);
|
|
39
|
+
else ctx.dispatch(componentEvent);
|
|
37
40
|
|
|
38
41
|
// CONSTRUCT AST DATA
|
|
39
|
-
const
|
|
42
|
+
const schemaEvents: AutoBePrismaSchemasEvent[] =
|
|
43
|
+
await orchestratePrismaSchemas(ctx, componentEvent.components);
|
|
44
|
+
const application: AutoBePrisma.IApplication = {
|
|
45
|
+
files: schemaEvents.map((e) => e.file),
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
// REVIEW
|
|
49
|
+
const compiler: IAutoBeCompiler = await ctx.compiler();
|
|
50
|
+
const reviewSchemas: Record<string, string> = await compiler.prisma.write(
|
|
51
|
+
application,
|
|
52
|
+
"postgres",
|
|
53
|
+
);
|
|
54
|
+
const reviewEvents: AutoBePrismaReviewEvent[] = await orchestratePrismaReview(
|
|
40
55
|
ctx,
|
|
41
|
-
|
|
56
|
+
application,
|
|
57
|
+
reviewSchemas,
|
|
58
|
+
componentEvent.components,
|
|
42
59
|
);
|
|
60
|
+
for (const event of reviewEvents) {
|
|
61
|
+
const file: AutoBePrisma.IFile | undefined = application.files.find(
|
|
62
|
+
(f) => f.filename === event.filename,
|
|
63
|
+
);
|
|
64
|
+
if (file === undefined) continue;
|
|
65
|
+
for (const modification of event.modifications) {
|
|
66
|
+
const index: number = file.models.findIndex(
|
|
67
|
+
(m) => m.name === modification.name,
|
|
68
|
+
);
|
|
69
|
+
if (index === -1) file.models.push(modification);
|
|
70
|
+
else file.models[index] = modification;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
43
73
|
|
|
44
74
|
// VALIDATE
|
|
45
|
-
const result: IAutoBePrismaValidation = await orchestratePrismaCorrect(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const compiler: IAutoBeCompiler = await ctx.compiler();
|
|
51
|
-
const schemas: Record<string, string> = await compiler.prisma.write(
|
|
75
|
+
const result: IAutoBePrismaValidation = await orchestratePrismaCorrect(
|
|
76
|
+
ctx,
|
|
77
|
+
application,
|
|
78
|
+
);
|
|
79
|
+
const finalSchemas: Record<string, string> = await compiler.prisma.write(
|
|
52
80
|
result.data,
|
|
53
81
|
"postgres",
|
|
54
82
|
);
|
|
@@ -57,11 +85,12 @@ export const orchestratePrisma = async <Model extends ILlmSchema.Model>(
|
|
|
57
85
|
return ctx.dispatch({
|
|
58
86
|
type: "prismaComplete",
|
|
59
87
|
result,
|
|
60
|
-
schemas,
|
|
88
|
+
schemas: finalSchemas,
|
|
61
89
|
compiled: await compiler.prisma.compile({
|
|
62
|
-
files:
|
|
90
|
+
files: finalSchemas,
|
|
63
91
|
}),
|
|
64
92
|
step: ctx.state().analyze?.step ?? 0,
|
|
93
|
+
elapsed: new Date().getTime() - start.getTime(),
|
|
65
94
|
created_at: new Date().toISOString(),
|
|
66
95
|
} satisfies AutoBePrismaCompleteEvent);
|
|
67
96
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgenticaAssistantMessageHistory,
|
|
3
3
|
IAgenticaController,
|
|
4
|
-
MicroAgentica,
|
|
5
|
-
MicroAgenticaHistory,
|
|
6
4
|
} from "@agentica/core";
|
|
7
5
|
import { AutoBeAssistantMessageHistory } from "@autobe/interface";
|
|
8
6
|
import { AutoBePrismaComponentsEvent } from "@autobe/interface/src/events/AutoBePrismaComponentsEvent";
|
|
@@ -20,39 +18,25 @@ export async function orchestratePrismaComponents<
|
|
|
20
18
|
Model extends ILlmSchema.Model,
|
|
21
19
|
>(
|
|
22
20
|
ctx: AutoBeContext<Model>,
|
|
23
|
-
|
|
21
|
+
message: string = "Please extract files and tables from the given documents.",
|
|
24
22
|
): Promise<AutoBeAssistantMessageHistory | AutoBePrismaComponentsEvent> {
|
|
25
23
|
const start: Date = new Date();
|
|
26
24
|
const pointer: IPointer<IAutoBePrismaComponentApplication.IProps | null> = {
|
|
27
25
|
value: null,
|
|
28
26
|
};
|
|
29
27
|
const prefix: string | null = ctx.state().analyze?.prefix ?? null;
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
vendor: ctx.vendor,
|
|
33
|
-
config: {
|
|
34
|
-
...(ctx.config ?? {}),
|
|
35
|
-
executor: {
|
|
36
|
-
describe: null,
|
|
37
|
-
},
|
|
38
|
-
},
|
|
28
|
+
const { histories, tokenUsage } = await ctx.conversate({
|
|
29
|
+
source: "prismaComponents",
|
|
39
30
|
histories: transformPrismaComponentsHistories(ctx.state(), prefix),
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
31
|
+
controller: createController({
|
|
32
|
+
model: ctx.model,
|
|
33
|
+
build: (next) => {
|
|
34
|
+
pointer.value = next;
|
|
35
|
+
},
|
|
36
|
+
}),
|
|
37
|
+
enforceFunctionCall: false,
|
|
38
|
+
message,
|
|
48
39
|
});
|
|
49
|
-
|
|
50
|
-
const histories: MicroAgenticaHistory<Model>[] = await agentica
|
|
51
|
-
.conversate(content)
|
|
52
|
-
.finally(() => {
|
|
53
|
-
const tokenUsage = agentica.getTokenUsage().aggregate;
|
|
54
|
-
ctx.usage().record(tokenUsage, ["prisma"]);
|
|
55
|
-
});
|
|
56
40
|
if (histories.at(-1)?.type === "assistantMessage")
|
|
57
41
|
return {
|
|
58
42
|
...(histories.at(-1)! as AgenticaAssistantMessageHistory),
|
|
@@ -70,11 +54,12 @@ export async function orchestratePrismaComponents<
|
|
|
70
54
|
review: pointer.value.review,
|
|
71
55
|
decision: pointer.value.decision,
|
|
72
56
|
components: pointer.value.components,
|
|
57
|
+
tokenUsage,
|
|
73
58
|
step: ctx.state().analyze?.step ?? 0,
|
|
74
59
|
};
|
|
75
60
|
}
|
|
76
61
|
|
|
77
|
-
function
|
|
62
|
+
function createController<Model extends ILlmSchema.Model>(props: {
|
|
78
63
|
model: Model;
|
|
79
64
|
build: (next: IAutoBePrismaComponentApplication.IProps) => void;
|
|
80
65
|
}): IAgenticaController.IClass<Model> {
|
|
@@ -82,7 +67,7 @@ function createApplication<Model extends ILlmSchema.Model>(props: {
|
|
|
82
67
|
|
|
83
68
|
const application: ILlmApplication<Model> = collection[
|
|
84
69
|
props.model
|
|
85
|
-
] as unknown as ILlmApplication<Model>;
|
|
70
|
+
] satisfies ILlmApplication<any> as unknown as ILlmApplication<Model>;
|
|
86
71
|
return {
|
|
87
72
|
protocol: "class",
|
|
88
73
|
name: "Prisma Extract Files and Tables",
|
|
@@ -97,14 +82,12 @@ function createApplication<Model extends ILlmSchema.Model>(props: {
|
|
|
97
82
|
|
|
98
83
|
const claude = typia.llm.application<
|
|
99
84
|
IAutoBePrismaComponentApplication,
|
|
100
|
-
"claude"
|
|
101
|
-
{ reference: true }
|
|
85
|
+
"claude"
|
|
102
86
|
>();
|
|
103
87
|
const collection = {
|
|
104
88
|
chatgpt: typia.llm.application<
|
|
105
89
|
IAutoBePrismaComponentApplication,
|
|
106
|
-
"chatgpt"
|
|
107
|
-
{ reference: true }
|
|
90
|
+
"chatgpt"
|
|
108
91
|
>(),
|
|
109
92
|
claude,
|
|
110
93
|
llama: claude,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { IAgenticaController
|
|
1
|
+
import { IAgenticaController } from "@agentica/core";
|
|
2
2
|
import {
|
|
3
3
|
AutoBePrisma,
|
|
4
|
+
AutoBePrismaCorrectEvent,
|
|
4
5
|
IAutoBeCompiler,
|
|
5
6
|
IAutoBePrismaValidation,
|
|
6
7
|
} from "@autobe/interface";
|
|
@@ -10,7 +11,6 @@ import typia from "typia";
|
|
|
10
11
|
|
|
11
12
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
12
13
|
import { assertSchemaModel } from "../../context/assertSchemaModel";
|
|
13
|
-
import { enforceToolCall } from "../../utils/enforceToolCall";
|
|
14
14
|
import { transformPrismaCorrectHistories } from "./histories/transformPrismaCorrectHistories";
|
|
15
15
|
import { IAutoBePrismaCorrectApplication } from "./structures/IAutoBePrismaCorrectApplication";
|
|
16
16
|
|
|
@@ -27,10 +27,10 @@ export function orchestratePrismaCorrect<Model extends ILlmSchema.Model>(
|
|
|
27
27
|
return true;
|
|
28
28
|
});
|
|
29
29
|
application.files = application.files.filter((f) => f.models.length !== 0);
|
|
30
|
-
return
|
|
30
|
+
return iterate(ctx, application, life);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
async function
|
|
33
|
+
async function iterate<Model extends ILlmSchema.Model>(
|
|
34
34
|
ctx: AutoBeContext<Model>,
|
|
35
35
|
application: AutoBePrisma.IApplication,
|
|
36
36
|
life: number,
|
|
@@ -57,82 +57,114 @@ async function step<Model extends ILlmSchema.Model>(
|
|
|
57
57
|
step: ctx.state().analyze?.step ?? 0,
|
|
58
58
|
created_at: new Date().toISOString(),
|
|
59
59
|
});
|
|
60
|
+
const next: IExecutionResult = await process(ctx, result);
|
|
61
|
+
return iterate(ctx, next.correction, life - 1);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async function process<Model extends ILlmSchema.Model>(
|
|
65
|
+
ctx: AutoBeContext<Model>,
|
|
66
|
+
failure: IAutoBePrismaValidation.IFailure,
|
|
67
|
+
capacity: number = 8,
|
|
68
|
+
): Promise<IExecutionResult> {
|
|
69
|
+
const count: number = getTableCount(failure);
|
|
70
|
+
if (count <= capacity) return execute(ctx, failure);
|
|
60
71
|
|
|
72
|
+
let correction: AutoBePrisma.IApplication = failure.data;
|
|
73
|
+
const volume: number = Math.ceil(count / capacity);
|
|
74
|
+
const plannings: string[] = [];
|
|
75
|
+
const models: Record<string, AutoBePrisma.IModel> = {};
|
|
76
|
+
let i: number = 0;
|
|
77
|
+
|
|
78
|
+
while (i++ < volume && failure.errors.length !== 0) {
|
|
79
|
+
const next: IExecutionResult = await execute(ctx, {
|
|
80
|
+
...failure,
|
|
81
|
+
errors: (() => {
|
|
82
|
+
const unique: Set<string | null> = new Set();
|
|
83
|
+
const errors: IAutoBePrismaValidation.IError[] = [];
|
|
84
|
+
for (const err of failure.errors) {
|
|
85
|
+
unique.add(err.table ?? null);
|
|
86
|
+
if (unique.size > capacity) break;
|
|
87
|
+
else errors.push(err);
|
|
88
|
+
}
|
|
89
|
+
return errors;
|
|
90
|
+
})(),
|
|
91
|
+
});
|
|
92
|
+
plannings.push(next.planning);
|
|
93
|
+
for (const m of next.models) models[m.name] = m;
|
|
94
|
+
|
|
95
|
+
const compiler: IAutoBeCompiler = await ctx.compiler();
|
|
96
|
+
const result: IAutoBePrismaValidation = await compiler.prisma.validate(
|
|
97
|
+
next.correction,
|
|
98
|
+
);
|
|
99
|
+
correction = next.correction;
|
|
100
|
+
if (result.success === true) break;
|
|
101
|
+
else failure = result;
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
planning: plannings.join("\n\n"),
|
|
105
|
+
models: Object.values(models),
|
|
106
|
+
correction,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
async function execute<Model extends ILlmSchema.Model>(
|
|
111
|
+
ctx: AutoBeContext<Model>,
|
|
112
|
+
failure: IAutoBePrismaValidation.IFailure,
|
|
113
|
+
): Promise<IExecutionResult> {
|
|
114
|
+
// PREPARE AGENTICA
|
|
61
115
|
const pointer: IPointer<IAutoBePrismaCorrectApplication.IProps | null> = {
|
|
62
116
|
value: null,
|
|
63
117
|
};
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
118
|
+
const { tokenUsage } = await ctx.conversate({
|
|
119
|
+
source: "prismaCorrect",
|
|
120
|
+
histories: transformPrismaCorrectHistories(failure),
|
|
121
|
+
controller: createController({
|
|
122
|
+
model: ctx.model,
|
|
123
|
+
build: (next) => {
|
|
124
|
+
pointer.value = next;
|
|
71
125
|
},
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
createApplication({
|
|
76
|
-
model: ctx.model,
|
|
77
|
-
build: (next) => {
|
|
78
|
-
pointer.value = next;
|
|
79
|
-
},
|
|
80
|
-
}),
|
|
81
|
-
],
|
|
82
|
-
});
|
|
83
|
-
enforceToolCall(agentica);
|
|
84
|
-
|
|
85
|
-
// REQUEST CORRECTION
|
|
86
|
-
await agentica
|
|
87
|
-
.conversate(
|
|
126
|
+
}),
|
|
127
|
+
enforceFunctionCall: true,
|
|
128
|
+
message:
|
|
88
129
|
"Resolve the compilation errors in the provided Prisma schema files.",
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
ctx.usage().record(tokenUsage, ["prisma"]);
|
|
93
|
-
});
|
|
94
|
-
if (pointer.value === null) {
|
|
95
|
-
console.error(
|
|
130
|
+
});
|
|
131
|
+
if (pointer.value === null)
|
|
132
|
+
throw new Error(
|
|
96
133
|
"Unreachable error: PrismaCompilerAgent.pointer.value is null",
|
|
97
134
|
);
|
|
98
|
-
return result; // unreachable
|
|
99
|
-
}
|
|
100
|
-
|
|
101
135
|
const correction: AutoBePrisma.IApplication = {
|
|
102
|
-
files:
|
|
136
|
+
files: failure.data.files.map((file) => ({
|
|
103
137
|
filename: file.filename,
|
|
104
138
|
namespace: file.namespace,
|
|
105
139
|
models: file.models.map((model) => {
|
|
106
|
-
const newbie = pointer.value
|
|
140
|
+
const newbie = pointer.value?.models.find((m) => m.name === model.name);
|
|
107
141
|
return newbie ?? model;
|
|
108
142
|
}),
|
|
109
143
|
})),
|
|
110
144
|
};
|
|
111
145
|
ctx.dispatch({
|
|
112
146
|
type: "prismaCorrect",
|
|
113
|
-
failure
|
|
114
|
-
correction,
|
|
147
|
+
failure,
|
|
115
148
|
planning: pointer.value.planning,
|
|
149
|
+
correction: correction,
|
|
150
|
+
tokenUsage,
|
|
116
151
|
step: ctx.state().analyze?.step ?? 0,
|
|
117
152
|
created_at: new Date().toISOString(),
|
|
118
|
-
});
|
|
119
|
-
return
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
},
|
|
124
|
-
life - 1,
|
|
125
|
-
);
|
|
153
|
+
} satisfies AutoBePrismaCorrectEvent);
|
|
154
|
+
return {
|
|
155
|
+
...pointer.value,
|
|
156
|
+
correction,
|
|
157
|
+
};
|
|
126
158
|
}
|
|
127
159
|
|
|
128
|
-
function
|
|
160
|
+
function createController<Model extends ILlmSchema.Model>(props: {
|
|
129
161
|
model: Model;
|
|
130
162
|
build: (next: IAutoBePrismaCorrectApplication.IProps) => void;
|
|
131
163
|
}): IAgenticaController.IClass<Model> {
|
|
132
164
|
assertSchemaModel(props.model);
|
|
133
165
|
const application: ILlmApplication<Model> = collection[
|
|
134
166
|
props.model
|
|
135
|
-
] as unknown as ILlmApplication<Model>;
|
|
167
|
+
] satisfies ILlmApplication<any> as unknown as ILlmApplication<Model>;
|
|
136
168
|
return {
|
|
137
169
|
protocol: "class",
|
|
138
170
|
name: "Prisma Compiler",
|
|
@@ -145,19 +177,25 @@ function createApplication<Model extends ILlmSchema.Model>(props: {
|
|
|
145
177
|
};
|
|
146
178
|
}
|
|
147
179
|
|
|
180
|
+
const getTableCount = (failure: IAutoBePrismaValidation.IFailure): number => {
|
|
181
|
+
const unique: Set<string | null> = new Set(
|
|
182
|
+
failure.errors.map((error) => error.table ?? null),
|
|
183
|
+
);
|
|
184
|
+
return unique.size;
|
|
185
|
+
};
|
|
186
|
+
|
|
148
187
|
const claude = typia.llm.application<
|
|
149
188
|
IAutoBePrismaCorrectApplication,
|
|
150
|
-
"claude"
|
|
151
|
-
{ reference: true }
|
|
189
|
+
"claude"
|
|
152
190
|
>();
|
|
153
191
|
const collection = {
|
|
154
|
-
chatgpt: typia.llm.application<
|
|
155
|
-
IAutoBePrismaCorrectApplication,
|
|
156
|
-
"chatgpt",
|
|
157
|
-
{ reference: true }
|
|
158
|
-
>(),
|
|
192
|
+
chatgpt: typia.llm.application<IAutoBePrismaCorrectApplication, "chatgpt">(),
|
|
159
193
|
claude,
|
|
160
194
|
llama: claude,
|
|
161
195
|
deepseek: claude,
|
|
162
196
|
"3.1": claude,
|
|
163
197
|
};
|
|
198
|
+
|
|
199
|
+
interface IExecutionResult extends IAutoBePrismaCorrectApplication.IProps {
|
|
200
|
+
correction: AutoBePrisma.IApplication;
|
|
201
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { IAgenticaController } from "@agentica/core";
|
|
2
|
+
import { AutoBePrisma } from "@autobe/interface";
|
|
3
|
+
import { AutoBePrismaReviewEvent } from "@autobe/interface/src/events/AutoBePrismaReviewEvent";
|
|
4
|
+
import { ILlmApplication, ILlmSchema } from "@samchon/openapi";
|
|
5
|
+
import { IPointer } from "tstl";
|
|
6
|
+
import typia from "typia";
|
|
7
|
+
|
|
8
|
+
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
9
|
+
import { assertSchemaModel } from "../../context/assertSchemaModel";
|
|
10
|
+
import { IProgress } from "../internal/IProgress";
|
|
11
|
+
import { transformPrismaReviewHistories } from "./histories/transformPrismaReviewHistories";
|
|
12
|
+
import { IAutoBePrismaReviewApplication } from "./structures/IAutoBePrismaReviewApplication";
|
|
13
|
+
|
|
14
|
+
export async function orchestratePrismaReview<Model extends ILlmSchema.Model>(
|
|
15
|
+
ctx: AutoBeContext<Model>,
|
|
16
|
+
application: AutoBePrisma.IApplication,
|
|
17
|
+
schemas: Record<string, string>,
|
|
18
|
+
componentList: AutoBePrisma.IComponent[],
|
|
19
|
+
): Promise<AutoBePrismaReviewEvent[]> {
|
|
20
|
+
const progress: IProgress = {
|
|
21
|
+
completed: 0,
|
|
22
|
+
total: componentList.length,
|
|
23
|
+
};
|
|
24
|
+
return await Promise.all(
|
|
25
|
+
componentList.map((component) =>
|
|
26
|
+
step(ctx, application, schemas, component, progress),
|
|
27
|
+
),
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async function step<Model extends ILlmSchema.Model>(
|
|
32
|
+
ctx: AutoBeContext<Model>,
|
|
33
|
+
application: AutoBePrisma.IApplication,
|
|
34
|
+
schemas: Record<string, string>,
|
|
35
|
+
component: AutoBePrisma.IComponent,
|
|
36
|
+
progress: IProgress,
|
|
37
|
+
): Promise<AutoBePrismaReviewEvent> {
|
|
38
|
+
const start: Date = new Date();
|
|
39
|
+
const pointer: IPointer<IAutoBePrismaReviewApplication.IProps | null> = {
|
|
40
|
+
value: null,
|
|
41
|
+
};
|
|
42
|
+
const { tokenUsage } = await ctx.conversate({
|
|
43
|
+
source: "prismaReview",
|
|
44
|
+
histories: transformPrismaReviewHistories({
|
|
45
|
+
analysis:
|
|
46
|
+
ctx
|
|
47
|
+
.state()
|
|
48
|
+
.analyze?.files.map((file) => ({ [file.filename]: file.content }))
|
|
49
|
+
.reduce((acc, cur) => {
|
|
50
|
+
return Object.assign(acc, cur);
|
|
51
|
+
}, {}) ?? {},
|
|
52
|
+
application,
|
|
53
|
+
schemas,
|
|
54
|
+
component,
|
|
55
|
+
}),
|
|
56
|
+
controller: createController(ctx, {
|
|
57
|
+
build: (next) => {
|
|
58
|
+
pointer.value = next;
|
|
59
|
+
},
|
|
60
|
+
}),
|
|
61
|
+
enforceFunctionCall: true,
|
|
62
|
+
message: "Please review the Prisma schema file.",
|
|
63
|
+
});
|
|
64
|
+
if (pointer.value === null)
|
|
65
|
+
throw new Error("Failed to review the Prisma schema.");
|
|
66
|
+
|
|
67
|
+
const event: AutoBePrismaReviewEvent = {
|
|
68
|
+
type: "prismaReview",
|
|
69
|
+
created_at: start.toISOString(),
|
|
70
|
+
filename: component.filename,
|
|
71
|
+
review: pointer.value.review,
|
|
72
|
+
plan: pointer.value.plan,
|
|
73
|
+
modifications: pointer.value.modifications,
|
|
74
|
+
tokenUsage,
|
|
75
|
+
completed: ++progress.completed,
|
|
76
|
+
total: progress.total,
|
|
77
|
+
step: ctx.state().analyze?.step ?? 0,
|
|
78
|
+
};
|
|
79
|
+
ctx.dispatch(event);
|
|
80
|
+
return event;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function createController<Model extends ILlmSchema.Model>(
|
|
84
|
+
ctx: AutoBeContext<Model>,
|
|
85
|
+
props: {
|
|
86
|
+
build: (next: IAutoBePrismaReviewApplication.IProps) => void;
|
|
87
|
+
},
|
|
88
|
+
): IAgenticaController.IClass<Model> {
|
|
89
|
+
assertSchemaModel(ctx.model);
|
|
90
|
+
|
|
91
|
+
const application: ILlmApplication<Model> = collection[
|
|
92
|
+
ctx.model
|
|
93
|
+
] satisfies ILlmApplication<any> as unknown as ILlmApplication<Model>;
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
protocol: "class",
|
|
97
|
+
name: "Prisma Schema Review",
|
|
98
|
+
application,
|
|
99
|
+
execute: {
|
|
100
|
+
reviewSchemaFile: (next) => {
|
|
101
|
+
props.build(next);
|
|
102
|
+
},
|
|
103
|
+
} satisfies IAutoBePrismaReviewApplication,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const claude = typia.llm.application<
|
|
108
|
+
IAutoBePrismaReviewApplication,
|
|
109
|
+
"claude"
|
|
110
|
+
>();
|
|
111
|
+
|
|
112
|
+
const collection = {
|
|
113
|
+
chatgpt: typia.llm.application<IAutoBePrismaReviewApplication, "chatgpt">(),
|
|
114
|
+
claude,
|
|
115
|
+
llama: claude,
|
|
116
|
+
deepseek: claude,
|
|
117
|
+
"3.1": claude,
|
|
118
|
+
};
|