@autobe/agent 0.22.0 → 0.23.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/AutoBeAgent.d.ts +2 -1
- package/lib/{agent/src/AutoBeAgent.js → AutoBeAgent.js} +17 -3
- package/lib/AutoBeAgent.js.map +1 -0
- package/lib/AutoBeAgentBase.js.map +1 -0
- package/lib/{agent/src/AutoBeMockAgent.js → AutoBeMockAgent.js} +16 -0
- package/lib/AutoBeMockAgent.js.map +1 -0
- package/lib/constants/AutoBeConfigConstant.d.ts +3 -1
- package/lib/constants/AutoBeConfigConstant.js.map +1 -0
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +17 -15
- package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -0
- package/lib/context/AutoBeContext.js.map +1 -0
- package/lib/context/AutoBeState.js.map +1 -0
- package/lib/context/AutoBeTokenUsage.d.ts +1 -0
- package/lib/{agent/src/context → context}/AutoBeTokenUsage.js +8 -0
- package/lib/context/AutoBeTokenUsage.js.map +1 -0
- package/lib/context/AutoBeTokenUsageComponent.d.ts +1 -0
- package/lib/{agent/src/context → context}/AutoBeTokenUsageComponent.js +8 -0
- package/lib/context/AutoBeTokenUsageComponent.js.map +1 -0
- package/lib/context/IAutoBeApplication.js.map +1 -0
- package/lib/context/IAutoBeApplicationProps.js.map +1 -0
- package/lib/context/IAutoBeApplicationResult.js.map +1 -0
- package/lib/context/assertSchemaModel.js.map +1 -0
- package/lib/{agent/src/factory → factory}/consentFunctionCall.js +1 -1
- package/lib/factory/consentFunctionCall.js.map +1 -0
- package/lib/factory/createAgenticaHistory.js.map +1 -0
- package/lib/factory/createAutoBeApplication.js.map +1 -0
- package/lib/{agent/src/factory → factory}/createAutoBeContext.js +66 -20
- package/lib/factory/createAutoBeContext.js.map +1 -0
- package/lib/factory/createAutoBeState.js.map +1 -0
- package/lib/factory/getAutoBeGenerated.js.map +1 -0
- package/lib/factory/getAutoBeRealizeGenerated.js.map +1 -0
- package/lib/factory/getCriticalCompiler.d.ts +3 -0
- package/lib/factory/getCriticalCompiler.js +55 -0
- package/lib/factory/getCriticalCompiler.js.map +1 -0
- package/lib/factory/index.js.map +1 -0
- package/lib/index.js.map +1 -0
- package/lib/index.mjs +4869 -3042
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -0
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -0
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -0
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/analyze/orchestrateAnalyzeWrite.js +2 -4
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.js.map +1 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.js.map +1 -0
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.js.map +1 -0
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.d.ts +8 -0
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.js +31 -0
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.js.map +1 -0
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.d.ts +18 -0
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +411 -0
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js.map +1 -0
- package/lib/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.d.ts +122 -0
- package/lib/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.js +3 -0
- package/lib/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.js.map +1 -0
- package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -0
- package/lib/orchestrate/index.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/interface/histories/transformInterfaceAuthorizationsHistories.js +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +63 -0
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/interface/histories/transformInterfaceEndpointsReviewHistories.js +4 -4
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +52 -0
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +36 -0
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +29 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +60 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/interface/orchestrateInterfaceComplement.js +3 -3
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/interface/orchestrateInterfaceOperations.js +193 -274
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js +1747 -0
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/interface/orchestrateInterfaceSchemas.js +3 -3
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +1 -1
- package/lib/{agent/src/orchestrate → orchestrate}/interface/orchestrateInterfaceSchemasReview.js +6 -8
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +247 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.js.map +1 -0
- package/lib/orchestrate/interface/utils/JsonSchemaFactory.js.map +1 -0
- package/lib/orchestrate/interface/utils/JsonSchemaNamingConvention.js.map +1 -0
- package/lib/orchestrate/interface/utils/JsonSchemaValidator.d.ts +15 -0
- package/lib/orchestrate/interface/utils/JsonSchemaValidator.js +61 -0
- package/lib/orchestrate/interface/utils/JsonSchemaValidator.js.map +1 -0
- package/lib/orchestrate/interface/utils/OpenApiEndpointComparator.js.map +1 -0
- package/lib/orchestrate/interface/utils/OperationValidator.d.ts +10 -0
- package/lib/orchestrate/interface/utils/OperationValidator.js +114 -0
- package/lib/orchestrate/interface/utils/OperationValidator.js.map +1 -0
- package/lib/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.js.map +1 -0
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -0
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -0
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -0
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -0
- package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -0
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/prisma/orchestratePrismaCorrect.js +2 -2
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -0
- package/lib/orchestrate/prisma/orchestratePrismaReview.js.map +1 -0
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -0
- package/lib/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.js.map +1 -0
- package/lib/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.js.map +1 -0
- package/lib/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.js.map +1 -0
- package/lib/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.js.map +1 -0
- package/lib/orchestrate/realize/ProviderCodeComparator.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/realize/histories/transformRealizeAuthorization.js +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/realize/histories/transformRealizeAuthorizationCorrectHistories.js +2 -2
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -0
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js +57 -0
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js +141 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -0
- package/lib/orchestrate/realize/internal/compileRealizeFiles.js.map +1 -0
- package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.d.ts +4 -0
- package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.js +505 -0
- package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/realize/orchestrateRealize.js +18 -8
- package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/realize/orchestrateRealizeAuthorizationCorrect.js +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +2 -15
- package/lib/{agent/src/orchestrate → orchestrate}/realize/orchestrateRealizeCorrect.js +48 -43
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.js.map +1 -0
- package/lib/orchestrate/realize/utils/AuthorizationFileSystem.js.map +1 -0
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.js.map +1 -0
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js.map +1 -0
- package/lib/orchestrate/realize/utils/InternalFileSystem.js.map +1 -0
- package/lib/orchestrate/realize/utils/ProviderFileSystem.js.map +1 -0
- package/lib/orchestrate/realize/utils/generateRealizeScenario.d.ts +25 -0
- package/lib/orchestrate/realize/utils/generateRealizeScenario.js +85 -0
- package/lib/orchestrate/realize/utils/generateRealizeScenario.js.map +1 -0
- package/lib/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js.map +1 -0
- package/lib/orchestrate/realize/utils/getRealizeWriteDto.js.map +1 -0
- package/lib/orchestrate/realize/utils/getRealizeWriteImportStatements.js.map +1 -0
- package/lib/orchestrate/realize/utils/getRealizeWriteInputType.js.map +1 -0
- package/lib/orchestrate/realize/utils/replaceImportStatements.js +98 -0
- package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +1 -0
- package/lib/orchestrate/test/compile/completeTestCode.d.ts +3 -1
- package/lib/orchestrate/test/compile/completeTestCode.js +31 -0
- package/lib/orchestrate/test/compile/completeTestCode.js.map +1 -0
- package/lib/orchestrate/test/compile/filterTestFileName.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/test/compile/getTestExternalDeclarations.js +5 -1
- package/lib/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -0
- package/lib/orchestrate/test/compile/getTestImportStatements.js.map +1 -0
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -0
- package/lib/orchestrate/test/compile/getTestTemplateCode.js.map +1 -0
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.js +51 -0
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -0
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.d.ts +4 -0
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.js +33 -0
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.js.map +1 -0
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.d.ts +1 -1
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.js +159 -0
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -0
- package/lib/orchestrate/test/histories/transformTestValidateEvent.d.ts +4 -0
- package/lib/orchestrate/test/histories/transformTestValidateEvent.js +11 -0
- package/lib/orchestrate/test/histories/transformTestValidateEvent.js.map +1 -0
- package/lib/orchestrate/test/histories/transformTestWriteHistories.js +220 -0
- package/lib/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/test/orchestrateTest.js +13 -7
- package/lib/orchestrate/test/orchestrateTest.js.map +1 -0
- package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +2 -2
- package/lib/orchestrate/test/orchestrateTestCorrect.js +513 -0
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -0
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.d.ts +7 -0
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js +425 -0
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/test/orchestrateTestScenario.js +32 -36
- package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/test/orchestrateTestWrite.js +25 -44
- package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectInvalidRequestApplication.d.ts +140 -0
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectInvalidRequestApplication.js +3 -0
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectInvalidRequestApplication.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestFunction.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestFunctionFailure.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +2 -2
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +38 -15
- package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +1 -0
- package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +1 -0
- package/lib/{agent/src/orchestrate → orchestrate}/test/utils/getReferenceIds.js +1 -1
- package/lib/orchestrate/test/utils/getReferenceIds.js.map +1 -0
- package/lib/structures/IAutoBeConfig.d.ts +1 -0
- package/lib/structures/IAutoBeConfig.js.map +1 -0
- package/lib/structures/IAutoBeProps.js.map +1 -0
- package/lib/structures/IAutoBeVendor.js.map +1 -0
- package/lib/utils/AutoBeTimeoutError.d.ts +4 -0
- package/lib/utils/AutoBeTimeoutError.js +18 -0
- package/lib/utils/AutoBeTimeoutError.js.map +1 -0
- package/lib/utils/TimeoutConversation.d.ts +24 -0
- package/lib/utils/TimeoutConversation.js +65 -0
- package/lib/utils/TimeoutConversation.js.map +1 -0
- package/lib/utils/arrayToRecord.js.map +1 -0
- package/lib/utils/backoffRetry.js.map +1 -0
- package/lib/utils/divideArray.js.map +1 -0
- package/lib/utils/emplaceMap.js.map +1 -0
- package/lib/utils/executeCachedBatch.js.map +1 -0
- package/lib/utils/predicateStateMessage.js.map +1 -0
- package/package.json +7 -7
- package/src/AutoBeAgent.ts +16 -1
- package/src/AutoBeMockAgent.ts +13 -3
- package/src/constants/AutoBeConfigConstant.ts +3 -1
- package/src/constants/AutoBeSystemPromptConstant.ts +17 -15
- package/src/context/AutoBeTokenUsage.ts +9 -0
- package/src/context/AutoBeTokenUsageComponent.ts +9 -0
- package/src/factory/consentFunctionCall.ts +1 -1
- package/src/factory/createAutoBeContext.ts +68 -20
- package/src/factory/getCriticalCompiler.ts +47 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +2 -4
- package/src/orchestrate/common/histories/transformCommonCorrectCastingHistories.ts +43 -0
- package/src/orchestrate/common/orchestrateCommonCorrectCasting.ts +170 -0
- package/src/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.ts +127 -0
- package/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.ts +4 -4
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +3 -3
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +10 -94
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +49 -13
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +4 -3
- package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +6 -6
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +254 -4
- package/src/orchestrate/interface/utils/JsonSchemaValidator.ts +71 -0
- package/src/orchestrate/interface/utils/OperationValidator.ts +127 -0
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +2 -2
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +6 -0
- package/src/orchestrate/realize/orchestRateRealizeCorrectCasting.ts +317 -0
- package/src/orchestrate/realize/orchestrateRealize.ts +29 -14
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +1 -1
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +79 -67
- package/src/orchestrate/realize/utils/generateRealizeScenario.ts +104 -0
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +60 -32
- package/src/orchestrate/test/compile/completeTestCode.ts +10 -12
- package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +11 -0
- package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +4 -3
- package/src/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.ts +39 -0
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +75 -17
- package/src/orchestrate/test/histories/transformTestValidateEvent.ts +14 -0
- package/src/orchestrate/test/orchestrateTest.ts +11 -7
- package/src/orchestrate/test/orchestrateTestCorrect.ts +121 -50
- package/src/orchestrate/test/orchestrateTestCorrectInvalidRequest.ts +145 -0
- package/src/orchestrate/test/orchestrateTestScenario.ts +29 -13
- package/src/orchestrate/test/orchestrateTestWrite.ts +13 -19
- package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +233 -0
- package/src/orchestrate/test/structures/IAutoBeTestCorrectInvalidRequestApplication.ts +146 -0
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +2 -2
- package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +110 -15
- package/src/orchestrate/test/utils/getReferenceIds.ts +1 -1
- package/src/structures/IAutoBeConfig.ts +2 -0
- package/src/utils/AutoBeTimeoutError.ts +13 -0
- package/src/utils/TimeoutConversation.ts +82 -0
- package/lib/agent/src/AutoBeAgent.d.ts +0 -52
- package/lib/agent/src/AutoBeAgent.js.map +0 -1
- package/lib/agent/src/AutoBeAgentBase.d.ts +0 -18
- package/lib/agent/src/AutoBeAgentBase.js.map +0 -1
- package/lib/agent/src/AutoBeMockAgent.d.ts +0 -7
- package/lib/agent/src/AutoBeMockAgent.js.map +0 -1
- package/lib/agent/src/constants/AutoBeConfigConstant.d.ts +0 -3
- package/lib/agent/src/constants/AutoBeConfigConstant.js.map +0 -1
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +0 -29
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +0 -1
- package/lib/agent/src/context/AutoBeContext.d.ts +0 -43
- package/lib/agent/src/context/AutoBeContext.js.map +0 -1
- package/lib/agent/src/context/AutoBeState.d.ts +0 -8
- package/lib/agent/src/context/AutoBeState.js.map +0 -1
- package/lib/agent/src/context/AutoBeTokenUsage.d.ts +0 -173
- package/lib/agent/src/context/AutoBeTokenUsage.js.map +0 -1
- package/lib/agent/src/context/AutoBeTokenUsageComponent.d.ts +0 -117
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js.map +0 -1
- package/lib/agent/src/context/IAutoBeApplication.d.ts +0 -107
- package/lib/agent/src/context/IAutoBeApplication.js.map +0 -1
- package/lib/agent/src/context/IAutoBeApplicationProps.d.ts +0 -4
- package/lib/agent/src/context/IAutoBeApplicationProps.js.map +0 -1
- package/lib/agent/src/context/IAutoBeApplicationResult.d.ts +0 -4
- package/lib/agent/src/context/IAutoBeApplicationResult.js.map +0 -1
- package/lib/agent/src/context/assertSchemaModel.d.ts +0 -2
- package/lib/agent/src/context/assertSchemaModel.js.map +0 -1
- package/lib/agent/src/factory/consentFunctionCall.d.ts +0 -10
- package/lib/agent/src/factory/consentFunctionCall.js.map +0 -1
- package/lib/agent/src/factory/createAgenticaHistory.d.ts +0 -7
- package/lib/agent/src/factory/createAgenticaHistory.js.map +0 -1
- package/lib/agent/src/factory/createAutoBeApplication.d.ts +0 -7
- package/lib/agent/src/factory/createAutoBeApplication.js.map +0 -1
- package/lib/agent/src/factory/createAutoBeContext.d.ts +0 -19
- package/lib/agent/src/factory/createAutoBeContext.js.map +0 -1
- package/lib/agent/src/factory/createAutoBeState.d.ts +0 -3
- package/lib/agent/src/factory/createAutoBeState.js.map +0 -1
- package/lib/agent/src/factory/getAutoBeGenerated.d.ts +0 -4
- package/lib/agent/src/factory/getAutoBeGenerated.js.map +0 -1
- package/lib/agent/src/factory/getAutoBeRealizeGenerated.d.ts +0 -7
- package/lib/agent/src/factory/getAutoBeRealizeGenerated.js.map +0 -1
- package/lib/agent/src/factory/index.d.ts +0 -1
- package/lib/agent/src/factory/index.js.map +0 -1
- package/lib/agent/src/index.d.ts +0 -6
- package/lib/agent/src/index.js.map +0 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +0 -6
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +0 -4
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +0 -6
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.d.ts +0 -5
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js.map +0 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +0 -11
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js.map +0 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.d.ts +0 -4
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +0 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.d.ts +0 -10
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +0 -1
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +0 -111
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +0 -78
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +0 -74
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.d.ts +0 -2
- package/lib/agent/src/orchestrate/facade/transformFacadeStateMessage.js.map +0 -1
- package/lib/agent/src/orchestrate/index.d.ts +0 -5
- package/lib/agent/src/orchestrate/index.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.d.ts +0 -3
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +0 -63
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +0 -5
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.d.ts +0 -3
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +0 -52
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.d.ts +0 -5
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +0 -36
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.d.ts +0 -3
- package/lib/agent/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +0 -29
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +0 -60
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.d.ts +0 -5
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.d.ts +0 -5
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +0 -10
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +0 -1416
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.d.ts +0 -4
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +0 -9
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.d.ts +0 -47
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +0 -93
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.d.ts +0 -24
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.d.ts +0 -60
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +0 -108
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +0 -171
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +0 -117
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +0 -107
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +0 -91
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaFactory.d.ts +0 -9
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaFactory.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaNamingConvention.d.ts +0 -5
- package/lib/agent/src/orchestrate/interface/utils/JsonSchemaNamingConvention.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/utils/OpenApiEndpointComparator.d.ts +0 -6
- package/lib/agent/src/orchestrate/interface/utils/OpenApiEndpointComparator.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.d.ts +0 -2
- package/lib/agent/src/orchestrate/interface/utils/fulfillJsonSchemaErrorMessages.js.map +0 -1
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +0 -7
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js +0 -35
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.d.ts +0 -3
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.d.ts +0 -3
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.d.ts +0 -8
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +0 -3
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.d.ts +0 -5
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.d.ts +0 -4
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.d.ts +0 -4
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.d.ts +0 -5
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.d.ts +0 -5
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.d.ts +0 -121
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaComponentApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.d.ts +0 -142
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.d.ts +0 -105
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.d.ts +0 -99
- package/lib/agent/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/ProviderCodeComparator.d.ts +0 -5
- package/lib/agent/src/orchestrate/realize/ProviderCodeComparator.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.d.ts +0 -5
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.d.ts +0 -5
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +0 -14
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +0 -51
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +0 -3
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +0 -11
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +0 -141
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.d.ts +0 -7
- package/lib/agent/src/orchestrate/realize/internal/compileRealizeFiles.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.d.ts +0 -5
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.d.ts +0 -10
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.d.ts +0 -4
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +0 -19
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -25
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js +0 -44
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeScenario.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +0 -11
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +0 -109
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +0 -47
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +0 -39
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.d.ts +0 -5
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFunctionFailure.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.d.ts +0 -36
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +0 -295
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/utils/AuthorizationFileSystem.d.ts +0 -5
- package/lib/agent/src/orchestrate/realize/utils/AuthorizationFileSystem.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.d.ts +0 -5
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationFileSystem.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.d.ts +0 -4
- package/lib/agent/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/utils/InternalFileSystem.d.ts +0 -8
- package/lib/agent/src/orchestrate/realize/utils/InternalFileSystem.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/utils/ProviderFileSystem.d.ts +0 -3
- package/lib/agent/src/orchestrate/realize/utils/ProviderFileSystem.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.d.ts +0 -31
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteDto.d.ts +0 -4
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteDto.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteImportStatements.d.ts +0 -2
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteImportStatements.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteInputType.d.ts +0 -30
- package/lib/agent/src/orchestrate/realize/utils/getRealizeWriteInputType.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.d.ts +0 -8
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js +0 -77
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js.map +0 -1
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.d.ts +0 -2
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js +0 -25
- package/lib/agent/src/orchestrate/test/compile/completeTestCode.js.map +0 -1
- package/lib/agent/src/orchestrate/test/compile/filterTestFileName.d.ts +0 -1
- package/lib/agent/src/orchestrate/test/compile/filterTestFileName.js.map +0 -1
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.d.ts +0 -3
- package/lib/agent/src/orchestrate/test/compile/getTestExternalDeclarations.js.map +0 -1
- package/lib/agent/src/orchestrate/test/compile/getTestImportStatements.d.ts +0 -2
- package/lib/agent/src/orchestrate/test/compile/getTestImportStatements.js.map +0 -1
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +0 -5
- package/lib/agent/src/orchestrate/test/compile/getTestScenarioArtifacts.js.map +0 -1
- package/lib/agent/src/orchestrate/test/compile/getTestTemplateCode.d.ts +0 -2
- package/lib/agent/src/orchestrate/test/compile/getTestTemplateCode.js.map +0 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.d.ts +0 -6
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +0 -50
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.d.ts +0 -4
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +0 -105
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.d.ts +0 -10
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +0 -220
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/test/orchestrateTest.d.ts +0 -5
- package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +0 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.d.ts +0 -5
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js +0 -411
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js.map +0 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.d.ts +0 -4
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +0 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.d.ts +0 -5
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +0 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +0 -125
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunction.d.ts +0 -8
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunction.js.map +0 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.d.ts +0 -6
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestFunctionFailure.js.map +0 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +0 -161
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.d.ts +0 -8
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioArtifacts.js.map +0 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +0 -6
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.js.map +0 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +0 -126
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteResult.d.ts +0 -7
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +0 -1
- package/lib/agent/src/orchestrate/test/utils/getReferenceIds.d.ts +0 -5
- package/lib/agent/src/orchestrate/test/utils/getReferenceIds.js.map +0 -1
- package/lib/agent/src/structures/IAutoBeConfig.d.ts +0 -75
- package/lib/agent/src/structures/IAutoBeConfig.js.map +0 -1
- package/lib/agent/src/structures/IAutoBeProps.d.ts +0 -109
- package/lib/agent/src/structures/IAutoBeProps.js.map +0 -1
- package/lib/agent/src/structures/IAutoBeVendor.d.ts +0 -87
- package/lib/agent/src/structures/IAutoBeVendor.js.map +0 -1
- package/lib/agent/src/utils/arrayToRecord.d.ts +0 -17
- package/lib/agent/src/utils/arrayToRecord.js.map +0 -1
- package/lib/agent/src/utils/backoffRetry.d.ts +0 -22
- package/lib/agent/src/utils/backoffRetry.js.map +0 -1
- package/lib/agent/src/utils/divideArray.d.ts +0 -4
- package/lib/agent/src/utils/divideArray.js.map +0 -1
- package/lib/agent/src/utils/emplaceMap.d.ts +0 -1
- package/lib/agent/src/utils/emplaceMap.js.map +0 -1
- package/lib/agent/src/utils/executeCachedBatch.d.ts +0 -1
- package/lib/agent/src/utils/executeCachedBatch.js.map +0 -1
- package/lib/agent/src/utils/predicateStateMessage.d.ts +0 -4
- package/lib/agent/src/utils/predicateStateMessage.js.map +0 -1
- package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.d.ts +0 -153
- package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.js +0 -3
- package/lib/interface/src/histories/contents/AutoBeAnalyzeFile.js.map +0 -1
- package/lib/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +0 -7
- package/lib/orchestrate/realize/orchestrateRealizeScenario.d.ts +0 -25
- package/src/orchestrate/interface/utils/validateAuthorizationSchema.ts +0 -41
- package/src/orchestrate/realize/orchestrateRealizeScenario.ts +0 -57
- /package/lib/{agent/src/AutoBeAgentBase.js → AutoBeAgentBase.js} +0 -0
- /package/lib/{agent/src/constants → constants}/AutoBeConfigConstant.js +0 -0
- /package/lib/{agent/src/constants → constants}/AutoBeSystemPromptConstant.js +0 -0
- /package/lib/{agent/src/context → context}/AutoBeContext.js +0 -0
- /package/lib/{agent/src/context → context}/AutoBeState.js +0 -0
- /package/lib/{agent/src/context → context}/IAutoBeApplication.js +0 -0
- /package/lib/{agent/src/context → context}/IAutoBeApplicationProps.js +0 -0
- /package/lib/{agent/src/context → context}/IAutoBeApplicationResult.js +0 -0
- /package/lib/{agent/src/context → context}/assertSchemaModel.js +0 -0
- /package/lib/{agent/src/factory → factory}/createAgenticaHistory.js +0 -0
- /package/lib/{agent/src/factory → factory}/createAutoBeApplication.js +0 -0
- /package/lib/{agent/src/factory → factory}/createAutoBeState.js +0 -0
- /package/lib/{agent/src/factory → factory}/getAutoBeGenerated.js +0 -0
- /package/lib/{agent/src/factory → factory}/getAutoBeRealizeGenerated.js +0 -0
- /package/lib/{agent/src/factory → factory}/index.js +0 -0
- /package/lib/{agent/src/index.js → index.js} +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/analyze/histories/transformAnalyzeReviewHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/analyze/histories/transformAnalyzeScenarioHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/analyze/histories/transformAnalyzeWriteHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/analyze/orchestrateAnalyze.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/analyze/orchestrateAnalyzeReview.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/analyze/orchestrateAnalyzeScenario.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/analyze/structures/IAutoBeAnalyzeReviewApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/analyze/structures/IAutoBeAnalyzeScenarioApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/analyze/structures/IAutoBeAnalyzeWriteApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/facade/transformFacadeStateMessage.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/index.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/histories/transformInterfaceAssetHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/histories/transformInterfaceEndpointHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/histories/transformInterfaceGroupHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/histories/transformInterfacePrerequisiteHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/orchestrateInterface.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/orchestrateInterfaceAuthorizations.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/orchestrateInterfaceEndpoints.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/orchestrateInterfaceEndpointsReview.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/orchestrateInterfaceGroups.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/structures/IAutoBeInterfaceAuthorizationsApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/structures/IAutoBeInterfaceComplementApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/structures/IAutoBeInterfaceEndpointApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/structures/IAutoBeInterfaceGroupApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/structures/IAutoBeInterfaceOperationApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/structures/IAutoBeInterfaceOperationsReviewApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/structures/IAutoBeInterfaceSchemaApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/structures/IAutobeInterfaceSchemasReviewApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/utils/JsonSchemaFactory.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/utils/JsonSchemaNamingConvention.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/utils/OpenApiEndpointComparator.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/interface/utils/fulfillJsonSchemaErrorMessages.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/histories/transformPrismaComponentsHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/histories/transformPrismaCorrectHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/histories/transformPrismaReviewHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/histories/transformPrismaSchemaHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/orchestratePrisma.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/orchestratePrismaComponent.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/orchestratePrismaReview.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/orchestratePrismaSchemas.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/structures/IAutoBePrismaComponentApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/structures/IAutoBePrismaCorrectApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/structures/IAutoBePrismaReviewApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/prisma/structures/IAutoBePrismaSchemaApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/ProviderCodeComparator.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/histories/transformRealizeWriteAuthorizationsHistories.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/internal/compileRealizeFiles.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/orchestrateRealizeAuthorization.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/orchestrateRealizeWrite.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/structures/IAutoBeRealizeAuthorizationApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/structures/IAutoBeRealizeCorrectApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/structures/IAutoBeRealizeFunctionFailure.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/structures/IAutoBeRealizeScenarioResult.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/structures/IAutoBeRealizeWriteApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/utils/AuthorizationFileSystem.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/utils/AutoBeRealizeAuthorizationFileSystem.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/utils/InternalFileSystem.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/utils/ProviderFileSystem.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/utils/getRealizeWriteCodeTemplate.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/utils/getRealizeWriteDto.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/utils/getRealizeWriteImportStatements.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/realize/utils/getRealizeWriteInputType.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/compile/filterTestFileName.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/compile/getTestImportStatements.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/compile/getTestScenarioArtifacts.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/compile/getTestTemplateCode.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/structures/IAutoBeTestCorrectApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/structures/IAutoBeTestFunction.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/structures/IAutoBeTestFunctionFailure.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/structures/IAutoBeTestScenarioApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/structures/IAutoBeTestScenarioArtifacts.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/structures/IAutoBeTestScenarioAuthorizationRole.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/structures/IAutoBeTestWriteApplication.js +0 -0
- /package/lib/{agent/src/orchestrate → orchestrate}/test/structures/IAutoBeTestWriteResult.js +0 -0
- /package/lib/{agent/src/structures → structures}/IAutoBeConfig.js +0 -0
- /package/lib/{agent/src/structures → structures}/IAutoBeProps.js +0 -0
- /package/lib/{agent/src/structures → structures}/IAutoBeVendor.js +0 -0
- /package/lib/{agent/src/utils → utils}/arrayToRecord.js +0 -0
- /package/lib/{agent/src/utils → utils}/backoffRetry.js +0 -0
- /package/lib/{agent/src/utils → utils}/divideArray.js +0 -0
- /package/lib/{agent/src/utils → utils}/emplaceMap.js +0 -0
- /package/lib/{agent/src/utils → utils}/executeCachedBatch.js +0 -0
- /package/lib/{agent/src/utils → utils}/predicateStateMessage.js +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { AutoBeOpenApi } from "@autobe/interface";
|
|
2
|
+
import { AutoBeOpenApiTypeChecker, StringUtil } from "@autobe/utils";
|
|
3
|
+
import { IValidation } from "typia";
|
|
4
|
+
import { Escaper } from "typia/lib/utils/Escaper";
|
|
5
|
+
|
|
6
|
+
export namespace JsonSchemaValidator {
|
|
7
|
+
export interface IProps {
|
|
8
|
+
errors: IValidation.IError[];
|
|
9
|
+
schemas: Record<string, AutoBeOpenApi.IJsonSchemaDescriptive>;
|
|
10
|
+
path: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const validateSchemas = (props: IProps): void => {
|
|
14
|
+
authorization(props);
|
|
15
|
+
for (const key of Object.keys(props.schemas))
|
|
16
|
+
validateKey({
|
|
17
|
+
errors: props.errors,
|
|
18
|
+
path: props.path,
|
|
19
|
+
key,
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const validateKey = (props: {
|
|
24
|
+
errors: IValidation.IError[];
|
|
25
|
+
path: string;
|
|
26
|
+
key: string;
|
|
27
|
+
}): void => {
|
|
28
|
+
const variable: boolean = props.key.split(".").every(Escaper.variable);
|
|
29
|
+
if (variable === false)
|
|
30
|
+
props.errors.push({
|
|
31
|
+
path: `${props.path}[${JSON.stringify(props.key)}]`,
|
|
32
|
+
expected: "Valid variable name",
|
|
33
|
+
value: props.key,
|
|
34
|
+
description: StringUtil.trim`
|
|
35
|
+
JSON schema type name must be a valid variable name.
|
|
36
|
+
|
|
37
|
+
Even though JSON schema type name allows dot(.) character, but
|
|
38
|
+
each segment separated by dot(.) must be a valid variable name.
|
|
39
|
+
|
|
40
|
+
Current key name ${JSON.stringify(props.key)} is not valid. Change
|
|
41
|
+
it to a valid variable name at the next time.
|
|
42
|
+
`,
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const authorization = (props: IProps): void => {
|
|
47
|
+
for (const [key, value] of Object.entries(props.schemas)) {
|
|
48
|
+
if (!key.endsWith(".IAuthorized")) continue;
|
|
49
|
+
else if (AutoBeOpenApiTypeChecker.isObject(value) === false) {
|
|
50
|
+
props.errors.push({
|
|
51
|
+
path: `${props.path}.${key}`,
|
|
52
|
+
expected: `AutoBeOpenApi.IJsonSchemaDescriptive<AutoBeOpenApi.IJsonSchema.IObject>`,
|
|
53
|
+
value: value,
|
|
54
|
+
description: `${key} must be an object type for authorization responses`,
|
|
55
|
+
});
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Check if token property exists
|
|
60
|
+
value.properties ??= {};
|
|
61
|
+
value.properties["token"] = {
|
|
62
|
+
$ref: "#/components/schemas/IAuthorizationToken",
|
|
63
|
+
description: "JWT token information for authentication",
|
|
64
|
+
} as AutoBeOpenApi.IJsonSchemaDescriptive.IReference;
|
|
65
|
+
|
|
66
|
+
value.required ??= [];
|
|
67
|
+
if (value.required.includes("token") === false)
|
|
68
|
+
value.required.push("token");
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { AutoBeOpenApi } from "@autobe/interface";
|
|
2
|
+
import { AutoBeEndpointComparator, StringUtil } from "@autobe/utils";
|
|
3
|
+
import { HashMap } from "tstl";
|
|
4
|
+
import { IValidation } from "typia";
|
|
5
|
+
import { Escaper } from "typia/lib/utils/Escaper";
|
|
6
|
+
|
|
7
|
+
import { emplaceMap } from "../../../utils/emplaceMap";
|
|
8
|
+
import { JsonSchemaValidator } from "./JsonSchemaValidator";
|
|
9
|
+
|
|
10
|
+
export namespace OperationValidator {
|
|
11
|
+
export interface IProps {
|
|
12
|
+
errors: IValidation.IError[];
|
|
13
|
+
path: string;
|
|
14
|
+
operations: Array<
|
|
15
|
+
Omit<AutoBeOpenApi.IOperation, "authorizationRole" | "authorizationType">
|
|
16
|
+
>;
|
|
17
|
+
}
|
|
18
|
+
export const validate = (props: IProps): void => {
|
|
19
|
+
props.operations.forEach((op, i) => {
|
|
20
|
+
// get method has request body
|
|
21
|
+
if (op.method === "get" && op.requestBody !== null)
|
|
22
|
+
props.errors.push({
|
|
23
|
+
path: `${props.path}[${i}].requestBody`,
|
|
24
|
+
expected:
|
|
25
|
+
"GET method should not have request body. Change method, or re-design the operation.",
|
|
26
|
+
value: op.requestBody,
|
|
27
|
+
});
|
|
28
|
+
// operation name
|
|
29
|
+
if (Escaper.variable(op.name) === false)
|
|
30
|
+
props.errors.push({
|
|
31
|
+
path: `${props.path}[${i}].name`,
|
|
32
|
+
expected: "<valid_variable_name>",
|
|
33
|
+
value: op.name,
|
|
34
|
+
description: StringUtil.trim`
|
|
35
|
+
The operation name will be converted to the API controller method
|
|
36
|
+
(function) name, so the operation.name must be a valid JavaScript
|
|
37
|
+
variable/function name.
|
|
38
|
+
|
|
39
|
+
However, what you've configured value ${JSON.stringify(op.name)}
|
|
40
|
+
is not a valid JavaScript variable/function name. Please change
|
|
41
|
+
it to a valid variable/function name.
|
|
42
|
+
`,
|
|
43
|
+
});
|
|
44
|
+
// validate types
|
|
45
|
+
if (op.requestBody !== null)
|
|
46
|
+
JsonSchemaValidator.validateKey({
|
|
47
|
+
errors: props.errors,
|
|
48
|
+
path: `${props.path}[${i}].requestBody.typeName`,
|
|
49
|
+
key: op.requestBody.typeName,
|
|
50
|
+
});
|
|
51
|
+
if (op.responseBody !== null)
|
|
52
|
+
JsonSchemaValidator.validateKey({
|
|
53
|
+
errors: props.errors,
|
|
54
|
+
path: `${props.path}[${i}].responseBody.typeName`,
|
|
55
|
+
key: op.responseBody.typeName,
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
// validate duplicated endpoints
|
|
60
|
+
const endpoints: HashMap<AutoBeOpenApi.IEndpoint, number[]> = new HashMap(
|
|
61
|
+
AutoBeEndpointComparator.hashCode,
|
|
62
|
+
AutoBeEndpointComparator.equals,
|
|
63
|
+
);
|
|
64
|
+
props.operations.forEach((op, i) => {
|
|
65
|
+
const key: AutoBeOpenApi.IEndpoint = {
|
|
66
|
+
path: op.path,
|
|
67
|
+
method: op.method,
|
|
68
|
+
};
|
|
69
|
+
const it = endpoints.find(key);
|
|
70
|
+
if (it.equals(endpoints.end()) === false) {
|
|
71
|
+
const indexes: number[] = it.second;
|
|
72
|
+
props.errors.push({
|
|
73
|
+
path: `${props.path}[${i}].{"path"|"method"}`,
|
|
74
|
+
expected: "Unique endpoint (path and method)",
|
|
75
|
+
value: key,
|
|
76
|
+
description: StringUtil.trim`
|
|
77
|
+
Duplicated endpoint detected (method: ${op.method}, path: ${op.path}).
|
|
78
|
+
|
|
79
|
+
The duplicated endpoints of others are located in below accessors.
|
|
80
|
+
Check them, and consider which operation endpoint would be proper to modify.
|
|
81
|
+
|
|
82
|
+
${indexes
|
|
83
|
+
.map((idx) => `- ${props.path}.[${idx}].{"path"|"method"}`)
|
|
84
|
+
.join("\n")}
|
|
85
|
+
`,
|
|
86
|
+
});
|
|
87
|
+
indexes.push(i);
|
|
88
|
+
} else endpoints.emplace(key, [i]);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
// validate duplicated method names
|
|
92
|
+
const accessors: Map<string, number[]> = new Map();
|
|
93
|
+
props.operations.forEach((op, i) => {
|
|
94
|
+
const key: string =
|
|
95
|
+
op.path
|
|
96
|
+
.split("/")
|
|
97
|
+
.filter((e) => e[0] !== "{" && e.at(-1) !== "}")
|
|
98
|
+
.filter((e) => e.length !== 0)
|
|
99
|
+
.join(".") + `.${op.name}`;
|
|
100
|
+
const indexes: number[] = emplaceMap(accessors, key, () => []);
|
|
101
|
+
if (indexes.length !== 0) {
|
|
102
|
+
props.errors.push({
|
|
103
|
+
path: `${props.path}[${i}].name`,
|
|
104
|
+
expected: "Unique name in the same accessor scope.",
|
|
105
|
+
value: op.name,
|
|
106
|
+
description: StringUtil.trim`
|
|
107
|
+
Duplicated operation accessor detected (name: ${op.name}, accessor: ${key}).
|
|
108
|
+
|
|
109
|
+
The operation name must be unique within the parent accessor.
|
|
110
|
+
In other worlds, the operation accessor determined by the name
|
|
111
|
+
must be unique in the OpenAPI document.
|
|
112
|
+
|
|
113
|
+
Here is the list of elements of duplicated operation names.
|
|
114
|
+
Check them, and consider which operation name would be proper to modify.
|
|
115
|
+
|
|
116
|
+
${indexes
|
|
117
|
+
.map(
|
|
118
|
+
(idx) => `- ${props.operations[idx].name} (accessor: ${key})`,
|
|
119
|
+
)
|
|
120
|
+
.join("\n")}
|
|
121
|
+
`,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
indexes.push(i);
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
}
|
|
@@ -27,7 +27,7 @@ export function orchestratePrismaCorrect<Model extends ILlmSchema.Model>(
|
|
|
27
27
|
return true;
|
|
28
28
|
});
|
|
29
29
|
application.files = application.files.filter((f) => f.models.length !== 0);
|
|
30
|
-
return iterate(ctx, application, ctx.retry);
|
|
30
|
+
return iterate(ctx, application, Math.max(ctx.retry, 5));
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
async function iterate<Model extends ILlmSchema.Model>(
|
|
@@ -40,7 +40,7 @@ async function iterate<Model extends ILlmSchema.Model>(
|
|
|
40
40
|
await compiler.prisma.validate(application);
|
|
41
41
|
if (result.success)
|
|
42
42
|
return result; // SUCCESS
|
|
43
|
-
else if (life
|
|
43
|
+
else if (life < 0) return result; // FAILURE
|
|
44
44
|
|
|
45
45
|
// VALIDATION FAILED
|
|
46
46
|
const schemas: Record<string, string> = await compiler.prisma.write(
|
|
@@ -22,6 +22,12 @@ export function transformRealizeCorrectHistories(props: {
|
|
|
22
22
|
> {
|
|
23
23
|
return [
|
|
24
24
|
...transformRealizeWriteHistories(props),
|
|
25
|
+
{
|
|
26
|
+
id: v7(),
|
|
27
|
+
created_at: new Date().toISOString(),
|
|
28
|
+
type: "systemMessage",
|
|
29
|
+
text: AutoBeSystemPromptConstant.COMMON_CORRECT_CASTING,
|
|
30
|
+
},
|
|
25
31
|
{
|
|
26
32
|
id: v7(),
|
|
27
33
|
type: "assistantMessage",
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AutoBeProgressEventBase,
|
|
3
|
+
AutoBeRealizeAuthorization,
|
|
4
|
+
AutoBeRealizeFunction,
|
|
5
|
+
AutoBeRealizeValidateEvent,
|
|
6
|
+
IAutoBeTypeScriptCompileResult,
|
|
7
|
+
} from "@autobe/interface";
|
|
8
|
+
import { StringUtil } from "@autobe/utils";
|
|
9
|
+
import { ILlmApplication, ILlmController, ILlmSchema } from "@samchon/openapi";
|
|
10
|
+
import { IPointer } from "tstl";
|
|
11
|
+
import typia from "typia";
|
|
12
|
+
import { v7 } from "uuid";
|
|
13
|
+
|
|
14
|
+
import { AutoBeContext } from "../../context/AutoBeContext";
|
|
15
|
+
import { assertSchemaModel } from "../../context/assertSchemaModel";
|
|
16
|
+
import { executeCachedBatch } from "../../utils/executeCachedBatch";
|
|
17
|
+
import { transformCommonCorrectCastingHistories } from "../common/histories/transformCommonCorrectCastingHistories";
|
|
18
|
+
import { IAutoBeCommonCorrectCastingApplication } from "../common/structures/IAutoBeCommonCorrectCastingApplication";
|
|
19
|
+
import { compileRealizeFiles } from "./internal/compileRealizeFiles";
|
|
20
|
+
|
|
21
|
+
/** Result of attempting to correct a single function */
|
|
22
|
+
type CorrectionResult = {
|
|
23
|
+
result: "success" | "ignore" | "exception";
|
|
24
|
+
func: AutoBeRealizeFunction;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const orchestrateRealizeCorrectCasting = async <
|
|
28
|
+
Model extends ILlmSchema.Model,
|
|
29
|
+
>(
|
|
30
|
+
ctx: AutoBeContext<Model>,
|
|
31
|
+
authorizations: AutoBeRealizeAuthorization[],
|
|
32
|
+
functions: AutoBeRealizeFunction[],
|
|
33
|
+
progress: AutoBeProgressEventBase,
|
|
34
|
+
life: number = ctx.retry,
|
|
35
|
+
): Promise<AutoBeRealizeFunction[]> => {
|
|
36
|
+
const validateEvent: AutoBeRealizeValidateEvent = await compileRealizeFiles(
|
|
37
|
+
ctx,
|
|
38
|
+
{
|
|
39
|
+
authorizations,
|
|
40
|
+
functions,
|
|
41
|
+
},
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
return predicate(
|
|
45
|
+
ctx,
|
|
46
|
+
authorizations,
|
|
47
|
+
functions,
|
|
48
|
+
[],
|
|
49
|
+
progress,
|
|
50
|
+
validateEvent,
|
|
51
|
+
life,
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const predicate = async <Model extends ILlmSchema.Model>(
|
|
56
|
+
ctx: AutoBeContext<Model>,
|
|
57
|
+
authorizations: AutoBeRealizeAuthorization[],
|
|
58
|
+
functions: AutoBeRealizeFunction[],
|
|
59
|
+
failures: IAutoBeTypeScriptCompileResult.IDiagnostic[],
|
|
60
|
+
progress: AutoBeProgressEventBase,
|
|
61
|
+
event: AutoBeRealizeValidateEvent,
|
|
62
|
+
life: number,
|
|
63
|
+
): Promise<AutoBeRealizeFunction[]> => {
|
|
64
|
+
if (event.result.type === "failure") {
|
|
65
|
+
ctx.dispatch(event);
|
|
66
|
+
|
|
67
|
+
return await correct(
|
|
68
|
+
ctx,
|
|
69
|
+
authorizations,
|
|
70
|
+
functions,
|
|
71
|
+
[...failures, ...event.result.diagnostics],
|
|
72
|
+
progress,
|
|
73
|
+
event,
|
|
74
|
+
life,
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
return functions;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const correct = async <Model extends ILlmSchema.Model>(
|
|
81
|
+
ctx: AutoBeContext<Model>,
|
|
82
|
+
authorizations: AutoBeRealizeAuthorization[],
|
|
83
|
+
functions: AutoBeRealizeFunction[],
|
|
84
|
+
failures: IAutoBeTypeScriptCompileResult.IDiagnostic[],
|
|
85
|
+
progress: AutoBeProgressEventBase,
|
|
86
|
+
event: AutoBeRealizeValidateEvent,
|
|
87
|
+
life: number,
|
|
88
|
+
): Promise<AutoBeRealizeFunction[]> => {
|
|
89
|
+
// Early returns for non-correctable cases
|
|
90
|
+
if (event.result.type !== "failure" || life < 0) {
|
|
91
|
+
return functions;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const locations: string[] = diagnose(event).filter((l) =>
|
|
95
|
+
functions.map((f) => f.location).includes(l),
|
|
96
|
+
);
|
|
97
|
+
progress.total += locations.length;
|
|
98
|
+
|
|
99
|
+
const converted: CorrectionResult[] = await executeCachedBatch(
|
|
100
|
+
locations.map((location) => async (): Promise<CorrectionResult> => {
|
|
101
|
+
const func: AutoBeRealizeFunction = functions.find(
|
|
102
|
+
(f) => f.location === location,
|
|
103
|
+
)!;
|
|
104
|
+
|
|
105
|
+
const pointer: IPointer<
|
|
106
|
+
IAutoBeCommonCorrectCastingApplication.IProps | false | null
|
|
107
|
+
> = {
|
|
108
|
+
value: null,
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const { tokenUsage } = await ctx.conversate({
|
|
112
|
+
source: "realizeCorrect",
|
|
113
|
+
histories: transformCommonCorrectCastingHistories([
|
|
114
|
+
{
|
|
115
|
+
script: func.content,
|
|
116
|
+
diagnostics: failures.filter((d) => d.file === location),
|
|
117
|
+
},
|
|
118
|
+
]),
|
|
119
|
+
controller: createController({
|
|
120
|
+
model: ctx.model,
|
|
121
|
+
then: (next) => {
|
|
122
|
+
pointer.value = next;
|
|
123
|
+
},
|
|
124
|
+
reject: () => {
|
|
125
|
+
pointer.value = false;
|
|
126
|
+
},
|
|
127
|
+
}),
|
|
128
|
+
enforceFunctionCall: true,
|
|
129
|
+
message: StringUtil.trim`
|
|
130
|
+
Fix the TypeScript casting problems to resolve the compilation error.
|
|
131
|
+
|
|
132
|
+
Most casting errors are caused by type mismatches between Date types and
|
|
133
|
+
string & tags.Format<'date-time'>. To fix these:
|
|
134
|
+
- Use the pre-provided toISOStringSafe() function to convert Date to string
|
|
135
|
+
- Or use Date object's .toISOString() method
|
|
136
|
+
- Never use Date type directly in declarations or return values
|
|
137
|
+
|
|
138
|
+
You don't need to explain me anything, but just fix or give it up
|
|
139
|
+
immediately without any hesitation, explanation, and questions.
|
|
140
|
+
`,
|
|
141
|
+
});
|
|
142
|
+
++progress.completed;
|
|
143
|
+
if (pointer.value === null)
|
|
144
|
+
return { result: "exception" as const, func: func };
|
|
145
|
+
else if (pointer.value === false)
|
|
146
|
+
return { result: "ignore" as const, func: func };
|
|
147
|
+
|
|
148
|
+
ctx.dispatch({
|
|
149
|
+
id: v7(),
|
|
150
|
+
type: "realizeCorrect",
|
|
151
|
+
content: pointer.value.revise.final,
|
|
152
|
+
created_at: new Date().toISOString(),
|
|
153
|
+
location: func.location,
|
|
154
|
+
step: ctx.state().analyze?.step ?? 0,
|
|
155
|
+
tokenUsage,
|
|
156
|
+
completed: progress.completed,
|
|
157
|
+
total: progress.total,
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
return {
|
|
161
|
+
result: "success" as const,
|
|
162
|
+
func: { ...func, content: pointer.value.revise.final },
|
|
163
|
+
};
|
|
164
|
+
}),
|
|
165
|
+
);
|
|
166
|
+
|
|
167
|
+
const newValidate: AutoBeRealizeValidateEvent = await compileRealizeFiles(
|
|
168
|
+
ctx,
|
|
169
|
+
{ authorizations, functions: converted.map((c) => c.func) },
|
|
170
|
+
);
|
|
171
|
+
|
|
172
|
+
if (newValidate.result.type === "success") {
|
|
173
|
+
return converted.map((c) => c.func);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const newLocations: string[] = diagnose(newValidate);
|
|
177
|
+
|
|
178
|
+
// Separate successful, failed, and ignored corrections
|
|
179
|
+
const { success, failed, ignored } = separateCorrectionResults(
|
|
180
|
+
converted,
|
|
181
|
+
newLocations,
|
|
182
|
+
);
|
|
183
|
+
|
|
184
|
+
// If no failures to retry, return success and ignored functions
|
|
185
|
+
if (failed.length === 0) {
|
|
186
|
+
return [...success, ...ignored];
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// Collect diagnostics relevant to failed functions
|
|
190
|
+
const failedLocations: string[] = failed.map((f) => f.location);
|
|
191
|
+
const allDiagnostics: IAutoBeTypeScriptCompileResult.IDiagnostic[] = [
|
|
192
|
+
...failures,
|
|
193
|
+
...(newValidate.result.type === "failure"
|
|
194
|
+
? newValidate.result.diagnostics
|
|
195
|
+
: []),
|
|
196
|
+
];
|
|
197
|
+
const relevantDiagnostics: IAutoBeTypeScriptCompileResult.IDiagnostic[] =
|
|
198
|
+
filterRelevantDiagnostics(allDiagnostics, failedLocations);
|
|
199
|
+
|
|
200
|
+
// Recursively retry failed functions
|
|
201
|
+
const retriedFunctions: AutoBeRealizeFunction[] = await predicate(
|
|
202
|
+
ctx,
|
|
203
|
+
authorizations,
|
|
204
|
+
failed,
|
|
205
|
+
relevantDiagnostics,
|
|
206
|
+
progress,
|
|
207
|
+
newValidate,
|
|
208
|
+
life - 1,
|
|
209
|
+
);
|
|
210
|
+
|
|
211
|
+
return [...success, ...ignored, ...retriedFunctions];
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Extract unique file locations from validation event diagnostics
|
|
216
|
+
*
|
|
217
|
+
* @param event - Validation event containing compilation results
|
|
218
|
+
* @returns Array of unique file paths that have errors
|
|
219
|
+
*/
|
|
220
|
+
const diagnose = (event: AutoBeRealizeValidateEvent): string[] => {
|
|
221
|
+
if (event.result.type !== "failure") {
|
|
222
|
+
return [];
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
const diagnostics = event.result.diagnostics;
|
|
226
|
+
const locations = diagnostics
|
|
227
|
+
.map((d) => d.file)
|
|
228
|
+
.filter((f): f is string => f !== null);
|
|
229
|
+
|
|
230
|
+
return Array.from(new Set(locations));
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Separate correction results into successful, failed, and ignored functions
|
|
235
|
+
*
|
|
236
|
+
* @param corrections - Array of correction results
|
|
237
|
+
* @param errorLocations - File paths that still have errors
|
|
238
|
+
* @returns Object with success, failed, and ignored function arrays
|
|
239
|
+
*/
|
|
240
|
+
const separateCorrectionResults = (
|
|
241
|
+
corrections: CorrectionResult[],
|
|
242
|
+
errorLocations: string[],
|
|
243
|
+
): {
|
|
244
|
+
success: AutoBeRealizeFunction[];
|
|
245
|
+
failed: AutoBeRealizeFunction[];
|
|
246
|
+
ignored: AutoBeRealizeFunction[];
|
|
247
|
+
} => {
|
|
248
|
+
const success = corrections
|
|
249
|
+
.filter(
|
|
250
|
+
(c) =>
|
|
251
|
+
c.result === "success" && !errorLocations.includes(c.func.location),
|
|
252
|
+
)
|
|
253
|
+
.map((c) => c.func);
|
|
254
|
+
|
|
255
|
+
const failed = corrections
|
|
256
|
+
.filter(
|
|
257
|
+
(c) => c.result === "success" && errorLocations.includes(c.func.location),
|
|
258
|
+
)
|
|
259
|
+
.map((c) => c.func);
|
|
260
|
+
|
|
261
|
+
const ignored = corrections
|
|
262
|
+
.filter((c) => c.result === "ignore" || c.result === "exception")
|
|
263
|
+
.map((c) => c.func);
|
|
264
|
+
|
|
265
|
+
return { success, failed, ignored };
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Filter diagnostics to only include those relevant to specific functions
|
|
270
|
+
*
|
|
271
|
+
* @param diagnostics - All diagnostics
|
|
272
|
+
* @param functionLocations - Locations of functions to filter for
|
|
273
|
+
* @returns Filtered diagnostics
|
|
274
|
+
*/
|
|
275
|
+
const filterRelevantDiagnostics = (
|
|
276
|
+
diagnostics: IAutoBeTypeScriptCompileResult.IDiagnostic[],
|
|
277
|
+
functionLocations: string[],
|
|
278
|
+
): IAutoBeTypeScriptCompileResult.IDiagnostic[] => {
|
|
279
|
+
return diagnostics.filter(
|
|
280
|
+
(d) => d.file && functionLocations.includes(d.file),
|
|
281
|
+
);
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
const createController = <Model extends ILlmSchema.Model>(props: {
|
|
285
|
+
model: Model;
|
|
286
|
+
then: (next: IAutoBeCommonCorrectCastingApplication.IProps) => void;
|
|
287
|
+
reject: () => void;
|
|
288
|
+
}): ILlmController<Model> => {
|
|
289
|
+
assertSchemaModel(props.model);
|
|
290
|
+
const application = collection[
|
|
291
|
+
props.model === "chatgpt" ? "chatgpt" : "claude"
|
|
292
|
+
] satisfies ILlmApplication<any> as any as ILlmApplication<Model>;
|
|
293
|
+
return {
|
|
294
|
+
protocol: "class",
|
|
295
|
+
name: "correctInvalidRequest",
|
|
296
|
+
application,
|
|
297
|
+
execute: {
|
|
298
|
+
rewrite: (next) => {
|
|
299
|
+
props.then(next);
|
|
300
|
+
},
|
|
301
|
+
reject: () => {
|
|
302
|
+
props.reject();
|
|
303
|
+
},
|
|
304
|
+
} satisfies IAutoBeCommonCorrectCastingApplication,
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
const collection = {
|
|
309
|
+
chatgpt: typia.llm.application<
|
|
310
|
+
IAutoBeCommonCorrectCastingApplication,
|
|
311
|
+
"chatgpt"
|
|
312
|
+
>(),
|
|
313
|
+
claude: typia.llm.application<
|
|
314
|
+
IAutoBeCommonCorrectCastingApplication,
|
|
315
|
+
"claude"
|
|
316
|
+
>(),
|
|
317
|
+
};
|
|
@@ -15,11 +15,14 @@ import { AutoBeContext } from "../../context/AutoBeContext";
|
|
|
15
15
|
import { IAutoBeApplicationProps } from "../../context/IAutoBeApplicationProps";
|
|
16
16
|
import { executeCachedBatch } from "../../utils/executeCachedBatch";
|
|
17
17
|
import { predicateStateMessage } from "../../utils/predicateStateMessage";
|
|
18
|
+
import { compileRealizeFiles } from "./internal/compileRealizeFiles";
|
|
19
|
+
import { orchestrateRealizeCorrectCasting } from "./orchestRateRealizeCorrectCasting";
|
|
18
20
|
import { orchestrateRealizeAuthorization } from "./orchestrateRealizeAuthorization";
|
|
19
21
|
import { orchestrateRealizeCorrect } from "./orchestrateRealizeCorrect";
|
|
20
|
-
import { orchestrateRealizeScenario } from "./orchestrateRealizeScenario";
|
|
21
22
|
import { orchestrateRealizeWrite } from "./orchestrateRealizeWrite";
|
|
23
|
+
import { IAutoBeRealizeFunctionFailure } from "./structures/IAutoBeRealizeFunctionFailure";
|
|
22
24
|
import { IAutoBeRealizeScenarioResult } from "./structures/IAutoBeRealizeScenarioResult";
|
|
25
|
+
import { generateRealizeScenario } from "./utils/generateRealizeScenario";
|
|
23
26
|
|
|
24
27
|
export const orchestrateRealize =
|
|
25
28
|
<Model extends ILlmSchema.Model>(ctx: AutoBeContext<Model>) =>
|
|
@@ -59,13 +62,7 @@ export const orchestrateRealize =
|
|
|
59
62
|
|
|
60
63
|
// SCENARIOS
|
|
61
64
|
const scenarios: IAutoBeRealizeScenarioResult[] = operations.map(
|
|
62
|
-
(operation) =>
|
|
63
|
-
const authorization = authorizations.find(
|
|
64
|
-
(el) => el.role.name === operation.authorizationRole,
|
|
65
|
-
);
|
|
66
|
-
|
|
67
|
-
return orchestrateRealizeScenario(ctx, operation, authorization);
|
|
68
|
-
},
|
|
65
|
+
(operation) => generateRealizeScenario(ctx, operation, authorizations),
|
|
69
66
|
);
|
|
70
67
|
|
|
71
68
|
const writeProgress: AutoBeProgressEventBase = {
|
|
@@ -107,24 +104,42 @@ export const orchestrateRealize =
|
|
|
107
104
|
completed: writeEvents.length,
|
|
108
105
|
};
|
|
109
106
|
|
|
110
|
-
const
|
|
107
|
+
const converted: AutoBeRealizeFunction[] =
|
|
108
|
+
await orchestrateRealizeCorrectCasting(
|
|
109
|
+
ctx,
|
|
110
|
+
authorizations,
|
|
111
|
+
functions,
|
|
112
|
+
reviewProgress,
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
console.log("converted end");
|
|
116
|
+
console.log("converted end");
|
|
117
|
+
console.log("converted end");
|
|
118
|
+
console.log("converted end");
|
|
119
|
+
console.log("converted end");
|
|
120
|
+
console.log("converted end");
|
|
121
|
+
const corrected: AutoBeRealizeFunction[] = await orchestrateRealizeCorrect(
|
|
111
122
|
ctx,
|
|
112
123
|
scenarios,
|
|
113
124
|
authorizations,
|
|
114
|
-
|
|
115
|
-
[],
|
|
125
|
+
converted,
|
|
126
|
+
[] satisfies IAutoBeRealizeFunctionFailure[],
|
|
116
127
|
reviewProgress,
|
|
117
|
-
5,
|
|
118
128
|
);
|
|
119
129
|
|
|
120
130
|
const compiler: IAutoBeCompiler = await ctx.compiler();
|
|
121
131
|
const controllers: Record<string, string> =
|
|
122
132
|
await compiler.realize.controller({
|
|
123
133
|
document: ctx.state().interface!.document,
|
|
124
|
-
functions,
|
|
134
|
+
functions: corrected,
|
|
125
135
|
authorizations,
|
|
126
136
|
});
|
|
127
137
|
|
|
138
|
+
const { result } = await compileRealizeFiles(ctx, {
|
|
139
|
+
authorizations,
|
|
140
|
+
functions: corrected,
|
|
141
|
+
});
|
|
142
|
+
|
|
128
143
|
return ctx.dispatch({
|
|
129
144
|
type: "realizeComplete",
|
|
130
145
|
id: v7(),
|
|
@@ -132,7 +147,7 @@ export const orchestrateRealize =
|
|
|
132
147
|
functions,
|
|
133
148
|
authorizations,
|
|
134
149
|
controllers,
|
|
135
|
-
compiled: result
|
|
150
|
+
compiled: result,
|
|
136
151
|
step: ctx.state().analyze?.step ?? 0,
|
|
137
152
|
elapsed: new Date().getTime() - start.getTime(),
|
|
138
153
|
});
|
|
@@ -68,7 +68,7 @@ export async function orchestrateRealizeAuthorizationCorrect<
|
|
|
68
68
|
|
|
69
69
|
if (compiled.type === "success") {
|
|
70
70
|
return authorization;
|
|
71
|
-
} else if (compiled.type === "exception" || life
|
|
71
|
+
} else if (compiled.type === "exception" || life < 0) {
|
|
72
72
|
return authorization;
|
|
73
73
|
}
|
|
74
74
|
|