@e2b/n8n-nodes-e2b 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +51 -0
- package/dist/credentials/E2BApi.credentials.d.ts +13 -0
- package/dist/credentials/E2BApi.credentials.js +58 -0
- package/dist/credentials/E2BApi.credentials.js.map +1 -0
- package/dist/credentials/e2b.dark.svg +1 -0
- package/dist/credentials/e2b.svg +1 -0
- package/dist/nodes/E2B/E2b.node.d.ts +5 -0
- package/dist/nodes/E2B/E2b.node.js +2901 -0
- package/dist/nodes/E2B/E2b.node.js.map +7 -0
- package/dist/nodes/E2B/E2b.node.json +20 -0
- package/dist/nodes/E2B/actions/code.operations.d.ts +8 -0
- package/dist/nodes/E2B/actions/code.operations.js +67 -0
- package/dist/nodes/E2B/actions/code.operations.js.map +1 -0
- package/dist/nodes/E2B/actions/file.operations.d.ts +95 -0
- package/dist/nodes/E2B/actions/file.operations.js +183 -0
- package/dist/nodes/E2B/actions/file.operations.js.map +1 -0
- package/dist/nodes/E2B/actions/git.operations.d.ts +48 -0
- package/dist/nodes/E2B/actions/git.operations.js +554 -0
- package/dist/nodes/E2B/actions/git.operations.js.map +1 -0
- package/dist/nodes/E2B/actions/index.d.ts +2 -0
- package/dist/nodes/E2B/actions/index.js +95 -0
- package/dist/nodes/E2B/actions/index.js.map +1 -0
- package/dist/nodes/E2B/actions/sandbox.operations.d.ts +48 -0
- package/dist/nodes/E2B/actions/sandbox.operations.js +93 -0
- package/dist/nodes/E2B/actions/sandbox.operations.js.map +1 -0
- package/dist/nodes/E2B/actions/snapshot.operations.d.ts +22 -0
- package/dist/nodes/E2B/actions/snapshot.operations.js +46 -0
- package/dist/nodes/E2B/actions/snapshot.operations.js.map +1 -0
- package/dist/nodes/E2B/actions/volume.operations.d.ts +28 -0
- package/dist/nodes/E2B/actions/volume.operations.js +57 -0
- package/dist/nodes/E2B/actions/volume.operations.js.map +1 -0
- package/dist/nodes/E2B/client.d.ts +97 -0
- package/dist/nodes/E2B/client.js +546 -0
- package/dist/nodes/E2B/client.js.map +1 -0
- package/dist/nodes/E2B/e2b.dark.svg +1 -0
- package/dist/nodes/E2B/e2b.svg +1 -0
- package/dist/nodes/E2B/helpers.d.ts +22 -0
- package/dist/nodes/E2B/helpers.js +224 -0
- package/dist/nodes/E2B/helpers.js.map +1 -0
- package/dist/nodes/E2B/types.d.ts +21 -0
- package/dist/nodes/E2B/types.js +21 -0
- package/dist/nodes/E2B/types.js.map +1 -0
- package/package.json +70 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../nodes/E2B/client.ts", "../../../nodes/E2B/helpers.ts", "../../../nodes/E2B/actions/code.operations.ts", "../../../nodes/E2B/actions/file.operations.ts", "../../../nodes/E2B/actions/git.operations.ts", "../../../nodes/E2B/actions/sandbox.operations.ts", "../../../nodes/E2B/actions/snapshot.operations.ts", "../../../nodes/E2B/actions/volume.operations.ts", "../../../nodes/E2B/actions/index.ts", "../../../nodes/E2B/types.ts", "../../../nodes/E2B/E2b.node.ts"],
|
|
4
|
+
"sourcesContent": ["import type {\n\tICredentialDataDecryptedObject,\n\tIDataObject,\n\tIExecuteFunctions,\n\tIHttpRequestMethods,\n\tIHttpRequestOptions,\n\tJsonObject,\n} from 'n8n-workflow';\nimport { NodeApiError } from 'n8n-workflow';\n\nconst CREDENTIAL_TYPE = 'e2bApi';\nconst DEFAULT_DOMAIN = 'e2b.app';\nconst DEFAULT_API_URL = `https://api.${DEFAULT_DOMAIN}`;\nconst DEFAULT_SANDBOX_TIMEOUT_MS = 300_000;\nconst ENVD_PORT = 49983;\nconst ENVD_DEFAULT_USER = '0.4.0';\nconst SUPPORTED_SANDBOX_DOMAINS = new Set(['e2b.app', 'e2b.dev', 'e2b.pro', 'e2b-staging.dev']);\nconst CONNECT_PROTOCOL_VERSION = '1';\nconst CONNECT_END_STREAM_FLAG = 0b00000010;\nconst CONNECT_COMPRESSED_FLAG = 0b00000001;\n\nexport interface E2BConnection {\n\texecuteFunctions: IExecuteFunctions;\n\tcredentials: ICredentialDataDecryptedObject;\n\ttimeoutMs: number;\n}\n\nexport interface SandboxCreateOptions {\n\ttemplate?: string;\n\tmetadata?: Record<string, string>;\n\tenvs?: Record<string, string>;\n\tvolumeMounts?: Record<string, string>;\n\tallowInternetAccess: boolean;\n\ttimeoutMs: number;\n}\n\nexport interface SandboxInfo {\n\tsandboxId: string;\n\ttemplateId: string;\n\tname?: string;\n\tmetadata: Record<string, string>;\n\tstartedAt?: string;\n\tendAt?: string;\n\tstate?: string;\n\tcpuCount?: number;\n\tmemoryMB?: number;\n\tenvdVersion?: string;\n\tallowInternetAccess?: boolean;\n\tnetwork?: IDataObject;\n\tlifecycle?: IDataObject;\n\tvolumeMounts?: IDataObject[];\n\tsandboxDomain?: string;\n}\n\nexport interface ConnectedSandbox {\n\tsandboxId: string;\n\tsandboxDomain?: string;\n\tenvdVersion: string;\n\tenvdAccessToken?: string;\n\ttrafficAccessToken?: string;\n}\n\nexport interface SnapshotInfo {\n\tsnapshotId: string;\n\tnames: string[];\n}\n\nexport interface VolumeInfo {\n\tvolumeId: string;\n\tname: string;\n\ttoken?: string;\n}\n\nexport interface FileInfo {\n\tname: string;\n\ttype?: 'file' | 'dir';\n\tpath: string;\n\tmetadata?: Record<string, string>;\n\tsize?: number;\n\tmode?: number;\n\tpermissions?: string;\n\towner?: string;\n\tgroup?: string;\n\tmodifiedTime?: string;\n\tsymlinkTarget?: string;\n}\n\nexport interface WriteInfo {\n\tname: string;\n\ttype?: 'file' | 'dir';\n\tpath: string;\n\tmetadata?: Record<string, string>;\n}\n\nexport interface CommandResult {\n\texitCode: number;\n\terror?: string;\n\tstdout: string;\n\tstderr: string;\n}\n\ninterface FullResponse {\n\tstatusCode?: number;\n\tstatus?: number;\n\theaders?: IDataObject;\n\tbody?: unknown;\n}\n\ninterface ApiRequestOptions {\n\tbody?: IDataObject | IDataObject[] | Buffer | FormData;\n\tqs?: IDataObject;\n\theaders?: IDataObject;\n\tencoding?: IHttpRequestOptions['encoding'];\n\treturnFullResponse?: boolean;\n\tignoreHttpStatusErrors?: boolean;\n}\n\nfunction asRecord(value: unknown): Record<string, unknown> | undefined {\n\tif (typeof value !== 'object' || value === null || Array.isArray(value)) return undefined;\n\treturn Object.fromEntries(Object.entries(value));\n}\n\nfunction asString(value: unknown): string | undefined {\n\treturn typeof value === 'string' && value.trim() !== '' ? value.trim() : undefined;\n}\n\nfunction asNumber(value: unknown): number | undefined {\n\tconst numberValue = typeof value === 'number' ? value : Number(value);\n\treturn Number.isFinite(numberValue) ? numberValue : undefined;\n}\n\nfunction asBoolean(value: unknown): boolean | undefined {\n\treturn typeof value === 'boolean' ? value : undefined;\n}\n\nfunction asStringArray(value: unknown): string[] {\n\treturn Array.isArray(value) ? value.filter((entry): entry is string => typeof entry === 'string') : [];\n}\n\nfunction cleanBaseUrl(url: string): string {\n\treturn url.replace(/\\/+$/, '');\n}\n\nfunction getCredentialString(credentials: ICredentialDataDecryptedObject, key: string): string | undefined {\n\treturn asString(credentials[key]);\n}\n\nfunction getApiBaseUrl(credentials: ICredentialDataDecryptedObject): string {\n\treturn cleanBaseUrl(getCredentialString(credentials, 'apiUrl') ?? DEFAULT_API_URL);\n}\n\nfunction getDomain(credentials: ICredentialDataDecryptedObject): string {\n\treturn getCredentialString(credentials, 'domain') ?? DEFAULT_DOMAIN;\n}\n\nfunction getStatusCode(response: FullResponse): number | undefined {\n\treturn response.statusCode ?? response.status;\n}\n\nfunction toJsonObject(value: unknown, fallbackMessage: string): JsonObject {\n\tconst record = asRecord(value);\n\tif (record) return record as JsonObject;\n\treturn { message: fallbackMessage };\n}\n\nfunction getErrorMessageFromBody(body: unknown, fallback: string): string {\n\tconst record = asRecord(body);\n\tconst message = asString(record?.message);\n\tif (message) return message;\n\tconst error = record?.error;\n\tif (typeof error === 'string') return error;\n\tconst nested = asRecord(error);\n\tconst nestedMessage = asString(nested?.message);\n\treturn nestedMessage ?? fallback;\n}\n\nfunction throwApiResponseError(\n\texecuteFunctions: IExecuteFunctions,\n\tresponse: FullResponse,\n\tfallbackMessage: string,\n): never {\n\tconst statusCode = getStatusCode(response);\n\tconst message = getErrorMessageFromBody(\n\t\tresponse.body,\n\t\tstatusCode ? `${statusCode}: ${fallbackMessage}` : fallbackMessage,\n\t);\n\tthrow new NodeApiError(executeFunctions.getNode(), toJsonObject(response.body, message));\n}\n\nasync function apiRequest<T>(\n\tconnection: E2BConnection,\n\tmethod: IHttpRequestMethods,\n\tendpoint: string,\n\toptions: ApiRequestOptions = {},\n): Promise<T> {\n\tconst requestOptions: IHttpRequestOptions = {\n\t\tmethod,\n\t\turl: `${getApiBaseUrl(connection.credentials)}${endpoint}`,\n\t\theaders: options.headers,\n\t\tqs: options.qs,\n\t\tbody: options.body,\n\t\tencoding: options.encoding,\n\t\treturnFullResponse: options.returnFullResponse,\n\t\tignoreHttpStatusErrors: options.ignoreHttpStatusErrors,\n\t\ttimeout: connection.timeoutMs,\n\t};\n\n\ttry {\n\t\treturn (await connection.executeFunctions.helpers.httpRequestWithAuthentication.call(\n\t\t\tconnection.executeFunctions,\n\t\t\tCREDENTIAL_TYPE,\n\t\t\trequestOptions,\n\t\t)) as T;\n\t} catch (error) {\n\t\tthrow new NodeApiError(connection.executeFunctions.getNode(), toJsonObject(error, 'E2B API request failed'));\n\t}\n}\n\nasync function apiRequestFull(\n\tconnection: E2BConnection,\n\tmethod: IHttpRequestMethods,\n\tendpoint: string,\n\toptions: ApiRequestOptions = {},\n): Promise<FullResponse> {\n\treturn await apiRequest<FullResponse>(connection, method, endpoint, {\n\t\t...options,\n\t\treturnFullResponse: true,\n\t\tignoreHttpStatusErrors: true,\n\t});\n}\n\nfunction mapSandboxInfo(value: unknown): SandboxInfo {\n\tconst record = asRecord(value) ?? {};\n\treturn {\n\t\tsandboxId: asString(record.sandboxID) ?? asString(record.sandboxId) ?? '',\n\t\ttemplateId: asString(record.templateID) ?? asString(record.templateId) ?? '',\n\t\t...(asString(record.alias) ? { name: asString(record.alias) } : {}),\n\t\tmetadata: (asRecord(record.metadata) as Record<string, string> | undefined) ?? {},\n\t\tstartedAt: asString(record.startedAt),\n\t\tendAt: asString(record.endAt),\n\t\tstate: asString(record.state),\n\t\tcpuCount: asNumber(record.cpuCount),\n\t\tmemoryMB: asNumber(record.memoryMB),\n\t\tenvdVersion: asString(record.envdVersion),\n\t\tallowInternetAccess: asBoolean(record.allowInternetAccess),\n\t\tnetwork: asRecord(record.network) as IDataObject | undefined,\n\t\tlifecycle: asRecord(record.lifecycle) as IDataObject | undefined,\n\t\tvolumeMounts: Array.isArray(record.volumeMounts) ? (record.volumeMounts as IDataObject[]) : [],\n\t\tsandboxDomain: asString(record.domain) ?? asString(record.sandboxDomain),\n\t};\n}\n\nfunction mapConnectedSandbox(value: unknown, sandboxId?: string): ConnectedSandbox {\n\tconst record = asRecord(value) ?? {};\n\treturn {\n\t\tsandboxId: asString(record.sandboxID) ?? asString(record.sandboxId) ?? sandboxId ?? '',\n\t\tsandboxDomain: asString(record.domain) ?? asString(record.sandboxDomain),\n\t\tenvdVersion: asString(record.envdVersion) ?? '0.0.0',\n\t\tenvdAccessToken: asString(record.envdAccessToken),\n\t\ttrafficAccessToken: asString(record.trafficAccessToken),\n\t};\n}\n\nfunction mapSnapshot(value: unknown): SnapshotInfo {\n\tconst record = asRecord(value) ?? {};\n\treturn {\n\t\tsnapshotId: asString(record.snapshotID) ?? asString(record.snapshotId) ?? '',\n\t\tnames: asStringArray(record.names),\n\t};\n}\n\nfunction mapVolume(value: unknown): VolumeInfo {\n\tconst record = asRecord(value) ?? {};\n\treturn {\n\t\tvolumeId: asString(record.volumeID) ?? asString(record.volumeId) ?? '',\n\t\tname: asString(record.name) ?? '',\n\t\ttoken: asString(record.token),\n\t};\n}\n\nfunction timeoutToSeconds(timeoutMs: number): number {\n\treturn Math.round(timeoutMs / 1000);\n}\n\nexport async function createSandbox(\n\tconnection: E2BConnection,\n\toptions: SandboxCreateOptions,\n): Promise<ConnectedSandbox> {\n\tconst body: IDataObject = {\n\t\ttemplateID: options.template ?? 'base',\n\t\tmetadata: options.metadata,\n\t\tenvVars: options.envs,\n\t\ttimeout: timeoutToSeconds(options.timeoutMs),\n\t\tsecure: true,\n\t\tallow_internet_access: options.allowInternetAccess,\n\t};\n\n\tif (options.volumeMounts) {\n\t\tbody.volumeMounts = Object.entries(options.volumeMounts).map(([path, name]) => ({ name, path }));\n\t}\n\n\tconst response = await apiRequest<unknown>(connection, 'POST', '/sandboxes', { body });\n\treturn mapConnectedSandbox(response);\n}\n\nexport async function connectSandbox(connection: E2BConnection, sandboxId: string): Promise<ConnectedSandbox> {\n\tconst response = await apiRequest<unknown>(connection, 'POST', `/sandboxes/${encodeURIComponent(sandboxId)}/connect`, {\n\t\tbody: {\n\t\t\ttimeout: timeoutToSeconds(DEFAULT_SANDBOX_TIMEOUT_MS),\n\t\t},\n\t});\n\treturn mapConnectedSandbox(response, sandboxId);\n}\n\nexport async function getSandboxInfo(connection: E2BConnection, sandboxId: string): Promise<SandboxInfo> {\n\tconst response = await apiRequest<unknown>(connection, 'GET', `/sandboxes/${encodeURIComponent(sandboxId)}`);\n\treturn mapSandboxInfo(response);\n}\n\nexport async function listSandboxes(connection: E2BConnection, limit: number): Promise<SandboxInfo[]> {\n\tconst response = await apiRequest<unknown>(connection, 'GET', '/v2/sandboxes', { qs: { limit } });\n\treturn Array.isArray(response) ? response.map(mapSandboxInfo) : [];\n}\n\nexport async function killSandbox(connection: E2BConnection, sandboxId: string): Promise<boolean> {\n\tconst response = await apiRequestFull(connection, 'DELETE', `/sandboxes/${encodeURIComponent(sandboxId)}`);\n\tconst statusCode = getStatusCode(response);\n\tif (statusCode === 404) return false;\n\tif (statusCode && statusCode >= 400) throwApiResponseError(connection.executeFunctions, response, 'Failed to kill sandbox');\n\treturn true;\n}\n\nexport async function pauseSandbox(connection: E2BConnection, sandboxId: string): Promise<boolean> {\n\tconst response = await apiRequestFull(connection, 'POST', `/sandboxes/${encodeURIComponent(sandboxId)}/pause`, {\n\t\tbody: { memory: true },\n\t});\n\tconst statusCode = getStatusCode(response);\n\tif (statusCode === 409) return false;\n\tif (statusCode && statusCode >= 400) throwApiResponseError(connection.executeFunctions, response, 'Failed to pause sandbox');\n\treturn true;\n}\n\nexport async function createSnapshot(\n\tconnection: E2BConnection,\n\tsandboxId: string,\n\tname?: string,\n): Promise<SnapshotInfo> {\n\tconst response = await apiRequest<unknown>(connection, 'POST', `/sandboxes/${encodeURIComponent(sandboxId)}/snapshots`, {\n\t\tbody: name ? { name } : {},\n\t});\n\treturn mapSnapshot(response);\n}\n\nexport async function listSnapshots(\n\tconnection: E2BConnection,\n\tlimit: number,\n\tsandboxId?: string,\n): Promise<SnapshotInfo[]> {\n\tconst response = await apiRequest<unknown>(connection, 'GET', '/snapshots', {\n\t\tqs: {\n\t\t\tlimit,\n\t\t\t...(sandboxId ? { sandboxID: sandboxId } : {}),\n\t\t},\n\t});\n\treturn Array.isArray(response) ? response.map(mapSnapshot) : [];\n}\n\nexport async function deleteSnapshot(connection: E2BConnection, snapshotId: string): Promise<boolean> {\n\tconst response = await apiRequestFull(connection, 'DELETE', `/templates/${encodeURIComponent(snapshotId)}`);\n\tconst statusCode = getStatusCode(response);\n\tif (statusCode === 404) return false;\n\tif (statusCode && statusCode >= 400) throwApiResponseError(connection.executeFunctions, response, 'Failed to delete snapshot');\n\treturn true;\n}\n\nexport async function createVolume(connection: E2BConnection, name: string): Promise<VolumeInfo> {\n\tconst response = await apiRequest<unknown>(connection, 'POST', '/volumes', { body: { name } });\n\treturn mapVolume(response);\n}\n\nexport async function getVolume(connection: E2BConnection, volumeId: string): Promise<VolumeInfo> {\n\tconst response = await apiRequest<unknown>(connection, 'GET', `/volumes/${encodeURIComponent(volumeId)}`);\n\treturn mapVolume(response);\n}\n\nexport async function listVolumes(connection: E2BConnection): Promise<VolumeInfo[]> {\n\tconst response = await apiRequest<unknown>(connection, 'GET', '/volumes');\n\treturn Array.isArray(response) ? response.map(mapVolume) : [];\n}\n\nexport async function deleteVolume(connection: E2BConnection, volumeId: string): Promise<boolean> {\n\tconst response = await apiRequestFull(connection, 'DELETE', `/volumes/${encodeURIComponent(volumeId)}`);\n\tconst statusCode = getStatusCode(response);\n\tif (statusCode === 404) return false;\n\tif (statusCode && statusCode >= 400) throwApiResponseError(connection.executeFunctions, response, 'Failed to delete volume');\n\treturn true;\n}\n\nfunction getSandboxHost(connection: E2BConnection, sandboxId: string, port: number, sandboxDomain?: string): string {\n\treturn `${port}-${sandboxId}.${sandboxDomain ?? getDomain(connection.credentials)}`;\n}\n\nexport function getPreviewHost(connection: E2BConnection, sandbox: ConnectedSandbox, port: number): string {\n\treturn getSandboxHost(connection, sandbox.sandboxId, port, sandbox.sandboxDomain);\n}\n\nfunction getEnvdBaseUrl(connection: E2BConnection, sandbox: ConnectedSandbox): string {\n\tconst sandboxUrl = getCredentialString(connection.credentials, 'sandboxUrl');\n\tif (sandboxUrl) return cleanBaseUrl(sandboxUrl);\n\n\tconst sandboxDomain = sandbox.sandboxDomain ?? getDomain(connection.credentials);\n\tif (SUPPORTED_SANDBOX_DOMAINS.has(sandboxDomain)) {\n\t\treturn `https://sandbox.${sandboxDomain}`;\n\t}\n\n\treturn `https://${getSandboxHost(connection, sandbox.sandboxId, ENVD_PORT, sandboxDomain)}`;\n}\n\nfunction compareVersion(left: string, right: string): number {\n\tconst leftParts = left.split('.').map((part) => Number.parseInt(part, 10) || 0);\n\tconst rightParts = right.split('.').map((part) => Number.parseInt(part, 10) || 0);\n\tconst length = Math.max(leftParts.length, rightParts.length);\n\tfor (let index = 0; index < length; index++) {\n\t\tconst diff = (leftParts[index] ?? 0) - (rightParts[index] ?? 0);\n\t\tif (diff !== 0) return diff;\n\t}\n\treturn 0;\n}\n\nfunction sandboxHeaders(connection: E2BConnection, sandbox: ConnectedSandbox): IDataObject {\n\tconst headers: IDataObject = {\n\t\t'E2b-Sandbox-Id': sandbox.sandboxId,\n\t\t'E2b-Sandbox-Port': ENVD_PORT.toString(),\n\t};\n\n\tif (sandbox.envdAccessToken) {\n\t\theaders['X-Access-Token'] = sandbox.envdAccessToken;\n\t}\n\n\tif (compareVersion(sandbox.envdVersion, ENVD_DEFAULT_USER) < 0) {\n\t\theaders.Authorization = `Basic ${Buffer.from('user:').toString('base64')}`;\n\t}\n\n\treturn headers;\n}\n\nasync function envdRequest<T>(\n\tconnection: E2BConnection,\n\tsandbox: ConnectedSandbox,\n\tmethod: IHttpRequestMethods,\n\tpath: string,\n\toptions: ApiRequestOptions = {},\n): Promise<T> {\n\tconst requestOptions: IHttpRequestOptions = {\n\t\tmethod,\n\t\turl: `${getEnvdBaseUrl(connection, sandbox)}${path}`,\n\t\theaders: {\n\t\t\t...sandboxHeaders(connection, sandbox),\n\t\t\t...options.headers,\n\t\t},\n\t\tqs: options.qs,\n\t\tbody: options.body,\n\t\tencoding: options.encoding,\n\t\treturnFullResponse: options.returnFullResponse,\n\t\tignoreHttpStatusErrors: options.ignoreHttpStatusErrors,\n\t\ttimeout: connection.timeoutMs,\n\t};\n\n\ttry {\n\t\treturn (await connection.executeFunctions.helpers.httpRequest(requestOptions)) as T;\n\t} catch (error) {\n\t\tthrow new NodeApiError(connection.executeFunctions.getNode(), toJsonObject(error, 'E2B sandbox request failed'));\n\t}\n}\n\nfunction encodeConnectEnvelope(message: IDataObject): Buffer {\n\tconst payload = Buffer.from(JSON.stringify(message), 'utf8');\n\tconst envelope = Buffer.alloc(payload.length + 5);\n\tenvelope.writeUInt8(0, 0);\n\tenvelope.writeUInt32BE(payload.length, 1);\n\tpayload.copy(envelope, 5);\n\treturn envelope;\n}\n\nfunction parseConnectEnvelopes(body: ArrayBuffer | Buffer): IDataObject[] {\n\tconst buffer = Buffer.isBuffer(body) ? body : Buffer.from(body);\n\tconst messages: IDataObject[] = [];\n\tlet offset = 0;\n\n\twhile (offset < buffer.length) {\n\t\tif (offset + 5 > buffer.length) {\n\t\t\tthrow new Error('Incomplete Connect response envelope');\n\t\t}\n\t\tconst flags = buffer.readUInt8(offset);\n\t\tconst length = buffer.readUInt32BE(offset + 1);\n\t\tconst start = offset + 5;\n\t\tconst end = start + length;\n\t\tif (end > buffer.length) {\n\t\t\tthrow new Error('Incomplete Connect response message');\n\t\t}\n\t\tif ((flags & CONNECT_COMPRESSED_FLAG) === CONNECT_COMPRESSED_FLAG) {\n\t\t\tthrow new Error('Compressed Connect responses are not supported');\n\t\t}\n\n\t\tconst json = JSON.parse(buffer.subarray(start, end).toString('utf8')) as unknown;\n\t\tconst record = asRecord(json) ?? {};\n\t\tif ((flags & CONNECT_END_STREAM_FLAG) === CONNECT_END_STREAM_FLAG) {\n\t\t\tconst error = asRecord(record.error);\n\t\t\tif (error) throw new Error(getErrorMessageFromBody(error, 'E2B Connect request failed'));\n\t\t} else {\n\t\t\tmessages.push(record as IDataObject);\n\t\t}\n\t\toffset = end;\n\t}\n\n\treturn messages;\n}\n\nasync function connectUnary<T extends IDataObject>(\n\tconnection: E2BConnection,\n\tsandbox: ConnectedSandbox,\n\tservice: string,\n\tmethod: string,\n\tbody: IDataObject,\n): Promise<T> {\n\tconst response = await envdRequest<FullResponse>(connection, sandbox, 'POST', `/${service}/${method}`, {\n\t\tbody,\n\t\theaders: {\n\t\t\t'Content-Type': 'application/json',\n\t\t\t'Connect-Protocol-Version': CONNECT_PROTOCOL_VERSION,\n\t\t\t'Connect-Timeout-Ms': connection.timeoutMs.toString(),\n\t\t},\n\t\tencoding: 'json',\n\t\treturnFullResponse: true,\n\t\tignoreHttpStatusErrors: true,\n\t});\n\tconst statusCode = getStatusCode(response);\n\tif (statusCode && statusCode >= 400) throwApiResponseError(connection.executeFunctions, response, 'E2B Connect request failed');\n\treturn (asRecord(response.body) ?? {}) as T;\n}\n\nasync function connectStream(\n\tconnection: E2BConnection,\n\tsandbox: ConnectedSandbox,\n\tservice: string,\n\tmethod: string,\n\tbody: IDataObject,\n): Promise<IDataObject[]> {\n\tconst response = await envdRequest<FullResponse>(connection, sandbox, 'POST', `/${service}/${method}`, {\n\t\tbody: encodeConnectEnvelope(body),\n\t\theaders: {\n\t\t\t'Content-Type': 'application/connect+json',\n\t\t\t'Connect-Protocol-Version': CONNECT_PROTOCOL_VERSION,\n\t\t\t'Connect-Timeout-Ms': connection.timeoutMs.toString(),\n\t\t\t'Keepalive-Ping-Interval': '50',\n\t\t},\n\t\tencoding: 'arraybuffer',\n\t\treturnFullResponse: true,\n\t\tignoreHttpStatusErrors: true,\n\t});\n\tconst statusCode = getStatusCode(response);\n\tif (statusCode && statusCode >= 400) throwApiResponseError(connection.executeFunctions, response, 'E2B Connect stream failed');\n\tif (!response.body || !(response.body instanceof ArrayBuffer || Buffer.isBuffer(response.body))) {\n\t\tthrow new Error('Expected E2B Connect stream response body');\n\t}\n\treturn parseConnectEnvelopes(response.body);\n}\n\nfunction mapFileType(value: unknown): 'file' | 'dir' | undefined {\n\tif (value === 1 || value === 'FILE' || value === 'FILE_TYPE_FILE') return 'file';\n\tif (value === 2 || value === 'DIRECTORY' || value === 'FILE_TYPE_DIRECTORY') return 'dir';\n\treturn undefined;\n}\n\nfunction mapFileInfo(value: unknown): FileInfo {\n\tconst record = asRecord(value) ?? {};\n\tconst modifiedTime = record.modifiedTime;\n\treturn {\n\t\tname: asString(record.name) ?? '',\n\t\ttype: mapFileType(record.type),\n\t\tpath: asString(record.path) ?? '',\n\t\tmetadata: asRecord(record.metadata) as Record<string, string> | undefined,\n\t\tsize: asNumber(record.size),\n\t\tmode: asNumber(record.mode),\n\t\tpermissions: asString(record.permissions),\n\t\towner: asString(record.owner),\n\t\tgroup: asString(record.group),\n\t\tmodifiedTime:\n\t\t\ttypeof modifiedTime === 'string'\n\t\t\t\t? modifiedTime\n\t\t\t\t: asString(asRecord(modifiedTime)?.seconds)\n\t\t\t\t\t? new Date(Number(asString(asRecord(modifiedTime)?.seconds)) * 1000).toISOString()\n\t\t\t\t\t: undefined,\n\t\tsymlinkTarget: asString(record.symlinkTarget),\n\t};\n}\n\nfunction mapWriteInfo(value: unknown): WriteInfo {\n\tconst record = asRecord(value) ?? {};\n\treturn {\n\t\tname: asString(record.name) ?? '',\n\t\ttype: mapFileType(record.type),\n\t\tpath: asString(record.path) ?? '',\n\t\tmetadata: asRecord(record.metadata) as Record<string, string> | undefined,\n\t};\n}\n\nfunction parseJsonArray(value: unknown): unknown[] {\n\tif (Array.isArray(value)) return value;\n\tif (typeof value !== 'string') return [];\n\ttry {\n\t\tconst parsed = JSON.parse(value) as unknown;\n\t\treturn Array.isArray(parsed) ? parsed : [];\n\t} catch {\n\t\treturn [];\n\t}\n}\n\nexport async function readSandboxFile(\n\tconnection: E2BConnection,\n\tsandbox: ConnectedSandbox,\n\tpath: string,\n\tformat: 'text' | 'bytes',\n): Promise<string | Buffer> {\n\tconst response = await envdRequest<FullResponse>(connection, sandbox, 'GET', '/files', {\n\t\tqs: { path },\n\t\tencoding: format === 'bytes' ? 'arraybuffer' : 'text',\n\t\treturnFullResponse: true,\n\t\tignoreHttpStatusErrors: true,\n\t});\n\tconst statusCode = getStatusCode(response);\n\tif (statusCode && statusCode >= 400) throwApiResponseError(connection.executeFunctions, response, 'Failed to read sandbox file');\n\tif (format === 'bytes') {\n\t\treturn Buffer.isBuffer(response.body) ? response.body : Buffer.from(response.body as ArrayBuffer);\n\t}\n\treturn typeof response.body === 'string' ? response.body : '';\n}\n\nexport async function writeSandboxFile(\n\tconnection: E2BConnection,\n\tsandbox: ConnectedSandbox,\n\tpath: string,\n\tcontent: string | Buffer,\n): Promise<WriteInfo> {\n\tconst formData = new FormData();\n\tconst blobContent = Buffer.isBuffer(content) ? new Uint8Array(content) : content;\n\tformData.append('file', new Blob([blobContent]), path);\n\n\tconst response = await envdRequest<unknown>(connection, sandbox, 'POST', '/files', {\n\t\tqs: { path },\n\t\tbody: formData,\n\t});\n\tconst files = parseJsonArray(response);\n\tif (files.length === 0) throw new Error('Expected to receive information about written file');\n\treturn mapWriteInfo(files[0]);\n}\n\nexport async function listSandboxFiles(\n\tconnection: E2BConnection,\n\tsandbox: ConnectedSandbox,\n\tpath: string,\n\tdepth: number,\n): Promise<FileInfo[]> {\n\tconst response = await connectUnary<IDataObject>(connection, sandbox, 'filesystem.Filesystem', 'ListDir', { path, depth });\n\tconst entries = Array.isArray(response.entries) ? response.entries : [];\n\treturn entries.map(mapFileInfo).filter((entry) => entry.type !== undefined);\n}\n\nexport async function createSandboxFolder(\n\tconnection: E2BConnection,\n\tsandbox: ConnectedSandbox,\n\tpath: string,\n): Promise<boolean> {\n\tconst response = await connectUnary<IDataObject>(connection, sandbox, 'filesystem.Filesystem', 'MakeDir', { path });\n\treturn Object.keys(response).length >= 0;\n}\n\nexport async function deleteSandboxFile(\n\tconnection: E2BConnection,\n\tsandbox: ConnectedSandbox,\n\tpath: string,\n): Promise<void> {\n\tawait connectUnary<IDataObject>(connection, sandbox, 'filesystem.Filesystem', 'Remove', { path });\n}\n\nexport async function getSandboxFileInfo(\n\tconnection: E2BConnection,\n\tsandbox: ConnectedSandbox,\n\tpath: string,\n): Promise<FileInfo> {\n\tconst response = await connectUnary<IDataObject>(connection, sandbox, 'filesystem.Filesystem', 'Stat', { path });\n\treturn mapFileInfo(response.entry);\n}\n\nexport async function moveSandboxFile(\n\tconnection: E2BConnection,\n\tsandbox: ConnectedSandbox,\n\tsource: string,\n\tdestination: string,\n): Promise<FileInfo> {\n\tconst response = await connectUnary<IDataObject>(connection, sandbox, 'filesystem.Filesystem', 'Move', {\n\t\tsource,\n\t\tdestination,\n\t});\n\treturn mapFileInfo(response.entry);\n}\n\nfunction decodeBase64Text(value: unknown): string {\n\tif (typeof value !== 'string') return '';\n\treturn Buffer.from(value, 'base64').toString('utf8');\n}\n\nfunction mapCommandEvent(message: IDataObject, result: CommandResult): void {\n\tconst event = asRecord(message.event);\n\tif (!event) return;\n\tconst data = asRecord(event.data);\n\tif (data) {\n\t\tresult.stdout += decodeBase64Text(data.stdout);\n\t\tresult.stderr += decodeBase64Text(data.stderr);\n\t\treturn;\n\t}\n\tconst end = asRecord(event.end);\n\tif (end) {\n\t\tresult.exitCode = asNumber(end.exitCode) ?? result.exitCode;\n\t\tresult.error = asString(end.error);\n\t}\n}\n\nexport async function runSandboxCommand(\n\tconnection: E2BConnection,\n\tsandbox: ConnectedSandbox,\n\tcommand: string,\n\toptions: { cwd?: string; envs?: Record<string, string> } = {},\n): Promise<CommandResult> {\n\tconst process: IDataObject = {\n\t\tcmd: '/bin/bash',\n\t\targs: ['-l', '-c', command],\n\t\tenvs: options.envs ?? {},\n\t};\n\tif (options.cwd) process.cwd = options.cwd;\n\n\tconst messages = await connectStream(connection, sandbox, 'process.Process', 'Start', {\n\t\tprocess,\n\t\tstdin: false,\n\t});\n\tconst result: CommandResult = {\n\t\texitCode: 0,\n\t\tstdout: '',\n\t\tstderr: '',\n\t};\n\tfor (const message of messages) {\n\t\tmapCommandEvent(message, result);\n\t}\n\treturn result;\n}\n", "import type { IDataObject, IExecuteFunctions } from 'n8n-workflow';\nimport { NodeOperationError } from 'n8n-workflow';\n\nimport type {\n\tCommandResult,\n\tConnectedSandbox,\n\tFileInfo,\n\tSandboxCreateOptions,\n\tSandboxInfo,\n\tSnapshotInfo,\n\tVolumeInfo,\n\tWriteInfo,\n} from './client';\n\nexport function asNonEmptyString(value: unknown): string | undefined {\n\treturn typeof value === 'string' && value.trim() !== '' ? value.trim() : undefined;\n}\n\nexport function getErrorMessage(error: unknown): string {\n\tif (error instanceof Error) return error.message;\n\treturn String(error);\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n\treturn typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nexport function getCollectionParameter(\n\texecuteFunctions: IExecuteFunctions,\n\tname: string,\n\titemIndex: number,\n): Record<string, unknown> {\n\tconst value = executeFunctions.getNodeParameter(name, itemIndex, {});\n\treturn isRecord(value) ? value : {};\n}\n\nexport function getRecordString(record: Record<string, unknown>, key: string): string | undefined {\n\treturn asNonEmptyString(record[key]);\n}\n\nexport function getRecordBoolean(record: Record<string, unknown>, key: string): boolean | undefined {\n\treturn typeof record[key] === 'boolean' ? record[key] : undefined;\n}\n\nexport function getRecordNumber(record: Record<string, unknown>, key: string): number | undefined {\n\tconst value = record[key];\n\tconst numberValue = typeof value === 'number' ? value : Number(value);\n\treturn Number.isFinite(numberValue) ? numberValue : undefined;\n}\n\nexport function splitCommaSeparated(value: string | undefined): string[] | undefined {\n\tif (!value) return undefined;\n\tconst entries = value\n\t\t.split(',')\n\t\t.map((entry) => entry.trim())\n\t\t.filter((entry) => entry.length > 0);\n\treturn entries.length > 0 ? entries : undefined;\n}\n\nexport function quoteShellArg(value: string): string {\n\treturn `'${value.replaceAll(\"'\", \"'\\\\''\")}'`;\n}\n\nexport function parseStringMapParameter(\n\texecuteFunctions: IExecuteFunctions,\n\tvalue: unknown,\n\tdisplayName: string,\n\titemIndex: number,\n): Record<string, string> | undefined {\n\tif (value === undefined || value === null || value === '') return undefined;\n\n\tlet parsed = value;\n\tif (typeof value === 'string') {\n\t\ttry {\n\t\t\tparsed = JSON.parse(value);\n\t\t} catch (error) {\n\t\t\tthrow new NodeOperationError(\n\t\t\t\texecuteFunctions.getNode(),\n\t\t\t\t`${displayName} must be valid JSON: ${getErrorMessage(error)}`,\n\t\t\t\t{ itemIndex },\n\t\t\t);\n\t\t}\n\t}\n\n\tif (!isRecord(parsed)) {\n\t\tthrow new NodeOperationError(executeFunctions.getNode(), `${displayName} must be a JSON object`, {\n\t\t\titemIndex,\n\t\t});\n\t}\n\n\tconst output: Record<string, string> = {};\n\tfor (const [key, entryValue] of Object.entries(parsed)) {\n\t\tif (entryValue === undefined || entryValue === null) continue;\n\t\tif (typeof entryValue === 'object') {\n\t\t\tthrow new NodeOperationError(\n\t\t\t\texecuteFunctions.getNode(),\n\t\t\t\t`${displayName} values must be strings, numbers, or booleans`,\n\t\t\t\t{ itemIndex },\n\t\t\t);\n\t\t}\n\t\toutput[key] = String(entryValue);\n\t}\n\n\treturn Object.keys(output).length > 0 ? output : undefined;\n}\n\nexport function getTimeoutMs(executeFunctions: IExecuteFunctions, itemIndex: number): number {\n\tconst timeoutSeconds = Number(\n\t\texecuteFunctions.getNodeParameter('timeoutSeconds', itemIndex, 300),\n\t);\n\n\tif (!Number.isFinite(timeoutSeconds) || timeoutSeconds <= 0) {\n\t\tthrow new NodeOperationError(executeFunctions.getNode(), 'Timeout must be greater than 0', {\n\t\t\titemIndex,\n\t\t});\n\t}\n\n\treturn Math.round(timeoutSeconds * 1000);\n}\n\nexport function getLimit(executeFunctions: IExecuteFunctions, itemIndex: number): number {\n\tconst limit = Number(executeFunctions.getNodeParameter('limit', itemIndex, 50));\n\n\tif (!Number.isInteger(limit) || limit <= 0) {\n\t\tthrow new NodeOperationError(executeFunctions.getNode(), 'Limit must be a positive integer', {\n\t\t\titemIndex,\n\t\t});\n\t}\n\n\treturn limit;\n}\n\nexport function getPort(executeFunctions: IExecuteFunctions, itemIndex: number): number {\n\tconst port = Number(executeFunctions.getNodeParameter('port', itemIndex, 3000));\n\n\tif (!Number.isInteger(port) || port < 1 || port > 65535) {\n\t\tthrow new NodeOperationError(\n\t\t\texecuteFunctions.getNode(),\n\t\t\t'Port must be an integer between 1 and 65535',\n\t\t\t{ itemIndex },\n\t\t);\n\t}\n\n\treturn port;\n}\n\nexport function getRequiredStringParameter(\n\texecuteFunctions: IExecuteFunctions,\n\tname: string,\n\tdisplayName: string,\n\titemIndex: number,\n): string {\n\tconst value = asNonEmptyString(executeFunctions.getNodeParameter(name, itemIndex));\n\tif (!value) {\n\t\tthrow new NodeOperationError(executeFunctions.getNode(), `${displayName} is required`, {\n\t\t\titemIndex,\n\t\t});\n\t}\n\treturn value;\n}\n\nexport function getSandboxCreateOptions(\n\texecuteFunctions: IExecuteFunctions,\n\titemIndex: number,\n): SandboxCreateOptions {\n\tconst timeoutMs = getTimeoutMs(executeFunctions, itemIndex);\n\tconst template = asNonEmptyString(executeFunctions.getNodeParameter('template', itemIndex, ''));\n\tconst metadata = parseStringMapParameter(\n\t\texecuteFunctions,\n\t\texecuteFunctions.getNodeParameter('metadataJson', itemIndex, ''),\n\t\t'Metadata',\n\t\titemIndex,\n\t);\n\tconst envs = parseStringMapParameter(\n\t\texecuteFunctions,\n\t\texecuteFunctions.getNodeParameter('envJson', itemIndex, ''),\n\t\t'Environment Variables',\n\t\titemIndex,\n\t);\n\tconst volumeMounts = parseStringMapParameter(\n\t\texecuteFunctions,\n\t\texecuteFunctions.getNodeParameter('volumeMountsJson', itemIndex, ''),\n\t\t'Volume Mounts',\n\t\titemIndex,\n\t);\n\tconst allowInternetAccess =\n\t\texecuteFunctions.getNodeParameter('allowInternetAccess', itemIndex, true) === true;\n\n\treturn {\n\t\t...(template ? { template } : {}),\n\t\t...(metadata ? { metadata } : {}),\n\t\t...(envs ? { envs } : {}),\n\t\t...(volumeMounts ? { volumeMounts } : {}),\n\t\tallowInternetAccess,\n\t\ttimeoutMs,\n\t};\n}\n\nfunction toIsoString(value: Date | string | undefined): string | undefined {\n\tif (value instanceof Date) return value.toISOString();\n\treturn value;\n}\n\nexport function toSandboxInfoData(info: SandboxInfo, sandboxDomain?: string): IDataObject {\n\treturn {\n\t\tsandboxId: info.sandboxId,\n\t\ttemplateId: info.templateId,\n\t\tname: info.name,\n\t\tstate: info.state,\n\t\tmetadata: info.metadata ?? {},\n\t\tstartedAt: toIsoString(info.startedAt),\n\t\tendAt: toIsoString(info.endAt),\n\t\tcpuCount: info.cpuCount,\n\t\tmemoryMB: info.memoryMB,\n\t\tenvdVersion: info.envdVersion,\n\t\tallowInternetAccess: info.allowInternetAccess,\n\t\tnetwork: info.network,\n\t\tlifecycle: info.lifecycle,\n\t\tvolumeMounts: info.volumeMounts ?? [],\n\t\tsandboxDomain: sandboxDomain ?? info.sandboxDomain,\n\t};\n}\n\nexport function toSnapshotInfoData(info: SnapshotInfo): IDataObject {\n\treturn {\n\t\tsnapshotId: info.snapshotId,\n\t\tnames: info.names,\n\t};\n}\n\nexport function toFileInfoData(info: FileInfo | WriteInfo): IDataObject {\n\treturn {\n\t\tname: info.name,\n\t\ttype: info.type,\n\t\tpath: info.path,\n\t\tmetadata: info.metadata ?? {},\n\t\t...('size' in info\n\t\t\t? {\n\t\t\t\t\tsize: info.size,\n\t\t\t\t\tmode: info.mode,\n\t\t\t\t\tpermissions: info.permissions,\n\t\t\t\t\towner: info.owner,\n\t\t\t\t\tgroup: info.group,\n\t\t\t\t\tmodifiedTime: toIsoString(info.modifiedTime),\n\t\t\t\t\tsymlinkTarget: info.symlinkTarget,\n\t\t\t\t}\n\t\t\t: {}),\n\t};\n}\n\nexport function toVolumeInfoData(info: VolumeInfo): IDataObject {\n\treturn {\n\t\tvolumeId: info.volumeId,\n\t\tname: info.name,\n\t\t...(info.token ? { token: info.token } : {}),\n\t};\n}\n\nexport function toCommandResultData(\n\tresult: CommandResult,\n\tsandbox: ConnectedSandbox,\n\tcommand: string,\n\tstartedAt: number,\n\tcreatedSandbox: boolean,\n\tkilledAfterRun: boolean,\n): IDataObject {\n\treturn {\n\t\tsandboxId: sandbox.sandboxId,\n\t\tsandboxDomain: sandbox.sandboxDomain,\n\t\tcreatedSandbox,\n\t\tkilledAfterRun,\n\t\tcommand,\n\t\tsuccess: result.exitCode === 0,\n\t\texitCode: result.exitCode,\n\t\tstdout: result.stdout,\n\t\tstderr: result.stderr,\n\t\terror: result.error,\n\t\texecutionTimeMs: Date.now() - startedAt,\n\t};\n}\n\nexport function toOperationCommandResultData(\n\tresult: CommandResult,\n\tsandboxId: string,\n\toperation: string,\n\tstartedAt: number,\n\textra: IDataObject = {},\n): IDataObject {\n\treturn {\n\t\tsandboxId,\n\t\toperation,\n\t\tsuccess: result.exitCode === 0,\n\t\texitCode: result.exitCode,\n\t\tstdout: result.stdout,\n\t\tstderr: result.stderr,\n\t\terror: result.error,\n\t\texecutionTimeMs: Date.now() - startedAt,\n\t\t...extra,\n\t};\n}\n", "import type { IDataObject } from 'n8n-workflow';\nimport { NodeOperationError } from 'n8n-workflow';\n\nimport { connectSandbox, createSandbox, killSandbox, runSandboxCommand } from '../client';\nimport {\n\tasNonEmptyString,\n\tgetErrorMessage,\n\tgetRequiredStringParameter,\n\tgetSandboxCreateOptions,\n\tparseStringMapParameter,\n\ttoCommandResultData,\n} from '../helpers';\nimport type { E2BOperationContext } from '../types';\n\nexport async function runCommand(context: E2BOperationContext) {\n\tconst { executeFunctions, credentials, itemIndex, timeoutMs } = context;\n\tconst connection = { executeFunctions, credentials, timeoutMs };\n\tconst sandboxId = asNonEmptyString(executeFunctions.getNodeParameter('sandboxId', itemIndex, ''));\n\tconst command = getRequiredStringParameter(executeFunctions, 'command', 'Command', itemIndex);\n\tconst cwd = asNonEmptyString(executeFunctions.getNodeParameter('cwd', itemIndex, ''));\n\tconst killAfterRun =\n\t\texecuteFunctions.getNodeParameter('killAfterRun', itemIndex, false) === true;\n\tconst envs = parseStringMapParameter(\n\t\texecuteFunctions,\n\t\texecuteFunctions.getNodeParameter('envJson', itemIndex, ''),\n\t\t'Environment Variables',\n\t\titemIndex,\n\t);\n\tconst createdSandbox = !sandboxId;\n\tconst sandbox = sandboxId\n\t\t? await connectSandbox(connection, sandboxId)\n\t\t: await createSandbox(connection, getSandboxCreateOptions(executeFunctions, itemIndex));\n\n\tlet resultData: IDataObject | undefined;\n\tlet executionError: unknown;\n\tlet cleanupError: unknown;\n\ttry {\n\t\tconst startedAt = Date.now();\n\t\tconst result = await runSandboxCommand(connection, sandbox, command, {\n\t\t\t...(cwd ? { cwd } : {}),\n\t\t\t...(envs ? { envs } : {}),\n\t\t});\n\n\t\tresultData = toCommandResultData(result, sandbox, command, startedAt, createdSandbox, false);\n\t} catch (error) {\n\t\texecutionError = error;\n\t} finally {\n\t\tif (killAfterRun) {\n\t\t\ttry {\n\t\t\t\tawait killSandbox(connection, sandbox.sandboxId);\n\t\t\t\tif (resultData) resultData.killedAfterRun = true;\n\t\t\t} catch (error) {\n\t\t\t\tcleanupError = error;\n\t\t\t\tif (resultData) resultData.cleanupError = getErrorMessage(error);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (executionError) {\n\t\tif (cleanupError) {\n\t\t\tthrow new NodeOperationError(\n\t\t\t\texecuteFunctions.getNode(),\n\t\t\t\t`E2B command failed and the sandbox could not be killed: ${getErrorMessage(executionError)}; cleanup error: ${getErrorMessage(cleanupError)}`,\n\t\t\t\t{ itemIndex },\n\t\t\t);\n\t\t}\n\t\tthrow new NodeOperationError(executeFunctions.getNode(), getErrorMessage(executionError), {\n\t\t\titemIndex,\n\t\t});\n\t}\n\n\tif (cleanupError) {\n\t\tthrow new NodeOperationError(\n\t\t\texecuteFunctions.getNode(),\n\t\t\t`E2B command succeeded but the sandbox could not be killed: ${getErrorMessage(cleanupError)}`,\n\t\t\t{ itemIndex },\n\t\t);\n\t}\n\n\treturn resultData\n\t\t? [\n\t\t\t\t{\n\t\t\t\t\tjson: resultData,\n\t\t\t\t\tpairedItem: { item: itemIndex },\n\t\t\t\t},\n\t\t\t]\n\t\t: [];\n}\n", "import {\n\tconnectSandbox,\n\tcreateSandboxFolder,\n\tdeleteSandboxFile,\n\tgetSandboxFileInfo,\n\tlistSandboxFiles,\n\tmoveSandboxFile,\n\treadSandboxFile,\n\twriteSandboxFile,\n} from '../client';\nimport { getRequiredStringParameter, toFileInfoData } from '../helpers';\nimport type { E2BOperationContext } from '../types';\n\nasync function getConnectedSandbox(context: E2BOperationContext) {\n\tconst { executeFunctions, credentials, itemIndex, timeoutMs } = context;\n\tconst connection = { executeFunctions, credentials, timeoutMs };\n\tconst sandboxId = getRequiredStringParameter(\n\t\texecuteFunctions,\n\t\t'sandboxId',\n\t\t'Sandbox ID',\n\t\titemIndex,\n\t);\n\tconst sandbox = await connectSandbox(connection, sandboxId);\n\n\treturn { connection, sandbox, sandboxId };\n}\n\nexport async function createFolder(context: E2BOperationContext) {\n\tconst { executeFunctions, itemIndex } = context;\n\tconst { connection, sandbox, sandboxId } = await getConnectedSandbox(context);\n\tconst path = getRequiredStringParameter(executeFunctions, 'path', 'Path', itemIndex);\n\tconst created = await createSandboxFolder(connection, sandbox, path);\n\n\treturn [\n\t\t{\n\t\t\tjson: {\n\t\t\t\tsandboxId,\n\t\t\t\tpath,\n\t\t\t\tcreated,\n\t\t\t},\n\t\t\tpairedItem: { item: itemIndex },\n\t\t},\n\t];\n}\n\nexport async function deleteFile(context: E2BOperationContext) {\n\tconst { executeFunctions, itemIndex } = context;\n\tconst { connection, sandbox, sandboxId } = await getConnectedSandbox(context);\n\tconst path = getRequiredStringParameter(executeFunctions, 'path', 'Path', itemIndex);\n\tawait deleteSandboxFile(connection, sandbox, path);\n\n\treturn [\n\t\t{\n\t\t\tjson: {\n\t\t\t\tsandboxId,\n\t\t\t\tpath,\n\t\t\t\tdeleted: true,\n\t\t\t},\n\t\t\tpairedItem: { item: itemIndex },\n\t\t},\n\t];\n}\n\nexport async function download(context: E2BOperationContext) {\n\tconst { executeFunctions, itemIndex } = context;\n\tconst { connection, sandbox, sandboxId } = await getConnectedSandbox(context);\n\tconst remotePath = getRequiredStringParameter(\n\t\texecuteFunctions,\n\t\t'remotePath',\n\t\t'Remote Path',\n\t\titemIndex,\n\t);\n\tconst binaryPropertyName = getRequiredStringParameter(\n\t\texecuteFunctions,\n\t\t'binaryPropertyName',\n\t\t'Binary Field',\n\t\titemIndex,\n\t);\n\tconst content = await readSandboxFile(connection, sandbox, remotePath, 'bytes');\n\tconst buffer = Buffer.isBuffer(content) ? content : Buffer.from(content);\n\tconst filename = remotePath.split('/').pop()?.trim() || 'download';\n\tconst binaryData = await executeFunctions.helpers.prepareBinaryData(\n\t\tbuffer,\n\t\tfilename,\n\t\t'application/octet-stream',\n\t);\n\n\treturn [\n\t\t{\n\t\t\tjson: {\n\t\t\t\tsandboxId,\n\t\t\t\tremotePath,\n\t\t\t\tfileName: filename,\n\t\t\t\tsizeBytes: buffer.byteLength,\n\t\t\t},\n\t\t\tbinary: {\n\t\t\t\t[binaryPropertyName]: binaryData,\n\t\t\t},\n\t\t\tpairedItem: { item: itemIndex },\n\t\t},\n\t];\n}\n\nexport async function info(context: E2BOperationContext) {\n\tconst { executeFunctions, itemIndex } = context;\n\tconst { connection, sandbox, sandboxId } = await getConnectedSandbox(context);\n\tconst path = getRequiredStringParameter(executeFunctions, 'path', 'Path', itemIndex);\n\tconst fileInfo = await getSandboxFileInfo(connection, sandbox, path);\n\n\treturn [\n\t\t{\n\t\t\tjson: {\n\t\t\t\tsandboxId,\n\t\t\t\t...toFileInfoData(fileInfo),\n\t\t\t},\n\t\t\tpairedItem: { item: itemIndex },\n\t\t},\n\t];\n}\n\nexport async function list(context: E2BOperationContext) {\n\tconst { executeFunctions, itemIndex } = context;\n\tconst { connection, sandbox, sandboxId } = await getConnectedSandbox(context);\n\tconst path = getRequiredStringParameter(executeFunctions, 'path', 'Path', itemIndex);\n\tconst depth = Number(executeFunctions.getNodeParameter('depth', itemIndex, 1));\n\tconst entries = await listSandboxFiles(\n\t\tconnection,\n\t\tsandbox,\n\t\tpath,\n\t\tNumber.isInteger(depth) && depth > 0 ? depth : 1,\n\t);\n\n\treturn [\n\t\t{\n\t\t\tjson: {\n\t\t\t\tsandboxId,\n\t\t\t\tpath,\n\t\t\t\tcount: entries.length,\n\t\t\t\tfiles: entries.map(toFileInfoData),\n\t\t\t},\n\t\t\tpairedItem: { item: itemIndex },\n\t\t},\n\t];\n}\n\nexport async function move(context: E2BOperationContext) {\n\tconst { executeFunctions, itemIndex } = context;\n\tconst { connection, sandbox, sandboxId } = await getConnectedSandbox(context);\n\tconst source = getRequiredStringParameter(executeFunctions, 'source', 'Source', itemIndex);\n\tconst destination = getRequiredStringParameter(\n\t\texecuteFunctions,\n\t\t'destination',\n\t\t'Destination',\n\t\titemIndex,\n\t);\n\tconst fileInfo = await moveSandboxFile(connection, sandbox, source, destination);\n\n\treturn [\n\t\t{\n\t\t\tjson: {\n\t\t\t\tsandboxId,\n\t\t\t\tsource,\n\t\t\t\tdestination,\n\t\t\t\t...toFileInfoData(fileInfo),\n\t\t\t},\n\t\t\tpairedItem: { item: itemIndex },\n\t\t},\n\t];\n}\n\nexport async function read(context: E2BOperationContext) {\n\tconst { executeFunctions, itemIndex } = context;\n\tconst { connection, sandbox, sandboxId } = await getConnectedSandbox(context);\n\tconst path = getRequiredStringParameter(executeFunctions, 'path', 'Path', itemIndex);\n\tconst content = await readSandboxFile(connection, sandbox, path, 'text');\n\n\treturn [\n\t\t{\n\t\t\tjson: {\n\t\t\t\tsandboxId,\n\t\t\t\tpath,\n\t\t\t\tcontent,\n\t\t\t},\n\t\t\tpairedItem: { item: itemIndex },\n\t\t},\n\t];\n}\n\nexport async function upload(context: E2BOperationContext) {\n\tconst { executeFunctions, itemIndex } = context;\n\tconst { connection, sandbox, sandboxId } = await getConnectedSandbox(context);\n\tconst remotePath = getRequiredStringParameter(\n\t\texecuteFunctions,\n\t\t'remotePath',\n\t\t'Remote Path',\n\t\titemIndex,\n\t);\n\tconst binaryPropertyName = getRequiredStringParameter(\n\t\texecuteFunctions,\n\t\t'binaryPropertyName',\n\t\t'Binary Field',\n\t\titemIndex,\n\t);\n\tconst binaryMeta = executeFunctions.helpers.assertBinaryData(itemIndex, binaryPropertyName);\n\tconst buffer = await executeFunctions.helpers.getBinaryDataBuffer(itemIndex, binaryPropertyName);\n\tconst fileInfo = await writeSandboxFile(connection, sandbox, remotePath, buffer);\n\n\treturn [\n\t\t{\n\t\t\tjson: {\n\t\t\t\tsandboxId,\n\t\t\t\tremotePath,\n\t\t\t\tfileName: binaryMeta.fileName,\n\t\t\t\tmimeType: binaryMeta.mimeType,\n\t\t\t\tsizeBytes: buffer.length,\n\t\t\t\t...toFileInfoData(fileInfo),\n\t\t\t},\n\t\t\tpairedItem: { item: itemIndex },\n\t\t},\n\t];\n}\n\nexport async function write(context: E2BOperationContext) {\n\tconst { executeFunctions, itemIndex } = context;\n\tconst { connection, sandbox, sandboxId } = await getConnectedSandbox(context);\n\tconst path = getRequiredStringParameter(executeFunctions, 'path', 'Path', itemIndex);\n\tconst content = executeFunctions.getNodeParameter('content', itemIndex, '');\n\tconst fileInfo = await writeSandboxFile(connection, sandbox, path, String(content));\n\n\treturn [\n\t\t{\n\t\t\tjson: {\n\t\t\t\tsandboxId,\n\t\t\t\tcontentLength: String(content).length,\n\t\t\t\t...toFileInfoData(fileInfo),\n\t\t\t},\n\t\t\tpairedItem: { item: itemIndex },\n\t\t},\n\t];\n}\n", "import type { IDataObject } from 'n8n-workflow';\nimport { NodeOperationError } from 'n8n-workflow';\n\nimport { connectSandbox, runSandboxCommand, type CommandResult } from '../client';\nimport {\n\tasNonEmptyString,\n\tgetCollectionParameter,\n\tgetRecordBoolean,\n\tgetRecordNumber,\n\tgetRecordString,\n\tgetRequiredStringParameter,\n\tquoteShellArg,\n\tsplitCommaSeparated,\n\ttoOperationCommandResultData,\n} from '../helpers';\nimport type { E2BOperationContext } from '../types';\n\nconst DEFAULT_GIT_ENV: Record<string, string> = {\n\tGIT_TERMINAL_PROMPT: '0',\n};\n\ntype GitStatusLabel =\n\t| 'conflict'\n\t| 'renamed'\n\t| 'copied'\n\t| 'deleted'\n\t| 'added'\n\t| 'modified'\n\t| 'typechange'\n\t| 'untracked'\n\t| 'unknown';\n\ninterface GitFileStatus {\n\tname: string;\n\tstatus: GitStatusLabel;\n\tindexStatus: string;\n\tworkingTreeStatus: string;\n\tstaged: boolean;\n\trenamedFrom?: string;\n}\n\ninterface GitStatus {\n\tcurrentBranch?: string;\n\tupstream?: string;\n\tahead: number;\n\tbehind: number;\n\tdetached: boolean;\n\tfileStatus: GitFileStatus[];\n\tisClean: boolean;\n\thasChanges: boolean;\n\thasStaged: boolean;\n\thasUntracked: boolean;\n\thasConflicts: boolean;\n\ttotalCount: number;\n\tstagedCount: number;\n\tunstagedCount: number;\n\tuntrackedCount: number;\n\tconflictCount: number;\n}\n\ninterface GitContext extends E2BOperationContext {\n\tconnection: {\n\t\texecuteFunctions: E2BOperationContext['executeFunctions'];\n\t\tcredentials: E2BOperationContext['credentials'];\n\t\ttimeoutMs: number;\n\t};\n\tsandbox: Awaited<ReturnType<typeof connectSandbox>>;\n\tsandboxId: string;\n\trepositoryPath: string;\n\tstartedAt: number;\n}\n\nfunction parseAheadBehind(segment?: string): { ahead: number; behind: number } {\n\tif (!segment) return { ahead: 0, behind: 0 };\n\n\tlet ahead = 0;\n\tlet behind = 0;\n\n\tif (segment.includes('ahead')) {\n\t\tconst value = Number.parseInt(segment.split('ahead')[1].split(',')[0].trim(), 10);\n\t\tahead = Number.isFinite(value) ? value : 0;\n\t}\n\n\tif (segment.includes('behind')) {\n\t\tconst value = Number.parseInt(segment.split('behind')[1].split(',')[0].trim(), 10);\n\t\tbehind = Number.isFinite(value) ? value : 0;\n\t}\n\n\treturn { ahead, behind };\n}\n\nfunction normalizeBranchName(name: string): string {\n\tif (name.startsWith('HEAD (detached at ')) {\n\t\treturn name.replace('HEAD (detached at ', '').replace(/\\)$/, '');\n\t}\n\n\treturn name\n\t\t.replace('HEAD (no branch)', 'HEAD')\n\t\t.replace('No commits yet on ', '')\n\t\t.replace('Initial commit on ', '');\n}\n\nfunction deriveStatus(indexStatus: string, workingStatus: string): GitStatusLabel {\n\tconst statuses = new Set([indexStatus, workingStatus]);\n\n\tif (statuses.has('U')) return 'conflict';\n\tif (statuses.has('R')) return 'renamed';\n\tif (statuses.has('C')) return 'copied';\n\tif (statuses.has('D')) return 'deleted';\n\tif (statuses.has('A')) return 'added';\n\tif (statuses.has('M')) return 'modified';\n\tif (statuses.has('T')) return 'typechange';\n\tif (statuses.has('?')) return 'untracked';\n\n\treturn 'unknown';\n}\n\nfunction parseGitStatus(output: string): GitStatus {\n\tconst lines = output\n\t\t.split('\\n')\n\t\t.map((line) => line.replace(/\\r$/, ''))\n\t\t.filter((line) => line.trim().length > 0);\n\n\tlet currentBranch: string | undefined;\n\tlet upstream: string | undefined;\n\tlet ahead = 0;\n\tlet behind = 0;\n\tlet detached = false;\n\tconst fileStatus: GitFileStatus[] = [];\n\n\tif (lines.length === 0) {\n\t\treturn {\n\t\t\tcurrentBranch,\n\t\t\tupstream,\n\t\t\tahead,\n\t\t\tbehind,\n\t\t\tdetached,\n\t\t\tfileStatus,\n\t\t\tisClean: true,\n\t\t\thasChanges: false,\n\t\t\thasStaged: false,\n\t\t\thasUntracked: false,\n\t\t\thasConflicts: false,\n\t\t\ttotalCount: 0,\n\t\t\tstagedCount: 0,\n\t\t\tunstagedCount: 0,\n\t\t\tuntrackedCount: 0,\n\t\t\tconflictCount: 0,\n\t\t};\n\t}\n\n\tconst branchLine = lines[0];\n\tif (branchLine.startsWith('## ')) {\n\t\tconst branchInfo = branchLine.slice(3);\n\t\tconst aheadStart = branchInfo.indexOf(' [');\n\t\tconst branchPart = aheadStart === -1 ? branchInfo : branchInfo.slice(0, aheadStart);\n\t\tconst aheadPart = aheadStart === -1 ? undefined : branchInfo.slice(aheadStart + 2, -1);\n\t\tconst normalizedBranch = normalizeBranchName(branchPart);\n\t\tconst isDetached = branchPart.startsWith('HEAD (detached at ') || branchPart.includes('detached');\n\n\t\tif (isDetached || normalizedBranch.startsWith('HEAD')) {\n\t\t\tdetached = true;\n\t\t} else if (normalizedBranch.includes('...')) {\n\t\t\tconst [branch, upstreamBranch] = normalizedBranch.split('...');\n\t\t\tcurrentBranch = branch || undefined;\n\t\t\tupstream = upstreamBranch || undefined;\n\t\t} else {\n\t\t\tcurrentBranch = normalizedBranch || undefined;\n\t\t}\n\n\t\tconst aheadBehind = parseAheadBehind(aheadPart);\n\t\tahead = aheadBehind.ahead;\n\t\tbehind = aheadBehind.behind;\n\t}\n\n\tfor (const line of lines.slice(1)) {\n\t\tif (line.startsWith('?? ')) {\n\t\t\tconst name = line.slice(3);\n\t\t\tfileStatus.push({\n\t\t\t\tname,\n\t\t\t\tstatus: 'untracked',\n\t\t\t\tindexStatus: '?',\n\t\t\t\tworkingTreeStatus: '?',\n\t\t\t\tstaged: false,\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (line.length < 3) continue;\n\n\t\tconst indexStatus = line[0];\n\t\tconst workingTreeStatus = line[1];\n\t\tconst path = line.slice(3);\n\t\tlet renamedFrom: string | undefined;\n\t\tlet name = path;\n\n\t\tif (path.includes(' -> ')) {\n\t\t\tconst parts = path.split(' -> ');\n\t\t\trenamedFrom = parts[0];\n\t\t\tname = parts.slice(1).join(' -> ');\n\t\t}\n\n\t\tfileStatus.push({\n\t\t\tname,\n\t\t\tstatus: deriveStatus(indexStatus, workingTreeStatus),\n\t\t\tindexStatus,\n\t\t\tworkingTreeStatus,\n\t\t\tstaged: indexStatus !== ' ' && indexStatus !== '?',\n\t\t\t...(renamedFrom ? { renamedFrom } : {}),\n\t\t});\n\t}\n\n\tconst totalCount = fileStatus.length;\n\tconst stagedCount = fileStatus.filter((item) => item.staged).length;\n\tconst untrackedCount = fileStatus.filter((item) => item.status === 'untracked').length;\n\tconst conflictCount = fileStatus.filter((item) => item.status === 'conflict').length;\n\tconst unstagedCount = totalCount - stagedCount;\n\n\treturn {\n\t\tcurrentBranch,\n\t\tupstream,\n\t\tahead,\n\t\tbehind,\n\t\tdetached,\n\t\tfileStatus,\n\t\tisClean: totalCount === 0,\n\t\thasChanges: totalCount > 0,\n\t\thasStaged: stagedCount > 0,\n\t\thasUntracked: untrackedCount > 0,\n\t\thasConflicts: conflictCount > 0,\n\t\ttotalCount,\n\t\tstagedCount,\n\t\tunstagedCount,\n\t\tuntrackedCount,\n\t\tconflictCount,\n\t};\n}\n\nfunction buildGitCommand(args: string[], repoPath?: string): string {\n\tconst parts = ['git'];\n\tif (repoPath) parts.push('-C', repoPath);\n\tparts.push(...args);\n\treturn parts.map(quoteShellArg).join(' ');\n}\n\nfunction resultMessage(result: CommandResult): string {\n\tconst details = [result.error, result.stderr.trim(), result.stdout.trim()]\n\t\t.filter((entry) => entry && entry.length > 0)\n\t\t.join('; ');\n\treturn details || `Git command exited with code ${result.exitCode}`;\n}\n\nfunction commandText(result: CommandResult): string {\n\treturn `${result.stderr}\\n${result.stdout}`.toLowerCase();\n}\n\nfunction isAuthFailure(result: CommandResult): boolean {\n\tif (result.exitCode === 0) return false;\n\tconst message = commandText(result);\n\tconst authSnippets = [\n\t\t'authentication failed',\n\t\t'terminal prompts disabled',\n\t\t'could not read username',\n\t\t'invalid username or password',\n\t\t'access denied',\n\t\t'permission denied',\n\t\t'not authorized',\n\t];\n\n\treturn authSnippets.some((snippet) => message.includes(snippet));\n}\n\nfunction isMissingUpstream(result: CommandResult): boolean {\n\tif (result.exitCode === 0) return false;\n\tconst message = commandText(result);\n\tconst upstreamSnippets = [\n\t\t'has no upstream branch',\n\t\t'no upstream branch',\n\t\t'no upstream configured',\n\t\t'no tracking information for the current branch',\n\t\t'no tracking information',\n\t\t'set the remote as upstream',\n\t\t'set the upstream branch',\n\t\t'please specify which branch you want to merge with',\n\t];\n\n\treturn upstreamSnippets.some((snippet) => message.includes(snippet));\n}\n\nfunction buildAuthErrorMessage(action: 'clone' | 'push' | 'pull', missingPassword: boolean): string {\n\tif (missingPassword) {\n\t\treturn `Git ${action} requires a password/token for private repositories.`;\n\t}\n\treturn `Git ${action} requires credentials for private repositories.`;\n}\n\nfunction buildUpstreamErrorMessage(action: 'push' | 'pull'): string {\n\tif (action === 'push') {\n\t\treturn (\n\t\t\t'Git push failed because no upstream branch is configured. ' +\n\t\t\t'Set upstream once with the Set Upstream option, or pass remote and branch explicitly.'\n\t\t);\n\t}\n\n\treturn (\n\t\t'Git pull failed because no upstream branch is configured. ' +\n\t\t'Pass remote and branch explicitly, or set upstream once before pulling.'\n\t);\n}\n\nfunction throwGitError(context: E2BOperationContext, message: string): never {\n\tthrow new NodeOperationError(context.executeFunctions.getNode(), message, {\n\t\titemIndex: context.itemIndex,\n\t});\n}\n\nfunction addCredentialsToUrl(\n\tcontext: E2BOperationContext,\n\turl: string,\n\tusername: string,\n\tpassword: string,\n): string {\n\tlet parsed: URL;\n\ttry {\n\t\tparsed = new URL(url);\n\t} catch {\n\t\tthrowGitError(context, `Invalid Git URL: ${url}`);\n\t}\n\n\tif (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') {\n\t\tthrowGitError(context, 'Only http(s) Git URLs support username/password credentials.');\n\t}\n\n\tparsed.username = username;\n\tparsed.password = password;\n\treturn parsed.toString();\n}\n\nfunction stripCredentials(url: string): string {\n\tlet parsed: URL;\n\ttry {\n\t\tparsed = new URL(url);\n\t} catch {\n\t\treturn url;\n\t}\n\n\tif (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') return url;\n\tif (!parsed.username && !parsed.password) return url;\n\n\tparsed.username = '';\n\tparsed.password = '';\n\treturn parsed.toString();\n}\n\nfunction buildPushArgs(remote: string | undefined, branch: string | undefined, setUpstream: boolean): string[] {\n\tconst args = ['push'];\n\tif (setUpstream && remote) args.push('--set-upstream');\n\tif (remote) args.push(remote);\n\tif (branch) args.push(branch);\n\treturn args;\n}\n\nasync function getGitContext(context: E2BOperationContext): Promise<GitContext> {\n\tconst { executeFunctions, credentials, itemIndex, timeoutMs } = context;\n\tconst connection = { executeFunctions, credentials, timeoutMs };\n\tconst sandboxId = getRequiredStringParameter(\n\t\texecuteFunctions,\n\t\t'sandboxId',\n\t\t'Sandbox ID',\n\t\titemIndex,\n\t);\n\tconst repositoryPath = getRequiredStringParameter(\n\t\texecuteFunctions,\n\t\t'repositoryPath',\n\t\t'Repository Path',\n\t\titemIndex,\n\t);\n\tconst sandbox = await connectSandbox(connection, sandboxId);\n\tconst startedAt = Date.now();\n\n\treturn { ...context, connection, sandbox, sandboxId, repositoryPath, startedAt };\n}\n\nasync function runGit(\n\tcontext: GitContext,\n\targs: string[],\n\trepoPath: string | null = context.repositoryPath,\n\tenvs?: Record<string, string>,\n): Promise<CommandResult> {\n\tconst targetRepoPath = repoPath === null ? undefined : repoPath;\n\treturn await runSandboxCommand(\n\t\tcontext.connection,\n\t\tcontext.sandbox,\n\t\tbuildGitCommand(args, targetRepoPath),\n\t\t{\n\t\t\tenvs: { ...DEFAULT_GIT_ENV, ...(envs ?? {}) },\n\t\t},\n\t);\n}\n\nfunction assertSuccessfulGitResult(context: GitContext, result: CommandResult): void {\n\tif (result.exitCode === 0) return;\n\tthrowGitError(context, resultMessage(result));\n}\n\nasync function getRemoteUrl(context: GitContext, remote: string): Promise<string> {\n\tconst result = await runGit(context, ['remote', 'get-url', remote]);\n\tassertSuccessfulGitResult(context, result);\n\tconst url = result.stdout.trim();\n\tif (!url) throwGitError(context, `Remote \"${remote}\" URL not found in repository.`);\n\treturn url;\n}\n\nasync function resolveRemoteName(context: GitContext, remote: string | undefined): Promise<string> {\n\tif (remote) return remote;\n\n\tconst result = await runGit(context, ['remote']);\n\tassertSuccessfulGitResult(context, result);\n\tconst remotes = result.stdout\n\t\t.split('\\n')\n\t\t.map((line) => line.trim())\n\t\t.filter(Boolean);\n\n\tif (remotes.length === 1) return remotes[0];\n\n\tthrowGitError(\n\t\tcontext,\n\t\t'Remote is required when using username/password and the repository has multiple remotes.',\n\t);\n}\n\nasync function withRemoteCredentials(\n\tcontext: GitContext,\n\tremote: string,\n\tusername: string,\n\tpassword: string,\n\toperation: () => Promise<CommandResult>,\n): Promise<CommandResult> {\n\tconst originalUrl = await getRemoteUrl(context, remote);\n\tconst credentialUrl = addCredentialsToUrl(context, originalUrl, username, password);\n\n\tassertSuccessfulGitResult(context, await runGit(context, ['remote', 'set-url', remote, credentialUrl]));\n\n\tlet operationResult: CommandResult | undefined;\n\tlet operationError: unknown;\n\ttry {\n\t\toperationResult = await operation();\n\t} catch (error) {\n\t\toperationError = error;\n\t}\n\n\tlet restoreError: unknown;\n\ttry {\n\t\tassertSuccessfulGitResult(context, await runGit(context, ['remote', 'set-url', remote, originalUrl]));\n\t} catch (error) {\n\t\trestoreError = error;\n\t}\n\n\tif (operationError) throw operationError;\n\tif (restoreError) throw restoreError;\n\n\tif (!operationResult) throwGitError(context, 'Git operation did not return a result.');\n\treturn operationResult;\n}\n\nfunction handleAuthOrUpstreamError(\n\tcontext: GitContext,\n\tresult: CommandResult,\n\taction: 'clone' | 'push' | 'pull',\n\tmissingPassword: boolean,\n): void {\n\tif (isAuthFailure(result)) throwGitError(context, buildAuthErrorMessage(action, missingPassword));\n\tif ((action === 'push' || action === 'pull') && isMissingUpstream(result)) {\n\t\tthrowGitError(context, buildUpstreamErrorMessage(action));\n\t}\n}\n\nexport async function status(context: E2BOperationContext) {\n\tconst gitContext = await getGitContext(context);\n\tconst result = await runGit(gitContext, ['status', '--porcelain=1', '-b']);\n\tassertSuccessfulGitResult(gitContext, result);\n\tconst statusData = parseGitStatus(result.stdout);\n\n\treturn [\n\t\t{\n\t\t\tjson: {\n\t\t\t\tsandboxId: gitContext.sandboxId,\n\t\t\t\trepositoryPath: gitContext.repositoryPath,\n\t\t\t\tstatus: statusData as unknown as IDataObject,\n\t\t\t},\n\t\t\tpairedItem: { item: context.itemIndex },\n\t\t},\n\t];\n}\n\nexport async function add(context: E2BOperationContext) {\n\tconst gitContext = await getGitContext(context);\n\tconst filesRaw = asNonEmptyString(\n\t\tcontext.executeFunctions.getNodeParameter('files', context.itemIndex, '.'),\n\t);\n\tconst files = splitCommaSeparated(filesRaw);\n\tconst addAll = !files || (files.length === 1 && files[0] === '.');\n\tconst result = await runGit(\n\t\tgitContext,\n\t\taddAll ? ['add', '-A'] : ['add', '--', ...(files ?? [])],\n\t);\n\n\treturn [\n\t\t{\n\t\t\tjson: toOperationCommandResultData(result, gitContext.sandboxId, 'git.add', gitContext.startedAt, {\n\t\t\t\trepositoryPath: gitContext.repositoryPath,\n\t\t\t\tfiles: addAll ? ['.'] : files,\n\t\t\t}),\n\t\t\tpairedItem: { item: context.itemIndex },\n\t\t},\n\t];\n}\n\nexport async function checkout(context: E2BOperationContext) {\n\tconst gitContext = await getGitContext(context);\n\tconst gitRef = getRequiredStringParameter(\n\t\tcontext.executeFunctions,\n\t\t'gitRef',\n\t\t'Git Ref',\n\t\tcontext.itemIndex,\n\t);\n\tconst result = await runGit(gitContext, ['checkout', gitRef]);\n\n\treturn [\n\t\t{\n\t\t\tjson: toOperationCommandResultData(\n\t\t\t\tresult,\n\t\t\t\tgitContext.sandboxId,\n\t\t\t\t'git.checkout',\n\t\t\t\tgitContext.startedAt,\n\t\t\t\t{\n\t\t\t\t\trepositoryPath: gitContext.repositoryPath,\n\t\t\t\t\tgitRef,\n\t\t\t\t},\n\t\t\t),\n\t\t\tpairedItem: { item: context.itemIndex },\n\t\t},\n\t];\n}\n\nexport async function clone(context: E2BOperationContext) {\n\tconst gitContext = await getGitContext(context);\n\tconst repositoryUrl = getRequiredStringParameter(\n\t\tcontext.executeFunctions,\n\t\t'repositoryUrl',\n\t\t'Repository URL',\n\t\tcontext.itemIndex,\n\t);\n\tconst cloneOptions = getCollectionParameter(\n\t\tcontext.executeFunctions,\n\t\t'cloneOptions',\n\t\tcontext.itemIndex,\n\t);\n\tconst branch = getRecordString(cloneOptions, 'branch');\n\tconst commitId = getRecordString(cloneOptions, 'commitId');\n\tconst depth = getRecordNumber(cloneOptions, 'depth');\n\tconst username = getRecordString(cloneOptions, 'username');\n\tconst password = getRecordString(cloneOptions, 'password');\n\tconst dangerouslyStoreCredentials =\n\t\tgetRecordBoolean(cloneOptions, 'dangerouslyStoreCredentials') === true;\n\n\tif (password && !username) {\n\t\tthrowGitError(context, 'Username is required when using a password or token for git clone.');\n\t}\n\n\tconst urlWithCreds =\n\t\tusername && password ? addCredentialsToUrl(context, repositoryUrl, username, password) : repositoryUrl;\n\tconst sanitizedUrl = stripCredentials(urlWithCreds);\n\tconst shouldStripInlineCreds = !dangerouslyStoreCredentials && sanitizedUrl !== urlWithCreds;\n\tconst args = ['clone', urlWithCreds];\n\tif (branch) args.push('--branch', branch, '--single-branch');\n\tif (depth) args.push('--depth', depth.toString());\n\targs.push(gitContext.repositoryPath);\n\n\tconst result = await runGit(gitContext, args, null);\n\thandleAuthOrUpstreamError(gitContext, result, 'clone', Boolean(username) && !password);\n\n\tif (shouldStripInlineCreds && result.exitCode === 0) {\n\t\tassertSuccessfulGitResult(\n\t\t\tgitContext,\n\t\t\tawait runGit(gitContext, ['remote', 'set-url', 'origin', sanitizedUrl]),\n\t\t);\n\t}\n\n\tconst resultData = toOperationCommandResultData(\n\t\tresult,\n\t\tgitContext.sandboxId,\n\t\t'git.clone',\n\t\tgitContext.startedAt,\n\t\t{\n\t\t\trepositoryPath: gitContext.repositoryPath,\n\t\t\trepositoryUrl,\n\t\t\tbranch,\n\t\t\tdepth,\n\t\t},\n\t);\n\n\tif (commitId) {\n\t\tconst checkoutResult = await runGit(gitContext, ['checkout', commitId]);\n\t\tresultData.checkout = {\n\t\t\tsuccess: checkoutResult.exitCode === 0,\n\t\t\texitCode: checkoutResult.exitCode,\n\t\t\tstdout: checkoutResult.stdout,\n\t\t\tstderr: checkoutResult.stderr,\n\t\t\terror: checkoutResult.error,\n\t\t\tcommitId,\n\t\t};\n\t\tresultData.success = result.exitCode === 0 && checkoutResult.exitCode === 0;\n\t}\n\n\treturn [\n\t\t{\n\t\t\tjson: resultData,\n\t\t\tpairedItem: { item: context.itemIndex },\n\t\t},\n\t];\n}\n\nexport async function commit(context: E2BOperationContext) {\n\tconst gitContext = await getGitContext(context);\n\tconst message = getRequiredStringParameter(\n\t\tcontext.executeFunctions,\n\t\t'message',\n\t\t'Message',\n\t\tcontext.itemIndex,\n\t);\n\tconst commitOptions = getCollectionParameter(\n\t\tcontext.executeFunctions,\n\t\t'commitOptions',\n\t\tcontext.itemIndex,\n\t);\n\tconst authorName = asNonEmptyString(\n\t\tcontext.executeFunctions.getNodeParameter('authorName', context.itemIndex, ''),\n\t);\n\tconst authorEmail = asNonEmptyString(\n\t\tcontext.executeFunctions.getNodeParameter('authorEmail', context.itemIndex, ''),\n\t);\n\tconst allowEmpty = getRecordBoolean(commitOptions, 'allowEmpty') === true;\n\tconst args = ['commit', '-m', message];\n\tif (allowEmpty) args.push('--allow-empty');\n\n\tconst authorArgs: string[] = [];\n\tif (authorName) authorArgs.push('-c', `user.name=${authorName}`);\n\tif (authorEmail) authorArgs.push('-c', `user.email=${authorEmail}`);\n\n\tconst result = await runGit(gitContext, [...authorArgs, ...args]);\n\n\treturn [\n\t\t{\n\t\t\tjson: toOperationCommandResultData(\n\t\t\t\tresult,\n\t\t\t\tgitContext.sandboxId,\n\t\t\t\t'git.commit',\n\t\t\t\tgitContext.startedAt,\n\t\t\t\t{\n\t\t\t\t\trepositoryPath: gitContext.repositoryPath,\n\t\t\t\t\tmessage,\n\t\t\t\t\tauthorName,\n\t\t\t\t\tauthorEmail,\n\t\t\t\t\tallowEmpty,\n\t\t\t\t},\n\t\t\t),\n\t\t\tpairedItem: { item: context.itemIndex },\n\t\t},\n\t];\n}\n\nexport async function pull(context: E2BOperationContext) {\n\tconst gitContext = await getGitContext(context);\n\tconst remoteOptions = getCollectionParameter(\n\t\tcontext.executeFunctions,\n\t\t'remoteOptions',\n\t\tcontext.itemIndex,\n\t);\n\tconst remote = getRecordString(remoteOptions, 'remote');\n\tconst branch = getRecordString(remoteOptions, 'branch');\n\tconst username = getRecordString(remoteOptions, 'username');\n\tconst password = getRecordString(remoteOptions, 'password');\n\n\tif (password && !username) {\n\t\tthrowGitError(context, 'Username is required when using a password or token for git pull.');\n\t}\n\n\tif (!remote && !branch) {\n\t\tconst hasUpstream = await runGit(gitContext, [\n\t\t\t'rev-parse',\n\t\t\t'--abbrev-ref',\n\t\t\t'--symbolic-full-name',\n\t\t\t'@{u}',\n\t\t]);\n\t\tif (hasUpstream.exitCode !== 0 || hasUpstream.stdout.trim().length === 0) {\n\t\t\tthrowGitError(gitContext, buildUpstreamErrorMessage('pull'));\n\t\t}\n\t}\n\n\tconst args = ['pull'];\n\tif (remote) args.push(remote);\n\tif (branch) args.push(branch);\n\n\tconst result =\n\t\tusername && password\n\t\t\t? await withRemoteCredentials(\n\t\t\t\t\tgitContext,\n\t\t\t\t\tawait resolveRemoteName(gitContext, remote),\n\t\t\t\t\tusername,\n\t\t\t\t\tpassword,\n\t\t\t\t\tasync () => await runGit(gitContext, args),\n\t\t\t\t)\n\t\t\t: await runGit(gitContext, args);\n\thandleAuthOrUpstreamError(gitContext, result, 'pull', Boolean(username) && !password);\n\n\treturn [\n\t\t{\n\t\t\tjson: toOperationCommandResultData(\n\t\t\t\tresult,\n\t\t\t\tgitContext.sandboxId,\n\t\t\t\t'git.pull',\n\t\t\t\tgitContext.startedAt,\n\t\t\t\t{\n\t\t\t\t\trepositoryPath: gitContext.repositoryPath,\n\t\t\t\t\tremote,\n\t\t\t\t\tbranch,\n\t\t\t\t},\n\t\t\t),\n\t\t\tpairedItem: { item: context.itemIndex },\n\t\t},\n\t];\n}\n\nexport async function push(context: E2BOperationContext) {\n\tconst gitContext = await getGitContext(context);\n\tconst remoteOptions = getCollectionParameter(\n\t\tcontext.executeFunctions,\n\t\t'remoteOptions',\n\t\tcontext.itemIndex,\n\t);\n\tconst remote = getRecordString(remoteOptions, 'remote');\n\tconst branch = getRecordString(remoteOptions, 'branch');\n\tconst setUpstream = getRecordBoolean(remoteOptions, 'setUpstream') === true;\n\tconst username = getRecordString(remoteOptions, 'username');\n\tconst password = getRecordString(remoteOptions, 'password');\n\n\tif (password && !username) {\n\t\tthrowGitError(context, 'Username is required when using a password or token for git push.');\n\t}\n\n\tconst args = buildPushArgs(remote, branch, setUpstream);\n\tlet result: CommandResult;\n\tif (username && password) {\n\t\tconst remoteName = await resolveRemoteName(gitContext, remote);\n\t\tresult = await withRemoteCredentials(\n\t\t\tgitContext,\n\t\t\tremoteName,\n\t\t\tusername,\n\t\t\tpassword,\n\t\t\tasync () => await runGit(gitContext, buildPushArgs(remoteName, branch, setUpstream)),\n\t\t);\n\t} else {\n\t\tresult = await runGit(gitContext, args);\n\t}\n\thandleAuthOrUpstreamError(gitContext, result, 'push', Boolean(username) && !password);\n\n\treturn [\n\t\t{\n\t\t\tjson: toOperationCommandResultData(\n\t\t\t\tresult,\n\t\t\t\tgitContext.sandboxId,\n\t\t\t\t'git.push',\n\t\t\t\tgitContext.startedAt,\n\t\t\t\t{\n\t\t\t\t\trepositoryPath: gitContext.repositoryPath,\n\t\t\t\t\tremote,\n\t\t\t\t\tbranch,\n\t\t\t\t\tsetUpstream,\n\t\t\t\t},\n\t\t\t),\n\t\t\tpairedItem: { item: context.itemIndex },\n\t\t},\n\t];\n}\n", "import {\n\tconnectSandbox,\n\tcreateSandbox,\n\tgetPreviewHost,\n\tgetSandboxInfo,\n\tkillSandbox,\n\tlistSandboxes,\n\tpauseSandbox,\n} from '../client';\nimport {\n\tgetLimit,\n\tgetPort,\n\tgetRequiredStringParameter,\n\tgetSandboxCreateOptions,\n\ttoSandboxInfoData,\n} from '../helpers';\nimport type { E2BOperationContext } from '../types';\n\nexport async function create(context: E2BOperationContext) {\n\tconst { executeFunctions, credentials, itemIndex, timeoutMs } = context;\n\tconst connection = { executeFunctions, credentials, timeoutMs };\n\tconst sandbox = await createSandbox(\n\t\tconnection,\n\t\tgetSandboxCreateOptions(executeFunctions, itemIndex),\n\t);\n\tconst info = await getSandboxInfo(connection, sandbox.sandboxId);\n\n\treturn [\n\t\t{\n\t\t\tjson: toSandboxInfoData(info, sandbox.sandboxDomain),\n\t\t\tpairedItem: { item: itemIndex },\n\t\t},\n\t];\n}\n\nexport async function get(context: E2BOperationContext) {\n\tconst { executeFunctions, credentials, itemIndex, timeoutMs } = context;\n\tconst connection = { executeFunctions, credentials, timeoutMs };\n\tconst sandboxId = getRequiredStringParameter(\n\t\texecuteFunctions,\n\t\t'sandboxId',\n\t\t'Sandbox ID',\n\t\titemIndex,\n\t);\n\tconst info = await getSandboxInfo(connection, sandboxId);\n\n\treturn [\n\t\t{\n\t\t\tjson: toSandboxInfoData(info),\n\t\t\tpairedItem: { item: itemIndex },\n\t\t},\n\t];\n}\n\nexport async function getMany(context: E2BOperationContext) {\n\tconst { executeFunctions, credentials, itemIndex, timeoutMs } = context;\n\tconst connection = { executeFunctions, credentials, timeoutMs };\n\tconst sandboxes = await listSandboxes(connection, getLimit(executeFunctions, itemIndex));\n\n\treturn sandboxes.map((sandbox) => ({\n\t\tjson: toSandboxInfoData(sandbox),\n\t\tpairedItem: { item: itemIndex },\n\t}));\n}\n\nexport async function getPreviewUrl(context: E2BOperationContext) {\n\tconst { executeFunctions, credentials, itemIndex, timeoutMs } = context;\n\tconst connection = { executeFunctions, credentials, timeoutMs };\n\tconst sandboxId = getRequiredStringParameter(\n\t\texecuteFunctions,\n\t\t'sandboxId',\n\t\t'Sandbox ID',\n\t\titemIndex,\n\t);\n\tconst port = getPort(executeFunctions, itemIndex);\n\tconst sandbox = await connectSandbox(connection, sandboxId);\n\tconst host = getPreviewHost(connection, sandbox, port);\n\n\treturn [\n\t\t{\n\t\t\tjson: {\n\t\t\t\tsandboxId,\n\t\t\t\tport,\n\t\t\t\thost,\n\t\t\t\turl: `https://${host}`,\n\t\t\t},\n\t\t\tpairedItem: { item: itemIndex },\n\t\t},\n\t];\n}\n\nexport async function kill(context: E2BOperationContext) {\n\tconst { executeFunctions, credentials, itemIndex, timeoutMs } = context;\n\tconst connection = { executeFunctions, credentials, timeoutMs };\n\tconst sandboxId = getRequiredStringParameter(\n\t\texecuteFunctions,\n\t\t'sandboxId',\n\t\t'Sandbox ID',\n\t\titemIndex,\n\t);\n\tconst killed = await killSandbox(connection, sandboxId);\n\n\treturn [\n\t\t{\n\t\t\tjson: {\n\t\t\t\tsandboxId,\n\t\t\t\tkilled,\n\t\t\t},\n\t\t\tpairedItem: { item: itemIndex },\n\t\t},\n\t];\n}\n\nexport async function pause(context: E2BOperationContext) {\n\tconst { executeFunctions, credentials, itemIndex, timeoutMs } = context;\n\tconst connection = { executeFunctions, credentials, timeoutMs };\n\tconst sandboxId = getRequiredStringParameter(\n\t\texecuteFunctions,\n\t\t'sandboxId',\n\t\t'Sandbox ID',\n\t\titemIndex,\n\t);\n\tconst paused = await pauseSandbox(connection, sandboxId);\n\n\treturn [\n\t\t{\n\t\t\tjson: {\n\t\t\t\tsandboxId,\n\t\t\t\tpaused,\n\t\t\t},\n\t\t\tpairedItem: { item: itemIndex },\n\t\t},\n\t];\n}\n", "import { createSnapshot, deleteSnapshot as deleteSnapshotById, listSnapshots } from '../client';\nimport {\n\tasNonEmptyString,\n\tgetLimit,\n\tgetRequiredStringParameter,\n\ttoSnapshotInfoData,\n} from '../helpers';\nimport type { E2BOperationContext } from '../types';\n\nexport async function create(context: E2BOperationContext) {\n\tconst { executeFunctions, credentials, itemIndex, timeoutMs } = context;\n\tconst connection = { executeFunctions, credentials, timeoutMs };\n\tconst sandboxId = getRequiredStringParameter(\n\t\texecuteFunctions,\n\t\t'sandboxId',\n\t\t'Sandbox ID',\n\t\titemIndex,\n\t);\n\tconst snapshotName = asNonEmptyString(\n\t\texecuteFunctions.getNodeParameter('snapshotName', itemIndex, ''),\n\t);\n\tconst snapshot = await createSnapshot(connection, sandboxId, snapshotName);\n\n\treturn [\n\t\t{\n\t\t\tjson: toSnapshotInfoData(snapshot),\n\t\t\tpairedItem: { item: itemIndex },\n\t\t},\n\t];\n}\n\nexport async function getMany(context: E2BOperationContext) {\n\tconst { executeFunctions, credentials, itemIndex, timeoutMs } = context;\n\tconst connection = { executeFunctions, credentials, timeoutMs };\n\tconst sandboxId = asNonEmptyString(executeFunctions.getNodeParameter('sandboxId', itemIndex, ''));\n\tconst snapshots = await listSnapshots(\n\t\tconnection,\n\t\tgetLimit(executeFunctions, itemIndex),\n\t\tsandboxId,\n\t);\n\n\treturn snapshots.map((snapshot) => ({\n\t\tjson: toSnapshotInfoData(snapshot),\n\t\tpairedItem: { item: itemIndex },\n\t}));\n}\n\nexport async function deleteSnapshot(context: E2BOperationContext) {\n\tconst { executeFunctions, credentials, itemIndex, timeoutMs } = context;\n\tconst connection = { executeFunctions, credentials, timeoutMs };\n\tconst snapshotId = getRequiredStringParameter(\n\t\texecuteFunctions,\n\t\t'snapshotId',\n\t\t'Snapshot ID',\n\t\titemIndex,\n\t);\n\tconst deleted = await deleteSnapshotById(connection, snapshotId);\n\n\treturn [\n\t\t{\n\t\t\tjson: {\n\t\t\t\tsnapshotId,\n\t\t\t\tdeleted,\n\t\t\t},\n\t\t\tpairedItem: { item: itemIndex },\n\t\t},\n\t];\n}\n", "import { createVolume, deleteVolume as deleteVolumeById, getVolume, listVolumes } from '../client';\nimport { getLimit, getRequiredStringParameter, toVolumeInfoData } from '../helpers';\nimport type { E2BOperationContext } from '../types';\n\nexport async function create(context: E2BOperationContext) {\n\tconst { executeFunctions, credentials, itemIndex, timeoutMs } = context;\n\tconst connection = { executeFunctions, credentials, timeoutMs };\n\tconst name = getRequiredStringParameter(\n\t\texecuteFunctions,\n\t\t'volumeName',\n\t\t'Volume Name',\n\t\titemIndex,\n\t);\n\tconst volume = await createVolume(connection, name);\n\n\treturn [\n\t\t{\n\t\t\tjson: toVolumeInfoData(volume),\n\t\t\tpairedItem: { item: itemIndex },\n\t\t},\n\t];\n}\n\nexport async function get(context: E2BOperationContext) {\n\tconst { executeFunctions, credentials, itemIndex, timeoutMs } = context;\n\tconst connection = { executeFunctions, credentials, timeoutMs };\n\tconst volumeId = getRequiredStringParameter(executeFunctions, 'volumeId', 'Volume ID', itemIndex);\n\tconst volume = await getVolume(connection, volumeId);\n\n\treturn [\n\t\t{\n\t\t\tjson: toVolumeInfoData(volume),\n\t\t\tpairedItem: { item: itemIndex },\n\t\t},\n\t];\n}\n\nexport async function getMany(context: E2BOperationContext) {\n\tconst { executeFunctions, credentials, itemIndex, timeoutMs } = context;\n\tconst connection = { executeFunctions, credentials, timeoutMs };\n\tconst volumes = await listVolumes(connection);\n\n\treturn volumes.slice(0, getLimit(executeFunctions, itemIndex)).map((volume) => ({\n\t\tjson: toVolumeInfoData(volume),\n\t\tpairedItem: { item: itemIndex },\n\t}));\n}\n\nexport async function deleteVolume(context: E2BOperationContext) {\n\tconst { executeFunctions, credentials, itemIndex, timeoutMs } = context;\n\tconst connection = { executeFunctions, credentials, timeoutMs };\n\tconst volumeId = getRequiredStringParameter(executeFunctions, 'volumeId', 'Volume ID', itemIndex);\n\tconst deleted = await deleteVolumeById(connection, volumeId);\n\n\treturn [\n\t\t{\n\t\t\tjson: {\n\t\t\t\tvolumeId,\n\t\t\t\tdeleted,\n\t\t\t},\n\t\t\tpairedItem: { item: itemIndex },\n\t\t},\n\t];\n}\n", "import * as code from './code.operations';\nimport * as file from './file.operations';\nimport * as git from './git.operations';\nimport * as sandbox from './sandbox.operations';\nimport * as snapshot from './snapshot.operations';\nimport * as volume from './volume.operations';\nimport type { E2BOperationHandler, Operation, OperationForResource, Resource } from '../types';\n\nconst operationHandlers = {\n\tcode: {\n\t\trunCommand: code.runCommand,\n\t},\n\tfile: {\n\t\tcreateFolder: file.createFolder,\n\t\tdelete: file.deleteFile,\n\t\tdownload: file.download,\n\t\tinfo: file.info,\n\t\tlist: file.list,\n\t\tmove: file.move,\n\t\tread: file.read,\n\t\tupload: file.upload,\n\t\twrite: file.write,\n\t},\n\tgit: {\n\t\tadd: git.add,\n\t\tcheckout: git.checkout,\n\t\tclone: git.clone,\n\t\tcommit: git.commit,\n\t\tpull: git.pull,\n\t\tpush: git.push,\n\t\tstatus: git.status,\n\t},\n\tsandbox: {\n\t\tcreate: sandbox.create,\n\t\tget: sandbox.get,\n\t\tgetMany: sandbox.getMany,\n\t\tgetPreviewUrl: sandbox.getPreviewUrl,\n\t\tkill: sandbox.kill,\n\t\tpause: sandbox.pause,\n\t},\n\tsnapshot: {\n\t\tcreate: snapshot.create,\n\t\tdelete: snapshot.deleteSnapshot,\n\t\tgetMany: snapshot.getMany,\n\t},\n\tvolume: {\n\t\tcreate: volume.create,\n\t\tdelete: volume.deleteVolume,\n\t\tget: volume.get,\n\t\tgetMany: volume.getMany,\n\t},\n} satisfies {\n\t[R in Resource]: Record<OperationForResource<R>, E2BOperationHandler>;\n};\n\nexport function getOperationHandler(\n\tresource: Resource,\n\toperation: Operation,\n): E2BOperationHandler {\n\tconst resourceHandlers: Partial<Record<Operation, E2BOperationHandler>> =\n\t\toperationHandlers[resource];\n\tconst handler = resourceHandlers[operation];\n\n\tif (!handler) {\n\t\tthrow new Error(`Operation \"${operation}\" is not implemented for resource \"${resource}\"`);\n\t}\n\n\treturn handler;\n}\n", "import type {\n\tICredentialDataDecryptedObject,\n\tIExecuteFunctions,\n\tINodeExecutionData,\n} from 'n8n-workflow';\n\nexport const RESOURCE_OPERATIONS = {\n\tcode: ['runCommand'],\n\tfile: ['createFolder', 'delete', 'download', 'info', 'list', 'move', 'read', 'upload', 'write'],\n\tgit: ['add', 'checkout', 'clone', 'commit', 'pull', 'push', 'status'],\n\tsandbox: ['create', 'get', 'getMany', 'getPreviewUrl', 'kill', 'pause'],\n\tsnapshot: ['create', 'delete', 'getMany'],\n\tvolume: ['create', 'delete', 'get', 'getMany'],\n} as const;\n\nexport type Resource = keyof typeof RESOURCE_OPERATIONS;\n\nexport type OperationForResource<R extends Resource> = (typeof RESOURCE_OPERATIONS)[R][number];\n\nexport type Operation = OperationForResource<Resource>;\n\nexport interface E2BOperationContext {\n\texecuteFunctions: IExecuteFunctions;\n\tcredentials: ICredentialDataDecryptedObject;\n\titemIndex: number;\n\ttimeoutMs: number;\n}\n\nexport type E2BOperationHandler = (\n\tcontext: E2BOperationContext,\n) => Promise<INodeExecutionData[]>;\n\nexport function isResource(value: unknown): value is Resource {\n\treturn typeof value === 'string' && value in RESOURCE_OPERATIONS;\n}\n\nexport function isOperationForResource<R extends Resource>(\n\tresource: R,\n\tvalue: unknown,\n): value is OperationForResource<R> {\n\treturn (\n\t\ttypeof value === 'string' &&\n\t\tRESOURCE_OPERATIONS[resource].some((operation) => operation === value)\n\t);\n}\n", "import type {\n\tIExecuteFunctions,\n\tINodeExecutionData,\n\tINodeType,\n\tINodeTypeDescription,\n} from 'n8n-workflow';\nimport { NodeConnectionTypes, NodeOperationError } from 'n8n-workflow';\n\nimport { getOperationHandler } from './actions';\nimport { getErrorMessage, getTimeoutMs } from './helpers';\nimport { isOperationForResource, isResource } from './types';\n\nexport class E2b implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'E2B',\n\t\tname: 'e2b',\n\t\ticon: {\n\t\t\tlight: 'file:e2b.svg',\n\t\t\tdark: 'file:e2b.dark.svg',\n\t\t},\n\t\tgroup: ['transform'],\n\t\tversion: 1,\n\t\tsubtitle: '={{ $parameter[\"operation\"] + \": \" + $parameter[\"resource\"] }}',\n\t\tdescription: 'Run commands and manage E2B sandboxes and snapshots',\n\t\tdefaults: {\n\t\t\tname: 'E2B',\n\t\t},\n\t\tusableAsTool: true,\n\t\tinputs: [NodeConnectionTypes.Main],\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'e2bApi',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Resource',\n\t\t\t\tname: 'resource',\n\t\t\t\ttype: 'options',\n\t\t\t\tnoDataExpression: true,\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Code',\n\t\t\t\t\t\tvalue: 'code',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'File',\n\t\t\t\t\t\tvalue: 'file',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Git',\n\t\t\t\t\t\tvalue: 'git',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Sandbox',\n\t\t\t\t\t\tvalue: 'sandbox',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Snapshot',\n\t\t\t\t\t\tvalue: 'snapshot',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Volume',\n\t\t\t\t\t\tvalue: 'volume',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'code',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Operation',\n\t\t\t\tname: 'operation',\n\t\t\t\ttype: 'options',\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['code'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Run Command',\n\t\t\t\t\t\tvalue: 'runCommand',\n\t\t\t\t\t\taction: 'Run a command in a sandbox',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Run a shell command in an existing sandbox, or create a temporary sandbox for this execution',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'runCommand',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Operation',\n\t\t\t\tname: 'operation',\n\t\t\t\ttype: 'options',\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['file'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Create Folder',\n\t\t\t\t\t\tvalue: 'createFolder',\n\t\t\t\t\t\taction: 'Create a folder in a sandbox',\n\t\t\t\t\t\tdescription: 'Create a directory inside an E2B sandbox',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Delete',\n\t\t\t\t\t\tvalue: 'delete',\n\t\t\t\t\t\taction: 'Delete a file or folder in a sandbox',\n\t\t\t\t\t\tdescription: 'Delete a file or directory inside an E2B sandbox',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Download',\n\t\t\t\t\t\tvalue: 'download',\n\t\t\t\t\t\taction: 'Download a file from a sandbox',\n\t\t\t\t\t\tdescription: 'Read a sandbox file and return it as binary data',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Get Info',\n\t\t\t\t\t\tvalue: 'info',\n\t\t\t\t\t\taction: 'Get file info in a sandbox',\n\t\t\t\t\t\tdescription: 'Get metadata for a file or directory inside an E2B sandbox',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'List',\n\t\t\t\t\t\tvalue: 'list',\n\t\t\t\t\t\taction: 'List files in a sandbox',\n\t\t\t\t\t\tdescription: 'List files and directories under a sandbox path',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Move',\n\t\t\t\t\t\tvalue: 'move',\n\t\t\t\t\t\taction: 'Move a file or folder in a sandbox',\n\t\t\t\t\t\tdescription: 'Move or rename a file or directory inside an E2B sandbox',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Read',\n\t\t\t\t\t\tvalue: 'read',\n\t\t\t\t\t\taction: 'Read a text file from a sandbox',\n\t\t\t\t\t\tdescription: 'Read a sandbox file as text',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Upload',\n\t\t\t\t\t\tvalue: 'upload',\n\t\t\t\t\t\taction: 'Upload a file to a sandbox',\n\t\t\t\t\t\tdescription: 'Write input binary data to a sandbox file',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Write',\n\t\t\t\t\t\tvalue: 'write',\n\t\t\t\t\t\taction: 'Write text to a sandbox file',\n\t\t\t\t\t\tdescription: 'Write text content to a file inside an E2B sandbox',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'write',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Operation',\n\t\t\t\tname: 'operation',\n\t\t\t\ttype: 'options',\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['git'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Add',\n\t\t\t\t\t\tvalue: 'add',\n\t\t\t\t\t\taction: 'Stage files in a sandbox repository',\n\t\t\t\t\t\tdescription: 'Stage files for the next commit',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Checkout',\n\t\t\t\t\t\tvalue: 'checkout',\n\t\t\t\t\t\taction: 'Check out a git ref in a sandbox',\n\t\t\t\t\t\tdescription: 'Check out a branch, tag, or commit in a sandbox repository',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Clone',\n\t\t\t\t\t\tvalue: 'clone',\n\t\t\t\t\t\taction: 'Clone a repository into a sandbox',\n\t\t\t\t\t\tdescription: 'Clone a git repository into an E2B sandbox',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Commit',\n\t\t\t\t\t\tvalue: 'commit',\n\t\t\t\t\t\taction: 'Commit staged files in a sandbox repository',\n\t\t\t\t\t\tdescription: 'Create a git commit from staged changes',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Pull',\n\t\t\t\t\t\tvalue: 'pull',\n\t\t\t\t\t\taction: 'Pull changes in a sandbox repository',\n\t\t\t\t\t\tdescription: 'Pull changes from the configured remote',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Push',\n\t\t\t\t\t\tvalue: 'push',\n\t\t\t\t\t\taction: 'Push changes from a sandbox repository',\n\t\t\t\t\t\tdescription: 'Push commits to the configured remote',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Status',\n\t\t\t\t\t\tvalue: 'status',\n\t\t\t\t\t\taction: 'Get git status in a sandbox repository',\n\t\t\t\t\t\tdescription: 'Return parsed git status for a repository',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'status',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Operation',\n\t\t\t\tname: 'operation',\n\t\t\t\ttype: 'options',\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['sandbox'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Create',\n\t\t\t\t\t\tvalue: 'create',\n\t\t\t\t\t\taction: 'Create a sandbox',\n\t\t\t\t\t\tdescription: 'Create a new E2B sandbox',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Get',\n\t\t\t\t\t\tvalue: 'get',\n\t\t\t\t\t\taction: 'Get a sandbox',\n\t\t\t\t\t\tdescription: 'Retrieve a sandbox by ID',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Get Many',\n\t\t\t\t\t\tvalue: 'getMany',\n\t\t\t\t\t\taction: 'Get many sandboxes',\n\t\t\t\t\t\tdescription: 'List running E2B sandboxes',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Get Preview URL',\n\t\t\t\t\t\tvalue: 'getPreviewUrl',\n\t\t\t\t\t\taction: 'Get a sandbox preview URL',\n\t\t\t\t\t\tdescription: 'Get an external URL for a port exposed inside a sandbox',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Kill',\n\t\t\t\t\t\tvalue: 'kill',\n\t\t\t\t\t\taction: 'Kill a sandbox',\n\t\t\t\t\t\tdescription: 'Kill a sandbox by ID',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Pause',\n\t\t\t\t\t\tvalue: 'pause',\n\t\t\t\t\t\taction: 'Pause a sandbox',\n\t\t\t\t\t\tdescription: 'Pause a sandbox by ID',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'getMany',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Operation',\n\t\t\t\tname: 'operation',\n\t\t\t\ttype: 'options',\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['snapshot'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Create',\n\t\t\t\t\t\tvalue: 'create',\n\t\t\t\t\t\taction: 'Create a snapshot',\n\t\t\t\t\t\tdescription: 'Create a snapshot from a sandbox',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Delete',\n\t\t\t\t\t\tvalue: 'delete',\n\t\t\t\t\t\taction: 'Delete a snapshot',\n\t\t\t\t\t\tdescription: 'Delete a snapshot by ID',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Get Many',\n\t\t\t\t\t\tvalue: 'getMany',\n\t\t\t\t\t\taction: 'Get many snapshots',\n\t\t\t\t\t\tdescription: 'List E2B snapshots',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'getMany',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Operation',\n\t\t\t\tname: 'operation',\n\t\t\t\ttype: 'options',\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['volume'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Create',\n\t\t\t\t\t\tvalue: 'create',\n\t\t\t\t\t\taction: 'Create a volume',\n\t\t\t\t\t\tdescription: 'Create a persistent E2B volume',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Delete',\n\t\t\t\t\t\tvalue: 'delete',\n\t\t\t\t\t\taction: 'Delete a volume',\n\t\t\t\t\t\tdescription: 'Delete a persistent E2B volume',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Get',\n\t\t\t\t\t\tvalue: 'get',\n\t\t\t\t\t\taction: 'Get a volume',\n\t\t\t\t\t\tdescription: 'Retrieve a persistent E2B volume by ID',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Get Many',\n\t\t\t\t\t\tvalue: 'getMany',\n\t\t\t\t\t\taction: 'Get many volumes',\n\t\t\t\t\t\tdescription: 'List persistent E2B volumes',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'getMany',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Sandbox ID',\n\t\t\t\tname: 'sandboxId',\n\t\t\t\ttype: 'string',\n\t\t\t\trequired: true,\n\t\t\t\tdefault: '',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['sandbox'],\n\t\t\t\t\t\t\toperation: ['get', 'getPreviewUrl', 'kill', 'pause'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Sandbox ID',\n\t\t\t\tname: 'sandboxId',\n\t\t\t\ttype: 'string',\n\t\t\t\trequired: true,\n\t\t\t\tdefault: '',\n\t\t\t\tdescription: 'Source sandbox ID to snapshot',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['snapshot'],\n\t\t\t\t\t\toperation: ['create'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Snapshot ID',\n\t\t\t\tname: 'snapshotId',\n\t\t\t\ttype: 'string',\n\t\t\t\trequired: true,\n\t\t\t\tdefault: '',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['snapshot'],\n\t\t\t\t\t\toperation: ['delete'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Sandbox ID',\n\t\t\t\tname: 'sandboxId',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription: 'Existing sandbox ID. Leave empty to create a sandbox for this command.',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['code'],\n\t\t\t\t\t\toperation: ['runCommand'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Sandbox ID',\n\t\t\t\tname: 'sandboxId',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription: 'Optional source sandbox ID to filter snapshots by',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['snapshot'],\n\t\t\t\t\t\toperation: ['getMany'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Sandbox ID',\n\t\t\t\t\tname: 'sandboxId',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\trequired: true,\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tdescription: 'ID of the sandbox to work with',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['file', 'git'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Port',\n\t\t\t\t\tname: 'port',\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\trequired: true,\n\t\t\t\t\tdefault: 3000,\n\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\tminValue: 1,\n\t\t\t\t\t\tmaxValue: 65535,\n\t\t\t\t\t},\n\t\t\t\t\tdescription: 'Port inside the sandbox to expose',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['sandbox'],\n\t\t\t\t\t\t\toperation: ['getPreviewUrl'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Path',\n\t\t\t\t\tname: 'path',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\trequired: true,\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tplaceholder: '/home/user/project',\n\t\t\t\t\tdescription: 'Path inside the sandbox',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['file'],\n\t\t\t\t\t\t\toperation: ['createFolder', 'delete', 'info', 'list', 'read', 'write'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Remote Path',\n\t\t\t\t\tname: 'remotePath',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\trequired: true,\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tplaceholder: '/home/user/file.txt',\n\t\t\t\t\tdescription: 'File path inside the sandbox',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['file'],\n\t\t\t\t\t\t\toperation: ['download', 'upload'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Content',\n\t\t\t\t\tname: 'content',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\trequired: true,\n\t\t\t\t\tdefault: '',\n\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\trows: 8,\n\t\t\t\t\t},\n\t\t\t\t\tdescription: 'Text content to write to the sandbox file',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['file'],\n\t\t\t\t\t\t\toperation: ['write'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Source',\n\t\t\t\t\tname: 'source',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\trequired: true,\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tplaceholder: '/home/user/old-name.txt',\n\t\t\t\t\tdescription: 'Source path inside the sandbox',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['file'],\n\t\t\t\t\t\t\toperation: ['move'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Destination',\n\t\t\t\t\tname: 'destination',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\trequired: true,\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tplaceholder: '/home/user/new-name.txt',\n\t\t\t\t\tdescription: 'Destination path inside the sandbox',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['file'],\n\t\t\t\t\t\t\toperation: ['move'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Depth',\n\t\t\t\t\t\t\t\tname: 'depth',\n\t\t\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\tminValue: 1,\n\t\t\t\t\t},\n\t\t\t\t\tdefault: 1,\n\t\t\t\t\tdescription: 'Directory depth to list',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['file'],\n\t\t\t\t\t\t\toperation: ['list'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Binary Field',\n\t\t\t\t\tname: 'binaryPropertyName',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\trequired: true,\n\t\t\t\t\tdefault: 'data',\n\t\t\t\t\tdescription: 'Name of the binary field to read from or write to',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['file'],\n\t\t\t\t\t\t\toperation: ['download', 'upload'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Repository URL',\n\t\t\t\t\tname: 'repositoryUrl',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\trequired: true,\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tplaceholder: 'https://github.com/owner/repo.git',\n\t\t\t\t\tdescription: 'Git repository URL to clone',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['git'],\n\t\t\t\t\t\t\toperation: ['clone'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Repository Path',\n\t\t\t\t\tname: 'repositoryPath',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\trequired: true,\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tplaceholder: '/home/user/repo',\n\t\t\t\t\tdescription: 'Path to the git repository inside the sandbox',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['git'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Files',\n\t\t\t\t\tname: 'files',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: '.',\n\t\t\t\t\tplaceholder: '. or README.md,src/index.ts',\n\t\t\t\t\tdescription: 'Comma-separated list of files to stage. Use \".\" to stage all changes.',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['git'],\n\t\t\t\t\t\t\toperation: ['add'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Git Ref',\n\t\t\t\t\tname: 'gitRef',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\trequired: true,\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tplaceholder: 'main, feature/new-thing, or a commit SHA',\n\t\t\t\t\tdescription: 'Branch, tag, or commit SHA to check out',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['git'],\n\t\t\t\t\t\t\toperation: ['checkout'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Message',\n\t\t\t\t\tname: 'message',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\trequired: true,\n\t\t\t\t\tdefault: '',\n\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\trows: 3,\n\t\t\t\t\t},\n\t\t\t\t\tdescription: 'Commit message',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['git'],\n\t\t\t\t\t\t\toperation: ['commit'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Author Name',\n\t\t\t\t\tname: 'authorName',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tdescription: 'Optional commit author name',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['git'],\n\t\t\t\t\t\t\toperation: ['commit'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Author Email',\n\t\t\t\t\tname: 'authorEmail',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tdescription: 'Optional commit author email',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['git'],\n\t\t\t\t\t\t\toperation: ['commit'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Clone Options',\n\t\t\t\t\tname: 'cloneOptions',\n\t\t\t\t\ttype: 'collection',\n\t\t\t\t\tplaceholder: 'Add Option',\n\t\t\t\t\tdefault: {},\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['git'],\n\t\t\t\t\t\t\toperation: ['clone'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\toptions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Branch',\n\t\t\t\t\t\t\tname: 'branch',\n\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\tdescription: 'Branch to check out after cloning',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Commit ID',\n\t\t\t\t\t\t\tname: 'commitId',\n\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\tdescription: 'Commit SHA to check out after cloning',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Depth',\n\t\t\t\t\t\t\tname: 'depth',\n\t\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\t\tminValue: 1,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdefault: 1,\n\t\t\t\t\t\t\t\tdescription: 'Shallow clone depth',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Password or Token',\n\t\t\t\t\t\t\t\tname: 'password',\n\t\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\t\tpassword: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\tdescription: 'HTTPS password or personal access token',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Store Credentials in Repository',\n\t\t\t\t\t\t\tname: 'dangerouslyStoreCredentials',\n\t\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\t\t\tdefault: false,\n\t\t\t\t\t\t\t\tdescription: 'Whether to persist clone credentials in the repository config',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Username',\n\t\t\t\t\t\t\t\tname: 'username',\n\t\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\t\tdescription: 'HTTPS username for private repositories',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Remote Options',\n\t\t\t\t\tname: 'remoteOptions',\n\t\t\t\t\ttype: 'collection',\n\t\t\t\t\tplaceholder: 'Add Option',\n\t\t\t\t\tdefault: {},\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['git'],\n\t\t\t\t\t\t\toperation: ['pull', 'push'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\toptions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Branch',\n\t\t\t\t\t\t\tname: 'branch',\n\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\tdescription: 'Branch name to pull or push',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Password or Token',\n\t\t\t\t\t\t\tname: 'password',\n\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\t\tpassword: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\tdescription: 'HTTPS password or personal access token for the remote',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Remote',\n\t\t\t\t\t\t\tname: 'remote',\n\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\tdescription: 'Remote name, for example origin',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Set Upstream',\n\t\t\t\t\t\t\tname: 'setUpstream',\n\t\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\t\tdefault: false,\n\t\t\t\t\t\t\tdescription: 'Whether to set upstream tracking when pushing',\n\t\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t\t'/operation': ['push'],\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Username',\n\t\t\t\t\t\t\tname: 'username',\n\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\tdescription: 'HTTPS username for the remote',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Commit Options',\n\t\t\t\t\tname: 'commitOptions',\n\t\t\t\t\ttype: 'collection',\n\t\t\t\t\tplaceholder: 'Add Option',\n\t\t\t\t\tdefault: {},\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['git'],\n\t\t\t\t\t\t\toperation: ['commit'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\toptions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Allow Empty Commit',\n\t\t\t\t\t\t\tname: 'allowEmpty',\n\t\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\t\tdefault: false,\n\t\t\t\t\t\t\tdescription: 'Whether to create a commit when no files are staged',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Volume Name',\n\t\t\t\t\tname: 'volumeName',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\trequired: true,\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tdescription: 'Name for the new volume',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['volume'],\n\t\t\t\t\t\t\toperation: ['create'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Volume ID',\n\t\t\t\t\tname: 'volumeId',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\trequired: true,\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tdescription: 'ID of the volume',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['volume'],\n\t\t\t\t\t\t\toperation: ['get', 'delete'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Command',\n\t\t\t\tname: 'command',\n\t\t\t\ttype: 'string',\n\t\t\t\trequired: true,\n\t\t\t\tdefault: '',\n\t\t\t\tplaceholder: 'python -c \"print(1 + 1)\"',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 4,\n\t\t\t\t},\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['code'],\n\t\t\t\t\t\toperation: ['runCommand'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Working Directory',\n\t\t\t\tname: 'cwd',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['code'],\n\t\t\t\t\t\toperation: ['runCommand'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Template or Snapshot ID',\n\t\t\t\tname: 'template',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription:\n\t\t\t\t\t'E2B template name/ID or snapshot ID. Leave empty to use the default E2B sandbox template.',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['sandbox', 'code'],\n\t\t\t\t\t\toperation: ['create', 'runCommand'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Snapshot Name',\n\t\t\t\tname: 'snapshotName',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription: 'Optional name for the snapshot template',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['snapshot'],\n\t\t\t\t\t\toperation: ['create'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Metadata',\n\t\t\t\tname: 'metadataJson',\n\t\t\t\ttype: 'json',\n\t\t\t\tdefault: '{}',\n\t\t\t\tdescription: 'Metadata to attach when creating a sandbox',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['sandbox', 'code'],\n\t\t\t\t\t\toperation: ['create', 'runCommand'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Environment Variables',\n\t\t\t\tname: 'envJson',\n\t\t\t\ttype: 'json',\n\t\t\t\tdefault: '{}',\n\t\t\t\tdescription: 'Environment variables to set for the sandbox or command',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['sandbox', 'code'],\n\t\t\t\t\t\toperation: ['create', 'runCommand'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Allow Internet Access',\n\t\t\t\t\tname: 'allowInternetAccess',\n\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\tdefault: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['sandbox', 'code'],\n\t\t\t\t\t\toperation: ['create', 'runCommand'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Volume Mounts',\n\t\t\t\t\tname: 'volumeMountsJson',\n\t\t\t\t\ttype: 'json',\n\t\t\t\t\tdefault: '{}',\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'JSON object mapping sandbox mount paths to E2B volume names, for example {\"\\\\/data\":\"my-volume\"}',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['sandbox', 'code'],\n\t\t\t\t\t\t\toperation: ['create', 'runCommand'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Kill Sandbox After Run',\n\t\t\t\t\tname: 'killAfterRun',\n\t\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: false,\n\t\t\t\tdescription: 'Whether to kill the sandbox after running the command',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tresource: ['code'],\n\t\t\t\t\t\toperation: ['runCommand'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Limit',\n\t\t\t\tname: 'limit',\n\t\t\t\ttype: 'number',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tminValue: 1,\n\t\t\t\t},\n\t\t\t\tdefault: 50,\n\t\t\t\tdescription: 'Max number of results to return',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tresource: ['sandbox', 'snapshot', 'volume'],\n\t\t\t\t\t\t\toperation: ['getMany'],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Timeout',\n\t\t\t\tname: 'timeoutSeconds',\n\t\t\t\ttype: 'number',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tminValue: 1,\n\t\t\t\t},\n\t\t\t\tdefault: 300,\n\t\t\t\tdescription: 'Timeout in seconds for the E2B operation',\n\t\t\t},\n\t\t],\n\t};\n\n\tasync execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {\n\t\tconst items = this.getInputData();\n\t\tconst credentials = await this.getCredentials('e2bApi');\n\t\tconst returnData: INodeExecutionData[] = [];\n\n\t\tfor (let itemIndex = 0; itemIndex < items.length; itemIndex++) {\n\t\t\ttry {\n\t\t\t\tconst rawResource = this.getNodeParameter('resource', itemIndex);\n\t\t\t\tif (!isResource(rawResource)) {\n\t\t\t\t\tthrow new NodeOperationError(this.getNode(), `The resource \"${rawResource}\" is not known`, {\n\t\t\t\t\t\titemIndex,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tconst rawOperation = this.getNodeParameter('operation', itemIndex);\n\t\t\t\tif (!isOperationForResource(rawResource, rawOperation)) {\n\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t\t`The operation \"${rawOperation}\" is not known for resource \"${rawResource}\"`,\n\t\t\t\t\t\t{ itemIndex },\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst handler = getOperationHandler(rawResource, rawOperation);\n\t\t\t\tconst itemData = await handler({\n\t\t\t\t\texecuteFunctions: this,\n\t\t\t\t\tcredentials,\n\t\t\t\t\titemIndex,\n\t\t\t\t\ttimeoutMs: getTimeoutMs(this, itemIndex),\n\t\t\t\t});\n\t\t\t\treturnData.push(...itemData);\n\t\t\t} catch (error) {\n\t\t\t\tif (this.continueOnFail()) {\n\t\t\t\t\treturnData.push({\n\t\t\t\t\t\tjson: {\n\t\t\t\t\t\t\terror: getErrorMessage(error),\n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AC,UAAU;EACnB;;AAn+BD,QAAA,MAAA;",
|
|
6
|
+
"names": ["exports", "n8n_workflow_1", "exports", "n8n_workflow_1", "exports", "n8n_workflow_1", "helpers_1", "exports", "helpers_1", "exports", "n8n_workflow_1", "helpers_1", "name", "exports", "helpers_1", "exports", "helpers_1", "exports", "helpers_1", "exports", "exports"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node": "@e2b/n8n-nodes-e2b.e2b",
|
|
3
|
+
"nodeVersion": "1.0",
|
|
4
|
+
"codexVersion": "1.0",
|
|
5
|
+
"categories": ["Development", "Utility"],
|
|
6
|
+
"resources": {
|
|
7
|
+
"credentialDocumentation": [
|
|
8
|
+
{
|
|
9
|
+
"url": "https://e2b.dev/docs/getting-started/api-key"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"primaryDocumentation": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://e2b.dev/docs"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"generic": []
|
|
18
|
+
},
|
|
19
|
+
"alias": ["Sandbox", "Code Interpreter", "Cloud Runtime", "Command"]
|
|
20
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runCommand = runCommand;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const client_1 = require("../client");
|
|
6
|
+
const helpers_1 = require("../helpers");
|
|
7
|
+
async function runCommand(context) {
|
|
8
|
+
const { executeFunctions, credentials, itemIndex, timeoutMs } = context;
|
|
9
|
+
const connection = { executeFunctions, credentials, timeoutMs };
|
|
10
|
+
const sandboxId = (0, helpers_1.asNonEmptyString)(executeFunctions.getNodeParameter('sandboxId', itemIndex, ''));
|
|
11
|
+
const command = (0, helpers_1.getRequiredStringParameter)(executeFunctions, 'command', 'Command', itemIndex);
|
|
12
|
+
const cwd = (0, helpers_1.asNonEmptyString)(executeFunctions.getNodeParameter('cwd', itemIndex, ''));
|
|
13
|
+
const killAfterRun = executeFunctions.getNodeParameter('killAfterRun', itemIndex, false) === true;
|
|
14
|
+
const envs = (0, helpers_1.parseStringMapParameter)(executeFunctions, executeFunctions.getNodeParameter('envJson', itemIndex, ''), 'Environment Variables', itemIndex);
|
|
15
|
+
const createdSandbox = !sandboxId;
|
|
16
|
+
const sandbox = sandboxId
|
|
17
|
+
? await (0, client_1.connectSandbox)(connection, sandboxId)
|
|
18
|
+
: await (0, client_1.createSandbox)(connection, (0, helpers_1.getSandboxCreateOptions)(executeFunctions, itemIndex));
|
|
19
|
+
let resultData;
|
|
20
|
+
let executionError;
|
|
21
|
+
let cleanupError;
|
|
22
|
+
try {
|
|
23
|
+
const startedAt = Date.now();
|
|
24
|
+
const result = await (0, client_1.runSandboxCommand)(connection, sandbox, command, {
|
|
25
|
+
...(cwd ? { cwd } : {}),
|
|
26
|
+
...(envs ? { envs } : {}),
|
|
27
|
+
});
|
|
28
|
+
resultData = (0, helpers_1.toCommandResultData)(result, sandbox, command, startedAt, createdSandbox, false);
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
executionError = error;
|
|
32
|
+
}
|
|
33
|
+
finally {
|
|
34
|
+
if (killAfterRun) {
|
|
35
|
+
try {
|
|
36
|
+
await (0, client_1.killSandbox)(connection, sandbox.sandboxId);
|
|
37
|
+
if (resultData)
|
|
38
|
+
resultData.killedAfterRun = true;
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
cleanupError = error;
|
|
42
|
+
if (resultData)
|
|
43
|
+
resultData.cleanupError = (0, helpers_1.getErrorMessage)(error);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (executionError) {
|
|
48
|
+
if (cleanupError) {
|
|
49
|
+
throw new n8n_workflow_1.NodeOperationError(executeFunctions.getNode(), `E2B command failed and the sandbox could not be killed: ${(0, helpers_1.getErrorMessage)(executionError)}; cleanup error: ${(0, helpers_1.getErrorMessage)(cleanupError)}`, { itemIndex });
|
|
50
|
+
}
|
|
51
|
+
throw new n8n_workflow_1.NodeOperationError(executeFunctions.getNode(), (0, helpers_1.getErrorMessage)(executionError), {
|
|
52
|
+
itemIndex,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
if (cleanupError) {
|
|
56
|
+
throw new n8n_workflow_1.NodeOperationError(executeFunctions.getNode(), `E2B command succeeded but the sandbox could not be killed: ${(0, helpers_1.getErrorMessage)(cleanupError)}`, { itemIndex });
|
|
57
|
+
}
|
|
58
|
+
return resultData
|
|
59
|
+
? [
|
|
60
|
+
{
|
|
61
|
+
json: resultData,
|
|
62
|
+
pairedItem: { item: itemIndex },
|
|
63
|
+
},
|
|
64
|
+
]
|
|
65
|
+
: [];
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=code.operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code.operations.js","sourceRoot":"","sources":["../../../../nodes/E2B/actions/code.operations.ts"],"names":[],"mappings":";;AAcA,gCAyEC;AAtFD,+CAAkD;AAElD,sCAA0F;AAC1F,wCAOoB;AAGb,KAAK,UAAU,UAAU,CAAC,OAA4B;IAC5D,MAAM,EAAE,gBAAgB,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IACxE,MAAM,UAAU,GAAG,EAAE,gBAAgB,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC;IAChE,MAAM,SAAS,GAAG,IAAA,0BAAgB,EAAC,gBAAgB,CAAC,gBAAgB,CAAC,WAAW,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC;IAClG,MAAM,OAAO,GAAG,IAAA,oCAA0B,EAAC,gBAAgB,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IAC9F,MAAM,GAAG,GAAG,IAAA,0BAAgB,EAAC,gBAAgB,CAAC,g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perationContext): Promise<{
|
|
3
|
+
json: {
|
|
4
|
+
sandboxId: string;
|
|
5
|
+
path: string;
|
|
6
|
+
created: boolean;
|
|
7
|
+
};
|
|
8
|
+
pairedItem: {
|
|
9
|
+
item: number;
|
|
10
|
+
};
|
|
11
|
+
}[]>;
|
|
12
|
+
export declare function deleteFile(context: E2BOperationContext): Promise<{
|
|
13
|
+
json: {
|
|
14
|
+
sandboxId: string;
|
|
15
|
+
path: string;
|
|
16
|
+
deleted: boolean;
|
|
17
|
+
};
|
|
18
|
+
pairedItem: {
|
|
19
|
+
item: number;
|
|
20
|
+
};
|
|
21
|
+
}[]>;
|
|
22
|
+
export declare function download(context: E2BOperationContext): Promise<{
|
|
23
|
+
json: {
|
|
24
|
+
sandboxId: string;
|
|
25
|
+
remotePath: string;
|
|
26
|
+
fileName: string;
|
|
27
|
+
sizeBytes: number;
|
|
28
|
+
};
|
|
29
|
+
binary: {
|
|
30
|
+
[x: string]: import("n8n-workflow").IBinaryData;
|
|
31
|
+
};
|
|
32
|
+
pairedItem: {
|
|
33
|
+
item: number;
|
|
34
|
+
};
|
|
35
|
+
}[]>;
|
|
36
|
+
export declare function info(context: E2BOperationContext): Promise<{
|
|
37
|
+
json: {
|
|
38
|
+
sandboxId: string;
|
|
39
|
+
};
|
|
40
|
+
pairedItem: {
|
|
41
|
+
item: number;
|
|
42
|
+
};
|
|
43
|
+
}[]>;
|
|
44
|
+
export declare function list(context: E2BOperationContext): Promise<{
|
|
45
|
+
json: {
|
|
46
|
+
sandboxId: string;
|
|
47
|
+
path: string;
|
|
48
|
+
count: number;
|
|
49
|
+
files: import("n8n-workflow").IDataObject[];
|
|
50
|
+
};
|
|
51
|
+
pairedItem: {
|
|
52
|
+
item: number;
|
|
53
|
+
};
|
|
54
|
+
}[]>;
|
|
55
|
+
export declare function move(context: E2BOperationContext): Promise<{
|
|
56
|
+
json: {
|
|
57
|
+
sandboxId: string;
|
|
58
|
+
source: string;
|
|
59
|
+
destination: string;
|
|
60
|
+
};
|
|
61
|
+
pairedItem: {
|
|
62
|
+
item: number;
|
|
63
|
+
};
|
|
64
|
+
}[]>;
|
|
65
|
+
export declare function read(context: E2BOperationContext): Promise<{
|
|
66
|
+
json: {
|
|
67
|
+
sandboxId: string;
|
|
68
|
+
path: string;
|
|
69
|
+
content: string | Buffer<ArrayBufferLike>;
|
|
70
|
+
};
|
|
71
|
+
pairedItem: {
|
|
72
|
+
item: number;
|
|
73
|
+
};
|
|
74
|
+
}[]>;
|
|
75
|
+
export declare function upload(context: E2BOperationContext): Promise<{
|
|
76
|
+
json: {
|
|
77
|
+
sandboxId: string;
|
|
78
|
+
remotePath: string;
|
|
79
|
+
fileName: string | undefined;
|
|
80
|
+
mimeType: string;
|
|
81
|
+
sizeBytes: number;
|
|
82
|
+
};
|
|
83
|
+
pairedItem: {
|
|
84
|
+
item: number;
|
|
85
|
+
};
|
|
86
|
+
}[]>;
|
|
87
|
+
export declare function write(context: E2BOperationContext): Promise<{
|
|
88
|
+
json: {
|
|
89
|
+
sandboxId: string;
|
|
90
|
+
contentLength: number;
|
|
91
|
+
};
|
|
92
|
+
pairedItem: {
|
|
93
|
+
item: number;
|
|
94
|
+
};
|
|
95
|
+
}[]>;
|