@autobe/agent 0.17.1 → 0.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AutoBeMockAgent.d.ts +2 -10
- package/lib/agent/src/AutoBeAgent.d.ts +52 -0
- package/lib/{AutoBeAgent.js → agent/src/AutoBeAgent.js} +34 -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 +7 -0
- package/lib/{AutoBeMockAgent.js → agent/src/AutoBeMockAgent.js} +40 -5
- package/lib/agent/src/AutoBeMockAgent.js.map +1 -0
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +28 -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 +117 -0
- package/lib/{context → agent/src/context}/AutoBeTokenUsageComponent.js +33 -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/consentFunctionCall.d.ts +10 -0
- package/lib/agent/src/factory/consentFunctionCall.js +212 -0
- package/lib/agent/src/factory/consentFunctionCall.js.map +1 -0
- package/lib/agent/src/factory/createAgenticaHistory.d.ts +7 -0
- package/lib/{factory → agent/src/factory}/createAgenticaHistory.js +1 -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/agent/src/factory/createAutoBeContext.js +271 -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 +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 +6 -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 +6 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +61 -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 +69 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +5 -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 +714 -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 +244 -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/{orchestrate → agent/src/orchestrate}/interface/histories/transformInterfaceAssetHistories.js +1 -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 +41 -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 +59 -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 +34 -9
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +1731 -0
- 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 +42 -36
- 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 +24 -38
- 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 +1774 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +1328 -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/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js +561 -0
- 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 +473 -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 +93 -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 +171 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +132 -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 +107 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +85 -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/interface/utils/validateAuthorizationSchema.d.ts +7 -0
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js +35 -0
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.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 +79 -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/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +52 -0
- 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 +40 -14
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/prisma/orchestratePrismaComponent.js +43 -48
- 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 +154 -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} +180 -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 +1662 -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/transformRealizeCorrectHistories.d.ts +14 -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/transformRealizeWriteAuthorizationsHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +278 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +14 -0
- package/lib/{orchestrate/realize/transformRealizeCoderHistories.js → agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js} +31 -92
- 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 +44 -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 +130 -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 +16 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +352 -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 +14 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +345 -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/IAutoBeRealizeCorrectApplication.d.ts +79 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.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/{orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts → agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts} +22 -88
- 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 +6 -1
- 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 +34 -0
- 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 +4 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +101 -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 +16 -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 +31 -47
- 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 +961 -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 +122 -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/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.js +3 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.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/agent/src/utils/predicateStateMessage.d.ts +4 -0
- package/lib/agent/src/utils/predicateStateMessage.js +87 -0
- package/lib/agent/src/utils/predicateStateMessage.js.map +1 -0
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +24 -28
- package/lib/context/AutoBeContext.d.ts +16 -5
- package/lib/context/AutoBeTokenUsageComponent.d.ts +1 -0
- package/lib/factory/consentFunctionCall.d.ts +10 -0
- package/lib/index.mjs +11323 -5336
- 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 +6 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +4 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +6 -0
- package/lib/orchestrate/analyze/orchestrateAnalyze.d.ts +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +5 -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 +2 -2
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +4 -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/IAutoBeInterfaceComplementApplication.d.ts +38 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.d.ts +2 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +16 -16
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +64 -15
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +132 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +46 -14
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +85 -0
- package/lib/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +7 -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 -2
- 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/transformRealizeCorrectHistories.d.ts +14 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +3 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +14 -0
- package/lib/orchestrate/realize/internal/compile.d.ts +7 -0
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +16 -0
- package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +91 -0
- package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +14 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +10 -3
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +79 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +38 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +279 -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 +4 -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/IAutoBeTestCorrectApplication.d.ts +6 -5
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +25 -24
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -1
- package/lib/utils/predicateStateMessage.d.ts +4 -0
- package/package.json +9 -9
- package/src/AutoBeAgent.ts +51 -3
- package/src/AutoBeMockAgent.ts +44 -16
- package/src/constants/AutoBeSystemPromptConstant.ts +24 -28
- package/src/context/AutoBeContext.ts +30 -4
- package/src/context/AutoBeTokenUsage.ts +8 -0
- package/src/context/AutoBeTokenUsageComponent.ts +40 -2
- package/src/factory/consentFunctionCall.ts +128 -0
- package/src/factory/createAgenticaHistory.ts +1 -0
- package/src/factory/createAutoBeApplication.ts +3 -11
- package/src/factory/createAutoBeContext.ts +149 -1
- package/src/factory/getAutoBeGenerated.ts +3 -3
- package/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.ts +60 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +34 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +78 -0
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +66 -80
- package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +89 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +99 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +53 -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/transformInterfaceAssetHistories.ts +1 -0
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +40 -0
- package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +17 -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 +69 -0
- package/src/orchestrate/interface/orchestrateInterface.ts +57 -10
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +209 -0
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +27 -44
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +28 -34
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +18 -48
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +216 -107
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +101 -0
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +180 -96
- package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +145 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.ts +49 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.ts +39 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.ts +2 -1
- package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +16 -16
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +67 -15
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +139 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +47 -14
- package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +92 -0
- package/src/orchestrate/interface/utils/validateAuthorizationSchema.ts +41 -0
- package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +9 -16
- package/src/orchestrate/prisma/histories/transformPrismaReviewHistories.ts +66 -0
- package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +2 -2
- package/src/orchestrate/prisma/orchestratePrisma.ts +55 -17
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +19 -49
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +96 -58
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +124 -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/histories/transformRealizeAuthorization.ts +48 -0
- package/src/orchestrate/realize/{transformRealizeAuthorizationCorrectHistories.ts → histories/transformRealizeAuthorizationCorrectHistories.ts} +28 -30
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +49 -0
- package/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.ts +285 -0
- package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +184 -0
- package/src/orchestrate/realize/internal/compile.ts +67 -0
- package/src/orchestrate/realize/orchestrateRealize.ts +125 -30
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +45 -57
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +19 -41
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +122 -0
- package/src/orchestrate/realize/{orchestrateRealizePlanner.ts → orchestrateRealizeScenario.ts} +15 -15
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +128 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +11 -3
- package/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.ts +81 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.ts +43 -0
- package/src/orchestrate/realize/structures/{IAutoBeRealizeCoderApplication.ts → IAutoBeRealizeWriteApplication.ts} +22 -95
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +10 -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 +121 -0
- package/src/orchestrate/test/{transformTestWriteHistories.ts → histories/transformTestWriteHistories.ts} +3 -3
- package/src/orchestrate/test/orchestrateTest.ts +17 -6
- package/src/orchestrate/test/orchestrateTestCorrect.ts +32 -62
- package/src/orchestrate/test/orchestrateTestScenario.ts +241 -168
- package/src/orchestrate/test/orchestrateTestWrite.ts +48 -71
- package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +6 -5
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +25 -24
- package/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.ts +7 -0
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +3 -1
- package/src/utils/predicateStateMessage.ts +107 -0
- 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 +0 -141
- 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 +0 -1643
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js +0 -411
- 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 +0 -85
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +0 -52
- 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.d.ts +0 -5
- 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 +0 -3
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +0 -56
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.js +0 -3
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +0 -2
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js +0 -5
- 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 +0 -34
- 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.d.ts +0 -5
- package/lib/utils/pipe.js +0 -14
- 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/structures/IAutoBeRealizeCompile.ts +0 -70
- package/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.ts +0 -2
- package/src/orchestrate/realize/transformRealizeAuthorization.ts +0 -44
- package/src/orchestrate/realize/transformRealizeCoderHistories.ts +0 -248
- 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/src/utils/pipe.ts +0 -39
- /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}/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/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/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 → 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/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}/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
|
@@ -45,148 +45,83 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
45
45
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.
|
|
48
|
+
exports.orchestratePrismaReview = orchestratePrismaReview;
|
|
49
49
|
const __typia_transform__isUniqueItems = __importStar(require("typia/lib/internal/_isUniqueItems.js"));
|
|
50
50
|
const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
|
|
51
|
-
const core_1 = require("@agentica/core");
|
|
52
51
|
const typia_1 = __importDefault(require("typia"));
|
|
53
52
|
const assertSchemaModel_1 = require("../../context/assertSchemaModel");
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
const transformPrismaSchemaHistories_1 = require("./histories/transformPrismaSchemaHistories");
|
|
57
|
-
function orchestratePrismaSchemas(ctx, components) {
|
|
53
|
+
const transformPrismaReviewHistories_1 = require("./histories/transformPrismaReviewHistories");
|
|
54
|
+
function orchestratePrismaReview(ctx, application, schemas, componentList) {
|
|
58
55
|
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
thinking: result.thinking,
|
|
73
|
-
draft: result.draft,
|
|
74
|
-
review: result.review,
|
|
75
|
-
final: result.final,
|
|
76
|
-
file: {
|
|
77
|
-
filename: comp.filename,
|
|
78
|
-
namespace: comp.namespace,
|
|
79
|
-
models: result.models,
|
|
80
|
-
},
|
|
81
|
-
completed: (completed += comp.tables.length),
|
|
82
|
-
total,
|
|
83
|
-
step: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
|
|
84
|
-
};
|
|
85
|
-
ctx.dispatch(event);
|
|
86
|
-
return event;
|
|
87
|
-
})));
|
|
56
|
+
const progress = {
|
|
57
|
+
completed: 0,
|
|
58
|
+
total: componentList.length,
|
|
59
|
+
};
|
|
60
|
+
return (yield Promise.all(componentList.map((component) => __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
try {
|
|
62
|
+
return yield step(ctx, application, schemas, component, progress);
|
|
63
|
+
}
|
|
64
|
+
catch (_a) {
|
|
65
|
+
++progress.completed;
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
})))).filter((v) => v !== null);
|
|
88
69
|
});
|
|
89
70
|
}
|
|
90
|
-
function
|
|
71
|
+
function step(ctx, application, schemas, component, progress) {
|
|
91
72
|
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
-
var _a;
|
|
73
|
+
var _a, _b, _c, _d;
|
|
74
|
+
const start = new Date();
|
|
93
75
|
const pointer = {
|
|
94
76
|
value: null,
|
|
95
77
|
};
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
const tokenUsage = agentica.getTokenUsage().aggregate;
|
|
116
|
-
ctx.usage().record(tokenUsage, ["prisma"]);
|
|
78
|
+
const { tokenUsage } = yield ctx.conversate({
|
|
79
|
+
source: "prismaReview",
|
|
80
|
+
histories: (0, transformPrismaReviewHistories_1.transformPrismaReviewHistories)({
|
|
81
|
+
analysis: (_b = (_a = ctx
|
|
82
|
+
.state()
|
|
83
|
+
.analyze) === null || _a === void 0 ? void 0 : _a.files.map((file) => ({ [file.filename]: file.content })).reduce((acc, cur) => {
|
|
84
|
+
return Object.assign(acc, cur);
|
|
85
|
+
}, {})) !== null && _b !== void 0 ? _b : {},
|
|
86
|
+
application,
|
|
87
|
+
schemas,
|
|
88
|
+
component,
|
|
89
|
+
}),
|
|
90
|
+
controller: createController(ctx, {
|
|
91
|
+
build: (next) => {
|
|
92
|
+
pointer.value = next;
|
|
93
|
+
},
|
|
94
|
+
}),
|
|
95
|
+
enforceFunctionCall: true,
|
|
96
|
+
message: "Please review the Prisma schema file.",
|
|
117
97
|
});
|
|
118
98
|
if (pointer.value === null)
|
|
119
|
-
throw new Error("
|
|
120
|
-
|
|
99
|
+
throw new Error("Failed to review the Prisma schema.");
|
|
100
|
+
const event = {
|
|
101
|
+
type: "prismaReview",
|
|
102
|
+
created_at: start.toISOString(),
|
|
103
|
+
filename: component.filename,
|
|
104
|
+
review: pointer.value.review,
|
|
105
|
+
plan: pointer.value.plan,
|
|
106
|
+
modifications: pointer.value.modifications,
|
|
107
|
+
tokenUsage,
|
|
108
|
+
completed: ++progress.completed,
|
|
109
|
+
total: progress.total,
|
|
110
|
+
step: (_d = (_c = ctx.state().analyze) === null || _c === void 0 ? void 0 : _c.step) !== null && _d !== void 0 ? _d : 0,
|
|
111
|
+
};
|
|
112
|
+
ctx.dispatch(event);
|
|
113
|
+
return event;
|
|
121
114
|
});
|
|
122
115
|
}
|
|
123
|
-
function
|
|
116
|
+
function createController(ctx, props) {
|
|
124
117
|
(0, assertSchemaModel_1.assertSchemaModel)(ctx.model);
|
|
125
118
|
const application = collection[ctx.model];
|
|
126
|
-
// application.functions[0].validate = (
|
|
127
|
-
// input: unknown,
|
|
128
|
-
// ): IValidation<IMakePrismaSchemaFileProps> => {
|
|
129
|
-
// const result: IValidation<IMakePrismaSchemaFileProps> =
|
|
130
|
-
// typia.validate<IMakePrismaSchemaFileProps>(input);
|
|
131
|
-
// if (result.success === false) return result;
|
|
132
|
-
// const everyModels: AutoBePrisma.IModel[] = result.data.models;
|
|
133
|
-
// result.data.models = result.data.models.filter((m) =>
|
|
134
|
-
// props.otherComponents.every((oc) => oc.tables.includes(m.name) === false),
|
|
135
|
-
// );
|
|
136
|
-
// const expected: string[] = props.targetComponent.tables;
|
|
137
|
-
// const actual: string[] = result.data.models.map((m) => m.name);
|
|
138
|
-
// const missed: string[] = expected.filter(
|
|
139
|
-
// (x) => actual.includes(x) === false,
|
|
140
|
-
// );
|
|
141
|
-
// if (missed.length === 0) return result;
|
|
142
|
-
// ctx.dispatch({
|
|
143
|
-
// type: "prismaInsufficient",
|
|
144
|
-
// created_at: new Date().toISOString(),
|
|
145
|
-
// component: props.targetComponent,
|
|
146
|
-
// actual: everyModels,
|
|
147
|
-
// missed,
|
|
148
|
-
// tablesToCreate: result.data.tablesToCreate,
|
|
149
|
-
// validationReview: result.data.validationReview,
|
|
150
|
-
// confirmedTables: result.data.confirmedTables,
|
|
151
|
-
// });
|
|
152
|
-
// return {
|
|
153
|
-
// success: false,
|
|
154
|
-
// data: result.data,
|
|
155
|
-
// errors: [
|
|
156
|
-
// {
|
|
157
|
-
// path: "$input.file.models",
|
|
158
|
-
// value: result.data.models,
|
|
159
|
-
// expected: `Array<AutoBePrisma.IModel>`,
|
|
160
|
-
// description: [
|
|
161
|
-
// "You missed some tables from the current domain's component.",
|
|
162
|
-
// "",
|
|
163
|
-
// "Look at the following details to fix the schemas. Never forget to",
|
|
164
|
-
// "compose the `missed` tables at the next function calling.",
|
|
165
|
-
// "",
|
|
166
|
-
// "- filename: current domain's filename",
|
|
167
|
-
// "- namespace: current domain's namespace",
|
|
168
|
-
// "- expected: expected tables in the current domain",
|
|
169
|
-
// "- actual: actual tables you made",
|
|
170
|
-
// "- missed: tables you have missed, and you have to compose again",
|
|
171
|
-
// "",
|
|
172
|
-
// JSON.stringify({
|
|
173
|
-
// filename: props.targetComponent.filename,
|
|
174
|
-
// namespace: props.targetComponent.namespace,
|
|
175
|
-
// expected,
|
|
176
|
-
// actual,
|
|
177
|
-
// missed,
|
|
178
|
-
// }),
|
|
179
|
-
// ].join("\n"),
|
|
180
|
-
// },
|
|
181
|
-
// ],
|
|
182
|
-
// };
|
|
183
|
-
// };
|
|
184
119
|
return {
|
|
185
120
|
protocol: "class",
|
|
186
|
-
name: "Prisma
|
|
121
|
+
name: "Prisma Schema Review",
|
|
187
122
|
application,
|
|
188
123
|
execute: {
|
|
189
|
-
|
|
124
|
+
reviewSchemaFile: (next) => {
|
|
190
125
|
props.build(next);
|
|
191
126
|
},
|
|
192
127
|
},
|
|
@@ -200,29 +135,21 @@ const claude = {
|
|
|
200
135
|
},
|
|
201
136
|
functions: [
|
|
202
137
|
{
|
|
203
|
-
name: "
|
|
138
|
+
name: "reviewSchemaFile",
|
|
204
139
|
parameters: {
|
|
205
|
-
description: "
|
|
140
|
+
description: "Current Type: {@link IAutoBePrismaReviewApplication.IProps}",
|
|
206
141
|
type: "object",
|
|
207
142
|
properties: {
|
|
208
|
-
thinking: {
|
|
209
|
-
description: "Step 1: Strategic database design analysis and planning.\n\nAI analyzes the target component and business requirements to formulate a\ncomprehensive database design strategy. This planning phase is crucial\nfor creating well-structured, normalized schemas that align with business\nobjectives. The AI must define table structures, relationships, indexing\nstrategies, and data integrity constraints before proceeding to schema\nimplementation.\n\n**Key Considerations:**\n\n- **Assignment Validation**: Extract targetComponent.tables as the complete\n specification\n- **Table Count**: Must create exactly targetComponent.tables.length models\n- **Other Components**: Identify already-created tables for foreign key\n references only\n- **Normalization**: Strict adherence to 1NF, 2NF, 3NF principles\n- **Snapshot Architecture**: Design for historical data preservation and\n audit trails\n- **Junction Tables**: Plan M:N relationships with proper naming\n ({table1}_{table2})\n- **Materialized Views**: Identify needs for mv_ prefixed denormalized\n tables\n\nWorkflow: Component analysis \u2192 Strategic planning \u2192 Design rationale",
|
|
210
|
-
type: "string"
|
|
211
|
-
},
|
|
212
|
-
draft: {
|
|
213
|
-
description: "Step 2: Initial Prisma schema code implementation.\n\nAI generates the first working version of the Prisma schema based on the\nstrategic plan. This draft must be syntactically correct Prisma Schema\nLanguage (PSL) code that implements all planned tables, relationships,\nand constraints. The schema should follow Prisma conventions while\nincorporating enterprise patterns like snapshot tables and materialized\nviews.\n\n**Implementation Requirements:**\n\n- **Exact Table Names**: Use EXACT names from targetComponent.tables (NO\n CHANGES)\n- **Valid PSL Syntax**: Proper model blocks, field definitions, and\n directives\n- **Primary Keys**: Always UUID type with `@id` directive\n- **Foreign Keys**: UUID type following {target_model}_id naming pattern\n- **Data Types**: uuid, string, int, double, datetime, boolean, uri (no\n pre-calculated fields)\n- **Relationships**: Proper `@relation` directives for 1:1, 1:N, M:N\n patterns\n- **Descriptions**: Follow format with requirements mapping and business\n purpose\n- **NO Prohibited Fields**: No totals, cached values, aggregates in regular\n tables\n\nWorkflow: Strategic plan \u2192 PSL implementation \u2192 Functional schema code",
|
|
214
|
-
type: "string"
|
|
215
|
-
},
|
|
216
143
|
review: {
|
|
217
|
-
description: "
|
|
144
|
+
description: "Comprehensive review analysis of the proposed schema modifications.\n\nContains the AI agent's detailed evaluation of the schema changes,\nincluding validation of normalization compliance, relationship integrity,\nindex optimization, and business requirement alignment. The review\nidentifies potential issues and confirms adherence to best practices.\n\n**Review Dimensions:**\n\n- **Normalization Validation**: Confirms 3NF compliance and proper data\n structure\n- **Relationship Integrity**: Validates foreign key references and\n cardinality\n- **Performance Optimization**: Reviews indexing strategy and query\n patterns\n- **Business Logic Alignment**: Ensures schema supports all use cases\n- **Naming Conventions**: Verifies consistent naming patterns\n- **Data Type Consistency**: Confirms appropriate field types\n- **Temporal Field Handling**: Validates audit trail implementation\n\n**Example:**\n\n \"After reviewing the schema modifications:\n 1. All tables properly implement UUID primary keys\n 2. Foreign key relationships correctly reference existing models\n 3. Composite indexes optimize for common query patterns\n 4. Snapshot tables include proper temporal fields\n 5. Materialized views (mv_) contain appropriate denormalization\n The schema follows all best practices and is ready for implementation.\"",
|
|
218
145
|
type: "string"
|
|
219
146
|
},
|
|
220
|
-
|
|
221
|
-
description: "
|
|
147
|
+
plan: {
|
|
148
|
+
description: "Strategic database design plan that guided the schema creation.\n\nContains the original planning document that outlines the database\narchitecture strategy, including table structures, relationships,\nnormalization approach, and business requirement mapping. This plan\nserves as the blueprint for validating the implemented schema.\n\n**Planning Components:**\n\n- **Business Requirements**: Mapping of business needs to database\n structures\n- **Table Design**: Entity definitions and attribute specifications\n- **Relationship Strategy**: Cardinality and referential integrity planning\n- **Normalization Approach**: Application of 1NF, 2NF, 3NF principles\n- **Performance Considerations**: Index strategy and query optimization\n- **Snapshot Architecture**: Temporal data handling and audit requirements\n- **Materialized Views**: Denormalization strategy for performance\n\n**Example:**\n\n \"Database Design Strategy:\n Component: Sales Domain\n Tables: shopping_sales, shopping_sale_snapshots, shopping_sale_units\n\n Design Approach:\n - Normalize product catalog to 3NF for data integrity\n - Implement snapshot pattern for price history tracking\n - Create composite indexes for product search queries\n - Use materialized views for sales analytics dashboards\"",
|
|
222
149
|
type: "string"
|
|
223
150
|
},
|
|
224
|
-
|
|
225
|
-
description: "
|
|
151
|
+
modifications: {
|
|
152
|
+
description: "Array of Prisma models that have been modified based on review feedback.\n\nContains ONLY the models that required changes, not the entire schema.\nEach model represents a complete table definition with all fields,\nrelationships, indexes, and documentation. These modifications will be\napplied to the models to produce the final implementation.\n\n**Model Requirements:**\n\n- **Complete Models**: Each entry must be a complete model definition\n- **Targeted Changes**: Only includes models that need modifications\n- **AST Compliance**: Follows AutoBePrisma.IModel interface structure\n- **Relationship Integrity**: All foreign keys reference valid models\n- **Index Optimization**: Strategic indexes without redundancy\n- **Documentation**: Comprehensive English descriptions\n\n**Notes:**\n\n- Models not included in this array remain unchanged from the models\n- The final schema merges these modifications with the original models\n- All modifications must resolve issues identified in the review",
|
|
226
153
|
type: "array",
|
|
227
154
|
items: {
|
|
228
155
|
$ref: "#/$defs/AutoBePrisma.IModel"
|
|
@@ -230,11 +157,9 @@ const claude = {
|
|
|
230
157
|
}
|
|
231
158
|
},
|
|
232
159
|
required: [
|
|
233
|
-
"thinking",
|
|
234
|
-
"draft",
|
|
235
160
|
"review",
|
|
236
|
-
"
|
|
237
|
-
"
|
|
161
|
+
"plan",
|
|
162
|
+
"modifications"
|
|
238
163
|
],
|
|
239
164
|
additionalProperties: false,
|
|
240
165
|
$defs: {
|
|
@@ -243,18 +168,32 @@ const claude = {
|
|
|
243
168
|
type: "object",
|
|
244
169
|
properties: {
|
|
245
170
|
name: {
|
|
246
|
-
description: "Name of the Prisma model (database table name).\n\
|
|
171
|
+
description: "Name of the Prisma model (database table name).\n\nMUST use snake_case naming convention. Examples: \"shopping_customers\",\n\"shopping_sale_snapshots\", \"bbs_articles\" Materialized views use \"mv_\"\nprefix: \"mv_shopping_sale_last_snapshots\"",
|
|
247
172
|
type: "string",
|
|
248
173
|
pattern: "^[a-z][a-z0-9_]*$"
|
|
249
174
|
},
|
|
250
175
|
description: {
|
|
251
|
-
description: "Detailed description explaining the business purpose and usage of the\nmodel.\n\nShould include:\n\n- Business context and purpose\n- Key relationships with other models\n- Important behavioral notes or constraints\n- References to related entities using \"{@\\link ModelName}\" syntax Example
|
|
176
|
+
description: "Detailed description explaining the business purpose and usage of the\nmodel.\n\nShould include:\n\n- Business context and purpose\n- Key relationships with other models\n- Important behavioral notes or constraints\n- References to related entities using \"{@\\link ModelName}\" syntax\n\n**IMPORTANT**: Description must be written in English. Example: \"Customer\ninformation, but not a person but a **connection** basis...\"",
|
|
252
177
|
type: "string"
|
|
253
178
|
},
|
|
254
179
|
material: {
|
|
255
180
|
description: "Indicates whether this model represents a materialized view for\nperformance optimization.\n\nMaterialized views are read-only computed tables that cache complex query\nresults. They're marked as \"@\\hidden\" in documentation and prefixed with\n\"mv_\" in naming. Examples: mv_shopping_sale_last_snapshots,\nmv_shopping_cart_commodity_prices",
|
|
256
181
|
type: "boolean"
|
|
257
182
|
},
|
|
183
|
+
stance: {
|
|
184
|
+
description: "Specifies the architectural stance of this model within the database\nsystem.\n\nThis property defines how the table positions itself in relation to other\ntables and what role it plays in the overall data architecture,\nparticularly for API endpoint generation and business logic\norganization.\n\n## Values:\n\n### `\"primary\"` - Main Business Entity\n\nTables that represent core business concepts and serve as the primary\nsubjects of user operations. These tables typically warrant independent\nCRUD API endpoints since users directly interact with these entities.\n\n**Key principle**: If users need to independently create, search, filter,\nor manage entities regardless of their parent context, the table should\nbe primary stance.\n\n**API Requirements:**\n\n- Independent creation endpoints (POST /articles, POST /comments)\n- Search and filtering capabilities across all instances\n- Direct update and delete operations\n- List/pagination endpoints for browsing\n\n**Why `bbs_article_comments` is primary, not subsidiary:**\n\nAlthough comments belong to articles, they require independent\nmanagement:\n\n- **Search across articles**: \"Find all comments by user X across all\n articles\"\n- **Moderation workflows**: \"List all pending comments for review\"\n- **User activity**: \"Show all comments made by this user\"\n- **Independent operations**: Users edit/delete their comments directly\n- **Notification systems**: \"Alert when any comment is posted\"\n\nIf comments were subsidiary, these operations would be impossible or\nrequire inefficient nested queries through parent articles.\n\n**Characteristics:**\n\n- Represents tangible business concepts that users manage\n- Serves as reference points for other tables\n- Requires comprehensive API operations (CREATE, READ, UPDATE, DELETE)\n- Forms the backbone of the application's business logic\n\n**Examples:**\n\n- `bbs_articles` - Forum posts that users create, edit, and manage\n- `bbs_article_comments` - User comments that require independent\n management\n\n### `\"subsidiary\"` - Supporting/Dependent Entity\n\nTables that exist to support primary entities but are not independently\nmanaged by users. These tables are typically managed through their parent\nentities and may not need standalone API endpoints.\n\n**Characteristics:**\n\n- Depends on primary or snapshot entities for context\n- Often managed indirectly through parent entity operations\n- May have limited or no independent API operations\n- Provides supporting data or relationships\n\n**Examples:**\n\n- `bbs_article_snapshot_files` - Files attached to article snapshots\n- `bbs_article_snapshot_tags` - Tags associated with article snapshots\n- `bbs_article_comment_snapshot_files` - Files attached to comment\n snapshots\n\n### `\"snapshot\"` - Historical/Versioning Entity\n\nTables that capture point-in-time states of primary entities for audit\ntrails, version control, or historical tracking. These tables record\nchanges but are rarely modified directly by users.\n\n**Characteristics:**\n\n- Captures historical states of primary entities\n- Typically append-only (rarely updated or deleted)\n- Referenced for audit trails and change tracking\n- Usually read-only from user perspective\n\n**Examples:**\n\n- `bbs_article_snapshots` - Historical states of articles\n- `bbs_article_comment_snapshots` - Comment modification history\n\n## API Generation Guidelines:\n\nThe stance property guides automatic API endpoint generation:\n\n- **`\"primary\"`** \u2192 Generate full CRUD endpoints based on business\n requirements\n- **`\"subsidiary\"`** \u2192 Evaluate carefully; often managed through parent\n entities\n- **`\"snapshot\"`** \u2192 Typically read-only endpoints for historical data\n access",
|
|
185
|
+
oneOf: [
|
|
186
|
+
{
|
|
187
|
+
"const": "primary"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"const": "subsidiary"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"const": "snapshot"
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
},
|
|
258
197
|
primaryField: {
|
|
259
198
|
description: "The primary key field of the model.\n\nIn all uploaded schemas, primary keys are always UUID type with \"@\\id\"\ndirective. Usually named \"id\" and marked with \"@\\db.Uuid\" for PostgreSQL\nmapping.",
|
|
260
199
|
$ref: "#/$defs/AutoBePrisma.IPrimaryField"
|
|
@@ -299,6 +238,7 @@ const claude = {
|
|
|
299
238
|
"name",
|
|
300
239
|
"description",
|
|
301
240
|
"material",
|
|
241
|
+
"stance",
|
|
302
242
|
"primaryField",
|
|
303
243
|
"foreignFields",
|
|
304
244
|
"plainFields",
|
|
@@ -312,7 +252,7 @@ const claude = {
|
|
|
312
252
|
type: "object",
|
|
313
253
|
properties: {
|
|
314
254
|
name: {
|
|
315
|
-
description: "Name of the primary key field.\n\
|
|
255
|
+
description: "Name of the primary key field.\n\nMUST use snake_case naming convention. Consistently named \"id\" across all\nmodels in the uploaded schemas. Represents the unique identifier for each\nrecord in the table.",
|
|
316
256
|
type: "string",
|
|
317
257
|
pattern: "^[a-z][a-z0-9_]*$"
|
|
318
258
|
},
|
|
@@ -321,7 +261,7 @@ const claude = {
|
|
|
321
261
|
"const": "uuid"
|
|
322
262
|
},
|
|
323
263
|
description: {
|
|
324
|
-
description: "Description of the primary key field's purpose.\n\nStandard description is \"Primary Key.\" across all models. Serves as the\nunique identifier for the model instance.",
|
|
264
|
+
description: "Description of the primary key field's purpose.\n\nStandard description is \"Primary Key.\" across all models. Serves as the\nunique identifier for the model instance.\n\n**IMPORTANT**: Description must be written in English.",
|
|
325
265
|
type: "string"
|
|
326
266
|
}
|
|
327
267
|
},
|
|
@@ -336,7 +276,7 @@ const claude = {
|
|
|
336
276
|
type: "object",
|
|
337
277
|
properties: {
|
|
338
278
|
name: {
|
|
339
|
-
description: "Name of the foreign key field.\n\
|
|
279
|
+
description: "Name of the foreign key field.\n\nMUST use snake_case naming convention. Follows convention:\n\"{target_model_name_without_prefix}_id\" Examples: \"shopping_customer_id\",\n\"bbs_article_id\", \"attachment_file_id\" For self-references: \"parent_id\"\n(e.g., in hierarchical structures)",
|
|
340
280
|
type: "string",
|
|
341
281
|
pattern: "^[a-z][a-z0-9_]*$"
|
|
342
282
|
},
|
|
@@ -345,7 +285,7 @@ const claude = {
|
|
|
345
285
|
"const": "uuid"
|
|
346
286
|
},
|
|
347
287
|
description: {
|
|
348
|
-
description: "Description explaining the purpose and target of this foreign key\nrelationship.\n\nShould reference the target model using format: \"Target model's {@\\link\nModelName.id}\" Examples: \"Belonged customer's {@\\link\nshopping_customers.id}\" May include additional context about the\nrelationship's business meaning.",
|
|
288
|
+
description: "Description explaining the purpose and target of this foreign key\nrelationship.\n\nShould reference the target model using format: \"Target model's {@\\link\nModelName.id}\" Examples: \"Belonged customer's {@\\link\nshopping_customers.id}\" May include additional context about the\nrelationship's business meaning.\n\n**IMPORTANT**: Description must be written in English.",
|
|
349
289
|
type: "string"
|
|
350
290
|
},
|
|
351
291
|
relation: {
|
|
@@ -377,7 +317,7 @@ const claude = {
|
|
|
377
317
|
name: {
|
|
378
318
|
description: "Name of the relation property in the Prisma model.\n\nThis becomes the property name used to access the related model instance\nthrough the Prisma client. Should be descriptive and reflect the business\nrelationship being modeled.\n\nExamples:\n\n- \"customer\" for shopping_customer_id field\n- \"channel\" for shopping_channel_id field\n- \"parent\" for parent_id field in hierarchical structures\n- \"snapshot\" for versioning relationships\n- \"article\" for bbs_article_id field\n\nNaming convention: camelCase, descriptive of the relationship's business\nmeaning",
|
|
379
319
|
type: "string",
|
|
380
|
-
pattern: "^[a-
|
|
320
|
+
pattern: "^[a-z][a-zA-Z0-9]*$"
|
|
381
321
|
},
|
|
382
322
|
targetModel: {
|
|
383
323
|
description: "Name of the target model being referenced by this relation.\n\nMust exactly match an existing model name in the schema. This is used by\nPrisma to establish the foreign key constraint and generate the\nappropriate relation mapping.\n\nExamples:\n\n- \"shopping_customers\" for customer relationships\n- \"shopping_channels\" for channel relationships\n- \"bbs_articles\" for article relationships\n- \"attachment_files\" for file attachments\n\nThe target model should exist in the same schema or be accessible through\nthe Prisma schema configuration.",
|
|
@@ -394,7 +334,7 @@ const claude = {
|
|
|
394
334
|
type: "object",
|
|
395
335
|
properties: {
|
|
396
336
|
name: {
|
|
397
|
-
description: "Name of the field in the database table.\n\
|
|
337
|
+
description: "Name of the field in the database table.\n\nMUST use snake_case naming convention. Common patterns from uploaded\nschemas:\n\n- Timestamps: created_at, updated_at, deleted_at, opened_at, closed_at\n- Identifiers: code, name, nickname, title\n- Business data: value, quantity, price, volume, balance\n- Flags: primary, required, exclusive, secret, multiplicative",
|
|
398
338
|
type: "string",
|
|
399
339
|
pattern: "^[a-z][a-z0-9_]*$"
|
|
400
340
|
},
|
|
@@ -425,7 +365,7 @@ const claude = {
|
|
|
425
365
|
]
|
|
426
366
|
},
|
|
427
367
|
description: {
|
|
428
|
-
description: "Description explaining the business purpose and usage of this field.\n\nShould clearly explain:\n\n- What business concept this field represents\n- Valid values or constraints if applicable\n- How it relates to business processes\n- Any special behavioral notes Example: \"Amount
|
|
368
|
+
description: "Description explaining the business purpose and usage of this field.\n\nShould clearly explain:\n\n- What business concept this field represents\n- Valid values or constraints if applicable\n- How it relates to business processes\n- Any special behavioral notes\n\n**IMPORTANT**: Description must be written in English. Example: \"Amount\nof cash payment.\" or \"Whether the unit is required or not.\"",
|
|
429
369
|
type: "string"
|
|
430
370
|
},
|
|
431
371
|
nullable: {
|
|
@@ -496,46 +436,38 @@ const claude = {
|
|
|
496
436
|
}
|
|
497
437
|
}
|
|
498
438
|
},
|
|
499
|
-
description: "
|
|
500
|
-
validate: (() => { const _io0 = input => "string" === typeof input.
|
|
501
|
-
path: _path + ".thinking",
|
|
502
|
-
expected: "string",
|
|
503
|
-
value: input.thinking
|
|
504
|
-
}), "string" === typeof input.draft || _report(_exceptionable, {
|
|
505
|
-
path: _path + ".draft",
|
|
506
|
-
expected: "string",
|
|
507
|
-
value: input.draft
|
|
508
|
-
}), "string" === typeof input.review || _report(_exceptionable, {
|
|
439
|
+
description: "Reviews and validates Prisma schema modifications to ensure compliance with\ndatabase design best practices and business requirements.\n\nPerforms comprehensive validation of proposed schema changes including\nnormalization compliance, relationship integrity, performance optimization,\nand business logic alignment. The review process ensures all modifications\nmaintain data consistency and follow enterprise-level database standards.",
|
|
440
|
+
validate: (() => { const _io0 = input => "string" === typeof input.review && "string" === typeof input.plan && (Array.isArray(input.modifications) && input.modifications.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "string" === typeof input.description && "boolean" === typeof input.material && ("primary" === input.stance || "subsidiary" === input.stance || "snapshot" === input.stance) && ("object" === typeof input.primaryField && null !== input.primaryField && _io2(input.primaryField)) && (Array.isArray(input.foreignFields) && input.foreignFields.every(elem => "object" === typeof elem && null !== elem && _io3(elem))) && (Array.isArray(input.plainFields) && input.plainFields.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && (Array.isArray(input.uniqueIndexes) && input.uniqueIndexes.every(elem => "object" === typeof elem && null !== elem && _io6(elem))) && (Array.isArray(input.plainIndexes) && input.plainIndexes.every(elem => "object" === typeof elem && null !== elem && _io7(elem))) && (Array.isArray(input.ginIndexes) && input.ginIndexes.every(elem => "object" === typeof elem && null !== elem && _io8(elem))); const _io2 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description; const _io3 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description && ("object" === typeof input.relation && null !== input.relation && _io4(input.relation)) && "boolean" === typeof input.unique && "boolean" === typeof input.nullable; const _io4 = input => "string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) && "string" === typeof input.targetModel; const _io5 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && ("string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type) && "string" === typeof input.description && "boolean" === typeof input.nullable; const _io6 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)) && true === input.unique; const _io7 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)); const _io8 = input => "string" === typeof input.fieldName; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
|
|
509
441
|
path: _path + ".review",
|
|
510
442
|
expected: "string",
|
|
511
443
|
value: input.review
|
|
512
|
-
}), "string" === typeof input.
|
|
513
|
-
path: _path + ".
|
|
444
|
+
}), "string" === typeof input.plan || _report(_exceptionable, {
|
|
445
|
+
path: _path + ".plan",
|
|
514
446
|
expected: "string",
|
|
515
|
-
value: input.
|
|
516
|
-
}), (Array.isArray(input.
|
|
517
|
-
path: _path + ".
|
|
447
|
+
value: input.plan
|
|
448
|
+
}), (Array.isArray(input.modifications) || _report(_exceptionable, {
|
|
449
|
+
path: _path + ".modifications",
|
|
518
450
|
expected: "Array<AutoBePrisma.IModel>",
|
|
519
|
-
value: input.
|
|
520
|
-
})) && input.
|
|
521
|
-
path: _path + ".
|
|
451
|
+
value: input.modifications
|
|
452
|
+
})) && input.modifications.map((elem, _index9) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
453
|
+
path: _path + ".modifications[" + _index9 + "]",
|
|
522
454
|
expected: "AutoBePrisma.IModel",
|
|
523
455
|
value: elem
|
|
524
|
-
})) && _vo1(elem, _path + ".
|
|
525
|
-
path: _path + ".
|
|
456
|
+
})) && _vo1(elem, _path + ".modifications[" + _index9 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
457
|
+
path: _path + ".modifications[" + _index9 + "]",
|
|
526
458
|
expected: "AutoBePrisma.IModel",
|
|
527
459
|
value: elem
|
|
528
460
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
529
|
-
path: _path + ".
|
|
461
|
+
path: _path + ".modifications",
|
|
530
462
|
expected: "Array<AutoBePrisma.IModel>",
|
|
531
|
-
value: input.
|
|
463
|
+
value: input.modifications
|
|
532
464
|
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
|
|
533
465
|
path: _path + ".name",
|
|
534
|
-
expected: "string &
|
|
466
|
+
expected: "string & SnakePattern",
|
|
535
467
|
value: input.name
|
|
536
468
|
})) || _report(_exceptionable, {
|
|
537
469
|
path: _path + ".name",
|
|
538
|
-
expected: "(string &
|
|
470
|
+
expected: "(string & SnakePattern)",
|
|
539
471
|
value: input.name
|
|
540
472
|
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
541
473
|
path: _path + ".description",
|
|
@@ -545,6 +477,10 @@ const claude = {
|
|
|
545
477
|
path: _path + ".material",
|
|
546
478
|
expected: "boolean",
|
|
547
479
|
value: input.material
|
|
480
|
+
}), "primary" === input.stance || "subsidiary" === input.stance || "snapshot" === input.stance || _report(_exceptionable, {
|
|
481
|
+
path: _path + ".stance",
|
|
482
|
+
expected: "(\"primary\" | \"snapshot\" | \"subsidiary\")",
|
|
483
|
+
value: input.stance
|
|
548
484
|
}), ("object" === typeof input.primaryField && null !== input.primaryField || _report(_exceptionable, {
|
|
549
485
|
path: _path + ".primaryField",
|
|
550
486
|
expected: "AutoBePrisma.IPrimaryField",
|
|
@@ -635,11 +571,11 @@ const claude = {
|
|
|
635
571
|
value: input.ginIndexes
|
|
636
572
|
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
|
|
637
573
|
path: _path + ".name",
|
|
638
|
-
expected: "string &
|
|
574
|
+
expected: "string & SnakePattern",
|
|
639
575
|
value: input.name
|
|
640
576
|
})) || _report(_exceptionable, {
|
|
641
577
|
path: _path + ".name",
|
|
642
|
-
expected: "(string &
|
|
578
|
+
expected: "(string & SnakePattern)",
|
|
643
579
|
value: input.name
|
|
644
580
|
}), "uuid" === input.type || _report(_exceptionable, {
|
|
645
581
|
path: _path + ".type",
|
|
@@ -651,11 +587,11 @@ const claude = {
|
|
|
651
587
|
value: input.description
|
|
652
588
|
})].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
|
|
653
589
|
path: _path + ".name",
|
|
654
|
-
expected: "string &
|
|
590
|
+
expected: "string & SnakePattern",
|
|
655
591
|
value: input.name
|
|
656
592
|
})) || _report(_exceptionable, {
|
|
657
593
|
path: _path + ".name",
|
|
658
|
-
expected: "(string &
|
|
594
|
+
expected: "(string & SnakePattern)",
|
|
659
595
|
value: input.name
|
|
660
596
|
}), "uuid" === input.type || _report(_exceptionable, {
|
|
661
597
|
path: _path + ".type",
|
|
@@ -681,13 +617,13 @@ const claude = {
|
|
|
681
617
|
path: _path + ".nullable",
|
|
682
618
|
expected: "boolean",
|
|
683
619
|
value: input.nullable
|
|
684
|
-
})].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-
|
|
620
|
+
})].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
685
621
|
path: _path + ".name",
|
|
686
|
-
expected: "string &
|
|
622
|
+
expected: "string & CamelPattern",
|
|
687
623
|
value: input.name
|
|
688
624
|
})) || _report(_exceptionable, {
|
|
689
625
|
path: _path + ".name",
|
|
690
|
-
expected: "(string &
|
|
626
|
+
expected: "(string & CamelPattern)",
|
|
691
627
|
value: input.name
|
|
692
628
|
}), "string" === typeof input.targetModel || _report(_exceptionable, {
|
|
693
629
|
path: _path + ".targetModel",
|
|
@@ -695,11 +631,11 @@ const claude = {
|
|
|
695
631
|
value: input.targetModel
|
|
696
632
|
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
|
|
697
633
|
path: _path + ".name",
|
|
698
|
-
expected: "string &
|
|
634
|
+
expected: "string & SnakePattern",
|
|
699
635
|
value: input.name
|
|
700
636
|
})) || _report(_exceptionable, {
|
|
701
637
|
path: _path + ".name",
|
|
702
|
-
expected: "(string &
|
|
638
|
+
expected: "(string & SnakePattern)",
|
|
703
639
|
value: input.name
|
|
704
640
|
}), "string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type || _report(_exceptionable, {
|
|
705
641
|
path: _path + ".type",
|
|
@@ -767,11 +703,11 @@ const claude = {
|
|
|
767
703
|
_report = __typia_transform__validateReport._validateReport(errors);
|
|
768
704
|
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
769
705
|
path: _path + "",
|
|
770
|
-
expected: "
|
|
706
|
+
expected: "IAutoBePrismaReviewApplication.IProps",
|
|
771
707
|
value: input
|
|
772
708
|
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
773
709
|
path: _path + "",
|
|
774
|
-
expected: "
|
|
710
|
+
expected: "IAutoBePrismaReviewApplication.IProps",
|
|
775
711
|
value: input
|
|
776
712
|
}))(input, "$input", true);
|
|
777
713
|
const success = 0 === errors.length;
|
|
@@ -802,29 +738,21 @@ const collection = {
|
|
|
802
738
|
},
|
|
803
739
|
functions: [
|
|
804
740
|
{
|
|
805
|
-
name: "
|
|
741
|
+
name: "reviewSchemaFile",
|
|
806
742
|
parameters: {
|
|
807
|
-
description: "
|
|
743
|
+
description: "Current Type: {@link IAutoBePrismaReviewApplication.IProps}",
|
|
808
744
|
type: "object",
|
|
809
745
|
properties: {
|
|
810
|
-
thinking: {
|
|
811
|
-
description: "Step 1: Strategic database design analysis and planning.\n\nAI analyzes the target component and business requirements to formulate a\ncomprehensive database design strategy. This planning phase is crucial\nfor creating well-structured, normalized schemas that align with business\nobjectives. The AI must define table structures, relationships, indexing\nstrategies, and data integrity constraints before proceeding to schema\nimplementation.\n\n**Key Considerations:**\n\n- **Assignment Validation**: Extract targetComponent.tables as the complete\n specification\n- **Table Count**: Must create exactly targetComponent.tables.length models\n- **Other Components**: Identify already-created tables for foreign key\n references only\n- **Normalization**: Strict adherence to 1NF, 2NF, 3NF principles\n- **Snapshot Architecture**: Design for historical data preservation and\n audit trails\n- **Junction Tables**: Plan M:N relationships with proper naming\n ({table1}_{table2})\n- **Materialized Views**: Identify needs for mv_ prefixed denormalized\n tables\n\nWorkflow: Component analysis \u2192 Strategic planning \u2192 Design rationale",
|
|
812
|
-
type: "string"
|
|
813
|
-
},
|
|
814
|
-
draft: {
|
|
815
|
-
description: "Step 2: Initial Prisma schema code implementation.\n\nAI generates the first working version of the Prisma schema based on the\nstrategic plan. This draft must be syntactically correct Prisma Schema\nLanguage (PSL) code that implements all planned tables, relationships,\nand constraints. The schema should follow Prisma conventions while\nincorporating enterprise patterns like snapshot tables and materialized\nviews.\n\n**Implementation Requirements:**\n\n- **Exact Table Names**: Use EXACT names from targetComponent.tables (NO\n CHANGES)\n- **Valid PSL Syntax**: Proper model blocks, field definitions, and\n directives\n- **Primary Keys**: Always UUID type with `@id` directive\n- **Foreign Keys**: UUID type following {target_model}_id naming pattern\n- **Data Types**: uuid, string, int, double, datetime, boolean, uri (no\n pre-calculated fields)\n- **Relationships**: Proper `@relation` directives for 1:1, 1:N, M:N\n patterns\n- **Descriptions**: Follow format with requirements mapping and business\n purpose\n- **NO Prohibited Fields**: No totals, cached values, aggregates in regular\n tables\n\nWorkflow: Strategic plan \u2192 PSL implementation \u2192 Functional schema code",
|
|
816
|
-
type: "string"
|
|
817
|
-
},
|
|
818
746
|
review: {
|
|
819
|
-
description: "
|
|
747
|
+
description: "Comprehensive review analysis of the proposed schema modifications.\n\nContains the AI agent's detailed evaluation of the schema changes,\nincluding validation of normalization compliance, relationship integrity,\nindex optimization, and business requirement alignment. The review\nidentifies potential issues and confirms adherence to best practices.\n\n**Review Dimensions:**\n\n- **Normalization Validation**: Confirms 3NF compliance and proper data\n structure\n- **Relationship Integrity**: Validates foreign key references and\n cardinality\n- **Performance Optimization**: Reviews indexing strategy and query\n patterns\n- **Business Logic Alignment**: Ensures schema supports all use cases\n- **Naming Conventions**: Verifies consistent naming patterns\n- **Data Type Consistency**: Confirms appropriate field types\n- **Temporal Field Handling**: Validates audit trail implementation\n\n**Example:**\n\n \"After reviewing the schema modifications:\n 1. All tables properly implement UUID primary keys\n 2. Foreign key relationships correctly reference existing models\n 3. Composite indexes optimize for common query patterns\n 4. Snapshot tables include proper temporal fields\n 5. Materialized views (mv_) contain appropriate denormalization\n The schema follows all best practices and is ready for implementation.\"",
|
|
820
748
|
type: "string"
|
|
821
749
|
},
|
|
822
|
-
|
|
823
|
-
description: "
|
|
750
|
+
plan: {
|
|
751
|
+
description: "Strategic database design plan that guided the schema creation.\n\nContains the original planning document that outlines the database\narchitecture strategy, including table structures, relationships,\nnormalization approach, and business requirement mapping. This plan\nserves as the blueprint for validating the implemented schema.\n\n**Planning Components:**\n\n- **Business Requirements**: Mapping of business needs to database\n structures\n- **Table Design**: Entity definitions and attribute specifications\n- **Relationship Strategy**: Cardinality and referential integrity planning\n- **Normalization Approach**: Application of 1NF, 2NF, 3NF principles\n- **Performance Considerations**: Index strategy and query optimization\n- **Snapshot Architecture**: Temporal data handling and audit requirements\n- **Materialized Views**: Denormalization strategy for performance\n\n**Example:**\n\n \"Database Design Strategy:\n Component: Sales Domain\n Tables: shopping_sales, shopping_sale_snapshots, shopping_sale_units\n\n Design Approach:\n - Normalize product catalog to 3NF for data integrity\n - Implement snapshot pattern for price history tracking\n - Create composite indexes for product search queries\n - Use materialized views for sales analytics dashboards\"",
|
|
824
752
|
type: "string"
|
|
825
753
|
},
|
|
826
|
-
|
|
827
|
-
description: "
|
|
754
|
+
modifications: {
|
|
755
|
+
description: "Array of Prisma models that have been modified based on review feedback.\n\nContains ONLY the models that required changes, not the entire schema.\nEach model represents a complete table definition with all fields,\nrelationships, indexes, and documentation. These modifications will be\napplied to the models to produce the final implementation.\n\n**Model Requirements:**\n\n- **Complete Models**: Each entry must be a complete model definition\n- **Targeted Changes**: Only includes models that need modifications\n- **AST Compliance**: Follows AutoBePrisma.IModel interface structure\n- **Relationship Integrity**: All foreign keys reference valid models\n- **Index Optimization**: Strategic indexes without redundancy\n- **Documentation**: Comprehensive English descriptions\n\n**Notes:**\n\n- Models not included in this array remain unchanged from the models\n- The final schema merges these modifications with the original models\n- All modifications must resolve issues identified in the review",
|
|
828
756
|
type: "array",
|
|
829
757
|
items: {
|
|
830
758
|
$ref: "#/$defs/AutoBePrisma.IModel"
|
|
@@ -832,11 +760,9 @@ const collection = {
|
|
|
832
760
|
}
|
|
833
761
|
},
|
|
834
762
|
required: [
|
|
835
|
-
"thinking",
|
|
836
|
-
"draft",
|
|
837
763
|
"review",
|
|
838
|
-
"
|
|
839
|
-
"
|
|
764
|
+
"plan",
|
|
765
|
+
"modifications"
|
|
840
766
|
],
|
|
841
767
|
additionalProperties: false,
|
|
842
768
|
$defs: {
|
|
@@ -845,17 +771,26 @@ const collection = {
|
|
|
845
771
|
type: "object",
|
|
846
772
|
properties: {
|
|
847
773
|
name: {
|
|
848
|
-
description: "Name of the Prisma model (database table name).\n\
|
|
774
|
+
description: "Name of the Prisma model (database table name).\n\nMUST use snake_case naming convention. Examples: \"shopping_customers\",\n\"shopping_sale_snapshots\", \"bbs_articles\" Materialized views use \"mv_\"\nprefix: \"mv_shopping_sale_last_snapshots\"\n\n\n@pattern ^[a-z][a-z0-9_]*$",
|
|
849
775
|
type: "string"
|
|
850
776
|
},
|
|
851
777
|
description: {
|
|
852
|
-
description: "Detailed description explaining the business purpose and usage of the\nmodel.\n\nShould include:\n\n- Business context and purpose\n- Key relationships with other models\n- Important behavioral notes or constraints\n- References to related entities using \"{@\\link ModelName}\" syntax Example
|
|
778
|
+
description: "Detailed description explaining the business purpose and usage of the\nmodel.\n\nShould include:\n\n- Business context and purpose\n- Key relationships with other models\n- Important behavioral notes or constraints\n- References to related entities using \"{@\\link ModelName}\" syntax\n\n**IMPORTANT**: Description must be written in English. Example: \"Customer\ninformation, but not a person but a **connection** basis...\"",
|
|
853
779
|
type: "string"
|
|
854
780
|
},
|
|
855
781
|
material: {
|
|
856
782
|
description: "Indicates whether this model represents a materialized view for\nperformance optimization.\n\nMaterialized views are read-only computed tables that cache complex query\nresults. They're marked as \"@\\hidden\" in documentation and prefixed with\n\"mv_\" in naming. Examples: mv_shopping_sale_last_snapshots,\nmv_shopping_cart_commodity_prices",
|
|
857
783
|
type: "boolean"
|
|
858
784
|
},
|
|
785
|
+
stance: {
|
|
786
|
+
description: "Specifies the architectural stance of this model within the database\nsystem.\n\nThis property defines how the table positions itself in relation to other\ntables and what role it plays in the overall data architecture,\nparticularly for API endpoint generation and business logic\norganization.\n\n## Values:\n\n### `\"primary\"` - Main Business Entity\n\nTables that represent core business concepts and serve as the primary\nsubjects of user operations. These tables typically warrant independent\nCRUD API endpoints since users directly interact with these entities.\n\n**Key principle**: If users need to independently create, search, filter,\nor manage entities regardless of their parent context, the table should\nbe primary stance.\n\n**API Requirements:**\n\n- Independent creation endpoints (POST /articles, POST /comments)\n- Search and filtering capabilities across all instances\n- Direct update and delete operations\n- List/pagination endpoints for browsing\n\n**Why `bbs_article_comments` is primary, not subsidiary:**\n\nAlthough comments belong to articles, they require independent\nmanagement:\n\n- **Search across articles**: \"Find all comments by user X across all\n articles\"\n- **Moderation workflows**: \"List all pending comments for review\"\n- **User activity**: \"Show all comments made by this user\"\n- **Independent operations**: Users edit/delete their comments directly\n- **Notification systems**: \"Alert when any comment is posted\"\n\nIf comments were subsidiary, these operations would be impossible or\nrequire inefficient nested queries through parent articles.\n\n**Characteristics:**\n\n- Represents tangible business concepts that users manage\n- Serves as reference points for other tables\n- Requires comprehensive API operations (CREATE, READ, UPDATE, DELETE)\n- Forms the backbone of the application's business logic\n\n**Examples:**\n\n- `bbs_articles` - Forum posts that users create, edit, and manage\n- `bbs_article_comments` - User comments that require independent\n management\n\n### `\"subsidiary\"` - Supporting/Dependent Entity\n\nTables that exist to support primary entities but are not independently\nmanaged by users. These tables are typically managed through their parent\nentities and may not need standalone API endpoints.\n\n**Characteristics:**\n\n- Depends on primary or snapshot entities for context\n- Often managed indirectly through parent entity operations\n- May have limited or no independent API operations\n- Provides supporting data or relationships\n\n**Examples:**\n\n- `bbs_article_snapshot_files` - Files attached to article snapshots\n- `bbs_article_snapshot_tags` - Tags associated with article snapshots\n- `bbs_article_comment_snapshot_files` - Files attached to comment\n snapshots\n\n### `\"snapshot\"` - Historical/Versioning Entity\n\nTables that capture point-in-time states of primary entities for audit\ntrails, version control, or historical tracking. These tables record\nchanges but are rarely modified directly by users.\n\n**Characteristics:**\n\n- Captures historical states of primary entities\n- Typically append-only (rarely updated or deleted)\n- Referenced for audit trails and change tracking\n- Usually read-only from user perspective\n\n**Examples:**\n\n- `bbs_article_snapshots` - Historical states of articles\n- `bbs_article_comment_snapshots` - Comment modification history\n\n## API Generation Guidelines:\n\nThe stance property guides automatic API endpoint generation:\n\n- **`\"primary\"`** \u2192 Generate full CRUD endpoints based on business\n requirements\n- **`\"subsidiary\"`** \u2192 Evaluate carefully; often managed through parent\n entities\n- **`\"snapshot\"`** \u2192 Typically read-only endpoints for historical data\n access",
|
|
787
|
+
type: "string",
|
|
788
|
+
"enum": [
|
|
789
|
+
"primary",
|
|
790
|
+
"subsidiary",
|
|
791
|
+
"snapshot"
|
|
792
|
+
]
|
|
793
|
+
},
|
|
859
794
|
primaryField: {
|
|
860
795
|
$ref: "#/$defs/AutoBePrisma.IPrimaryField"
|
|
861
796
|
},
|
|
@@ -899,6 +834,7 @@ const collection = {
|
|
|
899
834
|
"name",
|
|
900
835
|
"description",
|
|
901
836
|
"material",
|
|
837
|
+
"stance",
|
|
902
838
|
"primaryField",
|
|
903
839
|
"foreignFields",
|
|
904
840
|
"plainFields",
|
|
@@ -912,7 +848,7 @@ const collection = {
|
|
|
912
848
|
type: "object",
|
|
913
849
|
properties: {
|
|
914
850
|
name: {
|
|
915
|
-
description: "Name of the primary key field.\n\
|
|
851
|
+
description: "Name of the primary key field.\n\nMUST use snake_case naming convention. Consistently named \"id\" across all\nmodels in the uploaded schemas. Represents the unique identifier for each\nrecord in the table.\n\n\n@pattern ^[a-z][a-z0-9_]*$",
|
|
916
852
|
type: "string"
|
|
917
853
|
},
|
|
918
854
|
type: {
|
|
@@ -923,7 +859,7 @@ const collection = {
|
|
|
923
859
|
]
|
|
924
860
|
},
|
|
925
861
|
description: {
|
|
926
|
-
description: "Description of the primary key field's purpose.\n\nStandard description is \"Primary Key.\" across all models. Serves as the\nunique identifier for the model instance.",
|
|
862
|
+
description: "Description of the primary key field's purpose.\n\nStandard description is \"Primary Key.\" across all models. Serves as the\nunique identifier for the model instance.\n\n**IMPORTANT**: Description must be written in English.",
|
|
927
863
|
type: "string"
|
|
928
864
|
}
|
|
929
865
|
},
|
|
@@ -938,7 +874,7 @@ const collection = {
|
|
|
938
874
|
type: "object",
|
|
939
875
|
properties: {
|
|
940
876
|
name: {
|
|
941
|
-
description: "Name of the foreign key field.\n\
|
|
877
|
+
description: "Name of the foreign key field.\n\nMUST use snake_case naming convention. Follows convention:\n\"{target_model_name_without_prefix}_id\" Examples: \"shopping_customer_id\",\n\"bbs_article_id\", \"attachment_file_id\" For self-references: \"parent_id\"\n(e.g., in hierarchical structures)\n\n\n@pattern ^[a-z][a-z0-9_]*$",
|
|
942
878
|
type: "string"
|
|
943
879
|
},
|
|
944
880
|
type: {
|
|
@@ -949,7 +885,7 @@ const collection = {
|
|
|
949
885
|
]
|
|
950
886
|
},
|
|
951
887
|
description: {
|
|
952
|
-
description: "Description explaining the purpose and target of this foreign key\nrelationship.\n\nShould reference the target model using format: \"Target model's {@\\link\nModelName.id}\" Examples: \"Belonged customer's {@\\link\nshopping_customers.id}\" May include additional context about the\nrelationship's business meaning.",
|
|
888
|
+
description: "Description explaining the purpose and target of this foreign key\nrelationship.\n\nShould reference the target model using format: \"Target model's {@\\link\nModelName.id}\" Examples: \"Belonged customer's {@\\link\nshopping_customers.id}\" May include additional context about the\nrelationship's business meaning.\n\n**IMPORTANT**: Description must be written in English.",
|
|
953
889
|
type: "string"
|
|
954
890
|
},
|
|
955
891
|
relation: {
|
|
@@ -978,7 +914,7 @@ const collection = {
|
|
|
978
914
|
type: "object",
|
|
979
915
|
properties: {
|
|
980
916
|
name: {
|
|
981
|
-
description: "Name of the relation property in the Prisma model.\n\nThis becomes the property name used to access the related model instance\nthrough the Prisma client. Should be descriptive and reflect the business\nrelationship being modeled.\n\nExamples:\n\n- \"customer\" for shopping_customer_id field\n- \"channel\" for shopping_channel_id field\n- \"parent\" for parent_id field in hierarchical structures\n- \"snapshot\" for versioning relationships\n- \"article\" for bbs_article_id field\n\nNaming convention: camelCase, descriptive of the relationship's business\nmeaning\n\n\n@pattern ^[a-
|
|
917
|
+
description: "Name of the relation property in the Prisma model.\n\nThis becomes the property name used to access the related model instance\nthrough the Prisma client. Should be descriptive and reflect the business\nrelationship being modeled.\n\nExamples:\n\n- \"customer\" for shopping_customer_id field\n- \"channel\" for shopping_channel_id field\n- \"parent\" for parent_id field in hierarchical structures\n- \"snapshot\" for versioning relationships\n- \"article\" for bbs_article_id field\n\nNaming convention: camelCase, descriptive of the relationship's business\nmeaning\n\n\n@pattern ^[a-z][a-zA-Z0-9]*$",
|
|
982
918
|
type: "string"
|
|
983
919
|
},
|
|
984
920
|
targetModel: {
|
|
@@ -996,7 +932,7 @@ const collection = {
|
|
|
996
932
|
type: "object",
|
|
997
933
|
properties: {
|
|
998
934
|
name: {
|
|
999
|
-
description: "Name of the field in the database table.\n\
|
|
935
|
+
description: "Name of the field in the database table.\n\nMUST use snake_case naming convention. Common patterns from uploaded\nschemas:\n\n- Timestamps: created_at, updated_at, deleted_at, opened_at, closed_at\n- Identifiers: code, name, nickname, title\n- Business data: value, quantity, price, volume, balance\n- Flags: primary, required, exclusive, secret, multiplicative\n\n\n@pattern ^[a-z][a-z0-9_]*$",
|
|
1000
936
|
type: "string"
|
|
1001
937
|
},
|
|
1002
938
|
type: {
|
|
@@ -1013,7 +949,7 @@ const collection = {
|
|
|
1013
949
|
]
|
|
1014
950
|
},
|
|
1015
951
|
description: {
|
|
1016
|
-
description: "Description explaining the business purpose and usage of this field.\n\nShould clearly explain:\n\n- What business concept this field represents\n- Valid values or constraints if applicable\n- How it relates to business processes\n- Any special behavioral notes Example: \"Amount
|
|
952
|
+
description: "Description explaining the business purpose and usage of this field.\n\nShould clearly explain:\n\n- What business concept this field represents\n- Valid values or constraints if applicable\n- How it relates to business processes\n- Any special behavioral notes\n\n**IMPORTANT**: Description must be written in English. Example: \"Amount\nof cash payment.\" or \"Whether the unit is required or not.\"",
|
|
1017
953
|
type: "string"
|
|
1018
954
|
},
|
|
1019
955
|
nullable: {
|
|
@@ -1083,46 +1019,38 @@ const collection = {
|
|
|
1083
1019
|
}
|
|
1084
1020
|
}
|
|
1085
1021
|
},
|
|
1086
|
-
description: "
|
|
1087
|
-
validate: (() => { const _io0 = input => "string" === typeof input.
|
|
1088
|
-
path: _path + ".thinking",
|
|
1089
|
-
expected: "string",
|
|
1090
|
-
value: input.thinking
|
|
1091
|
-
}), "string" === typeof input.draft || _report(_exceptionable, {
|
|
1092
|
-
path: _path + ".draft",
|
|
1093
|
-
expected: "string",
|
|
1094
|
-
value: input.draft
|
|
1095
|
-
}), "string" === typeof input.review || _report(_exceptionable, {
|
|
1022
|
+
description: "Reviews and validates Prisma schema modifications to ensure compliance with\ndatabase design best practices and business requirements.\n\nPerforms comprehensive validation of proposed schema changes including\nnormalization compliance, relationship integrity, performance optimization,\nand business logic alignment. The review process ensures all modifications\nmaintain data consistency and follow enterprise-level database standards.",
|
|
1023
|
+
validate: (() => { const _io0 = input => "string" === typeof input.review && "string" === typeof input.plan && (Array.isArray(input.modifications) && input.modifications.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "string" === typeof input.description && "boolean" === typeof input.material && ("primary" === input.stance || "subsidiary" === input.stance || "snapshot" === input.stance) && ("object" === typeof input.primaryField && null !== input.primaryField && _io2(input.primaryField)) && (Array.isArray(input.foreignFields) && input.foreignFields.every(elem => "object" === typeof elem && null !== elem && _io3(elem))) && (Array.isArray(input.plainFields) && input.plainFields.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && (Array.isArray(input.uniqueIndexes) && input.uniqueIndexes.every(elem => "object" === typeof elem && null !== elem && _io6(elem))) && (Array.isArray(input.plainIndexes) && input.plainIndexes.every(elem => "object" === typeof elem && null !== elem && _io7(elem))) && (Array.isArray(input.ginIndexes) && input.ginIndexes.every(elem => "object" === typeof elem && null !== elem && _io8(elem))); const _io2 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description; const _io3 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description && ("object" === typeof input.relation && null !== input.relation && _io4(input.relation)) && "boolean" === typeof input.unique && "boolean" === typeof input.nullable; const _io4 = input => "string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) && "string" === typeof input.targetModel; const _io5 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && ("string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type) && "string" === typeof input.description && "boolean" === typeof input.nullable; const _io6 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)) && true === input.unique; const _io7 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)); const _io8 = input => "string" === typeof input.fieldName; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.review || _report(_exceptionable, {
|
|
1096
1024
|
path: _path + ".review",
|
|
1097
1025
|
expected: "string",
|
|
1098
1026
|
value: input.review
|
|
1099
|
-
}), "string" === typeof input.
|
|
1100
|
-
path: _path + ".
|
|
1027
|
+
}), "string" === typeof input.plan || _report(_exceptionable, {
|
|
1028
|
+
path: _path + ".plan",
|
|
1101
1029
|
expected: "string",
|
|
1102
|
-
value: input.
|
|
1103
|
-
}), (Array.isArray(input.
|
|
1104
|
-
path: _path + ".
|
|
1030
|
+
value: input.plan
|
|
1031
|
+
}), (Array.isArray(input.modifications) || _report(_exceptionable, {
|
|
1032
|
+
path: _path + ".modifications",
|
|
1105
1033
|
expected: "Array<AutoBePrisma.IModel>",
|
|
1106
|
-
value: input.
|
|
1107
|
-
})) && input.
|
|
1108
|
-
path: _path + ".
|
|
1034
|
+
value: input.modifications
|
|
1035
|
+
})) && input.modifications.map((elem, _index9) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1036
|
+
path: _path + ".modifications[" + _index9 + "]",
|
|
1109
1037
|
expected: "AutoBePrisma.IModel",
|
|
1110
1038
|
value: elem
|
|
1111
|
-
})) && _vo1(elem, _path + ".
|
|
1112
|
-
path: _path + ".
|
|
1039
|
+
})) && _vo1(elem, _path + ".modifications[" + _index9 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1040
|
+
path: _path + ".modifications[" + _index9 + "]",
|
|
1113
1041
|
expected: "AutoBePrisma.IModel",
|
|
1114
1042
|
value: elem
|
|
1115
1043
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
1116
|
-
path: _path + ".
|
|
1044
|
+
path: _path + ".modifications",
|
|
1117
1045
|
expected: "Array<AutoBePrisma.IModel>",
|
|
1118
|
-
value: input.
|
|
1046
|
+
value: input.modifications
|
|
1119
1047
|
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
|
|
1120
1048
|
path: _path + ".name",
|
|
1121
|
-
expected: "string &
|
|
1049
|
+
expected: "string & SnakePattern",
|
|
1122
1050
|
value: input.name
|
|
1123
1051
|
})) || _report(_exceptionable, {
|
|
1124
1052
|
path: _path + ".name",
|
|
1125
|
-
expected: "(string &
|
|
1053
|
+
expected: "(string & SnakePattern)",
|
|
1126
1054
|
value: input.name
|
|
1127
1055
|
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
1128
1056
|
path: _path + ".description",
|
|
@@ -1132,6 +1060,10 @@ const collection = {
|
|
|
1132
1060
|
path: _path + ".material",
|
|
1133
1061
|
expected: "boolean",
|
|
1134
1062
|
value: input.material
|
|
1063
|
+
}), "primary" === input.stance || "subsidiary" === input.stance || "snapshot" === input.stance || _report(_exceptionable, {
|
|
1064
|
+
path: _path + ".stance",
|
|
1065
|
+
expected: "(\"primary\" | \"snapshot\" | \"subsidiary\")",
|
|
1066
|
+
value: input.stance
|
|
1135
1067
|
}), ("object" === typeof input.primaryField && null !== input.primaryField || _report(_exceptionable, {
|
|
1136
1068
|
path: _path + ".primaryField",
|
|
1137
1069
|
expected: "AutoBePrisma.IPrimaryField",
|
|
@@ -1222,11 +1154,11 @@ const collection = {
|
|
|
1222
1154
|
value: input.ginIndexes
|
|
1223
1155
|
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
|
|
1224
1156
|
path: _path + ".name",
|
|
1225
|
-
expected: "string &
|
|
1157
|
+
expected: "string & SnakePattern",
|
|
1226
1158
|
value: input.name
|
|
1227
1159
|
})) || _report(_exceptionable, {
|
|
1228
1160
|
path: _path + ".name",
|
|
1229
|
-
expected: "(string &
|
|
1161
|
+
expected: "(string & SnakePattern)",
|
|
1230
1162
|
value: input.name
|
|
1231
1163
|
}), "uuid" === input.type || _report(_exceptionable, {
|
|
1232
1164
|
path: _path + ".type",
|
|
@@ -1238,11 +1170,11 @@ const collection = {
|
|
|
1238
1170
|
value: input.description
|
|
1239
1171
|
})].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
|
|
1240
1172
|
path: _path + ".name",
|
|
1241
|
-
expected: "string &
|
|
1173
|
+
expected: "string & SnakePattern",
|
|
1242
1174
|
value: input.name
|
|
1243
1175
|
})) || _report(_exceptionable, {
|
|
1244
1176
|
path: _path + ".name",
|
|
1245
|
-
expected: "(string &
|
|
1177
|
+
expected: "(string & SnakePattern)",
|
|
1246
1178
|
value: input.name
|
|
1247
1179
|
}), "uuid" === input.type || _report(_exceptionable, {
|
|
1248
1180
|
path: _path + ".type",
|
|
@@ -1268,13 +1200,13 @@ const collection = {
|
|
|
1268
1200
|
path: _path + ".nullable",
|
|
1269
1201
|
expected: "boolean",
|
|
1270
1202
|
value: input.nullable
|
|
1271
|
-
})].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-
|
|
1203
|
+
})].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
1272
1204
|
path: _path + ".name",
|
|
1273
|
-
expected: "string &
|
|
1205
|
+
expected: "string & CamelPattern",
|
|
1274
1206
|
value: input.name
|
|
1275
1207
|
})) || _report(_exceptionable, {
|
|
1276
1208
|
path: _path + ".name",
|
|
1277
|
-
expected: "(string &
|
|
1209
|
+
expected: "(string & CamelPattern)",
|
|
1278
1210
|
value: input.name
|
|
1279
1211
|
}), "string" === typeof input.targetModel || _report(_exceptionable, {
|
|
1280
1212
|
path: _path + ".targetModel",
|
|
@@ -1282,11 +1214,11 @@ const collection = {
|
|
|
1282
1214
|
value: input.targetModel
|
|
1283
1215
|
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
|
|
1284
1216
|
path: _path + ".name",
|
|
1285
|
-
expected: "string &
|
|
1217
|
+
expected: "string & SnakePattern",
|
|
1286
1218
|
value: input.name
|
|
1287
1219
|
})) || _report(_exceptionable, {
|
|
1288
1220
|
path: _path + ".name",
|
|
1289
|
-
expected: "(string &
|
|
1221
|
+
expected: "(string & SnakePattern)",
|
|
1290
1222
|
value: input.name
|
|
1291
1223
|
}), "string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type || _report(_exceptionable, {
|
|
1292
1224
|
path: _path + ".type",
|
|
@@ -1354,11 +1286,11 @@ const collection = {
|
|
|
1354
1286
|
_report = __typia_transform__validateReport._validateReport(errors);
|
|
1355
1287
|
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
1356
1288
|
path: _path + "",
|
|
1357
|
-
expected: "
|
|
1289
|
+
expected: "IAutoBePrismaReviewApplication.IProps",
|
|
1358
1290
|
value: input
|
|
1359
1291
|
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
1360
1292
|
path: _path + "",
|
|
1361
|
-
expected: "
|
|
1293
|
+
expected: "IAutoBePrismaReviewApplication.IProps",
|
|
1362
1294
|
value: input
|
|
1363
1295
|
}))(input, "$input", true);
|
|
1364
1296
|
const success = 0 === errors.length;
|
|
@@ -1384,4 +1316,4 @@ const collection = {
|
|
|
1384
1316
|
deepseek: claude,
|
|
1385
1317
|
"3.1": claude,
|
|
1386
1318
|
};
|
|
1387
|
-
//# sourceMappingURL=
|
|
1319
|
+
//# sourceMappingURL=orchestratePrismaReview.js.map
|