@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformRealizeWriteHistories.js","sourceRoot":"","sources":["../../../../../../src/orchestrate/realize/histories/transformRealizeWriteHistories.ts"],"names":[],"mappings":";;;AAEA,+BAA0B;
|
|
1
|
+
{"version":3,"file":"transformRealizeWriteHistories.js","sourceRoot":"","sources":["../../../../../../src/orchestrate/realize/histories/transformRealizeWriteHistories.ts"],"names":[],"mappings":";;;AAEA,yCAA2C;AAC3C,+BAA0B;AAM1B,iHAA8G;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CAAC,GAAG,CAAC,CAAC;iBAClE,UAAU,CAAC,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;iBAClE,UAAU,CAAC,SAAS,EAAE,KAAK,CAAC;SAChC;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;;;UAIjB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC;;OAEjC;SACF;QACD;YACE,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;;;;;;;;;;;OAYpB;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAzKW,QAAA,8BAA8B,kCAyKzC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AutoBeRealizeAuthorization, AutoBeRealizeFunction, IAutoBeTypeScriptCompileResult } from "@autobe/interface";
|
|
2
|
+
import { ILlmSchema } from "@samchon/openapi";
|
|
3
|
+
import { AutoBeContext } from "../../../context/AutoBeContext";
|
|
4
|
+
export declare function compileRealizeFiles<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
|
|
5
|
+
authorizations: AutoBeRealizeAuthorization[];
|
|
6
|
+
functions: AutoBeRealizeFunction[];
|
|
7
|
+
}): Promise<IAutoBeTypeScriptCompileResult>;
|
|
@@ -9,23 +9,27 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
13
|
-
|
|
12
|
+
exports.compileRealizeFiles = compileRealizeFiles;
|
|
13
|
+
const uuid_1 = require("uuid");
|
|
14
|
+
function compileRealizeFiles(ctx, props) {
|
|
14
15
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15
16
|
var _a, _b, _c;
|
|
16
17
|
const prisma = (_a = ctx.state().prisma) === null || _a === void 0 ? void 0 : _a.compiled;
|
|
17
18
|
const payloads = Object.fromEntries(props.authorizations.map((el) => [el.payload.location, el.payload.content]));
|
|
18
|
-
const templateFiles = yield getTemplates(ctx);
|
|
19
|
-
const nodeModules = (prisma === null || prisma === void 0 ? void 0 : prisma.type) === "success" ? prisma.nodeModules : {};
|
|
20
19
|
const compiler = yield ctx.compiler();
|
|
20
|
+
const templateFiles = yield compiler.realize.getTemplate();
|
|
21
|
+
const nodeModules = (prisma === null || prisma === void 0 ? void 0 : prisma.type) === "success" ? prisma.nodeModules : {};
|
|
22
|
+
const filterTsFiles = (location) => location.startsWith("src/") && location.endsWith(".ts");
|
|
23
|
+
const files = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, nodeModules), payloads), Object.fromEntries(Object.entries(yield ctx.files({ dbms: "sqlite" })).filter(([key]) => filterTsFiles(key)))), Object.fromEntries(Object.entries(templateFiles).filter(([key]) => filterTsFiles(key)))), Object.fromEntries(props.functions.map((el) => [el.location, el.content])));
|
|
21
24
|
const compiled = yield compiler.typescript.compile({
|
|
22
|
-
files:
|
|
25
|
+
files: files,
|
|
23
26
|
});
|
|
24
27
|
if (compiled.type === "success") {
|
|
25
28
|
return compiled;
|
|
26
29
|
}
|
|
27
30
|
const event = {
|
|
28
31
|
type: "realizeValidate",
|
|
32
|
+
id: (0, uuid_1.v7)(),
|
|
29
33
|
result: compiled,
|
|
30
34
|
files: Object.fromEntries(compiled.type === "failure"
|
|
31
35
|
? compiled.diagnostics.map((d) => [d.file, d.code])
|
|
@@ -33,29 +37,8 @@ function compile(ctx, props) {
|
|
|
33
37
|
step: (_c = (_b = ctx.state().analyze) === null || _b === void 0 ? void 0 : _b.step) !== null && _c !== void 0 ? _c : 0,
|
|
34
38
|
created_at: new Date().toISOString(),
|
|
35
39
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Loads template files for the realize agent These files are essential for the
|
|
41
|
-
* realize coder to pass compilation
|
|
42
|
-
*
|
|
43
|
-
* @param ctx Context of agent
|
|
44
|
-
* @returns Template file infomations
|
|
45
|
-
*/
|
|
46
|
-
function getTemplates(ctx) {
|
|
47
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
const compiler = yield ctx.compiler();
|
|
49
|
-
const templateFiles = yield compiler.realize.getTemplate();
|
|
50
|
-
const pathnames = ["src/MyGlobal.ts", "src/util/toISOStringSafe.ts"];
|
|
51
|
-
return pathnames.map((pathname) => {
|
|
52
|
-
return {
|
|
53
|
-
content: templateFiles[pathname],
|
|
54
|
-
result: "success",
|
|
55
|
-
location: pathname,
|
|
56
|
-
role: null, // template files doesn't have role.
|
|
57
|
-
};
|
|
58
|
-
});
|
|
40
|
+
ctx.dispatch(event);
|
|
41
|
+
return compiled;
|
|
59
42
|
});
|
|
60
43
|
}
|
|
61
|
-
//# sourceMappingURL=
|
|
44
|
+
//# sourceMappingURL=compileRealizeFiles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compileRealizeFiles.js","sourceRoot":"","sources":["../../../../../../src/orchestrate/realize/internal/compileRealizeFiles.ts"],"names":[],"mappings":";;;;;;;;;;;AAYA,kDA0DC;AA9DD,+BAA0B;AAI1B,SAAsB,mBAAmB,CACvC,GAAyB,EACzB,KAGC;;;QAED,MAAM,MAAM,GAAG,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,MAAM,0CAAE,QAAQ,CAAC;QAC5C,MAAM,QAAQ,GAA2B,MAAM,CAAC,WAAW,CACzD,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,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CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAChC,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,MAAM,KAAK,GAA+B;YACxC,IAAI,EAAE,iBAAiB;YACvB,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,MAAM,EAAE,QAAQ;YAChB,KAAK,EAAE,MAAM,CAAC,WAAW,CACvB,QAAQ,CAAC,IAAI,KAAK,SAAS;gBACzB,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;gBACnD,CAAC,CAAC,EAAE,CACP;YACD,IAAI,EAAE,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,0CAAE,IAAI,mCAAI,CAAC;YACpC,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACrC,CAAC;QACF,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACpB,OAAO,QAAQ,CAAC;IAClB,CAAC;CAAA"}
|
|
@@ -10,81 +10,118 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.orchestrateRealize = void 0;
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
13
|
+
const uuid_1 = require("uuid");
|
|
14
|
+
const executeCachedBatch_1 = require("../../utils/executeCachedBatch");
|
|
15
|
+
const predicateStateMessage_1 = require("../../utils/predicateStateMessage");
|
|
16
|
+
const compileRealizeFiles_1 = require("./internal/compileRealizeFiles");
|
|
16
17
|
const orchestrateRealizeAuthorization_1 = require("./orchestrateRealizeAuthorization");
|
|
17
18
|
const orchestrateRealizeCorrect_1 = require("./orchestrateRealizeCorrect");
|
|
18
19
|
const orchestrateRealizeScenario_1 = require("./orchestrateRealizeScenario");
|
|
19
20
|
const orchestrateRealizeWrite_1 = require("./orchestrateRealizeWrite");
|
|
20
21
|
const orchestrateRealize = (ctx) => (props) => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
22
|
var _a, _b, _c, _d, _e;
|
|
23
|
+
// PREDICATION
|
|
22
24
|
const operations = (_a = ctx.state().interface) === null || _a === void 0 ? void 0 : _a.document.operations;
|
|
23
|
-
if (!operations)
|
|
25
|
+
if (!operations)
|
|
24
26
|
throw new Error("Can't do realize agent because operations are nothing.");
|
|
25
|
-
}
|
|
26
27
|
const start = new Date();
|
|
28
|
+
const predicate = (0, predicateStateMessage_1.predicateStateMessage)(ctx.state(), "realize");
|
|
29
|
+
if (predicate !== null)
|
|
30
|
+
return ctx.assistantMessage({
|
|
31
|
+
type: "assistantMessage",
|
|
32
|
+
id: (0, uuid_1.v7)(),
|
|
33
|
+
created_at: start.toISOString(),
|
|
34
|
+
text: predicate,
|
|
35
|
+
completed_at: new Date().toISOString(),
|
|
36
|
+
});
|
|
27
37
|
ctx.dispatch({
|
|
28
38
|
type: "realizeStart",
|
|
39
|
+
id: (0, uuid_1.v7)(),
|
|
29
40
|
created_at: start.toISOString(),
|
|
30
41
|
reason: props.reason,
|
|
31
42
|
step: (_c = (_b = ctx.state().test) === null || _b === void 0 ? void 0 : _b.step) !== null && _c !== void 0 ? _c : 0,
|
|
32
43
|
});
|
|
44
|
+
// AUTHORIZATIONS
|
|
33
45
|
const authorizations = yield (0, orchestrateRealizeAuthorization_1.orchestrateRealizeAuthorization)(ctx);
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
|
|
46
|
+
// SCENARIOS
|
|
47
|
+
const scenarios = operations.map((operation) => {
|
|
48
|
+
const authorization = authorizations.find((el) => el.role.name === operation.authorizationRole);
|
|
49
|
+
return (0, orchestrateRealizeScenario_1.orchestrateRealizeScenario)(ctx, operation, authorization);
|
|
50
|
+
});
|
|
51
|
+
const writeProgress = {
|
|
52
|
+
total: scenarios.length,
|
|
53
|
+
completed: 0,
|
|
54
|
+
};
|
|
55
|
+
const writeEvents = yield (0, executeCachedBatch_1.executeCachedBatch)(scenarios.map((scenario) => (promptCacheKey) => __awaiter(void 0, void 0, void 0, function* () {
|
|
37
56
|
var _a;
|
|
38
|
-
const code = (0, orchestrateRealizeWrite_1.orchestrateRealizeWrite)(ctx,
|
|
57
|
+
const code = yield (0, orchestrateRealizeWrite_1.orchestrateRealizeWrite)(ctx, {
|
|
58
|
+
totalAuthorizations: authorizations,
|
|
59
|
+
authorization: (_a = scenario.decoratorEvent) !== null && _a !== void 0 ? _a : null,
|
|
60
|
+
scenario,
|
|
61
|
+
progress: writeProgress,
|
|
62
|
+
promptCacheKey,
|
|
63
|
+
});
|
|
39
64
|
return code;
|
|
40
65
|
})));
|
|
41
|
-
|
|
42
|
-
|
|
66
|
+
const functions = Object.entries(Object.fromEntries(writeEvents.map((event) => [event.location, event.content]))).map(([location, content]) => {
|
|
67
|
+
const scenario = scenarios.find((el) => el.location === location);
|
|
68
|
+
return {
|
|
69
|
+
location,
|
|
70
|
+
content,
|
|
71
|
+
endpoint: {
|
|
72
|
+
method: scenario.operation.method,
|
|
73
|
+
path: scenario.operation.path,
|
|
74
|
+
},
|
|
75
|
+
name: scenario.functionName,
|
|
76
|
+
};
|
|
77
|
+
});
|
|
78
|
+
let compilation = yield (0, compileRealizeFiles_1.compileRealizeFiles)(ctx, {
|
|
43
79
|
authorizations,
|
|
44
|
-
|
|
80
|
+
functions,
|
|
45
81
|
});
|
|
46
|
-
if (
|
|
47
|
-
const MAX_CORRECTION_ATTEMPTS =
|
|
82
|
+
if (compilation.type !== "success") {
|
|
83
|
+
const MAX_CORRECTION_ATTEMPTS = 5;
|
|
48
84
|
const reviewProgress = {
|
|
85
|
+
id: (0, uuid_1.v7)(),
|
|
49
86
|
total: writeEvents.length,
|
|
50
87
|
completed: writeEvents.length,
|
|
51
88
|
};
|
|
52
89
|
for (let attempt = 0; attempt < MAX_CORRECTION_ATTEMPTS; attempt++) {
|
|
53
|
-
if (
|
|
54
|
-
const failedFiles =
|
|
90
|
+
if (compilation.type === "failure") {
|
|
91
|
+
const failedFiles = Object.fromEntries(compilation.type === "failure"
|
|
92
|
+
? compilation.diagnostics.map((d) => [d.file, d.code])
|
|
93
|
+
: []);
|
|
55
94
|
reviewProgress.total += Object.keys(failedFiles).length;
|
|
56
|
-
const
|
|
57
|
-
yield
|
|
58
|
-
var
|
|
59
|
-
const diagnostic =
|
|
95
|
+
const failure = compilation;
|
|
96
|
+
yield (0, executeCachedBatch_1.executeCachedBatch)(Object.entries(failedFiles).map(([location, content]) => () => __awaiter(void 0, void 0, void 0, function* () {
|
|
97
|
+
var _a;
|
|
98
|
+
const diagnostic = failure.diagnostics.find((el) => el.file === location);
|
|
60
99
|
const scenario = scenarios.find((el) => el.location === location);
|
|
61
100
|
if (diagnostic && scenario) {
|
|
62
|
-
const correctEvent = yield (0, orchestrateRealizeCorrect_1.orchestrateRealizeCorrect)(ctx,
|
|
63
|
-
|
|
101
|
+
const correctEvent = yield (0, orchestrateRealizeCorrect_1.orchestrateRealizeCorrect)(ctx, {
|
|
102
|
+
totalAuthorizations: authorizations,
|
|
103
|
+
authorization: (_a = scenario.decoratorEvent) !== null && _a !== void 0 ? _a : null,
|
|
104
|
+
scenario,
|
|
105
|
+
code: content,
|
|
106
|
+
diagnostic,
|
|
107
|
+
progress: reviewProgress,
|
|
108
|
+
});
|
|
109
|
+
const corrected = functions.find((el) => el.location === correctEvent.location);
|
|
110
|
+
if (corrected) {
|
|
111
|
+
corrected.content = correctEvent.content;
|
|
112
|
+
}
|
|
64
113
|
}
|
|
65
114
|
})));
|
|
66
|
-
|
|
115
|
+
compilation = yield (0, compileRealizeFiles_1.compileRealizeFiles)(ctx, {
|
|
67
116
|
authorizations,
|
|
68
|
-
|
|
117
|
+
functions,
|
|
69
118
|
});
|
|
70
|
-
if (
|
|
119
|
+
if (compilation.type === "success") {
|
|
71
120
|
break;
|
|
72
121
|
}
|
|
73
122
|
}
|
|
74
123
|
}
|
|
75
124
|
}
|
|
76
|
-
const functions = Object.entries(providers).map(([location, content]) => {
|
|
77
|
-
const scenario = scenarios.find((el) => el.location === location);
|
|
78
|
-
return {
|
|
79
|
-
location,
|
|
80
|
-
content,
|
|
81
|
-
endpoint: {
|
|
82
|
-
method: scenario.operation.method,
|
|
83
|
-
path: scenario.operation.path,
|
|
84
|
-
},
|
|
85
|
-
name: scenario.functionName,
|
|
86
|
-
};
|
|
87
|
-
});
|
|
88
125
|
const compiler = yield ctx.compiler();
|
|
89
126
|
const controllers = yield compiler.realize.controller({
|
|
90
127
|
document: ctx.state().interface.document,
|
|
@@ -93,18 +130,12 @@ const orchestrateRealize = (ctx) => (props) => __awaiter(void 0, void 0, void 0,
|
|
|
93
130
|
});
|
|
94
131
|
return ctx.dispatch({
|
|
95
132
|
type: "realizeComplete",
|
|
133
|
+
id: (0, uuid_1.v7)(),
|
|
96
134
|
created_at: new Date().toISOString(),
|
|
97
135
|
functions,
|
|
98
136
|
authorizations,
|
|
99
137
|
controllers,
|
|
100
|
-
compiled: yield
|
|
101
|
-
files: Object.assign(Object.assign({}, (yield (0, getAutoBeGenerated_1.getAutoBeGenerated)(compiler, ctx.state(), ctx.histories(), ctx.usage()))), (yield (0, getAutoBeRealizeGenerated_1.getAutoBeRealizeGenerated)({
|
|
102
|
-
document: ctx.state().interface.document,
|
|
103
|
-
authorizations,
|
|
104
|
-
functions,
|
|
105
|
-
compiler,
|
|
106
|
-
}))),
|
|
107
|
-
}),
|
|
138
|
+
compiled: yield (0, compileRealizeFiles_1.compileRealizeFiles)(ctx, { authorizations, functions }),
|
|
108
139
|
step: (_e = (_d = ctx.state().analyze) === null || _d === void 0 ? void 0 : _d.step) !== null && _e !== void 0 ? _e : 0,
|
|
109
140
|
elapsed: new Date().getTime() - start.getTime(),
|
|
110
141
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateRealize.js","sourceRoot":"","sources":["../../../../../src/orchestrate/realize/orchestrateRealize.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"orchestrateRealize.js","sourceRoot":"","sources":["../../../../../src/orchestrate/realize/orchestrateRealize.ts"],"names":[],"mappings":";;;;;;;;;;;;AAYA,+BAA0B;AAI1B,uEAAoE;AACpE,6EAA0E;AAC1E,wEAAqE;AACrE,uFAAoF;AACpF,2EAAwE;AACxE,6EAA0E;AAC1E,uEAAoE;AAG7D,MAAM,kBAAkB,GAC7B,CAAiC,GAAyB,EAAE,EAAE,CAC9D,CACE,KAA8B,EACiC,EAAE;;IACjE,cAAc;IACd,MAAM,UAAU,GACd,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,SAAS,0CAAE,QAAQ,CAAC,UAAU,CAAC;IAC7C,IAAI,CAAC,UAAU;QACb,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAE5E,MAAM,KAAK,GAAS,IAAI,IAAI,EAAE,CAAC;IAC/B,MAAM,SAAS,GAAkB,IAAA,6CAAqB,EACpD,GAAG,CAAC,KAAK,EAAE,EACX,SAAS,CACV,CAAC;IACF,IAAI,SAAS,KAAK,IAAI;QACpB,OAAO,GAAG,CAAC,gBAAgB,CAAC;YAC1B,IAAI,EAAE,kBAAkB;YACxB,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,KAAK,CAAC,WAAW,EAAE;YAC/B,IAAI,EAAE,SAAS;YACf,YAAY,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACvC,CAAC,CAAC;IACL,GAAG,CAAC,QAAQ,CAAC;QACX,IAAI,EAAE,cAAc;QACpB,EAAE,EAAE,IAAA,SAAE,GAAE;QACR,UAAU,EAAE,KAAK,CAAC,WAAW,EAAE;QAC/B,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI,EAAE,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,IAAI,0CAAE,IAAI,mCAAI,CAAC;KAClC,CAAC,CAAC;IA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,WAAW,GACf,MAAM,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC;QAChC,QAAQ,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC,SAAU,CAAC,QAAQ;QACzC,SAAS;QACT,cAAc;KACf,CAAC,CAAC;IACL,OAAO,GAAG,CAAC,QAAQ,CAAC;QAClB,IAAI,EAAE,iBAAiB;QACvB,EAAE,EAAE,IAAA,SAAE,GAAE;QACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACpC,SAAS;QACT,cAAc;QACd,WAAW;QACX,QAAQ,EAAE,MAAM,IAAA,yCAAmB,EAAC,GAAG,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC;QACvE,IAAI,EAAE,MAAA,MAAA,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,0CAAE,IAAI,mCAAI,CAAC;QACpC,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,OAAO,EAAE;KAChD,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAzKS,QAAA,kBAAkB,sBAyK3B"}
|
|
@@ -48,7 +48,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
48
48
|
exports.orchestrateRealizeAuthorization = orchestrateRealizeAuthorization;
|
|
49
49
|
const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
|
|
50
50
|
const typia_1 = __importDefault(require("typia"));
|
|
51
|
+
const uuid_1 = require("uuid");
|
|
51
52
|
const assertSchemaModel_1 = require("../../context/assertSchemaModel");
|
|
53
|
+
const executeCachedBatch_1 = require("../../utils/executeCachedBatch");
|
|
52
54
|
const transformRealizeAuthorization_1 = require("./histories/transformRealizeAuthorization");
|
|
53
55
|
const orchestrateRealizeAuthorizationCorrect_1 = require("./orchestrateRealizeAuthorizationCorrect");
|
|
54
56
|
const AuthorizationFileSystem_1 = require("./utils/AuthorizationFileSystem");
|
|
@@ -64,6 +66,7 @@ function orchestrateRealizeAuthorization(ctx) {
|
|
|
64
66
|
var _a, _b, _c, _d, _e, _f;
|
|
65
67
|
ctx.dispatch({
|
|
66
68
|
type: "realizeAuthorizationStart",
|
|
69
|
+
id: (0, uuid_1.v7)(),
|
|
67
70
|
step: (_b = (_a = ctx.state().test) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
|
|
68
71
|
created_at: new Date().toISOString(),
|
|
69
72
|
});
|
|
@@ -73,18 +76,19 @@ function orchestrateRealizeAuthorization(ctx) {
|
|
|
73
76
|
completed: 0,
|
|
74
77
|
};
|
|
75
78
|
const templateFiles = yield (yield ctx.compiler()).realize.getTemplate();
|
|
76
|
-
const authorizations = yield
|
|
79
|
+
const authorizations = yield (0, executeCachedBatch_1.executeCachedBatch)(roles.map((role) => (promptCacheKey) => process(ctx, role, InternalFileSystem_1.InternalFileSystem.DEFAULT.map((el) => ({
|
|
77
80
|
[el]: templateFiles[el],
|
|
78
|
-
})).reduce((acc, cur) => Object.assign(acc, cur), {}), progress)));
|
|
81
|
+
})).reduce((acc, cur) => Object.assign(acc, cur), {}), progress, promptCacheKey)));
|
|
79
82
|
ctx.dispatch({
|
|
80
83
|
type: "realizeAuthorizationComplete",
|
|
84
|
+
id: (0, uuid_1.v7)(),
|
|
81
85
|
created_at: new Date().toISOString(),
|
|
82
86
|
step: (_f = (_e = ctx.state().test) === null || _e === void 0 ? void 0 : _e.step) !== null && _f !== void 0 ? _f : 0,
|
|
83
87
|
});
|
|
84
88
|
return authorizations;
|
|
85
89
|
});
|
|
86
90
|
}
|
|
87
|
-
function process(ctx, role, templateFiles, progress) {
|
|
91
|
+
function process(ctx, role, templateFiles, progress, promptCacheKey) {
|
|
88
92
|
return __awaiter(this, void 0, void 0, function* () {
|
|
89
93
|
var _a, _b, _c;
|
|
90
94
|
const pointer = {
|
|
@@ -100,6 +104,7 @@ function process(ctx, role, templateFiles, progress) {
|
|
|
100
104
|
},
|
|
101
105
|
}),
|
|
102
106
|
enforceFunctionCall: true,
|
|
107
|
+
promptCacheKey,
|
|
103
108
|
message: "Create Authorization Provider and Decorator.",
|
|
104
109
|
});
|
|
105
110
|
if (pointer.value === null)
|
|
@@ -127,6 +132,7 @@ function process(ctx, role, templateFiles, progress) {
|
|
|
127
132
|
const prismaClients = (compiled === null || compiled === void 0 ? void 0 : compiled.type) === "success" ? compiled.nodeModules : {};
|
|
128
133
|
ctx.dispatch({
|
|
129
134
|
type: "realizeAuthorizationWrite",
|
|
135
|
+
id: (0, uuid_1.v7)(),
|
|
130
136
|
created_at: new Date().toISOString(),
|
|
131
137
|
authorization: authorization,
|
|
132
138
|
tokenUsage,
|
|
@@ -188,7 +194,7 @@ const claude = {
|
|
|
188
194
|
type: "object",
|
|
189
195
|
properties: {
|
|
190
196
|
name: {
|
|
191
|
-
description: "The name of the authentication Provider function in {role}Authorize\nformat (e.g., adminAuthorize, userAuthorize). This function will be\ncalled by the decorator to verify JWT tokens and return authenticated\nuser information for the specified role.\n\
|
|
197
|
+
description: "The name of the authentication Provider function in {role}Authorize\nformat (e.g., adminAuthorize, userAuthorize). This function will be\ncalled by the decorator to verify JWT tokens and return authenticated\nuser information for the specified role.\n\nDO: Use camelCase naming convention.",
|
|
192
198
|
type: "string",
|
|
193
199
|
pattern: "^[a-z][a-zA-Z0-9]*$"
|
|
194
200
|
},
|
|
@@ -206,7 +212,7 @@ const claude = {
|
|
|
206
212
|
type: "object",
|
|
207
213
|
properties: {
|
|
208
214
|
name: {
|
|
209
|
-
description: "The name of the Decorator to be generated in {Role}Auth format (e.g.,\nAdminAuth, UserAuth). This decorator will be used as a parameter\ndecorator in Controller methods to automatically authenticate and\nauthorize users for the specific role, injecting the authenticated user\npayload as a method parameter.\n\
|
|
215
|
+
description: "The name of the Decorator to be generated in {Role}Auth format (e.g.,\nAdminAuth, UserAuth). This decorator will be used as a parameter\ndecorator in Controller methods to automatically authenticate and\nauthorize users for the specific role, injecting the authenticated user\npayload as a method parameter.\n\nDO: Use PascalCase naming convention.",
|
|
210
216
|
type: "string",
|
|
211
217
|
pattern: "^[A-Z][a-zA-Z0-9]*$"
|
|
212
218
|
},
|
|
@@ -224,7 +230,7 @@ const claude = {
|
|
|
224
230
|
type: "object",
|
|
225
231
|
properties: {
|
|
226
232
|
name: {
|
|
227
|
-
description: "The name of the Payload type to be generated in {Role}Payload format\n(e.g., AdminPayload, UserPayload). This type defines the structure of the\nauthenticated user data that will be injected into Controller methods\nwhen using the decorator.\n\
|
|
233
|
+
description: "The name of the Payload type to be generated in {Role}Payload format\n(e.g., AdminPayload, UserPayload). This type defines the structure of the\nauthenticated user data that will be injected into Controller methods\nwhen using the decorator.\n\nDO: Use PascalCase naming convention.",
|
|
228
234
|
type: "string",
|
|
229
235
|
pattern: "^[A-Z][a-zA-Z0-9]*$"
|
|
230
236
|
},
|
|
@@ -367,7 +373,7 @@ const collection = {
|
|
|
367
373
|
type: "object",
|
|
368
374
|
properties: {
|
|
369
375
|
name: {
|
|
370
|
-
description: "The name of the authentication Provider function in {role}Authorize\nformat (e.g., adminAuthorize, userAuthorize). This function will be\ncalled by the decorator to verify JWT tokens and return authenticated\nuser information for the specified role.\n\
|
|
376
|
+
description: "The name of the authentication Provider function in {role}Authorize\nformat (e.g., adminAuthorize, userAuthorize). This function will be\ncalled by the decorator to verify JWT tokens and return authenticated\nuser information for the specified role.\n\nDO: Use camelCase naming convention.\n\n\n@pattern ^[a-z][a-zA-Z0-9]*$",
|
|
371
377
|
type: "string"
|
|
372
378
|
},
|
|
373
379
|
content: {
|
|
@@ -384,7 +390,7 @@ const collection = {
|
|
|
384
390
|
type: "object",
|
|
385
391
|
properties: {
|
|
386
392
|
name: {
|
|
387
|
-
description: "The name of the Decorator to be generated in {Role}Auth format (e.g.,\nAdminAuth, UserAuth). This decorator will be used as a parameter\ndecorator in Controller methods to automatically authenticate and\nauthorize users for the specific role, injecting the authenticated user\npayload as a method parameter.\n\
|
|
393
|
+
description: "The name of the Decorator to be generated in {Role}Auth format (e.g.,\nAdminAuth, UserAuth). This decorator will be used as a parameter\ndecorator in Controller methods to automatically authenticate and\nauthorize users for the specific role, injecting the authenticated user\npayload as a method parameter.\n\nDO: Use PascalCase naming convention.\n\n\n@pattern ^[A-Z][a-zA-Z0-9]*$",
|
|
388
394
|
type: "string"
|
|
389
395
|
},
|
|
390
396
|
content: {
|
|
@@ -401,7 +407,7 @@ const collection = {
|
|
|
401
407
|
type: "object",
|
|
402
408
|
properties: {
|
|
403
409
|
name: {
|
|
404
|
-
description: "The name of the Payload type to be generated in {Role}Payload format\n(e.g., AdminPayload, UserPayload). This type defines the structure of the\nauthenticated user data that will be injected into Controller methods\nwhen using the decorator.\n\
|
|
410
|
+
description: "The name of the Payload type to be generated in {Role}Payload format\n(e.g., AdminPayload, UserPayload). This type defines the structure of the\nauthenticated user data that will be injected into Controller methods\nwhen using the decorator.\n\nDO: Use PascalCase naming convention.\n\n\n@pattern ^[A-Z][a-zA-Z0-9]*$",
|
|
405
411
|
type: "string"
|
|
406
412
|
},
|
|
407
413
|
content: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateRealizeAuthorization.js","sourceRoot":"","sources":["../../../../../src/orchestrate/realize/orchestrateRealizeAuthorization.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"orchestrateRealizeAuthorization.js","sourceRoot":"","sources":["../../../../../src/orchestrate/realize/orchestrateRealizeAuthorization.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,0EAqCC;;AAvDD,kDAA0B;AAC1B,+BAA0B;AAG1B,uEAAoE;AACpE,uEAAoE;AACpE,6FAAmG;AACnG,qGAAkG;AAElG,6EAA0E;AAC1E,mEAAgE;AAEhE;;;;;GAKG;AACH,SAAsB,+BAA+B,CAEnD,GAAyB;;;QACzB,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,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,CACpD,KAAK,CAAC,KAAK,CACwD,CAAC;IAEtE,OAAO;QACL,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,kBAAkB;QACxB,WAAW;QACX,OAAO,EAAE;YACP,eAAe,EAAE,CAAC,IAAI,EAAE,EAAE;gBACxB,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACpB,CAAC;SAC+C;KACnD,CAAC;AACJ,CAAC;AAED,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGT,CAAC;AACJ,MAAM,UAAU,GAAG;IACjB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAGJ;IACH,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;CACd,CAAC"}
|
|
@@ -48,6 +48,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
48
48
|
exports.orchestrateRealizeAuthorizationCorrect = orchestrateRealizeAuthorizationCorrect;
|
|
49
49
|
const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
|
|
50
50
|
const typia_1 = __importDefault(require("typia"));
|
|
51
|
+
const uuid_1 = require("uuid");
|
|
51
52
|
const assertSchemaModel_1 = require("../../context/assertSchemaModel");
|
|
52
53
|
const transformRealizeAuthorizationCorrectHistories_1 = require("./histories/transformRealizeAuthorizationCorrectHistories");
|
|
53
54
|
const AuthorizationFileSystem_1 = require("./utils/AuthorizationFileSystem");
|
|
@@ -65,6 +66,7 @@ function orchestrateRealizeAuthorizationCorrect(ctx_1, authorization_1, prismaCl
|
|
|
65
66
|
});
|
|
66
67
|
ctx.dispatch({
|
|
67
68
|
type: "realizeAuthorizationValidate",
|
|
69
|
+
id: (0, uuid_1.v7)(),
|
|
68
70
|
created_at: new Date().toISOString(),
|
|
69
71
|
authorization: authorization,
|
|
70
72
|
result: compiled,
|
|
@@ -98,7 +100,7 @@ function orchestrateRealizeAuthorizationCorrect(ctx_1, authorization_1, prismaCl
|
|
|
98
100
|
location: AuthorizationFileSystem_1.AuthorizationFileSystem.payloadPath(pointer.value.payload.name),
|
|
99
101
|
content: yield compiler.typescript.beautify(pointer.value.payload.content),
|
|
100
102
|
}, role: authorization.role });
|
|
101
|
-
ctx.dispatch(Object.assign(Object.assign({}, pointer.value), { type: "realizeAuthorizationCorrect", created_at: new Date().toISOString(), authorization: result, result: compiled, tokenUsage, step: (_d = (_c = ctx.state().test) === null || _c === void 0 ? void 0 : _c.step) !== null && _d !== void 0 ? _d : 0 }));
|
|
103
|
+
ctx.dispatch(Object.assign(Object.assign({}, pointer.value), { type: "realizeAuthorizationCorrect", id: (0, uuid_1.v7)(), created_at: new Date().toISOString(), authorization: result, result: compiled, tokenUsage, step: (_d = (_c = ctx.state().test) === null || _c === void 0 ? void 0 : _c.step) !== null && _d !== void 0 ? _d : 0 }));
|
|
102
104
|
return yield orchestrateRealizeAuthorizationCorrect(ctx, result, prismaClients, templateFiles, life - 1);
|
|
103
105
|
});
|
|
104
106
|
}
|
|
@@ -163,7 +165,7 @@ const claude = {
|
|
|
163
165
|
type: "object",
|
|
164
166
|
properties: {
|
|
165
167
|
name: {
|
|
166
|
-
description: "The name of the authentication Provider function in {role}Authorize\nformat (e.g., adminAuthorize, userAuthorize). This function will be\ncalled by the decorator to verify JWT tokens and return authenticated\nuser information for the specified role.\n\
|
|
168
|
+
description: "The name of the authentication Provider function in {role}Authorize\nformat (e.g., adminAuthorize, userAuthorize). This function will be\ncalled by the decorator to verify JWT tokens and return authenticated\nuser information for the specified role.\n\nDO: Use camelCase naming convention.",
|
|
167
169
|
type: "string",
|
|
168
170
|
pattern: "^[a-z][a-zA-Z0-9]*$"
|
|
169
171
|
},
|
|
@@ -181,7 +183,7 @@ const claude = {
|
|
|
181
183
|
type: "object",
|
|
182
184
|
properties: {
|
|
183
185
|
name: {
|
|
184
|
-
description: "The name of the Decorator to be generated in {Role}Auth format (e.g.,\nAdminAuth, UserAuth). This decorator will be used as a parameter\ndecorator in Controller methods to automatically authenticate and\nauthorize users for the specific role, injecting the authenticated user\npayload as a method parameter.\n\
|
|
186
|
+
description: "The name of the Decorator to be generated in {Role}Auth format (e.g.,\nAdminAuth, UserAuth). This decorator will be used as a parameter\ndecorator in Controller methods to automatically authenticate and\nauthorize users for the specific role, injecting the authenticated user\npayload as a method parameter.\n\nDO: Use PascalCase naming convention.",
|
|
185
187
|
type: "string",
|
|
186
188
|
pattern: "^[A-Z][a-zA-Z0-9]*$"
|
|
187
189
|
},
|
|
@@ -199,7 +201,7 @@ const claude = {
|
|
|
199
201
|
type: "object",
|
|
200
202
|
properties: {
|
|
201
203
|
name: {
|
|
202
|
-
description: "The name of the Payload type to be generated in {Role}Payload format\n(e.g., AdminPayload, UserPayload). This type defines the structure of the\nauthenticated user data that will be injected into Controller methods\nwhen using the decorator.\n\
|
|
204
|
+
description: "The name of the Payload type to be generated in {Role}Payload format\n(e.g., AdminPayload, UserPayload). This type defines the structure of the\nauthenticated user data that will be injected into Controller methods\nwhen using the decorator.\n\nDO: Use PascalCase naming convention.",
|
|
203
205
|
type: "string",
|
|
204
206
|
pattern: "^[A-Z][a-zA-Z0-9]*$"
|
|
205
207
|
},
|
|
@@ -360,7 +362,7 @@ const collection = {
|
|
|
360
362
|
type: "object",
|
|
361
363
|
properties: {
|
|
362
364
|
name: {
|
|
363
|
-
description: "The name of the authentication Provider function in {role}Authorize\nformat (e.g., adminAuthorize, userAuthorize). This function will be\ncalled by the decorator to verify JWT tokens and return authenticated\nuser information for the specified role.\n\
|
|
365
|
+
description: "The name of the authentication Provider function in {role}Authorize\nformat (e.g., adminAuthorize, userAuthorize). This function will be\ncalled by the decorator to verify JWT tokens and return authenticated\nuser information for the specified role.\n\nDO: Use camelCase naming convention.\n\n\n@pattern ^[a-z][a-zA-Z0-9]*$",
|
|
364
366
|
type: "string"
|
|
365
367
|
},
|
|
366
368
|
content: {
|
|
@@ -377,7 +379,7 @@ const collection = {
|
|
|
377
379
|
type: "object",
|
|
378
380
|
properties: {
|
|
379
381
|
name: {
|
|
380
|
-
description: "The name of the Decorator to be generated in {Role}Auth format (e.g.,\nAdminAuth, UserAuth). This decorator will be used as a parameter\ndecorator in Controller methods to automatically authenticate and\nauthorize users for the specific role, injecting the authenticated user\npayload as a method parameter.\n\
|
|
382
|
+
description: "The name of the Decorator to be generated in {Role}Auth format (e.g.,\nAdminAuth, UserAuth). This decorator will be used as a parameter\ndecorator in Controller methods to automatically authenticate and\nauthorize users for the specific role, injecting the authenticated user\npayload as a method parameter.\n\nDO: Use PascalCase naming convention.\n\n\n@pattern ^[A-Z][a-zA-Z0-9]*$",
|
|
381
383
|
type: "string"
|
|
382
384
|
},
|
|
383
385
|
content: {
|
|
@@ -394,7 +396,7 @@ const collection = {
|
|
|
394
396
|
type: "object",
|
|
395
397
|
properties: {
|
|
396
398
|
name: {
|
|
397
|
-
description: "The name of the Payload type to be generated in {Role}Payload format\n(e.g., AdminPayload, UserPayload). This type defines the structure of the\nauthenticated user data that will be injected into Controller methods\nwhen using the decorator.\n\
|
|
399
|
+
description: "The name of the Payload type to be generated in {Role}Payload format\n(e.g., AdminPayload, UserPayload). This type defines the structure of the\nauthenticated user data that will be injected into Controller methods\nwhen using the decorator.\n\nDO: Use PascalCase naming convention.\n\n\n@pattern ^[A-Z][a-zA-Z0-9]*$",
|
|
398
400
|
type: "string"
|
|
399
401
|
},
|
|
400
402
|
content: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrateRealizeAuthorizationCorrect.js","sourceRoot":"","sources":["../../../../../src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"orchestrateRealizeAuthorizationCorrect.js","sourceRoot":"","sources":["../../../../../src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,wFAwHC;;AAlID,kDAA0B;AAC1B,+BAA0B;AAG1B,uEAAoE;AACpE,6HAA0H;AAE1H,6EAA0E;AAC1E,6GAA0G;AAE1G,SAAsB,sCAAsC;yDAG1D,GAAyB,EACzB,aAAyC,EACzC,aAAqC,EACrC,aAAqC,EACrC,OAAe,CAAC;;QAEhB,MAAM,QAAQ,GAAoB,MAAM,GAAG,CAAC,QAAQ,EAAE,CAAC;QACvD,MAAM,eAAe,GAAW,MAAM,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAChE,iFAAuC,CAAC,qBAAqB,CAC3D,aAAa,CAAC,IAAI,CAAC,IAAI,EACvB,aAAa,CAAC,QAAQ,CAAC,OAAO,CAC/B,CACF,CAAC;QACF,MAAM,gBAAgB,GAAW,MAAM,QAAQ,CAAC,UAAU,CAAC,QAAQ,CACjE,iFAAuC,CAAC,sBAAsB,CAC5D,aAAa,CAAC,IAAI,CAAC,IAAI,EACvB,aAAa,CAAC,SAAS,CAAC,OAAO,CAChC,CACF,CAAC;QAEF,gBAAgB;QAChB,MAAM,KAAK,iDACN,aAAa,GACb,aAAa,KAChB,CAAC,iDAAuB,CAAC,aAAa,CAAC,aAAa,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,EACnE,gBAAgB,EAClB,CAAC,iDAAuB,CAAC,YAAY,CAAC,aAAa,CAAC,QAAQ,CAAC,IA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AC;IACJ,CAAC;CAAA;AAED,SAAS,gBAAgB,CAAiC,KAGzD;IACC,IAAA,qCAAiB,EAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAE/B,MAAM,WAAW,GAA2B,UAAU,CACpD,KAAK,CAAC,KAAK,CACwD,CAAC;IACtE,OAAO;QACL,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,uBAAuB;QAC7B,WAAW;QACX,OAAO,EAAE;YACP,gBAAgB,EAAE,CAAC,IAAI,EAAE,EAAE;gBACzB,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACpB,CAAC;SACsD;KAC1D,CAAC;AACJ,CAAC;AAED,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGT,CAAC;AACJ,MAAM,UAAU,GAAG;IACjB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAGJ;IACH,MAAM;IACN,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;CACd,CAAC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { AutoBeRealizeAuthorization, AutoBeRealizeCorrectEvent, IAutoBeTypeScriptCompileResult } from "@autobe/interface";
|
|
1
|
+
import { AutoBeProgressEventBase, AutoBeRealizeAuthorization, AutoBeRealizeCorrectEvent, IAutoBeTypeScriptCompileResult } from "@autobe/interface";
|
|
2
2
|
import { ILlmSchema } from "@samchon/openapi";
|
|
3
3
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
4
4
|
import { IAutoBeRealizeScenarioApplication } from "./structures/IAutoBeRealizeScenarioApplication";
|
|
5
|
-
export declare function orchestrateRealizeCorrect<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
export declare function orchestrateRealizeCorrect<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>, props: {
|
|
6
|
+
authorization: AutoBeRealizeAuthorization | null;
|
|
7
|
+
totalAuthorizations: AutoBeRealizeAuthorization[];
|
|
8
|
+
scenario: IAutoBeRealizeScenarioApplication.IProps;
|
|
9
|
+
code: string;
|
|
10
|
+
diagnostic: IAutoBeTypeScriptCompileResult.IDiagnostic;
|
|
11
|
+
progress: AutoBeProgressEventBase;
|
|
12
|
+
}): Promise<AutoBeRealizeCorrectEvent>;
|