@autobe/agent 0.17.1 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AutoBeMockAgent.d.ts +5 -5
- package/lib/agent/src/AutoBeAgent.d.ts +52 -0
- package/lib/{AutoBeAgent.js → agent/src/AutoBeAgent.js} +29 -1
- package/lib/agent/src/AutoBeAgent.js.map +1 -0
- package/lib/agent/src/AutoBeAgentBase.d.ts +18 -0
- package/lib/agent/src/AutoBeAgentBase.js.map +1 -0
- package/lib/agent/src/AutoBeMockAgent.d.ts +15 -0
- package/lib/{AutoBeMockAgent.js → agent/src/AutoBeMockAgent.js} +34 -4
- package/lib/agent/src/AutoBeMockAgent.js.map +1 -0
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +34 -0
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +1 -0
- package/lib/agent/src/context/AutoBeContext.d.ts +41 -0
- package/lib/agent/src/context/AutoBeContext.js.map +1 -0
- package/lib/agent/src/context/AutoBeState.d.ts +8 -0
- package/lib/agent/src/context/AutoBeState.js.map +1 -0
- package/lib/agent/src/context/AutoBeTokenUsage.d.ts +173 -0
- package/lib/{context → agent/src/context}/AutoBeTokenUsage.js +7 -0
- package/lib/agent/src/context/AutoBeTokenUsage.js.map +1 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.d.ts +116 -0
- package/lib/{context → agent/src/context}/AutoBeTokenUsageComponent.js +19 -2
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js.map +1 -0
- package/lib/agent/src/context/IAutoBeApplication.d.ts +107 -0
- package/lib/agent/src/context/IAutoBeApplication.js.map +1 -0
- package/lib/agent/src/context/IAutoBeApplicationProps.d.ts +4 -0
- package/lib/agent/src/context/IAutoBeApplicationProps.js.map +1 -0
- package/lib/agent/src/context/IAutoBeApplicationResult.d.ts +4 -0
- package/lib/agent/src/context/IAutoBeApplicationResult.js.map +1 -0
- package/lib/agent/src/context/assertSchemaModel.d.ts +2 -0
- package/lib/agent/src/context/assertSchemaModel.js.map +1 -0
- package/lib/agent/src/factory/createAgenticaHistory.d.ts +7 -0
- package/lib/agent/src/factory/createAgenticaHistory.js.map +1 -0
- package/lib/agent/src/factory/createAutoBeApplication.d.ts +7 -0
- package/lib/agent/src/factory/createAutoBeApplication.js.map +1 -0
- package/lib/agent/src/factory/createAutoBeContext.d.ts +19 -0
- package/lib/{factory → agent/src/factory}/createAutoBeContext.js +90 -17
- package/lib/agent/src/factory/createAutoBeContext.js.map +1 -0
- package/lib/agent/src/factory/createAutoBeState.d.ts +3 -0
- package/lib/agent/src/factory/createAutoBeState.js.map +1 -0
- package/lib/agent/src/factory/getAutoBeGenerated.d.ts +4 -0
- package/lib/{factory → agent/src/factory}/getAutoBeGenerated.js +3 -3
- package/lib/agent/src/factory/getAutoBeGenerated.js.map +1 -0
- package/lib/agent/src/factory/getAutoBeRealizeGenerated.d.ts +7 -0
- package/lib/agent/src/factory/getAutoBeRealizeGenerated.js.map +1 -0
- package/lib/agent/src/factory/index.d.ts +1 -0
- package/lib/agent/src/factory/index.js.map +1 -0
- package/lib/agent/src/index.d.ts +6 -0
- package/lib/agent/src/index.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js +46 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +30 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +49 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.d.ts +5 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js +64 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +6 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +265 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.d.ts +4 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +727 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +8 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +242 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +105 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +78 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.js +3 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +70 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.js +3 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.d.ts +2 -0
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.js.map +1 -0
- package/lib/agent/src/orchestrate/index.d.ts +5 -0
- package/lib/agent/src/orchestrate/index.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +34 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +62 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +5 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +49 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +28 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +51 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.d.ts +5 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +35 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +28 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +53 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterface.js +7 -2
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +4 -0
- package/lib/{orchestrate/interface/orchestrateInterfaceOperations.js → agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js} +227 -562
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceComplement.js +20 -32
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceEndpoints.js +40 -41
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceGroups.js +15 -25
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +1768 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +5 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +1317 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceSchemas.js +59 -71
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +7 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +467 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.d.ts +47 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.js +3 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +55 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.d.ts +24 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +108 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +126 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +96 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +75 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +91 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/utils/OpenApiEndpointComparator.d.ts +6 -0
- package/lib/agent/src/orchestrate/interface/utils/OpenApiEndpointComparator.js.map +1 -0
- package/lib/agent/src/orchestrate/internal/IProgress.d.ts +4 -0
- package/lib/agent/src/orchestrate/internal/IProgress.js +3 -0
- package/lib/agent/src/orchestrate/internal/IProgress.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.d.ts +3 -0
- package/lib/{orchestrate → agent/src/orchestrate}/prisma/histories/transformPrismaCorrectHistories.js +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.d.ts +8 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +59 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +48 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/prisma/orchestratePrisma.js +30 -13
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/prisma/orchestratePrismaComponent.js +43 -44
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/prisma/orchestratePrismaCorrect.js +121 -83
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.d.ts +5 -0
- package/lib/{orchestrate/prisma/orchestratePrismaSchemas.js → agent/src/orchestrate/prisma/orchestratePrismaReview.js} +139 -248
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.d.ts +5 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js +1625 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.d.ts +121 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.d.ts +142 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.d.ts +105 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.d.ts +99 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/ProviderCodeComparator.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/ProviderCodeComparator.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +40 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +80 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.d.ts +7 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +13 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +32 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +11 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +160 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/internal/compile.d.ts +7 -0
- package/lib/agent/src/orchestrate/realize/internal/compile.js +61 -0
- package/lib/agent/src/orchestrate/realize/internal/compile.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +113 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.d.ts +10 -0
- package/lib/{orchestrate → agent/src/orchestrate}/realize/orchestrateRealizeAuthorization.js +84 -70
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/realize/orchestrateRealizeAuthorizationCorrect.js +66 -52
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +9 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +351 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -0
- package/lib/{orchestrate/realize/orchestrateRealizePlanner.d.ts → agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts} +5 -3
- package/lib/{orchestrate/realize/orchestrateRealizePlanner.js → agent/src/orchestrate/realize/orchestrateRealizeScenario.js} +14 -24
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +9 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +340 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +92 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +27 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +345 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +56 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +2 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.d.ts +79 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +38 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +276 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/AuthorizationFileSystem.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/utils/AuthorizationFileSystem.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.d.ts +4 -0
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/InternalFileSystem.d.ts +8 -0
- package/lib/agent/src/orchestrate/realize/utils/InternalFileSystem.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/ProviderFileSystem.d.ts +3 -0
- package/lib/agent/src/orchestrate/realize/utils/ProviderFileSystem.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/replaceImportStatements.js +1 -0
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.d.ts +2 -0
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/filterTestFileName.d.ts +1 -0
- package/lib/agent/src/orchestrate/test/compile/filterTestFileName.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.d.ts +3 -0
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +5 -0
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -0
- package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestCorrectHistories.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -0
- package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestHistories.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +56 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -0
- package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestWriteHistories.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +179 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/test/orchestrateTest.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/test/orchestrateTest.js +4 -4
- package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/test/orchestrateTestCorrect.js +27 -43
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.d.ts +4 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +858 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/test/orchestrateTestWrite.js +53 -54
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +121 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunction.d.ts +8 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunction.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +134 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.d.ts +7 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +113 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteResult.d.ts +7 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +1 -0
- package/lib/agent/src/structures/IAutoBeConfig.d.ts +73 -0
- package/lib/agent/src/structures/IAutoBeConfig.js.map +1 -0
- package/lib/agent/src/structures/IAutoBeProps.d.ts +109 -0
- package/lib/agent/src/structures/IAutoBeProps.js.map +1 -0
- package/lib/agent/src/structures/IAutoBeVendor.d.ts +87 -0
- package/lib/agent/src/structures/IAutoBeVendor.js.map +1 -0
- package/lib/agent/src/utils/arrayToRecord.d.ts +17 -0
- package/lib/agent/src/utils/arrayToRecord.js.map +1 -0
- package/lib/agent/src/utils/backoffRetry.d.ts +22 -0
- package/lib/agent/src/utils/backoffRetry.js.map +1 -0
- package/lib/agent/src/utils/divideArray.d.ts +4 -0
- package/lib/agent/src/utils/divideArray.js.map +1 -0
- package/lib/agent/src/utils/emplaceMap.d.ts +1 -0
- package/lib/agent/src/utils/emplaceMap.js.map +1 -0
- package/lib/{orchestrate/realize/RealizePipe.d.ts → agent/src/utils/pipe.d.ts} +1 -1
- package/lib/agent/src/utils/pipe.js.map +1 -0
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +18 -16
- package/lib/context/AutoBeContext.d.ts +16 -5
- package/lib/index.mjs +8876 -4277
- package/lib/index.mjs.map +1 -1
- package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.d.ts +153 -0
- package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.js +3 -0
- package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.js.map +1 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +4 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +4 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +4 -0
- package/lib/orchestrate/analyze/orchestrateAnalyze.d.ts +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +6 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.d.ts +4 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -12
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +105 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +78 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +70 -0
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +4 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +2 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.d.ts +5 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.d.ts +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +5 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +7 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.d.ts +47 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.d.ts +2 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +6 -2
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +96 -0
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +91 -0
- package/lib/orchestrate/internal/IProgress.d.ts +4 -0
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.d.ts +8 -0
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaReview.d.ts +5 -0
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.d.ts +1 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.d.ts +2 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.d.ts +105 -0
- package/lib/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.d.ts +43 -153
- package/lib/orchestrate/realize/histories/transformRealizeAuthorization.d.ts +5 -0
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.d.ts +5 -0
- package/lib/orchestrate/realize/histories/transformRealizeCoderHistories.d.ts +7 -0
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +13 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +11 -0
- package/lib/orchestrate/realize/internal/compile.d.ts +7 -0
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +9 -0
- package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +91 -0
- package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +9 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +10 -3
- package/lib/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.d.ts +79 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +38 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +276 -0
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +4 -0
- package/lib/orchestrate/test/histories/transformTestHistories.d.ts +3 -0
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.d.ts +3 -0
- package/lib/orchestrate/test/histories/transformTestWriteHistories.d.ts +8 -0
- package/lib/orchestrate/test/orchestrateTestScenario.d.ts +2 -2
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +25 -24
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -1
- package/package.json +9 -9
- package/src/AutoBeAgent.ts +37 -3
- package/src/AutoBeMockAgent.ts +41 -11
- package/src/constants/AutoBeSystemPromptConstant.ts +18 -16
- package/src/context/AutoBeContext.ts +30 -4
- package/src/context/AutoBeTokenUsage.ts +8 -0
- package/src/context/AutoBeTokenUsageComponent.ts +20 -2
- package/src/factory/createAutoBeApplication.ts +3 -11
- package/src/factory/createAutoBeContext.ts +64 -1
- package/src/factory/getAutoBeGenerated.ts +3 -3
- package/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.ts +53 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +34 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +56 -0
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +61 -80
- package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +89 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +123 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +51 -52
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +108 -0
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +85 -0
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.ts +71 -0
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +40 -0
- package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +27 -0
- package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +45 -22
- package/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.ts +43 -0
- package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +63 -0
- package/src/orchestrate/interface/orchestrateInterface.ts +10 -2
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +106 -0
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +27 -44
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +28 -34
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +15 -32
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +207 -103
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +84 -0
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +72 -82
- package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +143 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.ts +49 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.ts +2 -1
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +6 -2
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +102 -0
- package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +98 -0
- package/src/orchestrate/internal/IProgress.ts +4 -0
- package/src/orchestrate/prisma/histories/transformPrismaReviewHistories.ts +66 -0
- package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +2 -2
- package/src/orchestrate/prisma/orchestratePrisma.ts +44 -15
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +16 -33
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +96 -58
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +118 -0
- package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +133 -139
- package/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.ts +2 -1
- package/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.ts +108 -0
- package/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.ts +43 -156
- package/src/orchestrate/realize/{transformRealizeAuthorization.ts → histories/transformRealizeAuthorization.ts} +14 -10
- package/src/orchestrate/realize/{transformRealizeAuthorizationCorrectHistories.ts → histories/transformRealizeAuthorizationCorrectHistories.ts} +9 -7
- package/src/orchestrate/realize/{transformRealizeCoderHistories.ts → histories/transformRealizeCoderHistories.ts} +6 -6
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +47 -0
- package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +184 -0
- package/src/orchestrate/realize/internal/compile.ts +84 -0
- package/src/orchestrate/realize/orchestrateRealize.ts +100 -9
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +45 -57
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +19 -41
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +118 -0
- package/src/orchestrate/realize/{orchestrateRealizePlanner.ts → orchestrateRealizeScenario.ts} +15 -15
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +120 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +11 -3
- package/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.ts +81 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.ts +43 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +282 -0
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +3 -1
- package/src/orchestrate/test/experimental/orchestrateTestCorrect.ast +5 -9
- package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +23 -22
- package/src/orchestrate/test/{transformTestCorrectHistories.ts → histories/transformTestCorrectHistories.ts} +2 -2
- package/src/orchestrate/test/{transformTestHistories.ts → histories/transformTestHistories.ts} +1 -1
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +70 -0
- package/src/orchestrate/test/{transformTestWriteHistories.ts → histories/transformTestWriteHistories.ts} +3 -3
- package/src/orchestrate/test/orchestrateTest.ts +5 -6
- package/src/orchestrate/test/orchestrateTestCorrect.ts +32 -62
- package/src/orchestrate/test/orchestrateTestScenario.ts +95 -158
- package/src/orchestrate/test/orchestrateTestWrite.ts +48 -71
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +25 -24
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +3 -1
- package/lib/AutoBeAgent.js.map +0 -1
- package/lib/AutoBeAgentBase.js.map +0 -1
- package/lib/AutoBeMockAgent.js.map +0 -1
- package/lib/constants/AutoBeSystemPromptConstant.js.map +0 -1
- package/lib/context/AutoBeContext.js.map +0 -1
- package/lib/context/AutoBeState.js.map +0 -1
- package/lib/context/AutoBeTokenUsage.js.map +0 -1
- package/lib/context/AutoBeTokenUsageComponent.js.map +0 -1
- package/lib/context/IAutoBeApplication.js.map +0 -1
- package/lib/context/IAutoBeApplicationProps.js.map +0 -1
- package/lib/context/IAutoBeApplicationResult.js.map +0 -1
- package/lib/context/assertSchemaModel.js.map +0 -1
- package/lib/factory/createAgenticaHistory.js.map +0 -1
- package/lib/factory/createAutoBeApplication.js.map +0 -1
- package/lib/factory/createAutoBeContext.js.map +0 -1
- package/lib/factory/createAutoBeState.js.map +0 -1
- package/lib/factory/getAutoBeGenerated.js.map +0 -1
- package/lib/factory/getAutoBeRealizeGenerated.js.map +0 -1
- package/lib/factory/index.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.d.ts +0 -45
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js +0 -27
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js.map +0 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzePointer.d.ts +0 -9
- package/lib/orchestrate/analyze/AutoBeAnalyzePointer.js +0 -3
- package/lib/orchestrate/analyze/AutoBeAnalyzePointer.js.map +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyze.js +0 -98
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.d.ts +0 -5
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js +0 -561
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js.map +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.d.ts +0 -12
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js +0 -395
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js.map +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +0 -347
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +0 -1
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.d.ts +0 -68
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.js +0 -3
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.js.map +0 -1
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.d.ts +0 -5
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js +0 -27
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js.map +0 -1
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.d.ts +0 -12
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js +0 -78
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js.map +0 -1
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.d.ts +0 -16
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js +0 -79
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js.map +0 -1
- package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +0 -1
- package/lib/orchestrate/index.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +0 -62
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +0 -28
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +0 -28
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +0 -28
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +0 -28
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterface.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js.map +0 -1
- package/lib/orchestrate/interface/utils/OpenApiEndpointComparator.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaHistories.d.ts +0 -3
- package/lib/orchestrate/prisma/histories/transformPrismaHistories.js +0 -55
- package/lib/orchestrate/prisma/histories/transformPrismaHistories.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +0 -48
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrisma.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +0 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.js.map +0 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.js.map +0 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.js.map +0 -1
- package/lib/orchestrate/realize/ProviderCodeComparator.js.map +0 -1
- package/lib/orchestrate/realize/RealizePipe.js +0 -14
- package/lib/orchestrate/realize/RealizePipe.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealize.js +0 -63
- package/lib/orchestrate/realize/orchestrateRealize.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizeCoder.d.ts +0 -26
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js +0 -420
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizePlanner.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js.map +0 -1
- package/lib/orchestrate/realize/transformRealizeAuthorization.d.ts +0 -4
- package/lib/orchestrate/realize/transformRealizeAuthorization.js +0 -39
- package/lib/orchestrate/realize/transformRealizeAuthorization.js.map +0 -1
- package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.d.ts +0 -5
- package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.js +0 -80
- package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.js.map +0 -1
- package/lib/orchestrate/realize/transformRealizeCoderHistories.d.ts +0 -7
- package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +0 -1
- package/lib/orchestrate/realize/utils/AuthorizationFileSystem.js.map +0 -1
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.js.map +0 -1
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js.map +0 -1
- package/lib/orchestrate/realize/utils/InternalFileSystem.js.map +0 -1
- package/lib/orchestrate/realize/utils/ProviderFileSystem.js.map +0 -1
- package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +0 -1
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.d.ts +0 -11
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js +0 -221
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js.map +0 -1
- package/lib/orchestrate/test/compile/completeTestCode.js.map +0 -1
- package/lib/orchestrate/test/compile/filterTestFileName.js.map +0 -1
- package/lib/orchestrate/test/compile/getTestExternalDeclarations.js.map +0 -1
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +0 -1
- package/lib/orchestrate/test/orchestrateTest.js.map +0 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +0 -1
- package/lib/orchestrate/test/orchestrateTestScenario.js +0 -866
- package/lib/orchestrate/test/orchestrateTestScenario.js.map +0 -1
- package/lib/orchestrate/test/orchestrateTestWrite.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestFunction.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +0 -1
- package/lib/orchestrate/test/transformTestCorrectHistories.js.map +0 -1
- package/lib/orchestrate/test/transformTestHistories.js.map +0 -1
- package/lib/orchestrate/test/transformTestScenarioHistories.d.ts +0 -3
- package/lib/orchestrate/test/transformTestScenarioHistories.js +0 -100
- package/lib/orchestrate/test/transformTestScenarioHistories.js.map +0 -1
- package/lib/orchestrate/test/transformTestWriteHistories.js +0 -178
- package/lib/orchestrate/test/transformTestWriteHistories.js.map +0 -1
- package/lib/structures/IAutoBeConfig.js.map +0 -1
- package/lib/structures/IAutoBeProps.js.map +0 -1
- package/lib/structures/IAutoBeVendor.js.map +0 -1
- package/lib/utils/arrayToRecord.js.map +0 -1
- package/lib/utils/backoffRetry.js.map +0 -1
- package/lib/utils/divideArray.js.map +0 -1
- package/lib/utils/emplaceMap.js.map +0 -1
- package/lib/utils/enforceToolCall.d.ts +0 -3
- package/lib/utils/enforceToolCall.js +0 -13
- package/lib/utils/enforceToolCall.js.map +0 -1
- package/lib/utils/forceRetry.d.ts +0 -1
- package/lib/utils/forceRetry.js +0 -26
- package/lib/utils/forceRetry.js.map +0 -1
- package/lib/utils/pipe.js.map +0 -1
- package/src/orchestrate/analyze/AutoBeAnalyzeFileSystem.ts +0 -58
- package/src/orchestrate/analyze/AutoBeAnalyzePointer.ts +0 -10
- package/src/orchestrate/analyze/orchestrateAnalyzeComposer.ts +0 -112
- package/src/orchestrate/analyze/orchestrateAnalyzeReviewer.ts +0 -131
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.ts +0 -75
- package/src/orchestrate/analyze/transformAnalyzeReviewerHistories.ts +0 -31
- package/src/orchestrate/analyze/transformAnalyzeWriteHistories.ts +0 -94
- package/src/orchestrate/analyze/writeDocumentUntilReviewPassed.ts +0 -96
- package/src/orchestrate/prisma/histories/transformPrismaHistories.ts +0 -59
- package/src/orchestrate/realize/RealizePipe.ts +0 -39
- package/src/orchestrate/realize/orchestrateRealizeCoder.ts +0 -182
- package/src/orchestrate/realize/writeCodeUntilCompilePassed.ts +0 -308
- package/src/orchestrate/test/transformTestScenarioHistories.ts +0 -105
- package/src/utils/enforceToolCall.ts +0 -13
- package/src/utils/forceRetry.ts +0 -13
- /package/lib/{AutoBeAgentBase.js → agent/src/AutoBeAgentBase.js} +0 -0
- /package/lib/{constants → agent/src/constants}/AutoBeSystemPromptConstant.js +0 -0
- /package/lib/{context → agent/src/context}/AutoBeContext.js +0 -0
- /package/lib/{context → agent/src/context}/AutoBeState.js +0 -0
- /package/lib/{context → agent/src/context}/IAutoBeApplication.js +0 -0
- /package/lib/{context → agent/src/context}/IAutoBeApplicationProps.js +0 -0
- /package/lib/{context → agent/src/context}/IAutoBeApplicationResult.js +0 -0
- /package/lib/{context → agent/src/context}/assertSchemaModel.js +0 -0
- /package/lib/{factory → agent/src/factory}/createAgenticaHistory.js +0 -0
- /package/lib/{factory → agent/src/factory}/createAutoBeApplication.js +0 -0
- /package/lib/{factory → agent/src/factory}/createAutoBeState.js +0 -0
- /package/lib/{factory → agent/src/factory}/getAutoBeRealizeGenerated.js +0 -0
- /package/lib/{factory → agent/src/factory}/index.js +0 -0
- /package/lib/{index.js → agent/src/index.js} +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/facade/transformFacadeStateMessage.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/index.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/histories/transformInterfaceAssetHistories.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/histories/transformInterfacePrerequisiteHistories.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceComplementApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceEndpointApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceGroupApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceOperationApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceSchemaApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/utils/OpenApiEndpointComparator.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/prisma/histories/transformPrismaComponentsHistories.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/prisma/structures/IAutoBePrismaComponentApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/prisma/structures/IAutoBePrismaCorrectApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/prisma/structures/IAutoBePrismaSchemaApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/ProviderCodeComparator.js +0 -0
- /package/lib/{orchestrate/realize → agent/src/orchestrate/realize/histories}/transformRealizeCoderHistories.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeAuthorizationApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeCoderApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeCompile.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeFailedSymbol.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/AuthorizationFileSystem.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/AutoBeRealizeAuthorizationFileSystem.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/InternalFileSystem.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/ProviderFileSystem.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/completeTestCode.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/filterTestFileName.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/getTestExternalDeclarations.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/getTestScenarioArtifacts.js +0 -0
- /package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestCorrectHistories.js +0 -0
- /package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestHistories.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestCorrectApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestFunction.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestScenarioApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestScenarioArtifacts.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestWriteApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestWriteResult.js +0 -0
- /package/lib/{structures → agent/src/structures}/IAutoBeConfig.js +0 -0
- /package/lib/{structures → agent/src/structures}/IAutoBeProps.js +0 -0
- /package/lib/{structures → agent/src/structures}/IAutoBeVendor.js +0 -0
- /package/lib/{utils → agent/src/utils}/arrayToRecord.js +0 -0
- /package/lib/{utils → agent/src/utils}/backoffRetry.js +0 -0
- /package/lib/{utils → agent/src/utils}/divideArray.js +0 -0
- /package/lib/{utils → agent/src/utils}/emplaceMap.js +0 -0
- /package/lib/{utils → agent/src/utils}/pipe.js +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transformInterfaceSchemaHistories = void 0;
|
|
4
|
+
const uuid_1 = require("uuid");
|
|
5
|
+
const transformInterfaceAssetHistories_1 = require("./transformInterfaceAssetHistories");
|
|
6
|
+
const transformInterfaceSchemaHistories = (state, operations) => [
|
|
7
|
+
{
|
|
8
|
+
type: "systemMessage",
|
|
9
|
+
id: (0, uuid_1.v4)(),
|
|
10
|
+
created_at: new Date().toISOString(),
|
|
11
|
+
text: "# AutoAPI Schema Agent System Prompt\n\nYou are AutoAPI Schema Agent, an expert in creating comprehensive schema definitions for OpenAPI specifications in the `AutoBeOpenApi.IJsonSchemaDescriptive` format. Your specialized role focuses on the third phase of a multi-agent orchestration process for large-scale API design.\n\nYour mission is to analyze the provided API operations, paths, methods, Prisma schema files, and ERD diagrams to construct a complete and consistent set of schema definitions that accurately represent all entities and their relationships in the system.\n\n## 1. Context and Your Role in the Multi-Agent Process\n\nYou are the third agent in a three-phase process:\n1. **Phase 1** (completed): Analysis of requirements, Prisma schema, and ERD to define API paths and methods\n2. **Phase 2** (completed): Creation of detailed API operations based on the defined paths and methods\n3. **Phase 3** (your role): Construction of comprehensive schema definitions for all entities\n\nYou will receive:\n- The complete list of API operations from Phase 2\n- The original Prisma schema with detailed comments\n- ERD diagrams in Mermaid format\n- Requirement analysis documents\n\n## 2. Primary Responsibilities\n\nYour specific tasks are:\n\n1. **Extract All Entity Types**: Analyze all API operations and identify every distinct entity type referenced\n2. **Define Complete Schema Definitions**: Create detailed schema definitions for every entity and its variants\n3. **Maintain Type Naming Conventions**: Follow the established type naming patterns\n4. **Ensure Schema Completeness**: Verify that ALL entities in the Prisma schema have corresponding schema definitions\n5. **Create Type Variants**: Define all necessary type variants for each entity (.ICreate, .IUpdate, .ISummary, etc.)\n6. **Document Thoroughly**: Provide comprehensive descriptions for all schema definitions\n7. **Validate Consistency**: Ensure schema definitions align with API operations\n8. **Use Named References Only**: NEVER use inline/anonymous object definitions - ALL object types must be defined as named types in the schemas record and referenced using $ref\n\n### 2.1. Pre-Execution Security Checklist\n\nBefore generating any schemas, you MUST complete this checklist:\n\n- [ ] **Identify ALL authentication fields** in Prisma schema (user_id, author_id, creator_id, owner_id, member_id)\n- [ ] **List ALL sensitive fields** that must be excluded from responses (password, hashed_password, salt, tokens, secrets)\n- [ ] **Mark ALL system-generated fields** (id, created_at, updated_at, deleted_at, version, *_count fields)\n- [ ] **Document ownership relationships** to prevent unauthorized modifications\n- [ ] **Plan security filtering** for each entity type BEFORE creating schemas\n\nThis checklist ensures security is built-in from the start, not added as an afterthought.\n\n## 3. Schema Design Principles\n\n### 3.1. Type Naming Conventions\n\n- **Main Entity Types**: Use `IEntityName` format\n- **Operation-Specific Types**:\n - `IEntityName.ICreate`: Request body for creation operations (POST)\n - `IEntityName.IUpdate`: Request body for update operations (PUT or PATCH)\n - `IEntityName.ISummary`: Simplified response version with essential properties\n - `IEntityName.IRequest`: Request parameters for list operations (search/filter/pagination)\n - `IEntityName.IAbridge`: Intermediate view with more detail than Summary but less than full entity\n - `IEntityName.IInvert`: Alternative representation of an entity from a different perspective\n- **Container Types**: \n - `IPageIEntityName`: Paginated results container (use the standard IPage structure)\n\n### 3.2. Schema Definition Requirements\n\n- **Completeness**: Include ALL properties from the Prisma schema for each entity\n- **Type Accuracy**: Map Prisma types to appropriate OpenAPI types and formats\n- **Required Fields**: Accurately mark required fields based on Prisma schema constraints\n- **Relationships**: Properly handle entity relationships (references to other entities)\n- **Enumerations**: Define all enum types referenced in entity schemas\n- **Detailed Documentation**: \n - Schema descriptions must reference related Prisma schema table comments\n - Property descriptions must reference related Prisma schema column comments\n - All descriptions must be organized in multiple paragraphs for better readability\n - **IMPORTANT**: All descriptions MUST be written in English. Never use other languages.\n- **Named References Only**: \n - Every object type MUST be defined as a named type in the schemas record\n - NEVER use inline/anonymous object definitions anywhere in the schema\n - All property types that are objects must use $ref to reference a named type\n - This applies to EVERY object in the schema, including nested objects and arrays of objects\n\n### 3.3. \uD83D\uDD34 CRITICAL Security Requirements\n\n#### Response Types - NEVER expose sensitive fields:\n- **Password fields**: NEVER include fields like `password`, `hashed_password`, `encrypted_password`, `salt`, `password_history`, etc. in ANY response type\n- **Security tokens**: NEVER expose `refresh_token`, `api_key`, `secret_key`, `session_token`, `csrf_token`, or similar security credentials\n- **Internal system fields**: Avoid exposing internal implementation details like `password_reset_token`, `email_verification_code`, `two_factor_secret`, `oauth_state`\n- **Sensitive personal data**: Be cautious with fields containing sensitive information based on your domain\n- **Audit fields**: Consider excluding `internal_notes`, `admin_comments`, `system_logs` unless specifically required\n\n**Example of FORBIDDEN response properties**:\n```typescript\n// \u274C NEVER include these in response types\ninterface IUser {\n id: string;\n email: string;\n hashed_password: string; // FORBIDDEN\n salt: string; // FORBIDDEN\n refresh_token: string; // FORBIDDEN\n api_secret: string; // FORBIDDEN\n}\n\n// \u2705 Correct response type\ninterface IUser {\n id: string;\n email: string;\n name: string;\n created_at: string;\n // Password and security fields are intentionally omitted\n}\n```\n\n#### Request Types - NEVER accept actor IDs directly:\n- **Actor identification**: NEVER accept fields like `user_id`, `member_id`, `creator_id`, `author_id`, `owner_id`, `modified_by`, `deleted_by` in request bodies\n- **System-generated fields**: NEVER accept `id` (when auto-generated), `created_at`, `updated_at`, `deleted_at`, `version`, `revision`\n- **Computed fields**: NEVER accept aggregate fields like `*_count`, `*_sum`, `*_avg`, or any calculated/derived values\n- **Authentication source**: The authenticated user's identity comes from the authentication decorator, NOT from request body\n- **Security principle**: Clients should NEVER be able to specify \"who they are\" - this must come from verified authentication\n\n**Example of FORBIDDEN request properties**:\n```typescript\n// \u274C NEVER accept actor IDs in request types\ninterface IPostCreate {\n title: string;\n content: string;\n author_id: string; // FORBIDDEN - comes from authentication\n created_by: string; // FORBIDDEN - comes from authentication\n}\n\n// \u2705 Correct request type\ninterface IPostCreate {\n title: string;\n content: string;\n category_id: string; // OK - selecting a category\n // author_id will be set by the server using authenticated user info\n}\n```\n\n**Why this matters**:\n1. **Security**: Prevents users from impersonating others or claiming false ownership\n2. **Data integrity**: Ensures the true actor is recorded for audit trails\n3. **Authorization**: Enables proper ownership verification in provider functions\n\n**Remember**: The authenticated user information is provided by the decorator at the controller level and passed to the provider function - it should NEVER come from client input.\n\n### 3.4. Standard Type Definitions\n\nFor paginated results, use the standard `IPage<T>` interface:\n\n```typescript\n/**\n * A page.\n *\n * Collection of records with pagination information.\n *\n * @author Samchon\n */\nexport interface IPage<T extends object> {\n /**\n * Page information.\n */\n pagination: IPage.IPagination;\n\n /**\n * List of records.\n */\n data: T[];\n}\nexport namespace IPage {\n /**\n * Page information.\n */\n export interface IPagination {\n /**\n * Current page number.\n */\n current: number & tags.Type<\"uint32\">;\n\n /**\n * Limitation of records per a page.\n *\n * @default 100\n */\n limit: number & tags.Type<\"uint32\">;\n\n /**\n * Total records in the database.\n */\n records: number & tags.Type<\"uint32\">;\n\n /**\n * Total pages.\n *\n * Equal to {@link records} / {@link limit} with ceiling.\n */\n pages: number & tags.Type<\"uint32\">;\n }\n\n /**\n * Page request data\n */\n export interface IRequest {\n /**\n * Page number.\n */\n page?: null | (number & tags.Type<\"uint32\">);\n\n /**\n * Limitation of records per a page.\n *\n * @default 100\n */\n limit?: null | (number & tags.Type<\"uint32\">);\n }\n}\n```\n\n## 4. Implementation Strategy\n\n### 4.1. Comprehensive Entity Identification\n\n1. **Extract All Entity References**:\n - Analyze all API operation paths for entity identifiers\n - Examine request and response bodies in API operations\n - Review the Prisma schema to identify ALL entities\n\n2. **Create Entity Tracking System**:\n - List ALL entities from the Prisma schema\n - Cross-reference with entities mentioned in API operations\n - Identify any entities that might be missing schema definitions\n\n### 4.2. Schema Definition Process\n\n1. **For Each Entity**:\n - Define the main entity schema (`IEntityName`)\n - Create all necessary variant types based on API operations\n - Ensure all properties are documented with descriptions from Prisma schema\n - Mark required fields based on Prisma schema constraints\n - **CRITICAL**: Apply security filtering - remove sensitive fields from response types\n\n2. **For Relationship Handling**:\n - Identify all relationships from the ERD and Prisma schema\n - Define appropriate property types for relationships (IDs, nested objects, arrays)\n - Document relationship constraints and cardinality\n - **IMPORTANT**: For \"belongs to\" relationships, never accept the owner ID in requests\n\n3. **For Variant Types**:\n - Create `.ICreate` types with appropriate required/optional fields for creation\n - **MUST include**: All required business fields from Prisma schema (excluding defaults)\n - **NEVER include**: creator_id, author_id, user_id, created_by fields\n - **NEVER include**: id (when auto-generated), created_at, updated_at\n - **NEVER include**: Any computed or aggregate fields\n - These fields will be populated from authenticated user context or system\n - Define `.IUpdate` types with all fields made optional for updates\n - **MUST make**: ALL fields optional (Partial<T> pattern)\n - **NEVER include**: updater_id, modified_by, last_updated_by fields\n - **NEVER include**: created_at, created_by (immutable after creation)\n - **NEVER allow**: changing ownership fields like author_id or creator_id\n - **Consider**: Using separate types for admin updates vs user updates if needed\n - Build `.ISummary` types with essential fields for list views\n - **MUST include**: id and primary display field (name, title, etc.)\n - **SHOULD include**: Key fields for list display (status, date, category)\n - **NEVER include**: Large text fields (content, description)\n - **NEVER include**: Any sensitive or internal fields\n - Include only safe, public-facing properties\n - Define `.IRequest` types with search/filter/sort parameters\n - **MUST include**: Standard pagination parameters (page, limit)\n - **SHOULD include**: Sort options (orderBy, direction)\n - **SHOULD include**: Common filters (search, status, dateRange)\n - May include filters like \"my_posts_only\" but not direct \"user_id\" parameters\n - **Consider**: Different request types for different access levels\n\n4. **Security Checklist for Each Type**:\n - \u2713 No password or hash fields in any response type\n - \u2713 No security tokens or keys in any response type\n - \u2713 No actor ID fields in any request type\n - \u2713 No internal system fields exposed in responses\n - \u2713 Ownership fields are read-only (never in request types)\n\n### 4.3. Schema Completeness Verification\n\n1. **Entity Coverage Check**:\n - Verify every entity in the Prisma schema has at least one schema definition\n - Check that all entities referenced in API operations have schema definitions\n\n2. **Property Coverage Check**:\n - Ensure all properties from the Prisma schema are included in entity schemas\n - Verify property types align with Prisma schema definitions\n\n3. **Variant Type Verification**:\n - Confirm necessary variant types exist based on API operations\n - Ensure variant types have appropriate property subsets and constraints\n\n## 5. Documentation Quality Requirements\n\n### 5.1. **Schema Type Descriptions**\n- Must reference related Prisma schema table description comments\n- Must be extremely detailed and comprehensive\n- Must be organized in multiple paragraphs\n- Should explain the entity's role in the business domain\n- Should describe relationships with other entities\n\n### 5.2. **Property Descriptions**\n- Must reference related Prisma schema column description comments\n- Must explain the purpose, constraints, and format of each property\n- Should note business rules that apply to the property\n- Should provide examples when helpful\n- Should use multiple paragraphs for complex properties\n\n## 6. Output Format\n\nYour output should be the complete `schemas` record of the OpenAPI document:\n\n```typescript\nconst schemas: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive> = {\n // Main entity types\n IEntityName: { \n type: \"object\", \n properties: {\n propertyName: {\n type: \"string\",\n description: \"Detailed property description referencing Prisma schema column comments.\\n\\nMultiple paragraphs where appropriate.\"\n }\n // ...more properties\n // SECURITY: Never include password, hashed_password, salt, or other sensitive fields in response types\n },\n required: [...],\n description: \"Extremely detailed explanation about IEntityName referencing Prisma schema table comments.\\n\\nMultiple paragraphs focusing on different aspects of the entity.\",\n },\n // Variant types\n \"IEntityName.ICreate\": { \n // SECURITY: Never include author_id, creator_id, user_id - these come from authentication context\n ... \n },\n \"IEntityName.IUpdate\": { \n // SECURITY: Never allow updating ownership fields like author_id or creator_id\n ... \n },\n \"IEntityName.ISummary\": { ... },\n \"IEntityName.IRequest\": { ... },\n \n // Repeat for ALL entities\n \n // Standard types\n \"IPage\": { ... },\n \"IPage.IPagination\": { ... },\n \"IPage.IRequest\": { ... },\n \n // Enumerations\n \"EEnumName\": { ... }\n}\n```\n\n## 7. Critical Success Factors\n\n### 7.1. Absolute Completeness Principles\n\n- **Process ALL Entities**: EVERY entity defined in the Prisma schema MUST have corresponding schema definitions.\n- **Complete Property Coverage**: ALL properties of each entity MUST be included in schema definitions.\n- **Variant Type Comprehensiveness**: ALL necessary variant types MUST be defined based on API operations.\n- **No Simplification**: Complex entities or relationships MUST be faithfully represented without simplification.\n- **Verification of Completeness**: Before final output, verify that ALL entities and properties have been defined.\n\n### 7.2. High-Volume Processing Strategy\n\n- **Batch Processing**: If there are many entities, process them in groups, but ALL groups MUST be completed.\n- **No Prioritization**: ALL entities and their properties have equal importance and must be processed.\n- **Systematic Approach**: Use a methodical approach to ensure no entity or property is overlooked.\n- **Detailed Tracking**: Maintain a tracking system to verify completeness of schema definitions.\n\n### 7.3. Critical Warnings\n\n- **Partial Implementation Prohibited**: \"Defining schemas for only some entities and omitting others\" is a CRITICAL ERROR.\n- **Property Omission Prohibited**: \"Including only some properties of an entity\" is a SERIOUS ERROR.\n- **No Simplification**: \"Simplifying complex entities or relationships\" is NOT ACCEPTABLE.\n- **Ignore Capacity Limitations**: Processing only some entities due to their quantity is a SERIOUS ERROR.\n- **Named Types Required**: Using inline/anonymous object definitions instead of named type references ($ref) is a CRITICAL ERROR. EVERY object type must be defined in the schemas record and referenced by name.\n- **Security Violations**: Including password fields in responses or actor IDs in requests is a CRITICAL SECURITY ERROR.\n- **Authentication Bypass**: Accepting user identity from request body instead of authentication context is a CRITICAL SECURITY ERROR.\n\n## 8. Execution Process\n\n1. **Initialization**:\n - Analyze all input data (API operations, Prisma schema, ERD)\n - Create a complete inventory of entities and their relationships\n - Complete the Pre-Execution Security Checklist (Section 2.1)\n\n2. **Security-First Schema Development**:\n - **Step 1**: Remove all authentication fields from request types\n - **Step 2**: Remove all sensitive fields from response types\n - **Step 3**: Block ownership changes in update types\n - **Step 4**: Then proceed with business logic implementation\n - Document all security decisions made\n\n3. **Schema Development**:\n - Systematically define schema definitions for each entity and its variants\n - Apply security filters BEFORE adding business fields\n - Document all definitions and properties thoroughly\n\n4. **Verification**:\n - Validate completeness against the Prisma schema\n - Verify consistency with API operations\n - Ensure all relationships are properly handled\n - Double-check security boundaries are enforced\n\n5. **Output Generation**:\n - Produce the complete `schemas` record in the required format\n - Verify the output meets all quality and completeness requirements\n - Confirm no security violations in final output\n\nRemember that your role is CRITICAL to the success of the entire API design process. The schemas you define will be the foundation for ALL data exchange in the API. Thoroughness, accuracy, and completeness are your highest priorities.\n\n## 9. Common Mistakes to Avoid\n\n### 9.1. Security Mistakes (MOST CRITICAL)\n- **Including password fields in User response types** - This is the #1 most common security error\n- **Accepting user_id in Create operations** - Authentication context should provide this\n- **Allowing ownership changes in Update operations** - Once created, ownership should be immutable\n- **Exposing internal system fields** - Fields like salt, internal_notes should never be exposed\n- **Missing authentication boundaries** - Every request type must be checked for actor ID fields\n\n### 9.2. Completeness Mistakes\n- **Forgetting join/junction tables** - Many-to-many relationships need schema definitions too\n- **Missing enum definitions** - Every enum in Prisma must have a corresponding schema\n- **Incomplete variant coverage** - Some entities missing .IRequest or .ISummary types\n- **Skipping complex entities** - All entities must be included, regardless of complexity\n\n### 9.3. Consistency Mistakes\n- **Inconsistent date formats** - All DateTime fields should use format: \"date-time\"\n- **Mixed naming patterns** - Stick to IEntityName convention throughout\n- **Inconsistent required fields** - Required in Prisma should be required in Create\n- **Type mismatches across variants** - Same field should have same type everywhere\n\n### 9.4. Business Logic Mistakes\n- **Wrong cardinality in relationships** - One-to-many vs many-to-many confusion\n- **Missing default values in descriptions** - Prisma defaults should be documented\n- **Incorrect optional/required mapping** - Prisma constraints must be respected\n\n## 10. Integration with Previous Phases\n\n- Ensure your schema definitions align perfectly with the API operations defined in Phase 2\n- Reference the same entities and property names used in the API paths from Phase 1\n- Maintain consistency in naming, typing, and structure throughout the entire API design\n\n## 11. Final Output Format\n\nYour final output should be the complete `schemas` record that can be directly integrated with the API operations from Phase 2 to form a complete `AutoBeOpenApi.IDocument` object.\n\nAlways aim to create schema definitions that are intuitive, well-documented, and accurately represent the business domain. Your schema definitions should meet ALL business requirements while being extensible and maintainable. Remember to define schemas for EVERY SINGLE independent entity table in the Prisma schema. NO ENTITY OR PROPERTY SHOULD BE OMITTED FOR ANY REASON." /* AutoBeSystemPromptConstant.INTERFACE_SCHEMA */,
|
|
12
|
+
},
|
|
13
|
+
...(0, transformInterfaceAssetHistories_1.transformInterfaceAssetHistories)(state),
|
|
14
|
+
{
|
|
15
|
+
type: "assistantMessage",
|
|
16
|
+
id: (0, uuid_1.v4)(),
|
|
17
|
+
created_at: new Date().toISOString(),
|
|
18
|
+
text: [
|
|
19
|
+
"Here is the list of API operations you have to implement its types:",
|
|
20
|
+
"",
|
|
21
|
+
"```json",
|
|
22
|
+
JSON.stringify(operations),
|
|
23
|
+
"```",
|
|
24
|
+
].join("\n"),
|
|
25
|
+
},
|
|
26
|
+
];
|
|
27
|
+
exports.transformInterfaceSchemaHistories = transformInterfaceSchemaHistories;
|
|
28
|
+
//# sourceMappingURL=transformInterfaceSchemaHistories.js.map
|
package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformInterfaceSchemaHistories.js","sourceRoot":"","sources":["../../../../../../src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts"],"names":[],"mappings":";;;AAEA,+BAA0B;AAI1B,yFAAsF;AAE/E,MAAM,iCAAiC,GAAG,CAC/C,KAAkB,EAClB,UAAsC,EAGtC,EAAE,CAAC;IACH;QACE,IAAI,EAAE,eAAe;QACrB,EAAE,EAAE,IAAA,SAAE,GAAE;QACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACpC,IAAI,wgqBAA6C;KAClD;IACD,GAAG,IAAA,mEAAgC,EAAC,KAAK,CAAC;IAC1C;QACE,IAAI,EAAE,kBAAkB;QACxB,EAAE,EAAE,IAAA,SAAE,GAAE;QACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACpC,IAAI,EAAE;YACJ,qEAAqE;YACrE,EAAE;YACF,SAAS;YACT,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;YAC1B,KAAK;SACN,CAAC,IAAI,CAAC,IAAI,CAAC;KACb;CACF,CAAC;AAzBW,QAAA,iCAAiC,qCAyB5C"}
|
package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
+
import { AutoBeOpenApi } from "@autobe/interface";
|
|
3
|
+
import { AutoBeState } from "../../../context/AutoBeState";
|
|
4
|
+
export declare const transformInterfaceSchemasReviewHistories: (state: AutoBeState, operations: AutoBeOpenApi.IOperation[], schemaDescriptive: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>) => Array<IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
|
package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transformInterfaceSchemasReviewHistories = void 0;
|
|
4
|
+
const uuid_1 = require("uuid");
|
|
5
|
+
const transformInterfaceAssetHistories_1 = require("./transformInterfaceAssetHistories");
|
|
6
|
+
const transformInterfaceSchemasReviewHistories = (state, operations, schemaDescriptive) => {
|
|
7
|
+
return [
|
|
8
|
+
{
|
|
9
|
+
type: "systemMessage",
|
|
10
|
+
id: (0, uuid_1.v4)(),
|
|
11
|
+
created_at: new Date().toISOString(),
|
|
12
|
+
text: "# AutoAPI Schema Review & Enhancement Agent \u2013 System Prompt\n\nYou are the **AutoAPI Schema Review & Enhancement Agent**, an expert who not only reviews but ACTIVELY FIXES and even RECREATES schemas when necessary. You are the final quality gate ensuring all schemas are production-ready, secure, and complete.\n\n## 1. Your Role: Active Fixer, Not Passive Reviewer\n\nYou are invoked immediately after the AutoAPI Schema Agent generates schemas. Your responsibilities include:\n\n1. **Fix Security Issues**: Remove all security vulnerabilities - don't just report them\n2. **Complete Missing Parts**: Create missing variants, add required fields\n3. **Recreate Broken Schemas**: If fundamentally wrong, rebuild from scratch\n4. **Enhance Quality**: Add formats, validations, proper documentation\n\nYou are empowered to make substantial changes. Your output becomes the final schemas, so make them perfect.\n\n## 2. Critical Review Requirements\n\n### 2.1. Mandatory Security Verification\nYou MUST identify and fix ALL security vulnerabilities. This is your highest priority:\n\n**Authentication Boundary Violations**:\n- Request types MUST NEVER accept: `user_id`, `author_id`, `creator_id`, `member_id`, `owner_id`\n- These fields come from authentication context, not client input\n- Any field representing \"who is making the request\" must be excluded from request schemas\n\n**Sensitive Data Exposure**:\n- Response types MUST NEVER include: `password`, `hashed_password`, `salt`, `refresh_token`, `api_key`, `secret_key`\n- Internal system fields must be excluded: `password_reset_token`, `email_verification_code`, `internal_notes`\n- Update operations cannot modify ownership fields\n\n**System-Generated Fields**:\n- Request types must exclude: `created_at`, `updated_at`, `deleted_at`\n- Auto-increment IDs should not be in create requests\n- Server-managed timestamps must never come from clients\n\n### 2.2. Completeness Requirements\nYou MUST ensure 100% coverage. Missing entities or variants is a critical failure:\n\n**Entity Coverage**:\n- Every table in Prisma schema MUST have corresponding schema definitions\n- No entity can be omitted regardless of complexity\n- Cross-reference with Prisma schema to verify all entities are included\n\n**Variant Type Requirements**:\n- Each entity MUST have ALL necessary variants:\n - `IEntityName`: Main entity type with all properties\n - `IEntityName.ICreate`: Creation request (exclude auto-generated and auth fields)\n - `IEntityName.IUpdate`: Update request (all fields optional, exclude ownership)\n - `IEntityName.ISummary`: Lightweight version for lists\n - `IEntityName.IRequest`: Search/filter parameters for queries\n- Missing any required variant is a HIGH severity issue\n\n### 2.3. Business Logic Validation\nSchemas must accurately reflect the domain model:\n\n**Prisma Constraint Mapping**:\n- Required fields in Prisma must be required in create operations\n- Unique constraints must be documented\n- Default values should be noted in descriptions\n- Relationships must use correct cardinality\n\n**Type Accuracy**:\n- Prisma type \u2192 OpenAPI format mapping must be correct\n- DateTime fields need `format: \"date-time\"`\n- UUID fields need `format: \"uuid\"`\n- Email fields need `format: \"email\"`\n- Numeric constraints (min/max) should be included\n\n## 3. Systematic Review Process\n\n### 3.1. Review Execution Strategy\nWhen reviewing schemas, follow this systematic approach:\n\n**First Pass - Security Scan**:\nIdentify all security violations immediately. Search for:\n- Authentication fields in request types\n- Password/token fields in response types\n- System fields exposed to clients\n\n**Second Pass - Completeness Check**:\nVerify comprehensive coverage:\n- Count entities in Prisma schema vs defined schemas\n- Check each entity has all required variants\n- Confirm no tables are missing\n\n**Third Pass - Business Logic Validation**:\nEnsure domain accuracy:\n- Match field requirements with Prisma constraints\n- Verify relationship mappings\n- Check type formats and validations\n\n**Fourth Pass - Quality Enhancement**:\nImprove overall quality:\n- Add missing format specifications\n- Enhance documentation\n- Ensure naming consistency\n\n### 3.2. Issue Classification\nClassify every issue found by severity:\n\n**CRITICAL** - Must fix immediately:\n- Authentication boundary violations\n- Password/secret exposure\n- Missing entire entities\n- Data corruption risks\n\n**HIGH** - Should fix:\n- Missing required variants\n- Incorrect type mappings\n- Missing required fields\n- Business logic violations\n\n**MEDIUM** - Recommended improvements:\n- Missing format specifications\n- Incomplete relationships\n- Consistency issues\n- Missing validation rules\n\n**LOW** - Nice to have:\n- Documentation enhancements\n- Additional examples\n- Style improvements\n\n### 3.3. Output Generation Rules\n\n**CRITICAL RULE**: The `content` field MUST ALWAYS contain valid schemas. Never return an empty object or undefined.\n\nYou produce three key outputs via the `review` function:\n\n#### **review** Field:\n- Detailed findings organized by severity with specific examples\n- Clear explanation of what was fixed, what couldn't be fixed, and why\n\n#### **plan** Field:\n- Concrete action items for each issue that can be fixed\n- If perfect: \"No improvements required. All schemas meet AutoBE standards.\"\n- If partially fixable: List what was fixed and what needs manual intervention\n- If unfixable: Detailed explanation of why regeneration is needed\n\n#### **content** Field (MOST CRITICAL):\nYou are not just a reviewer - you are an ACTIVE FIXER who improves and even recreates schemas when necessary.\n\n**Your Decision Tree**:\n\n1. **If CRITICAL security issues exist**:\n - Remove all sensitive fields from responses\n - Remove all actor IDs from requests\n - Fix and return the corrected schemas\n\n2. **If schemas are incomplete but salvageable**:\n - Fix all security issues\n - Add missing formats (uuid, date-time, email)\n - Enhance documentation with proper business descriptions\n - Add missing validation constraints\n - Return the enhanced version\n\n3. **If structure is fundamentally broken**:\n - RECREATE the schema properly based on the entity name and context\n - Use your knowledge of the domain to create valid, complete schemas\n - Ensure all variants follow standard patterns (ICreate, IUpdate, etc.)\n - Write proper business descriptions (NOT excuses or explanations)\n\n4. **If schemas are missing critical variants**:\n - CREATE the missing variants based on the main entity\n - ICreate: Include all business fields, exclude system fields\n - IUpdate: Make all fields optional, exclude immutable fields\n - ISummary: Include only essential display fields\n - IRequest: Add standard pagination and filter fields\n\n**FORBIDDEN ACTIONS**:\n- \u274C NEVER return empty object {} in content\n- \u274C NEVER write excuses in schema descriptions\n- \u274C NEVER leave broken schemas unfixed\n- \u274C NEVER say \"this needs regeneration\" in a description field\n\n**REQUIRED ACTIONS**:\n- \u2705 ALWAYS return complete, valid schemas\n- \u2705 FIX or RECREATE broken schemas (even with corrected names if necessary)\n- \u2705 If entity names are wrong, RENAME them to correct ones based on Prisma schema\n- \u2705 CREATE missing variants when the main entity exists\n- \u2705 Write proper business descriptions for all schemas\n- \u2705 Document what you did in review/plan, NOT in schema descriptions\n\n**CRITICAL DECISION RULE**:\nWhen schemas use completely wrong entity names (e.g., IDiscussionBoard* instead of IPoliticoEcoBbs*):\n1. Map the wrong names to correct names based on context\n2. Recreate ALL schemas with correct names\n3. Return the corrected schemas in content\n4. Document the name mapping in review/plan\nExample: IDiscussionBoardPost \u2192 IPoliticoEcoBbsPost\n\n## 4. Core Review Checklist\n\n### 4.1. Schema Structure & Format\n- \u2713 All schemas use proper `AutoBeOpenApi.IJsonSchemaDescriptive` format\n- \u2713 Every object type is defined as a named type (no inline definitions)\n- \u2713 All object references use `$ref` syntax correctly\n- \u2713 Schema organization follows logical grouping\n\n### 4.2. Entity Coverage & Completeness\n- \u2713 Every Prisma entity has corresponding schema definitions\n- \u2713 All entities referenced in API operations are defined\n- \u2713 Required variant types exist (`.ICreate`, `.IUpdate`, `.ISummary`, etc.)\n- \u2713 All properties from Prisma schema are included\n- \u2713 No entities or properties are omitted\n\n### 4.3. Type Safety & Validation\n- \u2713 Prisma types correctly mapped to OpenAPI types/formats\n- \u2713 Required/optional fields match Prisma constraints\n- \u2713 Appropriate validation constraints (min/max, pattern, enum)\n- \u2713 Relationship cardinality properly represented\n- \u2713 Format specifications for dates, UUIDs, emails, etc.\n\n### 4.4. Security Requirements\n**Response Types MUST NOT expose:**\n- \u2717 Password fields (`password`, `hashed_password`, `salt`)\n- \u2717 Security tokens (`refresh_token`, `api_key`, `secret_key`)\n- \u2717 Internal system fields (`password_reset_token`, `verification_code`)\n\n**Request Types MUST NOT accept:**\n- \u2717 Actor IDs (`user_id`, `author_id`, `creator_id`, `member_id`)\n- \u2717 Ownership fields that come from authentication context\n- \u2717 System-generated fields (`created_at`, `updated_at`)\n\n### 4.5. Naming Conventions\n- \u2713 Main entities: `IEntityName`\n- \u2713 Creation types: `IEntityName.ICreate`\n- \u2713 Update types: `IEntityName.IUpdate`\n- \u2713 Summary types: `IEntityName.ISummary`\n- \u2713 Request types: `IEntityName.IRequest`\n- \u2713 Pagination: `IPageIEntityName` or standard `IPage<T>`\n\n### 4.6. Documentation Quality\n- \u2713 Schema descriptions reference Prisma table comments\n- \u2713 Property descriptions reference Prisma column comments\n- \u2713 Multi-paragraph formatting for complex descriptions\n- \u2713 All descriptions in English\n- \u2713 Business rules and constraints documented\n\n### 4.7. Consistency & Relationships\n- \u2713 Consistent property naming across related schemas\n- \u2713 Relationship types match ERD definitions\n- \u2713 Foreign key references use correct types\n- \u2713 Enum values consistent across usage\n\n## 5. Review Output Format\n\nYour review should focus ONLY on problems that need fixing:\n\n```markdown\n## Schema Review Results\n\n### Issues Found by Category\n\n#### 1. Structure & Format Issues\n- \u274C Found inline object in IUser.preferences - should be IUserPreferences\n- \u274C IProduct uses anonymous nested object instead of named type\n\n#### 2. Coverage Issues \n- \u274C Missing IComment.IUpdate variant type\n- \u274C IPost.ISummary variant not defined\n\n#### 3. Type Safety Issues\n- \u274C IPost.created_at uses \"string\" instead of \"string\" with format: \"date-time\"\n- \u274C IUser.id missing format: \"uuid\"\n\n#### 4. Security Violations\n- \u274C CRITICAL: IUser exposes hashed_password field\n- \u274C CRITICAL: IPost.ICreate accepts author_id (should come from auth)\n\n#### 5. Documentation Issues\n- \u274C IProduct missing description\n- \u274C Several properties lack Prisma column comment references\n\n## Priority Fixes\n1. Remove hashed_password from IUser (CRITICAL)\n2. Remove author_id from IPost.ICreate (CRITICAL) \n3. Add missing IComment.IUpdate type\n4. Fix date-time format specifications\n\nNote: If no issues are found, simply state \"No issues found.\"\n```\n\n## 6. Improvement Plan Format\n\nYour plan should be specific and actionable:\n\n```markdown\n## Schema Enhancement Plan\n\n### Critical Security Fixes\n1. Remove sensitive fields from response types:\n - IUser: Remove hashed_password, salt, refresh_token\n - IAdmin: Remove api_key, secret_token\n\n2. Remove actor IDs from request types:\n - IPost.ICreate: Remove author_id\n - IComment.ICreate: Remove user_id\n\n### Type Enhancements\n1. Add format specifications:\n - All date fields: Add format: \"date-time\"\n - All UUID fields: Add format: \"uuid\"\n - Email fields: Add format: \"email\"\n\n2. Add validation constraints:\n - IProduct.price: Add minimum: 0\n - IUser.age: Add minimum: 0, maximum: 150\n\n### Documentation Improvements\n1. Add missing schema descriptions\n2. Enhance property descriptions with Prisma comments\n3. Add example values for complex fields\n\n### If no changes needed:\n\"No improvements required. All schemas meet AutoBE standards.\"\n```\n\n## 7. Enhanced Content Generation\n\n### 7.1. Content Field Decision Examples\n\n**Scenario 1: Security violations present but fixable**\n```typescript\n// Original (with security issues):\n{\n \"IUser.ICreate\": {\n \"properties\": {\n \"name\": { \"type\": \"string\" },\n \"email\": { \"type\": \"string\" },\n \"user_id\": { \"type\": \"string\" }, // SECURITY VIOLATION\n \"created_by\": { \"type\": \"string\" } // SECURITY VIOLATION\n }\n }\n}\n\n// Content field returns (fixed):\n{\n \"IUser.ICreate\": {\n \"properties\": {\n \"name\": { \"type\": \"string\" },\n \"email\": { \"type\": \"string\", \"format\": \"email\" }\n // user_id and created_by REMOVED\n }\n }\n}\n```\n\n**Scenario 2: Missing entities but existing schemas valid**\n```typescript\n// Original (incomplete but valid):\n{\n \"IPost\": { /* valid schema */ },\n \"IPost.ICreate\": { /* valid schema */ }\n // Missing: IComment, ICategory, etc.\n}\n\n// Content field returns (improved existing):\n{\n \"IPost\": { /* enhanced with format, better docs */ },\n \"IPost.ICreate\": { /* enhanced, security checked */ }\n // Still missing other entities - documented in review/plan\n}\n```\n\n**Scenario 3: Fundamentally broken structure - RECREATE IT**\n```typescript\n// Original (completely wrong structure):\n{\n \"IUser\": { \n \"wrong\": \"structure\",\n \"not\": \"valid OpenAPI\"\n }\n}\n\n// Content field returns (PROPERLY RECREATED):\n{\n \"IUser\": { \n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"format\": \"uuid\",\n \"description\": \"Unique identifier for the user.\"\n },\n \"email\": {\n \"type\": \"string\",\n \"format\": \"email\",\n \"description\": \"User's email address for authentication and communication.\"\n },\n \"name\": {\n \"type\": \"string\",\n \"description\": \"User's display name.\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"description\": \"Timestamp when the user account was created.\"\n }\n },\n \"required\": [\"id\", \"email\", \"name\", \"created_at\"],\n \"description\": \"User account entity representing registered users in the system.\\n\\nManages user authentication, profile information, and access control.\"\n }\n}\n// Review documents that schema was recreated from scratch\n// Plan explains what was wrong and how it was fixed\n```\n\n### 7.2. Handling Wrong Entity Names\n\n**When entity names are completely wrong:**\n```typescript\n// Original (wrong entity names):\n{\n \"IDiscussionBoardPost\": { /* schema */ },\n \"IDiscussionBoardComment\": { /* schema */ }\n}\n\n// Content field returns (CORRECTED names based on Prisma):\n{\n \"IPoliticoEcoBbsPost\": { /* recreated with correct structure */ },\n \"IPoliticoEcoBbsComment\": { /* recreated with correct structure */ }\n}\n// Review documents the name mapping\n// Plan explains: \"Renamed IDiscussionBoard* to IPoliticoEcoBbs* to match actual Prisma entities\"\n```\n\n### 7.3. What NOT to Do\n\n**\u274C NEVER return empty content**:\n```typescript\n// FORBIDDEN - This deletes all schemas!\n{\n \"content\": {}\n}\n```\n\n**\u274C NEVER give up because names are wrong**:\n```typescript\n// FORBIDDEN - Don't return empty just because names don't match Prisma\n// Instead, FIX the names and return corrected schemas\n```\n\n## 8. Critical Success Factors\n\n### 8.1. Never Compromise Security\n- Always remove sensitive fields from responses\n- Never accept actor IDs in requests\n- Validate authentication boundaries\n\n### 8.2. Maintain Completeness\n- Never omit entities or properties\n- Always include all necessary variant types\n- Preserve all business logic representations\n\n### 8.3. Ensure Accuracy\n- Type definitions must match Prisma schema exactly\n- Relationships must align with ERD\n- Validation rules must reflect business requirements\n\n### 8.4. Optimize for Usability\n- Clear, comprehensive documentation\n- Intuitive type naming\n- Consistent patterns throughout\n\n## 9. Final Validation\n\nBefore submitting your review:\n1. Verify all security issues are addressed\n2. Confirm all entities have complete schemas\n3. Check all improvements are reflected in content\n4. Ensure plan accurately describes all changes\n\nRemember: Your review directly impacts the quality and security of the generated API. Be thorough, be critical, and always prioritize production readiness." /* AutoBeSystemPromptConstant.INTERFACE_SCHEMA_REVIEW */,
|
|
13
|
+
},
|
|
14
|
+
...(0, transformInterfaceAssetHistories_1.transformInterfaceAssetHistories)(state),
|
|
15
|
+
{
|
|
16
|
+
type: "assistantMessage",
|
|
17
|
+
id: (0, uuid_1.v4)(),
|
|
18
|
+
created_at: new Date().toISOString(),
|
|
19
|
+
text: [
|
|
20
|
+
"The Schema Agent has generated schemas for the following API operations.",
|
|
21
|
+
"These operations define what endpoints exist and what request/response types they use:",
|
|
22
|
+
"",
|
|
23
|
+
"```json",
|
|
24
|
+
JSON.stringify(operations, null, 2),
|
|
25
|
+
"```",
|
|
26
|
+
"",
|
|
27
|
+
"All schema types referenced in these operations (in requestBody and responses) must exist in the schemas.",
|
|
28
|
+
].join("\n"),
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: (0, uuid_1.v4)(),
|
|
32
|
+
type: "assistantMessage",
|
|
33
|
+
created_at: new Date().toISOString(),
|
|
34
|
+
text: [
|
|
35
|
+
"Here are the schemas generated by the Schema Agent that need your review:",
|
|
36
|
+
"",
|
|
37
|
+
"```json",
|
|
38
|
+
JSON.stringify(schemaDescriptive, null, 2),
|
|
39
|
+
"```",
|
|
40
|
+
"",
|
|
41
|
+
"Please review these schemas for:",
|
|
42
|
+
"1. Security vulnerabilities (passwords in responses, actor IDs in requests)",
|
|
43
|
+
"2. Missing entities or variants referenced by the operations",
|
|
44
|
+
"3. Type accuracy and format specifications",
|
|
45
|
+
"4. Alignment with Prisma schema and business requirements",
|
|
46
|
+
"",
|
|
47
|
+
"Fix all critical issues and return the enhanced schemas in the content field.",
|
|
48
|
+
].join("\n"),
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
};
|
|
52
|
+
exports.transformInterfaceSchemasReviewHistories = transformInterfaceSchemasReviewHistories;
|
|
53
|
+
//# sourceMappingURL=transformInterfaceSchemasReviewHistories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformInterfaceSchemasReviewHistories.js","sourceRoot":"","sources":["../../../../../../src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts"],"names":[],"mappings":";;;AAEA,+BAA0B;AAI1B,yFAAsF;AAE/E,MAAM,wCAAwC,GAAG,CACtD,KAAkB,EAClB,UAAsC,EACtC,iBAGC,EAGD,EAAE;IACF,OAAO;QACL;YACE,IAAI,EAAE,eAAe;YACrB,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,+3hBAAoD;SACzD;QACD,GAAG,IAAA,mEAAgC,EAAC,KAAK,CAAC;QAC1C;YACE,IAAI,EAAE,kBAAkB;YACxB,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE;gBACJ,0EAA0E;gBAC1E,wFAAwF;gBACxF,EAAE;gBACF,SAAS;gBACT,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;gBACnC,KAAK;gBACL,EAAE;gBACF,2GAA2G;aAC5G,CAAC,IAAI,CAAC,IAAI,CAAC;SACb;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,IAAI,EAAE,kBAAkB;YACxB,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE;gBACJ,2EAA2E;gBAC3E,EAAE;gBACF,SAAS;gBACT,IAAI,CAAC,SAAS,CAAC,iBAAiB,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC1C,KAAK;gBACL,EAAE;gBACF,kCAAkC;gBAClC,6EAA6E;gBAC7E,8DAA8D;gBAC9D,4CAA4C;gBAC5C,2DAA2D;gBAC3D,EAAE;gBACF,+EAA+E;aAChF,CAAC,IAAI,CAAC,IAAI,CAAC;SACb;KACF,CAAC;AACJ,CAAC,CAAC;AAtDW,QAAA,wCAAwC,4CAsDnD"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AutoBeAssistantMessageHistory, AutoBeInterfaceHistory } from "@autobe/interface";
|
|
2
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
+
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
|
+
import { IAutoBeApplicationProps } from "../../context/IAutoBeApplicationProps";
|
|
5
|
+
export declare const orchestrateInterface: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>) => (props: IAutoBeApplicationProps) => Promise<AutoBeAssistantMessageHistory | AutoBeInterfaceHistory>;
|
|
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.orchestrateInterface = void 0;
|
|
13
|
+
const orchestrateInterfaceAuthorizations_1 = require("./orchestrateInterfaceAuthorizations");
|
|
13
14
|
const orchestrateInterfaceComplement_1 = require("./orchestrateInterfaceComplement");
|
|
14
15
|
const orchestrateInterfaceEndpoints_1 = require("./orchestrateInterfaceEndpoints");
|
|
15
16
|
const orchestrateInterfaceGroups_1 = require("./orchestrateInterfaceGroups");
|
|
@@ -30,9 +31,12 @@ const orchestrateInterface = (ctx) => (props) => __awaiter(void 0, void 0, void
|
|
|
30
31
|
return ctx.assistantMessage(init);
|
|
31
32
|
else
|
|
32
33
|
ctx.dispatch(init);
|
|
34
|
+
// AUTHORIZATION
|
|
35
|
+
const authorizations = yield (0, orchestrateInterfaceAuthorizations_1.orchestrateInterfaceAuthorizations)(ctx);
|
|
33
36
|
// ENDPOINTS & OPERATIONS
|
|
34
|
-
const endpoints = yield (0, orchestrateInterfaceEndpoints_1.orchestrateInterfaceEndpoints)(ctx, init.groups);
|
|
37
|
+
const endpoints = yield (0, orchestrateInterfaceEndpoints_1.orchestrateInterfaceEndpoints)(ctx, init.groups, authorizations);
|
|
35
38
|
const operations = yield (0, orchestrateInterfaceOperations_1.orchestrateInterfaceOperations)(ctx, endpoints);
|
|
39
|
+
operations.push(...authorizations);
|
|
36
40
|
// TYPE SCHEMAS
|
|
37
41
|
const document = {
|
|
38
42
|
operations,
|
|
@@ -46,7 +50,8 @@ const orchestrateInterface = (ctx) => (props) => __awaiter(void 0, void 0, void
|
|
|
46
50
|
return ctx.dispatch({
|
|
47
51
|
type: "interfaceComplete",
|
|
48
52
|
document,
|
|
49
|
-
created_at:
|
|
53
|
+
created_at: new Date().toISOString(),
|
|
54
|
+
elapsed: new Date().getTime() - start.getTime(),
|
|
50
55
|
step: (_f = (_e = ctx.state().analyze) === null || _e === void 0 ? void 0 : _e.step) !== null && _f !== void 0 ? _f : 0,
|
|
51
56
|
});
|
|
52
57
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrateInterface.js","sourceRoot":"","sources":["../../../../../src/orchestrate/interface/orchestrateInterface.ts"],"names":[],"mappings":";;;;;;;;;;;;AAWA,6FAA0F;AAC1F,qFAAkF;AAClF,mFAAgF;AAChF,6EAA0E;AAC1E,qFAAkF;AAClF,+EAA4E;AAErE,MAAM,oBAAoB,GAC/B,CAAiC,GAAyB,EAAE,EAAE,CAC9D,CACE,KAA8B,EACmC,EAAE;;IACnE,YAAY;IACZ,MAAM,KAAK,GAAS,IAAI,IAAI,EAAE,CAAC;IAC/B,GAAG,CAAC,QAAQ,CAAC;QACX,IAAI,EAAE,gBAAgB;QACtB,UAAU,EAAE,KAAK,CAAC,WAAW,EAAE;QAC/B,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI,EAAE,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,0CAAE,IAAI,mCAAI,CAAC;KACrC,CAAC,CAAC;IAEH,MAAM,IAAI,GACR,MAAM,IAAA,uDAA0B,EAAC,GAAG,CAAC,CAAC;IACxC,IAAI,IAAI,CAAC,IAAI,KAAK,kBAAkB;QAAE,OAAO,GAAG,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;;QACnE,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAExB,gBAAgB;IAChB,MAAM,cAAc,GAClB,MAAM,IAAA,uEAAkC,EAAC,GAAG,CAAC,CAAC;IAEhD,yBAAyB;IACzB,MAAM,SAAS,GACb,MAAM,IAAA,6DAA6B,EAAC,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IACxE,MAAM,UAAU,GACd,MAAM,IAAA,+DAA8B,EAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAEvD,UAAU,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,CAAC;IAEnC,eAAe;IACf,MAAM,QAAQ,GAA4B;QACxC,UAAU;QACV,UAAU,EAAE;YACV,aAAa,EAAE,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,0CAAE,KAAK,mCAAI,EAAE;YAC/C,OAAO,EAAE,MAAM,IAAA,yDAA2B,EAAC,GAAG,EAAE,UAAU,CAAC;SAC5D;KACF,CAAC;IACF,QAAQ,CAAC,UAAU,CAAC,OAAO,GAAG,MAAM,IAAA,+DAA8B,EAChE,GAAG,EACH,QAAQ,CACT,CAAC;IAEF,aAAa;IACb,OAAO,GAAG,CAAC,QAAQ,CAAC;QAClB,IAAI,EAAE,mBAAmB;QACzB,QAAQ;QACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACpC,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,OAAO,EAAE;QAC/C,IAAI,EAAE,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,0CAAE,IAAI,mCAAI,CAAC;KACE,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AApDS,QAAA,oBAAoB,wBAoD7B"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AutoBeOpenApi } from "@autobe/interface";
|
|
2
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
+
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
|
+
export declare function orchestrateInterfaceAuthorizations<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>): Promise<AutoBeOpenApi.IOperation[]>;
|