@autobe/agent 0.17.1 → 0.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AutoBeMockAgent.d.ts +2 -10
- package/lib/agent/src/AutoBeAgent.d.ts +52 -0
- package/lib/{AutoBeAgent.js → agent/src/AutoBeAgent.js} +34 -1
- package/lib/agent/src/AutoBeAgent.js.map +1 -0
- package/lib/agent/src/AutoBeAgentBase.d.ts +18 -0
- package/lib/agent/src/AutoBeAgentBase.js.map +1 -0
- package/lib/agent/src/AutoBeMockAgent.d.ts +7 -0
- package/lib/{AutoBeMockAgent.js → agent/src/AutoBeMockAgent.js} +40 -5
- package/lib/agent/src/AutoBeMockAgent.js.map +1 -0
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +28 -0
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +1 -0
- package/lib/agent/src/context/AutoBeContext.d.ts +41 -0
- package/lib/agent/src/context/AutoBeContext.js.map +1 -0
- package/lib/agent/src/context/AutoBeState.d.ts +8 -0
- package/lib/agent/src/context/AutoBeState.js.map +1 -0
- package/lib/agent/src/context/AutoBeTokenUsage.d.ts +173 -0
- package/lib/{context → agent/src/context}/AutoBeTokenUsage.js +7 -0
- package/lib/agent/src/context/AutoBeTokenUsage.js.map +1 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.d.ts +117 -0
- package/lib/{context → agent/src/context}/AutoBeTokenUsageComponent.js +33 -2
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js.map +1 -0
- package/lib/agent/src/context/IAutoBeApplication.d.ts +107 -0
- package/lib/agent/src/context/IAutoBeApplication.js.map +1 -0
- package/lib/agent/src/context/IAutoBeApplicationProps.d.ts +4 -0
- package/lib/agent/src/context/IAutoBeApplicationProps.js.map +1 -0
- package/lib/agent/src/context/IAutoBeApplicationResult.d.ts +4 -0
- package/lib/agent/src/context/IAutoBeApplicationResult.js.map +1 -0
- package/lib/agent/src/context/assertSchemaModel.d.ts +2 -0
- package/lib/agent/src/context/assertSchemaModel.js.map +1 -0
- package/lib/agent/src/factory/consentFunctionCall.d.ts +10 -0
- package/lib/agent/src/factory/consentFunctionCall.js +212 -0
- package/lib/agent/src/factory/consentFunctionCall.js.map +1 -0
- package/lib/agent/src/factory/createAgenticaHistory.d.ts +7 -0
- package/lib/{factory → agent/src/factory}/createAgenticaHistory.js +1 -0
- package/lib/agent/src/factory/createAgenticaHistory.js.map +1 -0
- package/lib/agent/src/factory/createAutoBeApplication.d.ts +7 -0
- package/lib/agent/src/factory/createAutoBeApplication.js.map +1 -0
- package/lib/agent/src/factory/createAutoBeContext.d.ts +19 -0
- package/lib/agent/src/factory/createAutoBeContext.js +271 -0
- package/lib/agent/src/factory/createAutoBeContext.js.map +1 -0
- package/lib/agent/src/factory/createAutoBeState.d.ts +3 -0
- package/lib/agent/src/factory/createAutoBeState.js.map +1 -0
- package/lib/agent/src/factory/getAutoBeGenerated.d.ts +4 -0
- package/lib/{factory → agent/src/factory}/getAutoBeGenerated.js +3 -3
- package/lib/agent/src/factory/getAutoBeGenerated.js.map +1 -0
- package/lib/agent/src/factory/getAutoBeRealizeGenerated.d.ts +7 -0
- package/lib/agent/src/factory/getAutoBeRealizeGenerated.js.map +1 -0
- package/lib/agent/src/factory/index.d.ts +1 -0
- package/lib/agent/src/factory/index.js.map +1 -0
- package/lib/agent/src/index.d.ts +6 -0
- package/lib/agent/src/index.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +6 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js +46 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +30 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +6 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +61 -0
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.d.ts +5 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js +69 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +5 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +265 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.d.ts +4 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +714 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +8 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +244 -0
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +105 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +78 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.js +3 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +70 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.js +3 -0
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.d.ts +2 -0
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.js.map +1 -0
- package/lib/agent/src/orchestrate/index.d.ts +5 -0
- package/lib/agent/src/orchestrate/index.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.d.ts +3 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/histories/transformInterfaceAssetHistories.js +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +34 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +62 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +5 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +41 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +28 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +51 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.d.ts +5 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +35 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +28 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +59 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterface.js +34 -9
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +1731 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceComplement.js +42 -36
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceEndpoints.js +40 -41
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/interface/orchestrateInterfaceGroups.js +24 -38
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +1774 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +1328 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.d.ts +4 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js +561 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +7 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +473 -0
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.d.ts +47 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.js +3 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +93 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.d.ts +24 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +108 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +171 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +132 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +107 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +85 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/utils/OpenApiEndpointComparator.d.ts +6 -0
- package/lib/agent/src/orchestrate/interface/utils/OpenApiEndpointComparator.js.map +1 -0
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +7 -0
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js +35 -0
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +79 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +52 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.d.ts +8 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +59 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +48 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/prisma/orchestratePrisma.js +40 -14
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/prisma/orchestratePrismaComponent.js +43 -48
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/prisma/orchestratePrismaCorrect.js +154 -83
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.d.ts +5 -0
- package/lib/{orchestrate/prisma/orchestratePrismaSchemas.js → agent/src/orchestrate/prisma/orchestratePrismaReview.js} +180 -248
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.d.ts +5 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js +1662 -0
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.d.ts +121 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.d.ts +142 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.d.ts +105 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.js +3 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.d.ts +99 -0
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/ProviderCodeComparator.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/ProviderCodeComparator.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +40 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +80 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +14 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +32 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +278 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +14 -0
- package/lib/{orchestrate/realize/transformRealizeCoderHistories.js → agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js} +31 -92
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/internal/compile.d.ts +7 -0
- package/lib/agent/src/orchestrate/realize/internal/compile.js +44 -0
- package/lib/agent/src/orchestrate/realize/internal/compile.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +130 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.d.ts +10 -0
- package/lib/{orchestrate → agent/src/orchestrate}/realize/orchestrateRealizeAuthorization.js +84 -70
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/realize/orchestrateRealizeAuthorizationCorrect.js +66 -52
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +16 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +352 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -0
- package/lib/{orchestrate/realize/orchestrateRealizePlanner.d.ts → agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts} +5 -3
- package/lib/{orchestrate/realize/orchestrateRealizePlanner.js → agent/src/orchestrate/realize/orchestrateRealizeScenario.js} +14 -24
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +14 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +345 -0
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +92 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +27 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +79 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +38 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.js.map +1 -0
- package/lib/{orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts → agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts} +22 -88
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.js +3 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/AuthorizationFileSystem.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/utils/AuthorizationFileSystem.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.d.ts +5 -0
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.d.ts +4 -0
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/InternalFileSystem.d.ts +8 -0
- package/lib/agent/src/orchestrate/realize/utils/InternalFileSystem.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/ProviderFileSystem.d.ts +3 -0
- package/lib/agent/src/orchestrate/realize/utils/ProviderFileSystem.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.d.ts +4 -0
- package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/replaceImportStatements.js +6 -1
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.d.ts +2 -0
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/filterTestFileName.d.ts +1 -0
- package/lib/agent/src/orchestrate/test/compile/filterTestFileName.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.d.ts +3 -0
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -0
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +5 -0
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -0
- package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestCorrectHistories.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +34 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -0
- package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestHistories.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.d.ts +4 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +101 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -0
- package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestWriteHistories.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +179 -0
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/test/orchestrateTest.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/test/orchestrateTest.js +16 -4
- package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/test/orchestrateTestCorrect.js +31 -47
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +1 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.d.ts +4 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +961 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -0
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.d.ts +5 -0
- package/lib/{orchestrate → agent/src/orchestrate}/test/orchestrateTestWrite.js +53 -54
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +122 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunction.d.ts +8 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunction.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +134 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.d.ts +7 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.js +3 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +113 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteResult.d.ts +7 -0
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +1 -0
- package/lib/agent/src/structures/IAutoBeConfig.d.ts +73 -0
- package/lib/agent/src/structures/IAutoBeConfig.js.map +1 -0
- package/lib/agent/src/structures/IAutoBeProps.d.ts +109 -0
- package/lib/agent/src/structures/IAutoBeProps.js.map +1 -0
- package/lib/agent/src/structures/IAutoBeVendor.d.ts +87 -0
- package/lib/agent/src/structures/IAutoBeVendor.js.map +1 -0
- package/lib/agent/src/utils/arrayToRecord.d.ts +17 -0
- package/lib/agent/src/utils/arrayToRecord.js.map +1 -0
- package/lib/agent/src/utils/backoffRetry.d.ts +22 -0
- package/lib/agent/src/utils/backoffRetry.js.map +1 -0
- package/lib/agent/src/utils/divideArray.d.ts +4 -0
- package/lib/agent/src/utils/divideArray.js.map +1 -0
- package/lib/agent/src/utils/emplaceMap.d.ts +1 -0
- package/lib/agent/src/utils/emplaceMap.js.map +1 -0
- package/lib/agent/src/utils/predicateStateMessage.d.ts +4 -0
- package/lib/agent/src/utils/predicateStateMessage.js +87 -0
- package/lib/agent/src/utils/predicateStateMessage.js.map +1 -0
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +24 -28
- package/lib/context/AutoBeContext.d.ts +16 -5
- package/lib/context/AutoBeTokenUsageComponent.d.ts +1 -0
- package/lib/factory/consentFunctionCall.d.ts +10 -0
- package/lib/index.mjs +11323 -5336
- package/lib/index.mjs.map +1 -1
- package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.d.ts +153 -0
- package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.js +3 -0
- package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.js.map +1 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +6 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +4 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +6 -0
- package/lib/orchestrate/analyze/orchestrateAnalyze.d.ts +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +5 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.d.ts +4 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +6 -12
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +105 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +78 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +70 -0
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +4 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +2 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.d.ts +5 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.d.ts +2 -2
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +7 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.d.ts +47 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +38 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.d.ts +2 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +16 -16
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +64 -15
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +132 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +46 -14
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +85 -0
- package/lib/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +7 -0
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.d.ts +8 -0
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -2
- package/lib/orchestrate/prisma/orchestratePrismaReview.d.ts +5 -0
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.d.ts +1 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.d.ts +2 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.d.ts +105 -0
- package/lib/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.d.ts +43 -153
- package/lib/orchestrate/realize/histories/transformRealizeAuthorization.d.ts +5 -0
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.d.ts +5 -0
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +14 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +3 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +14 -0
- package/lib/orchestrate/realize/internal/compile.d.ts +7 -0
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +16 -0
- package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +91 -0
- package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +14 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +10 -3
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +79 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.d.ts +38 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +279 -0
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +4 -0
- package/lib/orchestrate/test/histories/transformTestHistories.d.ts +3 -0
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.d.ts +4 -0
- package/lib/orchestrate/test/histories/transformTestWriteHistories.d.ts +8 -0
- package/lib/orchestrate/test/orchestrateTestScenario.d.ts +2 -2
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +6 -5
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +25 -24
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +2 -1
- package/lib/utils/predicateStateMessage.d.ts +4 -0
- package/package.json +9 -9
- package/src/AutoBeAgent.ts +51 -3
- package/src/AutoBeMockAgent.ts +44 -16
- package/src/constants/AutoBeSystemPromptConstant.ts +24 -28
- package/src/context/AutoBeContext.ts +30 -4
- package/src/context/AutoBeTokenUsage.ts +8 -0
- package/src/context/AutoBeTokenUsageComponent.ts +40 -2
- package/src/factory/consentFunctionCall.ts +128 -0
- package/src/factory/createAgenticaHistory.ts +1 -0
- package/src/factory/createAutoBeApplication.ts +3 -11
- package/src/factory/createAutoBeContext.ts +149 -1
- package/src/factory/getAutoBeGenerated.ts +3 -3
- package/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.ts +60 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +34 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +78 -0
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +66 -80
- package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +89 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +99 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +53 -52
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +108 -0
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +85 -0
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.ts +71 -0
- package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +1 -0
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +40 -0
- package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +17 -0
- package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +45 -22
- package/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.ts +43 -0
- package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +69 -0
- package/src/orchestrate/interface/orchestrateInterface.ts +57 -10
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +209 -0
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +27 -44
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +28 -34
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +18 -48
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +216 -107
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +101 -0
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +180 -96
- package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +145 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.ts +49 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.ts +39 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.ts +2 -1
- package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +16 -16
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +67 -15
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +139 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +47 -14
- package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +92 -0
- package/src/orchestrate/interface/utils/validateAuthorizationSchema.ts +41 -0
- package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +9 -16
- package/src/orchestrate/prisma/histories/transformPrismaReviewHistories.ts +66 -0
- package/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.ts +2 -2
- package/src/orchestrate/prisma/orchestratePrisma.ts +55 -17
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +19 -49
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +96 -58
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +124 -0
- package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +133 -139
- package/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.ts +2 -1
- package/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.ts +108 -0
- package/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.ts +43 -156
- package/src/orchestrate/realize/histories/transformRealizeAuthorization.ts +48 -0
- package/src/orchestrate/realize/{transformRealizeAuthorizationCorrectHistories.ts → histories/transformRealizeAuthorizationCorrectHistories.ts} +28 -30
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +49 -0
- package/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.ts +285 -0
- package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +184 -0
- package/src/orchestrate/realize/internal/compile.ts +67 -0
- package/src/orchestrate/realize/orchestrateRealize.ts +125 -30
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +45 -57
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +19 -41
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +122 -0
- package/src/orchestrate/realize/{orchestrateRealizePlanner.ts → orchestrateRealizeScenario.ts} +15 -15
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +128 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +11 -3
- package/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.ts +81 -0
- package/src/orchestrate/realize/structures/IAutoBeRealizeScenarioApplication.ts +43 -0
- package/src/orchestrate/realize/structures/{IAutoBeRealizeCoderApplication.ts → IAutoBeRealizeWriteApplication.ts} +22 -95
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +10 -1
- package/src/orchestrate/test/experimental/orchestrateTestCorrect.ast +5 -9
- package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +23 -22
- package/src/orchestrate/test/{transformTestCorrectHistories.ts → histories/transformTestCorrectHistories.ts} +2 -2
- package/src/orchestrate/test/{transformTestHistories.ts → histories/transformTestHistories.ts} +1 -1
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +121 -0
- package/src/orchestrate/test/{transformTestWriteHistories.ts → histories/transformTestWriteHistories.ts} +3 -3
- package/src/orchestrate/test/orchestrateTest.ts +17 -6
- package/src/orchestrate/test/orchestrateTestCorrect.ts +32 -62
- package/src/orchestrate/test/orchestrateTestScenario.ts +241 -168
- package/src/orchestrate/test/orchestrateTestWrite.ts +48 -71
- package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +6 -5
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +25 -24
- package/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.ts +7 -0
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +3 -1
- package/src/utils/predicateStateMessage.ts +107 -0
- package/lib/AutoBeAgent.js.map +0 -1
- package/lib/AutoBeAgentBase.js.map +0 -1
- package/lib/AutoBeMockAgent.js.map +0 -1
- package/lib/constants/AutoBeSystemPromptConstant.js.map +0 -1
- package/lib/context/AutoBeContext.js.map +0 -1
- package/lib/context/AutoBeState.js.map +0 -1
- package/lib/context/AutoBeTokenUsage.js.map +0 -1
- package/lib/context/AutoBeTokenUsageComponent.js.map +0 -1
- package/lib/context/IAutoBeApplication.js.map +0 -1
- package/lib/context/IAutoBeApplicationProps.js.map +0 -1
- package/lib/context/IAutoBeApplicationResult.js.map +0 -1
- package/lib/context/assertSchemaModel.js.map +0 -1
- package/lib/factory/createAgenticaHistory.js.map +0 -1
- package/lib/factory/createAutoBeApplication.js.map +0 -1
- package/lib/factory/createAutoBeContext.js +0 -141
- package/lib/factory/createAutoBeContext.js.map +0 -1
- package/lib/factory/createAutoBeState.js.map +0 -1
- package/lib/factory/getAutoBeGenerated.js.map +0 -1
- package/lib/factory/getAutoBeRealizeGenerated.js.map +0 -1
- package/lib/factory/index.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.d.ts +0 -45
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js +0 -27
- package/lib/orchestrate/analyze/AutoBeAnalyzeFileSystem.js.map +0 -1
- package/lib/orchestrate/analyze/AutoBeAnalyzePointer.d.ts +0 -9
- package/lib/orchestrate/analyze/AutoBeAnalyzePointer.js +0 -3
- package/lib/orchestrate/analyze/AutoBeAnalyzePointer.js.map +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyze.js +0 -98
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.d.ts +0 -5
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js +0 -561
- package/lib/orchestrate/analyze/orchestrateAnalyzeComposer.js.map +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.d.ts +0 -12
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js +0 -395
- package/lib/orchestrate/analyze/orchestrateAnalyzeReviewer.js.map +0 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +0 -347
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +0 -1
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.d.ts +0 -68
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.js +0 -3
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.js.map +0 -1
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.d.ts +0 -5
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js +0 -27
- package/lib/orchestrate/analyze/transformAnalyzeReviewerHistories.js.map +0 -1
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.d.ts +0 -12
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js +0 -78
- package/lib/orchestrate/analyze/transformAnalyzeWriteHistories.js.map +0 -1
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.d.ts +0 -16
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js +0 -79
- package/lib/orchestrate/analyze/writeDocumentUntilReviewPassed.js.map +0 -1
- package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +0 -1
- package/lib/orchestrate/index.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +0 -62
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +0 -28
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +0 -28
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +0 -28
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +0 -28
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterface.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +0 -1643
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js +0 -411
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js.map +0 -1
- package/lib/orchestrate/interface/utils/OpenApiEndpointComparator.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +0 -85
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +0 -52
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaHistories.d.ts +0 -3
- package/lib/orchestrate/prisma/histories/transformPrismaHistories.js +0 -55
- package/lib/orchestrate/prisma/histories/transformPrismaHistories.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +0 -48
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrisma.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +0 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.js.map +0 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.js.map +0 -1
- package/lib/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.js.map +0 -1
- package/lib/orchestrate/realize/ProviderCodeComparator.js.map +0 -1
- package/lib/orchestrate/realize/RealizePipe.d.ts +0 -5
- package/lib/orchestrate/realize/RealizePipe.js +0 -14
- package/lib/orchestrate/realize/RealizePipe.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealize.js +0 -63
- package/lib/orchestrate/realize/orchestrateRealize.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizeCoder.d.ts +0 -26
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js +0 -420
- package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizePlanner.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js +0 -3
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +0 -56
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.js +0 -3
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +0 -2
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js +0 -5
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js.map +0 -1
- package/lib/orchestrate/realize/transformRealizeAuthorization.d.ts +0 -4
- package/lib/orchestrate/realize/transformRealizeAuthorization.js +0 -39
- package/lib/orchestrate/realize/transformRealizeAuthorization.js.map +0 -1
- package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.d.ts +0 -5
- package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.js +0 -80
- package/lib/orchestrate/realize/transformRealizeAuthorizationCorrectHistories.js.map +0 -1
- package/lib/orchestrate/realize/transformRealizeCoderHistories.d.ts +0 -7
- package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +0 -1
- package/lib/orchestrate/realize/utils/AuthorizationFileSystem.js.map +0 -1
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.js.map +0 -1
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js.map +0 -1
- package/lib/orchestrate/realize/utils/InternalFileSystem.js.map +0 -1
- package/lib/orchestrate/realize/utils/ProviderFileSystem.js.map +0 -1
- package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +0 -1
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.d.ts +0 -11
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js +0 -221
- package/lib/orchestrate/realize/writeCodeUntilCompilePassed.js.map +0 -1
- package/lib/orchestrate/test/compile/completeTestCode.js.map +0 -1
- package/lib/orchestrate/test/compile/filterTestFileName.js.map +0 -1
- package/lib/orchestrate/test/compile/getTestExternalDeclarations.js.map +0 -1
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +0 -1
- package/lib/orchestrate/test/orchestrateTest.js.map +0 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +0 -1
- package/lib/orchestrate/test/orchestrateTestScenario.js +0 -866
- package/lib/orchestrate/test/orchestrateTestScenario.js.map +0 -1
- package/lib/orchestrate/test/orchestrateTestWrite.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestFunction.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +0 -1
- package/lib/orchestrate/test/transformTestCorrectHistories.js +0 -34
- package/lib/orchestrate/test/transformTestCorrectHistories.js.map +0 -1
- package/lib/orchestrate/test/transformTestHistories.js.map +0 -1
- package/lib/orchestrate/test/transformTestScenarioHistories.d.ts +0 -3
- package/lib/orchestrate/test/transformTestScenarioHistories.js +0 -100
- package/lib/orchestrate/test/transformTestScenarioHistories.js.map +0 -1
- package/lib/orchestrate/test/transformTestWriteHistories.js +0 -178
- package/lib/orchestrate/test/transformTestWriteHistories.js.map +0 -1
- package/lib/structures/IAutoBeConfig.js.map +0 -1
- package/lib/structures/IAutoBeProps.js.map +0 -1
- package/lib/structures/IAutoBeVendor.js.map +0 -1
- package/lib/utils/arrayToRecord.js.map +0 -1
- package/lib/utils/backoffRetry.js.map +0 -1
- package/lib/utils/divideArray.js.map +0 -1
- package/lib/utils/emplaceMap.js.map +0 -1
- package/lib/utils/enforceToolCall.d.ts +0 -3
- package/lib/utils/enforceToolCall.js +0 -13
- package/lib/utils/enforceToolCall.js.map +0 -1
- package/lib/utils/forceRetry.d.ts +0 -1
- package/lib/utils/forceRetry.js +0 -26
- package/lib/utils/forceRetry.js.map +0 -1
- package/lib/utils/pipe.d.ts +0 -5
- package/lib/utils/pipe.js +0 -14
- package/lib/utils/pipe.js.map +0 -1
- package/src/orchestrate/analyze/AutoBeAnalyzeFileSystem.ts +0 -58
- package/src/orchestrate/analyze/AutoBeAnalyzePointer.ts +0 -10
- package/src/orchestrate/analyze/orchestrateAnalyzeComposer.ts +0 -112
- package/src/orchestrate/analyze/orchestrateAnalyzeReviewer.ts +0 -131
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeComposerApplication.ts +0 -75
- package/src/orchestrate/analyze/transformAnalyzeReviewerHistories.ts +0 -31
- package/src/orchestrate/analyze/transformAnalyzeWriteHistories.ts +0 -94
- package/src/orchestrate/analyze/writeDocumentUntilReviewPassed.ts +0 -96
- package/src/orchestrate/prisma/histories/transformPrismaHistories.ts +0 -59
- package/src/orchestrate/realize/RealizePipe.ts +0 -39
- package/src/orchestrate/realize/orchestrateRealizeCoder.ts +0 -182
- package/src/orchestrate/realize/structures/IAutoBeRealizeCompile.ts +0 -70
- package/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.ts +0 -2
- package/src/orchestrate/realize/transformRealizeAuthorization.ts +0 -44
- package/src/orchestrate/realize/transformRealizeCoderHistories.ts +0 -248
- package/src/orchestrate/realize/writeCodeUntilCompilePassed.ts +0 -308
- package/src/orchestrate/test/transformTestScenarioHistories.ts +0 -105
- package/src/utils/enforceToolCall.ts +0 -13
- package/src/utils/forceRetry.ts +0 -13
- package/src/utils/pipe.ts +0 -39
- /package/lib/{AutoBeAgentBase.js → agent/src/AutoBeAgentBase.js} +0 -0
- /package/lib/{constants → agent/src/constants}/AutoBeSystemPromptConstant.js +0 -0
- /package/lib/{context → agent/src/context}/AutoBeContext.js +0 -0
- /package/lib/{context → agent/src/context}/AutoBeState.js +0 -0
- /package/lib/{context → agent/src/context}/IAutoBeApplication.js +0 -0
- /package/lib/{context → agent/src/context}/IAutoBeApplicationProps.js +0 -0
- /package/lib/{context → agent/src/context}/IAutoBeApplicationResult.js +0 -0
- /package/lib/{context → agent/src/context}/assertSchemaModel.js +0 -0
- /package/lib/{factory → agent/src/factory}/createAutoBeApplication.js +0 -0
- /package/lib/{factory → agent/src/factory}/createAutoBeState.js +0 -0
- /package/lib/{factory → agent/src/factory}/getAutoBeRealizeGenerated.js +0 -0
- /package/lib/{factory → agent/src/factory}/index.js +0 -0
- /package/lib/{index.js → agent/src/index.js} +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/facade/transformFacadeStateMessage.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/index.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/histories/transformInterfacePrerequisiteHistories.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceComplementApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceEndpointApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceGroupApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceOperationApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/structures/IAutoBeInterfaceSchemaApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/interface/utils/OpenApiEndpointComparator.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/prisma/structures/IAutoBePrismaComponentApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/prisma/structures/IAutoBePrismaCorrectApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/prisma/structures/IAutoBePrismaSchemaApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/ProviderCodeComparator.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeAuthorizationApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/AuthorizationFileSystem.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/AutoBeRealizeAuthorizationFileSystem.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/InternalFileSystem.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/realize/utils/ProviderFileSystem.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/completeTestCode.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/filterTestFileName.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/getTestExternalDeclarations.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/compile/getTestScenarioArtifacts.js +0 -0
- /package/lib/{orchestrate/test → agent/src/orchestrate/test/histories}/transformTestHistories.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestCorrectApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestFunction.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestScenarioApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestScenarioArtifacts.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestWriteApplication.js +0 -0
- /package/lib/{orchestrate → agent/src/orchestrate}/test/structures/IAutoBeTestWriteResult.js +0 -0
- /package/lib/{structures → agent/src/structures}/IAutoBeConfig.js +0 -0
- /package/lib/{structures → agent/src/structures}/IAutoBeProps.js +0 -0
- /package/lib/{structures → agent/src/structures}/IAutoBeVendor.js +0 -0
- /package/lib/{utils → agent/src/utils}/arrayToRecord.js +0 -0
- /package/lib/{utils → agent/src/utils}/backoffRetry.js +0 -0
- /package/lib/{utils → agent/src/utils}/divideArray.js +0 -0
- /package/lib/{utils → agent/src/utils}/emplaceMap.js +0 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { IAgenticaController } from "@agentica/core";
|
|
2
|
+
import {
|
|
3
|
+
AutoBeAnalyzeRole,
|
|
4
|
+
AutoBeInterfaceAuthorization,
|
|
5
|
+
AutoBeOpenApi,
|
|
6
|
+
AutoBeProgressEventBase,
|
|
7
|
+
} from "@autobe/interface";
|
|
8
|
+
import { AutoBeInterfaceAuthorizationEvent } from "@autobe/interface/src/events/AutoBeInterfaceAuthorizationEvent";
|
|
9
|
+
import { StringUtil } from "@autobe/utils";
|
|
10
|
+
import { ILlmApplication, ILlmSchema, IValidation } from "@samchon/openapi";
|
|
11
|
+
import { IPointer } from "tstl";
|
|
12
|
+
import typia from "typia";
|
|
13
|
+
|
|
14
|
+
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
15
|
+
import { assertSchemaModel } from "../../context/assertSchemaModel";
|
|
16
|
+
import { transformInterfaceAuthorizationsHistories } from "./histories/transformInterfaceAuthorizationsHistories";
|
|
17
|
+
import { IAutoBeInterfaceAuthorizationsApplication } from "./structures/IAutoBeInterfaceAuthorizationsApplication";
|
|
18
|
+
|
|
19
|
+
export async function orchestrateInterfaceAuthorizations<
|
|
20
|
+
Model extends ILlmSchema.Model,
|
|
21
|
+
>(ctx: AutoBeContext<Model>): Promise<AutoBeInterfaceAuthorization[]> {
|
|
22
|
+
const roles: AutoBeAnalyzeRole[] = ctx.state().analyze?.roles ?? [];
|
|
23
|
+
const progress: AutoBeProgressEventBase = {
|
|
24
|
+
total: roles.length,
|
|
25
|
+
completed: 0,
|
|
26
|
+
};
|
|
27
|
+
const authorizations: AutoBeInterfaceAuthorization[] = await Promise.all(
|
|
28
|
+
roles.map(async (role) => {
|
|
29
|
+
const event: AutoBeInterfaceAuthorizationEvent = await process(
|
|
30
|
+
ctx,
|
|
31
|
+
role,
|
|
32
|
+
progress,
|
|
33
|
+
);
|
|
34
|
+
ctx.dispatch(event);
|
|
35
|
+
return {
|
|
36
|
+
role: role.name,
|
|
37
|
+
operations: event.operations,
|
|
38
|
+
};
|
|
39
|
+
}),
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
return authorizations;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
async function process<Model extends ILlmSchema.Model>(
|
|
46
|
+
ctx: AutoBeContext<Model>,
|
|
47
|
+
role: AutoBeAnalyzeRole,
|
|
48
|
+
progress: AutoBeProgressEventBase,
|
|
49
|
+
): Promise<AutoBeInterfaceAuthorizationEvent> {
|
|
50
|
+
const pointer: IPointer<IAutoBeInterfaceAuthorizationsApplication.IProps | null> =
|
|
51
|
+
{
|
|
52
|
+
value: null,
|
|
53
|
+
};
|
|
54
|
+
const { tokenUsage } = await ctx.conversate({
|
|
55
|
+
source: "interfaceAuthorization",
|
|
56
|
+
histories: transformInterfaceAuthorizationsHistories(ctx.state(), role),
|
|
57
|
+
controller: createController({
|
|
58
|
+
model: ctx.model,
|
|
59
|
+
role: role.name,
|
|
60
|
+
build: (next) => {
|
|
61
|
+
pointer.value = next;
|
|
62
|
+
},
|
|
63
|
+
}),
|
|
64
|
+
enforceFunctionCall: true,
|
|
65
|
+
message: "Create Authorization Operation for the given roles",
|
|
66
|
+
});
|
|
67
|
+
if (pointer.value === null)
|
|
68
|
+
throw new Error("Failed to generate authorization operation.");
|
|
69
|
+
|
|
70
|
+
return {
|
|
71
|
+
type: "interfaceAuthorization",
|
|
72
|
+
operations: pointer.value.operations,
|
|
73
|
+
completed: ++progress.completed,
|
|
74
|
+
tokenUsage,
|
|
75
|
+
created_at: new Date().toISOString(),
|
|
76
|
+
step: ctx.state().analyze?.step ?? 0,
|
|
77
|
+
total: progress.total,
|
|
78
|
+
} satisfies AutoBeInterfaceAuthorizationEvent;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function createController<Model extends ILlmSchema.Model>(props: {
|
|
82
|
+
model: Model;
|
|
83
|
+
role: string;
|
|
84
|
+
build: (next: IAutoBeInterfaceAuthorizationsApplication.IProps) => void;
|
|
85
|
+
}): IAgenticaController.IClass<Model> {
|
|
86
|
+
assertSchemaModel(props.model);
|
|
87
|
+
|
|
88
|
+
const validate = (
|
|
89
|
+
next: unknown,
|
|
90
|
+
): IValidation<IAutoBeInterfaceAuthorizationsApplication.IProps> => {
|
|
91
|
+
const result: IValidation<IAutoBeInterfaceAuthorizationsApplication.IProps> =
|
|
92
|
+
typia.validate<IAutoBeInterfaceAuthorizationsApplication.IProps>(next);
|
|
93
|
+
if (result.success === false) return result;
|
|
94
|
+
|
|
95
|
+
const errors: IValidation.IError[] = [];
|
|
96
|
+
result.data.operations.forEach((op, i) => {
|
|
97
|
+
// validate authorizationRole
|
|
98
|
+
if (op.authorizationRole !== null) {
|
|
99
|
+
op.authorizationRole = props.role;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// validate responseBody.typeName -> must be ~.IAuthorized
|
|
103
|
+
if (op.authorizationType === null) return;
|
|
104
|
+
else if (op.responseBody === null)
|
|
105
|
+
errors.push({
|
|
106
|
+
path: `$input.operations.${i}.responseBody`,
|
|
107
|
+
expected:
|
|
108
|
+
"Response body with I{RoleName(PascalCase)}.IAuthorized type is required",
|
|
109
|
+
value: op.responseBody,
|
|
110
|
+
description: [
|
|
111
|
+
"Response body is required for authentication operations.",
|
|
112
|
+
"",
|
|
113
|
+
"The responseBody must contain description and typeName fields.",
|
|
114
|
+
"typeName must be I{Prefix(PascalCase)}{RoleName(PascalCase)}.IAuthorized",
|
|
115
|
+
"description must be a detailed description of the response body.",
|
|
116
|
+
].join("\n"),
|
|
117
|
+
});
|
|
118
|
+
else if (!op.responseBody.typeName.endsWith(".IAuthorized"))
|
|
119
|
+
errors.push({
|
|
120
|
+
path: `$input.operations.${i}.responseBody.typeName`,
|
|
121
|
+
expected: `Type name must be I{RoleName(PascalCase)}.IAuthorized`,
|
|
122
|
+
value: op.responseBody?.typeName,
|
|
123
|
+
description: [
|
|
124
|
+
`Wrong response body type name: ${op.responseBody?.typeName}`,
|
|
125
|
+
"",
|
|
126
|
+
`For authentication operations (login, join, refresh), the response body type name must follow the convention "I{RoleName}.IAuthorized".`,
|
|
127
|
+
``,
|
|
128
|
+
`This standardized naming convention ensures consistency across all authentication endpoints and clearly identifies authorization response types.`,
|
|
129
|
+
`The Role name should be in PascalCase format (e.g., IUser.IAuthorized, IAdmin.IAuthorized, ISeller.IAuthorized).`,
|
|
130
|
+
].join("\n"),
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
// validate authorization types' existence
|
|
135
|
+
type AuthorizationType = NonNullable<
|
|
136
|
+
AutoBeOpenApi.IOperation["authorizationType"]
|
|
137
|
+
>;
|
|
138
|
+
const authorizationTypes: Set<AuthorizationType> = new Set(
|
|
139
|
+
result.data.operations
|
|
140
|
+
.map((o) => o.authorizationType)
|
|
141
|
+
.filter((v) => v !== null),
|
|
142
|
+
);
|
|
143
|
+
for (const type of typia.misc.literals<AuthorizationType>())
|
|
144
|
+
if (authorizationTypes.has(type) === false)
|
|
145
|
+
errors.push({
|
|
146
|
+
path: "$input.operations[].authorizationType",
|
|
147
|
+
expected: StringUtil.trim`{
|
|
148
|
+
...(AutoBeOpenApi.IOperation data),
|
|
149
|
+
authorizationType: "${type}"
|
|
150
|
+
}`,
|
|
151
|
+
value: `No authorizationType "${type}" found in any operation`,
|
|
152
|
+
description: StringUtil.trim`
|
|
153
|
+
There must be an operation that has defined AutoBeOpenApi.IOperation.authorizationType := "${type}"
|
|
154
|
+
for the "${props.role}" role's authorization activity; "${type}".
|
|
155
|
+
|
|
156
|
+
However, none of the operations have the AutoBeOpenApi.IOperation.authorizationType := "${type}"
|
|
157
|
+
value, so that the "${props.role}" cannot perform the authorization ${type} activity.
|
|
158
|
+
|
|
159
|
+
Please make that operation at the next function calling. You have to do it.
|
|
160
|
+
`,
|
|
161
|
+
});
|
|
162
|
+
if (errors.length !== 0) {
|
|
163
|
+
return {
|
|
164
|
+
success: false,
|
|
165
|
+
errors,
|
|
166
|
+
data: next,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
return result;
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
const application: ILlmApplication<Model> = collection[
|
|
173
|
+
props.model === "chatgpt" ? "chatgpt" : "claude"
|
|
174
|
+
](
|
|
175
|
+
validate,
|
|
176
|
+
) satisfies ILlmApplication<any> as unknown as ILlmApplication<Model>;
|
|
177
|
+
|
|
178
|
+
return {
|
|
179
|
+
protocol: "class",
|
|
180
|
+
name: "Create Authorization Interface",
|
|
181
|
+
application,
|
|
182
|
+
execute: {
|
|
183
|
+
makeOperations: (next) => {
|
|
184
|
+
props.build(next);
|
|
185
|
+
},
|
|
186
|
+
} satisfies IAutoBeInterfaceAuthorizationsApplication,
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const collection = {
|
|
191
|
+
chatgpt: (validate: Validator) =>
|
|
192
|
+
typia.llm.application<IAutoBeInterfaceAuthorizationsApplication, "chatgpt">(
|
|
193
|
+
{
|
|
194
|
+
validate: {
|
|
195
|
+
makeOperations: validate,
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
),
|
|
199
|
+
claude: (validate: Validator) =>
|
|
200
|
+
typia.llm.application<IAutoBeInterfaceAuthorizationsApplication, "claude">({
|
|
201
|
+
validate: {
|
|
202
|
+
makeOperations: validate,
|
|
203
|
+
},
|
|
204
|
+
}),
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
type Validator = (
|
|
208
|
+
input: unknown,
|
|
209
|
+
) => IValidation<IAutoBeInterfaceAuthorizationsApplication.IProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IAgenticaController
|
|
1
|
+
import { IAgenticaController } from "@agentica/core";
|
|
2
2
|
import { AutoBeOpenApi } from "@autobe/interface";
|
|
3
3
|
import {
|
|
4
4
|
ILlmApplication,
|
|
@@ -11,8 +11,6 @@ import typia from "typia";
|
|
|
11
11
|
|
|
12
12
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
13
13
|
import { assertSchemaModel } from "../../context/assertSchemaModel";
|
|
14
|
-
import { enforceToolCall } from "../../utils/enforceToolCall";
|
|
15
|
-
import { forceRetry } from "../../utils/forceRetry";
|
|
16
14
|
import { transformInterfaceComplementHistories } from "./histories/transformInterfaceComplementHistories";
|
|
17
15
|
import { IAutoBeInterfaceComplementApplication } from "./structures/IAutoBeInterfaceComplementApplication";
|
|
18
16
|
|
|
@@ -21,7 +19,7 @@ export function orchestrateInterfaceComplement<Model extends ILlmSchema.Model>(
|
|
|
21
19
|
document: AutoBeOpenApi.IDocument,
|
|
22
20
|
life: number = 8,
|
|
23
21
|
): Promise<Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>> {
|
|
24
|
-
return
|
|
22
|
+
return step(ctx, document, life);
|
|
25
23
|
}
|
|
26
24
|
|
|
27
25
|
async function step<Model extends ILlmSchema.Model>(
|
|
@@ -40,54 +38,41 @@ async function step<Model extends ILlmSchema.Model>(
|
|
|
40
38
|
> | null> = {
|
|
41
39
|
value: null,
|
|
42
40
|
};
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
vendor: ctx.vendor,
|
|
46
|
-
config: {
|
|
47
|
-
...(ctx.config ?? {}),
|
|
48
|
-
executor: {
|
|
49
|
-
describe: null,
|
|
50
|
-
},
|
|
51
|
-
},
|
|
41
|
+
const { tokenUsage } = await ctx.conversate({
|
|
42
|
+
source: "interfaceComplement",
|
|
52
43
|
histories: transformInterfaceComplementHistories(
|
|
53
44
|
ctx.state(),
|
|
54
45
|
document,
|
|
55
46
|
missed,
|
|
56
47
|
),
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
});
|
|
75
|
-
enforceToolCall(agentica);
|
|
76
|
-
|
|
77
|
-
await agentica.conversate("Fill missing schema types please").finally(() => {
|
|
78
|
-
const tokenUsage = agentica.getTokenUsage().aggregate;
|
|
79
|
-
ctx.usage().record(tokenUsage, ["interface"]);
|
|
48
|
+
controller: createController({
|
|
49
|
+
model: ctx.model,
|
|
50
|
+
build: (next) => {
|
|
51
|
+
pointer.value ??= {};
|
|
52
|
+
Object.assign(
|
|
53
|
+
pointer.value,
|
|
54
|
+
(OpenApiV3_1Emender.convertComponents({
|
|
55
|
+
schemas: next,
|
|
56
|
+
}).schemas ?? {}) as Record<
|
|
57
|
+
string,
|
|
58
|
+
AutoBeOpenApi.IJsonSchemaDescriptive
|
|
59
|
+
>,
|
|
60
|
+
);
|
|
61
|
+
},
|
|
62
|
+
}),
|
|
63
|
+
enforceFunctionCall: true,
|
|
64
|
+
message: "Fill missing schema types please",
|
|
80
65
|
});
|
|
81
|
-
if (pointer.value === null)
|
|
66
|
+
if (pointer.value === null)
|
|
82
67
|
// unreachable
|
|
83
68
|
throw new Error(
|
|
84
69
|
"Failed to fill missing schema types. No response from agentica.",
|
|
85
70
|
);
|
|
86
|
-
}
|
|
87
71
|
ctx.dispatch({
|
|
88
72
|
type: "interfaceComplement",
|
|
89
73
|
missed,
|
|
90
74
|
schemas: pointer.value,
|
|
75
|
+
tokenUsage,
|
|
91
76
|
step: ctx.state().analyze?.step ?? 0,
|
|
92
77
|
created_at: new Date().toISOString(),
|
|
93
78
|
});
|
|
@@ -130,7 +115,7 @@ const getMissed = (document: AutoBeOpenApi.IDocument): string[] => {
|
|
|
130
115
|
return Array.from(missed);
|
|
131
116
|
};
|
|
132
117
|
|
|
133
|
-
function
|
|
118
|
+
function createController<Model extends ILlmSchema.Model>(props: {
|
|
134
119
|
model: Model;
|
|
135
120
|
build: (
|
|
136
121
|
schemas: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>,
|
|
@@ -139,7 +124,7 @@ function createApplication<Model extends ILlmSchema.Model>(props: {
|
|
|
139
124
|
assertSchemaModel(props.model);
|
|
140
125
|
const application: ILlmApplication<Model> = collection[
|
|
141
126
|
props.model
|
|
142
|
-
] as unknown as ILlmApplication<Model>;
|
|
127
|
+
] satisfies ILlmApplication<any> as unknown as ILlmApplication<Model>;
|
|
143
128
|
return {
|
|
144
129
|
protocol: "class",
|
|
145
130
|
name: "interface",
|
|
@@ -154,14 +139,12 @@ function createApplication<Model extends ILlmSchema.Model>(props: {
|
|
|
154
139
|
|
|
155
140
|
const claude = typia.llm.application<
|
|
156
141
|
IAutoBeInterfaceComplementApplication,
|
|
157
|
-
"claude"
|
|
158
|
-
{ reference: true }
|
|
142
|
+
"claude"
|
|
159
143
|
>();
|
|
160
144
|
const collection = {
|
|
161
145
|
chatgpt: typia.llm.application<
|
|
162
146
|
IAutoBeInterfaceComplementApplication,
|
|
163
|
-
"chatgpt"
|
|
164
|
-
{ reference: true }
|
|
147
|
+
"chatgpt"
|
|
165
148
|
>(),
|
|
166
149
|
claude,
|
|
167
150
|
llama: claude,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IAgenticaController
|
|
1
|
+
import { IAgenticaController } from "@agentica/core";
|
|
2
2
|
import {
|
|
3
3
|
AutoBeInterfaceEndpointsEvent,
|
|
4
4
|
AutoBeOpenApi,
|
|
@@ -10,7 +10,6 @@ import typia from "typia";
|
|
|
10
10
|
|
|
11
11
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
12
12
|
import { assertSchemaModel } from "../../context/assertSchemaModel";
|
|
13
|
-
import { enforceToolCall } from "../../utils/enforceToolCall";
|
|
14
13
|
import { transformInterfaceEndpointHistories } from "./histories/transformInterfaceEndpointHistories";
|
|
15
14
|
import { IAutoBeInterfaceEndpointApplication } from "./structures/IAutoBeInterfaceEndpointApplication";
|
|
16
15
|
import { OpenApiEndpointComparator } from "./utils/OpenApiEndpointComparator";
|
|
@@ -20,6 +19,7 @@ export async function orchestrateInterfaceEndpoints<
|
|
|
20
19
|
>(
|
|
21
20
|
ctx: AutoBeContext<Model>,
|
|
22
21
|
groups: AutoBeInterfaceGroup[],
|
|
22
|
+
authorizations: AutoBeOpenApi.IOperation[],
|
|
23
23
|
content: string = `Make endpoints for the given assets`,
|
|
24
24
|
): Promise<AutoBeOpenApi.IEndpoint[]> {
|
|
25
25
|
const progress: IProgress = {
|
|
@@ -27,7 +27,9 @@ export async function orchestrateInterfaceEndpoints<
|
|
|
27
27
|
completed: 0,
|
|
28
28
|
};
|
|
29
29
|
const endpoints: AutoBeOpenApi.IEndpoint[] = (
|
|
30
|
-
await Promise.all(
|
|
30
|
+
await Promise.all(
|
|
31
|
+
groups.map((g) => process(ctx, g, content, progress, authorizations)),
|
|
32
|
+
)
|
|
31
33
|
).flat();
|
|
32
34
|
return new HashSet(
|
|
33
35
|
endpoints,
|
|
@@ -39,40 +41,33 @@ export async function orchestrateInterfaceEndpoints<
|
|
|
39
41
|
async function process<Model extends ILlmSchema.Model>(
|
|
40
42
|
ctx: AutoBeContext<Model>,
|
|
41
43
|
group: AutoBeInterfaceGroup,
|
|
42
|
-
|
|
44
|
+
message: string,
|
|
43
45
|
progress: IProgress,
|
|
46
|
+
authorizations: AutoBeOpenApi.IOperation[],
|
|
44
47
|
): Promise<AutoBeOpenApi.IEndpoint[]> {
|
|
45
48
|
const start: Date = new Date();
|
|
46
49
|
const pointer: IPointer<AutoBeOpenApi.IEndpoint[] | null> = {
|
|
47
50
|
value: null,
|
|
48
51
|
};
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
const { tokenUsage } = await ctx.conversate({
|
|
53
|
+
source: "interfaceEndpoints",
|
|
54
|
+
histories: transformInterfaceEndpointHistories(
|
|
55
|
+
ctx.state(),
|
|
56
|
+
group,
|
|
57
|
+
authorizations,
|
|
58
|
+
),
|
|
59
|
+
controller: createController({
|
|
60
|
+
model: ctx.model,
|
|
61
|
+
build: (endpoints) => {
|
|
62
|
+
pointer.value ??= endpoints;
|
|
63
|
+
pointer.value.push(...endpoints);
|
|
56
64
|
},
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
createApplication({
|
|
61
|
-
model: ctx.model,
|
|
62
|
-
build: (endpoints) => {
|
|
63
|
-
pointer.value ??= endpoints;
|
|
64
|
-
pointer.value.push(...endpoints);
|
|
65
|
-
},
|
|
66
|
-
}),
|
|
67
|
-
],
|
|
68
|
-
});
|
|
69
|
-
enforceToolCall(agentica);
|
|
70
|
-
|
|
71
|
-
await agentica.conversate(content).finally(() => {
|
|
72
|
-
const tokenUsage = agentica.getTokenUsage().aggregate;
|
|
73
|
-
ctx.usage().record(tokenUsage, ["interface"]);
|
|
65
|
+
}),
|
|
66
|
+
enforceFunctionCall: true,
|
|
67
|
+
message,
|
|
74
68
|
});
|
|
75
69
|
if (pointer.value === null) throw new Error("Failed to generate endpoints."); // unreachable
|
|
70
|
+
|
|
76
71
|
const event: AutoBeInterfaceEndpointsEvent = {
|
|
77
72
|
type: "interfaceEndpoints",
|
|
78
73
|
endpoints: new HashSet(
|
|
@@ -80,6 +75,7 @@ async function process<Model extends ILlmSchema.Model>(
|
|
|
80
75
|
OpenApiEndpointComparator.hashCode,
|
|
81
76
|
OpenApiEndpointComparator.equals,
|
|
82
77
|
).toJSON(),
|
|
78
|
+
tokenUsage,
|
|
83
79
|
created_at: start.toISOString(),
|
|
84
80
|
step: ctx.state().analyze?.step ?? 0,
|
|
85
81
|
completed: ++progress.completed,
|
|
@@ -89,7 +85,7 @@ async function process<Model extends ILlmSchema.Model>(
|
|
|
89
85
|
return pointer.value;
|
|
90
86
|
}
|
|
91
87
|
|
|
92
|
-
function
|
|
88
|
+
function createController<Model extends ILlmSchema.Model>(props: {
|
|
93
89
|
model: Model;
|
|
94
90
|
build: (endpoints: AutoBeOpenApi.IEndpoint[]) => void;
|
|
95
91
|
}): IAgenticaController.IClass<Model> {
|
|
@@ -97,7 +93,7 @@ function createApplication<Model extends ILlmSchema.Model>(props: {
|
|
|
97
93
|
|
|
98
94
|
const application: ILlmApplication<Model> = collection[
|
|
99
95
|
props.model
|
|
100
|
-
] as unknown as ILlmApplication<Model>;
|
|
96
|
+
] satisfies ILlmApplication<any> as unknown as ILlmApplication<Model>;
|
|
101
97
|
return {
|
|
102
98
|
protocol: "class",
|
|
103
99
|
name: "interface",
|
|
@@ -112,14 +108,12 @@ function createApplication<Model extends ILlmSchema.Model>(props: {
|
|
|
112
108
|
|
|
113
109
|
const claude = typia.llm.application<
|
|
114
110
|
IAutoBeInterfaceEndpointApplication,
|
|
115
|
-
"claude"
|
|
116
|
-
{ reference: true }
|
|
111
|
+
"claude"
|
|
117
112
|
>();
|
|
118
113
|
const collection = {
|
|
119
114
|
chatgpt: typia.llm.application<
|
|
120
115
|
IAutoBeInterfaceEndpointApplication,
|
|
121
|
-
"chatgpt"
|
|
122
|
-
{ reference: true }
|
|
116
|
+
"chatgpt"
|
|
123
117
|
>(),
|
|
124
118
|
claude,
|
|
125
119
|
llama: claude,
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
MicroAgentica,
|
|
4
|
-
MicroAgenticaHistory,
|
|
5
|
-
} from "@agentica/core";
|
|
6
|
-
import {
|
|
7
|
-
AutoBeAssistantMessageHistory,
|
|
8
|
-
AutoBeInterfaceGroupsEvent,
|
|
9
|
-
} from "@autobe/interface";
|
|
1
|
+
import { IAgenticaController } from "@agentica/core";
|
|
2
|
+
import { AutoBeInterfaceGroupsEvent } from "@autobe/interface";
|
|
10
3
|
import { ILlmApplication, ILlmSchema } from "@samchon/openapi";
|
|
11
4
|
import { IPointer } from "tstl";
|
|
12
5
|
import typia from "typia";
|
|
13
|
-
import { v4 } from "uuid";
|
|
14
6
|
|
|
15
7
|
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
16
8
|
import { assertSchemaModel } from "../../context/assertSchemaModel";
|
|
@@ -21,57 +13,35 @@ export async function orchestrateInterfaceGroups<
|
|
|
21
13
|
Model extends ILlmSchema.Model,
|
|
22
14
|
>(
|
|
23
15
|
ctx: AutoBeContext<Model>,
|
|
24
|
-
|
|
25
|
-
): Promise<
|
|
16
|
+
message: string = "Design API operations for the given assets.",
|
|
17
|
+
): Promise<AutoBeInterfaceGroupsEvent> {
|
|
26
18
|
const start: Date = new Date();
|
|
27
19
|
const pointer: IPointer<IAutoBeInterfaceGroupApplication.IProps | null> = {
|
|
28
20
|
value: null,
|
|
29
21
|
};
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
vendor: ctx.vendor,
|
|
33
|
-
config: {
|
|
34
|
-
...(ctx.config ?? {}),
|
|
35
|
-
executor: {
|
|
36
|
-
describe: null,
|
|
37
|
-
},
|
|
38
|
-
},
|
|
22
|
+
const { tokenUsage } = await ctx.conversate({
|
|
23
|
+
source: "interfaceGroups",
|
|
39
24
|
histories: transformInterfaceGroupHistories(ctx.state()),
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
25
|
+
controller: createController({
|
|
26
|
+
model: ctx.model,
|
|
27
|
+
build: (next) => {
|
|
28
|
+
pointer.value = next;
|
|
29
|
+
},
|
|
30
|
+
}),
|
|
31
|
+
enforceFunctionCall: true,
|
|
32
|
+
message,
|
|
48
33
|
});
|
|
49
|
-
|
|
50
|
-
const histories: MicroAgenticaHistory<Model>[] = await agentica
|
|
51
|
-
.conversate(content)
|
|
52
|
-
.finally(() => {
|
|
53
|
-
const tokenUsage = agentica.getTokenUsage().aggregate;
|
|
54
|
-
ctx.usage().record(tokenUsage, ["interface"]);
|
|
55
|
-
});
|
|
56
|
-
const last: MicroAgenticaHistory<Model> = histories.at(-1)!;
|
|
57
|
-
if (last.type === "assistantMessage")
|
|
58
|
-
return {
|
|
59
|
-
...last,
|
|
60
|
-
created_at: start.toISOString(),
|
|
61
|
-
completed_at: new Date().toISOString(),
|
|
62
|
-
id: v4(),
|
|
63
|
-
} satisfies AutoBeAssistantMessageHistory;
|
|
64
|
-
else if (pointer.value === null)
|
|
65
|
-
throw new Error("Failed to generate groups."); // unreachable
|
|
34
|
+
if (pointer.value === null) throw new Error("Failed to generate groups."); // unreachable
|
|
66
35
|
return {
|
|
67
36
|
type: "interfaceGroups",
|
|
68
37
|
created_at: start.toISOString(),
|
|
69
38
|
groups: pointer.value.groups,
|
|
39
|
+
tokenUsage,
|
|
70
40
|
step: ctx.state().analyze?.step ?? 0,
|
|
71
41
|
} satisfies AutoBeInterfaceGroupsEvent;
|
|
72
42
|
}
|
|
73
43
|
|
|
74
|
-
function
|
|
44
|
+
function createController<Model extends ILlmSchema.Model>(props: {
|
|
75
45
|
model: Model;
|
|
76
46
|
build: (next: IAutoBeInterfaceGroupApplication.IProps) => void;
|
|
77
47
|
}): IAgenticaController.IClass<Model> {
|
|
@@ -79,7 +49,7 @@ function createApplication<Model extends ILlmSchema.Model>(props: {
|
|
|
79
49
|
|
|
80
50
|
const application: ILlmApplication<Model> = collection[
|
|
81
51
|
props.model
|
|
82
|
-
] as unknown as ILlmApplication<Model>;
|
|
52
|
+
] satisfies ILlmApplication<any> as unknown as ILlmApplication<Model>;
|
|
83
53
|
return {
|
|
84
54
|
protocol: "class",
|
|
85
55
|
name: "interface",
|