@atom8n/n8n-nodes-langchain 2.5.7 → 2.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/known/nodes.json +24 -0
- package/dist/methods/defined.json +3 -0
- package/dist/methods/referenced.json +3 -0
- package/dist/nodes/agents/OpenClawAgent/OpenClawAgent.node.js +62 -0
- package/dist/nodes/agents/OpenClawAgent/OpenClawAgent.node.js.map +1 -0
- package/dist/nodes/agents/OpenClawAgent/V1/OpenClawAgentV1.node.js +821 -0
- package/dist/nodes/agents/OpenClawAgent/V1/OpenClawAgentV1.node.js.map +1 -0
- package/dist/nodes/agents/OpenClawAgent/V2/OpenClawAgentV2.node.js +2059 -0
- package/dist/nodes/agents/OpenClawAgent/V2/OpenClawAgentV2.node.js.map +1 -0
- package/dist/nodes/agents/OpenClawAgent/channels/TelegramChannel/TelegramChannel.node.js +329 -0
- package/dist/nodes/agents/OpenClawAgent/channels/TelegramChannel/TelegramChannel.node.js.map +1 -0
- package/dist/nodes/agents/OpenClawAgent/channels/TelegramChannel/telegram-channel.svg +4 -0
- package/dist/nodes/agents/OpenClawAgent/channels/WhatsAppChannel/WhatsAppChannel.node.js +108 -0
- package/dist/nodes/agents/OpenClawAgent/channels/WhatsAppChannel/WhatsAppChannel.node.js.map +1 -0
- package/dist/nodes/agents/OpenClawAgent/channels/WhatsAppChannel/whatsapp-channel.svg +3 -0
- package/dist/nodes/agents/OpenClawAgent/mcpServers/OpenClawMcpServer/OpenClawMcpServer.node.js +228 -0
- package/dist/nodes/agents/OpenClawAgent/mcpServers/OpenClawMcpServer/OpenClawMcpServer.node.js.map +1 -0
- package/dist/nodes/agents/OpenClawAgent/mcpServers/OpenClawMcpServer/openclaw-mcp-server.svg +9 -0
- package/dist/nodes/agents/OpenClawAgent/models/OpenCodeFreeModel/OpenCodeFreeModel.node.js +97 -0
- package/dist/nodes/agents/OpenClawAgent/models/OpenCodeFreeModel/OpenCodeFreeModel.node.js.map +1 -0
- package/dist/nodes/agents/OpenClawAgent/models/OpenCodeFreeModel/opencode-free-model.svg +1 -0
- package/dist/nodes/agents/OpenClawAgent/openclaw.svg +8 -0
- package/dist/nodes/agents/OpenClawAgent/plugins/OpenClawPlugin/OpenClawPlugin.node.js +261 -0
- package/dist/nodes/agents/OpenClawAgent/plugins/OpenClawPlugin/OpenClawPlugin.node.js.map +1 -0
- package/dist/nodes/agents/OpenClawAgent/plugins/OpenClawPlugin/openclaw-plugin.svg +3 -0
- package/dist/nodes/llms/LmChat9Router/LmChat9Router.node.js +40 -3
- package/dist/nodes/llms/LmChat9Router/LmChat9Router.node.js.map +1 -1
- package/dist/types/nodes.json +8 -1
- package/package.json +17 -11
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../nodes/agents/OpenClawAgent/V1/OpenClawAgentV1.node.ts"],"sourcesContent":["import { spawn, type ChildProcess } from 'child_process';\nimport { randomUUID } from 'crypto';\nimport { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from 'fs';\nimport { delimiter, dirname, join } from 'path';\n\nimport {\n\tApplicationError,\n\tNodeConnectionTypes,\n\tNodeOperationError,\n\tjsonParse,\n\ttype IDataObject,\n\ttype IExecuteFunctions,\n\ttype INodeExecutionData,\n\ttype INodeType,\n\ttype INodeTypeBaseDescription,\n\ttype INodeTypeDescription,\n\ttype ITriggerFunctions,\n\ttype ITriggerResponse,\n} from 'n8n-workflow';\n\ninterface OpenClawProcessResult {\n\tstdout: string;\n\tstderr: string;\n\texitCode: number | null;\n\tsignal: NodeJS.Signals | null;\n\tcommand: string;\n}\n\ninterface ResolvedBinary {\n\tbinaryPath: string;\n\tpathDirectories: string[];\n}\n\ntype SelectorType = 'agent' | 'sessionId' | 'recipient' | 'default';\n\nconst selectorTypeToParameterName: Record<Exclude<SelectorType, 'default'>, string> = {\n\tagent: 'agentId',\n\tsessionId: 'sessionId',\n\trecipient: 'to',\n};\n\nconst selectorTypeToCliFlag: Record<Exclude<SelectorType, 'default'>, string> = {\n\tagent: '--agent',\n\tsessionId: '--session-id',\n\trecipient: '--to',\n};\n\nconst DEFAULT_TIMEOUT_SECONDS = 300;\nconst CLI_SHUTDOWN_GRACE_SECONDS = 90;\nconst GATEWAY_RESTART_TIMEOUT_SECONDS = 60;\nconst TELEGRAM_CREDENTIAL_TYPE = 'telegramApi';\nconst OPENCLAW_CONFIG_PATH_ENV = 'OPENCLAW_CONFIG_PATH';\nconst OPENCLAW_DEFAULT_ACCOUNT_ID = 'default';\n\nfunction isObject(value: unknown): value is Record<string, unknown> {\n\treturn typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction getErrorMessage(error: unknown): string {\n\tif (error instanceof Error) {\n\t\treturn error.message;\n\t}\n\n\treturn String(error);\n}\n\nfunction normalizeOptionalString(value: unknown): string | undefined {\n\tif (typeof value !== 'string') {\n\t\treturn undefined;\n\t}\n\n\tconst trimmed = value.trim();\n\treturn trimmed || undefined;\n}\n\nfunction getOpenClawConfigPath(): string | undefined {\n\tconst configuredPath = normalizeOptionalString(process.env[OPENCLAW_CONFIG_PATH_ENV]);\n\tif (configuredPath) {\n\t\treturn configuredPath;\n\t}\n\n\tconst home = getHomeDirectory();\n\treturn home ? join(home, '.openclaw', 'openclaw.json') : undefined;\n}\n\nfunction ensureDataObject(parent: IDataObject, key: string): IDataObject {\n\tconst existing = parent[key];\n\tif (isObject(existing)) {\n\t\treturn existing as IDataObject;\n\t}\n\n\tconst next: IDataObject = {};\n\tparent[key] = next;\n\treturn next;\n}\n\nfunction setConfigValue(target: IDataObject, key: string, value: unknown): boolean {\n\tif (target[key] === value) {\n\t\treturn false;\n\t}\n\n\ttarget[key] = value as IDataObject[string];\n\treturn true;\n}\n\nfunction setDefaultConfigValue(target: IDataObject, key: string, value: unknown): boolean {\n\tif (target[key] !== undefined) {\n\t\treturn false;\n\t}\n\n\ttarget[key] = value as IDataObject[string];\n\treturn true;\n}\n\nfunction normalizeOpenClawAccountId(value: string | undefined): string | undefined {\n\tconst trimmed = normalizeOptionalString(value)?.toLowerCase();\n\tif (!trimmed) {\n\t\treturn undefined;\n\t}\n\n\tconst normalized = trimmed\n\t\t.replace(/[^a-z0-9_-]+/g, '-')\n\t\t.replace(/^-+/, '')\n\t\t.replace(/-+$/, '')\n\t\t.slice(0, 64);\n\n\tif (!normalized || ['__proto__', 'constructor', 'prototype'].includes(normalized)) {\n\t\treturn undefined;\n\t}\n\n\treturn normalized;\n}\n\nfunction readOpenClawConfig(configPath: string): IDataObject {\n\tif (!existsSync(configPath)) {\n\t\treturn {};\n\t}\n\n\tconst rawConfig = readFileSync(configPath, 'utf8').trim();\n\tif (!rawConfig) {\n\t\treturn {};\n\t}\n\n\tconst parsed = jsonParse<unknown>(rawConfig, { acceptJSObject: true, repairJSON: true });\n\tif (!isObject(parsed)) {\n\t\tthrow new ApplicationError(`OpenClaw config is not an object: ${configPath}`);\n\t}\n\n\treturn parsed as IDataObject;\n}\n\nfunction syncTelegramChannelConfig(params: {\n\tbotToken: string;\n\treplyAccount?: string;\n}): { accountId?: string; changed: boolean; configPath: string } {\n\tconst configPath = getOpenClawConfigPath();\n\tif (!configPath) {\n\t\tthrow new ApplicationError(\n\t\t\t`Could not determine OpenClaw config path. Set ${OPENCLAW_CONFIG_PATH_ENV} or HOME for the n8n process.`,\n\t\t);\n\t}\n\n\tconst config = readOpenClawConfig(configPath);\n\tconst channels = ensureDataObject(config, 'channels');\n\tconst telegram = ensureDataObject(channels, 'telegram');\n\tconst accountId = normalizeOpenClawAccountId(params.replyAccount);\n\n\tlet changed = false;\n\tchanged = setConfigValue(telegram, 'enabled', true) || changed;\n\tchanged = setDefaultConfigValue(telegram, 'dmPolicy', 'pairing') || changed;\n\tchanged = setDefaultConfigValue(telegram, 'groupPolicy', 'allowlist') || changed;\n\n\tif (accountId && accountId !== OPENCLAW_DEFAULT_ACCOUNT_ID) {\n\t\tconst accounts = ensureDataObject(telegram, 'accounts');\n\t\tconst account = ensureDataObject(accounts, accountId);\n\t\tchanged = setConfigValue(account, 'enabled', true) || changed;\n\t\tchanged = setConfigValue(account, 'botToken', params.botToken) || changed;\n\t} else {\n\t\tchanged = setConfigValue(telegram, 'botToken', params.botToken) || changed;\n\t}\n\n\tif (changed) {\n\t\tmkdirSync(dirname(configPath), { recursive: true });\n\t\twriteFileSync(configPath, `${JSON.stringify(config, null, 2)}\\n`, 'utf8');\n\t}\n\n\treturn { accountId, changed, configPath };\n}\n\nfunction parseOpenClawOutput(stdout: string): IDataObject {\n\tconst trimmed = stdout.trim();\n\tif (!trimmed) {\n\t\treturn {};\n\t}\n\n\tconst parsed = jsonParse<unknown>(trimmed);\n\tif (isObject(parsed)) {\n\t\treturn parsed as IDataObject;\n\t}\n\n\treturn { result: parsed as object };\n}\n\nfunction isUsableFile(filePath: string): boolean {\n\ttry {\n\t\treturn existsSync(filePath) && statSync(filePath).isFile();\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nfunction getHomeDirectory(): string | undefined {\n\treturn (\n\t\tnormalizeOptionalString(process.env.HOME) ?? normalizeOptionalString(process.env.USERPROFILE)\n\t);\n}\n\nfunction getDefaultBinarySearchPaths(binaryName: string): string[] {\n\tconst home = getHomeDirectory();\n\tconst homeCandidates = home\n\t\t? [\n\t\t\t\tjoin(home, '.volta', 'bin', binaryName),\n\t\t\t\tjoin(home, '.local', 'bin', binaryName),\n\t\t\t\tjoin(home, '.npm-global', 'bin', binaryName),\n\t\t\t\tjoin(home, '.bun', 'bin', binaryName),\n\t\t\t\tjoin(home, 'Library', 'pnpm', binaryName),\n\t\t\t]\n\t\t: [];\n\n\treturn [\n\t\tnormalizeOptionalString(process.env.OPENCLAW_BINARY_PATH),\n\t\tnormalizeOptionalString(process.env.OPENCLAW_BIN),\n\t\t...(process.env.PATH ?? '')\n\t\t\t.split(delimiter)\n\t\t\t.filter(Boolean)\n\t\t\t.map((pathDirectory) => join(pathDirectory, binaryName)),\n\t\t...homeCandidates,\n\t\tjoin('/opt/homebrew/bin', binaryName),\n\t\tjoin('/usr/local/bin', binaryName),\n\t].filter((candidate): candidate is string => typeof candidate === 'string');\n}\n\nfunction resolveOpenClawBinary(binaryPath: string): ResolvedBinary {\n\tif (binaryPath.includes('/') || binaryPath.includes('\\\\')) {\n\t\treturn {\n\t\t\tbinaryPath,\n\t\t\tpathDirectories: [dirname(binaryPath)],\n\t\t};\n\t}\n\n\tfor (const candidate of getDefaultBinarySearchPaths(binaryPath)) {\n\t\tif (isUsableFile(candidate)) {\n\t\t\treturn {\n\t\t\t\tbinaryPath: candidate,\n\t\t\t\tpathDirectories: [dirname(candidate)],\n\t\t\t};\n\t\t}\n\t}\n\n\treturn {\n\t\tbinaryPath,\n\t\tpathDirectories: [],\n\t};\n}\n\nfunction createOpenClawProcessEnv(\n\tpathDirectories: string[],\n\tadditionalEnv: NodeJS.ProcessEnv = {},\n): NodeJS.ProcessEnv {\n\tconst existingPath = process.env.PATH ?? '';\n\tconst prependedPath = pathDirectories.filter(Boolean).join(delimiter);\n\tconst nextPath = prependedPath ? `${prependedPath}${delimiter}${existingPath}` : existingPath;\n\n\treturn {\n\t\t...process.env,\n\t\t...additionalEnv,\n\t\tPATH: nextPath,\n\t};\n}\n\nfunction killOpenClawProcess(child: ChildProcess, signal: NodeJS.Signals): void {\n\ttry {\n\t\tif (child.pid && process.platform !== 'win32') {\n\t\t\tprocess.kill(-child.pid, signal);\n\t\t\treturn;\n\t\t}\n\t} catch {\n\t\t// Fall back to killing only the direct child below.\n\t}\n\n\ttry {\n\t\tchild.kill(signal);\n\t} catch {\n\t\t// The process may have exited between timeout and signal delivery.\n\t}\n}\n\nfunction summarizeProcessOutput(output: string): string {\n\tconst trimmed = output.trim();\n\tif (!trimmed) {\n\t\treturn '';\n\t}\n\n\tconst maxLength = 2000;\n\tif (trimmed.length <= maxLength) {\n\t\treturn trimmed;\n\t}\n\n\treturn `${trimmed.slice(0, maxLength)}...`;\n}\n\nfunction getWatchdogTimeoutMs(timeoutSeconds: number): number {\n\t// OpenClaw may use the CLI timeout for the agent turn while still needing time\n\t// to return the gateway result and clean up local resources.\n\treturn (timeoutSeconds + CLI_SHUTDOWN_GRACE_SECONDS) * 1000;\n}\n\nfunction getGatewayCallArgs(params: IDataObject, rpcTimeoutMs: number): string[] {\n\treturn [\n\t\t'gateway',\n\t\t'call',\n\t\t'agent',\n\t\t'--expect-final',\n\t\t'--json',\n\t\t'--timeout',\n\t\tString(rpcTimeoutMs),\n\t\t'--params',\n\t\tJSON.stringify(params),\n\t];\n}\n\nfunction quoteCommandArgument(value: string): string {\n\tif (/^[A-Za-z0-9_/:=-]+$/.test(value)) {\n\t\treturn value;\n\t}\n\n\treturn `'${value.replaceAll(\"'\", \"'\\\\''\")}'`;\n}\n\nfunction getOpenClawCommand(binaryPath: string, args: string[]): string {\n\treturn [binaryPath, ...args].map(quoteCommandArgument).join(' ');\n}\n\nasync function runOpenClawCli(params: {\n\tbinaryPath: string;\n\targs: string[];\n\tcwd?: string;\n\ttimeoutMs: number;\n\tenv?: NodeJS.ProcessEnv;\n\tabortSignal?: AbortSignal;\n}): Promise<OpenClawProcessResult> {\n\treturn await new Promise<OpenClawProcessResult>((resolve, reject) => {\n\t\tconst resolvedBinary = resolveOpenClawBinary(params.binaryPath);\n\t\tconst command = getOpenClawCommand(resolvedBinary.binaryPath, params.args);\n\t\tconst child = spawn(resolvedBinary.binaryPath, params.args, {\n\t\t\tcwd: params.cwd,\n\t\t\tdetached: process.platform !== 'win32',\n\t\t\tstdio: ['ignore', 'pipe', 'pipe'],\n\t\t\tenv: createOpenClawProcessEnv(resolvedBinary.pathDirectories, params.env),\n\t\t});\n\n\t\tlet stdout = '';\n\t\tlet stderr = '';\n\t\tlet aborted = false;\n\t\tlet timedOut = false;\n\t\tlet forceKillTimer: NodeJS.Timeout | undefined;\n\n\t\tconst abortHandler = () => {\n\t\t\taborted = true;\n\t\t\tkillOpenClawProcess(child, 'SIGTERM');\n\t\t};\n\n\t\tconst timeoutTimer = setTimeout(() => {\n\t\t\ttimedOut = true;\n\t\t\tkillOpenClawProcess(child, 'SIGTERM');\n\t\t\tforceKillTimer = setTimeout(() => {\n\t\t\t\tkillOpenClawProcess(child, 'SIGKILL');\n\t\t\t}, 5000);\n\t\t}, params.timeoutMs);\n\n\t\tparams.abortSignal?.addEventListener('abort', abortHandler, { once: true });\n\n\t\tchild.stdout.on('data', (data: Buffer) => {\n\t\t\tstdout += data.toString();\n\t\t});\n\n\t\tchild.stderr.on('data', (data: Buffer) => {\n\t\t\tstderr += data.toString();\n\t\t});\n\n\t\tchild.on('error', (error: Error) => {\n\t\t\tclearTimeout(timeoutTimer);\n\t\t\tif (forceKillTimer) {\n\t\t\t\tclearTimeout(forceKillTimer);\n\t\t\t}\n\t\t\tparams.abortSignal?.removeEventListener('abort', abortHandler);\n\t\t\treject(\n\t\t\t\tnew Error(\n\t\t\t\t\t`Failed to spawn OpenClaw CLI at \"${resolvedBinary.binaryPath}\": ${error.message}. Set Options > Binary Path to the full path of the openclaw executable, or set OPENCLAW_BINARY_PATH in the n8n process environment.`,\n\t\t\t\t),\n\t\t\t);\n\t\t});\n\n\t\tchild.on('close', (exitCode: number | null, signal: NodeJS.Signals | null) => {\n\t\t\tclearTimeout(timeoutTimer);\n\t\t\tif (forceKillTimer) {\n\t\t\t\tclearTimeout(forceKillTimer);\n\t\t\t}\n\t\t\tparams.abortSignal?.removeEventListener('abort', abortHandler);\n\n\t\t\tif (aborted) {\n\t\t\t\treject(new Error('OpenClaw CLI execution was cancelled'));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (timedOut) {\n\t\t\t\tconst stderrSummary = summarizeProcessOutput(stderr);\n\t\t\t\tconst stdoutSummary = summarizeProcessOutput(stdout);\n\t\t\t\tconst details =\n\t\t\t\t\tstderrSummary || stdoutSummary ? ` Last output: ${stderrSummary || stdoutSummary}` : '';\n\t\t\t\treject(\n\t\t\t\t\tnew Error(\n\t\t\t\t\t\t`OpenClaw CLI did not finish within ${Math.ceil(params.timeoutMs / 1000)} seconds and was stopped.${details}`,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tresolve({ stdout, stderr, exitCode, signal, command });\n\t\t});\n\t});\n}\n\nexport class OpenClawAgentV1 implements INodeType {\n\tdescription: INodeTypeDescription;\n\n\tconstructor(baseDescription: INodeTypeBaseDescription) {\n\t\tthis.description = {\n\t\t\t...baseDescription,\n\t\t\tversion: 1,\n\t\t\tsubtitle:\n\t\t\t\t'={{$parameter.selectorType === \"agent\" ? \"Agent: \" + $parameter.agentId : $parameter.selectorType === \"sessionId\" ? \"Session: \" + $parameter.sessionId : $parameter.selectorType === \"recipient\" ? \"To: \" + $parameter.to : \"Default route\"}}',\n\t\t\tdefaults: {\n\t\t\t\tname: 'OpenClaw AI Agent',\n\t\t\t},\n\t\t\tcodex: {\n\t\t\t\talias: ['OpenClaw', 'Agent', 'Gateway', 'Assistant'],\n\t\t\t\tcategories: ['AI'],\n\t\t\t\tsubcategories: {\n\t\t\t\t\tAI: ['Agents', 'Root Nodes'],\n\t\t\t\t},\n\t\t\t\tresources: {\n\t\t\t\t\tprimaryDocumentation: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\turl: 'https://docs.openclaw.ai/cli/agent',\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\tinputs: [NodeConnectionTypes.Main],\n\t\t\toutputs: [NodeConnectionTypes.Main],\n\t\t\tcredentials: [\n\t\t\t\t{\n\t\t\t\t\tname: TELEGRAM_CREDENTIAL_TYPE,\n\t\t\t\t\tdisplayName: 'Telegram Credential',\n\t\t\t\t\trequired: false,\n\t\t\t\t},\n\t\t\t],\n\t\t\tproperties: [\n\t\t\t\t{\n\t\t\t\t\tdisplayName:\n\t\t\t\t\t\t'Requires the OpenClaw CLI to be installed and configured on the n8n host. The node runs <code>openclaw agent --json</code> and returns OpenClaw payloads and metadata.',\n\t\t\t\t\tname: 'openClawNotice',\n\t\t\t\t\ttype: 'notice',\n\t\t\t\t\tdefault: '',\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\t\t'={{ $json.chatInput || $json.chat_input || $json.message || $json.text || \"\" }}',\n\t\t\t\t\tdescription: 'Message body to send to the OpenClaw agent',\n\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\trows: 5,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Route By',\n\t\t\t\t\tname: 'selectorType',\n\t\t\t\t\ttype: 'options',\n\t\t\t\t\tdefault: 'agent',\n\t\t\t\t\tnoDataExpression: true,\n\t\t\t\t\tdescription: 'How to target the OpenClaw agent turn',\n\t\t\t\t\toptions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Agent ID',\n\t\t\t\t\t\t\tvalue: 'agent',\n\t\t\t\t\t\t\tdescription: 'Run against a configured OpenClaw agent',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Existing Session ID',\n\t\t\t\t\t\t\tvalue: 'sessionId',\n\t\t\t\t\t\t\tdescription: 'Continue an existing OpenClaw session',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'Recipient',\n\t\t\t\t\t\t\tvalue: 'recipient',\n\t\t\t\t\t\t\tdescription: 'Use a recipient/channel target to derive the session',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: 'OpenClaw Default',\n\t\t\t\t\t\t\tvalue: 'default',\n\t\t\t\t\t\t\tdescription: 'Let OpenClaw choose its default route',\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: 'Agent ID',\n\t\t\t\t\tname: 'agentId',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: 'main',\n\t\t\t\t\tdescription: 'Configured OpenClaw agent ID',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tselectorType: ['agent'],\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: 'Session ID',\n\t\t\t\t\tname: 'sessionId',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tdescription: 'OpenClaw session ID to continue',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tselectorType: ['sessionId'],\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: 'Recipient',\n\t\t\t\t\tname: 'to',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tdescription: 'Recipient or channel target passed to OpenClaw as --to',\n\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\tselectorType: ['recipient'],\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: 'Model',\n\t\t\t\t\tname: 'model',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: 'openai-codex/gpt-5.5',\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'Model override for this run. Use an OpenClaw model reference such as openai-codex/gpt-5.5.',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Thinking Level',\n\t\t\t\t\tname: 'thinking',\n\t\t\t\t\ttype: 'options',\n\t\t\t\t\tdefault: '',\n\t\t\t\t\tdescription: 'Optional OpenClaw thinking level override for this run',\n\t\t\t\t\toptions: [\n\t\t\t\t\t\t{ name: 'Adaptive', value: 'adaptive' },\n\t\t\t\t\t\t{ name: 'Extra High', value: 'xhigh' },\n\t\t\t\t\t\t{ name: 'High', value: 'high' },\n\t\t\t\t\t\t{ name: 'Low', value: 'low' },\n\t\t\t\t\t\t{ name: 'Max', value: 'max' },\n\t\t\t\t\t\t{ name: 'Medium', value: 'medium' },\n\t\t\t\t\t\t{ name: 'Minimal', value: 'minimal' },\n\t\t\t\t\t\t{ name: 'Off', value: 'off' },\n\t\t\t\t\t\t{ name: 'Use OpenClaw Default', value: '' },\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Run Locally',\n\t\t\t\t\tname: 'local',\n\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\tdefault: false,\n\t\t\t\t\tdescription: 'Whether to force OpenClaw embedded local runtime instead of Gateway mode',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Deliver Reply',\n\t\t\t\t\tname: 'deliver',\n\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\tdefault: false,\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'Whether OpenClaw should deliver the reply back to the selected channel/target',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Options',\n\t\t\t\t\tname: 'options',\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\toptions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'System Message',\n\t\t\t\t\t\t\tname: 'systemMessage',\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:\n\t\t\t\t\t\t\t\t'Additional system instructions for this OpenClaw run. When set, the node sends the run through the OpenClaw Gateway agent RPC so the instructions are passed as extraSystemPrompt.',\n\t\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\t\trows: 5,\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: 'Binary Path',\n\t\t\t\t\t\t\tname: 'binaryPath',\n\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\tdefault: 'openclaw',\n\t\t\t\t\t\t\tdescription: 'Path to the openclaw binary. Defaults to \"openclaw\" in PATH.',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Working Directory',\n\t\t\t\t\t\t\tname: 'workingDirectory',\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:\n\t\t\t\t\t\t\t\t'Working directory for the OpenClaw process. Leave empty to use n8n default.',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Timeout',\n\t\t\t\t\t\t\tname: 'timeout',\n\t\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\t\tdefault: DEFAULT_TIMEOUT_SECONDS,\n\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t'OpenClaw agent timeout in seconds. The node allows extra time for the CLI to return the final gateway result before stopping the process.',\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},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Channel',\n\t\t\t\t\t\t\tname: 'channel',\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: 'Delivery channel passed to OpenClaw as --channel',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Reply To',\n\t\t\t\t\t\t\tname: 'replyTo',\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: 'Delivery target override passed to OpenClaw as --reply-to',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Reply Channel',\n\t\t\t\t\t\t\tname: 'replyChannel',\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: 'Delivery channel override passed to OpenClaw as --reply-channel',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Reply Account',\n\t\t\t\t\t\t\tname: 'replyAccount',\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: 'Delivery account ID override passed to OpenClaw as --reply-account',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdisplayName: 'Verbose',\n\t\t\t\t\t\t\tname: 'verbose',\n\t\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\tdescription: 'Optional OpenClaw verbose setting to persist for the session',\n\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t{ name: 'Full', value: 'full' },\n\t\t\t\t\t\t\t\t{ name: 'Leave Unchanged', value: '' },\n\t\t\t\t\t\t\t\t{ name: 'Off', value: 'off' },\n\t\t\t\t\t\t\t\t{ name: 'On', value: 'on' },\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: 'Include Raw Output',\n\t\t\t\t\t\t\tname: 'includeRawOutput',\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:\n\t\t\t\t\t\t\t\t'Whether to include raw stdout and stderr from the OpenClaw CLI in the output',\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};\n\t}\n\n\tasync trigger(this: ITriggerFunctions): Promise<ITriggerResponse> {\n\t\tconst node = this.getNode();\n\t\tconsole.log('[OpenClawAgentV1] trigger activation registered', {\n\t\t\tnodeName: node.name,\n\t\t\tworkflowId: this.getWorkflow().id,\n\t\t\tactivationMode: this.getActivationMode(),\n\t\t});\n\n\t\treturn {\n\t\t\tcloseFunction: async () => {\n\t\t\t\tconsole.log('[OpenClawAgentV1] trigger activation closed', {\n\t\t\t\t\tnodeName: node.name,\n\t\t\t\t\tworkflowId: this.getWorkflow().id,\n\t\t\t\t});\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 returnData: INodeExecutionData[] = [];\n\n\t\tfor (let itemIndex = 0; itemIndex < items.length; itemIndex++) {\n\t\t\ttry {\n\t\t\t\tconst message = normalizeOptionalString(this.getNodeParameter('message', itemIndex));\n\t\t\t\tif (!message) {\n\t\t\t\t\tthrow new NodeOperationError(this.getNode(), 'Message must not be empty', { itemIndex });\n\t\t\t\t}\n\n\t\t\t\tconst openClawEnv: NodeJS.ProcessEnv = {};\n\t\t\t\tlet telegramBotToken: string | undefined;\n\t\t\t\tconst telegramCredentialSelection = this.getNode().credentials?.[TELEGRAM_CREDENTIAL_TYPE];\n\t\t\t\tif (telegramCredentialSelection) {\n\t\t\t\t\tconst telegramCredential = await this.getCredentials<{ accessToken?: string }>(\n\t\t\t\t\t\tTELEGRAM_CREDENTIAL_TYPE,\n\t\t\t\t\t\titemIndex,\n\t\t\t\t\t);\n\t\t\t\t\tconst accessToken = normalizeOptionalString(telegramCredential.accessToken);\n\t\t\t\t\tif (!accessToken) {\n\t\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t\t\t'Telegram Credential access token must not be empty',\n\t\t\t\t\t\t\t{ itemIndex },\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\ttelegramBotToken = accessToken;\n\t\t\t\t\topenClawEnv.TELEGRAM_BOT_TOKEN = accessToken;\n\t\t\t\t}\n\n\t\t\t\tlet args = ['agent', '--message', message, '--json'];\n\t\t\t\tlet processTimeoutMs: number | undefined;\n\t\t\t\tlet telegramConfigChanged = false;\n\t\t\t\tconst gatewayParams: IDataObject = {\n\t\t\t\t\tmessage,\n\t\t\t\t\tidempotencyKey: randomUUID(),\n\t\t\t\t};\n\t\t\t\tconst selectorType = this.getNodeParameter('selectorType', itemIndex) as SelectorType;\n\t\t\t\tif (selectorType !== 'default') {\n\t\t\t\t\tconst parameterName = selectorTypeToParameterName[selectorType];\n\t\t\t\t\tconst value = normalizeOptionalString(this.getNodeParameter(parameterName, itemIndex));\n\t\t\t\t\tif (!value) {\n\t\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t\t\t`${parameterName} must not be empty when Route By is ${selectorType}`,\n\t\t\t\t\t\t\t{ itemIndex },\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\targs.push(selectorTypeToCliFlag[selectorType], value);\n\t\t\t\t\tif (selectorType === 'agent') {\n\t\t\t\t\t\tgatewayParams.agentId = value;\n\t\t\t\t\t} else if (selectorType === 'sessionId') {\n\t\t\t\t\t\tgatewayParams.sessionId = value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tgatewayParams.to = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst model = normalizeOptionalString(this.getNodeParameter('model', itemIndex));\n\t\t\t\tif (model) {\n\t\t\t\t\targs.push('--model', model);\n\t\t\t\t\tgatewayParams.model = model;\n\t\t\t\t}\n\n\t\t\t\tconst thinking = normalizeOptionalString(this.getNodeParameter('thinking', itemIndex));\n\t\t\t\tif (thinking) {\n\t\t\t\t\targs.push('--thinking', thinking);\n\t\t\t\t\tgatewayParams.thinking = thinking;\n\t\t\t\t}\n\n\t\t\t\tconst runLocally = this.getNodeParameter('local', itemIndex, false) === true;\n\t\t\t\tif (runLocally) {\n\t\t\t\t\targs.push('--local');\n\t\t\t\t}\n\n\t\t\t\tconst deliverReply = this.getNodeParameter('deliver', itemIndex, false) === true;\n\t\t\t\tif (deliverReply) {\n\t\t\t\t\targs.push('--deliver');\n\t\t\t\t\tgatewayParams.deliver = true;\n\t\t\t\t}\n\n\t\t\t\tconst timeout = Number(\n\t\t\t\t\tthis.getNodeParameter('options.timeout', itemIndex, DEFAULT_TIMEOUT_SECONDS),\n\t\t\t\t);\n\t\t\t\tconst timeoutSeconds =\n\t\t\t\t\tNumber.isFinite(timeout) && timeout > 0 ? Math.floor(timeout) : DEFAULT_TIMEOUT_SECONDS;\n\t\t\t\targs.push('--timeout', String(timeoutSeconds));\n\t\t\t\tgatewayParams.timeout = timeoutSeconds;\n\n\t\t\t\tconst channel = normalizeOptionalString(\n\t\t\t\t\tthis.getNodeParameter('options.channel', itemIndex, ''),\n\t\t\t\t);\n\t\t\t\tif (channel) {\n\t\t\t\t\targs.push('--channel', channel);\n\t\t\t\t\tgatewayParams.channel = channel;\n\t\t\t\t}\n\n\t\t\t\tconst replyTo = normalizeOptionalString(\n\t\t\t\t\tthis.getNodeParameter('options.replyTo', itemIndex, ''),\n\t\t\t\t);\n\t\t\t\tif (replyTo) {\n\t\t\t\t\targs.push('--reply-to', replyTo);\n\t\t\t\t\tgatewayParams.replyTo = replyTo;\n\t\t\t\t}\n\n\t\t\t\tlet replyChannel = normalizeOptionalString(\n\t\t\t\t\tthis.getNodeParameter('options.replyChannel', itemIndex, ''),\n\t\t\t\t);\n\t\t\t\tif (!replyChannel && !channel && deliverReply && telegramBotToken) {\n\t\t\t\t\treplyChannel = 'telegram';\n\t\t\t\t}\n\t\t\t\tif (replyChannel) {\n\t\t\t\t\targs.push('--reply-channel', replyChannel);\n\t\t\t\t\tgatewayParams.replyChannel = replyChannel;\n\t\t\t\t}\n\n\t\t\t\tconst configuredReplyAccount = normalizeOptionalString(\n\t\t\t\t\tthis.getNodeParameter('options.replyAccount', itemIndex, ''),\n\t\t\t\t);\n\t\t\t\tconst deliveryChannel = normalizeOptionalString(replyChannel ?? channel)?.toLowerCase();\n\t\t\t\tconst replyAccount = configuredReplyAccount;\n\t\t\t\tlet effectiveReplyAccount = replyAccount;\n\t\t\t\tif (telegramBotToken) {\n\t\t\t\t\tconst telegramConfigSync = syncTelegramChannelConfig({\n\t\t\t\t\t\tbotToken: telegramBotToken,\n\t\t\t\t\t\treplyAccount: deliveryChannel === 'telegram' ? replyAccount : undefined,\n\t\t\t\t\t});\n\t\t\t\t\ttelegramConfigChanged = telegramConfigSync.changed || telegramConfigChanged;\n\t\t\t\t\tif (telegramConfigSync.accountId && deliveryChannel === 'telegram') {\n\t\t\t\t\t\teffectiveReplyAccount = telegramConfigSync.accountId;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (effectiveReplyAccount) {\n\t\t\t\t\targs.push('--reply-account', effectiveReplyAccount);\n\t\t\t\t\tgatewayParams.replyAccountId = effectiveReplyAccount;\n\t\t\t\t}\n\n\t\t\t\tconst verbose = normalizeOptionalString(\n\t\t\t\t\tthis.getNodeParameter('options.verbose', itemIndex, ''),\n\t\t\t\t);\n\t\t\t\tif (verbose) {\n\t\t\t\t\targs.push('--verbose', verbose);\n\t\t\t\t}\n\n\t\t\t\tconst binaryPath =\n\t\t\t\t\tnormalizeOptionalString(this.getNodeParameter('options.binaryPath', itemIndex, '')) ??\n\t\t\t\t\t'openclaw';\n\t\t\t\tconst workingDirectory = normalizeOptionalString(\n\t\t\t\t\tthis.getNodeParameter('options.workingDirectory', itemIndex, ''),\n\t\t\t\t);\n\n\t\t\t\tif (\n\t\t\t\t\tworkingDirectory &&\n\t\t\t\t\t(!existsSync(workingDirectory) || !statSync(workingDirectory).isDirectory())\n\t\t\t\t) {\n\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t\t`Working directory does not exist or is not a directory: ${workingDirectory}`,\n\t\t\t\t\t\t{ itemIndex },\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (telegramConfigChanged && !runLocally) {\n\t\t\t\t\tconst restartResult = await runOpenClawCli({\n\t\t\t\t\t\tbinaryPath,\n\t\t\t\t\t\targs: ['gateway', 'restart'],\n\t\t\t\t\t\tcwd: workingDirectory,\n\t\t\t\t\t\ttimeoutMs: GATEWAY_RESTART_TIMEOUT_SECONDS * 1000,\n\t\t\t\t\t\tenv: openClawEnv,\n\t\t\t\t\t\tabortSignal: this.getExecutionCancelSignal(),\n\t\t\t\t\t});\n\t\t\t\t\tif (restartResult.exitCode !== 0) {\n\t\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t\t\trestartResult.stderr.trim() ||\n\t\t\t\t\t\t\t\trestartResult.stdout.trim() ||\n\t\t\t\t\t\t\t\t`OpenClaw Gateway restart exited with code ${\n\t\t\t\t\t\t\t\t\trestartResult.exitCode ?? `signal ${restartResult.signal}`\n\t\t\t\t\t\t\t\t}`,\n\t\t\t\t\t\t\t{ itemIndex },\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst systemMessage = normalizeOptionalString(\n\t\t\t\t\tthis.getNodeParameter('options.systemMessage', itemIndex, ''),\n\t\t\t\t);\n\t\t\t\tif (systemMessage) {\n\t\t\t\t\tif (runLocally) {\n\t\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t\t\t'System Message is only supported in OpenClaw Gateway mode. Disable Run Locally to use it.',\n\t\t\t\t\t\t\t{ itemIndex },\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tgatewayParams.extraSystemPrompt = systemMessage;\n\t\t\t\t\tconst rpcTimeoutMs = getWatchdogTimeoutMs(timeoutSeconds);\n\t\t\t\t\targs = getGatewayCallArgs(gatewayParams, rpcTimeoutMs);\n\t\t\t\t\tprocessTimeoutMs = rpcTimeoutMs + 10_000;\n\t\t\t\t}\n\n\t\t\t\tconst result = await runOpenClawCli({\n\t\t\t\t\tbinaryPath,\n\t\t\t\t\targs,\n\t\t\t\t\tcwd: workingDirectory,\n\t\t\t\t\ttimeoutMs: processTimeoutMs ?? getWatchdogTimeoutMs(timeoutSeconds),\n\t\t\t\t\tenv: openClawEnv,\n\t\t\t\t\tabortSignal: this.getExecutionCancelSignal(),\n\t\t\t\t});\n\n\t\t\t\tif (result.exitCode !== 0) {\n\t\t\t\t\tconst messageFromStderr = result.stderr.trim();\n\t\t\t\t\tconst messageFromStdout = result.stdout.trim();\n\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t\tmessageFromStderr ||\n\t\t\t\t\t\t\tmessageFromStdout ||\n\t\t\t\t\t\t\t`OpenClaw CLI exited with code ${result.exitCode ?? `signal ${result.signal}`}`,\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 json = parseOpenClawOutput(result.stdout);\n\t\t\t\tjson.command = result.command;\n\t\t\t\tif (this.getNodeParameter('options.includeRawOutput', itemIndex, false) === true) {\n\t\t\t\t\tjson.rawOutput = {\n\t\t\t\t\t\tstdout: result.stdout,\n\t\t\t\t\t\tstderr: result.stderr,\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\treturnData.push({\n\t\t\t\t\tjson,\n\t\t\t\t\tpairedItem: { item: itemIndex },\n\t\t\t\t});\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: { error: getErrorMessage(error) },\n\t\t\t\t\t\tpairedItem: { item: itemIndex },\n\t\t\t\t\t});\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\n\t\treturn [returnData];\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAyC;AACzC,oBAA2B;AAC3B,gBAA6E;AAC7E,kBAAyC;AAEzC,0BAaO;AAiBP,MAAM,8BAAgF;AAAA,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