{
  "skill": "uking-install-windows",
  "version": 66,
  "updated": "2026-10-02",
  "notes": "v65: 上架 magpie CLI（yetone/magpie，MIT，Go 单二进制，只装 CLI 发行物 48MB）。定位「配置委托」——把 AI 工具的 provider/模型配置交给 magpie 维护，U-King 只做下载 / SHA-256 校验 / 落地 / 回滚与钱包计费，不抢 magpie 的配置格式。Windows 只装 magpie-cli-windows-amd64.exe（SHA-256 钉死 3569c27f），下载后 Get-FileHash 校验再落 ~/bin/magpie.exe 并前置用户 PATH；桌面版与 ARM64 原生包留待发版前补国内 OSS 镜像。\nv64: 安装验收加「输出门禁 + 装后冒烟」两层，修 Bun 壳/MiMo SQLite 假通过。ToolSpec 新增 verify_expect / verify_reject / smoke_cmd / smoke_expect / smoke_reject：verify_cmd 退出码 0 后还要做子串门禁（不区分大小写），再跑 smoke_cmd 真触初始化路径。OpenCode 钉死输出不许出现「bun is a fast」、--help 必须含 opencode（npm 包 opencode-ai 某些包装出来是 Bun 壳，opencode --version 打 1.3.14 照样退出 0）；MiMo Code 冒烟跑 mimo db SELECT 1 真开 SQLite（默认 TEMP/TMP 下库初始化报错时 --version 是绿的）。老清单无新字段 = 不检查，热下发安全。\nv63: DSH 插件安装步骤改用 pnpm `-w` 参数（pnpm 10 在 profile workspace root 直接 add 报 ERR_PNPM_ADDING_TO_ROOT；`dsh plugin` 会把额外参数透传给 pnpm）。安装与修复两轮共 4 条 `dsh plugin add` 命令均加 `-w`，已在 macOS 上以 0.2.0-rc.2 实测幂等通过（重跑 exit 0、插件列表完整：web=dsh-cache-stabilizer 0.1.0；terminal=dsh-terminal 0.1.0 + dsh-cache-stabilizer 0.1.0）。取代 v62 建议的写 .npmrc 方案（-w 跨平台通用，Windows 行为不受影响）。\nv62: DSH 升级至 0.2.0-rc.2（npm latest/next 标签，官方 DSH 最新 RC；0.1.7-rc.2 已落后一个版本线）。2026-10-15 macOS 实测：0.2.0-rc.2 全局安装 + web/terminal 两 profile 插件（dsh-cache-stabilizer / dsh-terminal）add 成功、dsh web 起在 3080 带 token 访问正常。同时修 macOS 插件安装必败问题：pnpm 10 在 profile workspace root 直接 add 报 ERR_PNPM_ADDING_TO_ROOT（本机修法：在 profile 的 .npmrc 写 ignore-workspace-root-check=true；manifest 层修复见 v63 的 -w 方案）。\nv61: 新增小米 MiMo Code、腾讯 CodeBuddy Code 和阿里 Qoder CN CLI 的官方安装、修复与版本验证；补齐可选平台依赖和所需安装脚本。Qoder CN 在 Windows ARM64 上安装前拦截，使用官方支持的 npm 兼容安装方式。\nv60: Claude 桌面版官方门户国内裸网 403；缺 winget 时使用国内镜像中的官方原版 1.44121.2 安装包，按 x64/ARM64 校验微软官方清单 SHA256 与 Anthropic Authenticode 签名后安装，镜像失败回退官方 CDN。\nv59: 新增 Claude 桌面版及 Kimi Code、Grok Build、Muse Code、Antigravity CLI 安装入口。桌面版安装后按主程序或 MSIX 包验证；海外安装脚本下载有超时，下载失败直接说明网络问题。\nv58: 修「装完在终端敲 claude / codex 提示不是内部或外部命令」：电脑上已有系统 Node 时工具装在 %APPDATA%\\npm，该目录常不在用户 PATH；转发启动器步骤现在也会从 %APPDATA%\\npm 建转发器并前置进用户 PATH（先找 U-King 自带 Node，找不到再找 %APPDATA%\\npm；已有的旧转发器会被识别并更新，你自己写的同名脚本不会被覆盖）。python3 转发器也一并修了（中文用户名下不再被写成问号路径）。\nv57: claude-code 装完补跑 postinstall（新版 npm 默认拦截安装脚本，claude.exe 只剩 500 字节占位壳、运行报「与 Windows 版本不兼容」；repair 强制重装后同样补跑）；所有 steps 里有 ensure_node 而 repair 里没有的 npm 工具，repair 显式前置 ensure_node（Node 没装上时不再满屏「npm 不是内部或外部命令」）。codex-app 安装失败提示 0x80073D28 时说明需管理员并引导升级；openclaw 放行 koffi/esbuild/protobufjs 安装脚本（npm 12）。\nv56: DSH 锁定更新至 0.1.7-rc.2（npm next 标签，与官方桌面版 0.1.7-rc.1 同一条线；npm latest 仍是较旧的 0.1.5-rc.3，故明确钉版本）。2026-09-25 隔离 DSH_HOME 实测：521 包 23s 装完、两个固定插件 add 成功、web/terminal profile dump-config 通过、dsh web 起在 3080 且带 token 访问正常、terminal 模式可启动（有 code-runtime-worker-thread 未激活告警，系自研终端插件与新版包结构不匹配）。未用真实模型凭证跑会话。\nv55: DSH 锁定更新至 0.1.5-rc.2；在隔离副本中只验证现有 profile 的离线配置解析与版本可执行，未启动会话或验证第三方插件。\nv54: 下架 Cline CLI（reports 仓被 [auto][install_failed] 淹没：Windows 平台二进制 @cline/cli-windows-x64 约 150MB 是 optionalDependency，npmmirror 滞后静默跳过 → 装上了但 --version 崩， Widely 误报；产品同步收窄）。删 tools.cline + shim 名单；存量已装走「一键卸载」(cleanup tool-cline)。老客户端忽略未知字段，线上热下发可直接覆盖。\nv52: 上架 Cline CLI（cline@npm，Apache-2.0）。四门槛 2026-08-29 本机沙箱实测全过：npm 328 包/17s、auth 非交互接虾盘云（openai-compatible 槽位）、headless 真调 6.6s、工具调用真改文件。安装 min_free_mb=600 + with_optional=true（Windows 平台二进制 @cline/cli-windows-x64 约 150MB 是 optionalDependency，npmmirror 滞后会静默跳过 → 装上了但 --version 崩，同 codex 的坑）；repair 四步与 pi 逐字节同款。\\nv51: CLI 转发 shim 改为仅指向 U-King 便携 Node 的 ASCII %USERPROFILE% 路径，并补 Pi；杜绝中文用户名在 cmd.exe 下重造启动失败。\nv50: 免费额度教程加入 OpenCode Go；「去领 Key」直接走带推荐码的官方注册链接，朋友完成 Go 订阅后双方各得 $5。\nv49: harness-doctor 改从 npm 正式包安装（0.3.2，latest）。此前写的是 git 规格（github:用户/仓库#v0.3.1），冒号不在 npm 包名白名单字符里，被客户端安全闸拦截，主装与 repair 全部报「非法 npm 包名」（reports #44/#47/#51/#52/#53 五连）。npm 上已有同名正式包且 latest=0.3.2，白名单原样放行，无需改 exe。\nv47: 「添加供应商」画廊模板挪进本清单（provider_templates 字段），加新厂商不用发版；老客户端会忽略这个新字段 —— 已拿 website/download 里真的 1.0.2 发布版 exe 实测（劫持它的系统 curl 喂含该字段的清单，selfcheck 回 source=server、10 个工具一个不少），不是靠新代码自己跑测试自证。前端仍以内嵌的 src/lib/providerTemplates.ts 为兜底。🔴 这份原本编号 v45，但 45/46 已被 pnpm 修复和 Harness Doctor 两条线用掉，照 45 发会把线上回退掉 harness-doctor —— 版本号是发布事实不是待办，改号前先看线上 install-windows.json 是几。\nv46: 合入 Harness Doctor 体检工具（原在 codex/harness-doctor-integration 分支上，基线停在 v43、不含 v45 的 pnpm 与 codeload 修复）。合并时以 v45 为底、只取它的 harness-doctor 条目，**没有回退 v44/v45 的任何东西**。\nv45: DSH 的 plugin 子命令会直接调用外部 pnpm；U-King 过去只保证 Node/npm，导致 Windows 干净机稳定报 pnpm 不存在。现在两轮插件安装前固定安装 pnpm 10.33.0，并把 git-hosted 规格改成钉 SHA 的 HTTPS tarball，干净机无需另装 Git。\nv43: DeepSeek Harness 增加 Web / 持续对话终端双模式，并安装两个固定 commit 的 MIT 开源 bundle：dsh-cache-stabilizer 把默认 persona 的 cwd 后移到运行时上下文、固定 schema 键序并提供 /cache 实测；dsh-terminal 复用同一个真实 Agent/Session 连续对话。GitHub 依赖钉死 SHA，避免 main 漂移。\nv42: 上架 DeepSeek 官方 DeepSeek Harness（dsh）Developer Preview。锁定实测接口版本 0.1.0-rc.6，要求 Node 22.19+；安装量较大，预留 800MB，并沿用 npm 主源失败切官方源与通用 repair。主入口是 Web 工作台，headless 只做一次性任务。\nv41: 给 crush / qwen-code / opencode / pi 补上 repair 步骤 —— 这四个后加的 npm 工具一直没有修复步骤，装不上就直接报「安装未通过验证，且无修复步骤」然后停住（issue #336）。它们的安装形状（ensure_node + npm_install）跟 claude-code / openclaw 完全一样，老工具那套 repair 本来就适用；前三步命令在这两个老工具间逐字节相同，说明是工具无关的通用步骤，此处原样取用、只另写文案。\nv37: 补上 OpenCode(opencode-ai)。它是社区最大的开源 coding agent，交互式 TUI 成熟，但**非交互 opencode run 在 Windows 上实测恒定挂死零输出**（1.4.3/1.18.11、沙箱/真实 HOME、带不带 --format 四种组合全挂），所以只按 TUI 上架、不进竞技场。v36: 上架 Qwen Code 与 Crush，并复活 Codex CLI / OpenClaw CLI 入口（主线改为「CLI 干活 + U-Workspace 当壳」）。 | v39: Windows 专属步骤打上 os=windows —— Mac 和 Windows 读同一份清单，那些 powershell.exe 步骤在 macOS 上被 sh 执行会报 `sh: line 0: fg: no job control`，把整条安装判失败并拖进修复循环（issue #340）。",
  "mirror_fallback": "https://u-claw-updates.oss-cn-shenzhen.aliyuncs.com/uking/runtimes",
  "python": {
    "url": "https://registry.npmmirror.com/-/binary/python-build-standalone/20241016/cpython-3.12.7+20241016-x86_64-pc-windows-msvc-install_only.tar.gz",
    "url_mac_arm64": "https://registry.npmmirror.com/-/binary/python-build-standalone/20241016/cpython-3.12.7+20241016-aarch64-apple-darwin-install_only.tar.gz",
    "url_mac_x64": "https://registry.npmmirror.com/-/binary/python-build-standalone/20241016/cpython-3.12.7+20241016-x86_64-apple-darwin-install_only.tar.gz",
    "sha256": "f05531bff16fa77b53be0776587b97b466070e768e6d5920894de988bdcd547a",
    "sha256_mac_arm64": "4c18852bf9c1a11b56f21bcf0df1946f7e98ee43e9e4c0c5374b2b3765cf9508",
    "sha256_mac_x64": "60c5271e7edc3c2ab47440b7abf4ed50fbc693880b474f74f05768f5b657045a"
  },
  "pip_index": "https://mirrors.aliyun.com/pypi/simple/",
  "free_guide": {
    "version": 2,
    "checked": "2026-08-26",
    "entries": [
      {
        "name": "OpenRouter",
        "template": "OpenRouter",
        "summary": "聚合网关，模型列表里长期有一批 :free 免费路由。",
        "key_url": "https://openrouter.ai/keys",
        "note": "免费模型会更换、限流或下线；在模型框重新拉取可用列表，不要把某个预览模型当长期承诺。"
      },
      {
        "name": "OpenCode Zen",
        "template": "OpenCode Zen",
        "summary": "OpenCode 官方模型网关，模型列表里有一批 id 带 -free 后缀的免费档。",
        "key_url": "https://opencode.ai/auth",
        "note": "登录 opencode.ai 后在 Zen 页面复制 Key；免费模型与接口支持会变动。"
      },
      {
        "name": "OpenCode Go",
        "summary": "低价编程套餐；通过推荐链接订阅后，邀请人和新订阅者各得 $5 Go 使用额度。",
        "key_url": "https://opencode.ai/go?ref=103VWZVZTF",
        "note": "这是订阅返额活动，不是无条件免费 Key；是否发放以 OpenCode 结算页当时显示的活动规则为准。"
      },
      {
        "name": "Google Gemini",
        "template": "Google Gemini",
        "summary": "AI Studio 直接发 Key，有免费额度档。",
        "key_url": "https://aistudio.google.com/apikey",
        "note": "免信用卡；只有 OpenAI 兼容层，没有原生 Anthropic 端点。"
      },
      {
        "name": "Groq",
        "template": "Groq",
        "summary": "LPU 硬件，主打快，有免费额度。",
        "key_url": "https://console.groq.com/keys",
        "note": "免信用卡，Key 是 gsk_ 开头；没有原生 Anthropic 端点。"
      },
      {
        "name": "Mistral",
        "template": "Mistral",
        "summary": "La Plateforme 控制台自助发 Key，有限量免费额度。",
        "key_url": "https://console.mistral.ai",
        "note": "额度有限，跑长任务会很快用完。"
      }
    ]
  },
  "node": {
    "version": "v24.16.0",
    "url": "https://registry.npmmirror.com/-/binary/node/v24.16.0/node-v24.16.0-win-x64.zip",
    "dir_name": "node-v24.16.0-win-x64",
    "url_mac_arm64": "https://registry.npmmirror.com/-/binary/node/v24.16.0/node-v24.16.0-darwin-arm64.tar.gz",
    "dir_name_mac_arm64": "node-v24.16.0-darwin-arm64",
    "url_mac_x64": "https://registry.npmmirror.com/-/binary/node/v24.16.0/node-v24.16.0-darwin-x64.tar.gz",
    "dir_name_mac_x64": "node-v24.16.0-darwin-x64",
    "sha256": "edaca9bd58ec8e92037dac4e877d52f6b8f430b81c18b57e264b4e2fb111cd56",
    "sha256_mac_arm64": "39189dab4eeb15706c424af0ac08a3044c9e48f7db12a7d77f6b7aafc7dd5df6",
    "sha256_mac_x64": "298b4c7b3cb80765c8703e42b90324a4ece3b6634947b89e769c3c980ab55185"
  },
  "npm_registry": "https://registry.npmmirror.com",
  "tools": {
    "claude-code": {
      "name": "Claude Code CLI",
      "bin": "claude",
      "verify_cmd": "claude --version",
      "steps": [
        {
          "type": "ensure_node",
          "label": "检查 Node.js 运行时（缺失则自动装便携版）"
        },
        {
          "type": "npm_install",
          "label": "安装 Claude Code（npmmirror 国内加速）",
          "package": "@anthropic-ai/claude-code"
        },
        {
          "type": "run",
          "label": "补跑 Claude Code 安装脚本（新版 npm 默认拦截，claude.exe 会只剩占位壳）",
          "cmd": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NonInteractive -Command \"$ErrorActionPreference='SilentlyContinue'; $h=$env:USERPROFILE; if($env:UKING_TEST_HOME){ $h=$env:UKING_TEST_HOME }; $nodeRoot=Join-Path $h '.uking\\runtime\\node'; $cands=@((Join-Path $nodeRoot 'node_modules\\@anthropic-ai\\claude-code')); if(-not $env:UKING_TEST_HOME){ $cands+=(Join-Path $env:APPDATA 'npm\\node_modules\\@anthropic-ai\\claude-code') }; $node=Join-Path $nodeRoot 'node.exe'; if(-not (Test-Path -LiteralPath $node)){ $node='node' }; foreach($d in $cands){ $ins=Join-Path $d 'install.cjs'; $exe=Join-Path $d 'bin\\claude.exe'; if((Test-Path -LiteralPath $ins) -and (Test-Path -LiteralPath $exe)){ $len=(Get-Item -LiteralPath $exe).Length; if($len -lt 1MB){ Write-Host ('Claude Code 的 claude.exe 只有 '+$len+' 字节（npm 拦截了安装脚本），补跑安装脚本：'+$d); Push-Location -LiteralPath $d; & $node install.cjs; Pop-Location; Write-Host ('补跑后 claude.exe：'+(Get-Item -LiteralPath $exe).Length+' 字节') } } }; exit 0\"",
          "os": "windows"
        },
        {
          "type": "run",
          "label": "覆盖上去：给已装的 AI 命令（含系统 Node 装到 %APPDATA%\\npm 的）建轻量转发启动器并前置进用户 PATH，让 U-King 装的赢过你之前装的别家/旧版（不动你的 node/npm、不删你的东西；原 PATH 已备份到 ~/.uking/path-backup.txt，UKING_TEST_HOME 沙箱下跳过）",
          "cmd": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NonInteractive -Command \"if($env:UKING_TEST_HOME){ exit 0 }; $ErrorActionPreference='SilentlyContinue'; $shims=Join-Path $env:USERPROFILE '.uking\\shims'; New-Item -ItemType Directory -Force -Path $shims | Out-Null; $q=[char]34; $pc=[char]37; $nl=[Environment]::NewLine; function UkOurs($f,$tail){ $old=''; if(Test-Path -LiteralPath $f){ $old=[IO.File]::ReadAllText($f) }; $ln=@([regex]::Split($old,'\\r?\\n') | ForEach-Object { $_.Trim() } | Where-Object { $_ -ne '' }); return (($old.Trim() -eq '') -or $old.Contains('U-King CLI command guard') -or (($ln.Count -eq 2) -and ($ln[0] -eq '@echo off') -and (($ln[1].StartsWith($q)) -or ($ln[1] -like 'call *')) -and $ln[1].EndsWith($tail,[StringComparison]::OrdinalIgnoreCase))) }; $src=@(@{d=(Join-Path $env:USERPROFILE '.uking\\runtime\\node'); r=($pc+'USERPROFILE'+$pc+'\\.uking\\runtime\\node\\')}); if($env:APPDATA){ $src=$src+,@{d=(Join-Path $env:APPDATA 'npm'); r=($pc+'APPDATA'+$pc+'\\npm\\')} }; foreach($t in @('claude','codex','pi','openclaw','hermes','opencode')){ $hit=$null; foreach($s in $src){ foreach($e in @('.cmd','.exe')){ if(Test-Path -LiteralPath (Join-Path $s.d ($t+$e))){ $hit=@{r=($s.r+$t+$e); e=$e}; break } }; if($hit){break} }; if($hit){ $f=Join-Path $shims ($t+'.cmd'); if(UkOurs $f ('\\.uking\\runtime\\node\\'+$t+'.cmd'+$q+' '+$pc+'*')){ if($hit.e -eq '.cmd'){ $call='call '+$q+$hit.r+$q+' '+$pc+'*' } else { $call=$q+$hit.r+$q+' '+$pc+'*' }; [IO.File]::WriteAllText($f,('@echo off'+$nl+'rem U-King CLI command guard'+$nl+$call+$nl),[Text.Encoding]::ASCII) } } };  $py=Join-Path $env:USERPROFILE '.uking\\runtime\\python\\python.exe'; if(Test-Path -LiteralPath $py){ $f=Join-Path $shims 'python3.cmd'; if(UkOurs $f ('\\.uking\\runtime\\python\\python.exe'+$q+' '+$pc+'*')){ [IO.File]::WriteAllText($f,('@echo off'+$nl+'rem U-King CLI command guard'+$nl+$q+$pc+'USERPROFILE'+$pc+'\\.uking\\runtime\\python\\python.exe'+$q+' '+$pc+'*'+$nl),[Text.Encoding]::ASCII) } }; $u=[Environment]::GetEnvironmentVariable('Path','User'); if($null -eq $u){$u=''}; $bak=Join-Path $env:USERPROFILE '.uking\\path-backup.txt'; if(-not (Test-Path $bak)){ [IO.File]::WriteAllText($bak,$u) }; $keep=@($u -split ';' | Where-Object { $_ -ne '' -and $_ -ne $shims }); [Environment]::SetEnvironmentVariable('Path',((@($shims)+$keep) -join ';'),'User'); exit 0\"",
          "os": "windows"
        }
      ],
      "repair": [
        {
          "type": "run",
          "label": "停止占用 npm 全局目录的旧进程（修 @anthropic-ai 目录被占用导致 cleanup/rename 失败）",
          "cmd": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NonInteractive -Command \"$nodeRoot=(Join-Path $env:USERPROFILE '.uking\\runtime\\node'); Get-CimInstance Win32_Process | Where-Object { $_.ExecutablePath -and $_.ExecutablePath.StartsWith($nodeRoot,[StringComparison]::OrdinalIgnoreCase) } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue }; exit 0\"",
          "os": "windows"
        },
        {
          "type": "ensure_node",
          "label": "检查 Node.js 运行时（缺失则自动装便携版）"
        },
        {
          "type": "run",
          "label": "清除 npm 全局代理配置（客户机代理常把 npm 拦死）",
          "cmd": "call npm config delete proxy --location=global & call npm config delete https-proxy --location=global & call npm config delete proxy & call npm config delete https-proxy & (exit /b 0)",
          "os": "windows"
        },
        {
          "type": "run",
          "label": "清理 npm 缓存",
          "cmd": "call npm cache clean --force & (exit /b 0)",
          "os": "windows"
        },
        {
          "type": "npm_install",
          "label": "强制重装 Claude Code",
          "package": "@anthropic-ai/claude-code",
          "force": true
        },
        {
          "type": "run",
          "label": "补跑 Claude Code 安装脚本（新版 npm 默认拦截，claude.exe 会只剩占位壳）",
          "cmd": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NonInteractive -Command \"$ErrorActionPreference='SilentlyContinue'; $h=$env:USERPROFILE; if($env:UKING_TEST_HOME){ $h=$env:UKING_TEST_HOME }; $nodeRoot=Join-Path $h '.uking\\runtime\\node'; $cands=@((Join-Path $nodeRoot 'node_modules\\@anthropic-ai\\claude-code')); if(-not $env:UKING_TEST_HOME){ $cands+=(Join-Path $env:APPDATA 'npm\\node_modules\\@anthropic-ai\\claude-code') }; $node=Join-Path $nodeRoot 'node.exe'; if(-not (Test-Path -LiteralPath $node)){ $node='node' }; foreach($d in $cands){ $ins=Join-Path $d 'install.cjs'; $exe=Join-Path $d 'bin\\claude.exe'; if((Test-Path -LiteralPath $ins) -and (Test-Path -LiteralPath $exe)){ $len=(Get-Item -LiteralPath $exe).Length; if($len -lt 1MB){ Write-Host ('Claude Code 的 claude.exe 只有 '+$len+' 字节（npm 拦截了安装脚本），补跑安装脚本：'+$d); Push-Location -LiteralPath $d; & $node install.cjs; Pop-Location; Write-Host ('补跑后 claude.exe：'+(Get-Item -LiteralPath $exe).Length+' 字节') } } }; exit 0\"",
          "os": "windows"
        }
      ],
      "min_free_mb": 400
    },
    "codex": {
      "name": "Codex CLI",
      "bin": "codex",
      "verify_cmd": "codex --version",
      "steps": [
        {
          "type": "ensure_node",
          "label": "检查 Node.js 运行时（缺失则自动装便携版）"
        },
        {
          "type": "npm_install",
          "label": "安装 Codex CLI 最新版（npmmirror 国内加速；0.141+ 二进制已打包进主包，--include=optional 兜旧版平台子包）",
          "package": "@openai/codex",
          "with_optional": true
        },
        {
          "type": "run",
          "label": "覆盖上去：给已装的 AI 命令（含系统 Node 装到 %APPDATA%\\npm 的）建轻量转发启动器并前置进用户 PATH，让 U-King 装的赢过你之前装的别家/旧版（不动你的 node/npm、不删你的东西；原 PATH 已备份到 ~/.uking/path-backup.txt，UKING_TEST_HOME 沙箱下跳过）",
          "cmd": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NonInteractive -Command \"if($env:UKING_TEST_HOME){ exit 0 }; $ErrorActionPreference='SilentlyContinue'; $shims=Join-Path $env:USERPROFILE '.uking\\shims'; New-Item -ItemType Directory -Force -Path $shims | Out-Null; $q=[char]34; $pc=[char]37; $nl=[Environment]::NewLine; function UkOurs($f,$tail){ $old=''; if(Test-Path -LiteralPath $f){ $old=[IO.File]::ReadAllText($f) }; $ln=@([regex]::Split($old,'\\r?\\n') | ForEach-Object { $_.Trim() } | Where-Object { $_ -ne '' }); return (($old.Trim() -eq '') -or $old.Contains('U-King CLI command guard') -or (($ln.Count -eq 2) -and ($ln[0] -eq '@echo off') -and (($ln[1].StartsWith($q)) -or ($ln[1] -like 'call *')) -and $ln[1].EndsWith($tail,[StringComparison]::OrdinalIgnoreCase))) }; $src=@(@{d=(Join-Path $env:USERPROFILE '.uking\\runtime\\node'); r=($pc+'USERPROFILE'+$pc+'\\.uking\\runtime\\node\\')}); if($env:APPDATA){ $src=$src+,@{d=(Join-Path $env:APPDATA 'npm'); r=($pc+'APPDATA'+$pc+'\\npm\\')} }; foreach($t in @('claude','codex','pi','openclaw','hermes','opencode')){ $hit=$null; foreach($s in $src){ foreach($e in @('.cmd','.exe')){ if(Test-Path -LiteralPath (Join-Path $s.d ($t+$e))){ $hit=@{r=($s.r+$t+$e); e=$e}; break } }; if($hit){break} }; if($hit){ $f=Join-Path $shims ($t+'.cmd'); if(UkOurs $f ('\\.uking\\runtime\\node\\'+$t+'.cmd'+$q+' '+$pc+'*')){ if($hit.e -eq '.cmd'){ $call='call '+$q+$hit.r+$q+' '+$pc+'*' } else { $call=$q+$hit.r+$q+' '+$pc+'*' }; [IO.File]::WriteAllText($f,('@echo off'+$nl+'rem U-King CLI command guard'+$nl+$call+$nl),[Text.Encoding]::ASCII) } } };  $py=Join-Path $env:USERPROFILE '.uking\\runtime\\python\\python.exe'; if(Test-Path -LiteralPath $py){ $f=Join-Path $shims 'python3.cmd'; if(UkOurs $f ('\\.uking\\runtime\\python\\python.exe'+$q+' '+$pc+'*')){ [IO.File]::WriteAllText($f,('@echo off'+$nl+'rem U-King CLI command guard'+$nl+$q+$pc+'USERPROFILE'+$pc+'\\.uking\\runtime\\python\\python.exe'+$q+' '+$pc+'*'+$nl),[Text.Encoding]::ASCII) } }; $u=[Environment]::GetEnvironmentVariable('Path','User'); if($null -eq $u){$u=''}; $bak=Join-Path $env:USERPROFILE '.uking\\path-backup.txt'; if(-not (Test-Path $bak)){ [IO.File]::WriteAllText($bak,$u) }; $keep=@($u -split ';' | Where-Object { $_ -ne '' -and $_ -ne $shims }); [Environment]::SetEnvironmentVariable('Path',((@($shims)+$keep) -join ';'),'User'); exit 0\"",
          "os": "windows"
        }
      ],
      "repair": [
        {
          "type": "run",
          "label": "停止占用 OpenClaw/npm 全局目录的旧进程（修 EBUSY rename）",
          "cmd": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NonInteractive -Command \"$nodeRoot=(Join-Path $env:USERPROFILE '.uking\\runtime\\node'); Get-CimInstance Win32_Process | Where-Object { $_.ExecutablePath -and $_.ExecutablePath.StartsWith($nodeRoot,[StringComparison]::OrdinalIgnoreCase) } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue }; exit 0\"",
          "os": "windows"
        },
        {
          "type": "ensure_node",
          "label": "检查 Node.js 运行时（缺失则自动装便携版）"
        },
        {
          "type": "run",
          "label": "清除 npm 全局代理配置（客户机代理常把 npm 拦死）",
          "cmd": "call npm config delete proxy --location=global & call npm config delete https-proxy --location=global & call npm config delete proxy & call npm config delete https-proxy & (exit /b 0)",
          "os": "windows"
        },
        {
          "type": "run",
          "label": "放开 npm 拉取可选依赖（平台二进制是 optionalDependency，被关掉就装不上 codex 内核）",
          "cmd": "npm config delete optional --location=global & npm config set optional true & exit 0"
        },
        {
          "type": "run",
          "label": "清理 npm 缓存",
          "cmd": "call npm cache clean --force & (exit /b 0)",
          "os": "windows"
        },
        {
          "type": "npm_install",
          "label": "强制重装 Codex CLI（含平台二进制）",
          "package": "@openai/codex",
          "with_optional": true,
          "force": true
        },
        {
          "type": "run",
          "label": "兜底：下 OpenAI 官方 Codex 单文件二进制（npm 全失败时的最后防线；阿里云深圳 OSS 国内镜像主源→GitHub 兜底，断点续传）",
          "cmd": "%SystemRoot%\\System32\\curl.exe -fL -sS -C - --retry 3 --retry-delay 3 -m 1800 --proxy \"\" -o \"%TEMP%\\codex-cli.zip\" https://u-claw-updates.oss-cn-shenzhen.aliyuncs.com/uking/runtimes/codex-win-x64.zip || %SystemRoot%\\System32\\curl.exe -fL -sS -C - --retry 3 --retry-delay 3 -m 1800 --proxy \"\" -o \"%TEMP%\\codex-cli.zip\" https://github.com/openai/codex/releases/download/rust-v0.143.0/codex-x86_64-pc-windows-msvc.exe.zip",
          "os": "windows"
        },
        {
          "type": "run",
          "label": "解压装到 %USERPROFILE%\\bin\\codex.exe + 清掉半装坏掉的 codex 启动器（否则它在 PATH 里挡住好二进制，verify 永远失败）+ 把 ~/bin 加进用户 PATH",
          "cmd": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NonInteractive -Command \"$d=$env:USERPROFILE+'\\bin'; New-Item -ItemType Directory -Force -Path $d | Out-Null; $tmp=($env:TEMP+'\\codex-cli'); Remove-Item -Recurse -Force $tmp -ErrorAction SilentlyContinue; New-Item -ItemType Directory -Force -Path $tmp | Out-Null; & ($env:SystemRoot+'\\System32\\tar.exe') -xf ($env:TEMP+'\\codex-cli.zip') -C $tmp; Copy-Item -Force ($tmp+'\\codex-x86_64-pc-windows-msvc.exe') ($d+'\\codex.exe'); foreach($dir in @((Join-Path $env:USERPROFILE '.uking\\runtime\\node'),(Join-Path $env:APPDATA 'npm'))){ foreach($n in @('codex','codex.cmd','codex.ps1')){ $p=Join-Path $dir $n; if(Test-Path $p){ Remove-Item -Force $p -ErrorAction SilentlyContinue } } }; $u=[Environment]::GetEnvironmentVariable('Path','User'); if(($u -split ';') -notcontains $d){ [Environment]::SetEnvironmentVariable('Path',($u.TrimEnd(';')+';'+$d),'User') }; if (Test-Path ($d+'\\codex.exe')) { exit 0 } else { exit 1 }\"",
          "os": "windows"
        }
      ],
      "min_free_mb": 400
    },
    "codex-app": {
      "name": "Codex 桌面版",
      "bin": "codex-app",
      "verify_cmd": "powershell -NoProfile -NonInteractive -Command \"if (Get-AppxPackage -Name OpenAI.Codex) { (Get-AppxPackage -Name OpenAI.Codex).Version } else { exit 1 }\"",
      "steps": [
        {
          "type": "run",
          "label": "通过微软商店安装 Codex 桌面版（已装则跳过；商店安装较慢，请耐心等待）",
          "cmd": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NonInteractive -Command \"$b=0; try { $b=[int][Environment]::OSVersion.Version.Build } catch {}; if ($b -gt 0 -and $b -lt 19041) { [Console]::Error.WriteLine('Codex desktop app requires Windows 10 build 19041 or newer; this PC is build ' + $b + '. It cannot be installed on this system - please use Codex CLI instead (same features, no OS version limit).'); exit 1 }; if (Get-AppxPackage -Name OpenAI.Codex) { Write-Host 'Codex 桌面版已安装，跳过'; exit 0 }; if (-not (Get-Command winget -ErrorAction SilentlyContinue)) { Write-Host 'winget 不可用，转兜底 MSIX'; exit 1 }; $wa=@('install','--id','9PLM9XGG6VKS','--source','msstore','--accept-package-agreements','--accept-source-agreements'); try { $wv=[version](((winget --version) -join '') -replace '[^0-9.]','' -replace '^\\.+','' -replace '\\.+$',''); if ($wv -ge [version]'1.4') { $wa += '--disable-interactivity' } } catch {}; winget @wa; for ($i=0; $i -lt 12; $i++) { if (Get-AppxPackage -Name OpenAI.Codex) { Write-Host 'Codex 桌面版安装成功'; exit 0 }; Start-Sleep -Seconds 5 }; exit 1\"",
          "os": "windows"
        }
      ],
      "repair": [
        {
          "type": "run",
          "label": "下载官方 MSIX 安装包（约 650MB，慢网请耐心等待；镜像主域→镜像 R2 直链 两路兜底）",
          "cmd": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command \"$b=0; try { $b=[int][Environment]::OSVersion.Version.Build } catch {}; if ($b -gt 0 -and $b -lt 19041) { [Console]::Error.WriteLine('Codex desktop app requires Windows 10 build 19041 or newer; this PC is build ' + $b + '. It cannot be installed on this system - please use Codex CLI instead (same features, no OS version limit).'); exit 1 }; $ErrorActionPreference='Stop'; $p=Join-Path $env:TEMP 'codex-app.msix'; Remove-Item $p -Force -ErrorAction SilentlyContinue; $urls=@('https://codexapp.agentsmirror.com/latest/win','https://codexapp-r2.agentsmirror.com/latest/win'); $ok=$false; foreach($u in $urls){ Write-Host ('下载 '+$u); & ($env:SystemRoot+'\\System32\\curl.exe') -fL -sS -m 2400 -o $p $u; if($LASTEXITCODE -eq 0 -and (Test-Path $p) -and (Get-Item $p).Length -gt 100MB){ $ok=$true; break } }; if(-not $ok){ throw 'Codex MSIX 下载失败或文件不完整，请点手动教程下载' }; Write-Host ('MSIX 已下载 '+[Math]::Round((Get-Item $p).Length/1MB)+' MB')\"",
          "os": "windows"
        },
        {
          "type": "run",
          "label": "安装 MSIX 安装包",
          "cmd": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command \"$p=Join-Path $env:TEMP 'codex-app.msix'; if(-not (Test-Path $p)){ throw '找不到 codex-app.msix，请重新下载安装包' }; try { Add-AppxPackage -Path $p -ErrorAction Stop } catch { $m=[string]$_.Exception.Message+' '+[string]$_.FullyQualifiedErrorId; if($m -match '0x80073D28'){ [Console]::Error.WriteLine('Codex 桌面版新版必须管理员批准才能安装：请把 U-King 升级到最新版后重试（新版会请求一次管理员授权），或改用 Codex 命令行版'); exit 1 }; throw }; for($i=0; $i -lt 12; $i++){ if(Get-AppxPackage -Name OpenAI.Codex){ Write-Host 'Codex 桌面版安装成功'; exit 0 }; Start-Sleep -Seconds 5 }; throw 'MSIX 安装后未检测到 OpenAI.Codex，请重启 U-King 或按手动教程确认安装状态'\"",
          "os": "windows"
        }
      ],
      "min_free_mb": 1500,
      "min_windows_build": 19041
    },
    "openclaw": {
      "name": "OpenClaw 龙虾",
      "bin": "openclaw",
      "verify_cmd": "openclaw --version",
      "steps": [
        {
          "type": "ensure_node",
          "label": "检查 Node.js 运行时（OpenClaw 需 Node 24.16+）",
          "min": "24.16.0"
        },
        {
          "type": "npm_install",
          "label": "安装 OpenClaw（npm 国内源，绕开官方 git 安装）",
          "package": "openclaw",
          "allow_scripts": [
            "koffi",
            "esbuild",
            "protobufjs"
          ]
        },
        {
          "type": "run",
          "label": "覆盖上去：给已装的 AI 命令（含系统 Node 装到 %APPDATA%\\npm 的）建轻量转发启动器并前置进用户 PATH，让 U-King 装的赢过你之前装的别家/旧版（不动你的 node/npm、不删你的东西；原 PATH 已备份到 ~/.uking/path-backup.txt，UKING_TEST_HOME 沙箱下跳过）",
          "cmd": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NonInteractive -Command \"if($env:UKING_TEST_HOME){ exit 0 }; $ErrorActionPreference='SilentlyContinue'; $shims=Join-Path $env:USERPROFILE '.uking\\shims'; New-Item -ItemType Directory -Force -Path $shims | Out-Null; $q=[char]34; $pc=[char]37; $nl=[Environment]::NewLine; function UkOurs($f,$tail){ $old=''; if(Test-Path -LiteralPath $f){ $old=[IO.File]::ReadAllText($f) }; $ln=@([regex]::Split($old,'\\r?\\n') | ForEach-Object { $_.Trim() } | Where-Object { $_ -ne '' }); return (($old.Trim() -eq '') -or $old.Contains('U-King CLI command guard') -or (($ln.Count -eq 2) -and ($ln[0] -eq '@echo off') -and (($ln[1].StartsWith($q)) -or ($ln[1] -like 'call *')) -and $ln[1].EndsWith($tail,[StringComparison]::OrdinalIgnoreCase))) }; $src=@(@{d=(Join-Path $env:USERPROFILE '.uking\\runtime\\node'); r=($pc+'USERPROFILE'+$pc+'\\.uking\\runtime\\node\\')}); if($env:APPDATA){ $src=$src+,@{d=(Join-Path $env:APPDATA 'npm'); r=($pc+'APPDATA'+$pc+'\\npm\\')} }; foreach($t in @('claude','codex','pi','openclaw','hermes','opencode')){ $hit=$null; foreach($s in $src){ foreach($e in @('.cmd','.exe')){ if(Test-Path -LiteralPath (Join-Path $s.d ($t+$e))){ $hit=@{r=($s.r+$t+$e); e=$e}; break } }; if($hit){break} }; if($hit){ $f=Join-Path $shims ($t+'.cmd'); if(UkOurs $f ('\\.uking\\runtime\\node\\'+$t+'.cmd'+$q+' '+$pc+'*')){ if($hit.e -eq '.cmd'){ $call='call '+$q+$hit.r+$q+' '+$pc+'*' } else { $call=$q+$hit.r+$q+' '+$pc+'*' }; [IO.File]::WriteAllText($f,('@echo off'+$nl+'rem U-King CLI command guard'+$nl+$call+$nl),[Text.Encoding]::ASCII) } } };  $py=Join-Path $env:USERPROFILE '.uking\\runtime\\python\\python.exe'; if(Test-Path -LiteralPath $py){ $f=Join-Path $shims 'python3.cmd'; if(UkOurs $f ('\\.uking\\runtime\\python\\python.exe'+$q+' '+$pc+'*')){ [IO.File]::WriteAllText($f,('@echo off'+$nl+'rem U-King CLI command guard'+$nl+$q+$pc+'USERPROFILE'+$pc+'\\.uking\\runtime\\python\\python.exe'+$q+' '+$pc+'*'+$nl),[Text.Encoding]::ASCII) } }; $u=[Environment]::GetEnvironmentVariable('Path','User'); if($null -eq $u){$u=''}; $bak=Join-Path $env:USERPROFILE '.uking\\path-backup.txt'; if(-not (Test-Path $bak)){ [IO.File]::WriteAllText($bak,$u) }; $keep=@($u -split ';' | Where-Object { $_ -ne '' -and $_ -ne $shims }); [Environment]::SetEnvironmentVariable('Path',((@($shims)+$keep) -join ';'),'User'); exit 0\"",
          "os": "windows"
        }
      ],
      "repair": [
        {
          "type": "run",
          "label": "停止占用 OpenClaw/npm 全局目录的旧进程（修 EBUSY rename）",
          "cmd": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NonInteractive -Command \"$nodeRoot=(Join-Path $env:USERPROFILE '.uking\\runtime\\node'); Get-CimInstance Win32_Process | Where-Object { $_.ExecutablePath -and $_.ExecutablePath.StartsWith($nodeRoot,[StringComparison]::OrdinalIgnoreCase) } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue }; exit 0\"",
          "os": "windows"
        },
        {
          "type": "ensure_node",
          "label": "检查 Node.js 运行时（OpenClaw 需 Node 24.16+）",
          "min": "24.16.0"
        },
        {
          "type": "run",
          "label": "清除 npm 全局代理配置（客户机代理常把 npm 拦死）",
          "cmd": "call npm config delete proxy --location=global & call npm config delete https-proxy --location=global & call npm config delete proxy & call npm config delete https-proxy & (exit /b 0)",
          "os": "windows"
        },
        {
          "type": "run",
          "label": "清理 npm 缓存",
          "cmd": "call npm cache clean --force & (exit /b 0)",
          "os": "windows"
        },
        {
          "type": "npm_install",
          "label": "强制重装 OpenClaw",
          "package": "openclaw",
          "force": true,
          "allow_scripts": [
            "koffi",
            "esbuild",
            "protobufjs"
          ]
        }
      ],
      "min_free_mb": 500
    },
    "hermes": {
      "name": "Hermes Agent",
      "bin": "hermes",
      "verify_cmd": "hermes --version",
      "steps": [
        {
          "type": "ensure_python",
          "label": "检查 Python 运行时（缺失则自动装便携版）"
        },
        {
          "type": "pip_install",
          "label": "安装 Hermes（pip 阿里源，绕开官方 git 安装）",
          "package": "hermes-agent[web]"
        },
        {
          "type": "run",
          "label": "清掉挡住 hermes 自带 utils.py 的旧版 utils/ shim 包（修 fast_safe_load ImportError；PowerShell 版，exit 0 永不误判失败）",
          "cmd": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NonInteractive -Command \"$base=Join-Path $env:USERPROFILE '.uking\\runtime\\python'; if(Test-Path $base){ Get-ChildItem -LiteralPath $base -Filter site-packages -Recurse -Directory -ErrorAction SilentlyContinue | ForEach-Object { $sp=$_.FullName; if((Test-Path (Join-Path $sp 'utils\\__init__.py')) -and (Test-Path (Join-Path $sp 'utils.py'))){ Remove-Item -LiteralPath (Join-Path $sp 'utils') -Recurse -Force -ErrorAction SilentlyContinue } } }; exit 0\"",
          "os": "windows"
        },
        {
          "type": "run",
          "label": "覆盖上去：给已装的 AI 命令（含系统 Node 装到 %APPDATA%\\npm 的）建轻量转发启动器并前置进用户 PATH，让 U-King 装的赢过你之前装的别家/旧版（不动你的 node/npm、不删你的东西；原 PATH 已备份到 ~/.uking/path-backup.txt，UKING_TEST_HOME 沙箱下跳过）",
          "cmd": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NonInteractive -Command \"if($env:UKING_TEST_HOME){ exit 0 }; $ErrorActionPreference='SilentlyContinue'; $shims=Join-Path $env:USERPROFILE '.uking\\shims'; New-Item -ItemType Directory -Force -Path $shims | Out-Null; $q=[char]34; $pc=[char]37; $nl=[Environment]::NewLine; function UkOurs($f,$tail){ $old=''; if(Test-Path -LiteralPath $f){ $old=[IO.File]::ReadAllText($f) }; $ln=@([regex]::Split($old,'\\r?\\n') | ForEach-Object { $_.Trim() } | Where-Object { $_ -ne '' }); return (($old.Trim() -eq '') -or $old.Contains('U-King CLI command guard') -or (($ln.Count -eq 2) -and ($ln[0] -eq '@echo off') -and (($ln[1].StartsWith($q)) -or ($ln[1] -like 'call *')) -and $ln[1].EndsWith($tail,[StringComparison]::OrdinalIgnoreCase))) }; $src=@(@{d=(Join-Path $env:USERPROFILE '.uking\\runtime\\node'); r=($pc+'USERPROFILE'+$pc+'\\.uking\\runtime\\node\\')}); if($env:APPDATA){ $src=$src+,@{d=(Join-Path $env:APPDATA 'npm'); r=($pc+'APPDATA'+$pc+'\\npm\\')} }; foreach($t in @('claude','codex','pi','openclaw','hermes','opencode')){ $hit=$null; foreach($s in $src){ foreach($e in @('.cmd','.exe')){ if(Test-Path -LiteralPath (Join-Path $s.d ($t+$e))){ $hit=@{r=($s.r+$t+$e); e=$e}; break } }; if($hit){break} }; if($hit){ $f=Join-Path $shims ($t+'.cmd'); if(UkOurs $f ('\\.uking\\runtime\\node\\'+$t+'.cmd'+$q+' '+$pc+'*')){ if($hit.e -eq '.cmd'){ $call='call '+$q+$hit.r+$q+' '+$pc+'*' } else { $call=$q+$hit.r+$q+' '+$pc+'*' }; [IO.File]::WriteAllText($f,('@echo off'+$nl+'rem U-King CLI command guard'+$nl+$call+$nl),[Text.Encoding]::ASCII) } } };  $py=Join-Path $env:USERPROFILE '.uking\\runtime\\python\\python.exe'; if(Test-Path -LiteralPath $py){ $f=Join-Path $shims 'python3.cmd'; if(UkOurs $f ('\\.uking\\runtime\\python\\python.exe'+$q+' '+$pc+'*')){ [IO.File]::WriteAllText($f,('@echo off'+$nl+'rem U-King CLI command guard'+$nl+$q+$pc+'USERPROFILE'+$pc+'\\.uking\\runtime\\python\\python.exe'+$q+' '+$pc+'*'+$nl),[Text.Encoding]::ASCII) } }; $u=[Environment]::GetEnvironmentVariable('Path','User'); if($null -eq $u){$u=''}; $bak=Join-Path $env:USERPROFILE '.uking\\path-backup.txt'; if(-not (Test-Path $bak)){ [IO.File]::WriteAllText($bak,$u) }; $keep=@($u -split ';' | Where-Object { $_ -ne '' -and $_ -ne $shims }); [Environment]::SetEnvironmentVariable('Path',((@($shims)+$keep) -join ';'),'User'); exit 0\"",
          "os": "windows"
        }
      ],
      "repair": [
        {
          "type": "run",
          "label": "清理损坏的便携 Python 目录（修解压中断 / Truncated tar archive；带重试防杀软瞬时锁住刚落盘文件）",
          "cmd": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NonInteractive -Command \"$p=Join-Path $env:USERPROFILE '.uking\\runtime\\python'; Remove-Item -LiteralPath $p -Recurse -Force -ErrorAction SilentlyContinue; if (Test-Path $p) { Start-Sleep -Seconds 2; Remove-Item -LiteralPath $p -Recurse -Force -ErrorAction SilentlyContinue }; if (Test-Path $p) { Start-Sleep -Seconds 3; Remove-Item -LiteralPath $p -Recurse -Force -ErrorAction SilentlyContinue }; exit 0\"",
          "os": "windows"
        },
        {
          "type": "ensure_python",
          "label": "重新下载并解压便携 Python"
        },
        {
          "type": "run",
          "label": "清理 pip 缓存（避免坏 wheel / 半包复用）",
          "cmd": "python -m pip cache purge || exit /b 0",
          "os": "windows"
        },
        {
          "type": "pip_install",
          "label": "强制重装 Hermes",
          "package": "hermes-agent[web]",
          "force": true
        },
        {
          "type": "run",
          "label": "清掉挡住 hermes 自带 utils.py 的旧版 utils/ shim 包（修 fast_safe_load ImportError；PowerShell 版，exit 0 永不误判失败）",
          "cmd": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NonInteractive -Command \"$base=Join-Path $env:USERPROFILE '.uking\\runtime\\python'; if(Test-Path $base){ Get-ChildItem -LiteralPath $base -Filter site-packages -Recurse -Directory -ErrorAction SilentlyContinue | ForEach-Object { $sp=$_.FullName; if((Test-Path (Join-Path $sp 'utils\\__init__.py')) -and (Test-Path (Join-Path $sp 'utils.py'))){ Remove-Item -LiteralPath (Join-Path $sp 'utils') -Recurse -Force -ErrorAction SilentlyContinue } } }; exit 0\"",
          "os": "windows"
        }
      ],
      "min_free_mb": 700
    },
    "opencode": {
      "name": "OpenCode",
      "bin": "opencode",
      "verify_cmd": "opencode --version & opencode --help",
      "verify_reject": "bun is a fast",
      "smoke_cmd": "opencode --help",
      "smoke_expect": "opencode",
      "smoke_reject": "bun is a fast",
      "steps": [
        {
          "type": "ensure_node",
          "label": "检查 Node.js 运行时（缺失则自动装便携版）"
        },
        {
          "type": "npm_install",
          "label": "安装 OpenCode（社区最大的开源终端编程 agent，npmmirror 国内加速）",
          "package": "opencode-ai",
          "with_optional": true
        }
      ],
      "repair": [
        {
          "type": "run",
          "label": "停止占用 npm 全局目录的旧进程（修目录被占用导致 cleanup/rename 失败）",
          "cmd": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NonInteractive -Command \"$nodeRoot=(Join-Path $env:USERPROFILE '.uking\\runtime\\node'); Get-CimInstance Win32_Process | Where-Object { $_.ExecutablePath -and $_.ExecutablePath.StartsWith($nodeRoot,[StringComparison]::OrdinalIgnoreCase) } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue }; exit 0\"",
          "os": "windows"
        },
        {
          "type": "ensure_node",
          "label": "检查 Node.js 运行时（缺失则自动装便携版）"
        },
        {
          "type": "run",
          "label": "清除 npm 全局代理配置（客户机代理常把 npm 拦死）",
          "cmd": "call npm config delete proxy --location=global & call npm config delete https-proxy --location=global & call npm config delete proxy & call npm config delete https-proxy & (exit /b 0)",
          "os": "windows"
        },
        {
          "type": "run",
          "label": "清理 npm 缓存",
          "cmd": "call npm cache clean --force & (exit /b 0)",
          "os": "windows"
        },
        {
          "type": "npm_install",
          "label": "强制重装 OpenCode",
          "package": "opencode-ai",
          "force": true,
          "with_optional": true
        }
      ],
      "verify_expect": "opencode"
    },
    "dsh": {
      "name": "DeepSeek Harness",
      "bin": "dsh",
      "verify_cmd": "dsh --version",
      "steps": [
        {
          "type": "ensure_node",
          "label": "检查 Node.js 运行时（DeepSeek Harness 要 22.19+，不够就用便携版）",
          "min": "22.19.0"
        },
        {
          "type": "npm_install",
          "label": "安装 DeepSeek Harness 0.2.0-rc.2（官方 RC，npm latest/next 最新版）",
          "package": "@deepseek-ai/dsh@0.2.0-rc.2"
        },
        {
          "type": "npm_install",
          "label": "安装 DSH 插件管理器依赖 pnpm 10.33.0",
          "package": "pnpm@10.33.0"
        },
        {
          "type": "run",
          "label": "给 DSH Web 工作台安装缓存前缀稳定插件（固定开源版本）",
          "cmd": "dsh plugin --profile web add -w https://codeload.github.com/dongsheng123132/dsh-cache-stabilizer/tar.gz/7d7394a1421289a8e891e994d779843d93ff7893"
        },
        {
          "type": "run",
          "label": "安装 DSH 持续对话终端模式与缓存统计（固定开源版本）",
          "cmd": "dsh plugin --profile terminal add -w https://codeload.github.com/dongsheng123132/dsh-terminal/tar.gz/251e63689d34082bea15831b44c746e0cc50a5f5 https://codeload.github.com/dongsheng123132/dsh-cache-stabilizer/tar.gz/7d7394a1421289a8e891e994d779843d93ff7893"
        }
      ],
      "repair": [
        {
          "type": "run",
          "label": "停止占用 npm 全局目录的旧进程（修目录被占用导致 cleanup/rename 失败）",
          "cmd": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NonInteractive -Command \"$nodeRoot=(Join-Path $env:USERPROFILE '.uking\\runtime\\node'); Get-CimInstance Win32_Process | Where-Object { $_.ExecutablePath -and $_.ExecutablePath.StartsWith($nodeRoot,[StringComparison]::OrdinalIgnoreCase) } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue }; exit 0\"",
          "os": "windows"
        },
        {
          "type": "ensure_node",
          "label": "检查 Node.js 运行时（DeepSeek Harness 要 22.19+，不够就用便携版）",
          "min": "22.19.0"
        },
        {
          "type": "run",
          "label": "清除 npm 全局代理配置（客户机代理常把 npm 拦死）",
          "cmd": "call npm config delete proxy --location=global & call npm config delete https-proxy --location=global & call npm config delete proxy & call npm config delete https-proxy & (exit /b 0)",
          "os": "windows"
        },
        {
          "type": "run",
          "label": "清理 npm 缓存",
          "cmd": "call npm cache clean --force & (exit /b 0)",
          "os": "windows"
        },
        {
          "type": "npm_install",
          "label": "强制重装 DeepSeek Harness 0.2.0-rc.2",
          "package": "@deepseek-ai/dsh@0.2.0-rc.2",
          "force": true
        },
        {
          "type": "npm_install",
          "label": "修复 DSH 插件管理器依赖 pnpm 10.33.0",
          "package": "pnpm@10.33.0",
          "force": true
        },
        {
          "type": "run",
          "label": "修复 DSH Web 缓存前缀稳定插件",
          "cmd": "dsh plugin --profile web add -w https://codeload.github.com/dongsheng123132/dsh-cache-stabilizer/tar.gz/7d7394a1421289a8e891e994d779843d93ff7893"
        },
        {
          "type": "run",
          "label": "修复 DSH 持续对话终端模式与缓存统计",
          "cmd": "dsh plugin --profile terminal add -w https://codeload.github.com/dongsheng123132/dsh-terminal/tar.gz/251e63689d34082bea15831b44c746e0cc50a5f5 https://codeload.github.com/dongsheng123132/dsh-cache-stabilizer/tar.gz/7d7394a1421289a8e891e994d779843d93ff7893"
        }
      ],
      "min_free_mb": 850
    },
    "pi": {
      "name": "pi",
      "bin": "pi",
      "verify_cmd": "pi --version",
      "steps": [
        {
          "type": "ensure_node",
          "label": "检查 Node.js 运行时（pi 要 22.19+，不够就用便携版）",
          "min": "22.19.0"
        },
        {
          "type": "npm_install",
          "label": "安装 pi（Earendil 出品的开源终端 agent，npmmirror 国内加速）",
          "package": "@earendil-works/pi-coding-agent"
        }
      ],
      "repair": [
        {
          "type": "run",
          "label": "停止占用 npm 全局目录的旧进程（修目录被占用导致 cleanup/rename 失败）",
          "cmd": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NonInteractive -Command \"$nodeRoot=(Join-Path $env:USERPROFILE '.uking\\runtime\\node'); Get-CimInstance Win32_Process | Where-Object { $_.ExecutablePath -and $_.ExecutablePath.StartsWith($nodeRoot,[StringComparison]::OrdinalIgnoreCase) } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue }; exit 0\"",
          "os": "windows"
        },
        {
          "type": "ensure_node",
          "label": "检查 Node.js 运行时（pi 要 22.19+，不够就用便携版）",
          "min": "22.19.0"
        },
        {
          "type": "run",
          "label": "清除 npm 全局代理配置（客户机代理常把 npm 拦死）",
          "cmd": "call npm config delete proxy --location=global & call npm config delete https-proxy --location=global & call npm config delete proxy & call npm config delete https-proxy & (exit /b 0)",
          "os": "windows"
        },
        {
          "type": "run",
          "label": "清理 npm 缓存",
          "cmd": "call npm cache clean --force & (exit /b 0)",
          "os": "windows"
        },
        {
          "type": "npm_install",
          "label": "强制重装 pi",
          "package": "@earendil-works/pi-coding-agent",
          "force": true
        }
      ]
    },
    "agent-browser": {
      "name": "U-King 浏览器运行时",
      "bin": "agent-browser",
      "verify_cmd": "agent-browser --version",
      "steps": [
        {
          "type": "ensure_node",
          "label": "检查 Node.js 运行时（缺失则自动装便携版）"
        },
        {
          "type": "npm_install",
          "label": "安装 agent-browser 0.27.0（固定已验证版本；复用本机 Chrome，不下载浏览器内核）",
          "package": "agent-browser@0.27.0"
        }
      ],
      "repair": [
        {
          "type": "ensure_node",
          "label": "重新检查 Node.js 运行时（上次下载中断时先自愈）"
        },
        {
          "type": "npm_install",
          "label": "强制重装 agent-browser 0.27.0",
          "package": "agent-browser@0.27.0",
          "force": true
        }
      ],
      "min_free_mb": 80
    },
    "muse-code": {
      "name": "Muse Code",
      "bin": "muse",
      "verify_cmd": "muse --version",
      "min_free_mb": 200,
      "steps": [
        {
          "type": "run",
          "label": "下载并运行Muse Code官方安装器（需海外网络）",
          "cmd": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NonInteractive -Command \"$ErrorActionPreference='Stop'; if($env:UKING_TEST_HOME){ throw '沙箱禁止运行第三方系统安装脚本，请在隔离测试机验证' }; $f=Join-Path $env:TEMP ('uking-muse-'+[Guid]::NewGuid().ToString('N')+'.ps1'); & curl.exe -fsSL --connect-timeout 10 --max-time 30 -o $f 'https://dev.meta.ai/install.ps1'; if($LASTEXITCODE -ne 0){ throw 'Muse Code 下载失败，需要可访问海外服务的网络' }; $p=Start-Process -FilePath (Join-Path $PSHOME 'powershell.exe') -ArgumentList @('-NoProfile','-NonInteractive','-ExecutionPolicy','Bypass','-File',([char]34+$f+[char]34)) -WindowStyle Hidden -PassThru; if(-not $p.WaitForExit(900000)){ $p.Kill(); throw 'Muse Code 安装超时，请检查网络后重试' }; exit $p.ExitCode\"",
          "os": "windows"
        },
        {
          "type": "run",
          "label": "安装Muse Code官方 CLI",
          "cmd": "curl -fsSL --connect-timeout 10 --max-time 30 https://dev.meta.ai/install.sh -o /tmp/uking-muse-install.sh && bash /tmp/uking-muse-install.sh",
          "os": "macos"
        },
        {
          "type": "run",
          "label": "安装Muse Code官方 CLI",
          "cmd": "curl -fsSL --connect-timeout 10 --max-time 30 https://dev.meta.ai/install.sh -o /tmp/uking-muse-install.sh && bash /tmp/uking-muse-install.sh",
          "os": "linux"
        }
      ],
      "repair": []
    },
    "antigravity-cli": {
      "name": "Antigravity CLI",
      "bin": "agy",
      "verify_cmd": "agy --version",
      "min_free_mb": 200,
      "steps": [
        {
          "type": "run",
          "label": "下载并运行Antigravity CLI官方安装器（需海外网络）",
          "cmd": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NonInteractive -Command \"$ErrorActionPreference='Stop'; if($env:UKING_TEST_HOME){ throw '沙箱禁止运行第三方系统安装脚本，请在隔离测试机验证' }; $f=Join-Path $env:TEMP ('uking-agy-'+[Guid]::NewGuid().ToString('N')+'.ps1'); & curl.exe -fsSL --connect-timeout 10 --max-time 30 -o $f 'https://antigravity.google/cli/install.ps1'; if($LASTEXITCODE -ne 0){ throw 'Antigravity CLI 下载失败，需要可访问海外服务的网络' }; $p=Start-Process -FilePath (Join-Path $PSHOME 'powershell.exe') -ArgumentList @('-NoProfile','-NonInteractive','-ExecutionPolicy','Bypass','-File',([char]34+$f+[char]34)) -WindowStyle Hidden -PassThru; if(-not $p.WaitForExit(900000)){ $p.Kill(); throw 'Antigravity CLI 安装超时，请检查网络后重试' }; exit $p.ExitCode\"",
          "os": "windows"
        },
        {
          "type": "run",
          "label": "安装Antigravity CLI官方 CLI",
          "cmd": "curl -fsSL --connect-timeout 10 --max-time 30 https://antigravity.google/cli/install.sh -o /tmp/uking-agy-install.sh && bash /tmp/uking-agy-install.sh",
          "os": "macos"
        },
        {
          "type": "run",
          "label": "安装Antigravity CLI官方 CLI",
          "cmd": "curl -fsSL --connect-timeout 10 --max-time 30 https://antigravity.google/cli/install.sh -o /tmp/uking-agy-install.sh && bash /tmp/uking-agy-install.sh",
          "os": "linux"
        }
      ],
      "repair": []
    },
    "magpie": {
      "name": "magpie",
      "bin": "magpie",
      "verify_cmd": "magpie --version",
      "steps": [
        {
          "type": "run",
          "os": "windows",
          "label": "下载 magpie CLI 0.1.1291（官方单文件 48MB，GitHub 直下）",
          "cmd": "%SystemRoot%\\System32\\curl.exe -fL -sS --retry 3 --retry-delay 3 -m 600 --proxy \"\" -o \"%TEMP%\\magpie-cli.exe\" https://github.com/yetone/magpie/releases/download/v0.1.1291/magpie-cli-windows-amd64.exe"
        },
        {
          "type": "run",
          "os": "windows",
          "label": "校验 SHA-256 后装到 %USERPROFILE%\\bin\\magpie.exe 并把 ~/bin 前置进用户 PATH",
          "cmd": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NonInteractive -Command \"$ErrorActionPreference='Stop'; $src=$env:TEMP+'\\magpie-cli.exe'; if((Get-FileHash -LiteralPath $src -Algorithm SHA256).Hash.ToLower() -ne '3569c27f3fcc5ac18d4ca115a5afe444b3054d0276608b850b614aee1fde02b2'){ throw 'magpie 下载校验失败（SHA-256 不符，可能被代理损坏/篡改）' }; $d=$env:USERPROFILE+'\\bin'; New-Item -ItemType Directory -Force -Path $d | Out-Null; Copy-Item -Force -LiteralPath $src -Destination ($d+'\\magpie.exe'); Remove-Item -Force -LiteralPath $src -ErrorAction SilentlyContinue; $u=[Environment]::GetEnvironmentVariable('Path','User'); if($null -eq $u){$u=''}; if((($u -split ';') -notcontains $d)){ [Environment]::SetEnvironmentVariable('Path',($u.TrimEnd(';')+';'+$d),'User') }; if(Test-Path -LiteralPath ($d+'\\magpie.exe')){ exit 0 } else { exit 1 }\""
        }
      ],
      "repair": [
        {
          "type": "run",
          "os": "windows",
          "label": "重下 magpie CLI（上次下载中断/损坏时自愈）",
          "cmd": "%SystemRoot%\\System32\\curl.exe -fL -sS --retry 3 --retry-delay 3 -m 600 --proxy \"\" -o \"%TEMP%\\magpie-cli.exe\" https://github.com/yetone/magpie/releases/download/v0.1.1291/magpie-cli-windows-amd64.exe"
        },
        {
          "type": "run",
          "os": "windows",
          "label": "校验 SHA-256 后重装",
          "cmd": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoProfile -NonInteractive -Command \"$ErrorActionPreference='Stop'; $src=$env:TEMP+'\\magpie-cli.exe'; if((Get-FileHash -LiteralPath $src -Algorithm SHA256).Hash.ToLower() -ne '3569c27f3fcc5ac18d4ca115a5afe444b3054d0276608b850b614aee1fde02b2'){ throw 'magpie 下载校验失败（SHA-256 不符）' }; $d=$env:USERPROFILE+'\\bin'; New-Item -ItemType Directory -Force -Path $d | Out-Null; Copy-Item -Force -LiteralPath $src -Destination ($d+'\\magpie.exe'); Remove-Item -Force -LiteralPath $src -ErrorAction SilentlyContinue; $u=[Environment]::GetEnvironmentVariable('Path','User'); if($null -eq $u){$u=''}; if((($u -split ';') -notcontains $d)){ [Environment]::SetEnvironmentVariable('Path',($u.TrimEnd(';')+';'+$d),'User') }; if(Test-Path -LiteralPath ($d+'\\magpie.exe')){ exit 0 } else { exit 1 }\""
        }
      ],
      "min_free_mb": 120
    }
  },
  "provider_templates": [
    {
      "name": "OpenAI 官方",
      "openai_base": "https://api.openai.com/v1",
      "model": "gpt-4o-mini",
      "key_url": "https://platform.openai.com/api-keys",
      "key_hint": "sk- 开头",
      "website": "https://platform.openai.com"
    },
    {
      "name": "DeepSeek 官方",
      "openai_base": "https://api.deepseek.com/v1",
      "anthropic_base": "https://api.deepseek.com/anthropic",
      "model": "deepseek-v4-flash",
      "small_model": "deepseek-v4-flash",
      "key_url": "https://platform.deepseek.com/api_keys",
      "key_hint": "sk- 开头",
      "website": "https://platform.deepseek.com"
    },
    {
      "name": "智谱 GLM",
      "openai_base": "https://open.bigmodel.cn/api/paas/v4",
      "anthropic_base": "https://open.bigmodel.cn/api/anthropic",
      "model": "glm-5",
      "small_model": "glm-5-flash",
      "key_url": "https://www.bigmodel.cn/usercenter/apikeys",
      "key_hint": "在「API 密钥」页创建",
      "website": "https://open.bigmodel.cn"
    },
    {
      "name": "Kimi（月之暗面）",
      "openai_base": "https://api.moonshot.cn/v1",
      "anthropic_base": "https://api.moonshot.cn/anthropic",
      "model": "kimi-k2.6",
      "key_url": "https://platform.moonshot.cn/console/api-keys",
      "key_hint": "sk- 开头",
      "website": "https://platform.moonshot.cn"
    },
    {
      "name": "小米 MiMo",
      "openai_base": "https://api.xiaomimimo.com/v1",
      "anthropic_base": "https://api.xiaomimimo.com/anthropic",
      "model": "mimo-v2.6-flash",
      "key_url": "https://platform.xiaomimimo.com",
      "key_hint": "按量付费 API Key（sk- 开头）；套餐 tp- / ttp- 请选「小米 MiMo（Token Plan）」",
      "website": "https://mimo.mi.com"
    },
    {
      "name": "小米 MiMo（Token Plan）",
      "openai_base": "https://token-plan-cn.xiaomimimo.com/v1",
      "anthropic_base": "https://token-plan-cn.xiaomimimo.com/anthropic",
      "model": "mimo-v2.6-flash",
      "key_url": "https://platform.xiaomimimo.com",
      "key_hint": "Token Plan 套餐专用 Key（个人 tp- / 团队 ttp-）；按量 sk- 请选「小米 MiMo」；区域地址以控制台为准",
      "website": "https://mimo.mi.com"
    },
    {
      "name": "阿里百炼（通义）",
      "openai_base": "https://dashscope.aliyuncs.com/compatible-mode/v1",
      "anthropic_base": "https://dashscope.aliyuncs.com/apps/anthropic",
      "model": "qwen-plus",
      "key_url": "https://bailian.console.aliyun.com/#/api-key",
      "key_hint": "按量付费 API Key；Token/Coding Plan 套餐 Key 只能配其专用地址，混用会 401/403",
      "website": "https://bailian.console.aliyun.com"
    },
    {
      "name": "火山方舟（豆包）",
      "openai_base": "https://ark.cn-beijing.volces.com/api/v3",
      "model": "doubao-seed-1-6-250615",
      "key_url": "https://console.volcengine.com/ark",
      "key_hint": "在火山方舟控制台创建",
      "website": "https://console.volcengine.com/ark"
    },
    {
      "name": "SiliconFlow（硅基流动）",
      "openai_base": "https://api.siliconflow.cn/v1",
      "model": "deepseek-ai/DeepSeek-V3",
      "key_url": "https://cloud.siliconflow.cn/account/ak",
      "key_hint": "sk- 开头",
      "website": "https://siliconflow.cn"
    },
    {
      "name": "OpenRouter",
      "openai_base": "https://openrouter.ai/api/v1",
      "anthropic_base": "https://openrouter.ai/api",
      "model": "openai/gpt-5.4-mini",
      "key_url": "https://openrouter.ai/keys",
      "key_hint": "sk-or- 开头",
      "website": "https://openrouter.ai"
    },
    {
      "name": "OpenCode Zen",
      "openai_base": "https://opencode.ai/zen/v1",
      "model": "x-preview-f-free",
      "key_url": "https://opencode.ai/auth",
      "key_hint": "登录 opencode.ai 后在 Zen 页面复制",
      "website": "https://opencode.ai/docs/zen/"
    },
    {
      "name": "腾讯混元",
      "openai_base": "https://tokenhub.tencentmaas.com/v1",
      "anthropic_base": "https://tokenhub.tencentmaas.com/v1",
      "model": "hy3",
      "key_url": "https://tokenhub.tencentmaas.com",
      "key_hint": "TokenHub 国内站 Key；国际站请改为 tokenhub-intl.tencentmaas.com/v1，二者 Key 不互通",
      "website": "https://tokenhub.tencentmaas.com"
    },
    {
      "name": "智谱 GLM 海外（z.ai）",
      "openai_base": "https://api.z.ai/api/paas/v4",
      "anthropic_base": "https://api.z.ai/api/anthropic",
      "model": "glm-4.6",
      "key_url": "https://z.ai/manage-apikey/apikey-list",
      "key_hint": "在 z.ai 创建 API Key",
      "website": "https://z.ai"
    },
    {
      "name": "MiniMax（国内站）",
      "openai_base": "https://api.minimaxi.com/v1",
      "model": "MiniMax-M2.7",
      "key_url": "https://platform.minimaxi.com",
      "key_hint": "「接口密钥」页创建；国内站按量付费 Key，跟 Token Plan 订阅 Key 不通用",
      "website": "https://platform.minimaxi.com"
    },
    {
      "name": "百度千帆 ERNIE",
      "openai_base": "https://qianfan.baidubce.com/v2",
      "anthropic_base": "https://qianfan.baidubce.com/anthropic",
      "model": "ernie-4.5-turbo-128k",
      "key_url": "https://console.bce.baidu.com/qianfan/overview",
      "key_hint": "bce-v3/ALTAK- 开头，控制台直接创建（V2 版，永久有效）",
      "website": "https://qianfan.baidubce.com"
    },
    {
      "name": "阶跃星辰 Stepfun",
      "openai_base": "https://api.stepfun.com/v1",
      "model": "step-3.5-flash",
      "key_url": "https://platform.stepfun.com/interface-key",
      "key_hint": "国内站需 +86 手机号验证",
      "website": "https://platform.stepfun.com"
    },
    {
      "name": "美团 LongCat",
      "openai_base": "https://api.longcat.chat/openai",
      "anthropic_base": "https://api.longcat.chat/anthropic",
      "model": "LongCat-2.0",
      "key_url": "https://longcat.chat/platform/",
      "key_hint": "注册后自动生成一把 default Key，同一把 Key 两种协议都能用",
      "website": "https://longcat.chat/platform/"
    },
    {
      "name": "Google Gemini",
      "openai_base": "https://generativelanguage.googleapis.com/v1beta/openai/",
      "model": "gemini-3.5-flash",
      "key_url": "https://aistudio.google.com/apikey",
      "key_hint": "AI Studio 创建，免信用卡",
      "website": "https://ai.google.dev/gemini-api/docs/openai"
    },
    {
      "name": "xAI Grok",
      "openai_base": "https://api.x.ai/v1",
      "model": "grok-4.6",
      "key_url": "https://console.x.ai",
      "key_hint": "console.x.ai 创建（别跟 grok.com 聊天页搞混）",
      "website": "https://x.ai/api"
    },
    {
      "name": "Mistral",
      "openai_base": "https://api.mistral.ai/v1",
      "model": "mistral-large-latest",
      "key_url": "https://console.mistral.ai",
      "key_hint": "La Plateforme 控制台创建，有限量免费额度",
      "website": "https://docs.mistral.ai"
    },
    {
      "name": "Groq",
      "openai_base": "https://api.groq.com/openai/v1",
      "model": "openai/gpt-oss-120b",
      "key_url": "https://console.groq.com/keys",
      "key_hint": "gsk_ 开头，免信用卡有免费额度",
      "website": "https://console.groq.com"
    },
    {
      "name": "iFlow 心流",
      "openai_base": "https://apis.iflow.cn/v1",
      "key_url": "https://platform.iflow.cn/",
      "key_hint": "手机号注册即可，无需实名；注册后在控制台创建 Key",
      "website": "https://platform.iflow.cn/"
    },
    {
      "name": "魔搭 ModelScope",
      "openai_base": "https://api-inference.modelscope.cn/v1",
      "model": "Qwen/Qwen3-Coder-480B-A35B-Instruct",
      "key_url": "https://modelscope.cn/my/myaccesstoken",
      "key_hint": "需绑定阿里云账号并完成实名认证后才能创建 Access Token",
      "website": "https://modelscope.cn"
    },
    {
      "name": "B.ai",
      "openai_base": "https://api.b.ai/v1",
      "anthropic_base": "https://api.b.ai",
      "key_url": "https://b.ai/",
      "key_hint": "第三方中转站（TRON 系新平台，2026 上线），建议小额充值试用，别一次性大额储值",
      "website": "https://b.ai/"
    },
    {
      "name": "APIMart",
      "openai_base": "https://api.apimart.ai/v1",
      "anthropic_base": "https://api.apimart.ai",
      "key_url": "https://apimart.ai/",
      "key_hint": "第三方折扣中转（自称省 30%–70%），来源纯度未经验证，勿大额充值、勿传敏感数据",
      "website": "https://apimart.ai/"
    }
  ]
}
