@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
|
@@ -162,6 +162,15 @@ export class AutoBeTokenUsage implements IAutoBeTokenUsageJson {
|
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
+
public assign(props: IAutoBeTokenUsageJson) {
|
|
166
|
+
this.facade.assign(props.facade);
|
|
167
|
+
this.analyze.assign(props.analyze);
|
|
168
|
+
this.prisma.assign(props.prisma);
|
|
169
|
+
this.interface.assign(props.interface);
|
|
170
|
+
this.test.assign(props.test);
|
|
171
|
+
this.realize.assign(props.realize);
|
|
172
|
+
}
|
|
173
|
+
|
|
165
174
|
/**
|
|
166
175
|
* Serialize token usage data to JSON format.
|
|
167
176
|
*
|
|
@@ -101,6 +101,15 @@ export class AutoBeTokenUsageComponent
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
public assign(props: IAutoBeTokenUsageJson.IComponent) {
|
|
105
|
+
this.input.total = props.input.total;
|
|
106
|
+
this.input.cached = props.input.cached;
|
|
107
|
+
this.output.total = props.output.total;
|
|
108
|
+
this.output.reasoning = props.output.reasoning;
|
|
109
|
+
this.output.accepted_prediction = props.output.accepted_prediction;
|
|
110
|
+
this.output.rejected_prediction = props.output.rejected_prediction;
|
|
111
|
+
}
|
|
112
|
+
|
|
104
113
|
/**
|
|
105
114
|
* Export token usage data as JSON.
|
|
106
115
|
*
|
|
@@ -32,7 +32,7 @@ export const consentFunctionCall = async (props: {
|
|
|
32
32
|
vendor: props.vendor,
|
|
33
33
|
config: {
|
|
34
34
|
...(props.config ?? []),
|
|
35
|
-
retry: props.config?.retry ?? AutoBeConfigConstant.
|
|
35
|
+
retry: props.config?.retry ?? AutoBeConfigConstant.RETRY,
|
|
36
36
|
executor: {
|
|
37
37
|
describe: null,
|
|
38
38
|
},
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
IAutoBeTokenUsageJson,
|
|
25
25
|
} from "@autobe/interface";
|
|
26
26
|
import { ILlmSchema } from "@samchon/openapi";
|
|
27
|
+
import { Semaphore } from "tstl";
|
|
27
28
|
import typia from "typia";
|
|
28
29
|
import { v7 } from "uuid";
|
|
29
30
|
|
|
@@ -35,7 +36,10 @@ import { AutoBeTokenUsageComponent } from "../context/AutoBeTokenUsageComponent"
|
|
|
35
36
|
import { IAutoBeApplication } from "../context/IAutoBeApplication";
|
|
36
37
|
import { IAutoBeConfig } from "../structures/IAutoBeConfig";
|
|
37
38
|
import { IAutoBeVendor } from "../structures/IAutoBeVendor";
|
|
39
|
+
import { AutoBeTimeoutError } from "../utils/AutoBeTimeoutError";
|
|
40
|
+
import { TimeoutConversation } from "../utils/TimeoutConversation";
|
|
38
41
|
import { consentFunctionCall } from "./consentFunctionCall";
|
|
42
|
+
import { getCriticalCompiler } from "./getCriticalCompiler";
|
|
39
43
|
|
|
40
44
|
export const createAutoBeContext = <Model extends ILlmSchema.Model>(props: {
|
|
41
45
|
model: Model;
|
|
@@ -49,16 +53,23 @@ export const createAutoBeContext = <Model extends ILlmSchema.Model>(props: {
|
|
|
49
53
|
usage: () => AutoBeTokenUsage;
|
|
50
54
|
dispatch: (event: AutoBeEvent) => Promise<void>;
|
|
51
55
|
}): AutoBeContext<Model> => {
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
56
|
+
const config: Required<Omit<IAutoBeConfig, "backoffStrategy" | "timezone">> =
|
|
57
|
+
{
|
|
58
|
+
retry: props.config.retry ?? AutoBeConfigConstant.RETRY,
|
|
59
|
+
locale: props.config.locale ?? "en-US",
|
|
60
|
+
timeout: props.config.timeout ?? AutoBeConfigConstant.TIMEOUT,
|
|
61
|
+
};
|
|
62
|
+
const critical: Semaphore = new Semaphore(2);
|
|
55
63
|
return {
|
|
56
64
|
model: props.model,
|
|
57
65
|
vendor: props.vendor,
|
|
58
|
-
retry,
|
|
59
|
-
locale,
|
|
66
|
+
retry: config.retry,
|
|
67
|
+
locale: config.locale,
|
|
60
68
|
compilerListener: props.compilerListener,
|
|
61
|
-
compiler:
|
|
69
|
+
compiler: async () => {
|
|
70
|
+
const compiler = await props.compiler();
|
|
71
|
+
return getCriticalCompiler(critical, compiler);
|
|
72
|
+
},
|
|
62
73
|
files: props.files,
|
|
63
74
|
histories: props.histories,
|
|
64
75
|
state: props.state,
|
|
@@ -66,17 +77,25 @@ export const createAutoBeContext = <Model extends ILlmSchema.Model>(props: {
|
|
|
66
77
|
dispatch: createDispatch(props),
|
|
67
78
|
assistantMessage: (message) => {
|
|
68
79
|
props.histories().push(message);
|
|
69
|
-
setTimeout(() =>
|
|
80
|
+
setTimeout(() => {
|
|
81
|
+
void props.dispatch(message).catch(() => {});
|
|
82
|
+
});
|
|
70
83
|
return message;
|
|
71
84
|
},
|
|
72
85
|
conversate: async (next, closure) => {
|
|
86
|
+
const trial = {
|
|
87
|
+
request: 0,
|
|
88
|
+
response: 0,
|
|
89
|
+
timeout: 0,
|
|
90
|
+
};
|
|
73
91
|
const execute = async (): Promise<AutoBeContext.IResult<Model>> => {
|
|
92
|
+
// CREATE AGENT
|
|
74
93
|
const agent: MicroAgentica<Model> = new MicroAgentica<Model>({
|
|
75
94
|
model: props.model,
|
|
76
95
|
vendor: props.vendor,
|
|
77
96
|
config: {
|
|
78
97
|
...(props.config ?? {}),
|
|
79
|
-
retry: props.config?.retry ?? AutoBeConfigConstant.
|
|
98
|
+
retry: props.config?.retry ?? AutoBeConfigConstant.RETRY,
|
|
80
99
|
executor: {
|
|
81
100
|
describe: null,
|
|
82
101
|
},
|
|
@@ -84,6 +103,8 @@ export const createAutoBeContext = <Model extends ILlmSchema.Model>(props: {
|
|
|
84
103
|
histories: next.histories,
|
|
85
104
|
controllers: [next.controller],
|
|
86
105
|
});
|
|
106
|
+
|
|
107
|
+
// ADD EVENT LISTENERS
|
|
87
108
|
agent.on("request", async (event) => {
|
|
88
109
|
if (next.enforceFunctionCall === true && event.body.tools)
|
|
89
110
|
event.body.tool_choice = "required";
|
|
@@ -95,14 +116,16 @@ export const createAutoBeContext = <Model extends ILlmSchema.Model>(props: {
|
|
|
95
116
|
...event,
|
|
96
117
|
type: "vendorRequest",
|
|
97
118
|
source: next.source,
|
|
119
|
+
retry: trial.request++,
|
|
98
120
|
});
|
|
99
121
|
});
|
|
100
|
-
agent.on("response", (event) => {
|
|
122
|
+
agent.on("response", async (event) => {
|
|
101
123
|
void props
|
|
102
124
|
.dispatch({
|
|
103
125
|
...event,
|
|
104
126
|
type: "vendorResponse",
|
|
105
127
|
source: next.source,
|
|
128
|
+
retry: trial.response++,
|
|
106
129
|
})
|
|
107
130
|
.catch(() => {});
|
|
108
131
|
});
|
|
@@ -121,15 +144,20 @@ export const createAutoBeContext = <Model extends ILlmSchema.Model>(props: {
|
|
|
121
144
|
id: v7(),
|
|
122
145
|
source: next.source,
|
|
123
146
|
result: event.result,
|
|
147
|
+
life: event.life,
|
|
124
148
|
created_at: event.created_at,
|
|
125
149
|
})
|
|
126
150
|
.catch(() => {});
|
|
127
151
|
});
|
|
128
152
|
if (closure) closure(agent);
|
|
129
153
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
154
|
+
// DO CONVERSATE
|
|
155
|
+
const result: TimeoutConversation.IResult<Model> =
|
|
156
|
+
await TimeoutConversation.process({
|
|
157
|
+
agent,
|
|
158
|
+
timeout: config.timeout,
|
|
159
|
+
message: next.message,
|
|
160
|
+
});
|
|
133
161
|
const tokenUsage: IAutoBeTokenUsageJson.IComponent = agent
|
|
134
162
|
.getTokenUsage()
|
|
135
163
|
.toJSON().aggregate;
|
|
@@ -139,10 +167,25 @@ export const createAutoBeContext = <Model extends ILlmSchema.Model>(props: {
|
|
|
139
167
|
STAGES.find((stage) => next.source.startsWith(stage)) ?? "analyze",
|
|
140
168
|
]);
|
|
141
169
|
|
|
142
|
-
if (
|
|
170
|
+
if (result.type === "error") throw result.error;
|
|
171
|
+
else if (result.type === "timeout") {
|
|
172
|
+
void props
|
|
173
|
+
.dispatch({
|
|
174
|
+
type: "vendorTimeout",
|
|
175
|
+
id: v7(),
|
|
176
|
+
source: next.source,
|
|
177
|
+
timeout: config.timeout,
|
|
178
|
+
retry: trial.timeout++,
|
|
179
|
+
created_at: new Date().toISOString(),
|
|
180
|
+
})
|
|
181
|
+
.catch(() => {});
|
|
182
|
+
throw result.error;
|
|
183
|
+
} else if (
|
|
143
184
|
true === next.enforceFunctionCall &&
|
|
144
185
|
false ===
|
|
145
|
-
histories.some(
|
|
186
|
+
result.histories.some(
|
|
187
|
+
(h) => h.type === "execute" && h.success === true,
|
|
188
|
+
)
|
|
146
189
|
) {
|
|
147
190
|
const failure = () => {
|
|
148
191
|
throw new Error(
|
|
@@ -150,7 +193,7 @@ export const createAutoBeContext = <Model extends ILlmSchema.Model>(props: {
|
|
|
150
193
|
);
|
|
151
194
|
};
|
|
152
195
|
const last: MicroAgenticaHistory<Model> | undefined =
|
|
153
|
-
histories.at(-1);
|
|
196
|
+
result.histories.at(-1);
|
|
154
197
|
if (
|
|
155
198
|
last?.type === "assistantMessage" &&
|
|
156
199
|
last.text.trim().length !== 0
|
|
@@ -195,10 +238,14 @@ export const createAutoBeContext = <Model extends ILlmSchema.Model>(props: {
|
|
|
195
238
|
}
|
|
196
239
|
failure();
|
|
197
240
|
}
|
|
198
|
-
return {
|
|
241
|
+
return {
|
|
242
|
+
histories: result.histories,
|
|
243
|
+
tokenUsage,
|
|
244
|
+
};
|
|
199
245
|
};
|
|
200
|
-
if (next.enforceFunctionCall === true)
|
|
201
|
-
|
|
246
|
+
if (next.enforceFunctionCall === true)
|
|
247
|
+
return await forceRetry(execute, config.retry);
|
|
248
|
+
else return await execute();
|
|
202
249
|
},
|
|
203
250
|
};
|
|
204
251
|
};
|
|
@@ -312,7 +359,7 @@ const createDispatch = (props: {
|
|
|
312
359
|
step: event.step,
|
|
313
360
|
} satisfies AutoBeRealizeHistory,
|
|
314
361
|
}) as AutoBeContext.DispatchHistory<Event>;
|
|
315
|
-
props.dispatch(event).catch(() => {});
|
|
362
|
+
void props.dispatch(event).catch(() => {});
|
|
316
363
|
return null as AutoBeContext.DispatchHistory<Event>;
|
|
317
364
|
};
|
|
318
365
|
};
|
|
@@ -333,7 +380,7 @@ const transformAndDispatch = <
|
|
|
333
380
|
}): NonNullable<AutoBeContext.DispatchHistory<Event>> => {
|
|
334
381
|
props.histories().push(props.history);
|
|
335
382
|
props.state()[props.history.type] = props.history as any;
|
|
336
|
-
props.dispatch(props.event).catch(() => {});
|
|
383
|
+
void props.dispatch(props.event).catch(() => {});
|
|
337
384
|
return props.history;
|
|
338
385
|
};
|
|
339
386
|
|
|
@@ -346,6 +393,7 @@ const forceRetry = async <T>(
|
|
|
346
393
|
try {
|
|
347
394
|
return await task();
|
|
348
395
|
} catch (e) {
|
|
396
|
+
if (e instanceof AutoBeTimeoutError) throw e;
|
|
349
397
|
error = e;
|
|
350
398
|
}
|
|
351
399
|
throw error;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { IAutoBeCompiler } from "@autobe/interface";
|
|
2
|
+
import { Semaphore } from "tstl";
|
|
3
|
+
|
|
4
|
+
export const getCriticalCompiler = (
|
|
5
|
+
critical: Semaphore,
|
|
6
|
+
compiler: IAutoBeCompiler,
|
|
7
|
+
): IAutoBeCompiler => {
|
|
8
|
+
const lock = async (func: () => Promise<any>) => {
|
|
9
|
+
await critical.acquire();
|
|
10
|
+
try {
|
|
11
|
+
return await func();
|
|
12
|
+
} finally {
|
|
13
|
+
await critical.release();
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
return {
|
|
17
|
+
prisma: {
|
|
18
|
+
compile: (props) => lock(() => compiler.prisma.compile(props)),
|
|
19
|
+
validate: (app) => lock(() => compiler.prisma.validate(app)),
|
|
20
|
+
write: (app, dmbs) => lock(() => compiler.prisma.write(app, dmbs)),
|
|
21
|
+
},
|
|
22
|
+
interface: {
|
|
23
|
+
write: (doc) => lock(() => compiler.interface.write(doc)),
|
|
24
|
+
transform: (doc) => lock(() => compiler.interface.transform(doc)),
|
|
25
|
+
invert: (doc) => lock(() => compiler.interface.invert(doc)),
|
|
26
|
+
getTemplate: () => lock(() => compiler.interface.getTemplate()),
|
|
27
|
+
},
|
|
28
|
+
typescript: {
|
|
29
|
+
compile: (props) => lock(() => compiler.typescript.compile(props)),
|
|
30
|
+
getExternal: (location) =>
|
|
31
|
+
lock(() => compiler.typescript.getExternal(location)),
|
|
32
|
+
beautify: (code) => lock(() => compiler.typescript.beautify(code)),
|
|
33
|
+
},
|
|
34
|
+
test: {
|
|
35
|
+
compile: (props) => lock(() => compiler.test.compile(props)),
|
|
36
|
+
validate: (props) => lock(() => compiler.test.validate(props)),
|
|
37
|
+
write: (props) => lock(() => compiler.test.write(props)),
|
|
38
|
+
getExternal: () => lock(() => compiler.test.getExternal()),
|
|
39
|
+
getTemplate: () => lock(() => compiler.test.getTemplate()),
|
|
40
|
+
},
|
|
41
|
+
realize: {
|
|
42
|
+
controller: (props) => lock(() => compiler.realize.controller(props)),
|
|
43
|
+
test: (props) => lock(() => compiler.realize.test(props)),
|
|
44
|
+
getTemplate: () => lock(() => compiler.realize.getTemplate()),
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -28,7 +28,7 @@ export const orchestrateAnalyzeWrite = async <Model extends ILlmSchema.Model>(
|
|
|
28
28
|
const pointer: IPointer<IAutoBeAnalyzeWriteApplication.IProps | null> = {
|
|
29
29
|
value: null,
|
|
30
30
|
};
|
|
31
|
-
const {
|
|
31
|
+
const { tokenUsage } = await ctx.conversate({
|
|
32
32
|
source: "analyzeWrite",
|
|
33
33
|
controller: createController<Model>({
|
|
34
34
|
model: ctx.model,
|
|
@@ -39,10 +39,8 @@ export const orchestrateAnalyzeWrite = async <Model extends ILlmSchema.Model>(
|
|
|
39
39
|
promptCacheKey,
|
|
40
40
|
message: "Write requirement analysis report.",
|
|
41
41
|
});
|
|
42
|
-
if (pointer.value === null)
|
|
43
|
-
console.log(JSON.stringify(histories, null, 2));
|
|
42
|
+
if (pointer.value === null)
|
|
44
43
|
throw new Error("The Analyze Agent failed to create the document.");
|
|
45
|
-
}
|
|
46
44
|
|
|
47
45
|
const event: AutoBeAnalyzeWriteEvent = {
|
|
48
46
|
type: "analyzeWrite",
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
|
+
import { IAutoBeTypeScriptCompileResult } from "@autobe/interface";
|
|
3
|
+
import { StringUtil } from "@autobe/utils";
|
|
4
|
+
import { v7 } from "uuid";
|
|
5
|
+
|
|
6
|
+
import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
|
|
7
|
+
|
|
8
|
+
interface IFailure {
|
|
9
|
+
diagnostics: IAutoBeTypeScriptCompileResult.IDiagnostic[];
|
|
10
|
+
script: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const transformCommonCorrectCastingHistories = (
|
|
14
|
+
failures: IFailure[],
|
|
15
|
+
): Array<
|
|
16
|
+
IAgenticaHistoryJson.IAssistantMessage | IAgenticaHistoryJson.ISystemMessage
|
|
17
|
+
> => [
|
|
18
|
+
{
|
|
19
|
+
id: v7(),
|
|
20
|
+
created_at: new Date().toISOString(),
|
|
21
|
+
type: "systemMessage",
|
|
22
|
+
text: AutoBeSystemPromptConstant.COMMON_CORRECT_CASTING,
|
|
23
|
+
},
|
|
24
|
+
...failures.map(
|
|
25
|
+
(f, i, array) =>
|
|
26
|
+
({
|
|
27
|
+
id: v7(),
|
|
28
|
+
created_at: new Date().toISOString(),
|
|
29
|
+
type: "assistantMessage",
|
|
30
|
+
text: StringUtil.trim`
|
|
31
|
+
# ${i === array.length - 1 ? "Latest Failure" : "Previous Failure"}
|
|
32
|
+
## Generated TypeScript Code
|
|
33
|
+
\`\`\`typescript
|
|
34
|
+
${f.script}
|
|
35
|
+
\`\`\`
|
|
36
|
+
## Compile Errors
|
|
37
|
+
\`\`\`json
|
|
38
|
+
${JSON.stringify(f.diagnostics)}
|
|
39
|
+
\`\`\`
|
|
40
|
+
`,
|
|
41
|
+
}) satisfies IAgenticaHistoryJson.IAssistantMessage,
|
|
42
|
+
),
|
|
43
|
+
];
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AutoBeRealizeCorrectEvent,
|
|
3
|
+
AutoBeRealizeValidateEvent,
|
|
4
|
+
AutoBeTestCorrectEvent,
|
|
5
|
+
AutoBeTestValidateEvent,
|
|
6
|
+
IAutoBeTokenUsageJson,
|
|
7
|
+
IAutoBeTypeScriptCompileResult,
|
|
8
|
+
} from "@autobe/interface";
|
|
9
|
+
import { StringUtil } from "@autobe/utils";
|
|
10
|
+
import { ILlmApplication, ILlmController, ILlmSchema } 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 { transformCommonCorrectCastingHistories } from "./histories/transformCommonCorrectCastingHistories";
|
|
17
|
+
import { IAutoBeCommonCorrectCastingApplication } from "./structures/IAutoBeCommonCorrectCastingApplication";
|
|
18
|
+
|
|
19
|
+
interface IFactoryProps<
|
|
20
|
+
ValidateEvent extends AutoBeTestValidateEvent | AutoBeRealizeValidateEvent,
|
|
21
|
+
CorrectEvent extends AutoBeTestCorrectEvent | AutoBeRealizeCorrectEvent,
|
|
22
|
+
> {
|
|
23
|
+
validate(script: string): Promise<ValidateEvent>;
|
|
24
|
+
correct(next: {
|
|
25
|
+
failure: IAutoBeTypeScriptCompileResult.IFailure;
|
|
26
|
+
think: string;
|
|
27
|
+
draft: string;
|
|
28
|
+
review: string | undefined;
|
|
29
|
+
final: string | undefined;
|
|
30
|
+
tokenUsage: IAutoBeTokenUsageJson.IComponent;
|
|
31
|
+
}): CorrectEvent;
|
|
32
|
+
script(event: ValidateEvent): string;
|
|
33
|
+
source: "testCorrect" | "realizeCorrect";
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const orchestrateCommonCorrectCasting = async <
|
|
37
|
+
Model extends ILlmSchema.Model,
|
|
38
|
+
ValidateEvent extends AutoBeTestValidateEvent | AutoBeRealizeValidateEvent,
|
|
39
|
+
CorrectEvent extends AutoBeTestCorrectEvent | AutoBeRealizeCorrectEvent,
|
|
40
|
+
>(
|
|
41
|
+
ctx: AutoBeContext<Model>,
|
|
42
|
+
factory: IFactoryProps<ValidateEvent, CorrectEvent>,
|
|
43
|
+
script: string,
|
|
44
|
+
): Promise<ValidateEvent> => {
|
|
45
|
+
const event: ValidateEvent = await factory.validate(script);
|
|
46
|
+
return await predicate(ctx, factory, [], script, event, ctx.retry);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const predicate = async <
|
|
50
|
+
Model extends ILlmSchema.Model,
|
|
51
|
+
ValidateEvent extends AutoBeTestValidateEvent | AutoBeRealizeValidateEvent,
|
|
52
|
+
CorrectEvent extends AutoBeTestCorrectEvent | AutoBeRealizeCorrectEvent,
|
|
53
|
+
>(
|
|
54
|
+
ctx: AutoBeContext<Model>,
|
|
55
|
+
factory: IFactoryProps<ValidateEvent, CorrectEvent>,
|
|
56
|
+
failures: ValidateEvent[],
|
|
57
|
+
script: string,
|
|
58
|
+
event: ValidateEvent,
|
|
59
|
+
life: number,
|
|
60
|
+
): Promise<ValidateEvent> => {
|
|
61
|
+
if (event.result.type === "failure") {
|
|
62
|
+
ctx.dispatch(event);
|
|
63
|
+
return await correct(ctx, factory, failures, script, event, life - 1);
|
|
64
|
+
}
|
|
65
|
+
return event;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const correct = async <
|
|
69
|
+
Model extends ILlmSchema.Model,
|
|
70
|
+
ValidateEvent extends AutoBeTestValidateEvent | AutoBeRealizeValidateEvent,
|
|
71
|
+
CorrectEvent extends AutoBeTestCorrectEvent | AutoBeRealizeCorrectEvent,
|
|
72
|
+
>(
|
|
73
|
+
ctx: AutoBeContext<Model>,
|
|
74
|
+
factory: IFactoryProps<ValidateEvent, CorrectEvent>,
|
|
75
|
+
failures: ValidateEvent[],
|
|
76
|
+
script: string,
|
|
77
|
+
event: ValidateEvent,
|
|
78
|
+
life: number,
|
|
79
|
+
): Promise<ValidateEvent> => {
|
|
80
|
+
if (event.result.type !== "failure") return event;
|
|
81
|
+
else if (life < 0) return event;
|
|
82
|
+
|
|
83
|
+
const pointer: IPointer<
|
|
84
|
+
IAutoBeCommonCorrectCastingApplication.IProps | false | null
|
|
85
|
+
> = {
|
|
86
|
+
value: null,
|
|
87
|
+
};
|
|
88
|
+
const { tokenUsage } = await ctx.conversate({
|
|
89
|
+
source: factory.source,
|
|
90
|
+
histories: transformCommonCorrectCastingHistories(
|
|
91
|
+
[...failures, event].map((e) => ({
|
|
92
|
+
diagnostics: (e.result as IAutoBeTypeScriptCompileResult.IFailure)
|
|
93
|
+
.diagnostics,
|
|
94
|
+
script: factory.script(e),
|
|
95
|
+
})),
|
|
96
|
+
),
|
|
97
|
+
controller: createController({
|
|
98
|
+
model: ctx.model,
|
|
99
|
+
then: (next) => {
|
|
100
|
+
pointer.value = next;
|
|
101
|
+
},
|
|
102
|
+
reject: () => {
|
|
103
|
+
pointer.value = false;
|
|
104
|
+
},
|
|
105
|
+
}),
|
|
106
|
+
enforceFunctionCall: true,
|
|
107
|
+
message: StringUtil.trim`
|
|
108
|
+
Fix the TypeScript casting problems to resolve the compilation error.
|
|
109
|
+
|
|
110
|
+
You don't need to explain me anything, but just fix or give it up
|
|
111
|
+
immediately without any hesitation, explanation, and questions.
|
|
112
|
+
`,
|
|
113
|
+
});
|
|
114
|
+
if (pointer.value === null) throw new Error("Failed to correct test code.");
|
|
115
|
+
else if (pointer.value === false) return event;
|
|
116
|
+
|
|
117
|
+
ctx.dispatch(
|
|
118
|
+
factory.correct({
|
|
119
|
+
failure: event.result,
|
|
120
|
+
think: pointer.value.think,
|
|
121
|
+
draft: pointer.value.draft,
|
|
122
|
+
review: pointer.value.revise.review,
|
|
123
|
+
final: pointer.value.revise.final,
|
|
124
|
+
tokenUsage,
|
|
125
|
+
}),
|
|
126
|
+
);
|
|
127
|
+
return await predicate(
|
|
128
|
+
ctx,
|
|
129
|
+
factory,
|
|
130
|
+
[...failures, event],
|
|
131
|
+
script,
|
|
132
|
+
await factory.validate(pointer.value.revise.final),
|
|
133
|
+
life - 1,
|
|
134
|
+
);
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
const createController = <Model extends ILlmSchema.Model>(props: {
|
|
138
|
+
model: Model;
|
|
139
|
+
then: (next: IAutoBeCommonCorrectCastingApplication.IProps) => void;
|
|
140
|
+
reject: () => void;
|
|
141
|
+
}): ILlmController<Model> => {
|
|
142
|
+
assertSchemaModel(props.model);
|
|
143
|
+
const application = collection[
|
|
144
|
+
props.model === "chatgpt" ? "chatgpt" : "claude"
|
|
145
|
+
] satisfies ILlmApplication<any> as any as ILlmApplication<Model>;
|
|
146
|
+
return {
|
|
147
|
+
protocol: "class",
|
|
148
|
+
name: "correctInvalidRequest",
|
|
149
|
+
application,
|
|
150
|
+
execute: {
|
|
151
|
+
rewrite: (next) => {
|
|
152
|
+
props.then(next);
|
|
153
|
+
},
|
|
154
|
+
reject: () => {
|
|
155
|
+
props.reject();
|
|
156
|
+
},
|
|
157
|
+
} satisfies IAutoBeCommonCorrectCastingApplication,
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
const collection = {
|
|
162
|
+
chatgpt: typia.llm.application<
|
|
163
|
+
IAutoBeCommonCorrectCastingApplication,
|
|
164
|
+
"chatgpt"
|
|
165
|
+
>(),
|
|
166
|
+
claude: typia.llm.application<
|
|
167
|
+
IAutoBeCommonCorrectCastingApplication,
|
|
168
|
+
"claude"
|
|
169
|
+
>(),
|
|
170
|
+
};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function calling interface for fixing TypeScript type casting and assignment errors.
|
|
3
|
+
*
|
|
4
|
+
* This interface is used by the CommonCorrectCasting agent to fix TypeScript
|
|
5
|
+
* compilation errors related to type casting and type assignment incompatibilities
|
|
6
|
+
* in any TypeScript code, not limited to e2e tests.
|
|
7
|
+
*
|
|
8
|
+
* The agent handles various type casting issues including:
|
|
9
|
+
*
|
|
10
|
+
* - **Typia tag type incompatibilities**: Format tag mismatches (e.g., Format<"uuid">
|
|
11
|
+
* vs Pattern<...>), type constraint incompatibilities (e.g., Type<"int32"> vs
|
|
12
|
+
* Type<"int32"> & Minimum<0>), nullable type conversions with tags
|
|
13
|
+
* - **Date to string conversions**: Date to string, Date to string & Format<"date-time">,
|
|
14
|
+
* nullable Date handling
|
|
15
|
+
* - **Nullable and undefined type assignments**: Exhaustive type narrowing for
|
|
16
|
+
* T | null | undefined patterns
|
|
17
|
+
* - **String to literal type assignments**: Converting general string to literal
|
|
18
|
+
* union types (e.g., "pending" | "approved" | "rejected")
|
|
19
|
+
* - **Optional chaining with union types**: Handling boolean | undefined results
|
|
20
|
+
* from array methods like includes()
|
|
21
|
+
* - **Type narrowing "no overlap" errors**: Removing redundant comparisons after
|
|
22
|
+
* TypeScript's control flow analysis
|
|
23
|
+
*
|
|
24
|
+
* @author Samchon
|
|
25
|
+
*/
|
|
26
|
+
export interface IAutoBeCommonCorrectCastingApplication {
|
|
27
|
+
/**
|
|
28
|
+
* Rewrite function to fix type casting and assignment errors.
|
|
29
|
+
*
|
|
30
|
+
* This function is called when the agent detects any type casting or assignment
|
|
31
|
+
* related compilation error patterns.
|
|
32
|
+
*
|
|
33
|
+
* The agent applies various fix strategies based on the error type:
|
|
34
|
+
*
|
|
35
|
+
* - **Typia tag incompatibilities**: Uses `satisfies ... as ...` pattern to strip
|
|
36
|
+
* incompatible tags, or `typia.assert<T>()` as a last resort
|
|
37
|
+
* - **Date conversions**: Uses `.toISOString()` method for Date to string conversions
|
|
38
|
+
* - **Nullable type narrowing**: Applies exhaustive checks (e.g., !== null && !== undefined)
|
|
39
|
+
* - **typia.assert vs assertGuard**: Uses assert for value assignment, assertGuard
|
|
40
|
+
* for type narrowing
|
|
41
|
+
* - **Literal type conversions**: Uses `typia.assert<T>()` for runtime validation
|
|
42
|
+
* - **Optional chaining results**: Uses `=== true` or `??` operators
|
|
43
|
+
* - **"No overlap" errors**: Removes redundant comparisons
|
|
44
|
+
*
|
|
45
|
+
* @param props - The analysis and correction properties
|
|
46
|
+
* @param props.think - Analysis of the type casting issue found
|
|
47
|
+
* @param props.draft - Initial corrected code with type fixes applied
|
|
48
|
+
* @param props.revise - Review of corrections and final code
|
|
49
|
+
*/
|
|
50
|
+
rewrite(props: IAutoBeCommonCorrectCastingApplication.IProps): void;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Reject function when error is not related to type casting or assignment.
|
|
54
|
+
*
|
|
55
|
+
* This function is called when the compilation error is unrelated to type
|
|
56
|
+
* casting issues (e.g., missing imports, syntax errors, undefined variables),
|
|
57
|
+
* indicating the error should be handled by a different agent.
|
|
58
|
+
*/
|
|
59
|
+
reject(): void;
|
|
60
|
+
}
|
|
61
|
+
export namespace IAutoBeCommonCorrectCastingApplication {
|
|
62
|
+
/**
|
|
63
|
+
* Properties for the rewrite function containing the type casting error
|
|
64
|
+
* analysis and correction workflow.
|
|
65
|
+
*/
|
|
66
|
+
export interface IProps {
|
|
67
|
+
/**
|
|
68
|
+
* Initial analysis of the type casting or assignment error.
|
|
69
|
+
*
|
|
70
|
+
* Contains the agent's analysis of the specific type mismatch pattern:
|
|
71
|
+
*
|
|
72
|
+
* - Type of casting error (tag incompatibility, nullable assignment, literal
|
|
73
|
+
* type conversion, etc.)
|
|
74
|
+
* - Whether nullable or undefined types are involved
|
|
75
|
+
* - If Date to string conversions are needed
|
|
76
|
+
* - The chosen fix strategy for the specific error type
|
|
77
|
+
*/
|
|
78
|
+
think: string;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Draft correction with initial type casting fixes.
|
|
82
|
+
*
|
|
83
|
+
* The code after applying the first round of fixes:
|
|
84
|
+
*
|
|
85
|
+
* - Satisfies patterns for tag stripping
|
|
86
|
+
* - Date.toISOString() conversions where needed
|
|
87
|
+
* - Nullable type narrowing checks
|
|
88
|
+
* - Literal type assertions
|
|
89
|
+
* - Optional chaining result handling
|
|
90
|
+
*/
|
|
91
|
+
draft: string;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Review and finalization of type casting corrections.
|
|
95
|
+
*
|
|
96
|
+
* Contains the review of applied corrections and the final code with all
|
|
97
|
+
* type casting issues resolved while preserving type safety and validation intent.
|
|
98
|
+
*/
|
|
99
|
+
revise: IReviseProps;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** Properties for the revision phase of type casting corrections. */
|
|
103
|
+
export interface IReviseProps {
|
|
104
|
+
/**
|
|
105
|
+
* Review of the type casting correction patterns applied.
|
|
106
|
+
*
|
|
107
|
+
* Explains which correction strategies were used:
|
|
108
|
+
*
|
|
109
|
+
* - Which satisfies patterns were applied for tag issues
|
|
110
|
+
* - Where typia.assert or assertGuard was used
|
|
111
|
+
* - How Date conversions were handled
|
|
112
|
+
* - What nullable type narrowing was applied
|
|
113
|
+
* - How literal type conversions were resolved
|
|
114
|
+
* - Confirmation that all type casting issues are resolved
|
|
115
|
+
*/
|
|
116
|
+
review: string;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Final corrected code with all type casting issues resolved.
|
|
120
|
+
*
|
|
121
|
+
* The complete code ready for TypeScript compilation, with all type casting
|
|
122
|
+
* and assignment errors properly fixed using appropriate patterns while
|
|
123
|
+
* maintaining type safety and the original validation logic.
|
|
124
|
+
*/
|
|
125
|
+
final: string;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IAgenticaHistoryJson } from "@agentica/core";
|
|
2
2
|
import { AutoBeOpenApi } from "@autobe/interface";
|
|
3
|
-
import {
|
|
3
|
+
import { v7 } from "uuid";
|
|
4
4
|
|
|
5
5
|
import { AutoBeSystemPromptConstant } from "../../../constants/AutoBeSystemPromptConstant";
|
|
6
6
|
import { AutoBeState } from "../../../context/AutoBeState";
|
|
@@ -14,13 +14,13 @@ export const transformInterfaceEndpointsReviewHistories = (
|
|
|
14
14
|
> => [
|
|
15
15
|
{
|
|
16
16
|
type: "systemMessage",
|
|
17
|
-
id:
|
|
17
|
+
id: v7(),
|
|
18
18
|
created_at: new Date().toISOString(),
|
|
19
19
|
text: AutoBeSystemPromptConstant.INTERFACE_ENDPOINT,
|
|
20
20
|
},
|
|
21
21
|
...transformInterfaceAssetHistories(state),
|
|
22
22
|
{
|
|
23
|
-
id:
|
|
23
|
+
id: v7(),
|
|
24
24
|
type: "assistantMessage",
|
|
25
25
|
text: [
|
|
26
26
|
"Below are endpoints generated by your request.",
|
|
@@ -31,7 +31,7 @@ export const transformInterfaceEndpointsReviewHistories = (
|
|
|
31
31
|
created_at: new Date().toISOString(),
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
|
-
id:
|
|
34
|
+
id: v7(),
|
|
35
35
|
type: "systemMessage",
|
|
36
36
|
text: AutoBeSystemPromptConstant.INTERFACE_ENDPOINTS_REVIEW,
|
|
37
37
|
created_at: new Date().toISOString(),
|