@autobe/agent 0.18.0 → 0.20.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 +2 -10
- package/lib/agent/src/AutoBeAgent.js +8 -2
- package/lib/agent/src/AutoBeAgent.js.map +1 -1
- package/lib/agent/src/AutoBeMockAgent.d.ts +2 -10
- package/lib/agent/src/AutoBeMockAgent.js +10 -5
- package/lib/agent/src/AutoBeMockAgent.js.map +1 -1
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +23 -29
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/agent/src/context/AutoBeContext.d.ts +1 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.d.ts +1 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js +14 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js.map +1 -1
- package/lib/agent/src/factory/consentFunctionCall.d.ts +10 -0
- package/lib/agent/src/factory/consentFunctionCall.js +213 -0
- package/lib/agent/src/factory/consentFunctionCall.js.map +1 -0
- package/lib/agent/src/factory/createAgenticaHistory.js +1 -0
- package/lib/agent/src/factory/createAgenticaHistory.js.map +1 -1
- package/lib/agent/src/factory/createAutoBeContext.js +79 -19
- package/lib/agent/src/factory/createAutoBeContext.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +6 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js +41 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +12 -9
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +3 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +45 -31
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js +25 -6
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +8 -3
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +15 -12
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +33 -44
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -4
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +10 -4
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +16 -16
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +5 -5
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js +45 -45
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +14 -14
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +31 -30
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +24 -31
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +4 -4
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +27 -26
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +13 -12
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js +4 -4
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +11 -10
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +36 -29
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js +31 -9
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +2 -2
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +1571 -1144
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js +24 -4
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js +6 -2
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.d.ts +2 -2
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js +12 -14
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +103 -71
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +2 -3
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +147 -116
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js +401 -233
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +2 -5
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +362 -178
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +38 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +16 -16
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +97 -14
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +75 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +46 -14
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +18 -24
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +7 -0
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js +35 -0
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +60 -66
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +19 -30
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +38 -35
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +39 -26
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js +15 -4
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -2
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js +7 -9
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js +38 -2
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js +61 -10
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js +68 -24
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +24 -21
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +59 -57
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +17 -13
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +287 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -2
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +46 -49
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.d.ts +7 -0
- package/lib/agent/src/orchestrate/realize/internal/{compile.js → compileRealizeFiles.js} +12 -29
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +76 -45
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js +15 -9
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +9 -7
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +9 -6
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +25 -20
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -66
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +8 -6
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +36 -27
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +3 -3
- package/lib/agent/src/orchestrate/{internal/IProgress.js → realize/structures/IAutoBeRealizeCorrectApplication.js} +1 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +19 -16
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js +5 -1
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js +13 -10
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +17 -16
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js +33 -32
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.d.ts +2 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +97 -49
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +3 -3
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTest.js +17 -4
- package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js +18 -9
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +138 -23
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js +17 -17
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +7 -6
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
- package/lib/agent/src/orchestrate/{realize/structures/IAutoBeRealizeCoderApplication.js → test/structures/IAutoBeTestScenarioAuthorizationRole.js} +1 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -2
- package/lib/agent/src/utils/executeCachedBatch.d.ts +1 -0
- package/lib/agent/src/utils/executeCachedBatch.js +23 -0
- package/lib/agent/src/utils/executeCachedBatch.js.map +1 -0
- package/lib/agent/src/utils/predicateStateMessage.d.ts +4 -0
- package/lib/agent/src/utils/predicateStateMessage.js +87 -0
- package/lib/agent/src/utils/predicateStateMessage.js.map +1 -0
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +23 -29
- package/lib/context/AutoBeContext.d.ts +1 -0
- package/lib/context/AutoBeTokenUsageComponent.d.ts +1 -0
- package/lib/factory/consentFunctionCall.d.ts +10 -0
- package/lib/index.mjs +4799 -2637
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +6 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +3 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +8 -3
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -4
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +16 -16
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +5 -5
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +2 -2
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.d.ts +2 -2
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +2 -3
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +2 -5
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +38 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +16 -16
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +97 -14
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +75 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +46 -14
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +18 -24
- package/lib/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +7 -0
- package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -2
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +1 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +3 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -2
- package/lib/orchestrate/realize/internal/compileRealizeFiles.d.ts +7 -0
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +9 -6
- package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -66
- package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +8 -6
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +3 -3
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +19 -16
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.d.ts +2 -1
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +7 -6
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +1 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -2
- package/lib/utils/executeCachedBatch.d.ts +1 -0
- package/lib/utils/predicateStateMessage.d.ts +4 -0
- package/package.json +6 -6
- package/src/AutoBeAgent.ts +18 -3
- package/src/AutoBeMockAgent.ts +13 -15
- package/src/constants/AutoBeSystemPromptConstant.ts +23 -29
- package/src/context/AutoBeContext.ts +1 -0
- package/src/context/AutoBeTokenUsageComponent.ts +20 -0
- package/src/factory/consentFunctionCall.ts +129 -0
- package/src/factory/createAgenticaHistory.ts +1 -0
- package/src/factory/createAutoBeContext.ts +108 -20
- package/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.ts +53 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +13 -10
- package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +68 -47
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +33 -21
- package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +21 -10
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +18 -40
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +15 -8
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +16 -16
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +5 -5
- package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +47 -47
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +14 -14
- package/src/orchestrate/interface/histories/transformInterfaceComplementHistories.ts +31 -30
- package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +20 -29
- package/src/orchestrate/interface/histories/transformInterfaceGroupHistories.ts +3 -3
- package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +23 -22
- package/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.ts +12 -11
- package/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.ts +5 -5
- package/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts +11 -10
- package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +37 -30
- package/src/orchestrate/interface/orchestrateInterface.ts +53 -12
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +142 -32
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +2 -0
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +13 -9
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +8 -19
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +82 -74
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +51 -32
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +174 -56
- package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +149 -63
- package/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.ts +39 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +16 -16
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +101 -14
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +77 -1
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +47 -14
- package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +18 -24
- package/src/orchestrate/interface/utils/validateAuthorizationSchema.ts +41 -0
- package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +61 -66
- package/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.ts +19 -30
- package/src/orchestrate/prisma/histories/transformPrismaReviewHistories.ts +38 -35
- package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +36 -23
- package/src/orchestrate/prisma/orchestratePrisma.ts +17 -6
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +8 -19
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +3 -0
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +37 -18
- package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +25 -17
- package/src/orchestrate/realize/histories/transformRealizeAuthorization.ts +24 -21
- package/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.ts +57 -59
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +20 -14
- package/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.ts +294 -0
- package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +62 -57
- package/src/orchestrate/realize/internal/compileRealizeFiles.ts +71 -0
- package/src/orchestrate/realize/orchestrateRealize.ts +109 -86
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +22 -13
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +3 -0
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +28 -24
- package/src/orchestrate/realize/orchestrateRealizeScenario.ts +0 -74
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +37 -28
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +3 -3
- package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +19 -16
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +7 -0
- package/src/orchestrate/test/compile/completeTestCode.ts +17 -13
- package/src/orchestrate/test/experimental/transformTestCorrectHistories.ast +4 -4
- package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +17 -16
- package/src/orchestrate/test/histories/transformTestHistories.ts +35 -34
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +116 -60
- package/src/orchestrate/test/histories/transformTestWriteHistories.ts +3 -3
- package/src/orchestrate/test/orchestrateTest.ts +18 -8
- package/src/orchestrate/test/orchestrateTestCorrect.ts +34 -24
- package/src/orchestrate/test/orchestrateTestScenario.ts +179 -36
- package/src/orchestrate/test/orchestrateTestWrite.ts +18 -19
- package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +7 -6
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +1 -1
- package/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.ts +7 -0
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +2 -2
- package/src/utils/executeCachedBatch.ts +15 -0
- package/src/utils/predicateStateMessage.ts +107 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +0 -4
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js +0 -46
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/internal/IProgress.d.ts +0 -4
- package/lib/agent/src/orchestrate/internal/IProgress.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.d.ts +0 -7
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.js +0 -213
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/internal/compile.d.ts +0 -7
- package/lib/agent/src/orchestrate/realize/internal/compile.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +0 -345
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +0 -56
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.js +0 -3
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +0 -2
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js +0 -5
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.js +0 -3
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.js.map +0 -1
- package/lib/agent/src/utils/pipe.d.ts +0 -5
- package/lib/agent/src/utils/pipe.js +0 -14
- package/lib/agent/src/utils/pipe.js.map +0 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +0 -4
- package/lib/orchestrate/internal/IProgress.d.ts +0 -4
- package/lib/orchestrate/realize/histories/transformRealizeCoderHistories.d.ts +0 -7
- package/lib/orchestrate/realize/internal/compile.d.ts +0 -7
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +0 -345
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +0 -56
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +0 -2
- package/lib/utils/pipe.d.ts +0 -5
- package/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.ts +0 -53
- package/src/orchestrate/internal/IProgress.ts +0 -4
- package/src/orchestrate/realize/histories/transformRealizeCoderHistories.ts +0 -248
- package/src/orchestrate/realize/internal/compile.ts +0 -84
- package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +0 -358
- package/src/orchestrate/realize/structures/IAutoBeRealizeCompile.ts +0 -70
- package/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.ts +0 -2
- package/src/utils/pipe.ts +0 -39
- /package/lib/agent/src/orchestrate/realize/structures/{IAutoBeRealizeReviewApplication.d.ts → IAutoBeRealizeCorrectApplication.d.ts} +0 -0
- /package/lib/orchestrate/realize/structures/{IAutoBeRealizeReviewApplication.d.ts → IAutoBeRealizeCorrectApplication.d.ts} +0 -0
- /package/src/orchestrate/realize/structures/{IAutoBeRealizeReviewApplication.ts → IAutoBeRealizeCorrectApplication.ts} +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
+
import { AutoBeAnalyzeScenarioEvent } from "@autobe/interface";
|
|
3
|
+
import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
|
|
4
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
5
|
+
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
6
|
+
export declare const transformAnalyzeReviewHistories: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, scenario: AutoBeAnalyzeScenarioEvent, allFiles: AutoBeAnalyzeFile[], myFile: AutoBeAnalyzeFile) => Array<IAgenticaHistoryJson.IUserMessage | IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
2
|
import { AutoBeAnalyzeScenarioEvent } from "@autobe/interface";
|
|
3
3
|
import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
|
|
4
|
-
|
|
4
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
5
|
+
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
6
|
+
export declare const transformAnalyzeWriteHistories: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, scenario: AutoBeAnalyzeScenarioEvent, file: AutoBeAnalyzeFile.Scenario) => Array<IAgenticaHistoryJson.IUserMessage | IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage>;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { AutoBeAnalyzeReviewEvent, AutoBeAnalyzeScenarioEvent } from "@autobe/interface";
|
|
1
|
+
import { AutoBeAnalyzeReviewEvent, AutoBeAnalyzeScenarioEvent, AutoBeProgressEventBase } from "@autobe/interface";
|
|
2
2
|
import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
|
|
3
3
|
import { ILlmSchema } from "@samchon/openapi";
|
|
4
4
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
export declare const orchestrateAnalyzeReview: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
|
|
6
|
+
scenario: AutoBeAnalyzeScenarioEvent;
|
|
7
|
+
allFiles: AutoBeAnalyzeFile[];
|
|
8
|
+
myFile: AutoBeAnalyzeFile;
|
|
9
|
+
progress: AutoBeProgressEventBase;
|
|
10
|
+
promptCacheKey: string;
|
|
11
|
+
}) => Promise<AutoBeAnalyzeReviewEvent>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { AutoBeAnalyzeScenarioEvent, AutoBeAnalyzeWriteEvent } from "@autobe/interface";
|
|
1
|
+
import { AutoBeAnalyzeScenarioEvent, AutoBeAnalyzeWriteEvent, AutoBeProgressEventBase } from "@autobe/interface";
|
|
2
2
|
import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
|
|
3
3
|
import { ILlmSchema } from "@samchon/openapi";
|
|
4
4
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
5
|
-
export declare const orchestrateAnalyzeWrite: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>,
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
export declare const orchestrateAnalyzeWrite: <Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
|
|
6
|
+
scenario: AutoBeAnalyzeScenarioEvent;
|
|
7
|
+
file: AutoBeAnalyzeFile.Scenario;
|
|
8
|
+
progress: AutoBeProgressEventBase;
|
|
9
|
+
promptCacheKey: string;
|
|
8
10
|
}) => Promise<AutoBeAnalyzeWriteEvent>;
|
|
@@ -12,9 +12,10 @@ export interface IAutoBeAnalyzeReviewApplication {
|
|
|
12
12
|
* - Adding missing business processes and workflows
|
|
13
13
|
* - Ensuring proper document structure and completeness
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* DO: Output the actual document content that will be saved.
|
|
16
|
+
* DO NOT: Output review comments or analysis of the document.
|
|
17
|
+
*
|
|
18
|
+
* Note: Any text output becomes part of the final document.
|
|
18
19
|
*
|
|
19
20
|
* @param props - The properties containing the document to enhance along with
|
|
20
21
|
* plan and review criteria for guidance
|
|
@@ -40,14 +41,12 @@ export declare namespace IAutoBeAnalyzeReviewApplication {
|
|
|
40
41
|
*
|
|
41
42
|
* Critical review points:
|
|
42
43
|
*
|
|
43
|
-
* -
|
|
44
|
-
* -
|
|
45
|
-
* -
|
|
46
|
-
* - Focus on business requirements and user scenarios
|
|
47
|
-
* -
|
|
48
|
-
*
|
|
49
|
-
* - Business model and authentication requirements must be described in
|
|
50
|
-
* natural language
|
|
44
|
+
* - DO: Use double quotes for ALL labels in Mermaid diagrams
|
|
45
|
+
* - DO NOT: Use spaces between brackets and quotes in Mermaid
|
|
46
|
+
* - DO: Make requirements specific and measurable in natural language
|
|
47
|
+
* - DO: Focus on business requirements and user scenarios
|
|
48
|
+
* - DO NOT: Accept documents containing database schemas or API specifications
|
|
49
|
+
* - DO: Describe business model and authentication requirements in natural language
|
|
51
50
|
*/
|
|
52
51
|
review: string;
|
|
53
52
|
/**
|
|
@@ -67,10 +66,11 @@ export declare namespace IAutoBeAnalyzeReviewApplication {
|
|
|
67
66
|
/**
|
|
68
67
|
* The actual markdown document content that incorporates review feedback.
|
|
69
68
|
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
69
|
+
* This field contains a COMPLETE MARKDOWN DOCUMENT that has already
|
|
70
|
+
* incorporated the review criteria and plan requirements.
|
|
71
|
+
*
|
|
72
|
+
* DO: Treat this as the final, production-ready document.
|
|
73
|
+
* DO NOT: Treat this as raw input to be reviewed.
|
|
74
74
|
*
|
|
75
75
|
* This content represents:
|
|
76
76
|
* - A fully-formed markdown document (.md file)
|
|
@@ -89,7 +89,7 @@ export declare namespace IAutoBeAnalyzeReviewApplication {
|
|
|
89
89
|
* - Appropriate level of detail for backend implementation
|
|
90
90
|
* - Proper document linking (descriptive text, not raw filenames)
|
|
91
91
|
*
|
|
92
|
-
*
|
|
92
|
+
* The enhancer outputs the document itself:
|
|
93
93
|
*
|
|
94
94
|
* - If content is provided, it represents the actual document
|
|
95
95
|
* - The enhancer outputs the enhanced version AS the document itself
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AutoBeAnalyzeRole, CamelPattern } from "@autobe/interface";
|
|
2
2
|
import { AutoBeAnalyzeFile } from "@autobe/interface/src/histories/contents/AutoBeAnalyzeFile";
|
|
3
|
+
import { tags } from "typia";
|
|
3
4
|
export interface IAutoBeAnalyzeScenarioApplication {
|
|
4
5
|
/**
|
|
5
6
|
* Compose project structure with roles and files.
|
|
@@ -25,7 +26,7 @@ export declare namespace IAutoBeAnalyzeScenarioApplication {
|
|
|
25
26
|
* Prefix for file names and variable names. This will be used for
|
|
26
27
|
* organizing documentation files.
|
|
27
28
|
*
|
|
28
|
-
*
|
|
29
|
+
* DO: Use camelCase naming convention.
|
|
29
30
|
*/
|
|
30
31
|
prefix: string & CamelPattern;
|
|
31
32
|
/** Roles to be assigned for the project */
|
|
@@ -57,9 +58,8 @@ export declare namespace IAutoBeAnalyzeScenarioApplication {
|
|
|
57
58
|
* - Service overview and business model description
|
|
58
59
|
* - User roles and permission requirements (described in natural language)
|
|
59
60
|
* - Business logic and validation rules
|
|
60
|
-
* -
|
|
61
|
-
*
|
|
62
|
-
* - All requirements must be written in natural language for clarity
|
|
61
|
+
* - DO NOT: Include database schemas, ERD, or API specifications
|
|
62
|
+
* - DO: Write all requirements in natural language for clarity
|
|
63
63
|
*
|
|
64
64
|
* Generate files based on actual requirements gathered from conversation.
|
|
65
65
|
* Do not create unnecessary documentation - only generate what is needed to
|
|
@@ -73,6 +73,6 @@ export declare namespace IAutoBeAnalyzeScenarioApplication {
|
|
|
73
73
|
* user does not specify a number, generate a sufficient number of documents
|
|
74
74
|
* to adequately support the service.
|
|
75
75
|
*/
|
|
76
|
-
files: Array<AutoBeAnalyzeFile.Scenario>;
|
|
76
|
+
files: Array<AutoBeAnalyzeFile.Scenario> & tags.MinItems<1>;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AutoBeInterfaceAuthorization } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
|
-
export declare function orchestrateInterfaceAuthorizations<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>): Promise<
|
|
4
|
+
export declare function orchestrateInterfaceAuthorizations<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>): Promise<AutoBeInterfaceAuthorization[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AutoBeInterfaceGroupsEvent } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
|
-
export declare function orchestrateInterfaceGroups<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, message?: string): Promise<
|
|
4
|
+
export declare function orchestrateInterfaceGroups<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, message?: string): Promise<AutoBeInterfaceGroupsEvent>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { AutoBeOpenApi } from "@autobe/interface";
|
|
1
|
+
import { AutoBeOpenApi, AutoBeProgressEventBase } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
|
-
|
|
5
|
-
export declare function orchestrateInterfaceOperationsReview<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, operations: AutoBeOpenApi.IOperation[], progress: IProgress): Promise<AutoBeOpenApi.IOperation[]>;
|
|
4
|
+
export declare function orchestrateInterfaceOperationsReview<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, operations: AutoBeOpenApi.IOperation[], progress: AutoBeProgressEventBase): Promise<AutoBeOpenApi.IOperation[]>;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { AutoBeOpenApi } from "@autobe/interface";
|
|
1
|
+
import { AutoBeOpenApi, AutoBeProgressEventBase } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
|
-
export declare function orchestrateInterfaceSchemasReview<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, operations: AutoBeOpenApi.IOperation[], schemas: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>, progress:
|
|
5
|
-
total: number;
|
|
6
|
-
completed: number;
|
|
7
|
-
}): Promise<Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>>;
|
|
4
|
+
export declare function orchestrateInterfaceSchemasReview<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, operations: AutoBeOpenApi.IOperation[], schemas: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema>>, progress: AutoBeProgressEventBase): Promise<Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>>;
|
|
@@ -17,6 +17,44 @@ export interface IAutoBeInterfaceComplementApplication {
|
|
|
17
17
|
}
|
|
18
18
|
export declare namespace IAutoBeInterfaceComplementApplication {
|
|
19
19
|
interface IProps {
|
|
20
|
+
/**
|
|
21
|
+
* TypeScript draft code for complement schema definitions.
|
|
22
|
+
*
|
|
23
|
+
* This property contains TypeScript interface definitions for missing schema
|
|
24
|
+
* types that were referenced but not defined in the initial schema generation.
|
|
25
|
+
* Similar to the main schema draft, this serves as a preliminary TypeScript
|
|
26
|
+
* representation before converting to JSON Schema format.
|
|
27
|
+
*
|
|
28
|
+
* The draft helps ensure that complementary schemas maintain consistency with
|
|
29
|
+
* the existing type system and follow the same conventions as the primary schemas.
|
|
30
|
+
*
|
|
31
|
+
* This draft typically includes:
|
|
32
|
+
* - Missing entity interfaces referenced via $ref
|
|
33
|
+
* - Nested object types used within other schemas
|
|
34
|
+
* - Shared utility types or enumerations
|
|
35
|
+
* - Any transitively referenced types
|
|
36
|
+
*
|
|
37
|
+
* The final schemas in the `schemas` property should be validated against and
|
|
38
|
+
* derived from this TypeScript draft to ensure type safety and consistency
|
|
39
|
+
* across the entire API specification.
|
|
40
|
+
*
|
|
41
|
+
* Example complement draft:
|
|
42
|
+
* ```typescript
|
|
43
|
+
* interface IUserProfile {
|
|
44
|
+
* id: string;
|
|
45
|
+
* userId: string;
|
|
46
|
+
* displayName: string;
|
|
47
|
+
* avatarUrl?: string;
|
|
48
|
+
* }
|
|
49
|
+
*
|
|
50
|
+
* interface IAddress {
|
|
51
|
+
* street: string;
|
|
52
|
+
* city: string;
|
|
53
|
+
* postalCode: string;
|
|
54
|
+
* }
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
draft: string;
|
|
20
58
|
/**
|
|
21
59
|
* A collection of missing schema definitions that need to be added to the
|
|
22
60
|
* OpenAPI document's `components.schemas` section.
|
|
@@ -4,10 +4,10 @@ export interface IAutoBeInterfaceGroupApplication {
|
|
|
4
4
|
* Generate logical groups for organizing API endpoint creation based on
|
|
5
5
|
* Prisma schema structure.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
* structure, table prefixes) rather than arbitrary business domains.
|
|
9
|
-
*
|
|
10
|
-
* all requirements.
|
|
7
|
+
* DO: Derive groups from Prisma schema organization (namespaces, file
|
|
8
|
+
* structure, table prefixes) rather than arbitrary business domains.
|
|
9
|
+
* DO: Create new groups only when existing schema structure cannot adequately
|
|
10
|
+
* cover all requirements.
|
|
11
11
|
*
|
|
12
12
|
* @param props Properties containing the groups to be created for API
|
|
13
13
|
* organization
|
|
@@ -19,8 +19,8 @@ export declare namespace IAutoBeInterfaceGroupApplication {
|
|
|
19
19
|
/**
|
|
20
20
|
* Array of API endpoint groups for organizing development.
|
|
21
21
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
22
|
+
* DO: Organize groups around existing Prisma schema structure.
|
|
23
|
+
* DO: Provide complete coverage of all entities and requirements without
|
|
24
24
|
* overlap.
|
|
25
25
|
*/
|
|
26
26
|
groups: IGroup[] & tags.MinItems<1>;
|
|
@@ -31,10 +31,11 @@ export declare namespace IAutoBeInterfaceGroupApplication {
|
|
|
31
31
|
*
|
|
32
32
|
* **SCHEMA-BASED GROUP REQUIREMENTS:**
|
|
33
33
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* and
|
|
34
|
+
* DO: Derive groups from the Prisma schema structure rather than arbitrary
|
|
35
|
+
* business domain names.
|
|
36
|
+
*
|
|
37
|
+
* This ensures consistency with the underlying data model and prevents
|
|
38
|
+
* misalignment between API organization and database structure.
|
|
38
39
|
*
|
|
39
40
|
* **Primary Group Sources (in order of priority):**
|
|
40
41
|
*
|
|
@@ -48,12 +49,11 @@ export declare namespace IAutoBeInterfaceGroupApplication {
|
|
|
48
49
|
*
|
|
49
50
|
* **Group Creation Guidelines:**
|
|
50
51
|
*
|
|
51
|
-
* - Each group
|
|
52
|
+
* - Each group covers specific Prisma schema entities without overlap
|
|
52
53
|
* - Size groups appropriately for manageable endpoint generation cycles
|
|
53
54
|
* - Maintain clear boundaries based on schema organization
|
|
54
55
|
* - Ensure complete coverage of all database entities and requirements
|
|
55
|
-
* - Related database tables within the same schema area
|
|
56
|
-
* together
|
|
56
|
+
* - Related database tables within the same schema area are grouped together
|
|
57
57
|
*
|
|
58
58
|
* **When to Create Schema-Independent Groups:**
|
|
59
59
|
*
|
|
@@ -68,14 +68,14 @@ export declare namespace IAutoBeInterfaceGroupApplication {
|
|
|
68
68
|
* **Naming Standards:**
|
|
69
69
|
*
|
|
70
70
|
* - Use PascalCase format (e.g., "Shopping", "BBS", "UserManagement")
|
|
71
|
-
* - Names
|
|
71
|
+
* - Names directly reflect Prisma schema structure
|
|
72
72
|
* - Keep names concise and schema-derived
|
|
73
73
|
* - Avoid arbitrary business domain names
|
|
74
74
|
* - Maintain consistency with schema organization
|
|
75
75
|
*
|
|
76
76
|
* **Quality Requirements:**
|
|
77
77
|
*
|
|
78
|
-
* - Groups collectively
|
|
78
|
+
* - Groups collectively cover ALL entities and requirements
|
|
79
79
|
* - Each database entity belongs to exactly one group
|
|
80
80
|
* - Clear mapping to specific Prisma schema elements
|
|
81
81
|
* - Balance group sizes within schema constraints
|
|
@@ -85,7 +85,7 @@ export declare namespace IAutoBeInterfaceGroupApplication {
|
|
|
85
85
|
/**
|
|
86
86
|
* Unique identifier name derived from Prisma schema structure.
|
|
87
87
|
*
|
|
88
|
-
*
|
|
88
|
+
* DO: Correspond to schema namespaces, file names, table prefixes, or
|
|
89
89
|
* organizational annotations rather than arbitrary business domain names.
|
|
90
90
|
*/
|
|
91
91
|
name: string & tags.MinLength<1>;
|
|
@@ -22,7 +22,7 @@ export declare namespace IAutoBeInterfaceOperationApplication {
|
|
|
22
22
|
/**
|
|
23
23
|
* Array of API operations to generate.
|
|
24
24
|
*
|
|
25
|
-
* Each operation in this array
|
|
25
|
+
* Each operation in this array includes:
|
|
26
26
|
*
|
|
27
27
|
* - Specification: Detailed API specification with clear purpose and
|
|
28
28
|
* functionality
|
|
@@ -37,7 +37,7 @@ export declare namespace IAutoBeInterfaceOperationApplication {
|
|
|
37
37
|
* components.schemas
|
|
38
38
|
* - ResponseBody: With typeName referencing appropriate response type
|
|
39
39
|
*
|
|
40
|
-
* All operations
|
|
40
|
+
* All operations follow strict quality standards:
|
|
41
41
|
*
|
|
42
42
|
* 1. Detailed descriptions referencing Prisma schema comments
|
|
43
43
|
* 2. Accurate parameter definitions matching path parameters
|
|
@@ -64,11 +64,10 @@ export declare namespace IAutoBeInterfaceOperationApplication {
|
|
|
64
64
|
* reason and description fields, making it clear why the API was designed and
|
|
65
65
|
* how it should be used.
|
|
66
66
|
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* content-type
|
|
70
|
-
*
|
|
71
|
-
* instead of binary data formats.
|
|
67
|
+
* DO: Use object types for all request bodies and responses. DO: Reference
|
|
68
|
+
* named types defined in the components section. DO: Use `application/json`
|
|
69
|
+
* as the content-type. DO: Use `string & tags.Format<"uri">` in the schema
|
|
70
|
+
* for file upload/download operations instead of binary data formats.
|
|
72
71
|
*
|
|
73
72
|
* In OpenAPI, this might represent:
|
|
74
73
|
*
|
|
@@ -85,7 +84,45 @@ export declare namespace IAutoBeInterfaceOperationApplication {
|
|
|
85
84
|
* }
|
|
86
85
|
* ```
|
|
87
86
|
*/
|
|
88
|
-
interface IOperation extends Omit<AutoBeOpenApi.IOperation, "authorizationRole"> {
|
|
87
|
+
interface IOperation extends Omit<AutoBeOpenApi.IOperation, "authorizationRole" | "authorizationType"> {
|
|
88
|
+
/**
|
|
89
|
+
* Prisma schema models relevant to this operation.
|
|
90
|
+
*
|
|
91
|
+
* Contains the complete Prisma schema definitions for all entities involved
|
|
92
|
+
* in this operation, including their fields, relations, and database
|
|
93
|
+
* constraints. This enables comprehensive validation and schema-aware
|
|
94
|
+
* operation design.
|
|
95
|
+
*
|
|
96
|
+
* The schema information serves multiple critical purposes:
|
|
97
|
+
*
|
|
98
|
+
* - **Field Verification**: Ensures all referenced fields actually exist in
|
|
99
|
+
* the database schema and have the correct types
|
|
100
|
+
* - **Relationship Validation**: Confirms that entity relationships are
|
|
101
|
+
* properly defined and can support the operation's data access patterns
|
|
102
|
+
* - **Soft-Delete Detection**: For DELETE operations, identifies whether
|
|
103
|
+
* entities have soft-delete fields (deleted_at, is_deleted, etc.) to
|
|
104
|
+
* determine if the operation should perform logical deletion instead of
|
|
105
|
+
* physical removal
|
|
106
|
+
* - **Constraint Awareness**: Understands unique constraints, required
|
|
107
|
+
* fields, and default values to generate accurate request/response
|
|
108
|
+
* schemas
|
|
109
|
+
*
|
|
110
|
+
* Example content might include:
|
|
111
|
+
*
|
|
112
|
+
* ```prisma
|
|
113
|
+
* model User {
|
|
114
|
+
* id String @id @default(uuid())
|
|
115
|
+
* email String @unique
|
|
116
|
+
* name String
|
|
117
|
+
* deleted_at DateTime? // Indicates soft-delete capability
|
|
118
|
+
* posts Post[]
|
|
119
|
+
* }
|
|
120
|
+
* ```
|
|
121
|
+
*
|
|
122
|
+
* This schema context ensures operations are fully aligned with the actual
|
|
123
|
+
* database structure and business logic requirements.
|
|
124
|
+
*/
|
|
125
|
+
prisma_schemas: string;
|
|
89
126
|
/**
|
|
90
127
|
* Authorization roles required to access this API operation.
|
|
91
128
|
*
|
|
@@ -93,16 +130,47 @@ export declare namespace IAutoBeInterfaceOperationApplication {
|
|
|
93
130
|
* endpoint. Multiple roles can be specified to allow different types of
|
|
94
131
|
* users to access the same endpoint.
|
|
95
132
|
*
|
|
133
|
+
* ## ⚠️ CRITICAL: Role Multiplication Effect
|
|
134
|
+
*
|
|
135
|
+
* **EACH ROLE IN THIS ARRAY GENERATES A SEPARATE ENDPOINT**
|
|
136
|
+
*
|
|
137
|
+
* - If you specify `["admin", "moderator", "member"]`, this creates 3
|
|
138
|
+
* separate endpoints
|
|
139
|
+
* - Total generated endpoints = operations × average roles.length
|
|
140
|
+
* - Example: 100 operations with 3 roles each = 300 actual endpoints
|
|
141
|
+
*
|
|
142
|
+
* ## 🔴 AVOID OVER-GENERATION
|
|
143
|
+
*
|
|
144
|
+
* **DO NOT create role-specific endpoints when a public endpoint would
|
|
145
|
+
* suffice:**
|
|
146
|
+
*
|
|
147
|
+
* - ❌ BAD: Separate GET endpoints for admin, member, moderator to view the
|
|
148
|
+
* same public data
|
|
149
|
+
* - ✅ GOOD: Single public endpoint `[]` with role-based filtering in business
|
|
150
|
+
* logic
|
|
151
|
+
*
|
|
152
|
+
* **DO NOT enumerate all possible roles when the Prisma schema uses a
|
|
153
|
+
* single User table:**
|
|
154
|
+
*
|
|
155
|
+
* - If Prisma has a User table with role/permission fields, you likely only
|
|
156
|
+
* need `["user"]`
|
|
157
|
+
* - Avoid listing `["admin", "seller", "buyer", "moderator", ...]`
|
|
158
|
+
* unnecessarily
|
|
159
|
+
* - The actual role checking happens in business logic, not at the endpoint
|
|
160
|
+
* level
|
|
161
|
+
*
|
|
96
162
|
* ## Naming Convention
|
|
97
163
|
*
|
|
98
|
-
*
|
|
164
|
+
* DO: Use camelCase for all role names.
|
|
99
165
|
*
|
|
100
166
|
* ## Important Guidelines
|
|
101
167
|
*
|
|
102
168
|
* - Set to empty array `[]` for public endpoints that require no
|
|
103
169
|
* authentication
|
|
104
170
|
* - Set to array with role strings for role-restricted endpoints
|
|
105
|
-
* -
|
|
171
|
+
* - **MINIMIZE the number of roles per endpoint to prevent explosion**
|
|
172
|
+
* - Consider if the endpoint can be public with role-based filtering instead
|
|
173
|
+
* - The role names match exactly with the user type/role defined in the
|
|
106
174
|
* database
|
|
107
175
|
* - This will be used by the Realize Agent to generate appropriate decorator
|
|
108
176
|
* and authorization logic in the provider functions
|
|
@@ -111,11 +179,26 @@ export declare namespace IAutoBeInterfaceOperationApplication {
|
|
|
111
179
|
*
|
|
112
180
|
* ## Examples
|
|
113
181
|
*
|
|
114
|
-
* - `[]` - Public endpoint, no authentication required
|
|
115
|
-
*
|
|
116
|
-
* - `["
|
|
182
|
+
* - `[]` - Public endpoint, no authentication required (PREFERRED for read
|
|
183
|
+
* operations)
|
|
184
|
+
* - `["user"]` - Any authenticated user can access (PREFERRED for
|
|
185
|
+
* user-specific operations)
|
|
186
|
+
* - `["admin"]` - Only admin users can access (USE SPARINGLY)
|
|
117
187
|
* - `["admin", "moderator"]` - Both admin and moderator users can access
|
|
118
|
-
*
|
|
188
|
+
* (AVOID if possible)
|
|
189
|
+
* - `["seller"]` - Only seller users can access (ONLY if Seller is a separate
|
|
190
|
+
* table)
|
|
191
|
+
*
|
|
192
|
+
* ## Best Practices
|
|
193
|
+
*
|
|
194
|
+
* 1. **Start with public `[]` for all read operations** unless sensitive data
|
|
195
|
+
* is involved
|
|
196
|
+
* 2. **Use single role `["user"]` for authenticated operations** and handle
|
|
197
|
+
* permissions in business logic
|
|
198
|
+
* 3. **Only use multiple roles when absolutely necessary** for different
|
|
199
|
+
* business logic paths
|
|
200
|
+
* 4. **Remember: Fewer roles = Fewer endpoints = Better performance and
|
|
201
|
+
* maintainability**
|
|
119
202
|
*
|
|
120
203
|
* Note: The actual authentication/authorization implementation will be
|
|
121
204
|
* handled by decorators at the controller level, and the provider function
|
package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts
CHANGED
|
@@ -91,6 +91,80 @@ export declare namespace IAutoBeInterfaceOperationsReviewApplication {
|
|
|
91
91
|
* operations unchanged. These operations are validated and ready for schema
|
|
92
92
|
* generation and subsequent implementation phases.
|
|
93
93
|
*/
|
|
94
|
-
content:
|
|
94
|
+
content: IOperation[];
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Operation of the Restful API.
|
|
98
|
+
*
|
|
99
|
+
* This interface defines a single API endpoint with its HTTP {@link method},
|
|
100
|
+
* {@link path}, {@link parameters path parameters},
|
|
101
|
+
* {@link requestBody request body}, and {@link responseBody} structure. It
|
|
102
|
+
* corresponds to an individual operation in the paths section of an OpenAPI
|
|
103
|
+
* document.
|
|
104
|
+
*
|
|
105
|
+
* Each operation requires a detailed explanation of its purpose through the
|
|
106
|
+
* reason and description fields, making it clear why the API was designed and
|
|
107
|
+
* how it should be used.
|
|
108
|
+
*
|
|
109
|
+
* All request bodies and responses for this operation must be object types
|
|
110
|
+
* and must reference named types defined in the components section. The
|
|
111
|
+
* content-type is always `application/json`. For file upload/download
|
|
112
|
+
* operations, use `string & tags.Format<"uri">` in the appropriate schema
|
|
113
|
+
* instead of binary data formats.
|
|
114
|
+
*
|
|
115
|
+
* In OpenAPI, this might represent:
|
|
116
|
+
*
|
|
117
|
+
* ```json
|
|
118
|
+
* {
|
|
119
|
+
* "/shoppings/customers/orders": {
|
|
120
|
+
* "post": {
|
|
121
|
+
* "description": "Create a new order application from shopping cart...",
|
|
122
|
+
* "parameters": [...],
|
|
123
|
+
* "requestBody": {...},
|
|
124
|
+
* "responses": {...}
|
|
125
|
+
* }
|
|
126
|
+
* }
|
|
127
|
+
* }
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
interface IOperation extends Omit<AutoBeOpenApi.IOperation, "authorizationType"> {
|
|
131
|
+
/**
|
|
132
|
+
* Prisma schema models relevant to this operation.
|
|
133
|
+
*
|
|
134
|
+
* Contains the complete Prisma schema definitions for all entities involved
|
|
135
|
+
* in this operation, including their fields, relations, and database
|
|
136
|
+
* constraints. This enables comprehensive validation and schema-aware
|
|
137
|
+
* operation design.
|
|
138
|
+
*
|
|
139
|
+
* The schema information serves multiple critical purposes:
|
|
140
|
+
*
|
|
141
|
+
* - **Field Verification**: Ensures all referenced fields actually exist in
|
|
142
|
+
* the database schema and have the correct types
|
|
143
|
+
* - **Relationship Validation**: Confirms that entity relationships are
|
|
144
|
+
* properly defined and can support the operation's data access patterns
|
|
145
|
+
* - **Soft-Delete Detection**: For DELETE operations, identifies whether
|
|
146
|
+
* entities have soft-delete fields (deleted_at, is_deleted, etc.) to
|
|
147
|
+
* determine if the operation should perform logical deletion instead of
|
|
148
|
+
* physical removal
|
|
149
|
+
* - **Constraint Awareness**: Understands unique constraints, required
|
|
150
|
+
* fields, and default values to generate accurate request/response
|
|
151
|
+
* schemas
|
|
152
|
+
*
|
|
153
|
+
* Example content might include:
|
|
154
|
+
*
|
|
155
|
+
* ```prisma
|
|
156
|
+
* model User {
|
|
157
|
+
* id String @id @default(uuid())
|
|
158
|
+
* email String @unique
|
|
159
|
+
* name String
|
|
160
|
+
* deleted_at DateTime? // Indicates soft-delete capability
|
|
161
|
+
* posts Post[]
|
|
162
|
+
* }
|
|
163
|
+
* ```
|
|
164
|
+
*
|
|
165
|
+
* This schema context ensures operations are fully aligned with the actual
|
|
166
|
+
* database structure and business logic requirements.
|
|
167
|
+
*/
|
|
168
|
+
prisma_schemas: string;
|
|
95
169
|
}
|
|
96
170
|
}
|
|
@@ -13,10 +13,9 @@ export interface IAutoBeInterfaceSchemaApplication {
|
|
|
13
13
|
* creation. This ensures that the final OpenAPI document has complete type
|
|
14
14
|
* coverage for all operations.
|
|
15
15
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* comments.
|
|
16
|
+
* DO: Follow established naming conventions (IEntityName,
|
|
17
|
+
* IEntityName.ICreate, etc.) DO: Document thoroughly with descriptions that
|
|
18
|
+
* reference the original Prisma schema comments.
|
|
20
19
|
*
|
|
21
20
|
* @param props Properties containing components to generate.
|
|
22
21
|
*/
|
|
@@ -24,6 +23,39 @@ export interface IAutoBeInterfaceSchemaApplication {
|
|
|
24
23
|
}
|
|
25
24
|
export declare namespace IAutoBeInterfaceSchemaApplication {
|
|
26
25
|
interface IProps {
|
|
26
|
+
/**
|
|
27
|
+
* TypeScript draft code for schema definitions.
|
|
28
|
+
*
|
|
29
|
+
* This property contains TypeScript interface definitions that serve as a
|
|
30
|
+
* preliminary draft before generating the final JSON schema components.
|
|
31
|
+
* The draft allows for initial design and validation of the schema structure
|
|
32
|
+
* using TypeScript's type system before converting to OpenAPI/JSON Schema format.
|
|
33
|
+
*
|
|
34
|
+
* The draft typically includes:
|
|
35
|
+
* - Entity interfaces matching the Prisma models
|
|
36
|
+
* - Operation-specific variants (ICreate, IUpdate, etc.)
|
|
37
|
+
* - Utility types and enumerations
|
|
38
|
+
* - Type relationships and constraints
|
|
39
|
+
*
|
|
40
|
+
* This TypeScript draft serves as the foundation for the subsequent schema
|
|
41
|
+
* generation, ensuring type safety and consistency. The final schemas in the
|
|
42
|
+
* `schemas` property should be derived from and validated against this draft.
|
|
43
|
+
*
|
|
44
|
+
* Example draft structure:
|
|
45
|
+
* ```typescript
|
|
46
|
+
* interface IUser {
|
|
47
|
+
* id: string;
|
|
48
|
+
* email: string;
|
|
49
|
+
* profile: IUserProfile;
|
|
50
|
+
* }
|
|
51
|
+
*
|
|
52
|
+
* namespace IUser {
|
|
53
|
+
* interface ICreate extends Omit<IUser, "id"> {}
|
|
54
|
+
* interface IUpdate extends Partial<ICreate> {}
|
|
55
|
+
* }
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
draft: string;
|
|
27
59
|
/**
|
|
28
60
|
* Complete set of schema components for the OpenAPI specification.
|
|
29
61
|
*
|
|
@@ -31,23 +63,23 @@ export declare namespace IAutoBeInterfaceSchemaApplication {
|
|
|
31
63
|
* the system. It is the central repository of all named schema types that
|
|
32
64
|
* will be used throughout the API specification.
|
|
33
65
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* strictly prohibited.
|
|
66
|
+
* DO: Define all object types as named types in the components.schemas
|
|
67
|
+
* section. DO NOT: Use inline anonymous object definitions.
|
|
37
68
|
*
|
|
38
|
-
* This components object
|
|
69
|
+
* This components object includes:
|
|
39
70
|
*
|
|
40
71
|
* - Main entity types (IEntityName)
|
|
41
72
|
* - Operation-specific variants (.ICreate, .IUpdate, .ISummary, etc.)
|
|
42
73
|
* - Container types (IPage<T> for pagination)
|
|
43
74
|
* - Enumeration types
|
|
44
75
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
76
|
+
* DO: Include detailed descriptions that reference the original Prisma
|
|
77
|
+
* schema comments and thoroughly document each property. DO: Use a $ref to
|
|
78
|
+
* a named type in the components.schemas section for every property that
|
|
79
|
+
* references an object.
|
|
80
|
+
*
|
|
81
|
+
* This applies to all objects in request bodies, response bodies, and
|
|
82
|
+
* properties that are objects or arrays of objects.
|
|
51
83
|
*
|
|
52
84
|
* Example structure:
|
|
53
85
|
*
|