wuying-agentbay-sdk 0.3.0 → 0.4.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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../node_modules/tsup/assets/esm_shims.js","../node_modules/dotenv/package.json","../node_modules/dotenv/lib/main.js","../node_modules/dotenv/lib/env-options.js","../node_modules/dotenv/lib/cli-options.js","../src/index.ts","../src/agent-bay.ts","../src/session.ts","../src/exceptions.ts","../src/filesystem/filesystem.ts","../src/api/models/model.ts","../src/api/models/CreateMcpSessionResponseBodyData.ts","../src/api/models/GetContextResponseBodyData.ts","../src/api/models/GetLabelResponseBodyData.ts","../src/api/models/GetMcpResourceResponseBodyDataDesktopInfo.ts","../src/api/models/GetMcpResourceResponseBodyData.ts","../src/api/models/ListContextsResponseBodyData.ts","../src/api/models/ListSessionResponseBodyData.ts","../src/api/models/CallMcpToolRequest.ts","../src/api/models/CallMcpToolResponseBody.ts","../src/api/models/CallMcpToolResponse.ts","../src/api/models/CreateMcpSessionRequest.ts","../src/api/models/CreateMcpSessionResponseBody.ts","../src/api/models/CreateMcpSessionResponse.ts","../src/api/models/DeleteContextRequest.ts","../src/api/models/DeleteContextResponseBody.ts","../src/api/models/DeleteContextResponse.ts","../src/api/models/GetContextRequest.ts","../src/api/models/GetContextResponseBody.ts","../src/api/models/GetContextResponse.ts","../src/api/models/GetLabelRequest.ts","../src/api/models/GetLabelResponseBody.ts","../src/api/models/GetLabelResponse.ts","../src/api/models/GetLinkRequest.ts","../src/api/models/GetLinkResponseBody.ts","../src/api/models/GetLinkResponse.ts","../src/api/models/GetMcpResourceRequest.ts","../src/api/models/GetMcpResourceResponseBody.ts","../src/api/models/GetMcpResourceResponse.ts","../src/api/models/ListContextsRequest.ts","../src/api/models/ListContextsResponseBody.ts","../src/api/models/ListContextsResponse.ts","../src/api/models/ListSessionRequest.ts","../src/api/models/ListSessionResponseBody.ts","../src/api/models/ListSessionResponse.ts","../src/api/models/ModifyContextRequest.ts","../src/api/models/ModifyContextResponseBody.ts","../src/api/models/ModifyContextResponse.ts","../src/api/models/ReleaseMcpSessionRequest.ts","../src/api/models/ReleaseMcpSessionResponseBody.ts","../src/api/models/ReleaseMcpSessionResponse.ts","../src/api/models/SetLabelRequest.ts","../src/api/models/SetLabelResponseBody.ts","../src/api/models/SetLabelResponse.ts","../src/utils/logger.ts","../src/command/command.ts","../src/oss/index.ts","../src/oss/oss.ts","../src/api/index.ts","../src/api/client.ts","../src/application/application.ts","../src/window/window.ts","../src/ui/ui.ts","../src/context.ts","../src/config.ts","../node_modules/dotenv/config.js"],"sourcesContent":["// Shim globals in esm bundle\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst getFilename = () => fileURLToPath(import.meta.url)\nconst getDirname = () => path.dirname(getFilename())\n\nexport const __dirname = /* @__PURE__ */ getDirname()\nexport const __filename = /* @__PURE__ */ getFilename()\n","{\n \"name\": \"dotenv\",\n \"version\": \"16.5.0\",\n \"description\": \"Loads environment variables from .env file\",\n \"main\": \"lib/main.js\",\n \"types\": \"lib/main.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./lib/main.d.ts\",\n \"require\": \"./lib/main.js\",\n \"default\": \"./lib/main.js\"\n },\n \"./config\": \"./config.js\",\n \"./config.js\": \"./config.js\",\n \"./lib/env-options\": \"./lib/env-options.js\",\n \"./lib/env-options.js\": \"./lib/env-options.js\",\n \"./lib/cli-options\": \"./lib/cli-options.js\",\n \"./lib/cli-options.js\": \"./lib/cli-options.js\",\n \"./package.json\": \"./package.json\"\n },\n \"scripts\": {\n \"dts-check\": \"tsc --project tests/types/tsconfig.json\",\n \"lint\": \"standard\",\n \"pretest\": \"npm run lint && npm run dts-check\",\n \"test\": \"tap run --allow-empty-coverage --disable-coverage --timeout=60000\",\n \"test:coverage\": \"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov\",\n \"prerelease\": \"npm test\",\n \"release\": \"standard-version\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git://github.com/motdotla/dotenv.git\"\n },\n \"homepage\": \"https://github.com/motdotla/dotenv#readme\",\n \"funding\": \"https://dotenvx.com\",\n \"keywords\": [\n \"dotenv\",\n \"env\",\n \".env\",\n \"environment\",\n \"variables\",\n \"config\",\n \"settings\"\n ],\n \"readmeFilename\": \"README.md\",\n \"license\": \"BSD-2-Clause\",\n \"devDependencies\": {\n \"@types/node\": \"^18.11.3\",\n \"decache\": \"^4.6.2\",\n \"sinon\": \"^14.0.1\",\n \"standard\": \"^17.0.0\",\n \"standard-version\": \"^9.5.0\",\n \"tap\": \"^19.2.0\",\n \"typescript\": \"^4.8.4\"\n },\n \"engines\": {\n \"node\": \">=12\"\n },\n \"browser\": {\n \"fs\": false\n }\n}\n","const fs = require('fs')\nconst path = require('path')\nconst os = require('os')\nconst crypto = require('crypto')\nconst packageJson = require('../package.json')\n\nconst version = packageJson.version\n\nconst LINE = /(?:^|^)\\s*(?:export\\s+)?([\\w.-]+)(?:\\s*=\\s*?|:\\s+?)(\\s*'(?:\\\\'|[^'])*'|\\s*\"(?:\\\\\"|[^\"])*\"|\\s*`(?:\\\\`|[^`])*`|[^#\\r\\n]+)?\\s*(?:#.*)?(?:$|$)/mg\n\n// Parse src into an Object\nfunction parse (src) {\n const obj = {}\n\n // Convert buffer to string\n let lines = src.toString()\n\n // Convert line breaks to same format\n lines = lines.replace(/\\r\\n?/mg, '\\n')\n\n let match\n while ((match = LINE.exec(lines)) != null) {\n const key = match[1]\n\n // Default undefined or null to empty string\n let value = (match[2] || '')\n\n // Remove whitespace\n value = value.trim()\n\n // Check if double quoted\n const maybeQuote = value[0]\n\n // Remove surrounding quotes\n value = value.replace(/^(['\"`])([\\s\\S]*)\\1$/mg, '$2')\n\n // Expand newlines if double quoted\n if (maybeQuote === '\"') {\n value = value.replace(/\\\\n/g, '\\n')\n value = value.replace(/\\\\r/g, '\\r')\n }\n\n // Add to object\n obj[key] = value\n }\n\n return obj\n}\n\nfunction _parseVault (options) {\n const vaultPath = _vaultPath(options)\n\n // Parse .env.vault\n const result = DotenvModule.configDotenv({ path: vaultPath })\n if (!result.parsed) {\n const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`)\n err.code = 'MISSING_DATA'\n throw err\n }\n\n // handle scenario for comma separated keys - for use with key rotation\n // example: DOTENV_KEY=\"dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=prod,dotenv://:key_7890@dotenvx.com/vault/.env.vault?environment=prod\"\n const keys = _dotenvKey(options).split(',')\n const length = keys.length\n\n let decrypted\n for (let i = 0; i < length; i++) {\n try {\n // Get full key\n const key = keys[i].trim()\n\n // Get instructions for decrypt\n const attrs = _instructions(result, key)\n\n // Decrypt\n decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key)\n\n break\n } catch (error) {\n // last key\n if (i + 1 >= length) {\n throw error\n }\n // try next key\n }\n }\n\n // Parse decrypted .env string\n return DotenvModule.parse(decrypted)\n}\n\nfunction _warn (message) {\n console.log(`[dotenv@${version}][WARN] ${message}`)\n}\n\nfunction _debug (message) {\n console.log(`[dotenv@${version}][DEBUG] ${message}`)\n}\n\nfunction _dotenvKey (options) {\n // prioritize developer directly setting options.DOTENV_KEY\n if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {\n return options.DOTENV_KEY\n }\n\n // secondary infra already contains a DOTENV_KEY environment variable\n if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) {\n return process.env.DOTENV_KEY\n }\n\n // fallback to empty string\n return ''\n}\n\nfunction _instructions (result, dotenvKey) {\n // Parse DOTENV_KEY. Format is a URI\n let uri\n try {\n uri = new URL(dotenvKey)\n } catch (error) {\n if (error.code === 'ERR_INVALID_URL') {\n const err = new Error('INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n throw error\n }\n\n // Get decrypt key\n const key = uri.password\n if (!key) {\n const err = new Error('INVALID_DOTENV_KEY: Missing key part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get environment\n const environment = uri.searchParams.get('environment')\n if (!environment) {\n const err = new Error('INVALID_DOTENV_KEY: Missing environment part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get ciphertext payload\n const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`\n const ciphertext = result.parsed[environmentKey] // DOTENV_VAULT_PRODUCTION\n if (!ciphertext) {\n const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`)\n err.code = 'NOT_FOUND_DOTENV_ENVIRONMENT'\n throw err\n }\n\n return { ciphertext, key }\n}\n\nfunction _vaultPath (options) {\n let possibleVaultPath = null\n\n if (options && options.path && options.path.length > 0) {\n if (Array.isArray(options.path)) {\n for (const filepath of options.path) {\n if (fs.existsSync(filepath)) {\n possibleVaultPath = filepath.endsWith('.vault') ? filepath : `${filepath}.vault`\n }\n }\n } else {\n possibleVaultPath = options.path.endsWith('.vault') ? options.path : `${options.path}.vault`\n }\n } else {\n possibleVaultPath = path.resolve(process.cwd(), '.env.vault')\n }\n\n if (fs.existsSync(possibleVaultPath)) {\n return possibleVaultPath\n }\n\n return null\n}\n\nfunction _resolveHome (envPath) {\n return envPath[0] === '~' ? path.join(os.homedir(), envPath.slice(1)) : envPath\n}\n\nfunction _configVault (options) {\n const debug = Boolean(options && options.debug)\n if (debug) {\n _debug('Loading env from encrypted .env.vault')\n }\n\n const parsed = DotenvModule._parseVault(options)\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsed, options)\n\n return { parsed }\n}\n\nfunction configDotenv (options) {\n const dotenvPath = path.resolve(process.cwd(), '.env')\n let encoding = 'utf8'\n const debug = Boolean(options && options.debug)\n\n if (options && options.encoding) {\n encoding = options.encoding\n } else {\n if (debug) {\n _debug('No encoding is specified. UTF-8 is used by default')\n }\n }\n\n let optionPaths = [dotenvPath] // default, look for .env\n if (options && options.path) {\n if (!Array.isArray(options.path)) {\n optionPaths = [_resolveHome(options.path)]\n } else {\n optionPaths = [] // reset default\n for (const filepath of options.path) {\n optionPaths.push(_resolveHome(filepath))\n }\n }\n }\n\n // Build the parsed data in a temporary object (because we need to return it). Once we have the final\n // parsed data, we will combine it with process.env (or options.processEnv if provided).\n let lastError\n const parsedAll = {}\n for (const path of optionPaths) {\n try {\n // Specifying an encoding returns a string instead of a buffer\n const parsed = DotenvModule.parse(fs.readFileSync(path, { encoding }))\n\n DotenvModule.populate(parsedAll, parsed, options)\n } catch (e) {\n if (debug) {\n _debug(`Failed to load ${path} ${e.message}`)\n }\n lastError = e\n }\n }\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsedAll, options)\n\n if (lastError) {\n return { parsed: parsedAll, error: lastError }\n } else {\n return { parsed: parsedAll }\n }\n}\n\n// Populates process.env from .env file\nfunction config (options) {\n // fallback to original dotenv if DOTENV_KEY is not set\n if (_dotenvKey(options).length === 0) {\n return DotenvModule.configDotenv(options)\n }\n\n const vaultPath = _vaultPath(options)\n\n // dotenvKey exists but .env.vault file does not exist\n if (!vaultPath) {\n _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`)\n\n return DotenvModule.configDotenv(options)\n }\n\n return DotenvModule._configVault(options)\n}\n\nfunction decrypt (encrypted, keyStr) {\n const key = Buffer.from(keyStr.slice(-64), 'hex')\n let ciphertext = Buffer.from(encrypted, 'base64')\n\n const nonce = ciphertext.subarray(0, 12)\n const authTag = ciphertext.subarray(-16)\n ciphertext = ciphertext.subarray(12, -16)\n\n try {\n const aesgcm = crypto.createDecipheriv('aes-256-gcm', key, nonce)\n aesgcm.setAuthTag(authTag)\n return `${aesgcm.update(ciphertext)}${aesgcm.final()}`\n } catch (error) {\n const isRange = error instanceof RangeError\n const invalidKeyLength = error.message === 'Invalid key length'\n const decryptionFailed = error.message === 'Unsupported state or unable to authenticate data'\n\n if (isRange || invalidKeyLength) {\n const err = new Error('INVALID_DOTENV_KEY: It must be 64 characters long (or more)')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n } else if (decryptionFailed) {\n const err = new Error('DECRYPTION_FAILED: Please check your DOTENV_KEY')\n err.code = 'DECRYPTION_FAILED'\n throw err\n } else {\n throw error\n }\n }\n}\n\n// Populate process.env with parsed values\nfunction populate (processEnv, parsed, options = {}) {\n const debug = Boolean(options && options.debug)\n const override = Boolean(options && options.override)\n\n if (typeof parsed !== 'object') {\n const err = new Error('OBJECT_REQUIRED: Please check the processEnv argument being passed to populate')\n err.code = 'OBJECT_REQUIRED'\n throw err\n }\n\n // Set process.env\n for (const key of Object.keys(parsed)) {\n if (Object.prototype.hasOwnProperty.call(processEnv, key)) {\n if (override === true) {\n processEnv[key] = parsed[key]\n }\n\n if (debug) {\n if (override === true) {\n _debug(`\"${key}\" is already defined and WAS overwritten`)\n } else {\n _debug(`\"${key}\" is already defined and was NOT overwritten`)\n }\n }\n } else {\n processEnv[key] = parsed[key]\n }\n }\n}\n\nconst DotenvModule = {\n configDotenv,\n _configVault,\n _parseVault,\n config,\n decrypt,\n parse,\n populate\n}\n\nmodule.exports.configDotenv = DotenvModule.configDotenv\nmodule.exports._configVault = DotenvModule._configVault\nmodule.exports._parseVault = DotenvModule._parseVault\nmodule.exports.config = DotenvModule.config\nmodule.exports.decrypt = DotenvModule.decrypt\nmodule.exports.parse = DotenvModule.parse\nmodule.exports.populate = DotenvModule.populate\n\nmodule.exports = DotenvModule\n","// ../config.js accepts options via environment variables\nconst options = {}\n\nif (process.env.DOTENV_CONFIG_ENCODING != null) {\n options.encoding = process.env.DOTENV_CONFIG_ENCODING\n}\n\nif (process.env.DOTENV_CONFIG_PATH != null) {\n options.path = process.env.DOTENV_CONFIG_PATH\n}\n\nif (process.env.DOTENV_CONFIG_DEBUG != null) {\n options.debug = process.env.DOTENV_CONFIG_DEBUG\n}\n\nif (process.env.DOTENV_CONFIG_OVERRIDE != null) {\n options.override = process.env.DOTENV_CONFIG_OVERRIDE\n}\n\nif (process.env.DOTENV_CONFIG_DOTENV_KEY != null) {\n options.DOTENV_KEY = process.env.DOTENV_CONFIG_DOTENV_KEY\n}\n\nmodule.exports = options\n","const re = /^dotenv_config_(encoding|path|debug|override|DOTENV_KEY)=(.+)$/\n\nmodule.exports = function optionMatcher (args) {\n return args.reduce(function (acc, cur) {\n const matches = cur.match(re)\n if (matches) {\n acc[matches[1]] = matches[2]\n }\n return acc\n }, {})\n}\n","// Export all public classes and interfaces\nexport { AgentBay } from './agent-bay';\nexport { Session } from './session';\nexport { Context, ContextService } from './context';\nexport * from './exceptions';\nexport * from './filesystem';\nexport * from './command';\nexport * from './oss';\nexport * from './api';\nexport * from './application';\nexport * from './ui';\n","import axios, { AxiosInstance } from 'axios';\nimport { Session } from './session';\nimport { ContextService } from './context';\nimport { AuthenticationError, APIError } from './exceptions';\nimport * as $_client from './api';\nimport OpenApi from '@alicloud/openapi-core';\nimport { OpenApiUtil, $OpenApiUtil }from '@alicloud/openapi-core';\nimport { Client } from './api/client';\nimport { CreateMcpSessionRequest, CreateMcpSessionResponse, ListSessionRequest } from './api/models/model';\nimport { loadConfig } from './config';\nimport 'dotenv/config';\nimport { log, logError } from './utils/logger';\n/**\n * Main class for interacting with the AgentBay cloud runtime environment.\n */\nexport class AgentBay {\n private apiKey: string;\n private client: Client;\n private regionId: string;\n private endpoint:string;\n private sessions: Map<string, Session> = new Map();\n \n /**\n * Context service for managing persistent contexts.\n */\n context: ContextService;\n\n\n /**\n * Initialize the AgentBay client.\n * \n * @param options - Configuration options\n * @param options.apiKey - API key for authentication. If not provided, will look for AGENTBAY_API_KEY environment variable.\n */\n constructor(options: {\n apiKey?: string;\n } = {}) {\n this.apiKey = options.apiKey || process.env.AGENTBAY_API_KEY || '';\n \n if (!this.apiKey) {\n throw new AuthenticationError(\n 'API key is required. Provide it as a parameter or set the AGENTBAY_API_KEY environment variable.'\n );\n }\n \n // Load configuration\n const configData = loadConfig();\n this.regionId = configData.region_id;\n this.endpoint = configData.endpoint;\n \n const config = new $OpenApiUtil.Config({\n regionId: this.regionId,\n endpoint: this.endpoint\n })\n \n config.readTimeout = configData.timeout_ms;\n config.connectTimeout = configData.timeout_ms;\n try{\n this.client = new Client(config)\n \n // Initialize context service\n this.context = new ContextService(this);\n }catch(error){\n logError(`Failed to constructor:`, error);\n throw new AuthenticationError(`Failed to constructor: ${error}`);\n }\n \n }\n\n /**\n * Create a new session in the AgentBay cloud environment.\n * \n * @param options - Optional parameters for creating the session\n * @param options.contextId - ID of the context to bind to the session\n * @param options.labels - Custom labels for the session\n * @returns A new Session object.\n */\n async create(options: {\n contextId?: string;\n labels?: Record<string, string>;\n imageId?: string;\n } = {}): Promise<Session> {\n try {\n const createSessionRequest = new $_client.CreateMcpSessionRequest({\n authorization: \"Bearer \"+this.apiKey,\n imageId: options.imageId\n });\n \n // Add context_id if provided\n if (options.contextId) {\n createSessionRequest.contextId = options.contextId;\n }\n \n // Add labels if provided\n if (options.labels) {\n createSessionRequest.labels = JSON.stringify(options.labels);\n }\n \n // Log API request\n log(\"API Call: CreateMcpSession\");\n log(`Request: ${options.contextId ? `ContextId=${options.contextId}, ` : ''}${options.labels ? `Labels=${JSON.stringify(options.labels)}, ` : ''}${options.imageId ? `ImageId=${options.imageId}` : ''}`);\n \n const response = await this.client.createMcpSession(createSessionRequest);\n \n // Log API response\n log(`Response from CreateMcpSession:`, response.body);\n \n const sessionId = response.body?.data?.sessionId;\n if (!sessionId) {\n throw new APIError('Invalid session ID in response');\n }\n \n // ResourceUrl is optional in CreateMcpSession response\n const resourceUrl = response.body?.data?.resourceUrl;\n \n const session = new Session(this, sessionId);\n if (resourceUrl) {\n session.resourceUrl = resourceUrl;\n }\n \n this.sessions.set(session.sessionId, session);\n return session;\n \n } catch (error) {\n logError(\"Error calling CreateMcpSession:\", error);\n throw new APIError(`Failed to create session: ${error}`);\n }\n }\n\n /**\n * List all available sessions.\n * \n * @returns A list of session objects.\n */\n list(): Session[] {\n return Array.from(this.sessions.values());\n }\n \n /**\n * List sessions filtered by the provided labels.\n * It returns sessions that match all the specified labels.\n * \n * @param labels - The labels to filter by.\n * @returns A list of session objects that match the labels.\n */\n async listByLabels(labels: Record<string, string>): Promise<Session[]> {\n try {\n // Convert labels to JSON\n const labelsJSON = JSON.stringify(labels);\n \n const listSessionRequest = new ListSessionRequest({\n authorization: `Bearer ${this.apiKey}`,\n labels: labelsJSON\n });\n \n // Log API request\n log(\"API Call: ListSession\");\n log(`Request: Labels=${labelsJSON}`);\n \n const response = await this.client.listSession(listSessionRequest);\n \n // Log API response\n log(`Response from ListSession:`, response.body);\n \n const sessions: Session[] = [];\n if (response.body?.data) {\n for (const sessionData of response.body.data) {\n if (sessionData.sessionId) {\n const session = new Session(this, sessionData.sessionId);\n sessions.push(session);\n // Also store in the local cache\n this.sessions.set(sessionData.sessionId, session);\n }\n }\n }\n \n return sessions;\n } catch (error) {\n logError(\"Error calling ListSession:\", error);\n throw new APIError(`Failed to list sessions by labels: ${error}`);\n }\n }\n\n /**\n * Delete a session by ID.\n * \n * @param sessionId - The ID of the session to delete.\n * @returns True if the session was successfully deleted.\n */\n async delete(session: Session): Promise<boolean> {\n const getSession = this.sessions.get(session.sessionId);\n if (!getSession) {\n throw new Error(`Session with ID ${session.sessionId} not found`);\n }\n \n try {\n await session.delete();\n return true;\n } catch (error) {\n throw new APIError(`Failed to delete session: ${error}`);\n }\n }\n/**\n * \n * @param sessionId - The ID of the session to remove.\n */\n public removeSession(sessionId: string): void {\n this.sessions.delete(sessionId);\n }\n // For internal use by the Session class\n getClient(): Client {\n return this.client;\n }\n \n getAPIKey(): string {\n return this.apiKey;\n }\n}\n","import { AgentBay } from './agent-bay';\nimport { APIError } from './exceptions';\nimport { FileSystem } from './filesystem';\nimport { Command } from './command';\nimport { Oss } from './oss';\nimport { Application } from './application';\nimport { WindowManager } from './window';\nimport { UI } from './ui';\nimport {Client} from './api/client';\nimport { ReleaseMcpSessionRequest, SetLabelRequest, GetLabelRequest, GetMcpResourceRequest, GetLinkRequest } from './api/models/model';\nimport { log, logError } from './utils/logger';\n\n/**\n * Contains information about a session.\n */\nexport interface SessionInfo {\n sessionId: string;\n resourceUrl: string;\n appId?: string;\n authCode?: string;\n connectionProperties?: string;\n resourceId?: string;\n resourceType?: string;\n}\n\n/**\n * Represents a session in the AgentBay cloud environment.\n */\nexport class Session {\n private agentBay: AgentBay;\n public client: Client;\n public sessionId: string;\n public resourceUrl: string = \"\";\n\n // File, command, and oss handlers\n public filesystem: FileSystem;\n public command: Command;\n public oss: Oss;\n\n // Application, window, and UI management\n public Application: Application;\n public window: WindowManager;\n public ui: UI;\n\n /**\n * Initialize a Session object.\n *\n * @param agentBay - The AgentBay instance that created this session.\n * @param sessionId - The ID of this session.\n */\n constructor(agentBay: AgentBay, sessionId: string) {\n this.agentBay = agentBay;\n this.sessionId = sessionId;\n this.client = agentBay.getClient();\n log(`Session created with ID: ${sessionId}`);\n\n // Initialize filesystem, command, and oss handlers\n this.filesystem = new FileSystem(this);\n this.command = new Command(this);\n this.oss = new Oss(this);\n\n // Initialize application, window, and UI managers\n this.Application = new Application(this);\n this.window = new WindowManager(this);\n this.ui = new UI(this);\n }\n\n /**\n * Get information about this session.\n *\n * @returns Session information.\n */\n // async get_info(): Promise<Record<string, any>> {\n // // TODO: Implement the API call to get session info\n // try {\n // const response = await this.client.get(this.baseUrl);\n // return response.data;\n // } catch (error) {\n // throw new APIError(`Failed to get session info: ${error}`);\n // }\n // }\n\n /**\n * Delete this session.\n *\n * @returns True if the session was successfully deleted.\n */\n async delete(): Promise<boolean> {\n try {\n const releaseSessionRequest = new ReleaseMcpSessionRequest({\n authorization: `Bearer ${this.getAPIKey()}`,\n sessionId: this.sessionId\n });\n console.log(\"API Call delete: ReleaseMcpSession\", this.sessionId);\n\n // Log API request\n log(\"API Call: ReleaseMcpSession\");\n log(`Request: SessionId=${this.sessionId}`);\n\n const response = await this.client.releaseMcpSession(releaseSessionRequest);\n\n // Log API response\n log(`Response from ReleaseMcpSession:`, response.body);\n\n this.agentBay.removeSession(this.sessionId);\n return true;\n } catch (error) {\n logError(\"Error calling ReleaseMcpSession:\", error);\n throw new APIError(`Failed to delete session: ${error}`);\n }\n }\n\n\n\n /**\n * Sets the labels for this session.\n *\n * @param labels - The labels to set for the session.\n * @throws APIError if the operation fails.\n */\n async setLabels(labels: Record<string, string>): Promise<void> {\n try {\n // Convert labels to JSON string\n const labelsJSON = JSON.stringify(labels);\n\n const request = new SetLabelRequest({\n authorization: `Bearer ${this.getAPIKey()}`,\n sessionId: this.sessionId,\n labels: labelsJSON\n });\n\n // Log API request\n log(\"API Call: SetLabel\");\n log(`Request: SessionId=${this.sessionId}, Labels=${labelsJSON}`);\n\n const response = await this.client.setLabel(request);\n\n // Log API response\n log(`Response from SetLabel:`, response.body);\n\n } catch (error) {\n logError(\"Error calling SetLabel:\", error);\n throw new APIError(`Failed to set labels for session: ${error}`);\n }\n }\n\n /**\n * Gets the labels for this session.\n *\n * @returns The labels for the session.\n * @throws APIError if the operation fails.\n */\n async getLabels(): Promise<Record<string, string>> {\n try {\n const request = new GetLabelRequest({\n authorization: `Bearer ${this.getAPIKey()}`,\n sessionId: this.sessionId\n });\n\n // Log API request\n log(\"API Call: GetLabel\");\n log(`Request: SessionId=${this.sessionId}`);\n\n const response = await this.client.getLabel(request);\n console.log(`Response from GetLabel: ${JSON.stringify(response)}`);\n\n // Log API response\n log(`Response from GetLabel:`, response.body);\n\n // Extract labels from response\n const labelsJSON = response.body?.data?.labels;\n\n if (labelsJSON) {\n return JSON.parse(labelsJSON);\n }\n\n return {};\n } catch (error) {\n logError(\"Error calling GetLabel:\", error);\n throw new APIError(`Failed to get labels for session: ${error}`);\n }\n }\n\n /**\n * Get the API key.\n *\n * @returns The API key.\n */\n getAPIKey(): string {\n return this.agentBay.getAPIKey();\n }\n\n /**\n * Get the client.\n *\n * @returns The client.\n */\n getClient(): Client {\n\n return this.client;\n }\n\n /**\n * Get the session ID.\n *\n * @returns The session ID.\n */\n getSessionId(): string {\n return this.sessionId;\n }\n\n /**\n * Gets information about this session.\n *\n * @returns Information about the session.\n * @throws APIError if the operation fails.\n */\n async info(): Promise<SessionInfo> {\n try {\n const request = new GetMcpResourceRequest({\n authorization: `Bearer ${this.getAPIKey()}`,\n sessionId: this.sessionId\n });\n\n log(\"API Call: GetMcpResource\");\n log(`Request: SessionId=${this.sessionId}`);\n\n const response = await this.client.getMcpResource(request);\n log(`Response from GetMcpResource:`, response.body);\n\n // Extract session info from response\n const sessionInfo: SessionInfo = {\n sessionId: response.body?.data?.sessionId || \"\",\n resourceUrl: response.body?.data?.resourceUrl || \"\"\n };\n\n // Update the session's resourceUrl with the latest value\n if (response.body?.data?.resourceUrl) {\n this.resourceUrl = response.body.data.resourceUrl;\n }\n\n // Transfer DesktopInfo fields to SessionInfo\n if (response.body?.data?.desktopInfo) {\n const desktopInfo = response.body.data.desktopInfo;\n sessionInfo.appId = desktopInfo.appId;\n sessionInfo.authCode = desktopInfo.authCode;\n sessionInfo.connectionProperties = desktopInfo.connectionProperties;\n sessionInfo.resourceId = desktopInfo.resourceId;\n sessionInfo.resourceType = desktopInfo.resourceType;\n }\n\n return sessionInfo;\n } catch (error) {\n logError(\"Error calling GetMcpResource:\", error);\n throw new APIError(`Failed to get session info for session ${this.sessionId}: ${error}`);\n }\n }\n\n /**\n * Gets the link for this session.\n *\n * @returns The link for the session.\n * @throws APIError if the operation fails.\n */\n async getLink(): Promise<string> {\n try {\n const request = new GetLinkRequest({\n authorization: `Bearer ${this.getAPIKey()}`,\n sessionId: this.sessionId\n });\n\n log(\"API Call: GetLink\");\n log(`Request: SessionId=${this.sessionId}`);\n\n const response = await this.client.getLink(request);\n log(`Response from GetLink:`, response.body);\n\n if (response.body?.data) {\n return response.body.data;\n }\n\n return \"\";\n } catch (error) {\n logError(\"Error calling GetLink:\", error);\n throw new APIError(`Failed to get link for session ${this.sessionId}: ${error}`);\n }\n }\n}\n","/**\n * Base exception for all AgentBay errors.\n */\nexport class AgentBayError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'AgentBayError';\n Object.setPrototypeOf(this, AgentBayError.prototype);\n }\n}\n\n/**\n * Raised when there is an authentication error.\n */\nexport class AuthenticationError extends AgentBayError {\n constructor(message: string) {\n super(message);\n this.name = 'AuthenticationError';\n Object.setPrototypeOf(this, AuthenticationError.prototype);\n }\n}\n\n/**\n * Raised when there is an error with the API.\n */\nexport class APIError extends AgentBayError {\n constructor(message: string) {\n super(message);\n this.name = 'APIError';\n Object.setPrototypeOf(this, APIError.prototype);\n }\n}\n\n/**\n * Raised when there is an error with file operations.\n */\nexport class FileError extends AgentBayError {\n constructor(message: string) {\n super(message);\n this.name = 'FileError';\n Object.setPrototypeOf(this, FileError.prototype);\n }\n}\n\n/**\n * Raised when there is an error with command execution.\n */\nexport class CommandError extends AgentBayError {\n constructor(message: string) {\n super(message);\n this.name = 'CommandError';\n Object.setPrototypeOf(this, CommandError.prototype);\n }\n}\n","import { APIError } from '../exceptions';\nimport { Session } from '../session';\nimport { CallMcpToolRequest } from '../api/models/model';\nimport * as $_client from '../api';\nimport { log, logError } from '../utils/logger';\n\n// Default chunk size for large file operations (60KB)\nconst DEFAULT_CHUNK_SIZE = 60 * 1024;\n\n/**\n * FileInfo represents information about a file or directory\n */\nexport interface FileInfo {\n name: string;\n path: string;\n size: number;\n isDirectory: boolean;\n modTime: string;\n mode: string;\n owner?: string;\n group?: string;\n}\n\n/**\n * DirectoryEntry represents an entry in a directory listing\n */\nexport interface DirectoryEntry {\n name: string;\n isDirectory: boolean;\n}\n\n// File operations that might contain large content\nconst FILE_OPERATIONS: { [key: string]: boolean } = {\n 'read_file': true,\n 'write_file': true,\n 'read_multiple_files': true\n};\n\n/**\n * Checks if the tool operation is file-related and might contain large content\n * \n * @param toolName - Name of the MCP tool\n * @returns True if the operation is file-related\n */\nfunction isFileOperation(toolName: string): boolean {\n return FILE_OPERATIONS[toolName] === true;\n}\n\n/**\n * Replaces large content with size information in JSON args for logging\n * \n * @param args - Arguments object to truncate\n * @returns Truncated arguments object for logging\n */\nfunction truncateContentForLogging(args: Record<string, any>): Record<string, any> {\n const truncatedArgs = { ...args };\n \n // Check for content field and replace with length info\n if (typeof truncatedArgs.content === 'string') {\n const contentLength = truncatedArgs.content.length;\n truncatedArgs.content = `[Content length: ${contentLength} bytes]`;\n }\n \n // Check for paths array and log number of paths instead of all paths\n if (Array.isArray(truncatedArgs.paths) && truncatedArgs.paths.length > 3) {\n truncatedArgs.paths = `[${truncatedArgs.paths.length} paths, first few: ${truncatedArgs.paths[0]}, ${truncatedArgs.paths[1]}, ${truncatedArgs.paths[2]}, ...]`;\n }\n \n return truncatedArgs;\n}\n\n/**\n * Parse a file info string into a FileInfo object\n * \n * @param fileInfoStr - The file info string to parse\n * @returns A FileInfo object\n */\nfunction parseFileInfo(fileInfoStr: string): FileInfo {\n const result: FileInfo = {\n name: '',\n path: '',\n size: 0,\n isDirectory: false,\n modTime: '',\n mode: ''\n };\n \n const lines = fileInfoStr.split('\\n');\n for (const line of lines) {\n if (line.includes(':')) {\n const [key, value] = line.split(':', 2).map(part => part.trim());\n \n switch (key) {\n case 'name':\n result.name = value;\n break;\n case 'path':\n result.path = value;\n break;\n case 'size':\n result.size = parseInt(value, 10);\n break;\n case 'isDirectory':\n result.isDirectory = value === 'true';\n break;\n case 'modTime':\n result.modTime = value;\n break;\n case 'mode':\n result.mode = value;\n break;\n case 'owner':\n result.owner = value;\n break;\n case 'group':\n result.group = value;\n break;\n }\n }\n }\n \n return result;\n}\n\n/**\n * Parse a directory listing string into an array of DirectoryEntry objects\n * \n * @param text - The directory listing text to parse\n * @returns An array of DirectoryEntry objects\n */\nfunction parseDirectoryListing(text: string): DirectoryEntry[] {\n const result: DirectoryEntry[] = [];\n const lines = text.split('\\n');\n \n for (const line of lines) {\n const trimmedLine = line.trim();\n if (trimmedLine === '') {\n continue;\n }\n \n if (trimmedLine.startsWith('[DIR]')) {\n result.push({\n isDirectory: true,\n name: trimmedLine.replace('[DIR]', '').trim()\n });\n } else if (trimmedLine.startsWith('[FILE]')) {\n result.push({\n isDirectory: false,\n name: trimmedLine.replace('[FILE]', '').trim()\n });\n }\n }\n \n return result;\n}\n\n/**\n * Result object for a CallMcpTool operation\n */\ninterface CallMcpToolResult {\n data: Record<string, any>;\n content?: any[];\n textContent?: string;\n isError: boolean;\n errorMsg?: string;\n statusCode: number;\n}\n\n/**\n * Handles file operations in the AgentBay cloud environment.\n */\nexport class FileSystem {\n private session: Session;\n private client!: $_client.Client;\n private baseUrl!: string;\n\n /**\n * Initialize a FileSystem object.\n * \n * @param session - The Session instance that this FileSystem belongs to.\n */\n constructor(session: Session) {\n this.session = session;\n }\n\n /**\n * Helper method to call MCP tools and handle common response processing\n * \n * @param toolName - Name of the MCP tool to call\n * @param args - Arguments to pass to the tool\n * @param defaultErrorMsg - Default error message if specific error details are not available\n * @returns A CallMcpToolResult with the response data\n * @throws APIError if the call fails\n */\n private async callMcpTool(\n toolName: string, \n args: Record<string, any>,\n defaultErrorMsg: string\n ): Promise<CallMcpToolResult> {\n try {\n // Handle logging differently based on operation type\n let loggableArgs = args;\n if (isFileOperation(toolName)) {\n // For file operations, truncate content for logging\n loggableArgs = truncateContentForLogging(args);\n }\n \n const argsJSON = JSON.stringify(args);\n const loggableArgsJSON = JSON.stringify(loggableArgs);\n \n const callToolRequest = new CallMcpToolRequest({\n authorization: `Bearer ${this.session.getAPIKey()}`,\n sessionId: this.session.getSessionId(),\n name: toolName,\n args: argsJSON\n });\n \n // Log API request\n log(`API Call: CallMcpTool - ${toolName}`);\n log(`Request: SessionId=${this.session.getSessionId()}, Args=${loggableArgsJSON}`);\n \n const response = await this.session.getClient().callMcpTool(callToolRequest);\n \n // Log API response differently based on operation type\n if (isFileOperation(toolName)) {\n // Log content size for file operations instead of full content\n log(`Response from CallMcpTool - ${toolName} - status: ${response.statusCode}`);\n \n // Log only relevant response information without content\n if (response.body?.data) {\n const data = response.body.data as Record<string, any>;\n if (data.isError === true) {\n log(`Response contains error: ${data.isError}`);\n } else {\n // For successful responses, don't log the content at all\n log('Response successful, content length info provided separately');\n \n // If there's content, log its size instead of the actual content\n if (Array.isArray(data.content) && data.content.length > 0) {\n let totalSize = 0;\n for (const item of data.content) {\n if (item && typeof item === 'object' && item.text && typeof item.text === 'string') {\n totalSize += item.text.length;\n }\n }\n log(`Content size: ${totalSize} bytes`);\n }\n }\n }\n } else {\n // For non-file operations, create a sanitized version of the response body\n // that doesn't include large content fields\n const sanitizedBody = { ...response.body };\n if (sanitizedBody.data && typeof sanitizedBody.data === 'object') {\n const sanitizedData = { ...sanitizedBody.data };\n if (Array.isArray(sanitizedData.content)) {\n sanitizedData.content = `[Array with ${sanitizedData.content.length} items]`;\n }\n sanitizedBody.data = sanitizedData;\n }\n log(`Response from CallMcpTool - ${toolName}:`, sanitizedBody);\n }\n \n if (!response.body?.data) {\n throw new Error('Invalid response data format');\n }\n \n // Extract data from response\n const data = response.body.data as Record<string, any>;\n \n // Create result object\n const result: CallMcpToolResult = {\n data,\n statusCode: response.statusCode || 0,\n isError: false\n };\n \n // Check if there's an error in the response\n if (data.isError === true) {\n result.isError = true;\n \n // Try to extract the error message from the content field\n const contentArray = data.content as any[] | undefined;\n if (contentArray && contentArray.length > 0) {\n result.content = contentArray;\n \n // Extract error message from the first content item\n if (contentArray[0]?.text) {\n result.errorMsg = contentArray[0].text;\n throw new Error(contentArray[0].text);\n }\n }\n throw new Error(defaultErrorMsg);\n }\n \n // Extract content array if it exists\n if (Array.isArray(data.content)) {\n result.content = data.content;\n \n // Extract textContent from content items\n if (result.content.length > 0) {\n const textParts: string[] = [];\n for (const item of result.content) {\n if (item && typeof item === 'object' && item.text && typeof item.text === 'string') {\n textParts.push(item.text);\n }\n }\n result.textContent = textParts.join('\\n');\n }\n }\n \n return result;\n } catch (error) {\n logError(`Error calling CallMcpTool - ${toolName}:`, error);\n throw new APIError(`Failed to call ${toolName}: ${error}`);\n }\n }\n\n /**\n * Creates a new directory at the specified path.\n * \n * @param path - Path to the directory to create.\n * @returns The extracted text content from the API response\n * @throws APIError if the operation fails.\n */\n async createDirectory(path: string): Promise<string> {\n const args = {\n path\n };\n \n const result = await this.callMcpTool('create_directory', args, 'Failed to create directory');\n \n // Return the extracted text content\n return result.textContent || '';\n }\n\n /**\n * Edits a file by replacing occurrences of oldText with newText.\n * \n * @param path - Path to the file to edit.\n * @param edits - Array of edit operations, each containing oldText and newText.\n * @param dryRun - Optional: If true, preview changes without applying them.\n * @returns The extracted text content from the API response\n * @throws APIError if the operation fails.\n */\n async editFile(path: string, edits: Array<{oldText: string, newText: string}>, dryRun: boolean = false): Promise<string> {\n const args = {\n path,\n edits,\n dryRun\n };\n \n const result = await this.callMcpTool('edit_file', args, 'Failed to edit file');\n \n // Return the extracted text content\n return result.textContent || '';\n }\n\n /**\n * Gets information about a file or directory.\n * \n * @param path - Path to the file or directory to inspect.\n * @returns The extracted text content from the API response\n * @throws APIError if the operation fails.\n */\n async getFileInfo(path: string): Promise<FileInfo> {\n const args = {\n path\n };\n \n const result = await this.callMcpTool('get_file_info', args, 'Failed to get file info');\n \n // Parse and return the file info\n if (!result.textContent) {\n throw new APIError('Empty response from get_file_info');\n }\n \n return parseFileInfo(result.textContent);\n }\n\n /**\n * Lists the contents of a directory.\n * \n * @param path - Path to the directory to list.\n * @returns Array of directory entries with properties like name, isDirectory\n * @throws APIError if the operation fails.\n */\n async listDirectory(path: string): Promise<DirectoryEntry[]> {\n const args = {\n path\n };\n \n const result = await this.callMcpTool('list_directory', args, 'Failed to list directory');\n \n // Parse the text content into directory entries\n if (!result.textContent) {\n return [];\n }\n \n return parseDirectoryListing(result.textContent);\n }\n\n /**\n * Moves a file or directory from source to destination.\n * \n * @param source - Path to the source file or directory.\n * @param destination - Path to the destination file or directory.\n * @returns The extracted text content from the API response\n * @throws APIError if the operation fails.\n */\n async moveFile(source: string, destination: string): Promise<string> {\n const args = {\n source,\n destination\n };\n \n const result = await this.callMcpTool('move_file', args, 'Failed to move file');\n \n // Return the extracted text content\n return result.textContent || '';\n }\n\n /**\n * Reads the content of a file.\n * \n * @param path - Path to the file to read.\n * @param offset - Optional: Line offset to start reading from.\n * @param length - Optional: Number of lines to read. If 0, reads the entire file.\n * @returns The extracted text content from the API response\n * @throws APIError if the operation fails.\n */\n async readFile(path: string, offset: number = 0, length: number = 0): Promise<string> {\n const args: Record<string, any> = {\n path\n };\n \n if (offset > 0) {\n args.offset = offset;\n }\n \n if (length > 0) {\n args.length = length;\n }\n \n const result = await this.callMcpTool('read_file', args, 'Failed to read file');\n \n // Return the extracted text content\n return result.textContent || '';\n }\n\n /**\n * Reads the content of multiple files.\n * \n * @param paths - Array of file paths to read.\n * @returns The extracted text content from the API response\n * @throws APIError if the operation fails.\n */\n async readMultipleFiles(paths: string[]): Promise<Record<string, string>> {\n const args = {\n paths\n };\n \n const result = await this.callMcpTool('read_multiple_files', args, 'Failed to read multiple files');\n \n if (!result.textContent) {\n return {};\n }\n \n // Parse the response into a map of file paths to contents\n const fileContents: Record<string, string> = {};\n const lines = result.textContent.split('\\n');\n let currentPath = '';\n let currentContent: string[] = [];\n \n for (const line of lines) {\n // Check if this line contains a file path (ends with a colon)\n const colonIndex = line.indexOf(':');\n if (colonIndex > 0 && currentPath === '' && !line.substring(0, colonIndex).includes(' ')) {\n // Extract path (everything before the first colon)\n const path = line.substring(0, colonIndex).trim();\n \n // Start collecting content (everything after the colon)\n currentPath = path;\n \n // If there's content on the same line after the colon, add it\n if (line.length > colonIndex + 1) {\n const contentStart = line.substring(colonIndex + 1).trim();\n if (contentStart) {\n currentContent.push(contentStart);\n }\n }\n } else if (line === '---') {\n // Save the current file content\n if (currentPath) {\n fileContents[currentPath] = currentContent.join('\\n');\n currentPath = '';\n currentContent = [];\n }\n } else if (currentPath) {\n // If we're collecting content for a path, add this line\n currentContent.push(line);\n }\n }\n \n // Save the last file content if exists\n if (currentPath) {\n fileContents[currentPath] = currentContent.join('\\n');\n }\n \n // Trim trailing newlines from file contents to match expected test values\n for (const path in fileContents) {\n fileContents[path] = fileContents[path].replace(/\\n+$/, '');\n }\n \n return fileContents;\n }\n\n /**\n * Searches for files in a directory that match a pattern.\n * \n * @param path - Path to the directory to search in.\n * @param pattern - Pattern to search for. Supports glob patterns.\n * @param excludePatterns - Optional: Array of patterns to exclude.\n * @returns Array of search results with properties like path\n * @throws APIError if the operation fails.\n */\n async searchFiles(path: string, pattern: string, excludePatterns: string[] = []): Promise<string[]> {\n const args: Record<string, any> = {\n path,\n pattern\n };\n \n if (excludePatterns.length > 0) {\n args.exclude_patterns = excludePatterns;\n }\n \n const result = await this.callMcpTool('search_files', args, 'Failed to search files');\n \n // Parse the text content into search results\n if (!result.textContent) {\n return [];\n }\n \n // Split by newlines and filter out empty lines\n return result.textContent.split('\\n')\n .map(line => line.trim())\n .filter(line => line !== '');\n }\n\n /**\n * Writes content to a file.\n * \n * @param path - Path to the file to write.\n * @param content - Content to write to the file.\n * @param mode - Optional: Write mode. One of \"overwrite\", \"append\", or \"create_new\". Default is \"overwrite\".\n * @returns The extracted text content from the API response\n * @throws APIError if the operation fails.\n */\n async writeFile(path: string, content: string, mode: string = 'overwrite'): Promise<string> {\n // Validate mode\n const validModes = ['overwrite', 'append', 'create_new'];\n if (!validModes.includes(mode)) {\n throw new APIError(`Invalid mode: ${mode}. Must be one of ${validModes.join(', ')}`);\n }\n \n const args = {\n path,\n content,\n mode\n };\n \n const result = await this.callMcpTool('write_file', args, 'Failed to write file');\n \n // Return the extracted text content\n return result.textContent || '';\n }\n\n /**\n * Reads a large file in chunks to handle size limitations of the underlying API.\n * It automatically splits the read operation into multiple requests of chunkSize bytes each.\n * \n * @param path - Path to the file to read.\n * @param chunkSize - Optional: Size of each chunk in bytes. Default is 60KB.\n * @returns The complete file content as a string\n * @throws APIError if the operation fails.\n */\n async readLargeFile(path: string, chunkSize: number = DEFAULT_CHUNK_SIZE): Promise<string> {\n // First get the file info\n const fileInfo = await this.getFileInfo(path);\n \n // Get size from the fileInfo object\n const fileSize = fileInfo.size;\n \n if (fileSize === 0) {\n throw new APIError('Couldn\\'t determine file size');\n }\n \n // Prepare to read the file in chunks\n let result = '';\n let offset = 0;\n \n log(`ReadLargeFile: Starting chunked read of ${path} (total size: ${fileSize} bytes, chunk size: ${chunkSize} bytes)`);\n \n let chunkCount = 0;\n while (offset < fileSize) {\n // Calculate how much to read in this chunk\n let length = chunkSize;\n if (offset + length > fileSize) {\n length = fileSize - offset;\n }\n \n log(`ReadLargeFile: Reading chunk ${chunkCount + 1} (${length} bytes at offset ${offset}/${fileSize})`);\n \n try {\n // Read the chunk\n const chunk = await this.readFile(path, offset, length);\n \n // Since readFile returns a string, just append it to the result\n result += chunk;\n \n // Move to the next chunk\n offset += length;\n chunkCount++;\n } catch (error) {\n logError(`Error reading chunk at offset ${offset}: ${error}`);\n throw new APIError(`Error reading chunk at offset ${offset}: ${error}`);\n }\n }\n \n log(`ReadLargeFile: Successfully read ${path} in ${chunkCount} chunks (total: ${fileSize} bytes)`);\n \n return result;\n }\n \n /**\n * Writes a large file in chunks to handle size limitations of the underlying API.\n * It automatically splits the write operation into multiple requests of chunkSize bytes each.\n * \n * @param path - Path to the file to write.\n * @param content - Content to write to the file.\n * @param chunkSize - Optional: Size of each chunk in bytes. Default is 60KB.\n * @returns True if the operation was successful\n * @throws APIError if the operation fails.\n */\n async writeLargeFile(path: string, content: string, chunkSize: number = DEFAULT_CHUNK_SIZE): Promise<boolean> {\n const contentLen = content.length;\n \n log(`WriteLargeFile: Starting chunked write to ${path} (total size: ${contentLen} bytes, chunk size: ${chunkSize} bytes)`);\n \n // If content is small enough, use the regular WriteFile method\n if (contentLen <= chunkSize) {\n log(`WriteLargeFile: Content size (${contentLen} bytes) is smaller than chunk size, using normal WriteFile`);\n await this.writeFile(path, content, 'overwrite');\n return true;\n }\n \n // Write the first chunk with \"overwrite\" mode to create/clear the file\n const firstChunkEnd = Math.min(chunkSize, contentLen);\n \n log(`WriteLargeFile: Writing first chunk (0-${firstChunkEnd} bytes) with overwrite mode`);\n await this.writeFile(path, content.substring(0, firstChunkEnd), 'overwrite');\n \n // Write the remaining chunks with \"append\" mode\n let chunkCount = 1; // Already wrote first chunk\n for (let offset = firstChunkEnd; offset < contentLen;) {\n const end = Math.min(offset + chunkSize, contentLen);\n \n log(`WriteLargeFile: Writing chunk ${chunkCount + 1} (${offset}-${end} bytes) with append mode`);\n await this.writeFile(path, content.substring(offset, end), 'append');\n \n offset = end;\n chunkCount++;\n }\n \n log(`WriteLargeFile: Successfully wrote ${path} in ${chunkCount} chunks (total: ${contentLen} bytes)`);\n \n return true;\n }\n}\n","export { CreateMcpSessionResponseBodyData } from './CreateMcpSessionResponseBodyData';\nexport { GetContextResponseBodyData } from './GetContextResponseBodyData';\nexport { GetLabelResponseBodyData } from './GetLabelResponseBodyData';\nexport { GetMcpResourceResponseBodyDataDesktopInfo } from './GetMcpResourceResponseBodyDataDesktopInfo';\nexport { GetMcpResourceResponseBodyData } from './GetMcpResourceResponseBodyData';\nexport { ListContextsResponseBodyData } from './ListContextsResponseBodyData';\nexport { ListSessionResponseBodyData } from './ListSessionResponseBodyData';\nexport { CallMcpToolRequest } from './CallMcpToolRequest';\nexport { CallMcpToolResponseBody } from './CallMcpToolResponseBody';\nexport { CallMcpToolResponse } from './CallMcpToolResponse';\nexport { CreateMcpSessionRequest } from './CreateMcpSessionRequest';\nexport { CreateMcpSessionResponseBody } from './CreateMcpSessionResponseBody';\nexport { CreateMcpSessionResponse } from './CreateMcpSessionResponse';\nexport { DeleteContextRequest } from './DeleteContextRequest';\nexport { DeleteContextResponseBody } from './DeleteContextResponseBody';\nexport { DeleteContextResponse } from './DeleteContextResponse';\nexport { GetContextRequest } from './GetContextRequest';\nexport { GetContextResponseBody } from './GetContextResponseBody';\nexport { GetContextResponse } from './GetContextResponse';\nexport { GetLabelRequest } from './GetLabelRequest';\nexport { GetLabelResponseBody } from './GetLabelResponseBody';\nexport { GetLabelResponse } from './GetLabelResponse';\nexport { GetLinkRequest } from './GetLinkRequest';\nexport { GetLinkResponseBody } from './GetLinkResponseBody';\nexport { GetLinkResponse } from './GetLinkResponse';\nexport { GetMcpResourceRequest } from './GetMcpResourceRequest';\nexport { GetMcpResourceResponseBody } from './GetMcpResourceResponseBody';\nexport { GetMcpResourceResponse } from './GetMcpResourceResponse';\nexport { ListContextsRequest } from './ListContextsRequest';\nexport { ListContextsResponseBody } from './ListContextsResponseBody';\nexport { ListContextsResponse } from './ListContextsResponse';\nexport { ListSessionRequest } from './ListSessionRequest';\nexport { ListSessionResponseBody } from './ListSessionResponseBody';\nexport { ListSessionResponse } from './ListSessionResponse';\nexport { ModifyContextRequest } from './ModifyContextRequest';\nexport { ModifyContextResponseBody } from './ModifyContextResponseBody';\nexport { ModifyContextResponse } from './ModifyContextResponse';\nexport { ReleaseMcpSessionRequest } from './ReleaseMcpSessionRequest';\nexport { ReleaseMcpSessionResponseBody } from './ReleaseMcpSessionResponseBody';\nexport { ReleaseMcpSessionResponse } from './ReleaseMcpSessionResponse';\nexport { SetLabelRequest } from './SetLabelRequest';\nexport { SetLabelResponseBody } from './SetLabelResponseBody';\nexport { SetLabelResponse } from './SetLabelResponse';\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class CreateMcpSessionResponseBodyData extends $dara.Model {\n appInstanceId?: string;\n errMsg?: string;\n resourceId?: string;\n resourceUrl?: string;\n sessionId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n appInstanceId: 'AppInstanceId',\n errMsg: 'ErrMsg',\n resourceId: 'ResourceId',\n resourceUrl: 'ResourceUrl',\n sessionId: 'SessionId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n appInstanceId: 'string',\n errMsg: 'string',\n resourceId: 'string',\n resourceUrl: 'string',\n sessionId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class GetContextResponseBodyData extends $dara.Model {\n createTime?: string;\n id?: string;\n lastUsedTime?: string;\n name?: string;\n osType?: string;\n state?: string;\n static names(): { [key: string]: string } {\n return {\n createTime: 'CreateTime',\n id: 'Id',\n lastUsedTime: 'LastUsedTime',\n name: 'Name',\n osType: 'OsType',\n state: 'State',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n createTime: 'string',\n id: 'string',\n lastUsedTime: 'string',\n name: 'string',\n osType: 'string',\n state: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class GetLabelResponseBodyData extends $dara.Model {\n labels?: string;\n static names(): { [key: string]: string } {\n return {\n labels: 'Labels',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n labels: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class GetMcpResourceResponseBodyDataDesktopInfo extends $dara.Model {\n appId?: string;\n authCode?: string;\n connectionProperties?: string;\n resourceId?: string;\n resourceType?: string;\n static names(): { [key: string]: string } {\n return {\n appId: 'AppId',\n authCode: 'AuthCode',\n connectionProperties: 'ConnectionProperties',\n resourceId: 'ResourceId',\n resourceType: 'ResourceType',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n appId: 'string',\n authCode: 'string',\n connectionProperties: 'string',\n resourceId: 'string',\n resourceType: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { GetMcpResourceResponseBodyDataDesktopInfo } from \"./GetMcpResourceResponseBodyDataDesktopInfo\";\n\n\nexport class GetMcpResourceResponseBodyData extends $dara.Model {\n desktopInfo?: GetMcpResourceResponseBodyDataDesktopInfo;\n resourceUrl?: string;\n sessionId?: string;\n static names(): { [key: string]: string } {\n return {\n desktopInfo: 'DesktopInfo',\n resourceUrl: 'ResourceUrl',\n sessionId: 'SessionId',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n desktopInfo: GetMcpResourceResponseBodyDataDesktopInfo,\n resourceUrl: 'string',\n sessionId: 'string',\n };\n }\n\n validate() {\n if(this.desktopInfo && typeof (this.desktopInfo as any).validate === 'function') {\n (this.desktopInfo as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class ListContextsResponseBodyData extends $dara.Model {\n createTime?: string;\n id?: string;\n lastUsedTime?: string;\n name?: string;\n osType?: string;\n state?: string;\n static names(): { [key: string]: string } {\n return {\n createTime: 'CreateTime',\n id: 'Id',\n lastUsedTime: 'LastUsedTime',\n name: 'Name',\n osType: 'OsType',\n state: 'State',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n createTime: 'string',\n id: 'string',\n lastUsedTime: 'string',\n name: 'string',\n osType: 'string',\n state: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class ListSessionResponseBodyData extends $dara.Model {\n sessionId?: string;\n static names(): { [key: string]: string } {\n return {\n sessionId: 'SessionId',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n sessionId: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class CallMcpToolRequest extends $dara.Model {\n args?: string;\n authorization?: string;\n externalUserId?: string;\n imageId?: string;\n name?: string;\n server?: string;\n sessionId?: string;\n tool?: string;\n static names(): { [key: string]: string } {\n return {\n args: 'Args',\n authorization: 'Authorization',\n externalUserId: 'ExternalUserId',\n imageId: 'ImageId',\n name: 'Name',\n server: 'Server',\n sessionId: 'SessionId',\n tool: 'Tool',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n args: 'string',\n authorization: 'string',\n externalUserId: 'string',\n imageId: 'string',\n name: 'string',\n server: 'string',\n sessionId: 'string',\n tool: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class CallMcpToolResponseBody extends $dara.Model {\n code?: string;\n data?: any;\n httpStatusCode?: number;\n message?: string;\n requestId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n data: 'Data',\n httpStatusCode: 'HttpStatusCode',\n message: 'Message',\n requestId: 'RequestId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n data: 'any',\n httpStatusCode: 'number',\n message: 'string',\n requestId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { CallMcpToolResponseBody } from \"./CallMcpToolResponseBody\";\n\n\nexport class CallMcpToolResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: CallMcpToolResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: CallMcpToolResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class CreateMcpSessionRequest extends $dara.Model {\n authorization?: string;\n contextId?: string;\n externalUserId?: string;\n imageId?: string;\n labels?: string;\n sessionId?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n contextId: 'ContextId',\n externalUserId: 'ExternalUserId',\n imageId: 'ImageId',\n labels: 'Labels',\n sessionId: 'SessionId',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n contextId: 'string',\n externalUserId: 'string',\n imageId: 'string',\n labels: 'string',\n sessionId: 'string'\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { CreateMcpSessionResponseBodyData } from \"./CreateMcpSessionResponseBodyData\";\n\n\nexport class CreateMcpSessionResponseBody extends $dara.Model {\n code?: string;\n data?: CreateMcpSessionResponseBodyData;\n httpStatusCode?: number;\n message?: string;\n requestId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n data: 'Data',\n httpStatusCode: 'HttpStatusCode',\n message: 'Message',\n requestId: 'RequestId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n data: CreateMcpSessionResponseBodyData,\n httpStatusCode: 'number',\n message: 'string',\n requestId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n if(this.data && typeof (this.data as any).validate === 'function') {\n (this.data as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { CreateMcpSessionResponseBody } from \"./CreateMcpSessionResponseBody\";\n\n\nexport class CreateMcpSessionResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: CreateMcpSessionResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: CreateMcpSessionResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class DeleteContextRequest extends $dara.Model {\n authorization?: string;\n id?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n id: 'Id',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n id: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class DeleteContextResponseBody extends $dara.Model {\n code?: string;\n httpStatusCode?: number;\n message?: string;\n requestId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n httpStatusCode: 'HttpStatusCode',\n message: 'Message',\n requestId: 'RequestId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n httpStatusCode: 'number',\n message: 'string',\n requestId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { DeleteContextResponseBody } from \"./DeleteContextResponseBody\";\n\n\nexport class DeleteContextResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: DeleteContextResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: DeleteContextResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class GetContextRequest extends $dara.Model {\n allowCreate?: boolean;\n authorization?: string;\n name?: string;\n static names(): { [key: string]: string } {\n return {\n allowCreate: 'AllowCreate',\n authorization: 'Authorization',\n name: 'Name',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n allowCreate: 'boolean',\n authorization: 'string',\n name: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { GetContextResponseBodyData } from \"./GetContextResponseBodyData\";\n\n\nexport class GetContextResponseBody extends $dara.Model {\n code?: string;\n data?: GetContextResponseBodyData;\n httpStatusCode?: number;\n message?: string;\n requestId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n data: 'Data',\n httpStatusCode: 'HttpStatusCode',\n message: 'Message',\n requestId: 'RequestId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n data: GetContextResponseBodyData,\n httpStatusCode: 'number',\n message: 'string',\n requestId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n if(this.data && typeof (this.data as any).validate === 'function') {\n (this.data as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { GetContextResponseBody } from \"./GetContextResponseBody\";\n\n\nexport class GetContextResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: GetContextResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: GetContextResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class GetLabelRequest extends $dara.Model {\n authorization?: string;\n maxResults?: number;\n nextToken?: string;\n sessionId?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n maxResults: 'MaxResults',\n nextToken: 'NextToken',\n sessionId: 'SessionId',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n maxResults: 'number',\n nextToken: 'string',\n sessionId: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { GetLabelResponseBodyData } from \"./GetLabelResponseBodyData\";\n\n\nexport class GetLabelResponseBody extends $dara.Model {\n code?: string;\n data?: GetLabelResponseBodyData;\n httpStatusCode?: number;\n maxResults?: number;\n message?: string;\n nextToken?: string;\n requestId?: string;\n success?: boolean;\n totalCount?: number;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n data: 'Data',\n httpStatusCode: 'HttpStatusCode',\n maxResults: 'MaxResults',\n message: 'Message',\n nextToken: 'NextToken',\n requestId: 'RequestId',\n success: 'Success',\n totalCount: 'TotalCount',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n data: GetLabelResponseBodyData,\n httpStatusCode: 'number',\n maxResults: 'number',\n message: 'string',\n nextToken: 'string',\n requestId: 'string',\n success: 'boolean',\n totalCount: 'number',\n };\n }\n\n validate() {\n if(this.data && typeof (this.data as any).validate === 'function') {\n (this.data as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { GetLabelResponseBody } from \"./GetLabelResponseBody\";\n\n\nexport class GetLabelResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: GetLabelResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: GetLabelResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class GetLinkRequest extends $dara.Model {\n authorization?: string;\n sessionId?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n sessionId: 'SessionId',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n sessionId: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class GetLinkResponseBody extends $dara.Model {\n code?: string;\n data?: string;\n httpStatusCode?: number;\n message?: string;\n requestId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n data: 'Data',\n httpStatusCode: 'HttpStatusCode',\n message: 'Message',\n requestId: 'RequestId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n data: 'string',\n httpStatusCode: 'number',\n message: 'string',\n requestId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { GetLinkResponseBody } from \"./GetLinkResponseBody\";\n\n\nexport class GetLinkResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: GetLinkResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: GetLinkResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class GetMcpResourceRequest extends $dara.Model {\n authorization?: string;\n sessionId?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n sessionId: 'SessionId',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n sessionId: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { GetMcpResourceResponseBodyData } from \"./GetMcpResourceResponseBodyData\";\n\n\nexport class GetMcpResourceResponseBody extends $dara.Model {\n code?: string;\n data?: GetMcpResourceResponseBodyData;\n httpStatusCode?: number;\n message?: string;\n requestId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n data: 'Data',\n httpStatusCode: 'HttpStatusCode',\n message: 'Message',\n requestId: 'RequestId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n data: GetMcpResourceResponseBodyData,\n httpStatusCode: 'number',\n message: 'string',\n requestId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n if(this.data && typeof (this.data as any).validate === 'function') {\n (this.data as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { GetMcpResourceResponseBody } from \"./GetMcpResourceResponseBody\";\n\n\nexport class GetMcpResourceResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: GetMcpResourceResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: GetMcpResourceResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class ListContextsRequest extends $dara.Model {\n authorization?: string;\n maxResults?: number;\n nextToken?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n maxResults: 'MaxResults',\n nextToken: 'NextToken',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n maxResults: 'number',\n nextToken: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { ListContextsResponseBodyData } from \"./ListContextsResponseBodyData\";\n\n\nexport class ListContextsResponseBody extends $dara.Model {\n code?: string;\n data?: ListContextsResponseBodyData[];\n httpStatusCode?: number;\n maxResults?: number;\n message?: string;\n nextToken?: string;\n requestId?: string;\n success?: boolean;\n totalCount?: number;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n data: 'Data',\n httpStatusCode: 'HttpStatusCode',\n maxResults: 'MaxResults',\n message: 'Message',\n nextToken: 'NextToken',\n requestId: 'RequestId',\n success: 'Success',\n totalCount: 'TotalCount',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n data: { 'type': 'array', 'itemType': ListContextsResponseBodyData },\n httpStatusCode: 'number',\n maxResults: 'number',\n message: 'string',\n nextToken: 'string',\n requestId: 'string',\n success: 'boolean',\n totalCount: 'number',\n };\n }\n\n validate() {\n if(Array.isArray(this.data)) {\n $dara.Model.validateArray(this.data);\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { ListContextsResponseBody } from \"./ListContextsResponseBody\";\n\n\nexport class ListContextsResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: ListContextsResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: ListContextsResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class ListSessionRequest extends $dara.Model {\n authorization?: string;\n labels?: string;\n maxResults?: number;\n nextToken?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n labels: 'Labels',\n maxResults: 'MaxResults',\n nextToken: 'NextToken',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n labels: 'string',\n maxResults: 'number',\n nextToken: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { ListSessionResponseBodyData } from \"./ListSessionResponseBodyData\";\n\n\nexport class ListSessionResponseBody extends $dara.Model {\n code?: string;\n data?: ListSessionResponseBodyData[];\n httpStatusCode?: number;\n maxResults?: number;\n message?: string;\n nextToken?: string;\n requestId?: string;\n success?: boolean;\n totalCount?: number;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n data: 'Data',\n httpStatusCode: 'HttpStatusCode',\n maxResults: 'MaxResults',\n message: 'Message',\n nextToken: 'NextToken',\n requestId: 'RequestId',\n success: 'Success',\n totalCount: 'TotalCount',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n data: { 'type': 'array', 'itemType': ListSessionResponseBodyData },\n httpStatusCode: 'number',\n maxResults: 'number',\n message: 'string',\n nextToken: 'string',\n requestId: 'string',\n success: 'boolean',\n totalCount: 'number',\n };\n }\n\n validate() {\n if(Array.isArray(this.data)) {\n $dara.Model.validateArray(this.data);\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { ListSessionResponseBody } from \"./ListSessionResponseBody\";\n\n\nexport class ListSessionResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: ListSessionResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: ListSessionResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class ModifyContextRequest extends $dara.Model {\n authorization?: string;\n id?: string;\n name?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n id: 'Id',\n name: 'Name',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n id: 'string',\n name: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class ModifyContextResponseBody extends $dara.Model {\n code?: string;\n httpStatusCode?: number;\n message?: string;\n requestId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n httpStatusCode: 'HttpStatusCode',\n message: 'Message',\n requestId: 'RequestId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n httpStatusCode: 'number',\n message: 'string',\n requestId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { ModifyContextResponseBody } from \"./ModifyContextResponseBody\";\n\n\nexport class ModifyContextResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: ModifyContextResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: ModifyContextResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class ReleaseMcpSessionRequest extends $dara.Model {\n authorization?: string;\n sessionId?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n sessionId: 'SessionId',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n sessionId: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class ReleaseMcpSessionResponseBody extends $dara.Model {\n code?: string;\n httpStatusCode?: number;\n message?: string;\n requestId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n httpStatusCode: 'HttpStatusCode',\n message: 'Message',\n requestId: 'RequestId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n httpStatusCode: 'number',\n message: 'string',\n requestId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { ReleaseMcpSessionResponseBody } from \"./ReleaseMcpSessionResponseBody\";\n\n\nexport class ReleaseMcpSessionResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: ReleaseMcpSessionResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: ReleaseMcpSessionResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class SetLabelRequest extends $dara.Model {\n authorization?: string;\n labels?: string;\n sessionId?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n labels: 'Labels',\n sessionId: 'SessionId',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n labels: 'string',\n sessionId: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class SetLabelResponseBody extends $dara.Model {\n code?: string;\n httpStatusCode?: number;\n message?: string;\n requestId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n httpStatusCode: 'HttpStatusCode',\n message: 'Message',\n requestId: 'RequestId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n httpStatusCode: 'number',\n message: 'string',\n requestId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { SetLabelResponseBody } from \"./SetLabelResponseBody\";\n\n\nexport class SetLabelResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: SetLabelResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: SetLabelResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","/**\n * Utility functions for logging in a clean format\n */\n\n/**\n * Log a message without the log prefix and file location\n * @param message The message to log\n * @param args Optional arguments to log\n */\nexport function log(message: string, ...args: any[]): void {\n // Use process.stdout.write instead of log to avoid the prefix and newline\n process.stdout.write(message + '\\n');\n \n // If there are additional arguments, print them on new lines with proper formatting\n if (args.length > 0) {\n for (const arg of args) {\n if (typeof arg === 'object') {\n // For objects, format them as JSON with indentation\n process.stdout.write(JSON.stringify(arg, null, 2) + '\\n');\n } else {\n // For other types, just convert to string\n process.stdout.write(String(arg) + '\\n');\n }\n }\n }\n}\n\n/**\n * Log an error message\n * @param message The error message to log\n * @param error Optional error object\n */\nexport function logError(message: string, error?: any): void {\n process.stderr.write(`ERROR: ${message}\\n`);\n if (error) {\n if (error instanceof Error) {\n process.stderr.write(`${error.message}\\n`);\n } else if (typeof error === 'object') {\n process.stderr.write(JSON.stringify(error, null, 2) + '\\n');\n } else {\n process.stderr.write(String(error) + '\\n');\n }\n }\n}\n","import { APIError } from '../exceptions';\nimport { Session } from '../session';\nimport { Client } from '../api/client';\nimport { CallMcpToolRequest } from '../api/models/model';\nimport { log, logError } from '../utils/logger';\n\nimport * as $_client from '../api';\n\n/**\n * Result object for a CallMcpTool operation\n */\ninterface CallMcpToolResult {\n data: Record<string, any>;\n content?: any[];\n textContent?: string;\n isError: boolean;\n errorMsg?: string;\n statusCode: number;\n}\n\n/**\n * Represents the result of a command execution\n */\nexport interface CommandResult {\n output: string;\n exitCode?: number;\n durationMs?: number;\n}\n\n/**\n * Represents the result of code execution\n */\nexport interface CodeExecutionResult {\n output: string;\n durationMs?: number;\n memoryKb?: number;\n}\n\n/**\n * Handles command execution operations in the AgentBay cloud environment.\n */\nexport class Command {\n private session: Session;\n private client!: $_client.Client;\n private baseUrl!: string;\n\n /**\n * Initialize a Command object.\n * \n * @param session - The Session instance that this Command belongs to.\n */\n constructor(session: Session) {\n this.session = session;\n }\n\n /**\n * Helper method to call MCP tools and handle common response processing\n * \n * @param toolName - Name of the MCP tool to call\n * @param args - Arguments to pass to the tool\n * @param defaultErrorMsg - Default error message if specific error details are not available\n * @returns A CallMcpToolResult with the response data\n * @throws APIError if the call fails\n */\n private async callMcpTool(\n toolName: string, \n args: Record<string, any>,\n defaultErrorMsg: string\n ): Promise<CallMcpToolResult> {\n try {\n const argsJSON = JSON.stringify(args);\n const callToolRequest = new CallMcpToolRequest({\n authorization: `Bearer ${this.session.getAPIKey()}`,\n sessionId: this.session.getSessionId(),\n name: toolName,\n args: argsJSON\n });\n \n // Log API request\n log(`API Call: CallMcpTool - ${toolName}`);\n log(`Request: SessionId=${this.session.getSessionId()}, Args=${argsJSON}`);\n \n const response = await this.session.getClient().callMcpTool(callToolRequest);\n \n // Log API response\n log(`Response from CallMcpTool - ${toolName}:`, response.body);\n \n if (!response.body?.data) {\n throw new Error('Invalid response data format');\n }\n \n // Extract data from response\n const data = response.body.data as Record<string, any>;\n \n // Create result object\n const result: CallMcpToolResult = {\n data,\n statusCode: response.statusCode || 0,\n isError: false\n };\n \n // Check if there's an error in the response\n if (data.isError === true) {\n result.isError = true;\n \n // Try to extract the error message from the content field\n const contentArray = data.content as any[] | undefined;\n if (contentArray && contentArray.length > 0) {\n result.content = contentArray;\n \n // Extract error message from the first content item\n if (contentArray[0]?.text) {\n result.errorMsg = contentArray[0].text;\n throw new Error(contentArray[0].text);\n }\n }\n throw new Error(defaultErrorMsg);\n }\n \n // Extract content array if it exists\n if (Array.isArray(data.content)) {\n result.content = data.content;\n \n // Extract textContent from content items\n if (result.content.length > 0) {\n const textParts: string[] = [];\n for (const item of result.content) {\n if (item && typeof item === 'object' && item.text && typeof item.text === 'string') {\n textParts.push(item.text);\n }\n }\n result.textContent = textParts.join('\\n');\n }\n }\n \n return result;\n } catch (error) {\n logError(`Error calling CallMcpTool - ${toolName}:`, error);\n throw new APIError(`Failed to call ${toolName}: ${error}`);\n }\n }\n\n /**\n * Helper method to parse JSON string or return a simple object with output\n */\n private parseCommandResult(text: string): CommandResult {\n try {\n return JSON.parse(text) as CommandResult;\n } catch (error) {\n return { output: text };\n }\n }\n\n /**\n * Execute a command in the cloud environment with a specified timeout.\n * \n * @param command - The command to execute.\n * @param timeoutMs - The timeout for the command execution in milliseconds. Default is 1000ms.\n * @returns A string containing the command output\n */\n async executeCommand(command: string, timeoutMs: number = 1000): Promise<string> {\n const args = {\n command,\n timeout_ms: timeoutMs\n };\n \n const result = await this.callMcpTool('shell', args, 'Failed to execute command');\n \n // Return the text content directly\n return result.textContent || '';\n }\n \n /**\n * Helper method to parse JSON string or return a simple object with output\n */\n private parseCodeExecutionResult(text: string): CodeExecutionResult {\n try {\n return JSON.parse(text) as CodeExecutionResult;\n } catch (error) {\n return { output: text };\n }\n }\n \n /**\n * Execute code in the specified language with a timeout.\n * \n * @param code - The code to execute.\n * @param language - The programming language of the code. Must be either 'python' or 'javascript'.\n * @param timeoutS - The timeout for the code execution in seconds. Default is 300s.\n * @returns A string containing the code execution output\n * @throws APIError if the code execution fails or if an unsupported language is specified.\n */\n async runCode(code: string, language: string, timeoutS: number = 300): Promise<string> {\n // Validate language\n if (language !== 'python' && language !== 'javascript') {\n throw new Error(`Unsupported language: ${language}. Supported languages are 'python' and 'javascript'`);\n }\n \n const args = {\n code,\n language,\n timeout_s: timeoutS\n };\n \n const result = await this.callMcpTool('run_code', args, 'Failed to execute code');\n \n // Return the text content directly\n return result.textContent || '';\n }\n}\n","export { Oss } from './oss';\n","import { APIError } from '../exceptions';\nimport { Session } from '../session';\nimport { Client } from '../api/client';\nimport { CallMcpToolRequest } from '../api/models/model';\nimport { log, logError } from '../utils/logger';\n\nimport * as $_client from '../api';\n\n/**\n * Result object for a CallMcpTool operation\n */\ninterface CallMcpToolResult {\n data: Record<string, any>;\n content?: any[];\n textContent?: string;\n isError: boolean;\n errorMsg?: string;\n statusCode: number;\n}\n\n/**\n * Handles Object Storage Service operations in the AgentBay cloud environment.\n */\nexport class Oss {\n private session: Session;\n private client!: $_client.Client;\n private baseUrl!: string;\n\n /**\n * Initialize an Oss object.\n *\n * @param session - The Session instance that this Oss belongs to.\n */\n constructor(session: Session) {\n this.session = session;\n }\n\n /**\n * Helper method to call MCP tools and handle common response processing\n *\n * @param toolName - Name of the MCP tool to call\n * @param args - Arguments to pass to the tool\n * @param defaultErrorMsg - Default error message if specific error details are not available\n * @returns A CallMcpToolResult with the response data\n * @throws APIError if the call fails\n */\n private async callMcpTool(\n toolName: string,\n args: Record<string, any>,\n defaultErrorMsg: string\n ): Promise<CallMcpToolResult> {\n try {\n const callToolRequest = new $_client.CallMcpToolRequest({\n authorization: `Bearer ${this.session.getAPIKey()}`,\n sessionId: this.session.getSessionId(),\n name: toolName,\n args: JSON.stringify(args)\n });\n\n // Log API request\n log(`API Call: CallMcpTool - ${toolName}`);\n log(`Request: SessionId=${this.session.getSessionId()}, Args=${JSON.stringify(args)}`);\n\n const response = await this.session.getClient().callMcpTool(callToolRequest);\n\n // Log API response\n log(`Response from CallMcpTool - ${toolName}:`, response.body);\n\n if (!response.body?.data) {\n throw new Error('Invalid response data format');\n }\n\n // Extract data from response\n const data = response.body.data as Record<string, any>;\n\n // Create result object\n const result: CallMcpToolResult = {\n data,\n statusCode: response.statusCode || 0,\n isError: false\n };\n\n // Check if there's an error in the response\n if (data.isError === true) {\n result.isError = true;\n\n // Try to extract the error message from the content field\n const contentArray = data.content as any[] | undefined;\n if (contentArray && contentArray.length > 0) {\n result.content = contentArray;\n\n // Extract error message from the first content item\n if (contentArray[0]?.text) {\n result.errorMsg = contentArray[0].text;\n throw new Error(contentArray[0].text);\n }\n }\n throw new Error(defaultErrorMsg);\n }\n\n // Extract content array if it exists\n if (Array.isArray(data.content)) {\n result.content = data.content;\n\n // Extract textContent from content items\n if (result.content.length > 0) {\n const textParts: string[] = [];\n for (const item of result.content) {\n if (item && typeof item === 'object' && item.text && typeof item.text === 'string') {\n textParts.push(item.text);\n }\n }\n result.textContent = textParts.join('\\n');\n }\n }\n\n return result;\n } catch (error) {\n logError(`Error calling CallMcpTool - ${toolName}:`, error);\n throw new APIError(`Failed to call ${toolName}: ${error}`);\n }\n }\n\n /**\n * Initialize OSS environment variables with the specified credentials.\n *\n * @param accessKeyId - The Access Key ID for OSS authentication.\n * @param accessKeySecret - The Access Key Secret for OSS authentication.\n * @param securityToken - The security token for OSS authentication.\n * @param endpoint - The OSS service endpoint. If not specified, the default is used.\n * @param region - The OSS region. If not specified, the default is used.\n * @returns The extracted text content from the API response\n */\n async envInit(\n accessKeyId: string,\n accessKeySecret: string,\n securityToken: string,\n endpoint?: string,\n region?: string\n ): Promise<string> {\n const args: Record<string, any> = {\n access_key_id: accessKeyId,\n access_key_secret: accessKeySecret,\n security_token: securityToken\n };\n\n // Add optional parameters if provided\n if (endpoint) {\n args.endpoint = endpoint;\n }\n if (region) {\n args.region = region;\n }\n\n const result = await this.callMcpTool('oss_env_init', args, 'error initializing OSS environment');\n\n // Return the extracted text content\n return result.textContent || '';\n }\n\n /**\n * Create an OSS client with the provided credentials.\n *\n * @param accessKeyId - The Access Key ID for OSS authentication.\n * @param accessKeySecret - The Access Key Secret for OSS authentication.\n * @param endpoint - The OSS service endpoint. If not specified, the default is used.\n * @param region - The OSS region. If not specified, the default is used.\n * @returns The extracted text content from the API response\n */\n async createClient(\n accessKeyId: string,\n accessKeySecret: string,\n endpoint?: string,\n region?: string\n ): Promise<string> {\n const args: Record<string, any> = {\n access_key_id: accessKeyId,\n access_key_secret: accessKeySecret\n };\n\n // Add optional parameters if provided\n if (endpoint) {\n args.endpoint = endpoint;\n }\n if (region) {\n args.region = region;\n }\n\n const result = await this.callMcpTool('oss_client_create', args, 'error creating OSS client');\n\n // Return the extracted text content\n return result.textContent || '';\n }\n\n /**\n * Upload a local file or directory to OSS.\n *\n * @param bucket - OSS bucket name.\n * @param object - Object key in OSS.\n * @param path - Local file or directory path to upload.\n * @returns The extracted text content from the API response\n */\n async upload(bucket: string, object: string, path: string): Promise<string> {\n const args = {\n bucket,\n object,\n path\n };\n\n const result = await this.callMcpTool('oss_upload', args, 'error uploading to OSS');\n\n // Return the extracted text content\n return result.textContent || '';\n }\n\n /**\n * Upload a local file or directory to OSS using a pre-signed URL.\n *\n * @param url - Pre-signed URL for anonymous upload.\n * @param path - Local file or directory path to upload.\n * @returns The extracted text content from the API response\n */\n async uploadAnonymous(url: string, path: string): Promise<string> {\n const args = {\n url,\n path\n };\n\n const result = await this.callMcpTool('oss_upload_annon', args, 'error uploading anonymously');\n\n // Return the extracted text content\n return result.textContent || '';\n }\n\n /**\n * Download an object from OSS to a local file or directory.\n *\n * @param bucket - OSS bucket name.\n * @param object - Object key in OSS.\n * @param path - Local file or directory path to save the downloaded content.\n * @returns The extracted text content from the API response\n */\n async download(bucket: string, object: string, path: string): Promise<string> {\n const args = {\n bucket,\n object,\n path\n };\n\n const result = await this.callMcpTool('oss_download', args, 'error downloading from OSS');\n\n // Return the extracted text content\n return result.textContent || '';\n }\n\n /**\n * Download an object from OSS using a pre-signed URL.\n *\n * @param url - Pre-signed URL for anonymous download.\n * @param path - Local file or directory path to save the downloaded content.\n * @returns The extracted text content from the API response\n */\n async downloadAnonymous(url: string, path: string): Promise<string> {\n const args = {\n url,\n path\n };\n\n const result = await this.callMcpTool('oss_download_annon', args, 'error downloading anonymously');\n\n // Return the extracted text content\n return result.textContent || '';\n }\n}\n","// Export the client and models\nimport {Client} from './client';\nexport {Client } from './client';\nexport * from './models/model';\n\nexport default Client;\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { OpenApiUtil, $OpenApiUtil }from '@alicloud/openapi-core';\nimport * as OpenApiDefault from \"@alicloud/openapi-core\";\nconst OpenApi = OpenApiDefault.default || OpenApiDefault;\nimport { log } from '../utils/logger';\n\n\nimport * as $_model from './models/model';\nexport * from './models/model';\n\n\nexport class Client extends OpenApi {\n constructor(config: $OpenApiUtil.Config) {\n super(config);\n this._signatureAlgorithm = \"v2\";\n this._endpointRule = \"\";\n this.checkConfig(config);\n this._endpoint = this.getEndpoint(\"wuyingai\", this._regionId, this._endpointRule, this._network, this._suffix, this._endpointMap, this._endpoint);\n }\n\n\n getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: {[key: string ]: string}, endpoint: string): string {\n if (!$dara.isNull(endpoint)) {\n return endpoint;\n }\n\n if (!$dara.isNull(endpointMap) && !$dara.isNull(endpointMap[regionId])) {\n return endpointMap[regionId];\n }\n\n return OpenApiUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);\n }\n\n\n /**\n * 调用mcp工具\n * \n * @param request - CallMcpToolRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns CallMcpToolResponse\n */\n async callMcpToolWithOptions(request: $_model.CallMcpToolRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CallMcpToolResponse> {\n request.validate();\n let body : {[key: string ]: any} = { };\n if (!$dara.isNull(request.args)) {\n body[\"Args\"] = request.args;\n }\n\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.externalUserId)) {\n body[\"ExternalUserId\"] = request.externalUserId;\n }\n\n if (!$dara.isNull(request.imageId)) {\n body[\"ImageId\"] = request.imageId;\n }\n\n if (!$dara.isNull(request.name)) {\n body[\"Name\"] = request.name;\n }\n\n if (!$dara.isNull(request.server)) {\n body[\"Server\"] = request.server;\n }\n\n if (!$dara.isNull(request.sessionId)) {\n body[\"SessionId\"] = request.sessionId;\n }\n\n if (!$dara.isNull(request.tool)) {\n body[\"Tool\"] = request.tool;\n }\n\n let req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n let params = new $OpenApiUtil.Params({\n action: \"CallMcpTool\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n \n return $dara.cast<$_model.CallMcpToolResponse>(await this.callApi(params, req, runtime), new $_model.CallMcpToolResponse({}));\n }\n\n /**\n * 调用mcp工具\n * \n * @param request - CallMcpToolRequest\n * @returns CallMcpToolResponse\n */\n async callMcpTool(request: $_model.CallMcpToolRequest): Promise<$_model.CallMcpToolResponse> {\n let runtime = new $dara.RuntimeOptions({ });\n return await this.callMcpToolWithOptions(request, runtime);\n }\n\n /**\n * 创建 mcp session\n * \n * @param request - CreateMcpSessionRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns CreateMcpSessionResponse\n */\n async createMcpSessionWithOptions(request: $_model.CreateMcpSessionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateMcpSessionResponse> {\n request.validate();\n let body : {[key: string ]: any} = { };\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.contextId)) {\n body[\"ContextId\"] = request.contextId;\n }\n\n if (!$dara.isNull(request.externalUserId)) {\n body[\"ExternalUserId\"] = request.externalUserId;\n }\n\n if (!$dara.isNull(request.imageId)) {\n body[\"ImageId\"] = request.imageId;\n }\n\n if (!$dara.isNull(request.labels)) {\n body[\"Labels\"] = request.labels;\n }\n\n if (!$dara.isNull(request.sessionId)) {\n body[\"SessionId\"] = request.sessionId;\n }\n if(!$dara.isNull(request.imageId)){\n body[\"ImageId\"] = request.imageId;\n }\n\n let req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n let params = new $OpenApiUtil.Params({\n action: \"CreateMcpSession\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.CreateMcpSessionResponse>(await this.callApi(params, req, runtime), new $_model.CreateMcpSessionResponse({}));\n }\n\n /**\n * 创建 mcp session\n * \n * @param request - CreateMcpSessionRequest\n * @returns CreateMcpSessionResponse\n */\n async createMcpSession(request: $_model.CreateMcpSessionRequest): Promise<$_model.CreateMcpSessionResponse> {\n let runtime = new $dara.RuntimeOptions({ });\n return await this.createMcpSessionWithOptions(request, runtime);\n }\n\n /**\n * 删除持久化上下文\n * \n * @param request - DeleteContextRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns DeleteContextResponse\n */\n async deleteContextWithOptions(request: $_model.DeleteContextRequest, runtime: $dara.RuntimeOptions): Promise<$_model.DeleteContextResponse> {\n request.validate();\n let body : {[key: string ]: any} = { };\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.id)) {\n body[\"Id\"] = request.id;\n }\n\n let req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n let params = new $OpenApiUtil.Params({\n action: \"DeleteContext\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.DeleteContextResponse>(await this.callApi(params, req, runtime), new $_model.DeleteContextResponse({}));\n }\n\n /**\n * 删除持久化上下文\n * \n * @param request - DeleteContextRequest\n * @returns DeleteContextResponse\n */\n async deleteContext(request: $_model.DeleteContextRequest): Promise<$_model.DeleteContextResponse> {\n let runtime = new $dara.RuntimeOptions({ });\n return await this.deleteContextWithOptions(request, runtime);\n }\n\n /**\n * 获取上下文\n * \n * @param request - GetContextRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns GetContextResponse\n */\n async getContextWithOptions(request: $_model.GetContextRequest, runtime: $dara.RuntimeOptions): Promise<$_model.GetContextResponse> {\n request.validate();\n let body : {[key: string ]: any} = { };\n if (!$dara.isNull(request.allowCreate)) {\n body[\"AllowCreate\"] = request.allowCreate;\n }\n\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.name)) {\n body[\"Name\"] = request.name;\n }\n\n let req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n let params = new $OpenApiUtil.Params({\n action: \"GetContext\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.GetContextResponse>(await this.callApi(params, req, runtime), new $_model.GetContextResponse({}));\n }\n\n /**\n * 获取上下文\n * \n * @param request - GetContextRequest\n * @returns GetContextResponse\n */\n async getContext(request: $_model.GetContextRequest): Promise<$_model.GetContextResponse> {\n let runtime = new $dara.RuntimeOptions({ });\n return await this.getContextWithOptions(request, runtime);\n }\n\n /**\n * 获取标签\n * \n * @param request - GetLabelRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns GetLabelResponse\n */\n async getLabelWithOptions(request: $_model.GetLabelRequest, runtime: $dara.RuntimeOptions): Promise<$_model.GetLabelResponse> {\n request.validate();\n let body : {[key: string ]: any} = { };\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.maxResults)) {\n body[\"MaxResults\"] = request.maxResults;\n }\n\n if (!$dara.isNull(request.nextToken)) {\n body[\"NextToken\"] = request.nextToken;\n }\n\n if (!$dara.isNull(request.sessionId)) {\n body[\"SessionId\"] = request.sessionId;\n }\n\n let req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n let params = new $OpenApiUtil.Params({\n action: \"GetLabel\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.GetLabelResponse>(await this.callApi(params, req, runtime), new $_model.GetLabelResponse({}));\n }\n\n /**\n * 获取标签\n * \n * @param request - GetLabelRequest\n * @returns GetLabelResponse\n */\n async getLabel(request: $_model.GetLabelRequest): Promise<$_model.GetLabelResponse> {\n let runtime = new $dara.RuntimeOptions({ });\n return await this.getLabelWithOptions(request, runtime);\n }\n\n /**\n * 获取特定端口的转发链接\n * \n * @param request - GetLinkRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns GetLinkResponse\n */\n async getLinkWithOptions(request: $_model.GetLinkRequest, runtime: $dara.RuntimeOptions): Promise<$_model.GetLinkResponse> {\n request.validate();\n let body : {[key: string ]: any} = { };\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.sessionId)) {\n body[\"SessionId\"] = request.sessionId;\n }\n\n let req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n let params = new $OpenApiUtil.Params({\n action: \"GetLink\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.GetLinkResponse>(await this.callApi(params, req, runtime), new $_model.GetLinkResponse({}));\n }\n\n /**\n * 获取特定端口的转发链接\n * \n * @param request - GetLinkRequest\n * @returns GetLinkResponse\n */\n async getLink(request: $_model.GetLinkRequest): Promise<$_model.GetLinkResponse> {\n let runtime = new $dara.RuntimeOptions({ });\n return await this.getLinkWithOptions(request, runtime);\n }\n\n /**\n * 获取mcp资源信息\n * \n * @param request - GetMcpResourceRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns GetMcpResourceResponse\n */\n async getMcpResourceWithOptions(request: $_model.GetMcpResourceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.GetMcpResourceResponse> {\n request.validate();\n let body : {[key: string ]: any} = { };\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.sessionId)) {\n body[\"SessionId\"] = request.sessionId;\n }\n\n let req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n let params = new $OpenApiUtil.Params({\n action: \"GetMcpResource\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.GetMcpResourceResponse>(await this.callApi(params, req, runtime), new $_model.GetMcpResourceResponse({}));\n }\n\n /**\n * 获取mcp资源信息\n * \n * @param request - GetMcpResourceRequest\n * @returns GetMcpResourceResponse\n */\n async getMcpResource(request: $_model.GetMcpResourceRequest): Promise<$_model.GetMcpResourceResponse> {\n let runtime = new $dara.RuntimeOptions({ });\n return await this.getMcpResourceWithOptions(request, runtime);\n }\n\n\n /**\n * 获取上下文列表\n * \n * @param request - ListContextsRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns ListContextsResponse\n */\n async listContextsWithOptions(request: $_model.ListContextsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ListContextsResponse> {\n request.validate();\n let body : {[key: string ]: any} = { };\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.maxResults)) {\n body[\"MaxResults\"] = request.maxResults;\n }\n\n if (!$dara.isNull(request.nextToken)) {\n body[\"NextToken\"] = request.nextToken;\n }\n\n let req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n let params = new $OpenApiUtil.Params({\n action: \"ListContexts\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.ListContextsResponse>(await this.callApi(params, req, runtime), new $_model.ListContextsResponse({}));\n }\n\n /**\n * 获取上下文列表\n * \n * @param request - ListContextsRequest\n * @returns ListContextsResponse\n */\n async listContexts(request: $_model.ListContextsRequest): Promise<$_model.ListContextsResponse> {\n let runtime = new $dara.RuntimeOptions({ });\n return await this.listContextsWithOptions(request, runtime);\n }\n\n\n /**\n * 根据Lable查询Session列表\n * \n * @param request - ListSessionRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns ListSessionResponse\n */\n async listSessionWithOptions(request: $_model.ListSessionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ListSessionResponse> {\n request.validate();\n let body : {[key: string ]: any} = { };\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.labels)) {\n body[\"Labels\"] = request.labels;\n }\n\n if (!$dara.isNull(request.maxResults)) {\n body[\"MaxResults\"] = request.maxResults;\n }\n\n if (!$dara.isNull(request.nextToken)) {\n body[\"NextToken\"] = request.nextToken;\n }\n\n let req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n let params = new $OpenApiUtil.Params({\n action: \"ListSession\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.ListSessionResponse>(await this.callApi(params, req, runtime), new $_model.ListSessionResponse({}));\n }\n\n /**\n * 根据Lable查询Session列表\n * \n * @param request - ListSessionRequest\n * @returns ListSessionResponse\n */\n async listSession(request: $_model.ListSessionRequest): Promise<$_model.ListSessionResponse> {\n let runtime = new $dara.RuntimeOptions({ });\n return await this.listSessionWithOptions(request, runtime);\n }\n\n /**\n * 修改上下文\n * \n * @param request - ModifyContextRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns ModifyContextResponse\n */\n async modifyContextWithOptions(request: $_model.ModifyContextRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ModifyContextResponse> {\n request.validate();\n let body : {[key: string ]: any} = { };\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.id)) {\n body[\"Id\"] = request.id;\n }\n\n if (!$dara.isNull(request.name)) {\n body[\"Name\"] = request.name;\n }\n\n let req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n let params = new $OpenApiUtil.Params({\n action: \"ModifyContext\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.ModifyContextResponse>(await this.callApi(params, req, runtime), new $_model.ModifyContextResponse({}));\n }\n\n /**\n * 修改上下文\n * \n * @param request - ModifyContextRequest\n * @returns ModifyContextResponse\n */\n async modifyContext(request: $_model.ModifyContextRequest): Promise<$_model.ModifyContextResponse> {\n let runtime = new $dara.RuntimeOptions({ });\n return await this.modifyContextWithOptions(request, runtime);\n }\n\n /**\n * 释放 mcp session\n * \n * @param request - ReleaseMcpSessionRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns ReleaseMcpSessionResponse\n */\n async releaseMcpSessionWithOptions(request: $_model.ReleaseMcpSessionRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ReleaseMcpSessionResponse> {\n request.validate();\n let body : {[key: string ]: any} = { };\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.sessionId)) {\n body[\"SessionId\"] = request.sessionId;\n }\n\n let req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n let params = new $OpenApiUtil.Params({\n action: \"ReleaseMcpSession\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.ReleaseMcpSessionResponse>(await this.callApi(params, req, runtime), new $_model.ReleaseMcpSessionResponse({}));\n }\n\n /**\n * 释放 mcp session\n * \n * @param request - ReleaseMcpSessionRequest\n * @returns ReleaseMcpSessionResponse\n */\n async releaseMcpSession(request: $_model.ReleaseMcpSessionRequest): Promise<$_model.ReleaseMcpSessionResponse> {\n let runtime = new $dara.RuntimeOptions({ });\n return await this.releaseMcpSessionWithOptions(request, runtime);\n }\n\n /**\n * 设置标签\n * \n * @param request - SetLabelRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns SetLabelResponse\n */\n async setLabelWithOptions(request: $_model.SetLabelRequest, runtime: $dara.RuntimeOptions): Promise<$_model.SetLabelResponse> {\n request.validate();\n let body : {[key: string ]: any} = { };\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.labels)) {\n body[\"Labels\"] = request.labels;\n }\n\n if (!$dara.isNull(request.sessionId)) {\n body[\"SessionId\"] = request.sessionId;\n }\n\n let req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n let params = new $OpenApiUtil.Params({\n action: \"SetLabel\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.SetLabelResponse>(await this.callApi(params, req, runtime), new $_model.SetLabelResponse({}));\n }\n\n /**\n * 设置标签\n * \n * @param request - SetLabelRequest\n * @returns SetLabelResponse\n */\n async setLabel(request: $_model.SetLabelRequest): Promise<$_model.SetLabelResponse> {\n let runtime = new $dara.RuntimeOptions({ });\n return await this.setLabelWithOptions(request, runtime);\n }\n\n}\n","import { CallMcpToolRequest } from '../api/models/CallMcpToolRequest';\nimport {Client} from '../api/client';\nimport { log, logError } from '../utils/logger';\nimport { APIError } from '../exceptions';\n\n/**\n * Result object for a CallMcpTool operation\n */\ninterface CallMcpToolResult {\n data: Record<string, any>;\n content?: any[];\n textContent?: string;\n isError: boolean;\n errorMsg?: string;\n statusCode: number;\n}\n\n/**\n * Represents an installed application.\n */\nexport interface InstalledApp {\n name: string;\n start_cmd: string;\n stop_cmd?: string;\n work_directory?: string;\n}\n\n/**\n * Represents a running process.\n */\nexport interface Process {\n pname: string;\n pid: number;\n cmdline?: string;\n path?: string;\n}\n\n/**\n * Handles application management operations in the AgentBay cloud environment.\n */\nexport class Application {\n private session: {\n getAPIKey(): string;\n getClient(): Client;\n getSessionId(): string;\n };\n\n /**\n * Creates a new Application instance.\n * @param session The session object that provides access to the AgentBay API.\n */\n constructor(session: {\n getAPIKey(): string;\n getClient(): Client;\n getSessionId(): string;\n }) {\n this.session = session;\n \n }\n\n /**\n * Helper method to call MCP tools and handle common response processing\n * \n * @param toolName - Name of the MCP tool to call\n * @param args - Arguments to pass to the tool\n * @param defaultErrorMsg - Default error message if specific error details are not available\n * @returns A CallMcpToolResult with the response data\n * @throws APIError if the call fails\n */\n private async callMcpTool(\n toolName: string, \n args: Record<string, any>,\n defaultErrorMsg: string\n ): Promise<CallMcpToolResult> {\n try {\n const argsJSON = JSON.stringify(args);\n const request = new CallMcpToolRequest({\n authorization: `Bearer ${this.session.getAPIKey()}`,\n sessionId: this.session.getSessionId(),\n name: toolName,\n args: argsJSON\n });\n \n // Log API request\n log(`API Call: CallMcpTool - ${toolName}`);\n log(`Request: SessionId=${request.sessionId}, Args=${request.args}`);\n \n const client = this.session.getClient();\n const response = await client.callMcpTool(request);\n \n // Log API response\n if (response && response.body) {\n log(`Response from CallMcpTool - ${toolName}:`, response.body);\n }\n \n // Extract data from response\n if (!response.body?.data) {\n throw new Error('Invalid response data format');\n }\n \n const data = response.body.data as Record<string, any>;\n \n // Create result object\n const result: CallMcpToolResult = {\n data,\n statusCode: response.statusCode || 0,\n isError: false\n };\n \n // Check if there's an error in the response\n if (data.isError === true) {\n result.isError = true;\n \n // Try to extract the error message from the content field\n const contentArray = data.content as any[] | undefined;\n if (contentArray && contentArray.length > 0) {\n result.content = contentArray;\n \n // Extract error message from the first content item\n if (contentArray[0]?.text) {\n result.errorMsg = contentArray[0].text;\n throw new Error(contentArray[0].text);\n }\n }\n throw new Error(defaultErrorMsg);\n }\n \n // Extract content array if it exists\n if (Array.isArray(data.content)) {\n result.content = data.content;\n \n // Extract textContent from content items\n if (result.content.length > 0) {\n const textParts: string[] = [];\n for (const item of result.content) {\n if (item && typeof item === 'object' && item.text && typeof item.text === 'string') {\n textParts.push(item.text);\n }\n }\n result.textContent = textParts.join('\\n');\n }\n }\n \n return result;\n } catch (error) {\n logError(`Error calling CallMcpTool - ${toolName}:`, error);\n throw new APIError(`Failed to call ${toolName}: ${error}`);\n }\n }\n\n /**\n * Helper method to parse JSON string into objects\n */\n private parseJSON<T>(jsonString: string): T {\n try {\n return JSON.parse(jsonString);\n } catch (error) {\n throw new Error(`Failed to parse JSON: ${error}`);\n }\n }\n\n /**\n * Retrieves a list of installed applications.\n * @param startMenu Whether to include applications from the start menu. Defaults to true.\n * @param desktop Whether to include applications from the desktop. Defaults to true.\n * @param ignoreSystemApps Whether to ignore system applications. Defaults to true.\n * @returns Array of InstalledApp objects\n * @throws Error if the operation fails.\n */\n async getInstalledApps(\n startMenu: boolean = true,\n desktop: boolean = true,\n ignoreSystemApps: boolean = true\n ): Promise<InstalledApp[]> {\n const args = {\n start_menu: startMenu,\n desktop,\n ignore_system_apps: ignoreSystemApps\n };\n\n const result = await this.callMcpTool('get_installed_apps', args, 'Failed to get installed apps');\n \n if (!result.textContent) {\n return [];\n }\n \n return this.parseJSON<InstalledApp[]>(result.textContent);\n }\n\n /**\n * Starts an application with the given command and optional working directory.\n * @param startCmd The command to start the application.\n * @param workDirectory The working directory for the application. Defaults to an empty string.\n * @returns Array of Process objects representing the started processes\n * @throws Error if the operation fails.\n */\n async startApp(startCmd: string, workDirectory: string = ''): Promise<Process[]> {\n const args: any = {\n start_cmd: startCmd\n };\n\n if (workDirectory) {\n args.work_directory = workDirectory;\n }\n\n const result = await this.callMcpTool('start_app', args, 'Failed to start app');\n \n if (!result.textContent) {\n return [];\n }\n \n return this.parseJSON<Process[]>(result.textContent);\n }\n\n /**\n * Stops an application by process name.\n * @param pname The name of the process to stop.\n * @throws Error if the operation fails.\n */\n async stopAppByPName(pname: string): Promise<void> {\n const args = {\n pname\n };\n\n await this.callMcpTool('stop_app_by_pname', args, 'Failed to stop app by pname');\n }\n\n /**\n * Stops an application by process ID.\n * @param pid The ID of the process to stop.\n * @throws Error if the operation fails.\n */\n async stopAppByPID(pid: number): Promise<void> {\n const args = {\n pid\n };\n\n await this.callMcpTool('stop_app_by_pid', args, 'Failed to stop app by pid');\n }\n\n /**\n * Stops an application by stop command.\n * @param stopCmd The command to stop the application.\n * @throws Error if the operation fails.\n */\n async stopAppByCmd(stopCmd: string): Promise<void> {\n const args = {\n stop_cmd: stopCmd\n };\n\n await this.callMcpTool('stop_app_by_cmd', args, 'Failed to stop app by command');\n }\n\n /**\n * Lists all currently visible applications.\n * @returns Array of Process objects representing the visible processes\n * @throws Error if the operation fails.\n */\n async listVisibleApps(): Promise<Process[]> {\n const args = {};\n\n const result = await this.callMcpTool('list_visible_apps', args, 'Failed to list visible apps');\n \n if (!result.textContent) {\n return [];\n }\n \n return this.parseJSON<Process[]>(result.textContent);\n }\n}\n","import { CallMcpToolRequest } from '../api/models/CallMcpToolRequest';\nimport { log, logError } from '../utils/logger';\nimport { APIError } from '../exceptions';\n\n/**\n * Result object for a CallMcpTool operation\n */\ninterface CallMcpToolResult {\n data: Record<string, any>;\n content?: any[];\n textContent?: string;\n isError: boolean;\n errorMsg?: string;\n statusCode: number;\n}\n\n/**\n * Represents a window in the system.\n */\nexport interface Window {\n window_id: number;\n title: string;\n absolute_upper_left_x?: number;\n absolute_upper_left_y?: number;\n width?: number;\n height?: number;\n pid?: number;\n pname?: string;\n child_windows?: Window[];\n}\n\n/**\n * Handles window management operations in the AgentBay cloud environment.\n */\nexport class WindowManager {\n private session: {\n getAPIKey(): string;\n getClient(): any;\n getSessionId(): string;\n };\n\n /**\n * Creates a new WindowManager instance.\n * @param session The session object that provides access to the AgentBay API.\n */\n constructor(session: {\n getAPIKey(): string;\n getClient(): any;\n getSessionId(): string;\n }) {\n this.session = session;\n }\n\n /**\n * Helper method to call MCP tools and handle common response processing\n * \n * @param toolName - Name of the MCP tool to call\n * @param args - Arguments to pass to the tool\n * @param defaultErrorMsg - Default error message if specific error details are not available\n * @returns A CallMcpToolResult with the response data\n * @throws APIError if the call fails\n */\n private async callMcpTool(\n toolName: string, \n args: Record<string, any>,\n defaultErrorMsg: string\n ): Promise<CallMcpToolResult> {\n try {\n const argsJSON = JSON.stringify(args);\n const request = new CallMcpToolRequest({\n authorization: `Bearer ${this.session.getAPIKey()}`,\n sessionId: this.session.getSessionId(),\n name: toolName,\n args: argsJSON\n });\n \n // Log API request\n log(`API Call: CallMcpTool - ${toolName}`);\n log(`Request: SessionId=${request.sessionId}, Args=${request.args}`);\n \n const response = await this.session.getClient().callMcpTool(request);\n \n // Log API response\n if (response && response.body) {\n log(`Response from CallMcpTool - ${toolName}:`, response.body);\n }\n \n // Extract data from response\n if (!response.body?.data) {\n throw new Error('Invalid response data format');\n }\n \n const data = response.body.data as Record<string, any>;\n \n // Create result object\n const result: CallMcpToolResult = {\n data,\n statusCode: response.statusCode || 0,\n isError: false\n };\n \n // Check if there's an error in the response\n if (data.isError === true) {\n result.isError = true;\n \n // Try to extract the error message from the content field\n const contentArray = data.content as any[] | undefined;\n if (contentArray && contentArray.length > 0) {\n result.content = contentArray;\n \n // Extract error message from the first content item\n if (contentArray[0]?.text) {\n result.errorMsg = contentArray[0].text;\n throw new Error(contentArray[0].text);\n }\n }\n throw new Error(defaultErrorMsg);\n }\n \n // Extract content array if it exists\n if (Array.isArray(data.content)) {\n result.content = data.content;\n \n // Extract textContent from content items\n if (result.content.length > 0) {\n const textParts: string[] = [];\n for (const item of result.content) {\n if (item && typeof item === 'object' && item.text && typeof item.text === 'string') {\n textParts.push(item.text);\n }\n }\n result.textContent = textParts.join('\\n');\n }\n }\n \n return result;\n } catch (error) {\n logError(`Error calling CallMcpTool - ${toolName}:`, error);\n throw new APIError(`Failed to call ${toolName}: ${error}`);\n }\n }\n\n /**\n * Helper method to parse JSON string into Window objects\n * @param jsonStr - JSON string to parse\n * @returns Array of Window objects or single Window object\n */\n private parseWindowsFromJSON(jsonStr: string): Window[] {\n try {\n const parsed = JSON.parse(jsonStr);\n return Array.isArray(parsed) ? parsed : [parsed];\n } catch (error) {\n throw new Error(`Failed to parse window data: ${error}`);\n }\n }\n\n /**\n * Lists all root windows in the system.\n * @returns Array of Window objects\n * @throws Error if the operation fails.\n */\n async listRootWindows(): Promise<Window[]> {\n const args = {};\n\n const result = await this.callMcpTool('list_root_windows', args, 'Failed to list root windows');\n \n if (!result.textContent) {\n return [];\n }\n \n return this.parseWindowsFromJSON(result.textContent);\n }\n\n /**\n * Gets the currently active window.\n * @returns Window object or null if no active window\n * @throws Error if the operation fails.\n */\n async getActiveWindow(): Promise<Window | null> {\n const args = {};\n\n const result = await this.callMcpTool('get_active_window', args, 'Failed to get active window');\n \n if (!result.textContent) {\n return null;\n }\n \n const windows = this.parseWindowsFromJSON(result.textContent);\n return windows.length > 0 ? windows[0] : null;\n }\n\n /**\n * Activates a window by ID.\n * @param windowId The ID of the window to activate.\n * @throws Error if the operation fails.\n */\n async activateWindow(windowId: number): Promise<void> {\n const args = {\n window_id: windowId\n };\n\n await this.callMcpTool('activate_window', args, 'Failed to activate window');\n }\n\n /**\n * Maximizes a window by ID.\n * @param windowId The ID of the window to maximize.\n * @throws Error if the operation fails.\n */\n async maximizeWindow(windowId: number): Promise<void> {\n const args = {\n window_id: windowId\n };\n\n await this.callMcpTool('maximize_window', args, 'Failed to maximize window');\n }\n\n /**\n * Minimizes a window by ID.\n * @param windowId The ID of the window to minimize.\n * @throws Error if the operation fails.\n */\n async minimizeWindow(windowId: number): Promise<void> {\n const args = {\n window_id: windowId\n };\n\n await this.callMcpTool('minimize_window', args, 'Failed to minimize window');\n }\n\n /**\n * Restores a window by ID.\n * @param windowId The ID of the window to restore.\n * @throws Error if the operation fails.\n */\n async restoreWindow(windowId: number): Promise<void> {\n const args = {\n window_id: windowId\n };\n\n await this.callMcpTool('restore_window', args, 'Failed to restore window');\n }\n\n /**\n * Closes a window by ID.\n * @param windowId The ID of the window to close.\n * @throws Error if the operation fails.\n */\n async closeWindow(windowId: number): Promise<void> {\n const args = {\n window_id: windowId\n };\n\n await this.callMcpTool('close_window', args, 'Failed to close window');\n }\n\n /**\n * Sets a window to fullscreen by ID.\n * @param windowId The ID of the window to set to fullscreen.\n * @throws Error if the operation fails.\n */\n async fullscreenWindow(windowId: number): Promise<void> {\n const args = {\n window_id: windowId\n };\n\n await this.callMcpTool('fullscreen_window', args, 'Failed to set window to fullscreen');\n }\n\n /**\n * Resizes a window by ID.\n * @param windowId The ID of the window to resize.\n * @param width The new width of the window.\n * @param height The new height of the window.\n * @throws Error if the operation fails.\n */\n async resizeWindow(windowId: number, width: number, height: number): Promise<void> {\n const args = {\n window_id: windowId,\n width,\n height\n };\n\n await this.callMcpTool('resize_window', args, 'Failed to resize window');\n }\n\n /**\n * Enables or disables focus mode.\n * @param on Whether to enable focus mode.\n * @throws Error if the operation fails.\n */\n async focusMode(on: boolean): Promise<void> {\n const args = {\n on\n };\n\n await this.callMcpTool('focus_mode', args, 'Failed to set focus mode');\n }\n}\n","import { APIError } from '../exceptions';\nimport { Session } from '../session';\nimport { CallMcpToolRequest } from '../api/models/model';\nimport { log, logError } from '../utils/logger';\n\n/**\n * Interface representing a UI element in the UI hierarchy\n */\nexport interface UIElement {\n bounds: string;\n className: string;\n text: string;\n type: string;\n resourceId: string;\n index: number;\n isParent: boolean;\n children?: UIElement[];\n}\n\n/**\n * Result object for a CallMcpTool operation\n */\ninterface CallMcpToolResult {\n data: Record<string, any>;\n content?: any[];\n textContent?: string;\n isError: boolean;\n errorMsg?: string;\n statusCode: number;\n}\n\n/**\n * KeyCode constants for mobile device input\n */\nexport const KeyCode = {\n HOME: 3,\n BACK: 4,\n VOLUME_UP: 24,\n VOLUME_DOWN: 25,\n POWER: 26,\n MENU: 82\n};\n\n/**\n * UI handles UI operations in the AgentBay cloud environment.\n */\nexport class UI {\n private session: Session;\n\n /**\n * Initialize a UI object.\n * \n * @param session - The Session instance that this UI belongs to.\n */\n constructor(session: Session) {\n this.session = session;\n }\n\n /**\n * Helper method to call MCP tools and handle common response processing\n * \n * @param toolName - Name of the MCP tool to call\n * @param args - Arguments to pass to the tool\n * @param defaultErrorMsg - Default error message if specific error details are not available\n * @returns A CallMcpToolResult with the response data\n * @throws APIError if the call fails\n */\n private async callMcpTool(\n toolName: string, \n args: Record<string, any>,\n defaultErrorMsg: string\n ): Promise<CallMcpToolResult> {\n try {\n const argsJSON = JSON.stringify(args);\n const callToolRequest = new CallMcpToolRequest({\n authorization: `Bearer ${this.session.getAPIKey()}`,\n sessionId: this.session.getSessionId(),\n name: toolName,\n args: argsJSON\n });\n \n // Log API request\n log(`API Call: CallMcpTool - ${toolName}`);\n log(`Request: SessionId=${this.session.getSessionId()}, Args=${argsJSON}`);\n \n const response = await this.session.getClient().callMcpTool(callToolRequest);\n \n // Log API response\n log(`Response from CallMcpTool - ${toolName}:`, response.body);\n \n if (!response.body?.data) {\n throw new Error('Invalid response data format');\n }\n \n // Extract data from response\n const data = response.body.data as Record<string, any>;\n \n // Create result object\n const result: CallMcpToolResult = {\n data,\n statusCode: response.statusCode || 0,\n isError: false\n };\n \n // Check if there's an error in the response\n if (data.isError === true) {\n result.isError = true;\n \n // Try to extract the error message from the content field\n const contentArray = data.content as any[] | undefined;\n if (contentArray && contentArray.length > 0) {\n result.content = contentArray;\n \n // Extract error message from the first content item\n if (contentArray[0]?.text) {\n result.errorMsg = contentArray[0].text;\n throw new Error(contentArray[0].text);\n }\n }\n throw new Error(defaultErrorMsg);\n }\n \n // Extract content array if it exists\n if (Array.isArray(data.content)) {\n result.content = data.content;\n \n // Extract textContent from content items\n if (result.content.length > 0) {\n const textParts: string[] = [];\n for (const item of result.content) {\n if (item && typeof item === 'object' && item.text && typeof item.text === 'string') {\n textParts.push(item.text);\n }\n }\n result.textContent = textParts.join('\\n');\n }\n }\n \n return result;\n } catch (error) {\n logError(`Error calling CallMcpTool - ${toolName}:`, error);\n throw new APIError(`Failed to call ${toolName}: ${error}`);\n }\n }\n\n /**\n * Retrieves all clickable UI elements within the specified timeout.\n * \n * @param timeoutMs - The timeout in milliseconds. Default is 2000ms.\n * @returns An array of UIElement objects\n * @throws Error if the operation fails.\n */\n async getClickableUIElements(timeoutMs: number = 2000): Promise<UIElement[]> {\n const args = {\n timeout_ms: timeoutMs\n };\n \n const result = await this.callMcpTool('get_clickable_ui_elements', args, 'Failed to get clickable UI elements');\n \n if (!result.textContent) {\n return [];\n }\n \n try {\n // Parse the JSON string into an array of UIElement objects\n return JSON.parse(result.textContent) as UIElement[];\n } catch (error) {\n logError('Failed to parse clickable UI elements:', error);\n throw new APIError(`Failed to parse clickable UI elements: ${error}`);\n }\n }\n\n /**\n * Retrieves all UI elements within the specified timeout.\n * \n * @param timeoutMs - The timeout in milliseconds. Default is 2000ms.\n * @returns An array of UIElement objects\n * @throws Error if the operation fails.\n */\n async getAllUIElements(timeoutMs: number = 2000): Promise<UIElement[]> {\n const args = {\n timeout_ms: timeoutMs\n };\n \n const result = await this.callMcpTool('get_all_ui_elements', args, 'Failed to get all UI elements');\n \n if (!result.textContent) {\n return [];\n }\n \n try {\n // Parse the JSON string into an array of UIElement objects\n return JSON.parse(result.textContent) as UIElement[];\n } catch (error) {\n logError('Failed to parse all UI elements:', error);\n throw new APIError(`Failed to parse all UI elements: ${error}`);\n }\n }\n\n /**\n * Sends a key press event.\n * \n * @param key - The key code to send.\n * @returns The extracted text content from the API response\n * @throws Error if the operation fails.\n */\n async sendKey(key: number): Promise<string> {\n const args = {\n key\n };\n \n const result = await this.callMcpTool('send_key', args, 'Failed to send key');\n \n // Return the extracted text content\n return result.textContent || '';\n }\n\n /**\n * Inputs text into the active field.\n * \n * @param text - The text to input.\n * @returns The extracted text content from the API response\n * @throws Error if the operation fails.\n */\n async inputText(text: string): Promise<string> {\n const args = {\n text\n };\n \n const result = await this.callMcpTool('input_text', args, 'Failed to input text');\n \n // Return the extracted text content\n return result.textContent || '';\n }\n\n /**\n * Performs a swipe gesture on the screen.\n * \n * @param startX - The starting X coordinate.\n * @param startY - The starting Y coordinate.\n * @param endX - The ending X coordinate.\n * @param endY - The ending Y coordinate.\n * @param durationMs - The duration of the swipe in milliseconds. Default is 300ms.\n * @returns The extracted text content from the API response\n * @throws Error if the operation fails.\n */\n async swipe(startX: number, startY: number, endX: number, endY: number, durationMs: number = 300): Promise<string> {\n const args = {\n start_x: startX,\n start_y: startY,\n end_x: endX,\n end_y: endY,\n duration_ms: durationMs\n };\n \n const result = await this.callMcpTool('swipe', args, 'Failed to perform swipe');\n \n // Return the extracted text content\n return result.textContent || '';\n }\n\n /**\n * Performs a click at the specified coordinates.\n * \n * @param x - The X coordinate.\n * @param y - The Y coordinate.\n * @param button - The mouse button to click. Default is 'left'.\n * @returns The extracted text content from the API response\n * @throws Error if the operation fails.\n */\n async click(x: number, y: number, button: string = 'left'): Promise<string> {\n const args = {\n x,\n y,\n button\n };\n \n const result = await this.callMcpTool('click', args, 'Failed to perform click');\n \n // Return the extracted text content\n return result.textContent || '';\n }\n\n /**\n * Takes a screenshot of the current screen.\n * \n * @returns The extracted text content from the API response (usually a base64-encoded image)\n * @throws Error if the operation fails.\n */\n async screenshot(): Promise<string> {\n const args = {};\n \n const result = await this.callMcpTool('system_screenshot', args, 'Failed to take screenshot');\n \n // Return the extracted text content\n return result.textContent || '';\n }\n}\n","import { AgentBay } from './agent-bay';\nimport { APIError } from './exceptions';\nimport * as $_client from './api';\nimport { log, logError } from './utils/logger';\n\n/**\n * Represents a persistent storage context in the AgentBay cloud environment.\n */\nexport class Context {\n /**\n * The unique identifier of the context.\n */\n id: string;\n\n /**\n * The name of the context.\n */\n name: string;\n\n /**\n * The current state of the context (e.g., \"available\", \"in-use\").\n */\n state: string;\n\n /**\n * Date and time when the Context was created.\n */\n createdAt?: string;\n\n /**\n * Date and time when the Context was last used.\n */\n lastUsedAt?: string;\n\n /**\n * The operating system type this context is bound to.\n */\n osType?: string;\n\n /**\n * Initialize a Context object.\n * \n * @param id - The unique identifier of the context.\n * @param name - The name of the context.\n * @param state - The current state of the context.\n * @param createdAt - Date and time when the Context was created.\n * @param lastUsedAt - Date and time when the Context was last used.\n * @param osType - The operating system type this context is bound to.\n */\n constructor(\n id: string,\n name: string,\n state: string = 'available',\n createdAt?: string,\n lastUsedAt?: string,\n osType?: string\n ) {\n this.id = id;\n this.name = name;\n this.state = state;\n this.createdAt = createdAt;\n this.lastUsedAt = lastUsedAt;\n this.osType = osType;\n }\n}\n\n/**\n * Provides methods to manage persistent contexts in the AgentBay cloud environment.\n */\nexport class ContextService {\n private agentBay: AgentBay;\n\n /**\n * Initialize the ContextService.\n * \n * @param agentBay - The AgentBay instance.\n */\n constructor(agentBay: AgentBay) {\n this.agentBay = agentBay;\n }\n\n /**\n * Lists all available contexts.\n * \n * @returns A list of Context objects.\n */\n async list(): Promise<Context[]> {\n try {\n const request = new $_client.ListContextsRequest({\n authorization: `Bearer ${this.agentBay.getAPIKey()}`\n });\n \n // Log API request\n log(\"API Call: ListContexts\");\n log(\"Request: No parameters\");\n \n const response = await this.agentBay.getClient().listContexts(request);\n \n // Log API response\n log(`Response from ListContexts:`, response.body);\n \n const contexts: Context[] = [];\n if (response.body?.data) {\n for (const contextData of response.body.data) {\n contexts.push(new Context(\n contextData.id || '',\n contextData.name || '',\n contextData.state || 'available',\n contextData.createTime,\n contextData.lastUsedTime,\n contextData.osType\n ));\n }\n }\n \n return contexts;\n } catch (error) {\n logError(\"Error calling ListContexts:\", error);\n throw new APIError(`Failed to list contexts: ${error}`);\n }\n }\n\n /**\n * Gets a context by name. Optionally creates it if it doesn't exist.\n * \n * @param name - The name of the context to get.\n * @param create - Whether to create the context if it doesn't exist.\n * @returns The Context object if found or created, null if not found and create is false.\n */\n async get(name: string, create: boolean = false): Promise<Context | null> {\n try {\n const request = new $_client.GetContextRequest({\n name: name,\n allowCreate: create ? 'true' : 'false',\n authorization: `Bearer ${this.agentBay.getAPIKey()}`\n });\n \n // Log API request\n log(\"API Call: GetContext\");\n log(`Request: Name=${name}, AllowCreate=${create}`);\n \n const response = await this.agentBay.getClient().getContext(request);\n \n // Log API response\n log(`Response from GetContext:`, response.body);\n \n const contextId = response.body?.data?.id;\n if (!contextId) {\n return null;\n }\n \n // Get the full context details\n const contexts = await this.list();\n for (const context of contexts) {\n if (context.id === contextId) {\n return context;\n }\n }\n \n // If we couldn't find the context in the list, create a basic one\n return new Context(contextId, name);\n } catch (error) {\n logError(\"Error calling GetContext:\", error);\n throw new APIError(`Failed to get context ${name}: ${error}`);\n }\n }\n\n /**\n * Creates a new context with the given name.\n * \n * @param name - The name for the new context.\n * @returns The created Context object.\n */\n async create(name: string): Promise<Context> {\n const context = await this.get(name, true);\n if (!context) {\n throw new APIError(`Failed to create context ${name}`);\n }\n return context;\n }\n\n /**\n * Updates the specified context.\n * \n * @param context - The Context object to update.\n * @returns The updated Context object.\n */\n async update(context: Context): Promise<Context> {\n try {\n const request = new $_client.ModifyContextRequest({\n id: context.id,\n name: context.name,\n authorization: `Bearer ${this.agentBay.getAPIKey()}`\n });\n \n // Log API request\n log(\"API Call: ModifyContext\");\n log(`Request: Id=${context.id}, Name=${context.name}`);\n \n const response = await this.agentBay.getClient().modifyContext(request);\n \n // Log API response\n log(`Response from ModifyContext:`, response.body);\n \n // Return the updated context\n return context;\n } catch (error) {\n logError(\"Error calling ModifyContext:\", error);\n throw new APIError(`Failed to update context ${context.id}: ${error}`);\n }\n }\n\n /**\n * Deletes the specified context.\n * \n * @param context - The Context object to delete.\n */\n async delete(context: Context): Promise<void> {\n try {\n const request = new $_client.DeleteContextRequest({\n id: context.id,\n authorization: `Bearer ${this.agentBay.getAPIKey()}`\n });\n \n // Log API request\n log(\"API Call: DeleteContext\");\n log(`Request: Id=${context.id}`);\n \n const response = await this.agentBay.getClient().deleteContext(request);\n \n // Log API response\n log(`Response from DeleteContext:`, response.body);\n } catch (error) {\n logError(\"Error calling DeleteContext:\", error);\n throw new APIError(`Failed to delete context ${context.id}: ${error}`);\n }\n }\n}\n","import * as fs from 'fs';\nimport * as path from 'path';\nimport 'dotenv/config';\nimport { log } from './utils/logger';\ninterface Config {\n region_id: string;\n endpoint: string;\n timeout_ms: number;\n}\n\n/**\n * Returns the default configuration\n */\nexport function defaultConfig(): Config {\n return {\n region_id: 'cn-shanghai',\n endpoint: 'wuyingai.cn-shanghai.aliyuncs.com',\n timeout_ms: 300000\n };\n}\n\n/**\n * Loads configuration from file\n */\nexport function loadConfig(): Config {\n // First check if the config file path is specified in environment variables\n let configPath = process.env.AGENTBAY_CONFIG_PATH;\n if (!configPath) {\n try {\n // Try to find the config file by traversing up from the current directory\n let dirPath = process.cwd();\n let found = false;\n \n // Start from current directory and traverse up to find .config.json\n // This will check current dir, parent, grandparent, etc. up to filesystem root\n for (let i = 0; i < 10; i++) { // Limit search depth to prevent infinite loop\n const possibleConfigPath = path.join(dirPath, '.config.json');\n if (fs.existsSync(possibleConfigPath)) {\n configPath = possibleConfigPath;\n found = true;\n log(`Found config file at: ${possibleConfigPath}`);\n break;\n }\n \n // Move up one directory\n const parentDir = path.dirname(dirPath);\n if (parentDir === dirPath) {\n // We've reached the filesystem root\n break;\n }\n dirPath = parentDir;\n }\n \n if (!found) {\n // Config file not found, return default config\n log('Warning: Configuration file not found, using default values');\n return defaultConfig();\n }\n } catch (error) {\n log(`Warning: Failed to search for configuration file: ${error}, using default values`);\n return defaultConfig();\n }\n }\n\n try {\n // Make sure configPath is defined\n if (!configPath) {\n log('Warning: Configuration file path is undefined, using default values');\n return defaultConfig();\n }\n \n // Read the config file\n const data = fs.readFileSync(configPath, 'utf8');\n const config = JSON.parse(data) as Config;\n\n // Allow environment variables to override config file values\n if (process.env.AGENTBAY_REGION_ID) {\n config.region_id = process.env.AGENTBAY_REGION_ID;\n }\n if (process.env.AGENTBAY_ENDPOINT) {\n config.endpoint = process.env.AGENTBAY_ENDPOINT;\n }\n\n return config;\n } catch (error) {\n log(`Warning: Failed to read configuration file: ${error}, using default values`);\n return defaultConfig();\n }\n}\n","(function () {\n require('./lib/main').config(\n Object.assign(\n {},\n require('./lib/env-options'),\n require('./lib/cli-options')(process.argv)\n )\n )\n})()\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,UAAU;AACjB,SAAS,qBAAqB;AAF9B;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA,MACE,MAAQ;AAAA,MACR,SAAW;AAAA,MACX,aAAe;AAAA,MACf,MAAQ;AAAA,MACR,OAAS;AAAA,MACT,SAAW;AAAA,QACT,KAAK;AAAA,UACH,OAAS;AAAA,UACT,SAAW;AAAA,UACX,SAAW;AAAA,QACb;AAAA,QACA,YAAY;AAAA,QACZ,eAAe;AAAA,QACf,qBAAqB;AAAA,QACrB,wBAAwB;AAAA,QACxB,qBAAqB;AAAA,QACrB,wBAAwB;AAAA,QACxB,kBAAkB;AAAA,MACpB;AAAA,MACA,SAAW;AAAA,QACT,aAAa;AAAA,QACb,MAAQ;AAAA,QACR,SAAW;AAAA,QACX,MAAQ;AAAA,QACR,iBAAiB;AAAA,QACjB,YAAc;AAAA,QACd,SAAW;AAAA,MACb;AAAA,MACA,YAAc;AAAA,QACZ,MAAQ;AAAA,QACR,KAAO;AAAA,MACT;AAAA,MACA,UAAY;AAAA,MACZ,SAAW;AAAA,MACX,UAAY;AAAA,QACV;A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SAAoC;AAC/C,UAAM,aAAa,KAAK,SAAS,IAAI,QAAQ,SAAS;AACtD,QAAI,CAAC,YAAY;AACf,YAAM,IAAI,MAAM,mBAAmB,QAAQ,SAAS,YAAY;AAAA,IAClE;AAEA,QAAI;AACF,YAAM,QAAQ,OAAO;AACrB,aAAO;AAAA,IACT,SAAS,OAAO;AACd,YAAM,IAAI,SAAS,6BAA6B,KAAK,EAAE;AAAA,IACzD;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA,EAKO,cAAc,WAAyB;AAC5C,SAAK,SAAS,OAAO,SAAS;AAAA,EAChC;AAAA;AAAA,EAEA,YAAoB;AAClB,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,YAAoB;AAClB,WAAO,KAAK;AAAA,EACd;AACF;AA1MsB;AAAf,IAAM,WAAN;","names":["fs","path","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","data","path","$dara","path","$OpenApiUtil","path","$OpenApiUtil"]}
1
+ {"version":3,"sources":["../node_modules/tsup/assets/esm_shims.js","../node_modules/dotenv/package.json","../node_modules/dotenv/lib/main.js","../node_modules/dotenv/lib/env-options.js","../node_modules/dotenv/lib/cli-options.js","../src/index.ts","../src/agent-bay.ts","../node_modules/dotenv/config.js","../src/api/index.ts","../src/api/client.ts","../src/api/models/model.ts","../src/api/models/ApplyMqttTokenResponseBodyData.ts","../src/api/models/CreateMcpSessionRequestPersistenceDataList.ts","../src/api/models/CreateMcpSessionResponseBodyData.ts","../src/api/models/GetContextResponseBodyData.ts","../src/api/models/GetContextInfoResponseBodyData.ts","../src/api/models/GetLabelResponseBodyData.ts","../src/api/models/GetLinkResponseBodyData.ts","../src/api/models/GetMcpResourceResponseBodyDataDesktopInfo.ts","../src/api/models/GetMcpResourceResponseBodyData.ts","../src/api/models/ListContextsResponseBodyData.ts","../src/api/models/ListSessionResponseBodyData.ts","../src/api/models/ApplyMqttTokenRequest.ts","../src/api/models/ApplyMqttTokenResponseBody.ts","../src/api/models/ApplyMqttTokenResponse.ts","../src/api/models/CallMcpToolRequest.ts","../src/api/models/CallMcpToolResponseBody.ts","../src/api/models/CallMcpToolResponse.ts","../src/api/models/CreateMcpSessionRequest.ts","../src/api/models/CreateMcpSessionShrinkRequest.ts","../src/api/models/CreateMcpSessionResponseBody.ts","../src/api/models/CreateMcpSessionResponse.ts","../src/api/models/DeleteContextRequest.ts","../src/api/models/DeleteContextResponseBody.ts","../src/api/models/DeleteContextResponse.ts","../src/api/models/GetContextRequest.ts","../src/api/models/GetContextResponseBody.ts","../src/api/models/GetContextResponse.ts","../src/api/models/GetContextInfoRequest.ts","../src/api/models/GetContextInfoResponseBody.ts","../src/api/models/GetContextInfoResponse.ts","../src/api/models/GetLabelRequest.ts","../src/api/models/GetLabelResponseBody.ts","../src/api/models/GetLabelResponse.ts","../src/api/models/GetLinkRequest.ts","../src/api/models/GetLinkResponseBody.ts","../src/api/models/GetLinkResponse.ts","../src/api/models/GetMcpResourceRequest.ts","../src/api/models/GetMcpResourceResponseBody.ts","../src/api/models/GetMcpResourceResponse.ts","../src/api/models/ListContextsRequest.ts","../src/api/models/ListContextsResponseBody.ts","../src/api/models/ListContextsResponse.ts","../src/api/models/ListMcpToolsRequest.ts","../src/api/models/ListMcpToolsResponseBody.ts","../src/api/models/ListMcpToolsResponse.ts","../src/api/models/ListSessionRequest.ts","../src/api/models/ListSessionResponseBody.ts","../src/api/models/ListSessionResponse.ts","../src/api/models/ModifyContextRequest.ts","../src/api/models/ModifyContextResponseBody.ts","../src/api/models/ModifyContextResponse.ts","../src/api/models/ReleaseMcpSessionRequest.ts","../src/api/models/ReleaseMcpSessionResponseBody.ts","../src/api/models/ReleaseMcpSessionResponse.ts","../src/api/models/SetLabelRequest.ts","../src/api/models/SetLabelResponseBody.ts","../src/api/models/SetLabelResponse.ts","../src/api/models/SyncContextRequest.ts","../src/api/models/SyncContextResponseBody.ts","../src/api/models/SyncContextResponse.ts","../src/config.ts","../src/utils/logger.ts","../src/context.ts","../src/types/api-response.ts","../src/exceptions.ts","../src/session.ts","../src/application/application.ts","../src/command/command.ts","../src/context-manager.ts","../src/filesystem/filesystem.ts","../src/oss/index.ts","../src/oss/oss.ts","../src/ui/ui.ts","../src/window/window.ts"],"sourcesContent":["// Shim globals in esm bundle\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst getFilename = () => fileURLToPath(import.meta.url)\nconst getDirname = () => path.dirname(getFilename())\n\nexport const __dirname = /* @__PURE__ */ getDirname()\nexport const __filename = /* @__PURE__ */ getFilename()\n","{\n \"name\": \"dotenv\",\n \"version\": \"16.6.1\",\n \"description\": \"Loads environment variables from .env file\",\n \"main\": \"lib/main.js\",\n \"types\": \"lib/main.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./lib/main.d.ts\",\n \"require\": \"./lib/main.js\",\n \"default\": \"./lib/main.js\"\n },\n \"./config\": \"./config.js\",\n \"./config.js\": \"./config.js\",\n \"./lib/env-options\": \"./lib/env-options.js\",\n \"./lib/env-options.js\": \"./lib/env-options.js\",\n \"./lib/cli-options\": \"./lib/cli-options.js\",\n \"./lib/cli-options.js\": \"./lib/cli-options.js\",\n \"./package.json\": \"./package.json\"\n },\n \"scripts\": {\n \"dts-check\": \"tsc --project tests/types/tsconfig.json\",\n \"lint\": \"standard\",\n \"pretest\": \"npm run lint && npm run dts-check\",\n \"test\": \"tap run --allow-empty-coverage --disable-coverage --timeout=60000\",\n \"test:coverage\": \"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov\",\n \"prerelease\": \"npm test\",\n \"release\": \"standard-version\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git://github.com/motdotla/dotenv.git\"\n },\n \"homepage\": \"https://github.com/motdotla/dotenv#readme\",\n \"funding\": \"https://dotenvx.com\",\n \"keywords\": [\n \"dotenv\",\n \"env\",\n \".env\",\n \"environment\",\n \"variables\",\n \"config\",\n \"settings\"\n ],\n \"readmeFilename\": \"README.md\",\n \"license\": \"BSD-2-Clause\",\n \"devDependencies\": {\n \"@types/node\": \"^18.11.3\",\n \"decache\": \"^4.6.2\",\n \"sinon\": \"^14.0.1\",\n \"standard\": \"^17.0.0\",\n \"standard-version\": \"^9.5.0\",\n \"tap\": \"^19.2.0\",\n \"typescript\": \"^4.8.4\"\n },\n \"engines\": {\n \"node\": \">=12\"\n },\n \"browser\": {\n \"fs\": false\n }\n}\n","const fs = require('fs')\nconst path = require('path')\nconst os = require('os')\nconst crypto = require('crypto')\nconst packageJson = require('../package.json')\n\nconst version = packageJson.version\n\nconst LINE = /(?:^|^)\\s*(?:export\\s+)?([\\w.-]+)(?:\\s*=\\s*?|:\\s+?)(\\s*'(?:\\\\'|[^'])*'|\\s*\"(?:\\\\\"|[^\"])*\"|\\s*`(?:\\\\`|[^`])*`|[^#\\r\\n]+)?\\s*(?:#.*)?(?:$|$)/mg\n\n// Parse src into an Object\nfunction parse (src) {\n const obj = {}\n\n // Convert buffer to string\n let lines = src.toString()\n\n // Convert line breaks to same format\n lines = lines.replace(/\\r\\n?/mg, '\\n')\n\n let match\n while ((match = LINE.exec(lines)) != null) {\n const key = match[1]\n\n // Default undefined or null to empty string\n let value = (match[2] || '')\n\n // Remove whitespace\n value = value.trim()\n\n // Check if double quoted\n const maybeQuote = value[0]\n\n // Remove surrounding quotes\n value = value.replace(/^(['\"`])([\\s\\S]*)\\1$/mg, '$2')\n\n // Expand newlines if double quoted\n if (maybeQuote === '\"') {\n value = value.replace(/\\\\n/g, '\\n')\n value = value.replace(/\\\\r/g, '\\r')\n }\n\n // Add to object\n obj[key] = value\n }\n\n return obj\n}\n\nfunction _parseVault (options) {\n options = options || {}\n\n const vaultPath = _vaultPath(options)\n options.path = vaultPath // parse .env.vault\n const result = DotenvModule.configDotenv(options)\n if (!result.parsed) {\n const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`)\n err.code = 'MISSING_DATA'\n throw err\n }\n\n // handle scenario for comma separated keys - for use with key rotation\n // example: DOTENV_KEY=\"dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=prod,dotenv://:key_7890@dotenvx.com/vault/.env.vault?environment=prod\"\n const keys = _dotenvKey(options).split(',')\n const length = keys.length\n\n let decrypted\n for (let i = 0; i < length; i++) {\n try {\n // Get full key\n const key = keys[i].trim()\n\n // Get instructions for decrypt\n const attrs = _instructions(result, key)\n\n // Decrypt\n decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key)\n\n break\n } catch (error) {\n // last key\n if (i + 1 >= length) {\n throw error\n }\n // try next key\n }\n }\n\n // Parse decrypted .env string\n return DotenvModule.parse(decrypted)\n}\n\nfunction _warn (message) {\n console.log(`[dotenv@${version}][WARN] ${message}`)\n}\n\nfunction _debug (message) {\n console.log(`[dotenv@${version}][DEBUG] ${message}`)\n}\n\nfunction _log (message) {\n console.log(`[dotenv@${version}] ${message}`)\n}\n\nfunction _dotenvKey (options) {\n // prioritize developer directly setting options.DOTENV_KEY\n if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {\n return options.DOTENV_KEY\n }\n\n // secondary infra already contains a DOTENV_KEY environment variable\n if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) {\n return process.env.DOTENV_KEY\n }\n\n // fallback to empty string\n return ''\n}\n\nfunction _instructions (result, dotenvKey) {\n // Parse DOTENV_KEY. Format is a URI\n let uri\n try {\n uri = new URL(dotenvKey)\n } catch (error) {\n if (error.code === 'ERR_INVALID_URL') {\n const err = new Error('INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n throw error\n }\n\n // Get decrypt key\n const key = uri.password\n if (!key) {\n const err = new Error('INVALID_DOTENV_KEY: Missing key part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get environment\n const environment = uri.searchParams.get('environment')\n if (!environment) {\n const err = new Error('INVALID_DOTENV_KEY: Missing environment part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get ciphertext payload\n const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`\n const ciphertext = result.parsed[environmentKey] // DOTENV_VAULT_PRODUCTION\n if (!ciphertext) {\n const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`)\n err.code = 'NOT_FOUND_DOTENV_ENVIRONMENT'\n throw err\n }\n\n return { ciphertext, key }\n}\n\nfunction _vaultPath (options) {\n let possibleVaultPath = null\n\n if (options && options.path && options.path.length > 0) {\n if (Array.isArray(options.path)) {\n for (const filepath of options.path) {\n if (fs.existsSync(filepath)) {\n possibleVaultPath = filepath.endsWith('.vault') ? filepath : `${filepath}.vault`\n }\n }\n } else {\n possibleVaultPath = options.path.endsWith('.vault') ? options.path : `${options.path}.vault`\n }\n } else {\n possibleVaultPath = path.resolve(process.cwd(), '.env.vault')\n }\n\n if (fs.existsSync(possibleVaultPath)) {\n return possibleVaultPath\n }\n\n return null\n}\n\nfunction _resolveHome (envPath) {\n return envPath[0] === '~' ? path.join(os.homedir(), envPath.slice(1)) : envPath\n}\n\nfunction _configVault (options) {\n const debug = Boolean(options && options.debug)\n const quiet = options && 'quiet' in options ? options.quiet : true\n\n if (debug || !quiet) {\n _log('Loading env from encrypted .env.vault')\n }\n\n const parsed = DotenvModule._parseVault(options)\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsed, options)\n\n return { parsed }\n}\n\nfunction configDotenv (options) {\n const dotenvPath = path.resolve(process.cwd(), '.env')\n let encoding = 'utf8'\n const debug = Boolean(options && options.debug)\n const quiet = options && 'quiet' in options ? options.quiet : true\n\n if (options && options.encoding) {\n encoding = options.encoding\n } else {\n if (debug) {\n _debug('No encoding is specified. UTF-8 is used by default')\n }\n }\n\n let optionPaths = [dotenvPath] // default, look for .env\n if (options && options.path) {\n if (!Array.isArray(options.path)) {\n optionPaths = [_resolveHome(options.path)]\n } else {\n optionPaths = [] // reset default\n for (const filepath of options.path) {\n optionPaths.push(_resolveHome(filepath))\n }\n }\n }\n\n // Build the parsed data in a temporary object (because we need to return it). Once we have the final\n // parsed data, we will combine it with process.env (or options.processEnv if provided).\n let lastError\n const parsedAll = {}\n for (const path of optionPaths) {\n try {\n // Specifying an encoding returns a string instead of a buffer\n const parsed = DotenvModule.parse(fs.readFileSync(path, { encoding }))\n\n DotenvModule.populate(parsedAll, parsed, options)\n } catch (e) {\n if (debug) {\n _debug(`Failed to load ${path} ${e.message}`)\n }\n lastError = e\n }\n }\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsedAll, options)\n\n if (debug || !quiet) {\n const keysCount = Object.keys(parsedAll).length\n const shortPaths = []\n for (const filePath of optionPaths) {\n try {\n const relative = path.relative(process.cwd(), filePath)\n shortPaths.push(relative)\n } catch (e) {\n if (debug) {\n _debug(`Failed to load ${filePath} ${e.message}`)\n }\n lastError = e\n }\n }\n\n _log(`injecting env (${keysCount}) from ${shortPaths.join(',')}`)\n }\n\n if (lastError) {\n return { parsed: parsedAll, error: lastError }\n } else {\n return { parsed: parsedAll }\n }\n}\n\n// Populates process.env from .env file\nfunction config (options) {\n // fallback to original dotenv if DOTENV_KEY is not set\n if (_dotenvKey(options).length === 0) {\n return DotenvModule.configDotenv(options)\n }\n\n const vaultPath = _vaultPath(options)\n\n // dotenvKey exists but .env.vault file does not exist\n if (!vaultPath) {\n _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`)\n\n return DotenvModule.configDotenv(options)\n }\n\n return DotenvModule._configVault(options)\n}\n\nfunction decrypt (encrypted, keyStr) {\n const key = Buffer.from(keyStr.slice(-64), 'hex')\n let ciphertext = Buffer.from(encrypted, 'base64')\n\n const nonce = ciphertext.subarray(0, 12)\n const authTag = ciphertext.subarray(-16)\n ciphertext = ciphertext.subarray(12, -16)\n\n try {\n const aesgcm = crypto.createDecipheriv('aes-256-gcm', key, nonce)\n aesgcm.setAuthTag(authTag)\n return `${aesgcm.update(ciphertext)}${aesgcm.final()}`\n } catch (error) {\n const isRange = error instanceof RangeError\n const invalidKeyLength = error.message === 'Invalid key length'\n const decryptionFailed = error.message === 'Unsupported state or unable to authenticate data'\n\n if (isRange || invalidKeyLength) {\n const err = new Error('INVALID_DOTENV_KEY: It must be 64 characters long (or more)')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n } else if (decryptionFailed) {\n const err = new Error('DECRYPTION_FAILED: Please check your DOTENV_KEY')\n err.code = 'DECRYPTION_FAILED'\n throw err\n } else {\n throw error\n }\n }\n}\n\n// Populate process.env with parsed values\nfunction populate (processEnv, parsed, options = {}) {\n const debug = Boolean(options && options.debug)\n const override = Boolean(options && options.override)\n\n if (typeof parsed !== 'object') {\n const err = new Error('OBJECT_REQUIRED: Please check the processEnv argument being passed to populate')\n err.code = 'OBJECT_REQUIRED'\n throw err\n }\n\n // Set process.env\n for (const key of Object.keys(parsed)) {\n if (Object.prototype.hasOwnProperty.call(processEnv, key)) {\n if (override === true) {\n processEnv[key] = parsed[key]\n }\n\n if (debug) {\n if (override === true) {\n _debug(`\"${key}\" is already defined and WAS overwritten`)\n } else {\n _debug(`\"${key}\" is already defined and was NOT overwritten`)\n }\n }\n } else {\n processEnv[key] = parsed[key]\n }\n }\n}\n\nconst DotenvModule = {\n configDotenv,\n _configVault,\n _parseVault,\n config,\n decrypt,\n parse,\n populate\n}\n\nmodule.exports.configDotenv = DotenvModule.configDotenv\nmodule.exports._configVault = DotenvModule._configVault\nmodule.exports._parseVault = DotenvModule._parseVault\nmodule.exports.config = DotenvModule.config\nmodule.exports.decrypt = DotenvModule.decrypt\nmodule.exports.parse = DotenvModule.parse\nmodule.exports.populate = DotenvModule.populate\n\nmodule.exports = DotenvModule\n","// ../config.js accepts options via environment variables\nconst options = {}\n\nif (process.env.DOTENV_CONFIG_ENCODING != null) {\n options.encoding = process.env.DOTENV_CONFIG_ENCODING\n}\n\nif (process.env.DOTENV_CONFIG_PATH != null) {\n options.path = process.env.DOTENV_CONFIG_PATH\n}\n\nif (process.env.DOTENV_CONFIG_QUIET != null) {\n options.quiet = process.env.DOTENV_CONFIG_QUIET\n}\n\nif (process.env.DOTENV_CONFIG_DEBUG != null) {\n options.debug = process.env.DOTENV_CONFIG_DEBUG\n}\n\nif (process.env.DOTENV_CONFIG_OVERRIDE != null) {\n options.override = process.env.DOTENV_CONFIG_OVERRIDE\n}\n\nif (process.env.DOTENV_CONFIG_DOTENV_KEY != null) {\n options.DOTENV_KEY = process.env.DOTENV_CONFIG_DOTENV_KEY\n}\n\nmodule.exports = options\n","const re = /^dotenv_config_(encoding|path|quiet|debug|override|DOTENV_KEY)=(.+)$/\n\nmodule.exports = function optionMatcher (args) {\n const options = args.reduce(function (acc, cur) {\n const matches = cur.match(re)\n if (matches) {\n acc[matches[1]] = matches[2]\n }\n return acc\n }, {})\n\n if (!('quiet' in options)) {\n options.quiet = 'true'\n }\n\n return options\n}\n","// Export all public classes and interfaces\nexport { AgentBay } from \"./agent-bay\";\nexport * from \"./api\";\nexport * from \"./application\";\nexport * from \"./command\";\nexport { Context, ContextService } from \"./context\";\nexport * from \"./exceptions\";\nexport * from \"./filesystem\";\nexport * from \"./oss\";\nexport { Session } from \"./session\";\nexport { type ListSessionParams } from \"./types\";\nexport * from \"./ui\";\n// Export utility functions\nexport { log, logError } from \"./utils/logger\";\n","import { $OpenApiUtil } from \"@alicloud/openapi-core\";\nimport \"dotenv/config\";\nimport * as $_client from \"./api\";\nimport { ListSessionRequest } from \"./api/models/model\";\nimport { Client } from \"./api/client\";\n\nimport { loadConfig, Config } from \"./config\";\nimport { ContextService } from \"./context\";\nimport { ContextSync } from \"./context-sync\";\nimport { APIError, AuthenticationError } from \"./exceptions\";\nimport { Session } from \"./session\";\n\nimport {\n DeleteResult,\n extractRequestId,\n SessionResult,\n} from \"./types/api-response\";\nimport {\n ListSessionParams,\n SessionListResult,\n} from \"./types/list-session-params\";\nimport { log, logError } from \"./utils/logger\";\n\n/**\n * Parameters for creating a session.\n */\nexport interface CreateSessionParams {\n contextId?: string;\n labels?: Record<string, string>;\n imageId?: string;\n contextSync?: ContextSync[];\n}\n\n/**\n * Main class for interacting with the AgentBay cloud runtime environment.\n */\nexport class AgentBay {\n private apiKey: string;\n private client: Client;\n private regionId: string;\n private endpoint: string;\n private sessions: Map<string, Session> = new Map();\n\n /**\n * Context service for managing persistent contexts.\n */\n context: ContextService;\n\n /**\n * Initialize the AgentBay client.\n *\n * @param options - Configuration options\n * @param options.apiKey - API key for authentication. If not provided, will look for AGENTBAY_API_KEY environment variable.\n * @param options.config - Custom configuration object. If not provided, will use environment-based configuration.\n */\n constructor(\n options: {\n apiKey?: string;\n config?: Config;\n } = {}\n ) {\n this.apiKey = options.apiKey || process.env.AGENTBAY_API_KEY || \"\";\n\n if (!this.apiKey) {\n throw new AuthenticationError(\n \"API key is required. Provide it as a parameter or set the AGENTBAY_API_KEY environment variable.\"\n );\n }\n\n // Load configuration using the enhanced loadConfig function\n const configData = loadConfig(options.config);\n this.regionId = configData.region_id;\n this.endpoint = configData.endpoint;\n\n const config = new $OpenApiUtil.Config({\n regionId: this.regionId,\n endpoint: this.endpoint,\n });\n\n config.readTimeout = configData.timeout_ms;\n config.connectTimeout = configData.timeout_ms;\n\n try {\n this.client = new Client(config);\n\n // Initialize context service\n this.context = new ContextService(this);\n } catch (error) {\n logError(`Failed to constructor:`, error);\n throw new AuthenticationError(`Failed to constructor: ${error}`);\n }\n }\n\n /**\n * Create a new session in the AgentBay cloud environment.\n *\n * @param params - Optional parameters for creating the session\n * @returns SessionResult containing the created session and request ID\n */\n async create(params?: CreateSessionParams): Promise<SessionResult> {\n try {\n if (!params) {\n params = {};\n }\n\n const request = new $_client.CreateMcpSessionRequest({\n authorization: \"Bearer \" + this.apiKey,\n });\n\n // Add context_id if provided\n if (params.contextId) {\n request.contextId = params.contextId;\n }\n\n // Add labels if provided\n if (params.labels) {\n request.labels = JSON.stringify(params.labels);\n }\n\n // Add image_id if provided\n if (params.imageId) {\n request.imageId = params.imageId;\n }\n\n // Add context sync configurations if provided\n if (params.contextSync && params.contextSync.length > 0) {\n const persistenceDataList: any[] = [];\n for (const contextSync of params.contextSync) {\n const persistenceItem: any = {\n contextId: contextSync.contextId,\n path: contextSync.path,\n };\n\n // Convert policy to JSON string if provided\n if (contextSync.policy) {\n persistenceItem.policy = JSON.stringify(contextSync.policy);\n }\n\n persistenceDataList.push(persistenceItem);\n }\n request.persistenceDataList = persistenceDataList;\n }\n\n // Log API request\n log(\"API Call: CreateMcpSession\");\n let requestLog = \"Request: \";\n if (request.contextId) {\n requestLog += `ContextId=${request.contextId}, `;\n }\n if (request.imageId) {\n requestLog += `ImageId=${request.imageId}, `;\n }\n if (request.labels) {\n requestLog += `Labels=${request.labels}, `;\n }\n if (\n request.persistenceDataList &&\n request.persistenceDataList.length > 0\n ) {\n requestLog += `PersistenceDataList=${request.persistenceDataList.length} items, `;\n request.persistenceDataList.forEach((pd: any, i: number) => {\n requestLog += `Item${i}[ContextId=${pd.contextId}, Path=${pd.path}`;\n if (pd.policy) {\n requestLog += `, Policy=${pd.policy}`;\n }\n requestLog += `], `;\n });\n }\n log(requestLog);\n\n const response = await this.client.createMcpSession(request);\n log(\"response =\", response);\n\n // Extract request ID\n const requestId = extractRequestId(response) || \"\";\n\n const sessionData = response.body;\n\n if (!sessionData || typeof sessionData !== \"object\") {\n return {\n requestId,\n success: false,\n errorMessage: \"Invalid response format: expected a dictionary\",\n };\n }\n\n const data = sessionData.data;\n if (!data || typeof data !== \"object\") {\n return {\n requestId,\n success: false,\n errorMessage:\n \"Invalid response format: 'data' field is not a dictionary\",\n };\n }\n\n const sessionId = data.sessionId;\n if (!sessionId) {\n return {\n requestId,\n success: false,\n errorMessage: \"SessionId not found in response\",\n };\n }\n\n // ResourceUrl is optional in CreateMcpSession response\n const resourceUrl = data.resourceUrl;\n\n log(\"session_id =\", sessionId);\n log(\"resource_url =\", resourceUrl);\n\n const session = new Session(this, sessionId);\n if (resourceUrl) {\n session.resourceUrl = resourceUrl;\n }\n\n this.sessions.set(session.sessionId, session);\n\n // Return SessionResult with request ID\n return {\n requestId,\n success: true,\n session,\n };\n } catch (error) {\n logError(\"Error calling create_mcp_session:\", error);\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to create session: ${error}`,\n };\n }\n }\n\n /**\n * List all available sessions.\n *\n * @returns A list of session objects.\n */\n list(): Session[] {\n return Array.from(this.sessions.values());\n }\n\n /**\n * List sessions filtered by the provided labels with pagination support.\n * It returns sessions that match all the specified labels.\n *\n * **Breaking Change**: This method currently only accepts ListSessionParams parameters,\n *\n * @param params - Parameters including labels and pagination options (required)\n * @returns API response with sessions list and pagination info\n */\n async listByLabels(params?: ListSessionParams): Promise<SessionListResult> {\n if (!params) {\n params = {\n maxResults: 10,\n labels: {},\n };\n }\n\n try {\n // Convert labels to JSON\n const labelsJSON = JSON.stringify(params.labels);\n\n //Build request object with support for pagination parameters\n const listSessionRequest = new ListSessionRequest({\n authorization: `Bearer ${this.apiKey}`,\n labels: labelsJSON,\n maxResults: params.maxResults || 10,\n ...(params.nextToken && { nextToken: params.nextToken }),\n });\n\n log(\"API Call: ListSession\");\n log(\n `Request: Labels=${labelsJSON}, MaxResults=${params.maxResults || 10}${\n params.nextToken ? `, NextToken=${params.nextToken}` : \"\"\n }`\n );\n\n const response = await this.client.listSession(listSessionRequest);\n const body = response.body;\n const requestId = extractRequestId(body?.requestId) || \"\";\n\n // Check for errors in the response\n if (\n body?.data &&\n typeof body.data === \"object\" &&\n body.success &&\n body.success !== true\n ) {\n return {\n requestId,\n success: false,\n errorMessage: \"Failed to list sessions by labels\",\n data: [],\n nextToken: \"\",\n maxResults: params.maxResults || 10,\n totalCount: 0,\n };\n }\n\n const sessions: Session[] = [];\n let nextToken = \"\";\n let maxResults = params.maxResults || 10;\n let totalCount = 0;\n\n log(\"body =\", body);\n\n // Extract pagination information\n if (body && typeof body === \"object\") {\n nextToken = body.nextToken || \"\";\n maxResults = parseInt(String(body.maxResults || 0)) || maxResults;\n totalCount = parseInt(String(body.totalCount || 0));\n }\n\n // Extract session data\n const responseData = body?.data;\n\n // Handle both list and dict responses\n if (Array.isArray(responseData)) {\n // Data is a list of session objects\n for (const sessionData of responseData) {\n if (sessionData && typeof sessionData === \"object\") {\n const sessionId = (sessionData as any).sessionId; // Capital S and I to match Python\n if (sessionId) {\n // Check if we already have this session in our cache\n let session = this.sessions.get(sessionId);\n if (!session) {\n // Create a new session object\n session = new Session(this, sessionId);\n this.sessions.set(sessionId, session);\n }\n sessions.push(session);\n }\n }\n }\n }\n\n // Return SessionListResult with request ID and pagination info\n return {\n requestId,\n success: true,\n data: sessions,\n nextToken,\n maxResults,\n totalCount,\n };\n } catch (error) {\n logError(\"Error calling list_session:\", error);\n return {\n requestId: \"\",\n success: false,\n data: [],\n errorMessage: `Failed to list sessions by labels: ${error}`,\n };\n }\n }\n\n /**\n * Delete a session by session object.\n *\n * @param session - The session to delete.\n * @returns DeleteResult indicating success or failure and request ID\n */\n async delete(session: Session): Promise<DeleteResult> {\n try {\n // Delete the session and get the result\n const deleteResult = await session.delete();\n\n this.sessions.delete(session.sessionId);\n\n // Return the DeleteResult obtained from session.delete()\n return deleteResult;\n } catch (error) {\n logError(\"Error deleting session:\", error);\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to delete session ${session.sessionId}: ${error}`,\n };\n }\n }\n\n /**\n *\n * @param sessionId - The ID of the session to remove.\n */\n public removeSession(sessionId: string): void {\n this.sessions.delete(sessionId);\n }\n\n // For internal use by the Session class\n getClient(): Client {\n return this.client;\n }\n\n getAPIKey(): string {\n return this.apiKey;\n }\n}\n\n/**\n * Creates a new AgentBay client using default configuration.\n * This is a convenience function that allows creating an AgentBay instance without a config parameter.\n *\n * @param apiKey - API key for authentication\n * @returns A new AgentBay instance with default configuration\n */\nexport function newAgentBayWithDefaults(apiKey: string): AgentBay {\n return new AgentBay({ apiKey });\n}\n","(function () {\n require('./lib/main').config(\n Object.assign(\n {},\n require('./lib/env-options'),\n require('./lib/cli-options')(process.argv)\n )\n )\n})()\n","// Export the client and models\nimport { Client } from \"./client\";\nexport { Client } from \"./client\";\nexport * from \"./models/model\";\n\nexport default Client;\n","// This file is auto-generated, don't edit it\nimport * as $dara from \"@darabonba/typescript\";\nimport OpenApi from \"@alicloud/openapi-core\";\nimport { OpenApiUtil, $OpenApiUtil } from \"@alicloud/openapi-core\";\n\nimport * as $_model from \"./models/model\";\nexport * from \"./models/model\";\n\nexport class Client extends OpenApi {\n constructor(config: $OpenApiUtil.Config) {\n super(config);\n this._signatureAlgorithm = \"v2\";\n this._endpointRule = \"\";\n this.checkConfig(config);\n this._endpoint = this.getEndpoint(\n \"wuyingai\",\n this._regionId,\n this._endpointRule,\n this._network,\n this._suffix,\n this._endpointMap,\n this._endpoint\n );\n }\n\n getEndpoint(\n productId: string,\n regionId: string,\n endpointRule: string,\n network: string,\n suffix: string,\n endpointMap: { [key: string]: string },\n endpoint: string\n ): string {\n if (!$dara.isNull(endpoint)) {\n return endpoint;\n }\n\n if (!$dara.isNull(endpointMap) && !$dara.isNull(endpointMap[regionId])) {\n return endpointMap[regionId];\n }\n\n return OpenApiUtil.getEndpointRules(\n productId,\n regionId,\n endpointRule,\n network,\n suffix\n );\n }\n\n /**\n * 调用mcp工具\n *\n * @param request - CallMcpToolRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns CallMcpToolResponse\n */\n async callMcpToolWithOptions(\n request: $_model.CallMcpToolRequest,\n runtime: $dara.RuntimeOptions\n ): Promise<$_model.CallMcpToolResponse> {\n request.validate();\n const body: { [key: string]: any } = {};\n if (!$dara.isNull(request.args)) {\n body[\"Args\"] = request.args;\n }\n\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.externalUserId)) {\n body[\"ExternalUserId\"] = request.externalUserId;\n }\n\n if (!$dara.isNull(request.imageId)) {\n body[\"ImageId\"] = request.imageId;\n }\n\n if (!$dara.isNull(request.name)) {\n body[\"Name\"] = request.name;\n }\n\n if (!$dara.isNull(request.server)) {\n body[\"Server\"] = request.server;\n }\n\n if (!$dara.isNull(request.sessionId)) {\n body[\"SessionId\"] = request.sessionId;\n }\n\n if (!$dara.isNull(request.tool)) {\n body[\"Tool\"] = request.tool;\n }\n\n const req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n const params = new $OpenApiUtil.Params({\n action: \"CallMcpTool\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.CallMcpToolResponse>(\n await this.callApi(params, req, runtime),\n new $_model.CallMcpToolResponse({})\n );\n }\n\n /**\n * 调用mcp工具\n *\n * @param request - CallMcpToolRequest\n * @returns CallMcpToolResponse\n */\n async callMcpTool(\n request: $_model.CallMcpToolRequest\n ): Promise<$_model.CallMcpToolResponse> {\n const runtime = new $dara.RuntimeOptions({});\n return await this.callMcpToolWithOptions(request, runtime);\n }\n\n /**\n * 创建 mcp session\n *\n * @param tmpReq - CreateMcpSessionRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns CreateMcpSessionResponse\n */\n async createMcpSessionWithOptions(\n tmpReq: $_model.CreateMcpSessionRequest,\n runtime: $dara.RuntimeOptions\n ): Promise<$_model.CreateMcpSessionResponse> {\n tmpReq.validate();\n const request = new $_model.CreateMcpSessionShrinkRequest({});\n OpenApiUtil.convert(tmpReq, request);\n if (!$dara.isNull(tmpReq.persistenceDataList)) {\n request.persistenceDataListShrink =\n OpenApiUtil.arrayToStringWithSpecifiedStyle(\n tmpReq.persistenceDataList,\n \"PersistenceDataList\",\n \"json\"\n );\n }\n\n const body: { [key: string]: any } = {};\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.contextId)) {\n body[\"ContextId\"] = request.contextId;\n }\n\n if (!$dara.isNull(request.externalUserId)) {\n body[\"ExternalUserId\"] = request.externalUserId;\n }\n\n if (!$dara.isNull(request.imageId)) {\n body[\"ImageId\"] = request.imageId;\n }\n\n if (!$dara.isNull(request.labels)) {\n body[\"Labels\"] = request.labels;\n }\n\n if (!$dara.isNull(request.persistenceDataListShrink)) {\n body[\"PersistenceDataList\"] = request.persistenceDataListShrink;\n }\n\n if (!$dara.isNull(request.sessionId)) {\n body[\"SessionId\"] = request.sessionId;\n }\n\n const req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n const params = new $OpenApiUtil.Params({\n action: \"CreateMcpSession\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.CreateMcpSessionResponse>(\n await this.callApi(params, req, runtime),\n new $_model.CreateMcpSessionResponse({})\n );\n }\n\n /**\n * 创建 mcp session\n *\n * @param request - CreateMcpSessionRequest\n * @returns CreateMcpSessionResponse\n */\n async createMcpSession(\n request: $_model.CreateMcpSessionRequest\n ): Promise<$_model.CreateMcpSessionResponse> {\n const runtime = new $dara.RuntimeOptions({});\n return await this.createMcpSessionWithOptions(request, runtime);\n }\n\n /**\n * 删除持久化上下文\n *\n * @param request - DeleteContextRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns DeleteContextResponse\n */\n async deleteContextWithOptions(\n request: $_model.DeleteContextRequest,\n runtime: $dara.RuntimeOptions\n ): Promise<$_model.DeleteContextResponse> {\n request.validate();\n const body: { [key: string]: any } = {};\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.id)) {\n body[\"Id\"] = request.id;\n }\n\n const req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n const params = new $OpenApiUtil.Params({\n action: \"DeleteContext\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.DeleteContextResponse>(\n await this.callApi(params, req, runtime),\n new $_model.DeleteContextResponse({})\n );\n }\n\n /**\n * 删除持久化上下文\n *\n * @param request - DeleteContextRequest\n * @returns DeleteContextResponse\n */\n async deleteContext(\n request: $_model.DeleteContextRequest\n ): Promise<$_model.DeleteContextResponse> {\n const runtime = new $dara.RuntimeOptions({});\n return await this.deleteContextWithOptions(request, runtime);\n }\n\n /**\n * 获取上下文\n *\n * @param request - GetContextRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns GetContextResponse\n */\n async getContextWithOptions(\n request: $_model.GetContextRequest,\n runtime: $dara.RuntimeOptions\n ): Promise<$_model.GetContextResponse> {\n request.validate();\n const body: { [key: string]: any } = {};\n if (!$dara.isNull(request.allowCreate)) {\n body[\"AllowCreate\"] = request.allowCreate;\n }\n\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.name)) {\n body[\"Name\"] = request.name;\n }\n\n const req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n const params = new $OpenApiUtil.Params({\n action: \"GetContext\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.GetContextResponse>(\n await this.callApi(params, req, runtime),\n new $_model.GetContextResponse({})\n );\n }\n\n /**\n * 获取上下文\n *\n * @param request - GetContextRequest\n * @returns GetContextResponse\n */\n async getContext(\n request: $_model.GetContextRequest\n ): Promise<$_model.GetContextResponse> {\n const runtime = new $dara.RuntimeOptions({});\n return await this.getContextWithOptions(request, runtime);\n }\n\n /**\n * 获取上下文信息\n *\n * @param request - GetContextInfoRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns GetContextInfoResponse\n */\n async getContextInfoWithOptions(\n request: $_model.GetContextInfoRequest,\n runtime: $dara.RuntimeOptions\n ): Promise<$_model.GetContextInfoResponse> {\n request.validate();\n const body: { [key: string]: any } = {};\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.contextId)) {\n body[\"ContextId\"] = request.contextId;\n }\n\n if (!$dara.isNull(request.path)) {\n body[\"Path\"] = request.path;\n }\n\n if (!$dara.isNull(request.sessionId)) {\n body[\"SessionId\"] = request.sessionId;\n }\n\n if (!$dara.isNull(request.taskType)) {\n body[\"TaskType\"] = request.taskType;\n }\n\n const req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n const params = new $OpenApiUtil.Params({\n action: \"GetContextInfo\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.GetContextInfoResponse>(\n await this.callApi(params, req, runtime),\n new $_model.GetContextInfoResponse({})\n );\n }\n\n /**\n * 获取上下文信息\n *\n * @param request - GetContextInfoRequest\n * @returns GetContextInfoResponse\n */\n async getContextInfo(\n request: $_model.GetContextInfoRequest\n ): Promise<$_model.GetContextInfoResponse> {\n const runtime = new $dara.RuntimeOptions({});\n return await this.getContextInfoWithOptions(request, runtime);\n }\n\n /**\n * 获取标签\n *\n * @param request - GetLabelRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns GetLabelResponse\n */\n async getLabelWithOptions(\n request: $_model.GetLabelRequest,\n runtime: $dara.RuntimeOptions\n ): Promise<$_model.GetLabelResponse> {\n request.validate();\n const body: { [key: string]: any } = {};\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.maxResults)) {\n body[\"MaxResults\"] = request.maxResults;\n }\n\n if (!$dara.isNull(request.nextToken)) {\n body[\"NextToken\"] = request.nextToken;\n }\n\n if (!$dara.isNull(request.sessionId)) {\n body[\"SessionId\"] = request.sessionId;\n }\n\n const req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n const params = new $OpenApiUtil.Params({\n action: \"GetLabel\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.GetLabelResponse>(\n await this.callApi(params, req, runtime),\n new $_model.GetLabelResponse({})\n );\n }\n\n /**\n * 获取标签\n *\n * @param request - GetLabelRequest\n * @returns GetLabelResponse\n */\n async getLabel(\n request: $_model.GetLabelRequest\n ): Promise<$_model.GetLabelResponse> {\n const runtime = new $dara.RuntimeOptions({});\n return await this.getLabelWithOptions(request, runtime);\n }\n\n /**\n * 获取特定端口的转发链接\n *\n * @param request - GetLinkRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns GetLinkResponse\n */\n async getLinkWithOptions(\n request: $_model.GetLinkRequest,\n runtime: $dara.RuntimeOptions\n ): Promise<$_model.GetLinkResponse> {\n request.validate();\n const body: { [key: string]: any } = {};\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.port)) {\n body[\"Port\"] = request.port;\n }\n\n if (!$dara.isNull(request.protocolType)) {\n body[\"ProtocolType\"] = request.protocolType;\n }\n\n if (!$dara.isNull(request.sessionId)) {\n body[\"SessionId\"] = request.sessionId;\n }\n\n const req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n const params = new $OpenApiUtil.Params({\n action: \"GetLink\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.GetLinkResponse>(\n await this.callApi(params, req, runtime),\n new $_model.GetLinkResponse({})\n );\n }\n\n /**\n * 获取特定端口的转发链接\n *\n * @param request - GetLinkRequest\n * @returns GetLinkResponse\n */\n async getLink(\n request: $_model.GetLinkRequest\n ): Promise<$_model.GetLinkResponse> {\n const runtime = new $dara.RuntimeOptions({});\n return await this.getLinkWithOptions(request, runtime);\n }\n\n /**\n * 获取mcp资源信息\n *\n * @param request - GetMcpResourceRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns GetMcpResourceResponse\n */\n async getMcpResourceWithOptions(\n request: $_model.GetMcpResourceRequest,\n runtime: $dara.RuntimeOptions\n ): Promise<$_model.GetMcpResourceResponse> {\n request.validate();\n const body: { [key: string]: any } = {};\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.sessionId)) {\n body[\"SessionId\"] = request.sessionId;\n }\n\n const req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n const params = new $OpenApiUtil.Params({\n action: \"GetMcpResource\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.GetMcpResourceResponse>(\n await this.callApi(params, req, runtime),\n new $_model.GetMcpResourceResponse({})\n );\n }\n\n /**\n * 获取mcp资源信息\n *\n * @param request - GetMcpResourceRequest\n * @returns GetMcpResourceResponse\n */\n async getMcpResource(\n request: $_model.GetMcpResourceRequest\n ): Promise<$_model.GetMcpResourceResponse> {\n const runtime = new $dara.RuntimeOptions({});\n return await this.getMcpResourceWithOptions(request, runtime);\n }\n\n /**\n * 获取上下文列表\n *\n * @param request - ListContextsRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns ListContextsResponse\n */\n async listContextsWithOptions(\n request: $_model.ListContextsRequest,\n runtime: $dara.RuntimeOptions\n ): Promise<$_model.ListContextsResponse> {\n request.validate();\n const body: { [key: string]: any } = {};\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.maxResults)) {\n body[\"MaxResults\"] = request.maxResults;\n }\n\n if (!$dara.isNull(request.nextToken)) {\n body[\"NextToken\"] = request.nextToken;\n }\n\n const req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n const params = new $OpenApiUtil.Params({\n action: \"ListContexts\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.ListContextsResponse>(\n await this.callApi(params, req, runtime),\n new $_model.ListContextsResponse({})\n );\n }\n\n /**\n * 获取上下文列表\n *\n * @param request - ListContextsRequest\n * @returns ListContextsResponse\n */\n async listContexts(\n request: $_model.ListContextsRequest\n ): Promise<$_model.ListContextsResponse> {\n const runtime = new $dara.RuntimeOptions({});\n return await this.listContextsWithOptions(request, runtime);\n }\n\n /**\n * ListMcpTools\n *\n * @param request - ListMcpToolsRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns ListMcpToolsResponse\n */\n async listMcpToolsWithOptions(\n request: $_model.ListMcpToolsRequest,\n runtime: $dara.RuntimeOptions\n ): Promise<$_model.ListMcpToolsResponse> {\n request.validate();\n const body: { [key: string]: any } = {};\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.imageId)) {\n body[\"ImageId\"] = request.imageId;\n }\n\n const req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n const params = new $OpenApiUtil.Params({\n action: \"ListMcpTools\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.ListMcpToolsResponse>(\n await this.callApi(params, req, runtime),\n new $_model.ListMcpToolsResponse({})\n );\n }\n\n /**\n * ListMcpTools\n *\n * @param request - ListMcpToolsRequest\n * @returns ListMcpToolsResponse\n */\n async listMcpTools(\n request: $_model.ListMcpToolsRequest\n ): Promise<$_model.ListMcpToolsResponse> {\n const runtime = new $dara.RuntimeOptions({});\n return await this.listMcpToolsWithOptions(request, runtime);\n }\n\n /**\n * 根据Lable查询Session列表\n *\n * @param request - ListSessionRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns ListSessionResponse\n */\n async listSessionWithOptions(\n request: $_model.ListSessionRequest,\n runtime: $dara.RuntimeOptions\n ): Promise<$_model.ListSessionResponse> {\n request.validate();\n const body: { [key: string]: any } = {};\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.labels)) {\n body[\"Labels\"] = request.labels;\n }\n\n if (!$dara.isNull(request.maxResults)) {\n body[\"MaxResults\"] = request.maxResults;\n }\n\n if (!$dara.isNull(request.nextToken)) {\n body[\"NextToken\"] = request.nextToken;\n }\n\n const req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n const params = new $OpenApiUtil.Params({\n action: \"ListSession\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.ListSessionResponse>(\n await this.callApi(params, req, runtime),\n new $_model.ListSessionResponse({})\n );\n }\n\n /**\n * 根据Lable查询Session列表\n *\n * @param request - ListSessionRequest\n * @returns ListSessionResponse\n */\n async listSession(\n request: $_model.ListSessionRequest\n ): Promise<$_model.ListSessionResponse> {\n const runtime = new $dara.RuntimeOptions({});\n return await this.listSessionWithOptions(request, runtime);\n }\n\n /**\n * 修改上下文\n *\n * @param request - ModifyContextRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns ModifyContextResponse\n */\n async modifyContextWithOptions(\n request: $_model.ModifyContextRequest,\n runtime: $dara.RuntimeOptions\n ): Promise<$_model.ModifyContextResponse> {\n request.validate();\n const body: { [key: string]: any } = {};\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.id)) {\n body[\"Id\"] = request.id;\n }\n\n if (!$dara.isNull(request.name)) {\n body[\"Name\"] = request.name;\n }\n\n const req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n const params = new $OpenApiUtil.Params({\n action: \"ModifyContext\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.ModifyContextResponse>(\n await this.callApi(params, req, runtime),\n new $_model.ModifyContextResponse({})\n );\n }\n\n /**\n * 修改上下文\n *\n * @param request - ModifyContextRequest\n * @returns ModifyContextResponse\n */\n async modifyContext(\n request: $_model.ModifyContextRequest\n ): Promise<$_model.ModifyContextResponse> {\n const runtime = new $dara.RuntimeOptions({});\n return await this.modifyContextWithOptions(request, runtime);\n }\n\n /**\n * 释放 mcp session\n *\n * @param request - ReleaseMcpSessionRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns ReleaseMcpSessionResponse\n */\n async releaseMcpSessionWithOptions(\n request: $_model.ReleaseMcpSessionRequest,\n runtime: $dara.RuntimeOptions\n ): Promise<$_model.ReleaseMcpSessionResponse> {\n request.validate();\n const body: { [key: string]: any } = {};\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.sessionId)) {\n body[\"SessionId\"] = request.sessionId;\n }\n\n const req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n const params = new $OpenApiUtil.Params({\n action: \"ReleaseMcpSession\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.ReleaseMcpSessionResponse>(\n await this.callApi(params, req, runtime),\n new $_model.ReleaseMcpSessionResponse({})\n );\n }\n\n /**\n * 释放 mcp session\n *\n * @param request - ReleaseMcpSessionRequest\n * @returns ReleaseMcpSessionResponse\n */\n async releaseMcpSession(\n request: $_model.ReleaseMcpSessionRequest\n ): Promise<$_model.ReleaseMcpSessionResponse> {\n const runtime = new $dara.RuntimeOptions({});\n return await this.releaseMcpSessionWithOptions(request, runtime);\n }\n\n /**\n * 设置标签\n *\n * @param request - SetLabelRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns SetLabelResponse\n */\n async setLabelWithOptions(\n request: $_model.SetLabelRequest,\n runtime: $dara.RuntimeOptions\n ): Promise<$_model.SetLabelResponse> {\n request.validate();\n const body: { [key: string]: any } = {};\n if (!$dara.isNull(request.authorization)) {\n body[\"Authorization\"] = request.authorization;\n }\n\n if (!$dara.isNull(request.labels)) {\n body[\"Labels\"] = request.labels;\n }\n\n if (!$dara.isNull(request.sessionId)) {\n body[\"SessionId\"] = request.sessionId;\n }\n\n const req = new $OpenApiUtil.OpenApiRequest({\n body: OpenApiUtil.parseToMap(body),\n });\n const params = new $OpenApiUtil.Params({\n action: \"SetLabel\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.SetLabelResponse>(\n await this.callApi(params, req, runtime),\n new $_model.SetLabelResponse({})\n );\n }\n\n /**\n * 设置标签\n *\n * @param request - SetLabelRequest\n * @returns SetLabelResponse\n */\n async setLabel(\n request: $_model.SetLabelRequest\n ): Promise<$_model.SetLabelResponse> {\n const runtime = new $dara.RuntimeOptions({});\n return await this.setLabelWithOptions(request, runtime);\n }\n\n /**\n * 同步上下文\n *\n * @param request - SyncContextRequest\n * @param runtime - runtime options for this request RuntimeOptions\n * @returns SyncContextResponse\n */\n async syncContextWithOptions(\n request: $_model.SyncContextRequest,\n runtime: $dara.RuntimeOptions\n ): Promise<$_model.SyncContextResponse> {\n request.validate();\n const query: { [key: string]: any } = {};\n if (!$dara.isNull(request.authorization)) {\n query[\"Authorization\"] = request.authorization;\n }\n\n const body: { [key: string]: any } = {};\n if (!$dara.isNull(request.contextId)) {\n body[\"ContextId\"] = request.contextId;\n }\n\n if (!$dara.isNull(request.mode)) {\n body[\"Mode\"] = request.mode;\n }\n\n if (!$dara.isNull(request.path)) {\n body[\"Path\"] = request.path;\n }\n\n if (!$dara.isNull(request.sessionId)) {\n body[\"SessionId\"] = request.sessionId;\n }\n\n const req = new $OpenApiUtil.OpenApiRequest({\n query: OpenApiUtil.query(query),\n body: OpenApiUtil.parseToMap(body),\n });\n const params = new $OpenApiUtil.Params({\n action: \"SyncContext\",\n version: \"2025-05-06\",\n protocol: \"HTTPS\",\n pathname: \"/\",\n method: \"POST\",\n authType: \"Anonymous\",\n style: \"RPC\",\n reqBodyType: \"formData\",\n bodyType: \"json\",\n });\n return $dara.cast<$_model.SyncContextResponse>(\n await this.callApi(params, req, runtime),\n new $_model.SyncContextResponse({})\n );\n }\n\n /**\n * 同步上下文\n *\n * @param request - SyncContextRequest\n * @returns SyncContextResponse\n */\n async syncContext(\n request: $_model.SyncContextRequest\n ): Promise<$_model.SyncContextResponse> {\n const runtime = new $dara.RuntimeOptions({});\n return await this.syncContextWithOptions(request, runtime);\n }\n}\n","export { ApplyMqttTokenResponseBodyData } from './ApplyMqttTokenResponseBodyData';\nexport { CreateMcpSessionRequestPersistenceDataList } from './CreateMcpSessionRequestPersistenceDataList';\nexport { CreateMcpSessionResponseBodyData } from './CreateMcpSessionResponseBodyData';\nexport { GetContextResponseBodyData } from './GetContextResponseBodyData';\nexport { GetContextInfoResponseBodyData } from './GetContextInfoResponseBodyData';\nexport { GetLabelResponseBodyData } from './GetLabelResponseBodyData';\nexport { GetLinkResponseBodyData } from './GetLinkResponseBodyData';\nexport { GetMcpResourceResponseBodyDataDesktopInfo } from './GetMcpResourceResponseBodyDataDesktopInfo';\nexport { GetMcpResourceResponseBodyData } from './GetMcpResourceResponseBodyData';\nexport { ListContextsResponseBodyData } from './ListContextsResponseBodyData';\nexport { ListSessionResponseBodyData } from './ListSessionResponseBodyData';\nexport { ApplyMqttTokenRequest } from './ApplyMqttTokenRequest';\nexport { ApplyMqttTokenResponseBody } from './ApplyMqttTokenResponseBody';\nexport { ApplyMqttTokenResponse } from './ApplyMqttTokenResponse';\nexport { CallMcpToolRequest } from './CallMcpToolRequest';\nexport { CallMcpToolResponseBody } from './CallMcpToolResponseBody';\nexport { CallMcpToolResponse } from './CallMcpToolResponse';\nexport { CreateMcpSessionRequest } from './CreateMcpSessionRequest';\nexport { CreateMcpSessionShrinkRequest } from './CreateMcpSessionShrinkRequest';\nexport { CreateMcpSessionResponseBody } from './CreateMcpSessionResponseBody';\nexport { CreateMcpSessionResponse } from './CreateMcpSessionResponse';\nexport { DeleteContextRequest } from './DeleteContextRequest';\nexport { DeleteContextResponseBody } from './DeleteContextResponseBody';\nexport { DeleteContextResponse } from './DeleteContextResponse';\nexport { GetContextRequest } from './GetContextRequest';\nexport { GetContextResponseBody } from './GetContextResponseBody';\nexport { GetContextResponse } from './GetContextResponse';\nexport { GetContextInfoRequest } from './GetContextInfoRequest';\nexport { GetContextInfoResponseBody } from './GetContextInfoResponseBody';\nexport { GetContextInfoResponse } from './GetContextInfoResponse';\nexport { GetLabelRequest } from './GetLabelRequest';\nexport { GetLabelResponseBody } from './GetLabelResponseBody';\nexport { GetLabelResponse } from './GetLabelResponse';\nexport { GetLinkRequest } from './GetLinkRequest';\nexport { GetLinkResponseBody } from './GetLinkResponseBody';\nexport { GetLinkResponse } from './GetLinkResponse';\nexport { GetMcpResourceRequest } from './GetMcpResourceRequest';\nexport { GetMcpResourceResponseBody } from './GetMcpResourceResponseBody';\nexport { GetMcpResourceResponse } from './GetMcpResourceResponse';\nexport { ListContextsRequest } from './ListContextsRequest';\nexport { ListContextsResponseBody } from './ListContextsResponseBody';\nexport { ListContextsResponse } from './ListContextsResponse';\nexport { ListMcpToolsRequest } from './ListMcpToolsRequest';\nexport { ListMcpToolsResponseBody } from './ListMcpToolsResponseBody';\nexport { ListMcpToolsResponse } from './ListMcpToolsResponse';\nexport { ListSessionRequest } from './ListSessionRequest';\nexport { ListSessionResponseBody } from './ListSessionResponseBody';\nexport { ListSessionResponse } from './ListSessionResponse';\nexport { ModifyContextRequest } from './ModifyContextRequest';\nexport { ModifyContextResponseBody } from './ModifyContextResponseBody';\nexport { ModifyContextResponse } from './ModifyContextResponse';\nexport { ReleaseMcpSessionRequest } from './ReleaseMcpSessionRequest';\nexport { ReleaseMcpSessionResponseBody } from './ReleaseMcpSessionResponseBody';\nexport { ReleaseMcpSessionResponse } from './ReleaseMcpSessionResponse';\nexport { SetLabelRequest } from './SetLabelRequest';\nexport { SetLabelResponseBody } from './SetLabelResponseBody';\nexport { SetLabelResponse } from './SetLabelResponse';\nexport { SyncContextRequest } from './SyncContextRequest';\nexport { SyncContextResponseBody } from './SyncContextResponseBody';\nexport { SyncContextResponse } from './SyncContextResponse';\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\n/**\n */\nexport class ApplyMqttTokenResponseBodyData extends $dara.Model {\n accessKeyId?: string;\n clientId?: string;\n expiration?: string;\n instanceId?: string;\n regionId?: string;\n securityToken?: string;\n static names(): { [key: string]: string } {\n return {\n accessKeyId: 'AccessKeyId',\n clientId: 'ClientId',\n expiration: 'Expiration',\n instanceId: 'InstanceId',\n regionId: 'RegionId',\n securityToken: 'SecurityToken',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n accessKeyId: 'string',\n clientId: 'string',\n expiration: 'string',\n instanceId: 'string',\n regionId: 'string',\n securityToken: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class CreateMcpSessionRequestPersistenceDataList extends $dara.Model {\n contextId?: string;\n path?: string;\n policy?: string;\n static names(): { [key: string]: string } {\n return {\n contextId: 'ContextId',\n path: 'Path',\n policy: 'Policy',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n contextId: 'string',\n path: 'string',\n policy: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class CreateMcpSessionResponseBodyData extends $dara.Model {\n appInstanceId?: string;\n errMsg?: string;\n resourceId?: string;\n resourceUrl?: string;\n sessionId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n appInstanceId: 'AppInstanceId',\n errMsg: 'ErrMsg',\n resourceId: 'ResourceId',\n resourceUrl: 'ResourceUrl',\n sessionId: 'SessionId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n appInstanceId: 'string',\n errMsg: 'string',\n resourceId: 'string',\n resourceUrl: 'string',\n sessionId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class GetContextResponseBodyData extends $dara.Model {\n createTime?: string;\n id?: string;\n lastUsedTime?: string;\n name?: string;\n osType?: string;\n state?: string;\n static names(): { [key: string]: string } {\n return {\n createTime: 'CreateTime',\n id: 'Id',\n lastUsedTime: 'LastUsedTime',\n name: 'Name',\n osType: 'OsType',\n state: 'State',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n createTime: 'string',\n id: 'string',\n lastUsedTime: 'string',\n name: 'string',\n osType: 'string',\n state: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class GetContextInfoResponseBodyData extends $dara.Model {\n contextStatus?: string;\n static names(): { [key: string]: string } {\n return {\n contextStatus: 'ContextStatus',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n contextStatus: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class GetLabelResponseBodyData extends $dara.Model {\n labels?: string;\n static names(): { [key: string]: string } {\n return {\n labels: 'Labels',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n labels: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class GetLinkResponseBodyData extends $dara.Model {\n url?: string;\n static names(): { [key: string]: string } {\n return {\n url: 'Url',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n url: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class GetMcpResourceResponseBodyDataDesktopInfo extends $dara.Model {\n appId?: string;\n authCode?: string;\n connectionProperties?: string;\n resourceId?: string;\n resourceType?: string;\n ticket?: string;\n static names(): { [key: string]: string } {\n return {\n appId: 'AppId',\n authCode: 'AuthCode',\n connectionProperties: 'ConnectionProperties',\n resourceId: 'ResourceId',\n resourceType: 'ResourceType',\n ticket: 'Ticket',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n appId: 'string',\n authCode: 'string',\n connectionProperties: 'string',\n resourceId: 'string',\n resourceType: 'string',\n ticket: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { GetMcpResourceResponseBodyDataDesktopInfo } from \"./GetMcpResourceResponseBodyDataDesktopInfo\";\n\n\nexport class GetMcpResourceResponseBodyData extends $dara.Model {\n desktopInfo?: GetMcpResourceResponseBodyDataDesktopInfo;\n resourceUrl?: string;\n sessionId?: string;\n static names(): { [key: string]: string } {\n return {\n desktopInfo: 'DesktopInfo',\n resourceUrl: 'ResourceUrl',\n sessionId: 'SessionId',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n desktopInfo: GetMcpResourceResponseBodyDataDesktopInfo,\n resourceUrl: 'string',\n sessionId: 'string',\n };\n }\n\n validate() {\n if(this.desktopInfo && typeof (this.desktopInfo as any).validate === 'function') {\n (this.desktopInfo as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class ListContextsResponseBodyData extends $dara.Model {\n createTime?: string;\n id?: string;\n lastUsedTime?: string;\n name?: string;\n osType?: string;\n state?: string;\n static names(): { [key: string]: string } {\n return {\n createTime: 'CreateTime',\n id: 'Id',\n lastUsedTime: 'LastUsedTime',\n name: 'Name',\n osType: 'OsType',\n state: 'State',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n createTime: 'string',\n id: 'string',\n lastUsedTime: 'string',\n name: 'string',\n osType: 'string',\n state: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class ListSessionResponseBodyData extends $dara.Model {\n sessionId?: string;\n static names(): { [key: string]: string } {\n return {\n sessionId: 'SessionId',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n sessionId: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class ApplyMqttTokenRequest extends $dara.Model {\n desktopId?: string;\n sessionToken?: string;\n static names(): { [key: string]: string } {\n return {\n desktopId: 'DesktopId',\n sessionToken: 'SessionToken',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n desktopId: 'string',\n sessionToken: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { ApplyMqttTokenResponseBodyData } from \"./ApplyMqttTokenResponseBodyData\";\n\n\nexport class ApplyMqttTokenResponseBody extends $dara.Model {\n code?: string;\n data?: ApplyMqttTokenResponseBodyData;\n httpStatusCode?: number;\n message?: string;\n requestId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n data: 'Data',\n httpStatusCode: 'HttpStatusCode',\n message: 'Message',\n requestId: 'RequestId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n data: ApplyMqttTokenResponseBodyData,\n httpStatusCode: 'number',\n message: 'string',\n requestId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n if(this.data && typeof (this.data as any).validate === 'function') {\n (this.data as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { ApplyMqttTokenResponseBody } from \"./ApplyMqttTokenResponseBody\";\n\n\nexport class ApplyMqttTokenResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: ApplyMqttTokenResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: ApplyMqttTokenResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class CallMcpToolRequest extends $dara.Model {\n args?: string;\n authorization?: string;\n externalUserId?: string;\n imageId?: string;\n name?: string;\n server?: string;\n sessionId?: string;\n tool?: string;\n static names(): { [key: string]: string } {\n return {\n args: 'Args',\n authorization: 'Authorization',\n externalUserId: 'ExternalUserId',\n imageId: 'ImageId',\n name: 'Name',\n server: 'Server',\n sessionId: 'SessionId',\n tool: 'Tool',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n args: 'string',\n authorization: 'string',\n externalUserId: 'string',\n imageId: 'string',\n name: 'string',\n server: 'string',\n sessionId: 'string',\n tool: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class CallMcpToolResponseBody extends $dara.Model {\n code?: string;\n data?: any;\n httpStatusCode?: number;\n message?: string;\n requestId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n data: 'Data',\n httpStatusCode: 'HttpStatusCode',\n message: 'Message',\n requestId: 'RequestId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n data: 'any',\n httpStatusCode: 'number',\n message: 'string',\n requestId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { CallMcpToolResponseBody } from \"./CallMcpToolResponseBody\";\n\n\nexport class CallMcpToolResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: CallMcpToolResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: CallMcpToolResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { CreateMcpSessionRequestPersistenceDataList } from \"./CreateMcpSessionRequestPersistenceDataList\";\n\n\nexport class CreateMcpSessionRequest extends $dara.Model {\n authorization?: string;\n contextId?: string;\n externalUserId?: string;\n imageId?: string;\n labels?: string;\n persistenceDataList?: CreateMcpSessionRequestPersistenceDataList[];\n sessionId?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n contextId: 'ContextId',\n externalUserId: 'ExternalUserId',\n imageId: 'ImageId',\n labels: 'Labels',\n persistenceDataList: 'PersistenceDataList',\n sessionId: 'SessionId',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n contextId: 'string',\n externalUserId: 'string',\n imageId: 'string',\n labels: 'string',\n persistenceDataList: { 'type': 'array', 'itemType': CreateMcpSessionRequestPersistenceDataList },\n sessionId: 'string',\n };\n }\n\n validate() {\n if(Array.isArray(this.persistenceDataList)) {\n $dara.Model.validateArray(this.persistenceDataList);\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class CreateMcpSessionShrinkRequest extends $dara.Model {\n authorization?: string;\n contextId?: string;\n externalUserId?: string;\n imageId?: string;\n labels?: string;\n persistenceDataListShrink?: string;\n sessionId?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n contextId: 'ContextId',\n externalUserId: 'ExternalUserId',\n imageId: 'ImageId',\n labels: 'Labels',\n persistenceDataListShrink: 'PersistenceDataList',\n sessionId: 'SessionId',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n contextId: 'string',\n externalUserId: 'string',\n imageId: 'string',\n labels: 'string',\n persistenceDataListShrink: 'string',\n sessionId: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { CreateMcpSessionResponseBodyData } from \"./CreateMcpSessionResponseBodyData\";\n\n\nexport class CreateMcpSessionResponseBody extends $dara.Model {\n code?: string;\n data?: CreateMcpSessionResponseBodyData;\n httpStatusCode?: number;\n message?: string;\n requestId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n data: 'Data',\n httpStatusCode: 'HttpStatusCode',\n message: 'Message',\n requestId: 'RequestId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n data: CreateMcpSessionResponseBodyData,\n httpStatusCode: 'number',\n message: 'string',\n requestId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n if(this.data && typeof (this.data as any).validate === 'function') {\n (this.data as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { CreateMcpSessionResponseBody } from \"./CreateMcpSessionResponseBody\";\n\n\nexport class CreateMcpSessionResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: CreateMcpSessionResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: CreateMcpSessionResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class DeleteContextRequest extends $dara.Model {\n authorization?: string;\n id?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n id: 'Id',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n id: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class DeleteContextResponseBody extends $dara.Model {\n code?: string;\n httpStatusCode?: number;\n message?: string;\n requestId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n httpStatusCode: 'HttpStatusCode',\n message: 'Message',\n requestId: 'RequestId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n httpStatusCode: 'number',\n message: 'string',\n requestId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { DeleteContextResponseBody } from \"./DeleteContextResponseBody\";\n\n\nexport class DeleteContextResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: DeleteContextResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: DeleteContextResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class GetContextRequest extends $dara.Model {\n allowCreate?: boolean;\n authorization?: string;\n name?: string;\n static names(): { [key: string]: string } {\n return {\n allowCreate: 'AllowCreate',\n authorization: 'Authorization',\n name: 'Name',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n allowCreate: 'boolean',\n authorization: 'string',\n name: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { GetContextResponseBodyData } from \"./GetContextResponseBodyData\";\n\n\nexport class GetContextResponseBody extends $dara.Model {\n code?: string;\n data?: GetContextResponseBodyData;\n httpStatusCode?: number;\n message?: string;\n requestId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n data: 'Data',\n httpStatusCode: 'HttpStatusCode',\n message: 'Message',\n requestId: 'RequestId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n data: GetContextResponseBodyData,\n httpStatusCode: 'number',\n message: 'string',\n requestId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n if(this.data && typeof (this.data as any).validate === 'function') {\n (this.data as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { GetContextResponseBody } from \"./GetContextResponseBody\";\n\n\nexport class GetContextResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: GetContextResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: GetContextResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class GetContextInfoRequest extends $dara.Model {\n authorization?: string;\n contextId?: string;\n path?: string;\n sessionId?: string;\n taskType?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n contextId: 'ContextId',\n path: 'Path',\n sessionId: 'SessionId',\n taskType: 'TaskType',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n contextId: 'string',\n path: 'string',\n sessionId: 'string',\n taskType: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { GetContextInfoResponseBodyData } from \"./GetContextInfoResponseBodyData\";\n\n\nexport class GetContextInfoResponseBody extends $dara.Model {\n code?: string;\n data?: GetContextInfoResponseBodyData;\n httpStatusCode?: number;\n message?: string;\n requestId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n data: 'Data',\n httpStatusCode: 'HttpStatusCode',\n message: 'Message',\n requestId: 'RequestId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n data: GetContextInfoResponseBodyData,\n httpStatusCode: 'number',\n message: 'string',\n requestId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n if(this.data && typeof (this.data as any).validate === 'function') {\n (this.data as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { GetContextInfoResponseBody } from \"./GetContextInfoResponseBody\";\n\n\nexport class GetContextInfoResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: GetContextInfoResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: GetContextInfoResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class GetLabelRequest extends $dara.Model {\n authorization?: string;\n maxResults?: number;\n nextToken?: string;\n sessionId?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n maxResults: 'MaxResults',\n nextToken: 'NextToken',\n sessionId: 'SessionId',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n maxResults: 'number',\n nextToken: 'string',\n sessionId: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { GetLabelResponseBodyData } from \"./GetLabelResponseBodyData\";\n\n\nexport class GetLabelResponseBody extends $dara.Model {\n code?: string;\n data?: GetLabelResponseBodyData;\n httpStatusCode?: number;\n maxResults?: number;\n message?: string;\n nextToken?: string;\n requestId?: string;\n success?: boolean;\n totalCount?: number;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n data: 'Data',\n httpStatusCode: 'HttpStatusCode',\n maxResults: 'MaxResults',\n message: 'Message',\n nextToken: 'NextToken',\n requestId: 'RequestId',\n success: 'Success',\n totalCount: 'TotalCount',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n data: GetLabelResponseBodyData,\n httpStatusCode: 'number',\n maxResults: 'number',\n message: 'string',\n nextToken: 'string',\n requestId: 'string',\n success: 'boolean',\n totalCount: 'number',\n };\n }\n\n validate() {\n if(this.data && typeof (this.data as any).validate === 'function') {\n (this.data as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { GetLabelResponseBody } from \"./GetLabelResponseBody\";\n\n\nexport class GetLabelResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: GetLabelResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: GetLabelResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class GetLinkRequest extends $dara.Model {\n authorization?: string;\n port?: number;\n protocolType?: string;\n sessionId?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n port: 'Port',\n protocolType: 'ProtocolType',\n sessionId: 'SessionId',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n port: 'number',\n protocolType: 'string',\n sessionId: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { GetLinkResponseBodyData } from \"./GetLinkResponseBodyData\";\n\n\nexport class GetLinkResponseBody extends $dara.Model {\n code?: string;\n data?: GetLinkResponseBodyData;\n httpStatusCode?: number;\n message?: string;\n requestId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n data: 'Data',\n httpStatusCode: 'HttpStatusCode',\n message: 'Message',\n requestId: 'RequestId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n data: GetLinkResponseBodyData,\n httpStatusCode: 'number',\n message: 'string',\n requestId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n if(this.data && typeof (this.data as any).validate === 'function') {\n (this.data as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { GetLinkResponseBody } from \"./GetLinkResponseBody\";\n\n\nexport class GetLinkResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: GetLinkResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: GetLinkResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class GetMcpResourceRequest extends $dara.Model {\n authorization?: string;\n sessionId?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n sessionId: 'SessionId',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n sessionId: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { GetMcpResourceResponseBodyData } from \"./GetMcpResourceResponseBodyData\";\n\n\nexport class GetMcpResourceResponseBody extends $dara.Model {\n code?: string;\n data?: GetMcpResourceResponseBodyData;\n httpStatusCode?: number;\n message?: string;\n requestId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n data: 'Data',\n httpStatusCode: 'HttpStatusCode',\n message: 'Message',\n requestId: 'RequestId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n data: GetMcpResourceResponseBodyData,\n httpStatusCode: 'number',\n message: 'string',\n requestId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n if(this.data && typeof (this.data as any).validate === 'function') {\n (this.data as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { GetMcpResourceResponseBody } from \"./GetMcpResourceResponseBody\";\n\n\nexport class GetMcpResourceResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: GetMcpResourceResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: GetMcpResourceResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class ListContextsRequest extends $dara.Model {\n authorization?: string;\n maxResults?: number;\n nextToken?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n maxResults: 'MaxResults',\n nextToken: 'NextToken',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n maxResults: 'number',\n nextToken: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { ListContextsResponseBodyData } from \"./ListContextsResponseBodyData\";\n\n\nexport class ListContextsResponseBody extends $dara.Model {\n code?: string;\n data?: ListContextsResponseBodyData[];\n httpStatusCode?: number;\n maxResults?: number;\n message?: string;\n nextToken?: string;\n requestId?: string;\n success?: boolean;\n totalCount?: number;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n data: 'Data',\n httpStatusCode: 'HttpStatusCode',\n maxResults: 'MaxResults',\n message: 'Message',\n nextToken: 'NextToken',\n requestId: 'RequestId',\n success: 'Success',\n totalCount: 'TotalCount',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n data: { 'type': 'array', 'itemType': ListContextsResponseBodyData },\n httpStatusCode: 'number',\n maxResults: 'number',\n message: 'string',\n nextToken: 'string',\n requestId: 'string',\n success: 'boolean',\n totalCount: 'number',\n };\n }\n\n validate() {\n if(Array.isArray(this.data)) {\n $dara.Model.validateArray(this.data);\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { ListContextsResponseBody } from \"./ListContextsResponseBody\";\n\n\nexport class ListContextsResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: ListContextsResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: ListContextsResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class ListMcpToolsRequest extends $dara.Model {\n authorization?: string;\n imageId?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n imageId: 'ImageId',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n imageId: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class ListMcpToolsResponseBody extends $dara.Model {\n code?: string;\n data?: string;\n httpStatusCode?: number;\n message?: string;\n requestId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n data: 'Data',\n httpStatusCode: 'HttpStatusCode',\n message: 'Message',\n requestId: 'RequestId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n data: 'string',\n httpStatusCode: 'number',\n message: 'string',\n requestId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { ListMcpToolsResponseBody } from \"./ListMcpToolsResponseBody\";\n\n\nexport class ListMcpToolsResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: ListMcpToolsResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: ListMcpToolsResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class ListSessionRequest extends $dara.Model {\n authorization?: string;\n labels?: string;\n maxResults?: number;\n nextToken?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n labels: 'Labels',\n maxResults: 'MaxResults',\n nextToken: 'NextToken',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n labels: 'string',\n maxResults: 'number',\n nextToken: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { ListSessionResponseBodyData } from \"./ListSessionResponseBodyData\";\n\n\nexport class ListSessionResponseBody extends $dara.Model {\n code?: string;\n data?: ListSessionResponseBodyData[];\n httpStatusCode?: number;\n maxResults?: number;\n message?: string;\n nextToken?: string;\n requestId?: string;\n success?: boolean;\n totalCount?: number;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n data: 'Data',\n httpStatusCode: 'HttpStatusCode',\n maxResults: 'MaxResults',\n message: 'Message',\n nextToken: 'NextToken',\n requestId: 'RequestId',\n success: 'Success',\n totalCount: 'TotalCount',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n data: { 'type': 'array', 'itemType': ListSessionResponseBodyData },\n httpStatusCode: 'number',\n maxResults: 'number',\n message: 'string',\n nextToken: 'string',\n requestId: 'string',\n success: 'boolean',\n totalCount: 'number',\n };\n }\n\n validate() {\n if(Array.isArray(this.data)) {\n $dara.Model.validateArray(this.data);\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { ListSessionResponseBody } from \"./ListSessionResponseBody\";\n\n\nexport class ListSessionResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: ListSessionResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: ListSessionResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class ModifyContextRequest extends $dara.Model {\n authorization?: string;\n id?: string;\n name?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n id: 'Id',\n name: 'Name',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n id: 'string',\n name: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class ModifyContextResponseBody extends $dara.Model {\n code?: string;\n httpStatusCode?: number;\n message?: string;\n requestId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n httpStatusCode: 'HttpStatusCode',\n message: 'Message',\n requestId: 'RequestId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n httpStatusCode: 'number',\n message: 'string',\n requestId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { ModifyContextResponseBody } from \"./ModifyContextResponseBody\";\n\n\nexport class ModifyContextResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: ModifyContextResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: ModifyContextResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class ReleaseMcpSessionRequest extends $dara.Model {\n authorization?: string;\n sessionId?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n sessionId: 'SessionId',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n sessionId: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class ReleaseMcpSessionResponseBody extends $dara.Model {\n code?: string;\n httpStatusCode?: number;\n message?: string;\n requestId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n httpStatusCode: 'HttpStatusCode',\n message: 'Message',\n requestId: 'RequestId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n httpStatusCode: 'number',\n message: 'string',\n requestId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { ReleaseMcpSessionResponseBody } from \"./ReleaseMcpSessionResponseBody\";\n\n\nexport class ReleaseMcpSessionResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: ReleaseMcpSessionResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: ReleaseMcpSessionResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class SetLabelRequest extends $dara.Model {\n authorization?: string;\n labels?: string;\n sessionId?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n labels: 'Labels',\n sessionId: 'SessionId',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n labels: 'string',\n sessionId: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class SetLabelResponseBody extends $dara.Model {\n code?: string;\n httpStatusCode?: number;\n message?: string;\n requestId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n httpStatusCode: 'HttpStatusCode',\n message: 'Message',\n requestId: 'RequestId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n httpStatusCode: 'number',\n message: 'string',\n requestId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { SetLabelResponseBody } from \"./SetLabelResponseBody\";\n\n\nexport class SetLabelResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: SetLabelResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: SetLabelResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class SyncContextRequest extends $dara.Model {\n authorization?: string;\n contextId?: string;\n mode?: string;\n path?: string;\n sessionId?: string;\n static names(): { [key: string]: string } {\n return {\n authorization: 'Authorization',\n contextId: 'ContextId',\n mode: 'Mode',\n path: 'Path',\n sessionId: 'SessionId',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n authorization: 'string',\n contextId: 'string',\n mode: 'string',\n path: 'string',\n sessionId: 'string',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\n\n\nexport class SyncContextResponseBody extends $dara.Model {\n code?: string;\n httpStatusCode?: number;\n message?: string;\n requestId?: string;\n success?: boolean;\n static names(): { [key: string]: string } {\n return {\n code: 'Code',\n httpStatusCode: 'HttpStatusCode',\n message: 'Message',\n requestId: 'RequestId',\n success: 'Success',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n code: 'string',\n httpStatusCode: 'number',\n message: 'string',\n requestId: 'string',\n success: 'boolean',\n };\n }\n\n validate() {\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","// This file is auto-generated, don't edit it\nimport * as $dara from '@darabonba/typescript';\nimport { SyncContextResponseBody } from \"./SyncContextResponseBody\";\n\n\nexport class SyncContextResponse extends $dara.Model {\n headers?: { [key: string]: string };\n statusCode?: number;\n body?: SyncContextResponseBody;\n static names(): { [key: string]: string } {\n return {\n headers: 'headers',\n statusCode: 'statusCode',\n body: 'body',\n };\n }\n\n static types(): { [key: string]: any } {\n return {\n headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },\n statusCode: 'number',\n body: SyncContextResponseBody,\n };\n }\n\n validate() {\n if(this.headers) {\n $dara.Model.validateMap(this.headers);\n }\n if(this.body && typeof (this.body as any).validate === 'function') {\n (this.body as any).validate();\n }\n super.validate();\n }\n\n constructor(map?: { [key: string]: any }) {\n super(map);\n }\n}\n\n","import * as fs from \"fs\";\nimport * as path from \"path\";\nimport * as dotenv from \"dotenv\";\nimport { log } from \"./utils/logger\";\ninterface Config {\n region_id: string;\n endpoint: string;\n timeout_ms: number;\n}\n\n/**\n * Returns the default configuration\n */\nexport function defaultConfig(): Config {\n return {\n region_id: \"cn-shanghai\",\n endpoint: \"wuyingai.cn-shanghai.aliyuncs.com\",\n timeout_ms: 60000,\n };\n}\n\n/**\n * The SDK uses the following precedence order for configuration (highest to lowest):\n * 1. Explicitly passed configuration in code.\n * 2. Environment variables.\n * 3. .env file.\n * 4. Default configuration.\n */\nexport function loadConfig(customConfig?: Config): Config {\n // If custom config is provided, use it directly\n if (customConfig) {\n return customConfig;\n }\n\n // Create base config from default values\n const config = defaultConfig();\n\n // Override with environment variables if they exist\n if (process.env.AGENTBAY_REGION_ID) {\n config.region_id = process.env.AGENTBAY_REGION_ID;\n }\n\n if (process.env.AGENTBAY_ENDPOINT) {\n config.endpoint = process.env.AGENTBAY_ENDPOINT;\n }\n\n if (process.env.AGENTBAY_TIMEOUT_MS) {\n const timeout = parseInt(process.env.AGENTBAY_TIMEOUT_MS, 10);\n if (!isNaN(timeout) && timeout > 0) {\n config.timeout_ms = timeout;\n }\n }\n\n // Try to load .env file\n const envPath = path.resolve(process.cwd(), \".env\");\n\n if (fs.existsSync(envPath)) {\n const envConfig = dotenv.parse(fs.readFileSync(envPath));\n for (const k in envConfig) {\n // only load env variables that are not already set in process.env\n if (!process.env.hasOwnProperty(k)) {\n // update config object to reflect values from .env file\n if (k === \"AGENTBAY_REGION_ID\") config.region_id = envConfig[k];\n else if (k === \"AGENTBAY_ENDPOINT\") config.endpoint = envConfig[k];\n else if (k === \"AGENTBAY_TIMEOUT_MS\") {\n const timeout = parseInt(envConfig[k], 10);\n if (!isNaN(timeout) && timeout > 0) {\n config.timeout_ms = timeout;\n }\n }\n }\n }\n log(`Loaded .env file at: ${envPath}`);\n }\n return config;\n}\n\nexport { Config };\n","/**\n * Utility functions for logging in a clean format\n */\n\n/**\n * Log a message without the log prefix and file location\n * @param message The message to log\n * @param args Optional arguments to log\n */\nexport function log(message: string, ...args: any[]): void {\n // Use process.stdout.write instead of log to avoid the prefix and newline\n process.stdout.write(message + \"\\n\");\n\n // If there are additional arguments, print them on new lines with proper formatting\n if (args.length > 0) {\n for (const arg of args) {\n if (typeof arg === \"object\") {\n // For objects, format them as JSON with indentation\n process.stdout.write(JSON.stringify(arg, null, 2) + \"\\n\");\n } else {\n // For other types, just convert to string\n process.stdout.write(String(arg) + \"\\n\");\n }\n }\n }\n}\n\n/**\n * Log an error message\n * @param message The error message to log\n * @param error Optional error object\n */\nexport function logError(message: string, error?: any): void {\n process.stderr.write(`ERROR: ${message}\\n`);\n if (error) {\n if (error instanceof Error) {\n process.stderr.write(`${error.message}\\n`);\n } else if (typeof error === \"object\") {\n process.stderr.write(JSON.stringify(error, null, 2) + \"\\n\");\n } else {\n process.stderr.write(String(error) + \"\\n\");\n }\n }\n}\n","import { AgentBay } from \"./agent-bay\";\nimport { APIError } from \"./exceptions\";\nimport * as $_client from \"./api\";\nimport { log, logError } from \"./utils/logger\";\nimport {\n extractRequestId,\n ContextResult,\n ContextListResult,\n OperationResult,\n} from \"./types/api-response\";\n\n/**\n * Represents a persistent storage context in the AgentBay cloud environment.\n */\nexport class Context {\n /**\n * The unique identifier of the context.\n */\n id: string;\n\n /**\n * The name of the context.\n */\n name: string;\n\n /**\n * The current state of the context (e.g., \"available\", \"in-use\").\n */\n state: string;\n\n /**\n * Date and time when the Context was created.\n */\n createdAt?: string;\n\n /**\n * Date and time when the Context was last used.\n */\n lastUsedAt?: string;\n\n /**\n * The operating system type this context is bound to.\n */\n osType?: string;\n\n /**\n * Initialize a Context object.\n *\n * @param id - The unique identifier of the context.\n * @param name - The name of the context.\n * @param state - The current state of the context.\n * @param createdAt - Date and time when the Context was created.\n * @param lastUsedAt - Date and time when the Context was last used.\n * @param osType - The operating system type this context is bound to.\n */\n constructor(\n id: string,\n name: string,\n state = \"available\",\n createdAt?: string,\n lastUsedAt?: string,\n osType?: string\n ) {\n this.id = id;\n this.name = name;\n this.state = state;\n this.createdAt = createdAt;\n this.lastUsedAt = lastUsedAt;\n this.osType = osType;\n }\n}\n\n/**\n * Provides methods to manage persistent contexts in the AgentBay cloud environment.\n */\nexport class ContextService {\n private agentBay: AgentBay;\n\n /**\n * Initialize the ContextService.\n *\n * @param agentBay - The AgentBay instance.\n */\n constructor(agentBay: AgentBay) {\n this.agentBay = agentBay;\n }\n\n /**\n * Lists all available contexts.\n * Corresponds to Python's list() method\n *\n * @returns ContextListResult with contexts list and requestId\n */\n async list(): Promise<ContextListResult> {\n try {\n const request = new $_client.ListContextsRequest({\n authorization: `Bearer ${this.agentBay.getAPIKey()}`,\n });\n\n // Log API request\n log(\"API Call: ListContexts\");\n log(\"Request: (no parameters)\");\n\n const response = await this.agentBay.getClient().listContexts(request);\n\n // Log API response\n log(`Response from ListContexts:`, response.body);\n\n const contexts: Context[] = [];\n if (response.body?.data) {\n for (const contextData of response.body.data) {\n contexts.push(\n new Context(\n contextData.id || \"\",\n contextData.name || \"\",\n contextData.state || \"available\",\n contextData.createTime,\n contextData.lastUsedTime,\n contextData.osType\n )\n );\n }\n }\n\n return {\n requestId: extractRequestId(response) || \"\",\n success: true,\n contexts,\n };\n } catch (error) {\n logError(\"Error calling ListContexts:\", error);\n return {\n requestId: \"\",\n success: false,\n contexts: [],\n };\n }\n }\n\n /**\n * Gets a context by name. Optionally creates it if it doesn't exist.\n * Corresponds to Python's get() method\n *\n * @param name - The name of the context to get.\n * @param create - Whether to create the context if it doesn't exist.\n * @returns ContextResult with context data and requestId\n */\n async get(name: string, create = false): Promise<ContextResult> {\n try {\n const request = new $_client.GetContextRequest({\n name: name,\n allowCreate: create ? \"true\" : \"false\",\n authorization: `Bearer ${this.agentBay.getAPIKey()}`,\n });\n\n // Log API request\n log(\"API Call: GetContext\");\n log(`Request: Name=${name}, AllowCreate=${create}`);\n\n const response = await this.agentBay.getClient().getContext(request);\n\n // Log API response\n log(`Response from GetContext:`, response.body);\n\n const contextId = response.body?.data?.id || \"\";\n if (!contextId) {\n return {\n requestId: extractRequestId(response) || \"\",\n success: false,\n contextId: \"\",\n context: undefined,\n };\n }\n\n // Get the full context details\n const contextsResponse = await this.list();\n for (const context of contextsResponse.contexts) {\n if (context.id === contextId) {\n return {\n requestId: extractRequestId(response) || \"\",\n success: true,\n contextId,\n context,\n };\n }\n }\n\n // If we couldn't find the context in the list, create a basic one\n const context = new Context(contextId, name);\n return {\n requestId: extractRequestId(response) || \"\",\n success: true,\n contextId,\n context,\n };\n } catch (error) {\n logError(\"Error calling GetContext:\", error);\n return {\n requestId: \"\",\n success: false,\n contextId: \"\",\n context: undefined,\n };\n }\n }\n\n /**\n * Creates a new context with the given name.\n * Corresponds to Python's create() method\n *\n * @param name - The name for the new context.\n * @returns ContextResult with created context data and requestId\n */\n async create(name: string): Promise<ContextResult> {\n return await this.get(name, true);\n }\n\n /**\n * Updates the specified context.\n * Corresponds to Python's update() method\n *\n * @param context - The Context object to update.\n * @returns OperationResult with updated context data and requestId\n */\n async update(context: Context): Promise<OperationResult> {\n try {\n const request = new $_client.ModifyContextRequest({\n id: context.id,\n name: context.name,\n authorization: `Bearer ${this.agentBay.getAPIKey()}`,\n });\n\n // Log API request\n log(\"API Call: ModifyContext\");\n log(`Request: Id=${context.id}, Name=${context.name}`);\n\n const response = await this.agentBay.getClient().modifyContext(request);\n\n // Log API response\n log(`Response from ModifyContext:`, response.body);\n\n // Check for success (matching Python logic)\n const success = response.body?.success !== false;\n const errorMessage = success\n ? \"\"\n : `Update failed: ${response.body?.code}`;\n\n return {\n requestId: extractRequestId(response) || \"\",\n success,\n data: success,\n errorMessage,\n };\n } catch (error) {\n logError(\"Error calling ModifyContext:\", error);\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to update context ${context.id}: ${error}`,\n };\n }\n }\n\n /**\n * Deletes the specified context.\n * Corresponds to Python's delete() method\n *\n * @param context - The Context object to delete.\n * @returns OperationResult with requestId\n */\n async delete(context: Context): Promise<OperationResult> {\n try {\n const request = new $_client.DeleteContextRequest({\n id: context.id,\n authorization: `Bearer ${this.agentBay.getAPIKey()}`,\n });\n\n // Log API request\n log(\"API Call: DeleteContext\");\n log(`Request: Id=${context.id}`);\n\n const response = await this.agentBay.getClient().deleteContext(request);\n\n // Log API response\n log(`Response from DeleteContext:`, response.body);\n\n // Check for success (matching Python logic)\n const success = response.body?.success !== false;\n const errorMessage = success\n ? \"\"\n : `Delete failed: ${response.body?.code}`;\n\n return {\n requestId: extractRequestId(response) || \"\",\n success,\n data: success,\n errorMessage,\n };\n } catch (error) {\n logError(\"Error calling DeleteContext:\", error);\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to delete context ${context.id}: ${error}`,\n };\n }\n }\n}\n","/**\n * Base interface for API responses\n */\nexport interface ApiResponse {\n /** Optional request identifier for tracking API calls */\n requestId?: string;\n /** Optional error message if the operation failed */\n errorMessage?: string;\n /** Optional status code if the operation failed */\n success?: boolean;\n}\n\n/**\n * Generic interface for API responses that include data payload\n * @template T The type of the data being returned\n */\nexport interface ApiResponseWithData<T> extends ApiResponse {\n /** The actual data payload returned by the API */\n session?: T;\n data?: T;\n}\n\n/**\n * Interface for delete operation responses\n */\nexport interface DeleteResult extends ApiResponse {\n /** Whether the delete operation was successful */\n success: boolean;\n /** Optional error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Interface for session creation operation responses\n * Corresponds to Python's SessionResult type\n */\nexport interface SessionResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the session creation was successful */\n success: boolean;\n /** The created session object (only present if successful) */\n session?: any; // Will be Session type, avoiding circular import\n /** Error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Interface for operation results\n * Corresponds to Python's OperationResult type\n */\nexport interface OperationResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the operation was successful */\n success: boolean;\n /** Optional data payload */\n data?: any;\n /** Optional error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Interface for session info operation responses\n * Corresponds to Go's InfoResult type\n */\nexport interface InfoResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Session information object */\n info?: any; // Will be SessionInfo type, avoiding circular import\n}\n\n/**\n * Interface for label operation responses\n * Corresponds to Go's LabelResult type\n */\nexport interface LabelResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Labels string (JSON format) */\n labels: string;\n}\n\n/**\n * Interface for link operation responses\n * Corresponds to Go's LinkResult type\n */\nexport interface LinkResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Link string */\n link: string;\n}\n\n/**\n * Interface for process list operation responses\n * Corresponds to Python's ProcessListResult type\n */\nexport interface ProcessListResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the operation was successful */\n success: boolean;\n /** The list of process objects */\n data: any[]; // Will be Process[] type, avoiding circular import\n /** Optional error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Interface for installed app list operation responses\n * Corresponds to Python's InstalledAppListResult type\n */\nexport interface InstalledAppListResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the operation was successful */\n success: boolean;\n /** The list of installed app objects */\n data: any[]; // Will be InstalledApp[] type, avoiding circular import\n /** Optional error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Interface for application operation responses\n * Corresponds to Python's AppOperationResult type\n */\nexport interface AppOperationResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the operation was successful */\n success: boolean;\n /** Optional error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Interface for application info operation responses\n * Corresponds to Python's AppInfoResult type\n */\nexport interface AppInfoResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the operation was successful */\n success: boolean;\n /** Application information */\n appInfo: Record<string, any>;\n /** Optional error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Interface for application list operation responses\n * Corresponds to Python's AppListResult type\n */\nexport interface AppListResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the operation was successful */\n success: boolean;\n /** List of applications */\n apps: Record<string, any>[];\n /** Optional error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Interface for application installation responses\n * Corresponds to Python's AppInstallResult type\n */\nexport interface AppInstallResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the installation was successful */\n success: boolean;\n /** Result description or error message */\n message: string;\n}\n\n/**\n * Interface for command execution operation responses\n * Corresponds to Python's CommandResult type\n */\nexport interface CommandResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the command execution was successful */\n success: boolean;\n /** The command output */\n output: string;\n /** Optional error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Interface for code execution operation responses\n * Corresponds to Python's CodeExecutionResult type\n */\nexport interface CodeExecutionResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the code execution was successful */\n success: boolean;\n /** The execution result */\n result: string;\n /** Optional error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Interface for boolean operation responses\n * Corresponds to Python's BoolResult type\n */\nexport interface BoolResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the operation was successful */\n success: boolean;\n /** Boolean data result */\n data?: boolean;\n /** Optional error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Interface for file info operation responses\n * Corresponds to Python's FileInfoResult type\n */\nexport interface FileInfoResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the operation was successful */\n success: boolean;\n /** File information object */\n fileInfo?: Record<string, any>;\n /** Optional error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Interface for directory list operation responses\n * Corresponds to Python's DirectoryListResult type\n */\nexport interface DirectoryListResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the operation was successful */\n success: boolean;\n /** Directory entries */\n entries: Record<string, any>[];\n /** Optional error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Interface for file content operation responses\n * Corresponds to Python's FileContentResult type\n */\nexport interface FileContentResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the operation was successful */\n success: boolean;\n /** File content */\n content: string;\n /** Optional error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Interface for multiple file content operation responses\n * Corresponds to Python's MultipleFileContentResult type\n */\nexport interface MultipleFileContentResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the operation was successful */\n success: boolean;\n /** Multiple file contents */\n contents: Record<string, string>;\n /** Optional error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Interface for file search operation responses\n * Corresponds to Python's FileSearchResult type\n */\nexport interface FileSearchResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the operation was successful */\n success: boolean;\n /** Matching file paths */\n matches: string[];\n /** Optional error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Interface for OSS client creation operation responses\n * Corresponds to Python's OSSClientResult type\n */\nexport interface OSSClientResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the operation was successful */\n success: boolean;\n /** OSS client configuration */\n clientConfig: Record<string, any>;\n /** Optional error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Interface for OSS upload operation responses\n * Corresponds to Python's OSSUploadResult type\n */\nexport interface OSSUploadResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the operation was successful */\n success: boolean;\n /** Result of the upload operation */\n content: string;\n /** Optional error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Interface for OSS download operation responses\n * Corresponds to Python's OSSDownloadResult type\n */\nexport interface OSSDownloadResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the operation was successful */\n success: boolean;\n /** Result of the download operation */\n content: string;\n /** Optional error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Interface for UI element list operation responses\n * Corresponds to Python's UIElementListResult type\n */\nexport interface UIElementListResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the operation was successful */\n success: boolean;\n /** UI elements */\n elements: Record<string, any>[];\n /** Optional error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Interface for window list operation responses\n * Corresponds to Python's WindowListResult type\n */\nexport interface WindowListResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the operation was successful */\n success: boolean;\n /** List of windows */\n windows: any[]; // Will be Window[] type, avoiding circular import\n /** Optional error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Interface for window info operation responses\n * Corresponds to Python's WindowInfoResult type\n */\nexport interface WindowInfoResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the operation was successful */\n success: boolean;\n /** Window object */\n window?: any; // Will be Window type, avoiding circular import\n /** Optional error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Interface for context operation responses\n * Corresponds to Python's ContextResult type\n */\nexport interface ContextResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the operation was successful */\n success: boolean;\n /** The context ID */\n contextId: string;\n /** The context object (only present if successful) */\n context?: any; // Will be Context type, avoiding circular import\n /** Optional error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Interface for context list operation responses\n * Corresponds to Python's ContextListResult type\n */\nexport interface ContextListResult extends ApiResponse {\n /** Request identifier for tracking API calls */\n requestId: string;\n /** Whether the operation was successful */\n success: boolean;\n /** List of contexts */\n contexts: any[]; // Will be Context[] type, avoiding circular import\n /** Optional error message if the operation failed */\n errorMessage?: string;\n}\n\n/**\n * Helper function to extract request ID from API responses\n */\nexport function extractRequestId(response: any): string | undefined {\n if (!response) return undefined;\n\n // If response is a string (like body?.requestId), return it directly\n if (typeof response === \"string\" && response.length > 0) {\n return response;\n }\n\n // Check for requestId in response.body first\n if (response.body && response.body.requestId) {\n return response.body.requestId;\n }\n // Check for requestId directly on response\n if (response.requestId) {\n return response.requestId;\n }\n\n return undefined;\n}\n","/**\n * Base exception for all AgentBay SDK errors.\n */\nexport class AgentBayError extends Error {\n extra: Record<string, any>;\n\n constructor(message?: string, extra: Record<string, any> = {}) {\n const errorMessage = message || \"AgentBayError\";\n super(errorMessage);\n this.name = \"AgentBayError\";\n this.extra = extra;\n Object.setPrototypeOf(this, AgentBayError.prototype);\n }\n}\n\n/**\n * Raised when there is an authentication error.\n */\nexport class AuthenticationError extends AgentBayError {\n constructor(\n message = \"Authentication failed\",\n extra: Record<string, any> = {}\n ) {\n super(message, extra);\n this.name = \"AuthenticationError\";\n Object.setPrototypeOf(this, AuthenticationError.prototype);\n }\n}\n\n/**\n * Raised when there is an error with the API.\n */\nexport class APIError extends AgentBayError {\n statusCode?: number;\n\n constructor(\n message = \"API error\",\n statusCode?: number,\n extra: Record<string, any> = {}\n ) {\n super(message, extra);\n this.name = \"APIError\";\n this.statusCode = statusCode;\n Object.setPrototypeOf(this, APIError.prototype);\n }\n}\n\n/**\n * Raised for errors related to file operations.\n */\nexport class FileError extends AgentBayError {\n constructor(\n message = \"File operation error\",\n extra: Record<string, any> = {}\n ) {\n super(message, extra);\n this.name = \"FileError\";\n Object.setPrototypeOf(this, FileError.prototype);\n }\n}\n\n/**\n * Raised for errors related to command execution.\n */\nexport class CommandError extends AgentBayError {\n constructor(\n message = \"Command execution error\",\n extra: Record<string, any> = {}\n ) {\n super(message, extra);\n this.name = \"CommandError\";\n Object.setPrototypeOf(this, CommandError.prototype);\n }\n}\n\n/**\n * Raised for errors related to session operations.\n */\nexport class SessionError extends AgentBayError {\n constructor(message = \"Session error\", extra: Record<string, any> = {}) {\n super(message, extra);\n this.name = \"SessionError\";\n Object.setPrototypeOf(this, SessionError.prototype);\n }\n}\n\n/**\n * Raised for errors related to OSS operations.\n */\nexport class OssError extends AgentBayError {\n constructor(\n message = \"OSS operation error\",\n extra: Record<string, any> = {}\n ) {\n super(message, extra);\n this.name = \"OssError\";\n Object.setPrototypeOf(this, OssError.prototype);\n }\n}\n\n/**\n * Raised for errors related to application operations.\n */\nexport class ApplicationError extends AgentBayError {\n constructor(\n message = \"Application operation error\",\n extra: Record<string, any> = {}\n ) {\n super(message, extra);\n this.name = \"ApplicationError\";\n Object.setPrototypeOf(this, ApplicationError.prototype);\n }\n}\n\n/**\n * Raised for errors related to UI operations.\n */\nexport class UIError extends AgentBayError {\n constructor(message = \"UI operation error\", extra: Record<string, any> = {}) {\n super(message, extra);\n this.name = \"UIError\";\n Object.setPrototypeOf(this, UIError.prototype);\n }\n}\n","import { AgentBay } from \"./agent-bay\";\nimport { Client } from \"./api/client\";\nimport {\n GetLabelRequest,\n GetLinkRequest,\n GetMcpResourceRequest,\n ReleaseMcpSessionRequest,\n SetLabelRequest,\n} from \"./api/models/model\";\nimport { Application } from \"./application\";\nimport { Command } from \"./command\";\nimport { ContextManager, newContextManager } from \"./context-manager\";\nimport { APIError } from \"./exceptions\";\nimport { FileSystem } from \"./filesystem\";\nimport { Oss } from \"./oss\";\nimport {\n DeleteResult,\n extractRequestId,\n OperationResult,\n} from \"./types/api-response\";\nimport { UI } from \"./ui\";\nimport { log, logError } from \"./utils/logger\";\nimport { WindowManager } from \"./window\";\n\n/**\n * Contains information about a session.\n */\nexport interface SessionInfo {\n sessionId: string;\n resourceUrl: string;\n appId?: string;\n authCode?: string;\n connectionProperties?: string;\n resourceId?: string;\n resourceType?: string;\n ticket?: string;\n}\n\n/**\n * SessionInfo class to match Python version structure\n */\nexport class SessionInfoClass {\n sessionId: string;\n resourceUrl: string;\n appId: string;\n authCode: string;\n connectionProperties: string;\n resourceId: string;\n resourceType: string;\n ticket: string;\n\n constructor(\n sessionId = \"\",\n resourceUrl = \"\",\n appId = \"\",\n authCode = \"\",\n connectionProperties = \"\",\n resourceId = \"\",\n resourceType = \"\",\n ticket = \"\"\n ) {\n this.sessionId = sessionId;\n this.resourceUrl = resourceUrl;\n this.appId = appId;\n this.authCode = authCode;\n this.connectionProperties = connectionProperties;\n this.resourceId = resourceId;\n this.resourceType = resourceType;\n this.ticket = ticket;\n }\n}\n\n/**\n * Represents a session in the AgentBay cloud environment.\n */\nexport class Session {\n private agentBay: AgentBay;\n public sessionId: string;\n public resourceUrl = \"\";\n\n // File, command, and oss handlers (matching Python naming)\n public fileSystem: FileSystem; // file_system in Python\n public command: Command;\n public oss: Oss;\n\n // Application, window, and UI management (matching Python naming)\n public application: Application; // application in Python (ApplicationManager)\n public window: WindowManager;\n public ui: UI;\n\n // Context management (matching Go version)\n public context: ContextManager;\n\n /**\n * Initialize a Session object.\n *\n * @param agentBay - The AgentBay instance that created this session.\n * @param sessionId - The ID of this session.\n */\n constructor(agentBay: AgentBay, sessionId: string) {\n this.agentBay = agentBay;\n this.sessionId = sessionId;\n this.resourceUrl = \"\";\n\n // Initialize file system, command handlers (matching Python naming)\n this.fileSystem = new FileSystem(this);\n this.command = new Command(this);\n this.oss = new Oss(this);\n\n // Initialize application and window managers (matching Python naming)\n this.application = new Application(this);\n this.window = new WindowManager(this);\n this.ui = new UI(this);\n\n // Initialize context manager (matching Go version)\n this.context = newContextManager(this);\n }\n\n /**\n * Return the API key for this session.\n */\n getAPIKey(): string {\n return this.agentBay.getAPIKey();\n }\n\n /**\n * Return the HTTP client for this session.\n */\n getClient(): Client {\n return this.agentBay.getClient();\n }\n\n /**\n * Return the session_id for this session.\n */\n getSessionId(): string {\n return this.sessionId;\n }\n\n /**\n * Delete this session.\n *\n * @returns DeleteResult indicating success or failure and request ID\n */\n async delete(): Promise<DeleteResult> {\n try {\n const request = new ReleaseMcpSessionRequest({\n authorization: `Bearer ${this.getAPIKey()}`,\n sessionId: this.sessionId,\n });\n\n const response = await this.getClient().releaseMcpSession(request);\n log(`Response from release_mcp_session: ${JSON.stringify(response)}`);\n\n // Extract request ID\n const requestId = extractRequestId(response) || \"\";\n\n // Check if the response is success (matching Python logic)\n const responseBody = response.body;\n const success = responseBody?.success !== false; // Note: capital S to match Python\n\n if (!success) {\n return {\n requestId,\n success: false,\n errorMessage: \"Failed to delete session\",\n };\n }\n\n // Return success result with request ID\n return {\n requestId,\n success: true,\n };\n } catch (error) {\n logError(\"Error calling release_mcp_session:\", error);\n // In case of error, return failure result with error message (matching Python)\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to delete session ${this.sessionId}: ${error}`,\n };\n }\n }\n\n /**\n * Sets the labels for this session.\n *\n * @param labels - The labels to set for the session.\n * @returns OperationResult indicating success or failure with request ID\n * @throws Error if the operation fails (matching Python SessionError)\n */\n async setLabels(labels: Record<string, string>): Promise<OperationResult> {\n try {\n // Convert labels to JSON string\n const labelsJSON = JSON.stringify(labels);\n\n const request = new SetLabelRequest({\n authorization: `Bearer ${this.getAPIKey()}`,\n sessionId: this.sessionId,\n labels: labelsJSON,\n });\n\n const response = await this.getClient().setLabel(request);\n\n // Extract request ID\n const requestId = extractRequestId(response) || \"\";\n\n return {\n requestId,\n success: true,\n };\n } catch (error) {\n logError(\"Error calling set_label:\", error);\n throw new Error(\n `Failed to set labels for session ${this.sessionId}: ${error}`\n );\n }\n }\n\n /**\n * Gets the labels for this session.\n *\n * @returns OperationResult containing the labels as data and request ID\n * @throws Error if the operation fails (matching Python SessionError)\n */\n async getLabels(): Promise<OperationResult> {\n try {\n const request = new GetLabelRequest({\n authorization: `Bearer ${this.getAPIKey()}`,\n sessionId: this.sessionId,\n });\n\n const response = await this.getClient().getLabel(request);\n\n // Extract request ID\n const requestId = extractRequestId(response) || \"\";\n\n // Extract labels from response (matching Python structure)\n const responseBody = response?.body;\n const data = responseBody?.data; // Capital D to match Python\n const labelsJSON = data?.labels; // Capital L to match Python\n\n let labels = {};\n if (labelsJSON) {\n labels = JSON.parse(labelsJSON);\n }\n\n return {\n requestId,\n success: true,\n data: labels,\n };\n } catch (error) {\n logError(\"Error calling get_label:\", error);\n throw new Error(\n `Failed to get labels for session ${this.sessionId}: ${error}`\n );\n }\n }\n\n /**\n * Gets information about this session.\n *\n * @returns OperationResult containing the session information as data and request ID\n * @throws Error if the operation fails (matching Python SessionError)\n */\n async info(): Promise<OperationResult> {\n try {\n const request = new GetMcpResourceRequest({\n authorization: `Bearer ${this.getAPIKey()}`,\n sessionId: this.sessionId,\n });\n\n log(\"API Call: GetMcpResource\");\n log(`Request: SessionId=${this.sessionId}`);\n\n const response = await this.getClient().getMcpResource(request);\n log(`Response from GetMcpResource: ${JSON.stringify(response)}`);\n\n // Extract request ID\n const requestId = extractRequestId(response) || \"\";\n\n // Extract session info from response (matching Python structure)\n const responseBody = response.body;\n const data = responseBody?.data; // Capital D to match Python\n\n const sessionInfo = new SessionInfoClass();\n\n if (data?.sessionId) {\n // Capital S and I to match Python\n sessionInfo.sessionId = data.sessionId;\n }\n\n if (data?.resourceUrl) {\n // Capital R and U to match Python\n sessionInfo.resourceUrl = data.resourceUrl;\n // Update the session's resource_url with the latest value\n this.resourceUrl = data.resourceUrl;\n }\n\n // Transfer DesktopInfo fields to SessionInfo (matching Python structure)\n if (data?.desktopInfo) {\n // Capital D and I to match Python\n const desktopInfo = data.desktopInfo;\n if (desktopInfo.appId) {\n sessionInfo.appId = desktopInfo.appId;\n }\n if (desktopInfo.authCode) {\n sessionInfo.authCode = desktopInfo.authCode;\n }\n if (desktopInfo.connectionProperties) {\n sessionInfo.connectionProperties = desktopInfo.connectionProperties;\n }\n if (desktopInfo.resourceId) {\n sessionInfo.resourceId = desktopInfo.resourceId;\n }\n if (desktopInfo.resourceType) {\n sessionInfo.resourceType = desktopInfo.resourceType;\n }\n if (desktopInfo.ticket) {\n sessionInfo.ticket = desktopInfo.ticket;\n }\n }\n\n return {\n requestId,\n success: true,\n data: sessionInfo,\n };\n } catch (error) {\n logError(\"Error calling GetMcpResource:\", error);\n throw new Error(\n `Failed to get session info for session ${this.sessionId}: ${error}`\n );\n }\n }\n\n /**\n * Get a link associated with the current session.\n *\n * @param protocolType - Optional protocol type to use for the link\n * @param port - Optional port to use for the link\n * @returns OperationResult containing the link as data and request ID\n * @throws Error if the operation fails (matching Python SessionError)\n */\n async getLink(\n protocolType?: string,\n port?: number\n ): Promise<OperationResult> {\n try {\n const request = new GetLinkRequest({\n authorization: `Bearer ${this.getAPIKey()}`,\n sessionId: this.getSessionId(),\n protocolType,\n port,\n });\n\n const response = await this.agentBay.getClient().getLink(request);\n\n // Extract request ID\n const requestId = extractRequestId(response) || \"\";\n\n const responseBody = response.body;\n\n if (typeof responseBody !== \"object\") {\n throw new Error(\n \"Invalid response format: expected a dictionary from response body\"\n );\n }\n\n let data = responseBody.data || {}; // Capital D to match Python\n log(`Data: ${JSON.stringify(data)}`);\n\n if (typeof data !== \"object\") {\n try {\n data = typeof data === \"string\" ? JSON.parse(data) : {};\n } catch (jsonError) {\n data = {};\n }\n }\n\n const url = (data as any).Url || \"\";\n\n return {\n requestId,\n success: true,\n data: url,\n };\n } catch (error) {\n if (\n error instanceof Error &&\n error.message.includes(\"Invalid response format\")\n ) {\n throw error;\n }\n throw new Error(`Failed to get link: ${error}`);\n }\n }\n\n /**\n * Asynchronously get a link associated with the current session.\n *\n * @param protocolType - Optional protocol type to use for the link\n * @param port - Optional port to use for the link\n * @returns OperationResult containing the link as data and request ID\n * @throws Error if the operation fails (matching Python SessionError)\n */\n async getLinkAsync(\n protocolType?: string,\n port?: number\n ): Promise<OperationResult> {\n try {\n const request = new GetLinkRequest({\n authorization: `Bearer ${this.getAPIKey()}`,\n sessionId: this.getSessionId(),\n protocolType,\n port,\n });\n\n // Note: In TypeScript, async is the default, but keeping this method for API compatibility\n const response = await this.agentBay.getClient().getLink(request);\n\n // Extract request ID\n const requestId = extractRequestId(response) || \"\";\n\n const responseBody = response?.body;\n\n if (typeof responseBody !== \"object\") {\n throw new Error(\n \"Invalid response format: expected a dictionary from response body\"\n );\n }\n\n let data = responseBody?.data || {}; // Capital D to match Python\n log(`Data: ${JSON.stringify(data)}`);\n\n if (typeof data !== \"object\") {\n try {\n data = typeof data === \"string\" ? JSON.parse(data) : {};\n } catch (jsonError) {\n data = {};\n }\n }\n\n const url = (data as any).Url || \"\";\n\n return {\n requestId,\n success: true,\n data: url,\n };\n } catch (error) {\n if (\n error instanceof Error &&\n error.message.includes(\"Invalid response format\")\n ) {\n throw error;\n }\n throw new Error(`Failed to get link asynchronously: ${error}`);\n }\n }\n}\n","import { CallMcpToolRequest } from \"../api/models/CallMcpToolRequest\";\nimport { Client } from \"../api/client\";\nimport { log, logError } from \"../utils/logger\";\nimport { APIError } from \"../exceptions\";\nimport {\n extractRequestId,\n ProcessListResult,\n InstalledAppListResult,\n AppOperationResult,\n} from \"../types/api-response\";\n\n/**\n * Result object for a CallMcpTool operation\n */\ninterface CallMcpToolResult {\n data: Record<string, any>;\n content?: any[];\n textContent?: string;\n isError: boolean;\n errorMsg?: string;\n statusCode: number;\n requestId?: string;\n}\n\n/**\n * Represents an installed application.\n */\nexport interface InstalledApp {\n name: string;\n start_cmd: string;\n stop_cmd?: string;\n work_directory?: string;\n}\n\n/**\n * Represents a running process.\n */\nexport interface Process {\n pname: string;\n pid: number;\n cmdline?: string;\n path?: string;\n}\n\n/**\n * Handles application management operations in the AgentBay cloud environment.\n */\nexport class Application {\n private session: {\n getAPIKey(): string;\n getClient(): Client;\n getSessionId(): string;\n };\n\n /**\n * Creates a new Application instance.\n * @param session The session object that provides access to the AgentBay API.\n */\n constructor(session: {\n getAPIKey(): string;\n getClient(): Client;\n getSessionId(): string;\n }) {\n this.session = session;\n }\n\n /**\n * Helper method to call MCP tools and handle common response processing\n *\n * @param toolName - Name of the MCP tool to call\n * @param args - Arguments to pass to the tool\n * @param defaultErrorMsg - Default error message if specific error details are not available\n * @returns A CallMcpToolResult with the response data\n * @throws APIError if the call fails\n */\n private async callMcpTool(\n toolName: string,\n args: Record<string, any>,\n defaultErrorMsg: string\n ): Promise<CallMcpToolResult> {\n try {\n const argsJSON = JSON.stringify(args);\n const request = new CallMcpToolRequest({\n authorization: `Bearer ${this.session.getAPIKey()}`,\n sessionId: this.session.getSessionId(),\n name: toolName,\n args: argsJSON,\n });\n\n // Log API request\n log(`API Call: CallMcpTool - ${toolName}`);\n log(`Request: SessionId=${request.sessionId}, Args=${request.args}`);\n\n const client = this.session.getClient();\n const response = await client.callMcpTool(request);\n\n // Log API response\n if (response && response.body) {\n log(`Response from CallMcpTool - ${toolName}:`, response.body);\n }\n\n // Extract data from response\n if (!response.body?.data) {\n throw new Error(\"Invalid response data format\");\n }\n\n const data = response.body.data as Record<string, any>;\n\n // Create result object\n const result: CallMcpToolResult = {\n data,\n statusCode: response.statusCode || 0,\n isError: false,\n requestId: extractRequestId(response),\n };\n\n // Check if there's an error in the response\n if (data.isError === true) {\n result.isError = true;\n\n // Try to extract the error message from the content field\n const contentArray = data.content as any[] | undefined;\n if (contentArray && contentArray.length > 0) {\n result.content = contentArray;\n\n // Extract error message from the first content item\n if (contentArray[0]?.text) {\n result.errorMsg = contentArray[0].text;\n throw new Error(contentArray[0].text);\n }\n }\n throw new Error(defaultErrorMsg);\n }\n\n // Extract content array if it exists\n if (Array.isArray(data.content)) {\n result.content = data.content;\n\n // Extract textContent from content items\n if (result.content.length > 0) {\n const textParts: string[] = [];\n for (const item of result.content) {\n if (\n item &&\n typeof item === \"object\" &&\n item.text &&\n typeof item.text === \"string\"\n ) {\n textParts.push(item.text);\n }\n }\n result.textContent = textParts.join(\"\\n\");\n }\n }\n\n return result;\n } catch (error) {\n logError(`Error calling CallMcpTool - ${toolName}:`, error);\n throw new APIError(`Failed to call ${toolName}: ${error}`);\n }\n }\n\n /**\n * Helper method to parse JSON string into objects\n */\n private parseJSON<T>(jsonString: string): T {\n try {\n return JSON.parse(jsonString);\n } catch (error) {\n throw new Error(`Failed to parse JSON: ${error}`);\n }\n }\n\n /**\n * Retrieves a list of installed applications.\n * Corresponds to Python's get_installed_apps() method\n *\n * @param startMenu Whether to include applications from the start menu. Defaults to true.\n * @param desktop Whether to include applications from the desktop. Defaults to true.\n * @param ignoreSystemApps Whether to ignore system applications. Defaults to true.\n * @returns InstalledAppListResult with installed apps and requestId\n * @throws Error if the operation fails.\n */\n async getInstalledApps(\n startMenu = true,\n desktop = true,\n ignoreSystemApps = true\n ): Promise<InstalledAppListResult> {\n try {\n const args = {\n start_menu: startMenu,\n desktop,\n ignore_system_apps: ignoreSystemApps,\n };\n\n const result = await this.callMcpTool(\n \"get_installed_apps\",\n args,\n \"Failed to get installed apps\"\n );\n\n let apps: InstalledApp[] = [];\n if (result.textContent) {\n apps = this.parseJSON<InstalledApp[]>(result.textContent);\n }\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n data: apps,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n data: [],\n errorMessage: `Failed to get installed apps: ${error}`,\n };\n }\n }\n\n /**\n * Starts an application with the given command and optional working directory.\n * Corresponds to Python's start_app() method\n *\n * @param startCmd The command to start the application.\n * @param workDirectory The working directory for the application. Defaults to an empty string.\n * @param activity Activity name to launch (e.g. \".SettingsActivity\" or \"com.package/.Activity\"). Defaults to an empty string.\n * @returns ProcessListResult with started processes and requestId\n * @throws Error if the operation fails.\n */\n async startApp(\n startCmd: string,\n workDirectory = \"\",\n activity = \"\"\n ): Promise<ProcessListResult> {\n try {\n const args: any = {\n start_cmd: startCmd,\n };\n\n if (workDirectory) {\n args.work_directory = workDirectory;\n }\n\n if (activity) {\n args.activity = activity;\n }\n\n const result = await this.callMcpTool(\n \"start_app\",\n args,\n \"Failed to start app\"\n );\n\n let processes: Process[] = [];\n if (result.textContent) {\n processes = this.parseJSON<Process[]>(result.textContent);\n }\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n data: processes,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n data: [],\n errorMessage: `Failed to start app: ${error}`,\n };\n }\n }\n\n /**\n * Stops an application by process name.\n * Corresponds to Python's stop_app_by_pname() method\n *\n * @param pname The name of the process to stop.\n * @returns AppOperationResult with requestId\n * @throws Error if the operation fails.\n */\n async stopAppByPName(pname: string): Promise<AppOperationResult> {\n try {\n const args = {\n pname,\n };\n\n const result = await this.callMcpTool(\n \"stop_app_by_pname\",\n args,\n \"Failed to stop app by pname\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to stop app by pname: ${error}`,\n };\n }\n }\n\n /**\n * Stops an application by process ID.\n * Corresponds to Python's stop_app_by_pid() method\n *\n * @param pid The ID of the process to stop.\n * @returns AppOperationResult with requestId\n * @throws Error if the operation fails.\n */\n async stopAppByPID(pid: number): Promise<AppOperationResult> {\n try {\n const args = {\n pid,\n };\n\n const result = await this.callMcpTool(\n \"stop_app_by_pid\",\n args,\n \"Failed to stop app by pid\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to stop app by pid: ${error}`,\n };\n }\n }\n\n /**\n * Stops an application by stop command.\n * Corresponds to Python's stop_app_by_cmd() method\n *\n * @param stopCmd The command to stop the application.\n * @returns AppOperationResult with requestId\n * @throws Error if the operation fails.\n */\n async stopAppByCmd(stopCmd: string): Promise<AppOperationResult> {\n try {\n const args = {\n stop_cmd: stopCmd,\n };\n\n const result = await this.callMcpTool(\n \"stop_app_by_cmd\",\n args,\n \"Failed to stop app by command\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to stop app by command: ${error}`,\n };\n }\n }\n\n /**\n * Lists all currently visible applications.\n * Corresponds to Python's list_visible_apps() method\n *\n * @returns ProcessListResult with visible processes and requestId\n * @throws Error if the operation fails.\n */\n async listVisibleApps(): Promise<ProcessListResult> {\n try {\n const args = {};\n\n const result = await this.callMcpTool(\n \"list_visible_apps\",\n args,\n \"Failed to list visible apps\"\n );\n\n let processes: Process[] = [];\n if (result.textContent) {\n processes = this.parseJSON<Process[]>(result.textContent);\n }\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n data: processes,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n data: [],\n errorMessage: `Failed to list visible apps: ${error}`,\n };\n }\n }\n}\n","import { APIError } from \"../exceptions\";\nimport { Session } from \"../session\";\nimport { Client } from \"../api/client\";\nimport { CallMcpToolRequest } from \"../api/models/model\";\nimport { log, logError } from \"../utils/logger\";\nimport {\n extractRequestId,\n CommandResult,\n CodeExecutionResult,\n} from \"../types/api-response\";\n\nimport * as $_client from \"../api\";\n\n/**\n * Result object for a CallMcpTool operation\n */\ninterface CallMcpToolResult {\n data: Record<string, any>;\n content?: any[];\n textContent?: string;\n isError: boolean;\n errorMsg?: string;\n statusCode: number;\n requestId?: string;\n}\n\n/**\n * Handles command execution operations in the AgentBay cloud environment.\n */\nexport class Command {\n private session: Session;\n private client!: $_client.Client;\n private baseUrl!: string;\n\n /**\n * Initialize a Command object.\n *\n * @param session - The Session instance that this Command belongs to.\n */\n constructor(session: Session) {\n this.session = session;\n }\n\n /**\n * Helper method to call MCP tools and handle common response processing\n *\n * @param toolName - Name of the MCP tool to call\n * @param args - Arguments to pass to the tool\n * @param defaultErrorMsg - Default error message if specific error details are not available\n * @returns A CallMcpToolResult with the response data\n * @throws APIError if the call fails\n */\n private async callMcpTool(\n toolName: string,\n args: Record<string, any>,\n defaultErrorMsg: string\n ): Promise<CallMcpToolResult> {\n try {\n const argsJSON = JSON.stringify(args);\n const callToolRequest = new CallMcpToolRequest({\n authorization: `Bearer ${this.session.getAPIKey()}`,\n sessionId: this.session.getSessionId(),\n name: toolName,\n args: argsJSON,\n });\n\n // Log API request\n log(`API Call: CallMcpTool - ${toolName}`);\n log(\n `Request: SessionId=${this.session.getSessionId()}, Args=${argsJSON}`\n );\n\n const response = await this.session\n .getClient()\n .callMcpTool(callToolRequest);\n\n // Log API response\n log(`Response from CallMcpTool - ${toolName}:`, response.body);\n\n if (!response.body?.data) {\n throw new Error(\"Invalid response data format\");\n }\n\n // Extract data from response\n const data = response.body.data as Record<string, any>;\n\n // Create result object\n const result: CallMcpToolResult = {\n data,\n statusCode: response.statusCode || 0,\n isError: false,\n requestId: extractRequestId(response),\n };\n\n // Check if there's an error in the response\n if (data.isError === true) {\n result.isError = true;\n\n // Try to extract the error message from the content field\n const contentArray = data.content as any[] | undefined;\n if (contentArray && contentArray.length > 0) {\n result.content = contentArray;\n\n // Extract error message from the first content item\n if (contentArray[0]?.text) {\n result.errorMsg = contentArray[0].text;\n throw new Error(contentArray[0].text);\n }\n }\n throw new Error(defaultErrorMsg);\n }\n\n // Extract content array if it exists\n if (Array.isArray(data.content)) {\n result.content = data.content;\n\n // Extract textContent from content items\n if (result.content.length > 0) {\n const textParts: string[] = [];\n for (const item of result.content) {\n if (\n item &&\n typeof item === \"object\" &&\n item.text &&\n typeof item.text === \"string\"\n ) {\n textParts.push(item.text);\n }\n }\n result.textContent = textParts.join(\"\\n\");\n }\n }\n\n return result;\n } catch (error) {\n logError(`Error calling CallMcpTool - ${toolName}:`, error);\n throw new APIError(`Failed to call ${toolName}: ${error}`);\n }\n }\n\n /**\n * Execute a command in the cloud environment with a specified timeout.\n * Corresponds to Python's execute_command() method\n *\n * @param command - The command to execute.\n * @param timeoutMs - The timeout for the command execution in milliseconds. Default is 1000ms.\n * @returns CommandResult with command output and requestId\n */\n async executeCommand(\n command: string,\n timeoutMs = 1000\n ): Promise<CommandResult> {\n try {\n const args = {\n command,\n timeout_ms: timeoutMs,\n };\n\n const result = await this.callMcpTool(\n \"shell\",\n args,\n \"Failed to execute command\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n output: result.textContent || \"\",\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n output: \"\",\n errorMessage: `Failed to execute command: ${error}`,\n };\n }\n }\n\n /**\n * Execute code in the specified language with a timeout.\n * Corresponds to Python's run_code() method\n *\n * @param code - The code to execute.\n * @param language - The programming language of the code. Must be either 'python' or 'javascript'.\n * @param timeoutS - The timeout for the code execution in seconds. Default is 300s.\n * @returns CodeExecutionResult with code execution output and requestId\n * @throws Error if an unsupported language is specified.\n */\n async runCode(\n code: string,\n language: string,\n timeoutS = 300\n ): Promise<CodeExecutionResult> {\n try {\n // Validate language\n if (language !== \"python\" && language !== \"javascript\") {\n return {\n requestId: \"\",\n success: false,\n result: \"\",\n errorMessage: `Unsupported language: ${language}. Supported languages are 'python' and 'javascript'`,\n };\n }\n\n const args = {\n code,\n language,\n timeout_s: timeoutS,\n };\n\n const result = await this.callMcpTool(\n \"run_code\",\n args,\n \"Failed to execute code\"\n );\n return {\n requestId: result.requestId || \"\",\n success: true,\n result: result.textContent || \"\",\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n result: \"\",\n errorMessage: `Failed to run code: ${error}`,\n };\n }\n }\n}\n","import { ApiResponse, extractRequestId } from \"./types/api-response\";\nimport { Client } from \"./api/client\";\nimport { GetContextInfoRequest, SyncContextRequest } from \"./api/models/model\";\nimport { log, logError } from \"./utils/logger\";\n\nexport interface ContextStatusData {\n contextId: string;\n path: string;\n errorMessage: string;\n status: string;\n startTime: number;\n finishTime: number;\n taskType: string;\n}\n\nexport interface ContextStatusItem {\n type: string;\n data: string;\n}\n\nexport interface ContextInfoResult extends ApiResponse {\n contextStatusData: ContextStatusData[];\n}\n\nexport interface ContextSyncResult extends ApiResponse {\n success: boolean;\n}\n\nexport interface SessionInterface {\n getAPIKey(): string;\n getClient(): Client;\n getSessionId(): string;\n}\n\nexport class ContextManager {\n private session: SessionInterface;\n\n constructor(session: SessionInterface) {\n this.session = session;\n }\n\n async info(): Promise<ContextInfoResult> {\n return this.infoWithParams();\n }\n\n async infoWithParams(\n contextId?: string,\n path?: string,\n taskType?: string\n ): Promise<ContextInfoResult> {\n const request = new GetContextInfoRequest({\n authorization: `Bearer ${this.session.getAPIKey()}`,\n sessionId: this.session.getSessionId(),\n });\n\n // Set optional parameters if provided\n if (contextId) {\n request.contextId = contextId;\n }\n if (path) {\n request.path = path;\n }\n if (taskType) {\n request.taskType = taskType;\n }\n\n // Log API request (matching Go version format)\n log(\"API Call: GetContextInfo\");\n let requestLog = `Request: SessionId=${request.sessionId}`;\n if (request.contextId) {\n requestLog += `, ContextId=${request.contextId}`;\n }\n if (request.path) {\n requestLog += `, Path=${request.path}`;\n }\n if (request.taskType) {\n requestLog += `, TaskType=${request.taskType}`;\n }\n log(requestLog);\n\n try {\n const response = await this.session.getClient().getContextInfo(request);\n\n // Extract RequestID\n const requestId = extractRequestId(response) || \"\";\n\n if (response?.body) {\n log(\"Response from GetContextInfo:\", response.body);\n }\n\n // Parse the context status data\n const contextStatusData: ContextStatusData[] = [];\n if (response?.body?.data?.contextStatus) {\n try {\n // First, parse the outer array\n const contextStatusStr = response.body.data.contextStatus;\n const statusItems: ContextStatusItem[] = JSON.parse(contextStatusStr);\n \n // Process each item in the array\n for (const item of statusItems) {\n if (item.type === \"data\") {\n // Parse the inner data string\n const dataItems: ContextStatusData[] = JSON.parse(item.data);\n contextStatusData.push(...dataItems);\n }\n }\n } catch (error) {\n logError(\"Error parsing context status:\", error);\n }\n }\n\n return {\n requestId,\n contextStatusData,\n };\n } catch (error) {\n logError(\"Error calling GetContextInfo:\", error);\n throw new Error(`Failed to get context info: ${error}`);\n }\n }\n\n async sync(): Promise<ContextSyncResult> {\n return this.syncWithParams();\n }\n\n async syncWithParams(\n contextId?: string,\n path?: string,\n mode?: string\n ): Promise<ContextSyncResult> {\n const request = new SyncContextRequest({\n authorization: `Bearer ${this.session.getAPIKey()}`,\n sessionId: this.session.getSessionId(),\n });\n\n // Set optional parameters if provided\n if (contextId) {\n request.contextId = contextId;\n }\n if (path) {\n request.path = path;\n }\n if (mode) {\n request.mode = mode;\n }\n\n // Log API request (matching Go version format)\n log(\"API Call: SyncContext\");\n let requestLog = `Request: SessionId=${request.sessionId}`;\n if (request.contextId) {\n requestLog += `, ContextId=${request.contextId}`;\n }\n if (request.path) {\n requestLog += `, Path=${request.path}`;\n }\n if (request.mode) {\n requestLog += `, Mode=${request.mode}`;\n }\n log(requestLog);\n\n try {\n const response = await this.session.getClient().syncContext(request);\n\n // Extract RequestID\n const requestId = extractRequestId(response) || \"\";\n\n if (response?.body) {\n log(\"Response from SyncContext:\", response.body);\n }\n\n let success = false;\n if (response?.body?.success !== undefined) {\n success = response.body.success;\n }\n\n return {\n requestId,\n success,\n };\n } catch (error) {\n logError(\"Error calling SyncContext:\", error);\n throw new Error(`Failed to sync context: ${error}`);\n }\n }\n}\n\nexport function newContextManager(session: SessionInterface): ContextManager {\n return new ContextManager(session);\n}\n","import { APIError } from \"../exceptions\";\nimport { Session } from \"../session\";\nimport { CallMcpToolRequest } from \"../api/models/model\";\nimport * as $_client from \"../api\";\nimport { log, logError } from \"../utils/logger\";\nimport {\n extractRequestId,\n BoolResult,\n FileInfoResult,\n DirectoryListResult,\n FileContentResult,\n MultipleFileContentResult,\n FileSearchResult,\n} from \"../types/api-response\";\n\n// Default chunk size for large file operations (60KB)\nconst DEFAULT_CHUNK_SIZE = 60 * 1024;\n\n/**\n * FileInfo represents information about a file or directory\n */\nexport interface FileInfo {\n name: string;\n path: string;\n size: number;\n isDirectory: boolean;\n modTime: string;\n mode: string;\n owner?: string;\n group?: string;\n}\n\n/**\n * DirectoryEntry represents an entry in a directory listing\n */\nexport interface DirectoryEntry {\n name: string;\n isDirectory: boolean;\n}\n\n// File operations that might contain large content\nconst FILE_OPERATIONS: { [key: string]: boolean } = {\n read_file: true,\n write_file: true,\n read_multiple_files: true,\n};\n\n/**\n * Checks if the tool operation is file-related and might contain large content\n *\n * @param toolName - Name of the MCP tool\n * @returns True if the operation is file-related\n */\nfunction isFileOperation(toolName: string): boolean {\n return FILE_OPERATIONS[toolName] === true;\n}\n\n/**\n * Replaces large content with size information in JSON args for logging\n *\n * @param args - Arguments object to truncate\n * @returns Truncated arguments object for logging\n */\nfunction truncateContentForLogging(\n args: Record<string, any>\n): Record<string, any> {\n const truncatedArgs = { ...args };\n\n // Check for content field and replace with length info\n if (typeof truncatedArgs.content === \"string\") {\n const contentLength = truncatedArgs.content.length;\n truncatedArgs.content = `[Content length: ${contentLength} bytes]`;\n }\n\n // Check for paths array and log number of paths instead of all paths\n if (Array.isArray(truncatedArgs.paths) && truncatedArgs.paths.length > 3) {\n truncatedArgs.paths = `[${truncatedArgs.paths.length} paths, first few: ${truncatedArgs.paths[0]}, ${truncatedArgs.paths[1]}, ${truncatedArgs.paths[2]}, ...]`;\n }\n\n return truncatedArgs;\n}\n\n/**\n * Parse a file info string into a FileInfo object\n *\n * @param fileInfoStr - The file info string to parse\n * @returns A FileInfo object\n */\nfunction parseFileInfo(fileInfoStr: string): FileInfo {\n const result: FileInfo = {\n name: \"\",\n path: \"\",\n size: 0,\n isDirectory: false,\n modTime: \"\",\n mode: \"\",\n };\n\n const lines = fileInfoStr.split(\"\\n\");\n for (const line of lines) {\n if (line.includes(\":\")) {\n const [key, value] = line.split(\":\", 2).map((part) => part.trim());\n\n switch (key) {\n case \"name\":\n result.name = value;\n break;\n case \"path\":\n result.path = value;\n break;\n case \"size\":\n result.size = parseInt(value, 10);\n break;\n case \"isDirectory\":\n result.isDirectory = value === \"true\";\n break;\n case \"modTime\":\n result.modTime = value;\n break;\n case \"mode\":\n result.mode = value;\n break;\n case \"owner\":\n result.owner = value;\n break;\n case \"group\":\n result.group = value;\n break;\n }\n }\n }\n\n return result;\n}\n\n/**\n * Parse a directory listing string into an array of DirectoryEntry objects\n *\n * @param text - The directory listing text to parse\n * @returns An array of DirectoryEntry objects\n */\nfunction parseDirectoryListing(text: string): DirectoryEntry[] {\n const result: DirectoryEntry[] = [];\n const lines = text.split(\"\\n\");\n\n for (const line of lines) {\n const trimmedLine = line.trim();\n if (trimmedLine === \"\") {\n continue;\n }\n\n if (trimmedLine.startsWith(\"[DIR]\")) {\n result.push({\n isDirectory: true,\n name: trimmedLine.replace(\"[DIR]\", \"\").trim(),\n });\n } else if (trimmedLine.startsWith(\"[FILE]\")) {\n result.push({\n isDirectory: false,\n name: trimmedLine.replace(\"[FILE]\", \"\").trim(),\n });\n }\n }\n\n return result;\n}\n\n/**\n * Result object for a CallMcpTool operation\n */\ninterface CallMcpToolResult {\n data: Record<string, any>;\n content?: any[];\n textContent?: string;\n isError: boolean;\n errorMsg?: string;\n statusCode: number;\n requestId?: string;\n}\n\n/**\n * Handles file operations in the AgentBay cloud environment.\n */\nexport class FileSystem {\n private session: Session;\n private client!: $_client.Client;\n private baseUrl!: string;\n\n /**\n * Initialize a FileSystem object.\n *\n * @param session - The Session instance that this FileSystem belongs to.\n */\n constructor(session: Session) {\n this.session = session;\n }\n\n /**\n * Helper method to call MCP tools and handle common response processing\n *\n * @param toolName - Name of the MCP tool to call\n * @param args - Arguments to pass to the tool\n * @param defaultErrorMsg - Default error message if specific error details are not available\n * @returns A CallMcpToolResult with the response data\n * @throws APIError if the call fails\n */\n private async callMcpTool(\n toolName: string,\n args: Record<string, any>,\n defaultErrorMsg: string\n ): Promise<CallMcpToolResult> {\n try {\n // Handle logging differently based on operation type\n let loggableArgs = args;\n if (isFileOperation(toolName)) {\n // For file operations, truncate content for logging\n loggableArgs = truncateContentForLogging(args);\n }\n\n const argsJSON = JSON.stringify(args);\n const loggableArgsJSON = JSON.stringify(loggableArgs);\n\n const callToolRequest = new CallMcpToolRequest({\n authorization: `Bearer ${this.session.getAPIKey()}`,\n sessionId: this.session.getSessionId(),\n name: toolName,\n args: argsJSON,\n });\n\n // Log API request\n log(`API Call: CallMcpTool - ${toolName}`);\n log(\n `Request: SessionId=${this.session.getSessionId()}, Args=${loggableArgsJSON}`\n );\n\n const response = await this.session\n .getClient()\n .callMcpTool(callToolRequest);\n\n // Log API response differently based on operation type\n if (isFileOperation(toolName)) {\n // Log content size for file operations instead of full content\n log(\n `Response from CallMcpTool - ${toolName} - status: ${response.statusCode}`\n );\n\n // Log only relevant response information without content\n if (response.body?.data) {\n const data = response.body.data as Record<string, any>;\n if (data.isError === true) {\n log(`Response contains error: ${data.isError}`);\n } else {\n // For successful responses, don't log the content at all\n log(\"Response successful, content length info provided separately\");\n\n // If there's content, log its size instead of the actual content\n if (Array.isArray(data.content) && data.content.length > 0) {\n let totalSize = 0;\n for (const item of data.content) {\n if (\n item &&\n typeof item === \"object\" &&\n item.text &&\n typeof item.text === \"string\"\n ) {\n totalSize += item.text.length;\n }\n }\n log(`Content size: ${totalSize} bytes`);\n }\n }\n }\n } else {\n // For non-file operations, create a sanitized version of the response body\n // that doesn't include large content fields\n const sanitizedBody = { ...response.body };\n if (sanitizedBody.data && typeof sanitizedBody.data === \"object\") {\n const sanitizedData = { ...sanitizedBody.data };\n if (Array.isArray(sanitizedData.content)) {\n sanitizedData.content = `[Array with ${sanitizedData.content.length} items]`;\n }\n sanitizedBody.data = sanitizedData;\n }\n log(`Response from CallMcpTool - ${toolName}:`, sanitizedBody);\n }\n\n if (!response.body?.data) {\n throw new Error(\"Invalid response data format\");\n }\n\n // Extract data from response\n const data = response.body.data as Record<string, any>;\n\n // Create result object\n const result: CallMcpToolResult = {\n data,\n statusCode: response.statusCode || 0,\n isError: false,\n requestId: extractRequestId(response),\n };\n\n // Check if there's an error in the response\n if (data.isError === true) {\n result.isError = true;\n\n // Try to extract the error message from the content field\n const contentArray = data.content as any[] | undefined;\n if (contentArray && contentArray.length > 0) {\n result.content = contentArray;\n\n // Extract error message from the first content item\n if (contentArray[0]?.text) {\n result.errorMsg = contentArray[0].text;\n throw new Error(contentArray[0].text);\n }\n }\n throw new Error(defaultErrorMsg);\n }\n\n // Extract content array if it exists\n if (Array.isArray(data.content)) {\n result.content = data.content;\n\n // Extract textContent from content items\n if (result.content.length > 0) {\n const textParts: string[] = [];\n for (const item of result.content) {\n if (\n item &&\n typeof item === \"object\" &&\n item.text &&\n typeof item.text === \"string\"\n ) {\n textParts.push(item.text);\n }\n }\n result.textContent = textParts.join(\"\\n\");\n }\n }\n\n return result;\n } catch (error) {\n logError(`Error calling CallMcpTool - ${toolName}:`, error);\n throw new APIError(`Failed to call ${toolName}: ${error}`);\n }\n }\n\n /**\n * Creates a new directory at the specified path.\n * Corresponds to Python's create_directory() method\n *\n * @param path - Path to the directory to create.\n * @returns BoolResult with creation result and requestId\n */\n async createDirectory(path: string): Promise<BoolResult> {\n try {\n const args = {\n path,\n };\n\n const result = await this.callMcpTool(\n \"create_directory\",\n args,\n \"Failed to create directory\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to create directory: ${error}`,\n };\n }\n }\n\n /**\n * Edits a file by replacing occurrences of oldText with newText.\n * Corresponds to Python's edit_file() method\n *\n * @param path - Path to the file to edit.\n * @param edits - Array of edit operations, each containing oldText and newText.\n * @param dryRun - Optional: If true, preview changes without applying them.\n * @returns BoolResult with edit result and requestId\n */\n async editFile(\n path: string,\n edits: Array<{ oldText: string; newText: string }>,\n dryRun = false\n ): Promise<BoolResult> {\n try {\n const args = {\n path,\n edits,\n dryRun,\n };\n\n const result = await this.callMcpTool(\n \"edit_file\",\n args,\n \"Failed to edit file\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to edit file: ${error}`,\n };\n }\n }\n\n /**\n * Gets information about a file or directory.\n * Corresponds to Python's get_file_info() method\n *\n * @param path - Path to the file or directory to inspect.\n * @returns FileInfoResult with file info and requestId\n */\n async getFileInfo(path: string): Promise<FileInfoResult> {\n try {\n const args = {\n path,\n };\n\n const result = await this.callMcpTool(\n \"get_file_info\",\n args,\n \"Failed to get file info\"\n );\n\n // Parse and return the file info\n if (!result.textContent) {\n return {\n requestId: result.requestId || \"\",\n success: false,\n fileInfo: {},\n errorMessage: \"Empty response from get_file_info\",\n };\n }\n\n const fileInfo = parseFileInfo(result.textContent);\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n fileInfo,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to get file info: ${error}`,\n };\n }\n }\n\n /**\n * Lists the contents of a directory.\n * Corresponds to Python's list_directory() method\n *\n * @param path - Path to the directory to list.\n * @returns DirectoryListResult with directory entries and requestId\n */\n async listDirectory(path: string): Promise<DirectoryListResult> {\n try {\n const args = {\n path,\n };\n\n const result = await this.callMcpTool(\n \"list_directory\",\n args,\n \"Failed to list directory\"\n );\n\n // Parse the text content into directory entries\n const entries = result.textContent\n ? parseDirectoryListing(result.textContent)\n : [];\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n entries,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n entries: [],\n errorMessage: `Failed to list directory: ${error}`,\n };\n }\n }\n\n /**\n * Moves a file or directory from source to destination.\n * Corresponds to Python's move_file() method\n *\n * @param source - Path to the source file or directory.\n * @param destination - Path to the destination file or directory.\n * @returns BoolResult with move result and requestId\n */\n async moveFile(source: string, destination: string): Promise<BoolResult> {\n try {\n const args = {\n source,\n destination,\n };\n\n const result = await this.callMcpTool(\n \"move_file\",\n args,\n \"Failed to move file\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to move file: ${error}`,\n };\n }\n }\n\n /**\n * Reads the content of a file.\n * Corresponds to Python's read_file() method\n *\n * @param path - Path to the file to read.\n * @param offset - Optional: Line offset to start reading from.\n * @param length - Optional: Number of lines to read. If 0, reads the entire file.\n * @returns FileContentResult with file content and requestId\n */\n async readFile(\n path: string,\n offset = 0,\n length = 0\n ): Promise<FileContentResult> {\n try {\n const args: Record<string, any> = {\n path,\n };\n\n if (offset > 0) {\n args.offset = offset;\n }\n\n if (length > 0) {\n args.length = length;\n }\n\n const result = await this.callMcpTool(\n \"read_file\",\n args,\n \"Failed to read file\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n content: result.textContent || \"\",\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n content: \"\",\n errorMessage: `Failed to read file: ${error}`,\n };\n }\n }\n\n /**\n * Reads the content of multiple files.\n * Corresponds to Python's read_multiple_files() method\n *\n * @param paths - Array of file paths to read.\n * @returns MultipleFileContentResult with file contents and requestId\n */\n async readMultipleFiles(paths: string[]): Promise<MultipleFileContentResult> {\n try {\n const args = {\n paths,\n };\n\n const result = await this.callMcpTool(\n \"read_multiple_files\",\n args,\n \"Failed to read multiple files\"\n );\n\n const fileContents: Record<string, string> = {};\n\n if (result.textContent) {\n // Parse the response into a map of file paths to contents\n const lines = result.textContent.split(\"\\n\");\n let currentPath = \"\";\n let currentContent: string[] = [];\n\n for (const line of lines) {\n // Check if this line contains a file path (ends with a colon)\n const colonIndex = line.indexOf(\":\");\n if (\n colonIndex > 0 &&\n currentPath === \"\" &&\n !line.substring(0, colonIndex).includes(\" \")\n ) {\n // Extract path (everything before the first colon)\n const path = line.substring(0, colonIndex).trim();\n\n // Start collecting content (everything after the colon)\n currentPath = path;\n\n // If there's content on the same line after the colon, add it\n if (line.length > colonIndex + 1) {\n const contentStart = line.substring(colonIndex + 1).trim();\n if (contentStart) {\n currentContent.push(contentStart);\n }\n }\n } else if (line === \"---\") {\n // Save the current file content\n if (currentPath) {\n fileContents[currentPath] = currentContent.join(\"\\n\");\n currentPath = \"\";\n currentContent = [];\n }\n } else if (currentPath) {\n // If we're collecting content for a path, add this line\n currentContent.push(line);\n }\n }\n\n // Save the last file content if exists\n if (currentPath) {\n fileContents[currentPath] = currentContent.join(\"\\n\");\n }\n\n // Trim trailing newlines from file contents to match expected test values\n for (const path in fileContents) {\n fileContents[path] = fileContents[path].replace(/\\n+$/, \"\");\n }\n }\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n contents: fileContents,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n contents: {},\n errorMessage: `Failed to read multiple files: ${error}`,\n };\n }\n }\n\n /**\n * Searches for files in a directory that match a pattern.\n * Corresponds to Python's search_files() method\n *\n * @param path - Path to the directory to search in.\n * @param pattern - Pattern to search for. Supports glob patterns.\n * @param excludePatterns - Optional: Array of patterns to exclude.\n * @returns FileSearchResult with search results and requestId\n */\n async searchFiles(\n path: string,\n pattern: string,\n excludePatterns: string[] = []\n ): Promise<FileSearchResult> {\n try {\n const args: Record<string, any> = {\n path,\n pattern,\n };\n\n if (excludePatterns.length > 0) {\n args.exclude_patterns = excludePatterns;\n }\n\n const result = await this.callMcpTool(\n \"search_files\",\n args,\n \"Failed to search files\"\n );\n\n // Parse the text content into search results\n let searchResults: string[] = [];\n if (result.textContent) {\n // Split by newlines and filter out empty lines\n searchResults = result.textContent\n .split(\"\\n\")\n .map((line) => line.trim())\n .filter((line) => line !== \"\");\n }\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n matches: searchResults,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n matches: [],\n errorMessage: `Failed to search files: ${error}`,\n };\n }\n }\n\n /**\n * Writes content to a file.\n * Corresponds to Python's write_file() method\n *\n * @param path - Path to the file to write.\n * @param content - Content to write to the file.\n * @param mode - Optional: Write mode. One of \"overwrite\", \"append\", or \"create_new\". Default is \"overwrite\".\n * @returns BoolResult with write result and requestId\n */\n async writeFile(\n path: string,\n content: string,\n mode = \"overwrite\"\n ): Promise<BoolResult> {\n try {\n // Validate mode\n const validModes = [\"overwrite\", \"append\", \"create_new\"];\n if (!validModes.includes(mode)) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Invalid mode: ${mode}. Must be one of ${validModes.join(\n \", \"\n )}`,\n };\n }\n\n const args = {\n path,\n content,\n mode,\n };\n\n const result = await this.callMcpTool(\n \"write_file\",\n args,\n \"Failed to write file\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to write file: ${error}`,\n };\n }\n }\n\n /**\n * Reads a large file in chunks to handle size limitations of the underlying API.\n * Corresponds to Python's read_large_file() method\n *\n * @param path - Path to the file to read.\n * @param chunkSize - Optional: Size of each chunk in bytes. Default is 60KB.\n * @returns FileContentResult with complete file content and requestId\n */\n async readLargeFile(\n path: string,\n chunkSize: number = DEFAULT_CHUNK_SIZE\n ): Promise<FileContentResult> {\n try {\n // First get the file info\n const fileInfoResult = await this.getFileInfo(path);\n\n if (!fileInfoResult.success) {\n return {\n requestId: fileInfoResult.requestId,\n success: false,\n content: \"\",\n errorMessage: fileInfoResult.errorMessage,\n };\n }\n\n // Check if file exists and is a file (not a directory)\n if (!fileInfoResult.fileInfo || fileInfoResult.fileInfo.isDirectory) {\n return {\n requestId: fileInfoResult.requestId,\n success: false,\n content: \"\",\n errorMessage: `Path does not exist or is a directory: ${path}`,\n };\n }\n\n // Get size from the fileInfo object\n const fileSize = fileInfoResult.fileInfo.size || 0;\n\n if (fileSize === 0) {\n return {\n requestId: fileInfoResult.requestId,\n success: true,\n content: \"\",\n };\n }\n\n // Read the file in chunks\n let result = \"\";\n let offset = 0;\n let chunkCount = 0;\n\n log(\n `ReadLargeFile: Starting chunked read of ${path} (total size: ${fileSize} bytes, chunk size: ${chunkSize} bytes)`\n );\n\n while (offset < fileSize) {\n // Calculate how much to read in this chunk\n let length = chunkSize;\n if (offset + length > fileSize) {\n length = fileSize - offset;\n }\n\n log(\n `ReadLargeFile: Reading chunk ${\n chunkCount + 1\n } (${length} bytes at offset ${offset}/${fileSize})`\n );\n\n try {\n // Read the chunk\n const chunkResult = await this.readFile(path, offset, length);\n\n if (!chunkResult.success) {\n return chunkResult; // Return the error\n }\n\n // Extract the actual content from the response\n result += chunkResult.content;\n\n // Move to the next chunk\n offset += length;\n chunkCount++;\n } catch (error) {\n logError(`Error reading chunk at offset ${offset}: ${error}`);\n return {\n requestId: fileInfoResult.requestId,\n success: false,\n content: \"\",\n errorMessage: `Error reading chunk at offset ${offset}: ${error}`,\n };\n }\n }\n\n log(\n `ReadLargeFile: Successfully read ${path} in ${chunkCount} chunks (total: ${fileSize} bytes)`\n );\n\n return {\n requestId: fileInfoResult.requestId,\n success: true,\n content: result,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n content: \"\",\n errorMessage: `Failed to read large file: ${error}`,\n };\n }\n }\n\n /**\n * Writes a large file in chunks to handle size limitations of the underlying API.\n * Corresponds to Python's write_large_file() method\n *\n * @param path - Path to the file to write.\n * @param content - Content to write to the file.\n * @param chunkSize - Optional: Size of each chunk in bytes. Default is 60KB.\n * @returns BoolResult indicating success or failure with requestId\n */\n async writeLargeFile(\n path: string,\n content: string,\n chunkSize: number = DEFAULT_CHUNK_SIZE\n ): Promise<BoolResult> {\n try {\n const contentLen = content.length;\n\n log(\n `WriteLargeFile: Starting chunked write to ${path} (total size: ${contentLen} bytes, chunk size: ${chunkSize} bytes)`\n );\n\n // If content is small enough, use the regular WriteFile method\n if (contentLen <= chunkSize) {\n log(\n `WriteLargeFile: Content size (${contentLen} bytes) is smaller than chunk size, using normal WriteFile`\n );\n return await this.writeFile(path, content, \"overwrite\");\n }\n\n // Write the first chunk with \"overwrite\" mode to create/clear the file\n const firstChunkEnd = Math.min(chunkSize, contentLen);\n\n log(\n `WriteLargeFile: Writing first chunk (0-${firstChunkEnd} bytes) with overwrite mode`\n );\n const firstResult = await this.writeFile(\n path,\n content.substring(0, firstChunkEnd),\n \"overwrite\"\n );\n\n if (!firstResult.success) {\n return firstResult;\n }\n\n // Write the remaining chunks with \"append\" mode\n let chunkCount = 1; // Already wrote first chunk\n for (let offset = firstChunkEnd; offset < contentLen; ) {\n const end = Math.min(offset + chunkSize, contentLen);\n\n log(\n `WriteLargeFile: Writing chunk ${\n chunkCount + 1\n } (${offset}-${end} bytes) with append mode`\n );\n const chunkResult = await this.writeFile(\n path,\n content.substring(offset, end),\n \"append\"\n );\n\n if (!chunkResult.success) {\n return chunkResult;\n }\n\n offset = end;\n chunkCount++;\n }\n\n log(\n `WriteLargeFile: Successfully wrote ${path} in ${chunkCount} chunks (total: ${contentLen} bytes)`\n );\n\n return {\n requestId: firstResult.requestId,\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to write large file: ${error}`,\n };\n }\n }\n}\n","export { Oss } from \"./oss\";\n","import { APIError } from \"../exceptions\";\nimport { Session } from \"../session\";\nimport { Client } from \"../api/client\";\nimport { CallMcpToolRequest } from \"../api/models/model\";\nimport { log, logError } from \"../utils/logger\";\nimport {\n extractRequestId,\n OSSClientResult,\n OSSUploadResult,\n OSSDownloadResult,\n} from \"../types/api-response\";\n\nimport * as $_client from \"../api\";\n\n/**\n * Result object for a CallMcpTool operation\n */\ninterface CallMcpToolResult {\n data: Record<string, any>;\n content?: any[];\n textContent?: string;\n isError: boolean;\n errorMsg?: string;\n statusCode: number;\n requestId?: string;\n}\n\n/**\n * Handles Object Storage Service operations in the AgentBay cloud environment.\n */\nexport class Oss {\n private session: Session;\n private client!: $_client.Client;\n private baseUrl!: string;\n\n /**\n * Initialize an Oss object.\n *\n * @param session - The Session instance that this Oss belongs to.\n */\n constructor(session: Session) {\n this.session = session;\n }\n\n /**\n * Helper method to call MCP tools and handle common response processing\n *\n * @param toolName - Name of the MCP tool to call\n * @param args - Arguments to pass to the tool\n * @param defaultErrorMsg - Default error message if specific error details are not available\n * @returns A CallMcpToolResult with the response data\n * @throws APIError if the call fails\n */\n private async callMcpTool(\n toolName: string,\n args: Record<string, any>,\n defaultErrorMsg: string\n ): Promise<CallMcpToolResult> {\n try {\n const callToolRequest = new $_client.CallMcpToolRequest({\n authorization: `Bearer ${this.session.getAPIKey()}`,\n sessionId: this.session.getSessionId(),\n name: toolName,\n args: JSON.stringify(args),\n });\n\n // Log API request\n log(`API Call: CallMcpTool - ${toolName}`);\n log(\n `Request: SessionId=${this.session.getSessionId()}, Args=${JSON.stringify(\n args\n )}`\n );\n\n const response = await this.session\n .getClient()\n .callMcpTool(callToolRequest);\n\n // Log API response\n log(`Response from CallMcpTool - ${toolName}:`, response.body);\n\n if (!response.body?.data) {\n throw new Error(\"Invalid response data format\");\n }\n\n // Extract data from response\n const data = response.body.data as Record<string, any>;\n\n // Create result object\n const result: CallMcpToolResult = {\n data,\n statusCode: response.statusCode || 0,\n isError: false,\n requestId: extractRequestId(response),\n };\n\n // Check if there's an error in the response\n if (data.isError === true) {\n result.isError = true;\n\n // Try to extract the error message from the content field\n const contentArray = data.content as any[] | undefined;\n if (contentArray && contentArray.length > 0) {\n result.content = contentArray;\n\n // Extract error message from the first content item\n if (contentArray[0]?.text) {\n result.errorMsg = contentArray[0].text;\n throw new Error(contentArray[0].text);\n }\n }\n throw new Error(defaultErrorMsg);\n }\n\n // Extract content array if it exists\n if (Array.isArray(data.content)) {\n result.content = data.content;\n\n // Extract textContent from content items\n if (result.content.length > 0) {\n const textParts: string[] = [];\n for (const item of result.content) {\n if (\n item &&\n typeof item === \"object\" &&\n item.text &&\n typeof item.text === \"string\"\n ) {\n textParts.push(item.text);\n }\n }\n result.textContent = textParts.join(\"\\n\");\n }\n }\n\n return result;\n } catch (error) {\n logError(`Error calling CallMcpTool - ${toolName}:`, error);\n throw new APIError(`Failed to call MCP tool ${toolName}: ${error}`);\n }\n }\n\n /**\n * Initialize OSS environment variables with the specified credentials.\n * Corresponds to Python's env_init() method\n *\n * @param accessKeyId - The Access Key ID for OSS authentication.\n * @param accessKeySecret - The Access Key Secret for OSS authentication.\n * @param securityToken - The security token for OSS authentication.\n * @param endpoint - The OSS service endpoint. If not specified, the default is used.\n * @param region - The OSS region. If not specified, the default is used.\n * @returns OSSClientResult with initialization result and requestId\n */\n async envInit(\n accessKeyId: string,\n accessKeySecret: string,\n securityToken?: string,\n endpoint?: string,\n region?: string\n ): Promise<OSSClientResult> {\n try {\n const args: Record<string, any> = {\n access_key_id: accessKeyId,\n access_key_secret: accessKeySecret,\n };\n\n // Add optional parameters if provided\n if (securityToken) {\n args.security_token = securityToken;\n }\n if (endpoint) {\n args.endpoint = endpoint;\n }\n if (region) {\n args.region = region;\n }\n\n const result = await this.callMcpTool(\n \"oss_env_init\",\n args,\n \"Failed to initialize OSS environment\"\n );\n\n let clientConfig: Record<string, any> = {};\n if (result.textContent) {\n try {\n clientConfig = JSON.parse(result.textContent);\n } catch (parseError) {\n // If parsing fails, treat as string data\n clientConfig = { data: result.textContent };\n }\n }\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n clientConfig,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n clientConfig: {},\n errorMessage: `Failed to initialize OSS environment: ${error}`,\n };\n }\n }\n\n /**\n * Upload a local file or directory to OSS.\n * Corresponds to Python's upload() method\n *\n * @param bucket - OSS bucket name.\n * @param object - ObjectS.\n * @param path - Local file or directory path to upload.\n * @returns OSSUploadResult with upload result and requestId\n */\n async upload(\n bucket: string,\n object: string,\n path: string\n ): Promise<OSSUploadResult> {\n try {\n const args = {\n bucket,\n object,\n path,\n };\n\n const result = await this.callMcpTool(\n \"oss_upload\",\n args,\n \"Failed to upload to OSS\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n content: result.textContent || \"\",\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n content: \"\",\n errorMessage: `Failed to upload to OSS: ${error}`,\n };\n }\n }\n\n /**\n * Upload a local file or directory to OSS using a pre-signed URL.\n * Corresponds to Python's upload_anonymous() method\n *\n * @param url - Pre-signed URL for anonymous upload.\n * @param path - Local file or directory path to upload.\n * @returns OSSUploadResult with upload result and requestId\n */\n async uploadAnonymous(url: string, path: string): Promise<OSSUploadResult> {\n try {\n const args = {\n url,\n path,\n };\n\n const result = await this.callMcpTool(\n \"oss_upload_annon\",\n args,\n \"Failed to upload anonymously\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n content: result.textContent || \"\",\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n content: \"\",\n errorMessage: `Failed to upload anonymously: ${error}`,\n };\n }\n }\n\n /**\n * Download an object from OSS to a local file or directory.\n * Corresponds to Python's download() method\n *\n * @param bucket - OSS bucket name.\n * @param object - Object key in OSS.\n * @param path - Local file or directory path to save the downloaded content.\n * @returns OSSDownloadResult with download result and requestId\n */\n async download(\n bucket: string,\n object: string,\n path: string\n ): Promise<OSSDownloadResult> {\n try {\n const args = {\n bucket,\n object,\n path,\n };\n\n const result = await this.callMcpTool(\n \"oss_download\",\n args,\n \"Failed to download from OSS\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n content: result.textContent || \"\",\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n content: \"\",\n errorMessage: `Failed to download from OSS: ${error}`,\n };\n }\n }\n\n /**\n * Download an object from OSS using a pre-signed URL.\n * Corresponds to Python's download_anonymous() method\n *\n * @param url - Pre-signed URL for anonymous download.\n * @param path - Local file or directory path to save the downloaded content.\n * @returns OSSDownloadResult with download result and requestId\n */\n async downloadAnonymous(\n url: string,\n path: string\n ): Promise<OSSDownloadResult> {\n try {\n const args = {\n url,\n path,\n };\n\n const result = await this.callMcpTool(\n \"oss_download_annon\",\n args,\n \"Failed to download anonymously\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n content: result.textContent || \"\",\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n content: \"\",\n errorMessage: `Failed to download anonymously: ${error}`,\n };\n }\n }\n}\n","import { APIError } from \"../exceptions\";\nimport { Session } from \"../session\";\nimport { CallMcpToolRequest } from \"../api/models/model\";\nimport { log, logError } from \"../utils/logger\";\nimport {\n extractRequestId,\n UIElementListResult,\n BoolResult,\n OperationResult,\n} from \"../types/api-response\";\n\n/**\n * Interface representing a UI element in the UI hierarchy\n */\nexport interface UIElement {\n bounds: string;\n className: string;\n text: string;\n type: string;\n resourceId: string;\n index: number;\n isParent: boolean;\n children?: UIElement[];\n}\n\n/**\n * Result object for a CallMcpTool operation\n */\ninterface CallMcpToolResult {\n data: Record<string, any>;\n content?: any[];\n textContent?: string;\n isError: boolean;\n errorMsg?: string;\n statusCode: number;\n requestId?: string;\n}\n\n/**\n * KeyCode constants for mobile device input\n */\nexport const KeyCode = {\n HOME: 3,\n BACK: 4,\n VOLUME_UP: 24,\n VOLUME_DOWN: 25,\n POWER: 26,\n MENU: 82,\n};\n\n/**\n * UI handles UI operations in the AgentBay cloud environment.\n */\nexport class UI {\n private session: Session;\n\n /**\n * Initialize a UI object.\n *\n * @param session - The Session instance that this UI belongs to.\n */\n constructor(session: Session) {\n this.session = session;\n }\n\n /**\n * Helper method to call MCP tools and handle common response processing\n *\n * @param toolName - Name of the MCP tool to call\n * @param args - Arguments to pass to the tool\n * @param defaultErrorMsg - Default error message if specific error details are not available\n * @returns A CallMcpToolResult with the response data\n * @throws APIError if the call fails\n */\n private async callMcpTool(\n toolName: string,\n args: Record<string, any>,\n defaultErrorMsg: string\n ): Promise<CallMcpToolResult> {\n try {\n const argsJSON = JSON.stringify(args);\n const callToolRequest = new CallMcpToolRequest({\n authorization: `Bearer ${this.session.getAPIKey()}`,\n sessionId: this.session.getSessionId(),\n name: toolName,\n args: argsJSON,\n });\n\n // Log API request\n log(`API Call: CallMcpTool - ${toolName}`);\n log(\n `Request: SessionId=${this.session.getSessionId()}, Args=${argsJSON}`\n );\n\n const response = await this.session\n .getClient()\n .callMcpTool(callToolRequest);\n\n // Log API response\n log(`Response from CallMcpTool - ${toolName}:`, response.body);\n\n if (!response.body?.data) {\n throw new Error(\"Invalid response data format\");\n }\n\n // Extract data from response\n const data = response.body.data as Record<string, any>;\n\n // Create result object\n const result: CallMcpToolResult = {\n data,\n statusCode: response.statusCode || 0,\n isError: false,\n requestId: extractRequestId(response),\n };\n\n // Check if there's an error in the response\n if (data.isError === true) {\n result.isError = true;\n\n // Try to extract the error message from the content field\n const contentArray = data.content as any[] | undefined;\n if (contentArray && contentArray.length > 0) {\n result.content = contentArray;\n\n // Extract error message from the first content item\n if (contentArray[0]?.text) {\n result.errorMsg = contentArray[0].text;\n throw new Error(contentArray[0].text);\n }\n }\n throw new Error(defaultErrorMsg);\n }\n\n // Extract content array if it exists\n if (Array.isArray(data.content)) {\n result.content = data.content;\n\n // Extract textContent from content items\n if (result.content.length > 0) {\n const textParts: string[] = [];\n for (const item of result.content) {\n if (\n item &&\n typeof item === \"object\" &&\n item.text &&\n typeof item.text === \"string\"\n ) {\n textParts.push(item.text);\n }\n }\n result.textContent = textParts.join(\"\\n\");\n }\n }\n\n return result;\n } catch (error) {\n logError(`Error calling CallMcpTool - ${toolName}:`, error);\n throw new APIError(`Failed to call ${toolName}: ${error}`);\n }\n }\n\n /**\n * Retrieves all clickable UI elements within the specified timeout.\n * Corresponds to Python's get_clickable_ui_elements() method\n *\n * @param timeoutMs - The timeout in milliseconds. Default is 2000ms.\n * @returns UIElementListResult with clickable UI elements and requestId\n */\n async getClickableUIElements(timeoutMs = 2000): Promise<UIElementListResult> {\n try {\n const args = {\n timeout_ms: timeoutMs,\n };\n\n const result = await this.callMcpTool(\n \"get_clickable_ui_elements\",\n args,\n \"Failed to get clickable UI elements\"\n );\n\n let elements: UIElement[] = [];\n if (result.textContent) {\n try {\n elements = JSON.parse(result.textContent) as UIElement[];\n } catch (error) {\n return {\n requestId: result.requestId || \"\",\n success: false,\n elements: [],\n errorMessage: `Failed to parse clickable UI elements: ${error}`,\n };\n }\n }\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n elements,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n elements: [],\n errorMessage: `Failed to get clickable UI elements: ${error}`,\n };\n }\n }\n\n /**\n * Retrieves all UI elements within the specified timeout.\n * Corresponds to Python's get_all_ui_elements() method\n *\n * @param timeoutMs - The timeout in milliseconds. Default is 2000ms.\n * @returns UIElementListResult with all UI elements and requestId\n */\n async getAllUIElements(timeoutMs = 2000): Promise<UIElementListResult> {\n try {\n const args = {\n timeout_ms: timeoutMs,\n };\n\n const result = await this.callMcpTool(\n \"get_all_ui_elements\",\n args,\n \"Failed to get all UI elements\"\n );\n\n let elements: UIElement[] = [];\n if (result.textContent) {\n try {\n elements = JSON.parse(result.textContent) as UIElement[];\n } catch (error) {\n return {\n requestId: result.requestId || \"\",\n success: false,\n elements: [],\n errorMessage: `Failed to parse all UI elements: ${error}`,\n };\n }\n }\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n elements,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n elements: [],\n errorMessage: `Failed to get all UI elements: ${error}`,\n };\n }\n }\n\n /**\n * Sends a key press event.\n * Corresponds to Python's send_key() method\n *\n * @param key - The key code to send.\n * @returns BoolResult with key press result and requestId\n */\n async sendKey(key: number): Promise<BoolResult> {\n try {\n const args = {\n key,\n };\n\n const result = await this.callMcpTool(\n \"send_key\",\n args,\n \"Failed to send key\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to send key: ${error}`,\n };\n }\n }\n\n /**\n * Inputs text into the active field.\n * Corresponds to Python's input_text() method\n *\n * @param text - The text to input.\n * @returns BoolResult with input result and requestId\n */\n async inputText(text: string): Promise<BoolResult> {\n try {\n const args = {\n text,\n };\n\n const result = await this.callMcpTool(\n \"input_text\",\n args,\n \"Failed to input text\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to input text: ${error}`,\n };\n }\n }\n\n /**\n * Performs a swipe gesture on the screen.\n * Corresponds to Python's swipe() method\n *\n * @param startX - The starting X coordinate.\n * @param startY - The starting Y coordinate.\n * @param endX - The ending X coordinate.\n * @param endY - The ending Y coordinate.\n * @param durationMs - The duration of the swipe in milliseconds. Default is 300ms.\n * @returns BoolResult with swipe result and requestId\n */\n async swipe(\n startX: number,\n startY: number,\n endX: number,\n endY: number,\n durationMs = 300\n ): Promise<BoolResult> {\n try {\n const args = {\n start_x: startX,\n start_y: startY,\n end_x: endX,\n end_y: endY,\n duration_ms: durationMs,\n };\n\n const result = await this.callMcpTool(\n \"swipe\",\n args,\n \"Failed to perform swipe\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to perform swipe: ${error}`,\n };\n }\n }\n\n /**\n * Performs a click at the specified coordinates.\n * Corresponds to Python's click() method\n *\n * @param x - The X coordinate.\n * @param y - The Y coordinate.\n * @param button - The mouse button to click. Default is 'left'.\n * @returns BoolResult with click result and requestId\n */\n async click(x: number, y: number, button = \"left\"): Promise<BoolResult> {\n try {\n const args = {\n x,\n y,\n button,\n };\n\n const result = await this.callMcpTool(\n \"click\",\n args,\n \"Failed to perform click\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to perform click: ${error}`,\n };\n }\n }\n\n /**\n * Takes a screenshot of the current screen.\n * Corresponds to Python's screenshot() method\n *\n * @returns OperationResult with screenshot data and requestId\n */\n async screenshot(): Promise<OperationResult> {\n try {\n const args = {};\n\n const result = await this.callMcpTool(\n \"system_screenshot\",\n args,\n \"Failed to take screenshot\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n data: result.textContent || \"\",\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to take screenshot: ${error}`,\n };\n }\n }\n}\n","import { CallMcpToolRequest } from \"../api/models/CallMcpToolRequest\";\nimport { log, logError } from \"../utils/logger\";\nimport { APIError } from \"../exceptions\";\nimport {\n extractRequestId,\n WindowListResult,\n WindowInfoResult,\n BoolResult,\n} from \"../types/api-response\";\n\n/**\n * Result object for a CallMcpTool operation\n */\ninterface CallMcpToolResult {\n data: Record<string, any>;\n content?: any[];\n textContent?: string;\n isError: boolean;\n errorMsg?: string;\n statusCode: number;\n requestId?: string;\n}\n\n/**\n * Represents a window in the system.\n */\nexport interface Window {\n window_id: number;\n title: string;\n absolute_upper_left_x?: number;\n absolute_upper_left_y?: number;\n width?: number;\n height?: number;\n pid?: number;\n pname?: string;\n child_windows?: Window[];\n}\n\n/**\n * Handles window management operations in the AgentBay cloud environment.\n */\nexport class WindowManager {\n private session: {\n getAPIKey(): string;\n getClient(): any;\n getSessionId(): string;\n };\n\n /**\n * Creates a new WindowManager instance.\n * @param session The session object that provides access to the AgentBay API.\n */\n constructor(session: {\n getAPIKey(): string;\n getClient(): any;\n getSessionId(): string;\n }) {\n this.session = session;\n }\n\n /**\n * Helper method to call MCP tools and handle common response processing\n *\n * @param toolName - Name of the MCP tool to call\n * @param args - Arguments to pass to the tool\n * @param defaultErrorMsg - Default error message if specific error details are not available\n * @returns A CallMcpToolResult with the response data\n * @throws APIError if the call fails\n */\n private async callMcpTool(\n toolName: string,\n args: Record<string, any>,\n defaultErrorMsg: string\n ): Promise<CallMcpToolResult> {\n try {\n const argsJSON = JSON.stringify(args);\n const request = new CallMcpToolRequest({\n authorization: `Bearer ${this.session.getAPIKey()}`,\n sessionId: this.session.getSessionId(),\n name: toolName,\n args: argsJSON,\n });\n\n // Log API request\n log(`API Call: CallMcpTool - ${toolName}`);\n log(`Request: SessionId=${request.sessionId}, Args=${request.args}`);\n\n const response = await this.session.getClient().callMcpTool(request);\n\n // Log API response\n if (response && response.body) {\n log(`Response from CallMcpTool - ${toolName}:`, response.body);\n }\n\n // Extract data from response\n if (!response.body?.data) {\n throw new Error(\"Invalid response data format\");\n }\n\n const data = response.body.data as Record<string, any>;\n\n // Create result object\n const result: CallMcpToolResult = {\n data,\n statusCode: response.statusCode || 0,\n isError: false,\n requestId: extractRequestId(response),\n };\n\n // Check if there's an error in the response\n if (data.isError === true) {\n result.isError = true;\n\n // Try to extract the error message from the content field\n const contentArray = data.content as any[] | undefined;\n if (contentArray && contentArray.length > 0) {\n result.content = contentArray;\n\n // Extract error message from the first content item\n if (contentArray[0]?.text) {\n result.errorMsg = contentArray[0].text;\n throw new Error(contentArray[0].text);\n }\n }\n throw new Error(defaultErrorMsg);\n }\n\n // Extract content array if it exists\n if (Array.isArray(data.content)) {\n result.content = data.content;\n\n // Extract textContent from content items\n if (result.content.length > 0) {\n const textParts: string[] = [];\n for (const item of result.content) {\n if (\n item &&\n typeof item === \"object\" &&\n item.text &&\n typeof item.text === \"string\"\n ) {\n textParts.push(item.text);\n }\n }\n result.textContent = textParts.join(\"\\n\");\n }\n }\n\n return result;\n } catch (error) {\n logError(`Error calling CallMcpTool - ${toolName}:`, error);\n throw new APIError(`Failed to call ${toolName}: ${error}`);\n }\n }\n\n /**\n * Helper method to parse JSON string into Window objects\n * @param jsonStr - JSON string to parse\n * @returns Array of Window objects or single Window object\n */\n private parseWindowsFromJSON(jsonStr: string): Window[] {\n try {\n const parsed = JSON.parse(jsonStr);\n return Array.isArray(parsed) ? parsed : [parsed];\n } catch (error) {\n throw new Error(`Failed to parse window data: ${error}`);\n }\n }\n\n /**\n * Lists all root windows in the system.\n * Corresponds to Python's list_root_windows() method\n *\n * @param timeoutMs - The timeout in milliseconds. Default is 3000ms.\n * @returns WindowListResult with windows array and requestId\n */\n async listRootWindows(timeoutMs = 3000): Promise<WindowListResult> {\n try {\n const args = {\n timeout_ms: timeoutMs,\n };\n\n const result = await this.callMcpTool(\n \"list_root_windows\",\n args,\n \"Failed to list root windows\"\n );\n\n const windows = result.textContent\n ? this.parseWindowsFromJSON(result.textContent)\n : [];\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n windows,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n windows: [],\n errorMessage: `Failed to list root windows: ${error}`,\n };\n }\n }\n\n /**\n * Gets the currently active window.\n * Corresponds to Python's get_active_window() method\n *\n * @param timeoutMs - The timeout in milliseconds. Default is 3000ms.\n * @returns WindowInfoResult with active window data and requestId\n */\n async getActiveWindow(timeoutMs = 3000): Promise<WindowInfoResult> {\n try {\n const args = {\n timeout_ms: timeoutMs,\n };\n\n const result = await this.callMcpTool(\n \"get_active_window\",\n args,\n \"Failed to get active window\"\n );\n\n let activeWindow: Window | undefined = undefined;\n if (result.textContent) {\n const windows = this.parseWindowsFromJSON(result.textContent);\n activeWindow = windows.length > 0 ? windows[0] : undefined;\n }\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n window: activeWindow,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to get active window: ${error}`,\n };\n }\n }\n\n /**\n * Activates a window by ID.\n * Corresponds to Python's activate_window() method\n *\n * @param windowId The ID of the window to activate.\n * @returns BoolResult with requestId\n */\n async activateWindow(windowId: number): Promise<BoolResult> {\n try {\n const args = {\n window_id: windowId,\n };\n\n const result = await this.callMcpTool(\n \"activate_window\",\n args,\n \"Failed to activate window\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to activate window: ${error}`,\n };\n }\n }\n\n /**\n * Maximizes a window by ID.\n * Corresponds to Python's maximize_window() method\n *\n * @param windowId The ID of the window to maximize.\n * @returns BoolResult with requestId\n */\n async maximizeWindow(windowId: number): Promise<BoolResult> {\n try {\n const args = {\n window_id: windowId,\n };\n\n const result = await this.callMcpTool(\n \"maximize_window\",\n args,\n \"Failed to maximize window\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to maximize window: ${error}`,\n };\n }\n }\n\n /**\n * Minimizes a window by ID.\n * Corresponds to Python's minimize_window() method\n *\n * @param windowId The ID of the window to minimize.\n * @returns BoolResult with requestId\n */\n async minimizeWindow(windowId: number): Promise<BoolResult> {\n try {\n const args = {\n window_id: windowId,\n };\n\n const result = await this.callMcpTool(\n \"minimize_window\",\n args,\n \"Failed to minimize window\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to minimize window: ${error}`,\n };\n }\n }\n\n /**\n * Restores a window by ID.\n * Corresponds to Python's restore_window() method\n *\n * @param windowId The ID of the window to restore.\n * @returns BoolResult with requestId\n */\n async restoreWindow(windowId: number): Promise<BoolResult> {\n try {\n const args = {\n window_id: windowId,\n };\n\n const result = await this.callMcpTool(\n \"restore_window\",\n args,\n \"Failed to restore window\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to restore window: ${error}`,\n };\n }\n }\n\n /**\n * Closes a window by ID.\n * Corresponds to Python's close_window() method\n *\n * @param windowId The ID of the window to close.\n * @returns BoolResult with requestId\n */\n async closeWindow(windowId: number): Promise<BoolResult> {\n try {\n const args = {\n window_id: windowId,\n };\n\n const result = await this.callMcpTool(\n \"close_window\",\n args,\n \"Failed to close window\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to close window: ${error}`,\n };\n }\n }\n\n /**\n * Sets a window to fullscreen by ID.\n * Corresponds to Python's fullscreen_window() method\n *\n * @param windowId The ID of the window to set to fullscreen.\n * @returns BoolResult with requestId\n */\n async fullscreenWindow(windowId: number): Promise<BoolResult> {\n try {\n const args = {\n window_id: windowId,\n };\n\n const result = await this.callMcpTool(\n \"fullscreen_window\",\n args,\n \"Failed to set window to fullscreen\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to make window fullscreen: ${error}`,\n };\n }\n }\n\n /**\n * Resizes a window by ID.\n * Corresponds to Python's resize_window() method\n *\n * @param windowId The ID of the window to resize.\n * @param width The new width of the window.\n * @param height The new height of the window.\n * @returns BoolResult with requestId\n */\n async resizeWindow(\n windowId: number,\n width: number,\n height: number\n ): Promise<BoolResult> {\n try {\n const args = {\n window_id: windowId,\n width,\n height,\n };\n\n const result = await this.callMcpTool(\n \"resize_window\",\n args,\n \"Failed to resize window\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to resize window: ${error}`,\n };\n }\n }\n\n /**\n * Enables or disables focus mode.\n * Corresponds to Python's focus_mode() method\n *\n * @param on Whether to enable focus mode.\n * @returns BoolResult with requestId\n */\n async focusMode(on: boolean): Promise<BoolResult> {\n try {\n const args = {\n on,\n };\n\n const result = await this.callMcpTool(\n \"focus_mode\",\n args,\n \"Failed to set focus mode\"\n );\n\n return {\n requestId: result.requestId || \"\",\n success: true,\n data: true,\n };\n } catch (error) {\n return {\n requestId: \"\",\n success: false,\n errorMessage: `Failed to toggle focus mode: ${error}`,\n };\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,UAAU;AACjB,SAAS,qBAAqB;AAF9B;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA,MACE,MAAQ;AAAA,MACR,SAAW;AAAA,MACX,aAAe;AAAA,MACf,MAAQ;AAAA,MACR,OAAS;AAAA,MACT,SAAW;AAAA,QACT,KAAK;AAAA,UACH,OAAS;AAAA,UACT,SAAW;AAAA,UACX,SAAW;AAAA,QACb;AAAA,QACA,YAAY;AAAA,QACZ,eAAe;AAAA,QACf,qBAAqB;AAAA,QACrB,wBAAwB;AAAA,QACxB,qBAAqB;AAAA,QACrB,wBAAwB;AAAA,QACxB,kBAAkB;AAAA,MACpB;AAAA,MACA,SAAW;AAAA,QACT,aAAa;AAAA,QACb,MAAQ;AAAA,QACR,SAAW;AAAA,QACX,MAAQ;AAAA,QACR,iBAAiB;AAAA,QACjB,YAAc;AAAA,QACd,SAAW;AAAA,MACb;AAAA,MACA,YAAc;AAAA,QACZ,MAAQ;AAAA,QACR,KAAO;AAAA,MACT;AAAA,MACA,UAAY;AAAA,MACZ,SAAW;AAAA,MACX,UAAY;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACA,gBAAkB;AAAA,MAClB,SAAW;AAAA,MACX,iBAAmB;AAAA,QACjB,eAAe;AAAA,QACf,SAAW;AAAA,QACX,OAAS;AAAA,QACT,UAAY;AAAA,QACZ,oBAAoB;AAAA,QACpB,KAAO;AAAA,QACP,YAAc;AAAA,MAChB;AAAA,MACA,SAAW;AAAA,QACT,MAAQ;AAAA,MACV;AAAA,MACA,SAAW;AAAA,QACT,IAAM;AAAA,MACR;AAAA,IACF;AAAA;AAAA;;;AC7DA;AAAA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WAAW,OAAO;AAAA,cACtC;AACA,uBAAS,KAAK,OAAO;AAAA,YACvB;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAGA,aAAO;AAAA,QACL;AAAA,QACA,SAAS;AAAA,QACT,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF,SAAS,OAAO;AACd,eAAS,+BAA+B,KAAK;AAC7C,aAAO;AAAA,QACL,WAAW;AAAA,QACX,SAAS;AAAA,QACT,MAAM,CAAC;AAAA,QACP,cAAc,sCAAsC,KAAK;AAAA,MAC3D;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,OAAO,SAAyC;AACpD,QAAI;AAEF,YAAM,eAAe,MAAM,QAAQ,OAAO;AAE1C,WAAK,SAAS,OAAO,QAAQ,SAAS;AAGtC,aAAO;AAAA,IACT,SAAS,OAAO;AACd,eAAS,2BAA2B,KAAK;AACzC,aAAO;AAAA,QACL,WAAW;AAAA,QACX,SAAS;AAAA,QACT,cAAc,4BAA4B,QAAQ,SAAS,KAAK,KAAK;AAAA,MACvE;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA,EAMO,cAAc,WAAyB;AAC5C,SAAK,SAAS,OAAO,SAAS;AAAA,EAChC;AAAA;AAAA,EAGA,YAAoB;AAClB,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,YAAoB;AAClB,WAAO,KAAK;AAAA,EACd;AACF;AA3WsB;AAAf,IAAM,WAAN;","names":["fs","path","parse","$OpenApiUtil","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","$dara","path","context","path","data","path","path","$OpenApiUtil"]}