@smythos/sre 1.5.35 → 1.5.37

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/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import dotenv from"dotenv";import Joi from"joi";import"dotenv/config";import winston from"winston";import Transport from"winston-transport";import pLimit from"p-limit";import axios,{AxiosHeaders}from"axios";import*as fs from"fs";import fs__default,{existsSync,mkdirSync,writeFileSync,readFileSync,unlinkSync}from"fs";import*as FileType from"file-type";import{fileTypeFromBuffer}from"file-type";import{isBinaryFileSync}from"isbinaryfile";import EventEmitter$1,{EventEmitter}from"events";import crypto$1,{createHash,randomUUID}from"crypto";import{encode,encodeChat}from"gpt-tokenizer";import path from"path";import os from"os";import"process";import mime from"mime";import{Readable}from"stream";import xxhash from"xxhashjs";import{jsonrepair}from"jsonrepair";import yaml from"js-yaml";import{EventSource}from"eventsource";import*as acorn from"acorn";import dayjs from"dayjs";import querystring from"querystring";import{HfInference}from"@huggingface/inference";import{Runware}from"@runware/sdk-js";import FormData from"form-data";import{SocksProxyAgent}from"socks-proxy-agent";import OAuth from"oauth-1.0a";import zl from"zip-lib";import{LambdaClient,GetFunctionCommand,UpdateFunctionCodeCommand,Runtime,CreateFunctionCommand,InvokeCommand}from"@aws-sdk/client-lambda";import{IAMClient,GetRoleCommand,CreateRoleCommand}from"@aws-sdk/client-iam";import{Client}from"@modelcontextprotocol/sdk/client/index.js";import{SSEClientTransport}from"@modelcontextprotocol/sdk/client/sse.js";import{GetBucketLifecycleConfigurationCommand,PutBucketLifecycleConfigurationCommand,S3Client,HeadObjectCommand,DeleteObjectCommand,GetObjectCommand,PutObjectCommand,PutObjectTaggingCommand,GetObjectTaggingCommand,CopyObjectCommand}from"@aws-sdk/client-s3";import imageSize from"image-size";import{execSync}from"child_process";import{Pinecone}from"@pinecone-database/pinecone";import OpenAI,{toFile,OpenAI as OpenAI$1}from"openai";import{MilvusClient,DataType,ErrorCode}from"@zilliz/milvus2-sdk-node";import{GoogleGenerativeAI}from"@google/generative-ai";import{GoogleAIFileManager,FileState}from"@google/generative-ai/server";import{GoogleGenAI}from"@google/genai";import Anthropic from"@anthropic-ai/sdk";import Groq from"groq-sdk";import{BedrockRuntimeClient,ConverseCommand,ConverseStreamCommand}from"@aws-sdk/client-bedrock-runtime";import{VertexAI}from"@google-cloud/vertexai";import chokidar from"chokidar";import fs$1 from"fs/promises";import IORedis from"ioredis";import mysql from"mysql2/promise";import{SecretsManagerClient,ListSecretsCommand,GetSecretValueCommand,PutSecretValueCommand,CreateSecretCommand,DeleteSecretCommand}from"@aws-sdk/client-secrets-manager";import*as readlineSync from"readline-sync";var version="1.5.35";dotenv.config();const config={env:{LOG_LEVEL:process.env.LOG_LEVEL||"none",LOG_FILTER:process.env.LOG_FILTER||"",NODE_ENV:process.env?.NODE_ENV}},REQUEST_METHODS=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],REQUEST_CONTENT_TYPES={none:"none",urlEncodedFormData:"application/x-www-form-urlencoded",multipartFormData:"multipart/form-data",json:"application/json",text:"text/plain",xml:"application/xml",binary:"binary"};var EMBODIMENT_TYPES=(EMBODIMENT_TYPES2=>(EMBODIMENT_TYPES2.ChatBot="chatBot",EMBODIMENT_TYPES2.ChatGPT="chatGPT",EMBODIMENT_TYPES2))(EMBODIMENT_TYPES||{});const ERR_MSG_INVALID_IMAGE_SOURCE="Please provide a valid Image Source. Supported image sources are: HTTP(S) URL, Base64 string, Data URL, Output Image from other component(s).",ERR_MSG_INVALID_BINARY="Please provide a valid data that is either a Blob, SmythFileObject (Binary Output from any Component), ArrayBuffer, Buffer, Base64 string, Data URL, or HTTP(s) URL",ERR_MSG_MAX_DEPTH="The maximum depth has been exceeded for the provided array or object.",ERR_MSG_MAX_ARRAY_SIZE="The maximum array size has been exceeded for the provided array.",ERR_MSG_MAX_OBJECT_SIZE="The maximum object size has been exceeded for the provided object.",MAX_DEPTH=10,MAX_OBJECT_SIZE=1e3,MAX_ARRAY_SIZE=1e3,MAX_FILE_SIZE=10*1024*1024,MAX_FILE_COUNT=10,DEFAULT_MAX_TOKENS_FOR_LLM=2048,S3_DAILY_PURGE_LIFECYCLE_TAG="ExpirationPolicy=DeleteDaily",S3_WEEKLY_PURGE_LIFECYCLE_TAG="ExpirationPolicy=DeleteWeekly",S3_MONTHLY_PURGE_LIFECYCLE_TAG="ExpirationPolicy=DeleteMonthly",TOOL_USE_DEFAULT_MODEL="gpt-4o-mini",COMP_NAMES={apiCall:"APICall",code:"Code",llmPrompt:"PromptGenerator",visionLLM:"VisionLLM"},JSON_RESPONSE_INSTRUCTION=`
1
+ import dotenv from"dotenv";import Joi from"joi";import"dotenv/config";import winston from"winston";import Transport from"winston-transport";import pLimit from"p-limit";import axios,{AxiosHeaders}from"axios";import*as fs from"fs";import fs__default,{existsSync,mkdirSync,writeFileSync,readFileSync,unlinkSync}from"fs";import*as FileType from"file-type";import{fileTypeFromBuffer}from"file-type";import{isBinaryFileSync}from"isbinaryfile";import EventEmitter$1,{EventEmitter}from"events";import crypto$1,{createHash,randomUUID}from"crypto";import{encode,encodeChat}from"gpt-tokenizer";import path from"path";import os from"os";import"process";import mime from"mime";import{Readable}from"stream";import xxhash from"xxhashjs";import{jsonrepair}from"jsonrepair";import yaml from"js-yaml";import{EventSource}from"eventsource";import*as acorn from"acorn";import dayjs from"dayjs";import querystring from"querystring";import{HfInference}from"@huggingface/inference";import{Runware}from"@runware/sdk-js";import FormData from"form-data";import{SocksProxyAgent}from"socks-proxy-agent";import OAuth from"oauth-1.0a";import zl from"zip-lib";import{LambdaClient,GetFunctionCommand,UpdateFunctionCodeCommand,Runtime,CreateFunctionCommand,InvokeCommand}from"@aws-sdk/client-lambda";import{IAMClient,GetRoleCommand,CreateRoleCommand}from"@aws-sdk/client-iam";import{Client}from"@modelcontextprotocol/sdk/client/index.js";import{SSEClientTransport}from"@modelcontextprotocol/sdk/client/sse.js";import{GetBucketLifecycleConfigurationCommand,PutBucketLifecycleConfigurationCommand,S3Client,HeadObjectCommand,DeleteObjectCommand,GetObjectCommand,PutObjectCommand,PutObjectTaggingCommand,GetObjectTaggingCommand,CopyObjectCommand}from"@aws-sdk/client-s3";import imageSize from"image-size";import{execSync}from"child_process";import{Pinecone}from"@pinecone-database/pinecone";import OpenAI,{toFile,OpenAI as OpenAI$1}from"openai";import{MilvusClient,DataType,ErrorCode}from"@zilliz/milvus2-sdk-node";import{GoogleGenerativeAI}from"@google/generative-ai";import{GoogleAIFileManager,FileState}from"@google/generative-ai/server";import{GoogleGenAI}from"@google/genai";import Anthropic from"@anthropic-ai/sdk";import Groq from"groq-sdk";import{BedrockRuntimeClient,ConverseCommand,ConverseStreamCommand}from"@aws-sdk/client-bedrock-runtime";import{VertexAI}from"@google-cloud/vertexai";import chokidar from"chokidar";import fs$1 from"fs/promises";import IORedis from"ioredis";import mysql from"mysql2/promise";import{SecretsManagerClient,ListSecretsCommand,GetSecretValueCommand,PutSecretValueCommand,CreateSecretCommand,DeleteSecretCommand}from"@aws-sdk/client-secrets-manager";import*as readlineSync from"readline-sync";var version="1.5.37";dotenv.config();const config={env:{LOG_LEVEL:process.env.LOG_LEVEL||"none",LOG_FILTER:process.env.LOG_FILTER||"",NODE_ENV:process.env?.NODE_ENV}},REQUEST_METHODS=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],REQUEST_CONTENT_TYPES={none:"none",urlEncodedFormData:"application/x-www-form-urlencoded",multipartFormData:"multipart/form-data",json:"application/json",text:"text/plain",xml:"application/xml",binary:"binary"};var EMBODIMENT_TYPES=(EMBODIMENT_TYPES2=>(EMBODIMENT_TYPES2.ChatBot="chatBot",EMBODIMENT_TYPES2.ChatGPT="chatGPT",EMBODIMENT_TYPES2))(EMBODIMENT_TYPES||{});const ERR_MSG_INVALID_IMAGE_SOURCE="Please provide a valid Image Source. Supported image sources are: HTTP(S) URL, Base64 string, Data URL, Output Image from other component(s).",ERR_MSG_INVALID_BINARY="Please provide a valid data that is either a Blob, SmythFileObject (Binary Output from any Component), ArrayBuffer, Buffer, Base64 string, Data URL, or HTTP(s) URL",ERR_MSG_MAX_DEPTH="The maximum depth has been exceeded for the provided array or object.",ERR_MSG_MAX_ARRAY_SIZE="The maximum array size has been exceeded for the provided array.",ERR_MSG_MAX_OBJECT_SIZE="The maximum object size has been exceeded for the provided object.",MAX_DEPTH=10,MAX_OBJECT_SIZE=1e3,MAX_ARRAY_SIZE=1e3,MAX_FILE_SIZE=10*1024*1024,MAX_FILE_COUNT=10,DEFAULT_MAX_TOKENS_FOR_LLM=2048,S3_DAILY_PURGE_LIFECYCLE_TAG="ExpirationPolicy=DeleteDaily",S3_WEEKLY_PURGE_LIFECYCLE_TAG="ExpirationPolicy=DeleteWeekly",S3_MONTHLY_PURGE_LIFECYCLE_TAG="ExpirationPolicy=DeleteMonthly",TOOL_USE_DEFAULT_MODEL="gpt-4o-mini",COMP_NAMES={apiCall:"APICall",code:"Code",llmPrompt:"PromptGenerator",visionLLM:"VisionLLM"},JSON_RESPONSE_INSTRUCTION=`
2
2
  Respond ONLY with a valid, parsable JSON object. Follow these strict guidelines:
3
3
  1. The response must begin with '{' and end with '}'.
4
4
  2. Use double quotes for all keys and string values.
@@ -72,8 +72,8 @@ const dsId=DataSourceIndexer.genDsId(providedId,teamId,namespaceId);if(isUrl(inp
72
72
  `;const dsId=DataSourceIndexer.genDsId(providedId,teamId,namespaceId);return await vectorDbConnector.requester(AccessCandidate.team(teamId)).deleteDatasource(namespaceId,dsId),debugOutput+=`Deleted data source with id: ${providedId}
73
73
  `,{_debug:debugOutput,Success:!0}}catch(err){return debugOutput+=`Failed to delete data source:
74
74
  Error: ${err?.message}
75
- `,{_debug:debugOutput,_error:err?.message||"Couldn't delete data source"}}}validateInput(input){return Joi.object({}).unknown(!0).validate(input)}validateConfigData(data){return Joi.object({namespaceId:Joi.string().required(),id:Joi.string().optional().allow("").allow(null)}).unknown(!0).validate(data)}}var __defProp$14=Object.defineProperty,__defNormalProp$14=(obj,key,value)=>key in obj?__defProp$14(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value,__publicField$14=(obj,key,value)=>__defNormalProp$14(obj,key+"",value);class LLMInference2{static async getInstance(model){throw new Error("Method not implemented.")}}class DataSourceLookup extends Component{constructor(){super(),__publicField$14(this,"configSchema",Joi.object({topK:Joi.alternatives([Joi.string(),Joi.number()]).custom(validateInteger$2({min:0}),"custom range validation").label("Result Count"),model:Joi.string().valid("gpt-4o-mini","gpt-4","gpt-3.5-turbo","gpt-4","gpt-3.5-turbo-16k").optional(),prompt:Joi.string().max(3e4).allow("").label("Prompt").optional(),postprocess:Joi.boolean().strict().optional(),includeMetadata:Joi.boolean().strict().optional(),namespace:Joi.string().allow("").max(80).messages({"string.max":"The length of the 'namespace' name must be 50 characters or fewer."})}))}init(){}async process(input,config2,agent){await super.process(input,config2,agent);const componentId=config2.id;agent.components[componentId];const teamId=agent.teamId;let debugOutput=agent.agentRuntime?.debug?`== Data Source Lookup Log ==
76
- `:null;const outputs={};for(let con of config2.outputs)con.default||(outputs[con.name]="");const namespace=config2.data.namespace.split("_").slice(1).join("_")||config2.data.namespace,model=config2.data?.model||"gpt-4o-mini",prompt=config2.data?.prompt?.trim?.()||"",postprocess=config2.data?.postprocess||!1,includeMetadata=config2.data?.includeMetadata||!1,_input=typeof input.Query=="string"?input.Query:JSON.stringify(input.Query),topK=Math.max(config2.data?.topK||50,50);let vectorDbConnector=ConnectorService.getVectorDBConnector();if(!await vectorDbConnector.requester(AccessCandidate.team(teamId)).namespaceExists(namespace))throw new Error(`Namespace ${namespace} does not exist`);let results,_error;try{results=(await vectorDbConnector.requester(AccessCandidate.team(teamId)).search(namespace,_input,{topK,includeMetadata:!0})).slice(0,config2.data.topK).map(result=>({content:result.text,metadata:result.metadata})),includeMetadata?results=results.map(result=>({content:result.content,metadata:this.parseMetadata(result.metadata||result.metadata?.metadata)})):results=results.map(result=>result.content),debugOutput+=`[Results]
75
+ `,{_debug:debugOutput,_error:err?.message||"Couldn't delete data source"}}}validateInput(input){return Joi.object({}).unknown(!0).validate(input)}validateConfigData(data){return Joi.object({namespaceId:Joi.string().required(),id:Joi.string().optional().allow("").allow(null)}).unknown(!0).validate(data)}}var __defProp$14=Object.defineProperty,__defNormalProp$14=(obj,key,value)=>key in obj?__defProp$14(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value,__publicField$14=(obj,key,value)=>__defNormalProp$14(obj,key+"",value);class LLMInference2{static async getInstance(model){throw new Error("Method not implemented.")}}class DataSourceLookup extends Component{constructor(){super(),__publicField$14(this,"configSchema",Joi.object({topK:Joi.alternatives([Joi.string(),Joi.number()]).custom(validateInteger$2({min:0}),"custom range validation").label("Result Count"),model:Joi.string().valid("gpt-4o-mini","gpt-4","gpt-3.5-turbo","gpt-4","gpt-3.5-turbo-16k").optional(),prompt:Joi.string().max(3e4).allow("").label("Prompt").optional(),postprocess:Joi.boolean().strict().optional(),includeMetadata:Joi.boolean().strict().optional(),namespace:Joi.string().allow("").max(80).messages({"string.max":"The length of the 'namespace' name must be 50 characters or fewer."}),scoreThreshold:Joi.number().optional().label("Score Threshold"),includeScore:Joi.boolean().optional().label("Include Score")}))}init(){}async process(input,config2,agent){await super.process(input,config2,agent);const componentId=config2.id;agent.components[componentId];const teamId=agent.teamId;let debugOutput=agent.agentRuntime?.debug?`== Data Source Lookup Log ==
76
+ `:null;const outputs={};for(let con of config2.outputs)con.default||(outputs[con.name]="");const namespace=config2.data.namespace.split("_").slice(1).join("_")||config2.data.namespace,model=config2.data?.model||"gpt-4o-mini",prompt=config2.data?.prompt?.trim?.()||"",postprocess=config2.data?.postprocess||!1,includeMetadata=config2.data?.includeMetadata||!1,scoreThreshold=config2.data?.scoreThreshold||.001,includeScore=config2.data?.includeScore||!1,_input=typeof input.Query=="string"?input.Query:JSON.stringify(input.Query),topK=Math.max(config2.data?.topK||50,50);let vectorDbConnector=ConnectorService.getVectorDBConnector();if(!await vectorDbConnector.requester(AccessCandidate.team(teamId)).namespaceExists(namespace))throw new Error(`Namespace ${namespace} does not exist`);let results,_error;try{results=(await vectorDbConnector.requester(AccessCandidate.team(teamId)).search(namespace,_input,{topK,includeMetadata:!0})).slice(0,config2.data.topK).map(result=>({content:result.text,metadata:result.metadata,score:result.score})),results=results.filter(result=>result.score>=scoreThreshold),results=results.map(result=>{const transformedResult={content:result.content};return includeMetadata&&(transformedResult.metadata=this.parseMetadata(result.metadata||result.metadata?.metadata)),includeScore&&(transformedResult.score=result.score),includeMetadata||includeScore?transformedResult:result.content}),debugOutput+=`[Results]
77
77
  Loaded ${results.length} results from namespace: ${namespace}
78
78
 
79
79
  `}catch(error){_error=error.toString()}if(postprocess&&prompt){const promises=[];for(let result of results)TemplateString(prompt.replace(/{{result}}/g,JSON.stringify(result))).parse(input).result,await LLMInference2.getInstance(model);results=await Promise.all(promises);for(let i=0;i<results.length;i++)typeof results[i]=="string"&&(results[i]=JSONContent(results[i]).tryParse())}const totalLength=JSON.stringify(results).length;return debugOutput+=`[Total Length]
@@ -83,7 +83,7 @@ ${totalLength}
83
83
  ${_error}
84
84
  `),{hash:void 0,_error,_debug:logger2.output}}}}class FHash extends Component{constructor(){super()}init(){}async process(input,config2,agent){await super.process(input,config2,agent);const logger2=this.createComponentLogger(agent,config2);try{const data=input.Data,algorithm=config2.data.algorithm,encoding=config2.data.encoding;logger2.debug(` Generating hash using ${algorithm} algorithm and ${encoding} encoding`);const hashAlgo=crypto$1.createHash(algorithm);hashAlgo.update(data);const Hash=hashAlgo.digest(encoding);return logger2.debug(` Generated hash: ${Hash}`),{Hash,_error:void 0,_debug:logger2.output}}catch(err){const _error=err?.response?.data||err?.message||err.toString();return logger2.error(` Error generating hash
85
85
  ${_error}
86
- `),{hash:void 0,_error,_debug:logger2.output}}}}var __defProp$13=Object.defineProperty,__defNormalProp$13=(obj,key,value)=>key in obj?__defProp$13(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value,__publicField$13=(obj,key,value)=>__defNormalProp$13(obj,key+"",value);class FileStore extends Component{constructor(){super(),__publicField$13(this,"configSchema",Joi.object({name:Joi.string().max(1e3).allow("").label("Name"),ttl:Joi.number().integer().label("TTL")}))}init(){}async process(input,config2,agent){await super.process(input,config2,agent);const logger2=this.createComponentLogger(agent,config2);try{logger2.debug("=== File Store Log ===");let Output={},_error,data=input.Data;const accessCandidate=AccessCandidate.agent(agent.id),binaryData=await BinaryInput.from(data,null,null,accessCandidate),fileData=await binaryData.getJsonData(accessCandidate),buffer=await binaryData.getBuffer(),customFileName=TemplateString(config2.data.name).parse(input).result,metadata={ContentType:fileData.mimetype},ttl=config2.data.ttl||86400,extension=fileData.url?.split(".").pop(),s3StorageConnector=ConnectorService.getStorageConnector("S3"),fileName=this.getFileName(customFileName,extension);try{const smythFSUrl=`smythfs://${agent.id}.agent/components_data/${fileName}`;SmythFS.Instance.write(smythFSUrl,buffer,null,metadata),Output={Url:await SmythFS.Instance.genResourceUrl(smythFSUrl,AccessCandidate.agent(agent.id))}}catch(error){logger2.error(`Error saving file
86
+ `),{hash:void 0,_error,_debug:logger2.output}}}}var __defProp$13=Object.defineProperty,__defNormalProp$13=(obj,key,value)=>key in obj?__defProp$13(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value,__publicField$13=(obj,key,value)=>__defNormalProp$13(obj,key+"",value);class FileStore extends Component{constructor(){super(),__publicField$13(this,"configSchema",Joi.object({name:Joi.string().max(1e3).allow("").label("Name"),ttl:Joi.number().integer().label("TTL")}))}init(){}async process(input,config2,agent){await super.process(input,config2,agent);const logger2=this.createComponentLogger(agent,config2);try{logger2.debug("=== File Store Log ===");let Output={},_error,data=input.Data;const accessCandidate=AccessCandidate.agent(agent.id),binaryData=await BinaryInput.from(data,null,null,accessCandidate),fileData=await binaryData.getJsonData(accessCandidate),buffer=await binaryData.getBuffer(),customFileName=TemplateString(config2.data.name).parse(input).result,metadata={ContentType:fileData.mimetype},ttl=config2.data.ttl||86400,extension=fileData.url?.split(".").pop(),s3StorageConnector=ConnectorService.getStorageConnector("S3"),fileName=this.getFileName(customFileName,extension);try{const smythFSUrl=`smythfs://${agent.id}.agent/components_data/${fileName}`;await SmythFS.Instance.write(smythFSUrl,buffer,null,metadata,ttl),Output={Url:await SmythFS.Instance.genResourceUrl(smythFSUrl,AccessCandidate.agent(agent.id))}}catch(error){logger2.error(`Error saving file
87
87
  ${error}
88
88
  `),_error=error?.response?.data||error?.message||error.toString(),Output=void 0}return{...Output,_error,_debug:logger2.output}}catch(err){const _error=err?.response?.data||err?.message||err.toString();return logger2.error(` Error saving file
89
89
  ${_error}
@@ -167,7 +167,7 @@ ${JSON.stringify(codeInputs,null,2)}
167
167
  `);let codeConnector=ConnectorService.getCodeConnector(),codeCredentials=await getLambdaCredentials(agent,config2);codeCredentials.isUserProvidedKeys&&(codeConnector=codeConnector.instance({region:codeCredentials.region,accessKeyId:codeCredentials.accessKeyId,secretAccessKey:codeCredentials.secretAccessKey}));let code=config2?.data?.code;code||(code=generateCodeFromLegacyComponent(config2.data.code_body,config2.data.code_imports,Object.keys(codeInputs))),await codeConnector.agent(agent.id).deploy(config2.id,{code,inputs:codeInputs},{runtime:"nodejs"});try{const executionResponse=await codeConnector.agent(agent.id).execute(config2.id,codeInputs),executionTime=executionResponse.executionTime;logger2.debug(`Code result:
168
168
  ${typeof executionResponse.output=="object"?JSON.stringify(executionResponse.output,null,2):executionResponse.output}
169
169
  `),logger2.debug(`Execution time: ${executionTime}ms
170
- `);const cost=calculateExecutionCost(executionTime);if(!codeCredentials.isUserProvidedKeys){const agentTeam=await ConnectorService.getAccountConnector().getCandidateTeam(agent.id);reportUsage({cost,agentId:agent.id,teamId:agentTeam})}executionResponse.success?Output=executionResponse.output:(Output=void 0,_error=executionResponse.errors)}catch(error){logger2.error(`Error running code
170
+ `);const cost=calculateExecutionCost(executionTime);if(!codeCredentials.isUserProvidedKeys){const agentTeam=await ConnectorService.getAccountConnector().getCandidateTeam(AccessCandidate.agent(agent.id));reportUsage({cost,agentId:agent.id,teamId:agentTeam})}executionResponse.success?Output=executionResponse.output:(Output=void 0,_error=executionResponse.errors)}catch(error){logger2.error(`Error running code
171
171
  ${error}
172
172
  `),_error=error?.response?.data||error?.message||error.toString(),Output=void 0}return{Output,_error,_debug:logger2.output}}catch(err){const _error=err?.response?.data||err?.message||err.toString();return logger2.error(` Error running code
173
173
  ${_error}