@tempad-dev/mcp 1.0.4 → 1.0.5

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.
Files changed (45) hide show
  1. package/README.md +5 -1
  2. package/README.zh-Hans.md +3 -1
  3. package/dist/{acquire-BtKFZ9Lz.mjs → acquire-C1v5UQB2.mjs} +1 -1
  4. package/dist/{acquire-DHwsqq0j.mjs → acquire-DK4Fg36-.mjs} +4 -4
  5. package/dist/{acquire-DHwsqq0j.mjs.map → acquire-DK4Fg36-.mjs.map} +1 -1
  6. package/dist/{bootstrap-B9-RyWlM.mjs → bootstrap-CNJpiOAm.mjs} +7 -7
  7. package/dist/{bootstrap-B9-RyWlM.mjs.map → bootstrap-CNJpiOAm.mjs.map} +1 -1
  8. package/dist/cli.mjs +4 -4
  9. package/dist/{cold-start-DOy9JsIQ.mjs → cold-start-BOLlW_0n.mjs} +4 -4
  10. package/dist/{cold-start-DOy9JsIQ.mjs.map → cold-start-BOLlW_0n.mjs.map} +1 -1
  11. package/dist/{cold-start-U3cW0q9T.mjs → cold-start-DeFnhN3x.mjs} +1 -1
  12. package/dist/{edge-CHzaTUFt.mjs → edge-DP-CwLYS.mjs} +1 -1
  13. package/dist/{edge-BUf7gs4J.mjs → edge-m9VuTeju.mjs} +5 -5
  14. package/dist/{edge-BUf7gs4J.mjs.map → edge-m9VuTeju.mjs.map} +1 -1
  15. package/dist/{hub-runtime-DsEO9zvX.mjs → hub-runtime-BBnfo1yd.mjs} +50 -26
  16. package/dist/hub-runtime-BBnfo1yd.mjs.map +1 -0
  17. package/dist/{hub-runtime-DjdqIgGl.mjs → hub-runtime-U3Set0EC.mjs} +1 -1
  18. package/dist/hub.mjs +2 -2
  19. package/dist/managed-runtime.mjs +10 -10
  20. package/dist/{probe-BeWkMbzQ.mjs → probe-CqjOWdnP.mjs} +4 -4
  21. package/dist/{probe-BeWkMbzQ.mjs.map → probe-CqjOWdnP.mjs.map} +1 -1
  22. package/dist/{processes-CBoalzSk.mjs → processes-BnvaDi81.mjs} +1 -1
  23. package/dist/{processes-BCCE8As7.mjs → processes-DOmrri5n.mjs} +6 -6
  24. package/dist/{processes-BCCE8As7.mjs.map → processes-DOmrri5n.mjs.map} +1 -1
  25. package/dist/runtime-installer.mjs +3 -3
  26. package/dist/runtime-manifest.json +49 -49
  27. package/dist/{runtime-platform-C-Yk9F3L.mjs → runtime-platform-CpunJOI4.mjs} +143 -43
  28. package/dist/runtime-platform-CpunJOI4.mjs.map +1 -0
  29. package/dist/runtime-verification.mjs +3 -3
  30. package/dist/{shared--othnF1c.mjs → shared-8_j_xlsJ.mjs} +8 -5
  31. package/dist/{shared--othnF1c.mjs.map → shared-8_j_xlsJ.mjs.map} +1 -1
  32. package/dist/{shared-S0dtOYq8.mjs → shared-Bvmw_Pv0.mjs} +1 -1
  33. package/dist/{startup-log-CYlFgdy5.mjs → startup-log-BI24ryBR.mjs} +2 -2
  34. package/dist/{startup-log-CYlFgdy5.mjs.map → startup-log-BI24ryBR.mjs.map} +1 -1
  35. package/dist/{startup-log-DqK2uwBd.mjs → startup-log-isQ9Wv18.mjs} +1 -1
  36. package/dist/{state-6qFcvi-I.mjs → state-4Dz7r-_n.mjs} +2 -2
  37. package/dist/{state-6qFcvi-I.mjs.map → state-4Dz7r-_n.mjs.map} +1 -1
  38. package/dist/{state-BrWBtYNG.mjs → state-DDpxeTVd.mjs} +1 -1
  39. package/dist/{supervisor-CesT-H5_.mjs → supervisor-Cu-xRt1k.mjs} +7 -7
  40. package/dist/{supervisor-CesT-H5_.mjs.map → supervisor-Cu-xRt1k.mjs.map} +1 -1
  41. package/dist/{task-storage-recovery-I9lpYYX6.mjs → task-storage-recovery-fSo2eskS.mjs} +2 -2
  42. package/dist/{task-storage-recovery-I9lpYYX6.mjs.map → task-storage-recovery-fSo2eskS.mjs.map} +1 -1
  43. package/package.json +1 -1
  44. package/dist/hub-runtime-DsEO9zvX.mjs.map +0 -1
  45. package/dist/runtime-platform-C-Yk9F3L.mjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime-platform-C-Yk9F3L.mjs","names":[],"sources":["../src/runtime-platform.ts"],"sourcesContent":["import { execFile, execFileSync } from 'node:child_process'\nimport { createHash, randomUUID } from 'node:crypto'\nimport { lstatSync, mkdirSync, realpathSync, rmSync } from 'node:fs'\nimport { tmpdir, userInfo } from 'node:os'\nimport { isAbsolute, join, resolve } from 'node:path'\n\nconst PIPE_PREFIX = '\\\\\\\\.\\\\pipe\\\\'\nconst checkedPermissions = new Map<string, ReturnType<typeof inspectPath>>()\n\n/** Runtime overrides must isolate pipes as well as files, including on one Windows account. */\nexport function runtimeEndpoint(\n directory: string,\n name: string,\n platform: NodeJS.Platform = process.platform,\n user = userInfo().username\n) {\n if (platform !== 'win32') return join(directory, name)\n const identity = createHash('sha256')\n .update(user)\n .update('\\0')\n .update(directory.replaceAll('/', '\\\\').toLowerCase())\n .update('\\0')\n .update(name)\n .digest('hex')\n .slice(0, 32)\n return `${PIPE_PREFIX}tempad-runtime-${identity}`\n}\n\nexport function isPipe(path: string) {\n return path.startsWith(PIPE_PREFIX)\n}\n\nfunction canonical(path: string) {\n const actual = realpathSync(path)\n return process.platform === 'win32'\n ? actual.toLowerCase() === resolve(path).toLowerCase()\n : actual === path\n}\n\n/** Check real Windows ACLs; chmod and stat.mode do not establish Windows privacy. */\nfunction inspectPath(path: string, kind: 'file' | 'directory') {\n if (!isAbsolute(path)) throw new Error('Runtime path must be absolute.')\n const stat = lstatSync(path, { bigint: true })\n if (\n stat.isSymbolicLink() ||\n !(kind === 'file' ? stat.isFile() : stat.isDirectory()) ||\n !canonical(path) ||\n (process.platform !== 'win32' && (stat.uid !== BigInt(process.getuid!()) || stat.mode & 0o077n))\n )\n throw new Error(`Refusing untrusted runtime ${kind}: ${path}`)\n return {\n identity: `${stat.dev}:${stat.ino}:${stat.birthtimeNs}:${kind}`,\n revision: stat.ctimeNs\n }\n}\n\nfunction rememberPermissions(path: string, state: ReturnType<typeof inspectPath>) {\n if (checkedPermissions.size >= 1024) checkedPermissions.clear()\n checkedPermissions.set(path, state)\n}\n\nfunction uncheckedPath(path: string, kind: 'file' | 'directory') {\n const state = inspectPath(path, kind)\n if (process.platform !== 'win32') return\n const cached = checkedPermissions.get(path)\n if (cached?.identity === state.identity && cached.revision === state.revision) return\n checkedPermissions.delete(path)\n return state\n}\n\nfunction checkedPath(\n path: string,\n kind: 'file' | 'directory',\n state: ReturnType<typeof inspectPath>\n) {\n const next = inspectPath(path, kind)\n if (next.identity !== state.identity)\n throw Object.assign(new Error(`Runtime ${kind} changed during its permission check: ${path}`), {\n code: 'ERUNTIMEPATHCHANGED'\n })\n if (next.revision === state.revision) {\n rememberPermissions(path, next)\n return\n }\n return next\n}\n\nexport function assertPrivatePath(path: string, kind: 'file' | 'directory') {\n let state = uncheckedPath(path, kind)\n if (!state) return\n for (let attempt = 0; attempt < 2; attempt++) {\n windowsSecurity('inspect', path, kind)\n // ChangeTime covers ACL edits and ordinary child creation. Recheck once when it\n // changes, rejecting replacement but leaving an actively changing object uncached.\n state = checkedPath(path, kind, state)\n if (!state) return\n }\n}\n\n/** Serving processes must let control leases renew while Windows checks permissions. */\nexport async function assertPrivatePathAsync(path: string, kind: 'file' | 'directory') {\n let state = uncheckedPath(path, kind)\n if (!state) return\n for (let attempt = 0; attempt < 2; attempt++) {\n await windowsSecurityAsync('inspect', path, kind)\n state = checkedPath(path, kind, state)\n if (!state) return\n }\n}\n\nexport function ensurePrivateDirectory(path: string) {\n if (!isAbsolute(path)) throw new Error('Runtime directory must be absolute.')\n if (process.platform !== 'win32') {\n mkdirSync(path, { recursive: true, mode: 0o700 })\n assertPrivatePath(path, 'directory')\n return\n }\n try {\n assertPrivatePath(path, 'directory')\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error\n windowsSecurity('ensure', path, 'directory')\n rememberPermissions(path, inspectPath(path, 'directory'))\n }\n}\n\nexport async function ensurePrivateDirectoryAsync(path: string) {\n if (process.platform !== 'win32') return ensurePrivateDirectory(path)\n try {\n await assertPrivatePathAsync(path, 'directory')\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw error\n await windowsSecurityAsync('ensure', path, 'directory')\n rememberPermissions(path, inspectPath(path, 'directory'))\n }\n}\n\nexport function createPrivateTempDirectory(prefix: string) {\n // macOS's per-user temp path leaves too little room for Unix socket names.\n const directory = process.platform === 'win32' ? tmpdir() : '/tmp'\n const path = join(realpathSync(directory), `${prefix}${randomUUID()}`)\n ensurePrivateDirectory(path)\n return path\n}\n\nexport function cleanupEndpoint(path: string) {\n if (!isPipe(path)) rmSync(path, { force: true })\n}\n\nexport function assertPrivateEndpoint(path: string) {\n if (!isPipe(path)) throw new Error('Expected a Windows runtime pipe.')\n windowsSecurity('inspect', path, 'pipe')\n}\n\nexport function protectPipe(path: string) {\n if (!isPipe(path)) throw new Error('Expected a Windows runtime pipe.')\n windowsSecurity('protect', path, 'pipe')\n}\n\nexport async function assertPrivateEndpointAsync(path: string, signal?: AbortSignal) {\n if (!isPipe(path)) throw new Error('Expected a Windows runtime pipe.')\n await windowsSecurityAsync('inspect', path, 'pipe', signal)\n}\n\nexport async function protectPipeAsync(path: string, signal?: AbortSignal) {\n if (!isPipe(path)) throw new Error('Expected a Windows runtime pipe.')\n await windowsSecurityAsync('protect', path, 'pipe', signal)\n}\n\nexport function windowsPowerShellEnvironment(env: NodeJS.ProcessEnv = process.env) {\n // PowerShell 7's module paths can load incompatible modules in Windows PowerShell 5.\n return Object.fromEntries(\n Object.entries(env).filter(([key]) => key.toLowerCase() !== 'psmodulepath')\n )\n}\n\n// Built-in Windows PowerShell supplies the platform ACL API without an npm/native dependency.\n// JSON stays in a child-only environment value, never executable source or shell arguments.\n// Helper input is independent of host stdio and the Windows console's input code page.\nfunction securityCommand(action: 'ensure' | 'inspect' | 'protect', path: string, kind: string) {\n const systemRoot = process.env.SystemRoot\n if (!systemRoot || !isAbsolute(systemRoot))\n throw new Error('Windows SystemRoot is required to verify private runtime storage.')\n return {\n file: join(systemRoot, 'System32', 'WindowsPowerShell', 'v1.0', 'powershell.exe'),\n args: [\n '-NoLogo',\n '-NoProfile',\n '-NonInteractive',\n '-EncodedCommand',\n Buffer.from(SECURITY_SCRIPT, 'utf16le').toString('base64')\n ],\n options: {\n encoding: 'utf8' as const,\n timeout: 15_000,\n maxBuffer: 64 * 1024,\n windowsHide: true,\n env: {\n ...windowsPowerShellEnvironment(),\n TEMPAD_RUNTIME_ACL_REQUEST: JSON.stringify({ action, path, kind })\n }\n }\n }\n}\n\nfunction windowsSecurity(action: 'ensure' | 'inspect' | 'protect', path: string, kind: string) {\n const { file, args, options } = securityCommand(action, path, kind)\n try {\n execFileSync(file, args, { ...options, stdio: ['ignore', 'pipe', 'pipe'] })\n } catch (cause) {\n throw securityFailure(cause, path, kind)\n }\n}\n\nasync function windowsSecurityAsync(\n action: 'ensure' | 'inspect' | 'protect',\n path: string,\n kind: string,\n signal?: AbortSignal\n) {\n const { file, args, options } = securityCommand(action, path, kind)\n await new Promise<void>((resolve, reject) => {\n const child = execFile(file, args, { ...options, signal }, (error, stdout, stderr) => {\n if (error) reject(securityFailure(Object.assign(error, { stdout, stderr }), path, kind))\n else resolve()\n })\n child.stdin?.end()\n })\n}\n\nfunction securityFailure(cause: unknown, path: string, kind: string) {\n const error = cause as { stdout?: string; stderr?: string }\n const detail = [error.stdout, error.stderr].filter(Boolean).join('\\n').trim()\n let code: number | string | undefined\n let reportedFailure = false\n try {\n const report = JSON.parse(error.stderr ?? '{}')\n code = report.code\n reportedFailure = typeof report.message === 'string'\n } catch {\n // Startup and policy failures need not be JSON; they still fail closed.\n }\n const failure = new Error(\n `Refusing untrusted Windows runtime ${kind}: ${path}${detail ? ` (${detail})` : ''}`,\n {\n cause\n }\n ) as NodeJS.ErrnoException\n if (code === 2 || code === 3) failure.code = 'ENOENT'\n if (code === 231) failure.code = 'EBUSY'\n if (code === 'EPIPEUNPROTECTED') failure.code = code\n if (!failure.code && kind === 'pipe' && reportedFailure) failure.code = 'EPIPEUNTRUSTED'\n return failure\n}\n\nconst SECURITY_SCRIPT = String.raw`\n$ErrorActionPreference = 'Stop'\n$ProgressPreference = 'SilentlyContinue'\n[Console]::OutputEncoding = [Text.UTF8Encoding]::new($false)\n# Module autoload can stall with a filtered host environment. Use the trusted\n# built-in modules directly, without scanning host/user module locations.\nImport-Module \"$PSHOME\\Modules\\Microsoft.PowerShell.Utility\\Microsoft.PowerShell.Utility.psd1\" -ErrorAction Stop\nImport-Module \"$PSHOME\\Modules\\Microsoft.PowerShell.Security\\Microsoft.PowerShell.Security.psd1\" -ErrorAction Stop\n$PSModuleAutoloadingPreference = 'None'\n$failureCode = $null\ntry {\n $request = $env:TEMPAD_RUNTIME_ACL_REQUEST | ConvertFrom-Json\n $user = [System.Security.Principal.WindowsIdentity]::GetCurrent().User\n $allowed = @($user.Value, 'S-1-5-18', 'S-1-5-32-544')\n if ($request.kind -eq 'pipe') {\n Add-Type -TypeDefinition @'\nusing System;\nusing System.ComponentModel;\nusing System.Runtime.InteropServices;\nusing Microsoft.Win32.SafeHandles;\npublic static class TempadPipeSecurity {\n [DllImport(\"kernel32.dll\", CharSet=CharSet.Unicode, SetLastError=true)]\n static extern SafeFileHandle CreateFile(string name, uint access, uint share, IntPtr security, uint creation, uint flags, IntPtr template);\n [DllImport(\"advapi32.dll\", SetLastError=true)]\n static extern uint GetSecurityInfo(SafeFileHandle handle, uint type, uint info, out IntPtr owner, out IntPtr group, out IntPtr dacl, out IntPtr sacl, out IntPtr descriptor);\n [DllImport(\"advapi32.dll\", SetLastError=true)]\n static extern uint SetSecurityInfo(SafeFileHandle handle, uint type, uint info, IntPtr owner, IntPtr group, IntPtr dacl, IntPtr sacl);\n [DllImport(\"advapi32.dll\", CharSet=CharSet.Unicode, SetLastError=true)]\n static extern bool ConvertStringSecurityDescriptorToSecurityDescriptor(string value, uint revision, out IntPtr descriptor, out uint length);\n [DllImport(\"advapi32.dll\", SetLastError=true)]\n static extern bool GetSecurityDescriptorDacl(IntPtr descriptor, out bool present, out IntPtr dacl, out bool defaulted);\n [DllImport(\"advapi32.dll\")]\n static extern uint GetSecurityDescriptorLength(IntPtr descriptor);\n [DllImport(\"kernel32.dll\")]\n static extern IntPtr LocalFree(IntPtr memory);\n public static byte[] Inspect(string path, string sddl) {\n // PowerShell converts a null string argument to an empty string.\n bool protect = !String.IsNullOrEmpty(sddl);\n SafeFileHandle opened = CreateFile(path, 0x20000u | (protect ? 0x40000u : 0u), 7, IntPtr.Zero, 3, 0x40000000, IntPtr.Zero);\n int openError = Marshal.GetLastWin32Error();\n using (SafeFileHandle handle = opened) {\n if (handle.IsInvalid) throw new Win32Exception(openError, \"CreateFile failed for the runtime pipe.\");\n if (protect) {\n IntPtr replacement; uint length;\n if (!ConvertStringSecurityDescriptorToSecurityDescriptor(sddl, 1, out replacement, out length)) throw new Win32Exception(Marshal.GetLastWin32Error(), \"ConvertStringSecurityDescriptorToSecurityDescriptor failed.\");\n try {\n bool present, defaulted; IntPtr acl;\n if (!GetSecurityDescriptorDacl(replacement, out present, out acl, out defaulted)) throw new Win32Exception(Marshal.GetLastWin32Error(), \"GetSecurityDescriptorDacl failed.\");\n if (!present || acl == IntPtr.Zero) throw new InvalidOperationException(\"The replacement pipe descriptor has no discretionary ACL.\");\n uint changed = SetSecurityInfo(handle, 6, 4u | 0x80000000u, IntPtr.Zero, IntPtr.Zero, acl, IntPtr.Zero);\n if (changed != 0) throw new Win32Exception((int)changed, \"SetSecurityInfo failed for the runtime pipe.\");\n } finally { LocalFree(replacement); }\n }\n IntPtr owner, group, dacl, sacl, descriptor;\n uint result = GetSecurityInfo(handle, 6, 5, out owner, out group, out dacl, out sacl, out descriptor);\n if (result != 0) throw new Win32Exception((int)result, \"GetSecurityInfo failed for the runtime pipe.\");\n try {\n byte[] bytes = new byte[GetSecurityDescriptorLength(descriptor)];\n Marshal.Copy(descriptor, bytes, 0, bytes.Length);\n return bytes;\n } finally { LocalFree(descriptor); }\n }\n }\n}\n'@\n $sddl = $null\n if ($request.action -eq 'protect') {\n $sddl = 'D:P(D;;GA;;;NU)(A;;GA;;;' + $user.Value + ')(A;;GA;;;SY)(A;;GA;;;BA)'\n }\n $bytes = [TempadPipeSecurity]::Inspect($request.path, $sddl)\n $descriptor = New-Object System.Security.AccessControl.RawSecurityDescriptor($bytes, 0)\n } else {\n if ($request.action -eq 'ensure' -and ![IO.Directory]::Exists($request.path)) {\n $security = New-Object System.Security.AccessControl.DirectorySecurity\n $security.SetOwner($user)\n $security.SetAccessRuleProtection($true, $false)\n foreach ($sid in $allowed) {\n $principal = New-Object System.Security.Principal.SecurityIdentifier($sid)\n $rule = New-Object System.Security.AccessControl.FileSystemAccessRule($principal, 'FullControl', 'ContainerInherit,ObjectInherit', 'None', 'Allow')\n $security.AddAccessRule($rule)\n }\n [void][IO.Directory]::CreateDirectory($request.path, $security)\n }\n try {\n $acl = Get-Acl -LiteralPath $request.path\n } catch [System.Management.Automation.ItemNotFoundException], [IO.FileNotFoundException], [IO.DirectoryNotFoundException] {\n $failureCode = 2\n throw\n }\n $descriptor = New-Object System.Security.AccessControl.RawSecurityDescriptor($acl.Sddl)\n }\n if ($allowed -notcontains $descriptor.Owner.Value -or $null -eq $descriptor.DiscretionaryAcl) {\n throw 'Unexpected owner or absent discretionary ACL.'\n }\n $ownAccess = $false\n $foreignAccess = $false\n $pendingProtection = $request.kind -eq 'pipe' -and $request.action -eq 'inspect'\n foreach ($ace in $descriptor.DiscretionaryAcl) {\n if ($ace.AceType -eq 'AccessAllowed') {\n if ($allowed -notcontains $ace.SecurityIdentifier.Value) {\n $foreignAccess = $true\n # Windows' initial pipe descriptor can be owned by Administrators and omit\n # the user's ACE. Only its default reader grants are retryable, never trusted.\n $defaultReader = @('S-1-1-0', 'S-1-5-7') -contains $ace.SecurityIdentifier.Value\n $readOnly = ($ace.AccessMask -band 0x7fedff76) -eq 0\n $pendingProtection = $pendingProtection -and $defaultReader -and $readOnly\n }\n if ($ace.SecurityIdentifier.Value -eq $user.Value) { $ownAccess = $true }\n } elseif ($ace.AceType -ne 'AccessDenied') {\n throw 'Unsupported ACL entry.'\n }\n }\n if ($foreignAccess -and $pendingProtection) { $failureCode = 'EPIPEUNPROTECTED' }\n if (!$ownAccess) { throw 'ACL does not explicitly grant the current user access.' }\n if ($foreignAccess) {\n throw 'ACL grants another account access.'\n }\n} catch {\n $failure = $_.Exception\n while ($failure.InnerException) { $failure = $failure.InnerException }\n if (!$failureCode) { $failureCode = $failure.NativeErrorCode }\n [Console]::Error.WriteLine((@{ message = $failure.Message; code = $failureCode } | ConvertTo-Json -Compress))\n exit 1\n}\n`\n"],"mappings":";;;;;;;;;;;;AAMA,MAAM,cAAc;AACpB,MAAM,qCAAqB,IAAI,IAA4C;;AAG3E,SAAgB,gBACd,WACA,MACA,WAA4B,QAAQ,UACpC,OAAO,SAAS,CAAC,CAAC,UAClB;CACA,IAAI,aAAa,SAAS,OAAO,KAAK,WAAW,IAAI;CACrD,MAAM,WAAW,WAAW,QAAQ,CAAC,CAClC,OAAO,IAAI,CAAC,CACZ,OAAO,IAAI,CAAC,CACZ,OAAO,UAAU,WAAW,KAAK,IAAI,CAAC,CAAC,YAAY,CAAC,CAAC,CACrD,OAAO,IAAI,CAAC,CACZ,OAAO,IAAI,CAAC,CACZ,OAAO,KAAK,CAAC,CACb,MAAM,GAAG,EAAE;CACd,OAAO,GAAG,YAAY,iBAAiB;AACzC;AAEA,SAAgB,OAAO,MAAc;CACnC,OAAO,KAAK,WAAW,WAAW;AACpC;AAEA,SAAS,UAAU,MAAc;CAC/B,MAAM,SAAS,aAAa,IAAI;CAChC,OAAO,QAAQ,aAAa,UACxB,OAAO,YAAY,MAAM,QAAQ,IAAI,CAAC,CAAC,YAAY,IACnD,WAAW;AACjB;;AAGA,SAAS,YAAY,MAAc,MAA4B;CAC7D,IAAI,CAAC,WAAW,IAAI,GAAG,MAAM,IAAI,MAAM,gCAAgC;CACvE,MAAM,OAAO,UAAU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