@autobe/agent 0.16.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} +37 -9
- 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/agent/src/context/AutoBeTokenUsage.js +188 -0
- package/lib/agent/src/context/AutoBeTokenUsage.js.map +1 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.d.ts +116 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js +137 -0
- 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/{factory → agent/src/factory}/createAutoBeApplication.js +1 -1
- package/lib/agent/src/factory/createAutoBeApplication.js.map +1 -0
- package/lib/agent/src/factory/createAutoBeContext.d.ts +19 -0
- package/lib/agent/src/factory/createAutoBeContext.js +214 -0
- 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 +17 -14
- 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 +27 -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/{index.js → agent/src/index.js} +1 -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 +12 -24
- 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/{orchestrate/prisma → agent/src/orchestrate/prisma/histories}/transformPrismaComponentsHistories.d.ts +1 -1
- package/lib/{orchestrate/prisma → agent/src/orchestrate/prisma/histories}/transformPrismaComponentsHistories.js +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -0
- package/lib/{orchestrate/prisma → 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/{orchestrate/prisma → agent/src/orchestrate/prisma/histories}/transformPrismaSchemaHistories.d.ts +1 -1
- 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 +37 -40
- 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 +164 -58
- 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 +130 -92
- 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} +197 -328
- 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 +3 -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 +3 -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 +3 -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 +12 -30
- 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 +19 -17
- package/lib/context/AutoBeContext.d.ts +31 -8
- package/lib/context/AutoBeTokenUsage.d.ts +168 -11
- package/lib/context/AutoBeTokenUsageComponent.d.ts +116 -0
- package/lib/factory/createAutoBeContext.d.ts +19 -0
- package/lib/factory/getAutoBeGenerated.d.ts +1 -1
- package/lib/factory/getAutoBeRealizeGenerated.d.ts +7 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.mjs +10629 -5867
- 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/transformPrismaComponentsHistories.d.ts +3 -0
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.d.ts +3 -0
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.d.ts +8 -0
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +3 -0
- package/lib/orchestrate/prisma/orchestratePrisma.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 +121 -0
- package/lib/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.d.ts +142 -0
- package/lib/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.d.ts +105 -0
- package/lib/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.d.ts +99 -0
- 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 +10 -10
- package/src/AutoBeAgent.ts +45 -10
- package/src/AutoBeMockAgent.ts +41 -11
- package/src/constants/AutoBeSystemPromptConstant.ts +19 -17
- package/src/context/AutoBeContext.ts +60 -7
- package/src/context/AutoBeTokenUsage.ts +260 -54
- package/src/context/AutoBeTokenUsageComponent.ts +198 -0
- package/src/factory/createAutoBeApplication.ts +4 -12
- package/src/factory/createAutoBeContext.ts +256 -0
- package/src/factory/getAutoBeGenerated.ts +17 -24
- package/src/factory/getAutoBeRealizeGenerated.ts +30 -0
- package/src/index.ts +1 -0
- 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 -109
- 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 +14 -23
- 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/{transformPrismaComponentsHistories.ts → histories/transformPrismaComponentsHistories.ts} +2 -2
- package/src/orchestrate/prisma/{transformPrismaCorrectHistories.ts → histories/transformPrismaCorrectHistories.ts} +1 -1
- package/src/orchestrate/prisma/histories/transformPrismaReviewHistories.ts +66 -0
- package/src/orchestrate/prisma/{transformPrismaSchemaHistories.ts → histories/transformPrismaSchemaHistories.ts} +3 -3
- package/src/orchestrate/prisma/orchestratePrisma.ts +73 -67
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +27 -112
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +100 -202
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +118 -0
- package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +137 -210
- package/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.ts +125 -0
- package/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.ts +144 -0
- package/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.ts +108 -0
- package/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.ts +101 -0
- 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 +118 -40
- 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 +11 -32
- 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 +0 -61
- package/lib/context/AutoBeTokenUsage.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/createAutoBeState.js.map +0 -1
- package/lib/factory/getAutoBeGenerated.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 -125
- 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/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/transformPrismaComponentsHistories.js.map +0 -1
- package/lib/orchestrate/prisma/transformPrismaCorrectHistories.js.map +0 -1
- package/lib/orchestrate/prisma/transformPrismaHistories.d.ts +0 -3
- package/lib/orchestrate/prisma/transformPrismaHistories.js +0 -55
- package/lib/orchestrate/prisma/transformPrismaHistories.js.map +0 -1
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js +0 -48
- package/lib/orchestrate/prisma/transformPrismaSchemaHistories.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 -74
- 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/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}/createAutoBeState.js +0 -0
- /package/lib/{factory → agent/src/factory}/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/prisma → agent/src/orchestrate/prisma/histories}/transformPrismaCorrectHistories.d.ts +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,108 @@
|
|
|
1
|
+
import { AutoBePrisma } from "@autobe/interface";
|
|
2
|
+
|
|
3
|
+
export interface IAutoBePrismaReviewApplication {
|
|
4
|
+
/**
|
|
5
|
+
* Reviews and validates Prisma schema modifications to ensure compliance with
|
|
6
|
+
* database design best practices and business requirements.
|
|
7
|
+
*
|
|
8
|
+
* Performs comprehensive validation of proposed schema changes including
|
|
9
|
+
* normalization compliance, relationship integrity, performance optimization,
|
|
10
|
+
* and business logic alignment. The review process ensures all modifications
|
|
11
|
+
* maintain data consistency and follow enterprise-level database standards.
|
|
12
|
+
*/
|
|
13
|
+
reviewSchemaFile(props: IAutoBePrismaReviewApplication.IProps): void;
|
|
14
|
+
}
|
|
15
|
+
export namespace IAutoBePrismaReviewApplication {
|
|
16
|
+
export interface IProps {
|
|
17
|
+
/**
|
|
18
|
+
* Comprehensive review analysis of the proposed schema modifications.
|
|
19
|
+
*
|
|
20
|
+
* Contains the AI agent's detailed evaluation of the schema changes,
|
|
21
|
+
* including validation of normalization compliance, relationship integrity,
|
|
22
|
+
* index optimization, and business requirement alignment. The review
|
|
23
|
+
* identifies potential issues and confirms adherence to best practices.
|
|
24
|
+
*
|
|
25
|
+
* **Review Dimensions:**
|
|
26
|
+
*
|
|
27
|
+
* - **Normalization Validation**: Confirms 3NF compliance and proper data
|
|
28
|
+
* structure
|
|
29
|
+
* - **Relationship Integrity**: Validates foreign key references and
|
|
30
|
+
* cardinality
|
|
31
|
+
* - **Performance Optimization**: Reviews indexing strategy and query
|
|
32
|
+
* patterns
|
|
33
|
+
* - **Business Logic Alignment**: Ensures schema supports all use cases
|
|
34
|
+
* - **Naming Conventions**: Verifies consistent naming patterns
|
|
35
|
+
* - **Data Type Consistency**: Confirms appropriate field types
|
|
36
|
+
* - **Temporal Field Handling**: Validates audit trail implementation
|
|
37
|
+
*
|
|
38
|
+
* **Example:**
|
|
39
|
+
*
|
|
40
|
+
* "After reviewing the schema modifications:
|
|
41
|
+
* 1. All tables properly implement UUID primary keys
|
|
42
|
+
* 2. Foreign key relationships correctly reference existing models
|
|
43
|
+
* 3. Composite indexes optimize for common query patterns
|
|
44
|
+
* 4. Snapshot tables include proper temporal fields
|
|
45
|
+
* 5. Materialized views (mv_) contain appropriate denormalization
|
|
46
|
+
* The schema follows all best practices and is ready for implementation."
|
|
47
|
+
*/
|
|
48
|
+
review: string;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Strategic database design plan that guided the schema creation.
|
|
52
|
+
*
|
|
53
|
+
* Contains the original planning document that outlines the database
|
|
54
|
+
* architecture strategy, including table structures, relationships,
|
|
55
|
+
* normalization approach, and business requirement mapping. This plan
|
|
56
|
+
* serves as the blueprint for validating the implemented schema.
|
|
57
|
+
*
|
|
58
|
+
* **Planning Components:**
|
|
59
|
+
*
|
|
60
|
+
* - **Business Requirements**: Mapping of business needs to database
|
|
61
|
+
* structures
|
|
62
|
+
* - **Table Design**: Entity definitions and attribute specifications
|
|
63
|
+
* - **Relationship Strategy**: Cardinality and referential integrity planning
|
|
64
|
+
* - **Normalization Approach**: Application of 1NF, 2NF, 3NF principles
|
|
65
|
+
* - **Performance Considerations**: Index strategy and query optimization
|
|
66
|
+
* - **Snapshot Architecture**: Temporal data handling and audit requirements
|
|
67
|
+
* - **Materialized Views**: Denormalization strategy for performance
|
|
68
|
+
*
|
|
69
|
+
* **Example:**
|
|
70
|
+
*
|
|
71
|
+
* "Database Design Strategy:
|
|
72
|
+
* Component: Sales Domain
|
|
73
|
+
* Tables: shopping_sales, shopping_sale_snapshots, shopping_sale_units
|
|
74
|
+
*
|
|
75
|
+
* Design Approach:
|
|
76
|
+
* - Normalize product catalog to 3NF for data integrity
|
|
77
|
+
* - Implement snapshot pattern for price history tracking
|
|
78
|
+
* - Create composite indexes for product search queries
|
|
79
|
+
* - Use materialized views for sales analytics dashboards"
|
|
80
|
+
*/
|
|
81
|
+
plan: string;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Array of Prisma models that have been modified based on review feedback.
|
|
85
|
+
*
|
|
86
|
+
* Contains ONLY the models that required changes, not the entire schema.
|
|
87
|
+
* Each model represents a complete table definition with all fields,
|
|
88
|
+
* relationships, indexes, and documentation. These modifications will be
|
|
89
|
+
* applied to the models to produce the final implementation.
|
|
90
|
+
*
|
|
91
|
+
* **Model Requirements:**
|
|
92
|
+
*
|
|
93
|
+
* - **Complete Models**: Each entry must be a complete model definition
|
|
94
|
+
* - **Targeted Changes**: Only includes models that need modifications
|
|
95
|
+
* - **AST Compliance**: Follows AutoBePrisma.IModel interface structure
|
|
96
|
+
* - **Relationship Integrity**: All foreign keys reference valid models
|
|
97
|
+
* - **Index Optimization**: Strategic indexes without redundancy
|
|
98
|
+
* - **Documentation**: Comprehensive English descriptions
|
|
99
|
+
*
|
|
100
|
+
* **Notes:**
|
|
101
|
+
*
|
|
102
|
+
* - Models not included in this array remain unchanged from the models
|
|
103
|
+
* - The final schema merges these modifications with the original models
|
|
104
|
+
* - All modifications must resolve issues identified in the review
|
|
105
|
+
*/
|
|
106
|
+
modifications: AutoBePrisma.IModel[];
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { AutoBePrisma } from "@autobe/interface";
|
|
2
|
+
import { tags } from "typia";
|
|
3
|
+
|
|
4
|
+
export interface IAutoBePrismaSchemaApplication {
|
|
5
|
+
/**
|
|
6
|
+
* Generates comprehensive Prisma schema files based on detailed requirements
|
|
7
|
+
* analysis.
|
|
8
|
+
*
|
|
9
|
+
* Creates multiple organized schema files following enterprise patterns
|
|
10
|
+
* including proper domain separation, relationship modeling, snapshot
|
|
11
|
+
* patterns, inheritance, materialized views, and comprehensive documentation.
|
|
12
|
+
* The generated schemas implement best practices for scalability,
|
|
13
|
+
* maintainability, and data integrity.
|
|
14
|
+
*
|
|
15
|
+
* @param props Properties containing the file
|
|
16
|
+
*/
|
|
17
|
+
makePrismaSchemaFile(props: IAutoBePrismaSchemaApplication.IProps): void;
|
|
18
|
+
}
|
|
19
|
+
export namespace IAutoBePrismaSchemaApplication {
|
|
20
|
+
export interface IProps {
|
|
21
|
+
/**
|
|
22
|
+
* Strategic database design analysis and planning.
|
|
23
|
+
*
|
|
24
|
+
* AI analyzes the target component and business requirements to formulate a
|
|
25
|
+
* comprehensive database design strategy. This planning phase is crucial
|
|
26
|
+
* for creating well-structured, normalized schemas that align with business
|
|
27
|
+
* objectives. The AI must define table structures, relationships, indexing
|
|
28
|
+
* strategies, and data integrity constraints before proceeding to schema
|
|
29
|
+
* implementation.
|
|
30
|
+
*
|
|
31
|
+
* **Key Considerations:**
|
|
32
|
+
*
|
|
33
|
+
* - **Assignment Validation**: Extract targetComponent.tables as the complete
|
|
34
|
+
* specification
|
|
35
|
+
* - **Table Count**: Must create exactly targetComponent.tables.length models
|
|
36
|
+
* - **Other Components**: Identify already-created tables for foreign key
|
|
37
|
+
* references only
|
|
38
|
+
* - **Normalization**: Strict adherence to 1NF, 2NF, 3NF principles
|
|
39
|
+
* - **Snapshot Architecture**: Design for historical data preservation and
|
|
40
|
+
* audit trails
|
|
41
|
+
* - **Junction Tables**: Plan M:N relationships with proper naming
|
|
42
|
+
* ({table1}_{table2})
|
|
43
|
+
* - **Materialized Views**: Identify needs for mv_ prefixed denormalized
|
|
44
|
+
* tables
|
|
45
|
+
*
|
|
46
|
+
* Workflow: Component analysis → Strategic planning → Design rationale
|
|
47
|
+
*/
|
|
48
|
+
plan: string;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Production-ready Prisma schema models generated based on the strategic
|
|
52
|
+
* plan.
|
|
53
|
+
*
|
|
54
|
+
* Contains a structured Abstract Syntax Tree (AST) representation of all
|
|
55
|
+
* database tables for the target component. Each model implements the
|
|
56
|
+
* planned table structure, relationships, indexes, and constraints using
|
|
57
|
+
* the AutoBePrisma.IModel interface. These models are designed to be
|
|
58
|
+
* production-ready from the initial generation, following all best
|
|
59
|
+
* practices and normalization principles.
|
|
60
|
+
*
|
|
61
|
+
* **Implementation Requirements:**
|
|
62
|
+
*
|
|
63
|
+
* - **Model Count**: Exactly matches targetComponent.tables.length (plus any
|
|
64
|
+
* junction tables)
|
|
65
|
+
* - **Table Names**: EXACT names from targetComponent.tables - no
|
|
66
|
+
* modifications allowed
|
|
67
|
+
* - **Primary Keys**: Always UUID type with field name "id"
|
|
68
|
+
* - **Foreign Keys**: Proper IRelation configurations for all relationships
|
|
69
|
+
* - **Business Fields**: Only raw data fields - no calculated or derived
|
|
70
|
+
* values
|
|
71
|
+
* - **Data Types**: Limited to: uuid, string, int, double, datetime, boolean,
|
|
72
|
+
* uri
|
|
73
|
+
* - **Relationships**: Correct patterns for 1:1, 1:N, and M:N relationships
|
|
74
|
+
* - **Indexes**:
|
|
75
|
+
*
|
|
76
|
+
* - UniqueIndexes: Business constraints and composite unique keys
|
|
77
|
+
* - PlainIndexes: Multi-column query optimization (never single FK indexes)
|
|
78
|
+
* - GinIndexes: Full-text search on appropriate string fields
|
|
79
|
+
* - **Materialized Views**: Tables prefixed with "mv_" have material flag set
|
|
80
|
+
* to true
|
|
81
|
+
* - **Documentation**: Comprehensive English descriptions with business
|
|
82
|
+
* context
|
|
83
|
+
*
|
|
84
|
+
* **Quality Standards:**
|
|
85
|
+
*
|
|
86
|
+
* - **Normalization**: Strict adherence to 3NF (Third Normal Form)
|
|
87
|
+
* - **No Denormalization**: Except in materialized views (mv_ tables)
|
|
88
|
+
* - **Referential Integrity**: All foreign keys reference valid existing
|
|
89
|
+
* tables
|
|
90
|
+
* - **Temporal Fields**: Consistent created_at, updated_at, deleted_at
|
|
91
|
+
* patterns
|
|
92
|
+
* - **Snapshot Support**: Proper historical data preservation where needed
|
|
93
|
+
* - **Performance Ready**: Optimized index strategy for expected query
|
|
94
|
+
* patterns
|
|
95
|
+
*
|
|
96
|
+
* The generated models will undergo review by a separate specialized agent
|
|
97
|
+
* to ensure compliance with all requirements and best practices.
|
|
98
|
+
*/
|
|
99
|
+
models: AutoBePrisma.IModel[] & tags.MinItems<1>;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
+
import { AutoBeAnalyzeRole } from "@autobe/interface";
|
|
2
3
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
4
|
import { v4 } from "uuid";
|
|
4
5
|
|
|
5
|
-
import { AutoBeSystemPromptConstant } from "
|
|
6
|
-
import { AutoBeContext } from "
|
|
6
|
+
import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
|
|
7
|
+
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
7
8
|
|
|
8
|
-
export const transformRealizeAuthorizationHistories =
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
export const transformRealizeAuthorizationHistories = <
|
|
10
|
+
Model extends ILlmSchema.Model,
|
|
11
|
+
>(
|
|
12
|
+
ctx: AutoBeContext<Model>,
|
|
13
|
+
role: AutoBeAnalyzeRole,
|
|
11
14
|
): Array<
|
|
12
15
|
IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage
|
|
13
16
|
> => {
|
|
@@ -24,8 +27,9 @@ export const transformRealizeAuthorizationHistories = (
|
|
|
24
27
|
type: "systemMessage",
|
|
25
28
|
text: [
|
|
26
29
|
"## Role",
|
|
27
|
-
"",
|
|
28
|
-
role,
|
|
30
|
+
"```json",
|
|
31
|
+
JSON.stringify(role),
|
|
32
|
+
"```",
|
|
29
33
|
"",
|
|
30
34
|
"## Prisma Schema",
|
|
31
35
|
"",
|
|
@@ -35,9 +39,9 @@ export const transformRealizeAuthorizationHistories = (
|
|
|
35
39
|
"",
|
|
36
40
|
"Please follow this naming convention for the authorization components:",
|
|
37
41
|
"",
|
|
38
|
-
`- Provider Name: ${role}Authorize (e.g. ${role}Authorize)`,
|
|
39
|
-
`- Decorator Name: ${role.charAt(0).toUpperCase() + role.slice(1)}Auth (e.g. ${role.charAt(0).toUpperCase() + role.slice(1)}Auth)`,
|
|
40
|
-
`- Payload Name: ${role.charAt(0).toUpperCase() + role.slice(1)}Payload (e.g. ${role.charAt(0).toUpperCase() + role.slice(1)}Payload)`,
|
|
42
|
+
`- Provider Name: ${role.name}Authorize (e.g. ${role.name}Authorize)`,
|
|
43
|
+
`- Decorator Name: ${role.name.charAt(0).toUpperCase() + role.name.slice(1)}Auth (e.g. ${role.name.charAt(0).toUpperCase() + role.name.slice(1)}Auth)`,
|
|
44
|
+
`- Payload Name: ${role.name.charAt(0).toUpperCase() + role.name.slice(1)}Payload (e.g. ${role.name.charAt(0).toUpperCase() + role.name.slice(1)}Payload)`,
|
|
41
45
|
].join("\n"),
|
|
42
46
|
},
|
|
43
47
|
];
|
|
@@ -6,11 +6,13 @@ import {
|
|
|
6
6
|
import { ILlmSchema } from "@samchon/openapi";
|
|
7
7
|
import { v4 } from "uuid";
|
|
8
8
|
|
|
9
|
-
import { AutoBeSystemPromptConstant } from "
|
|
10
|
-
import { AutoBeContext } from "
|
|
9
|
+
import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
|
|
10
|
+
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
11
11
|
|
|
12
|
-
export const transformRealizeAuthorizationCorrectHistories =
|
|
13
|
-
|
|
12
|
+
export const transformRealizeAuthorizationCorrectHistories = <
|
|
13
|
+
Model extends ILlmSchema.Model,
|
|
14
|
+
>(
|
|
15
|
+
ctx: AutoBeContext<Model>,
|
|
14
16
|
auth: AutoBeRealizeAuthorization,
|
|
15
17
|
templateFiles: Record<string, string>,
|
|
16
18
|
diagnostics: IAutoBeTypeScriptCompileResult.IDiagnostic[],
|
|
@@ -86,9 +88,9 @@ export const transformRealizeAuthorizationCorrectHistories = (
|
|
|
86
88
|
"",
|
|
87
89
|
"Please follow this naming convention for the authorization components:",
|
|
88
90
|
"",
|
|
89
|
-
`- Provider Name: ${auth.role.toLowerCase()}Authorize (e.g. ${auth.role.toLowerCase()}Authorize)`,
|
|
90
|
-
`- Decorator Name: ${auth.role.charAt(0).toUpperCase() + auth.role.slice(1).toLowerCase()}Auth (e.g. ${auth.role.charAt(0).toUpperCase() + auth.role.slice(1).toLowerCase()}Auth)`,
|
|
91
|
-
`- Payload Name: ${auth.role.charAt(0).toUpperCase() + auth.role.slice(1).toLowerCase()}Payload (e.g. ${auth.role.charAt(0).toUpperCase() + auth.role.slice(1).toLowerCase()}Payload)`,
|
|
91
|
+
`- Provider Name: ${auth.role.name.toLowerCase()}Authorize (e.g. ${auth.role.name.toLowerCase()}Authorize)`,
|
|
92
|
+
`- Decorator Name: ${auth.role.name.charAt(0).toUpperCase() + auth.role.name.slice(1).toLowerCase()}Auth (e.g. ${auth.role.name.charAt(0).toUpperCase() + auth.role.name.slice(1).toLowerCase()}Auth)`,
|
|
93
|
+
`- Payload Name: ${auth.role.name.charAt(0).toUpperCase() + auth.role.name.slice(1).toLowerCase()}Payload (e.g. ${auth.role.name.charAt(0).toUpperCase() + auth.role.name.slice(1).toLowerCase()}Payload)`,
|
|
92
94
|
].join("\n"),
|
|
93
95
|
},
|
|
94
96
|
];
|
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
} from "@autobe/interface";
|
|
6
6
|
import { v4 } from "uuid";
|
|
7
7
|
|
|
8
|
-
import { AutoBeSystemPromptConstant } from "
|
|
9
|
-
import { AutoBeState } from "
|
|
10
|
-
import { IAutoBeTestScenarioArtifacts } from "
|
|
11
|
-
import {
|
|
12
|
-
import { IAutoBeRealizeCompile } from "
|
|
8
|
+
import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
|
|
9
|
+
import { AutoBeState } from "../../../context/AutoBeState";
|
|
10
|
+
import { IAutoBeTestScenarioArtifacts } from "../../test/structures/IAutoBeTestScenarioArtifacts";
|
|
11
|
+
import { IAutoBeRealizeScenario } from "../orchestrateRealizeScenario";
|
|
12
|
+
import { IAutoBeRealizeCompile } from "../structures/IAutoBeRealizeCompile";
|
|
13
13
|
|
|
14
14
|
export const transformRealizeCoderHistories = (
|
|
15
15
|
state: AutoBeState,
|
|
16
16
|
previousCodes: IAutoBeRealizeCompile.Success[],
|
|
17
|
-
props:
|
|
17
|
+
props: IAutoBeRealizeScenario,
|
|
18
18
|
artifacts: IAutoBeTestScenarioArtifacts,
|
|
19
19
|
previous: string | null,
|
|
20
20
|
diagnostics: IAutoBeTypeScriptCompileResult.IDiagnostic[],
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
+
import {
|
|
3
|
+
AutoBeRealizeAuthorization,
|
|
4
|
+
IAutoBeTypeScriptCompileResult,
|
|
5
|
+
} from "@autobe/interface";
|
|
6
|
+
import { v4 } from "uuid";
|
|
7
|
+
|
|
8
|
+
import { AutoBeState } from "../../../context/AutoBeState";
|
|
9
|
+
import { IAutoBeTestScenarioArtifacts } from "../../test/structures/IAutoBeTestScenarioArtifacts";
|
|
10
|
+
import { IAutoBeRealizeScenarioApplication } from "../structures/IAutoBeRealizeScenarioApplication";
|
|
11
|
+
import { transformRealizeWriteHistories } from "./transformRealizeWriteHistories";
|
|
12
|
+
|
|
13
|
+
export function transformRealizeCorrectHistories(props: {
|
|
14
|
+
state: AutoBeState;
|
|
15
|
+
scenario: IAutoBeRealizeScenarioApplication.IProps;
|
|
16
|
+
artifacts: IAutoBeTestScenarioArtifacts;
|
|
17
|
+
authorization: AutoBeRealizeAuthorization | null;
|
|
18
|
+
code: string;
|
|
19
|
+
diagnostic: IAutoBeTypeScriptCompileResult.IDiagnostic;
|
|
20
|
+
}): Array<
|
|
21
|
+
IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage
|
|
22
|
+
> {
|
|
23
|
+
return [
|
|
24
|
+
...transformRealizeWriteHistories(props),
|
|
25
|
+
{
|
|
26
|
+
id: v4(),
|
|
27
|
+
type: "assistantMessage",
|
|
28
|
+
text: [
|
|
29
|
+
`Below is the code you made before. It's also something to review.`,
|
|
30
|
+
"```typescript",
|
|
31
|
+
props.code,
|
|
32
|
+
"```",
|
|
33
|
+
`The code has a compilation error:`,
|
|
34
|
+
"```json",
|
|
35
|
+
JSON.stringify(props.diagnostic, null, 2),
|
|
36
|
+
"",
|
|
37
|
+
].join("\n"),
|
|
38
|
+
created_at: new Date().toISOString(),
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: v4(),
|
|
42
|
+
type: "systemMessage",
|
|
43
|
+
text: `You are an expert TypeScript developer. You will review the code and correct`,
|
|
44
|
+
created_at: new Date().toISOString(),
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
+
import { AutoBeRealizeAuthorization } from "@autobe/interface";
|
|
3
|
+
import { v4 } from "uuid";
|
|
4
|
+
|
|
5
|
+
import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
|
|
6
|
+
import { AutoBeState } from "../../../context/AutoBeState";
|
|
7
|
+
import { IAutoBeTestScenarioArtifacts } from "../../test/structures/IAutoBeTestScenarioArtifacts";
|
|
8
|
+
import { IAutoBeRealizeScenarioApplication } from "../structures/IAutoBeRealizeScenarioApplication";
|
|
9
|
+
|
|
10
|
+
export const transformRealizeWriteHistories = (props: {
|
|
11
|
+
state: AutoBeState;
|
|
12
|
+
scenario: IAutoBeRealizeScenarioApplication.IProps;
|
|
13
|
+
artifacts: IAutoBeTestScenarioArtifacts;
|
|
14
|
+
authorization: AutoBeRealizeAuthorization | null;
|
|
15
|
+
}): Array<
|
|
16
|
+
IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage
|
|
17
|
+
> => {
|
|
18
|
+
const [operation] = props.artifacts.document.operations;
|
|
19
|
+
|
|
20
|
+
const propsFields: string[] = [];
|
|
21
|
+
|
|
22
|
+
// payload 추가
|
|
23
|
+
if (props.authorization && operation.authorizationRole) {
|
|
24
|
+
propsFields.push(
|
|
25
|
+
`${operation.authorizationRole}: ${props.authorization.payload.name};`,
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// parameters 추가
|
|
30
|
+
operation.parameters.forEach((parameter) => {
|
|
31
|
+
const format =
|
|
32
|
+
"format" in parameter.schema
|
|
33
|
+
? ` & tags.Format<'${parameter.schema.format}'>`
|
|
34
|
+
: "";
|
|
35
|
+
propsFields.push(`${parameter.name}: ${parameter.schema.type}${format};`);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// body 추가
|
|
39
|
+
if (operation.requestBody?.typeName) {
|
|
40
|
+
propsFields.push(`body: ${operation.requestBody.typeName};`);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const input =
|
|
44
|
+
propsFields.length > 0
|
|
45
|
+
? `props: {\n${propsFields.map((field) => ` ${field}`).join("\n")}\n}`
|
|
46
|
+
: `// No props parameter needed - function should have no parameters`;
|
|
47
|
+
|
|
48
|
+
if (props.state.analyze === null)
|
|
49
|
+
return [
|
|
50
|
+
{
|
|
51
|
+
id: v4(),
|
|
52
|
+
created_at: new Date().toISOString(),
|
|
53
|
+
type: "systemMessage",
|
|
54
|
+
text: [
|
|
55
|
+
"Requirement analysis is not yet completed.",
|
|
56
|
+
"Don't call the any tool function,",
|
|
57
|
+
"but say to process the requirement analysis.",
|
|
58
|
+
].join(" "),
|
|
59
|
+
},
|
|
60
|
+
];
|
|
61
|
+
else if (props.state.prisma === null)
|
|
62
|
+
return [
|
|
63
|
+
{
|
|
64
|
+
id: v4(),
|
|
65
|
+
created_at: new Date().toISOString(),
|
|
66
|
+
type: "systemMessage",
|
|
67
|
+
text: [
|
|
68
|
+
"Prisma DB schema generation is not yet completed.",
|
|
69
|
+
"Don't call the any tool function,",
|
|
70
|
+
"but say to process the Prisma DB schema generation.",
|
|
71
|
+
].join(" "),
|
|
72
|
+
},
|
|
73
|
+
];
|
|
74
|
+
else if (props.state.analyze.step !== props.state.prisma.step)
|
|
75
|
+
return [
|
|
76
|
+
{
|
|
77
|
+
id: v4(),
|
|
78
|
+
created_at: new Date().toISOString(),
|
|
79
|
+
type: "systemMessage",
|
|
80
|
+
text: [
|
|
81
|
+
"Prisma DB schema generation has not been updated",
|
|
82
|
+
"for the latest requirement analysis.",
|
|
83
|
+
"Don't call the any tool function,",
|
|
84
|
+
"but say to re-process the Prisma DB schema generation.",
|
|
85
|
+
].join(" "),
|
|
86
|
+
},
|
|
87
|
+
];
|
|
88
|
+
else if (props.state.prisma.compiled.type !== "success")
|
|
89
|
+
return [
|
|
90
|
+
{
|
|
91
|
+
id: v4(),
|
|
92
|
+
created_at: new Date().toISOString(),
|
|
93
|
+
type: "systemMessage",
|
|
94
|
+
text: [
|
|
95
|
+
"Prisma DB schema generation has not been updated",
|
|
96
|
+
"for the latest requirement analysis.",
|
|
97
|
+
"Don't call the any tool function,",
|
|
98
|
+
"but say to re-process the Prisma DB schema generation.",
|
|
99
|
+
].join(" "),
|
|
100
|
+
},
|
|
101
|
+
];
|
|
102
|
+
else if (props.state.interface === null)
|
|
103
|
+
return [
|
|
104
|
+
{
|
|
105
|
+
id: v4(),
|
|
106
|
+
created_at: new Date().toISOString(),
|
|
107
|
+
type: "systemMessage",
|
|
108
|
+
text: [
|
|
109
|
+
"Interface generation is not yet completed.",
|
|
110
|
+
"Don't call the any tool function,",
|
|
111
|
+
"but say to process the interface generation.",
|
|
112
|
+
].join(" "),
|
|
113
|
+
},
|
|
114
|
+
];
|
|
115
|
+
|
|
116
|
+
return [
|
|
117
|
+
{
|
|
118
|
+
id: v4(),
|
|
119
|
+
created_at: new Date().toISOString(),
|
|
120
|
+
type: "systemMessage",
|
|
121
|
+
text: AutoBeSystemPromptConstant.REALIZE_CODER_TOTAL,
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
id: v4(),
|
|
125
|
+
created_at: new Date().toISOString(),
|
|
126
|
+
type: "systemMessage",
|
|
127
|
+
text: AutoBeSystemPromptConstant.REALIZE_CODER_ARTIFACT.replaceAll(
|
|
128
|
+
`{prisma_schemas}`,
|
|
129
|
+
JSON.stringify(props.state.prisma.schemas),
|
|
130
|
+
)
|
|
131
|
+
.replaceAll(`{artifacts_sdk}`, JSON.stringify(props.artifacts.sdk))
|
|
132
|
+
.replaceAll(`{artifacts_dto}`, JSON.stringify(props.artifacts.dto))
|
|
133
|
+
.replaceAll(`{input}`, input),
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
{
|
|
137
|
+
id: v4(),
|
|
138
|
+
created_at: new Date().toISOString(),
|
|
139
|
+
type: "systemMessage",
|
|
140
|
+
text: [
|
|
141
|
+
"Write new code based on the following operation.",
|
|
142
|
+
"```json",
|
|
143
|
+
JSON.stringify(props.scenario),
|
|
144
|
+
"```",
|
|
145
|
+
].join("\n"),
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
id: v4(),
|
|
149
|
+
created_at: new Date().toISOString(),
|
|
150
|
+
type: "assistantMessage",
|
|
151
|
+
text: [
|
|
152
|
+
`I understand your request.`,
|
|
153
|
+
``,
|
|
154
|
+
`To summarize:`,
|
|
155
|
+
`- I must **never use the native \`Date\` type** in any code or type definitions.`,
|
|
156
|
+
`- Instead, all date and datetime values must be handled as \`string & tags.Format<'date-time'>\`.`,
|
|
157
|
+
`- This rule is **strict** and applies everywhere, including domain types, API inputs/outputs, and Prisma models.`,
|
|
158
|
+
`- Even if a library or tool returns a \`Date\`, I must convert it to the correct string format before use.`,
|
|
159
|
+
``,
|
|
160
|
+
`Especially regarding the \`Date\` type: I understand that using it can lead to type inconsistency and runtime issues, so I will completely avoid it in all circumstances.`,
|
|
161
|
+
``,
|
|
162
|
+
`I'll make sure to follow all these rules strictly. Let’s proceed with this in mind.`,
|
|
163
|
+
].join("\n"),
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
id: v4(),
|
|
167
|
+
created_at: new Date().toISOString(),
|
|
168
|
+
type: "assistantMessage",
|
|
169
|
+
text: [
|
|
170
|
+
`I understand your request.`,
|
|
171
|
+
``,
|
|
172
|
+
`To summarize:`,
|
|
173
|
+
`- I must **never use the native \`Date\` type** in any code or type definitions.`,
|
|
174
|
+
`- Instead, all date and datetime values must be handled as \`string & tags.Format<'date-time'>\`.`,
|
|
175
|
+
`- This rule is **strict** and applies everywhere, including domain types, API inputs/outputs, and Prisma models.`,
|
|
176
|
+
`- Even if a library or tool returns a \`Date\`, I must convert it to the correct string format before use.`,
|
|
177
|
+
``,
|
|
178
|
+
`Especially regarding the \`Date\` type: I understand that using it can lead to type inconsistency and runtime issues, so I will completely avoid it in all circumstances.`,
|
|
179
|
+
``,
|
|
180
|
+
`I'll make sure to follow all these rules strictly. Let’s proceed with this in mind.`,
|
|
181
|
+
].join("\n"),
|
|
182
|
+
},
|
|
183
|
+
];
|
|
184
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AutoBeRealizeAuthorization,
|
|
3
|
+
AutoBeRealizeValidateEvent,
|
|
4
|
+
IAutoBeTypeScriptCompileResult,
|
|
5
|
+
} from "@autobe/interface";
|
|
6
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
7
|
+
|
|
8
|
+
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
9
|
+
import { IAutoBeRealizeCompile } from "../structures/IAutoBeRealizeCompile";
|
|
10
|
+
|
|
11
|
+
export async function compile<Model extends ILlmSchema.Model>(
|
|
12
|
+
ctx: AutoBeContext<Model>,
|
|
13
|
+
props: {
|
|
14
|
+
authorizations: AutoBeRealizeAuthorization[];
|
|
15
|
+
providers: Record<string, string>;
|
|
16
|
+
},
|
|
17
|
+
): Promise<
|
|
18
|
+
IAutoBeTypeScriptCompileResult.ISuccess | AutoBeRealizeValidateEvent
|
|
19
|
+
> {
|
|
20
|
+
const prisma = ctx.state().prisma?.compiled;
|
|
21
|
+
const payloads: Record<string, string> = Object.fromEntries(
|
|
22
|
+
props.authorizations.map((el) => [el.payload.location, el.payload.content]),
|
|
23
|
+
);
|
|
24
|
+
const templateFiles = await getTemplates(ctx);
|
|
25
|
+
const nodeModules = prisma?.type === "success" ? prisma.nodeModules : {};
|
|
26
|
+
const compiler = await ctx.compiler();
|
|
27
|
+
const compiled = await compiler.typescript.compile({
|
|
28
|
+
files: {
|
|
29
|
+
...nodeModules,
|
|
30
|
+
...payloads,
|
|
31
|
+
...Object.fromEntries(
|
|
32
|
+
Object.entries(await ctx.files({ dbms: "sqlite" })).filter(([key]) =>
|
|
33
|
+
key.startsWith("src"),
|
|
34
|
+
),
|
|
35
|
+
),
|
|
36
|
+
...Object.fromEntries(
|
|
37
|
+
templateFiles.map((file) => [file.location, file.content]),
|
|
38
|
+
),
|
|
39
|
+
...props.providers,
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
if (compiled.type === "success") {
|
|
44
|
+
return compiled;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const event: AutoBeRealizeValidateEvent = {
|
|
48
|
+
type: "realizeValidate",
|
|
49
|
+
result: compiled,
|
|
50
|
+
files: Object.fromEntries(
|
|
51
|
+
compiled.type === "failure"
|
|
52
|
+
? compiled.diagnostics.map((d) => [d.file, d.code])
|
|
53
|
+
: [],
|
|
54
|
+
),
|
|
55
|
+
step: ctx.state().analyze?.step ?? 0,
|
|
56
|
+
created_at: new Date().toISOString(),
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
return event;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Loads template files for the realize agent These files are essential for the
|
|
64
|
+
* realize coder to pass compilation
|
|
65
|
+
*
|
|
66
|
+
* @param ctx Context of agent
|
|
67
|
+
* @returns Template file infomations
|
|
68
|
+
*/
|
|
69
|
+
async function getTemplates<Model extends ILlmSchema.Model>(
|
|
70
|
+
ctx: AutoBeContext<Model>,
|
|
71
|
+
): Promise<IAutoBeRealizeCompile.CodeArtifact[]> {
|
|
72
|
+
const compiler = await ctx.compiler();
|
|
73
|
+
const templateFiles = await compiler.realize.getTemplate();
|
|
74
|
+
const pathnames = ["src/MyGlobal.ts", "src/util/toISOStringSafe.ts"] as const;
|
|
75
|
+
|
|
76
|
+
return pathnames.map((pathname): IAutoBeRealizeCompile.CodeArtifact => {
|
|
77
|
+
return {
|
|
78
|
+
content: templateFiles[pathname],
|
|
79
|
+
result: "success",
|
|
80
|
+
location: pathname,
|
|
81
|
+
role: null, // template files doesn't have role.
|
|
82
|
+
} as const;
|
|
83
|
+
});
|
|
84
|
+
}
|