From 759e7a13bb8458be2972743329c3c514a3eacdcd Mon Sep 17 00:00:00 2001 From: lx-1997 <13500790262@163.com> Date: Fri, 4 Dec 2026 14:48:35 +0800 Subject: [PATCH 1/2] fix(plugin): verify Studio MCP registration after import --- docs/studio-plugin-runtime-package.md | 2 +- .../rdk-robot-learning-platform/FILES.sha256 | 4 +-- .../provenance.json | 2 +- .../scripts/install-host.mjs | 32 +++++++++++------- scripts/package-platform-plugin.mjs | 7 ++-- scripts/portable-studio-setup.mjs | 33 ++++++++++++++++--- scripts/verify-universal-studio-bundle.mjs | 19 ++++------- services/sim2real-web/public/downloads.html | 9 ++--- 8 files changed, 68 insertions(+), 40 deletions(-) diff --git a/docs/studio-plugin-runtime-package.md b/docs/studio-plugin-runtime-package.md index 1ed9160a..dc127c6f 100644 --- a/docs/studio-plugin-runtime-package.md +++ b/docs/studio-plugin-runtime-package.md @@ -14,7 +14,7 @@ npm run package:plugin -- --out-dir <制品目录> --studio-universal-runtime-di npm run package:plugin -- --out-dir <制品目录> --studio-target darwin-arm64 --studio-runtime ``` -解压后,在 Studio 扩展中心导入并启用插件目录。通用包的默认命令会启动当前系统的随包 Node。首次连接按页面提示登录。若旧安装留下的 MCP 连接仍指向之前的运行时路径,重新运行解压目录中的兼容安装器。Windows 用 `setup-studio-windows.cmd`,macOS 用 `setup-studio-macos.command`。安装器核对导入副本,并更新已有连接的路径。基础插件 ZIP 和 Qoder 安装流程沿用各自的 setup。 +解压后,在 Studio 扩展中心导入并启用插件目录。完全退出 Studio,再运行解压目录中的安装器。Windows 用 `setup-studio-windows.cmd`,macOS 用 `setup-studio-macos.command`。安装器核对导入副本,在 Studio 的 MCP 注册表里创建或更新连接,然后验证连接指向已安装的运行时和脚本。重新打开 Studio 后,在 MCP 设置中测试连接并新开一个对话。首次连接按页面提示登录。需要沿用 Studio 登录的用户可显式传入 `--studio-login inherit`。基础插件 ZIP 和 Qoder 安装流程沿用各自的 setup。 发布前在空白的正式版 Studio 配置中完成导入和安装,然后移走解压来源。在 PATH 不含 Node 的条件下核对 Studio 只创建一个机器人学习 MCP 连接,启动文件来自导入副本,工具可用,首次认证状态正确。按实际验收过的系统和架构记录结果。 diff --git a/plugins/rdk-robot-learning-platform/FILES.sha256 b/plugins/rdk-robot-learning-platform/FILES.sha256 index 4472a75b..4bf92ce7 100644 --- a/plugins/rdk-robot-learning-platform/FILES.sha256 +++ b/plugins/rdk-robot-learning-platform/FILES.sha256 @@ -17,7 +17,7 @@ bd7b84d85126d8186e7d690159ee038dfb6b8bb609d988ea9e189b821add5cb8 THIRD_PARTY_NO ccd805b7927d7bd8a1e67dd4f8c42fe826ccb7e39e12c8c14046ff105b2a62c1 mcp/retained-core.mjs 90083a11362304cab596b10d3432bb587f7939db1e0961e5c44d4ec5e4f66d31 mcp/source-checkout.example.json 62e1a989af8962f906a3c1ad3cb0959ccf2fddeb412a0dce05114e5f5b1b1ba5 plugin.json -d1fc37130bbe2b03febfe0fbebc3062d2778b45c40e9275dd480fdf371f82e0f provenance.json +38b0de1063b2a75e34c44b9fd1a25df28f504018c003308361e280d9a34fd03b provenance.json 69180fff7f969d9997e8f9d57f102b89e8dd64bf79a58971684fd9f42ff8973b references/api-workflows.md 556766514a5d70c22cea788fade80d77b31d0d78398a5e352795a908159ec069 references/classroom-guardrails.md a770c873487ab28d632b0db684c8a26b77ae4d3633ffa3f362d3f78d0d0f00ec references/cli-capabilities.md @@ -74,7 +74,7 @@ f36be13a2c881fc3b313b436497df489707759da3874e1b0ace96b6d36876d46 scripts/experi cc66d31e44f4fb09286e840896288d7225afbe0c41b6a2b71c97d219cef08e8f scripts/experience.mjs 59bd3dc740d3229c6c8a1567f3275bc8bfa1a9af8b40a616a7fc1027bd25ce87 scripts/experiment-context.mjs 7e1b24835432f0986d256beaa3e4f81efd9d887eb417f6518a741fe78bb36eef scripts/guided-input.mjs -38962a0bb14ae1310e136df4a90c47b30c5fd6b804440093ea6bd1ea8de130bc scripts/install-host.mjs +e979cff213f0366efc7f553d4f3188856f99461460ed0bc614b844199c1298b3 scripts/install-host.mjs a1f9433dedc7dddd783534a021bb413201a2fe2bbfa80141dcbfd0b321632868 scripts/mcp-app-resource.mjs 6566534557dc88e635cc378ada52d3426cfbbf1e762b52baf28155b05c8bb85c scripts/originman-dance-config.mjs defb12bb687e2f8278e4d00e9f51cf2bae65294bb35ad94c09d792b8f618be5c scripts/originman-motion.mjs diff --git a/plugins/rdk-robot-learning-platform/provenance.json b/plugins/rdk-robot-learning-platform/provenance.json index 0394cda7..d421a109 100644 --- a/plugins/rdk-robot-learning-platform/provenance.json +++ b/plugins/rdk-robot-learning-platform/provenance.json @@ -39,7 +39,7 @@ "scripts/plugin-errors.mjs": "2d89f3b61d8de24c3fb2936141266985d4416d9087b8b642951424c2062d14dd", "scripts/course-setup.mjs": "5b3606ed3d38c930213260a0103a3fd76db680af435fb96f735f3bee32014fb9", "scripts/submission-journal.mjs": "3a860e2075ced99dca2cf95a2bd7bcab17248b14ddf264b942cb8342fcbc044f", - "scripts/install-host.mjs": "38962a0bb14ae1310e136df4a90c47b30c5fd6b804440093ea6bd1ea8de130bc", + "scripts/install-host.mjs": "e979cff213f0366efc7f553d4f3188856f99461460ed0bc614b844199c1298b3", "scripts/studio-login-patch.mjs": "7067513a5ed6c69f9a011c17494d0918aec9793d1f1868f359965cd70de50ce8", "windows-binding.mjs": "2bd5a6f09a491d5d2c3caaffb64dd56a18c2ce7f699bd4c77360d0300d5d4eb5", "setup-windows.cmd": "52c01cf497c9af316c69330d38f711d89e45872156df208332c2e1379835cf78", diff --git a/plugins/rdk-robot-learning-platform/scripts/install-host.mjs b/plugins/rdk-robot-learning-platform/scripts/install-host.mjs index cb8619b3..3f280a04 100644 --- a/plugins/rdk-robot-learning-platform/scripts/install-host.mjs +++ b/plugins/rdk-robot-learning-platform/scripts/install-host.mjs @@ -247,7 +247,7 @@ function replaceFileSync(temp, target) { } } -function syncPreservedConfigToPluginManifest(pluginRoot, mergedConnection) { +function syncPreservedConfigToPluginManifest(pluginRoot, mergedConnection, installedCopy) { if (!pluginRoot || !mergedConnection || typeof mergedConnection !== 'object') return false; const manifestFile = path.join(pluginRoot, '.mcp.json'); if (!fs.existsSync(manifestFile)) return false; @@ -265,6 +265,10 @@ function syncPreservedConfigToPluginManifest(pluginRoot, mergedConnection) { if (!entry || typeof entry !== 'object' || Array.isArray(entry)) return false; const nextEntry = { ...entry, + ...(installedCopy && { + command: mergedConnection.command, + args: mergedConnection.args, + }), ...(mergedConnection.env && typeof mergedConnection.env === 'object' ? { env: { ...entry.env, ...mergedConnection.env } } : {}), @@ -375,6 +379,7 @@ export function installStudioConnection( ) throw Error('Studio数据目录必须是明确的常规目录。'); const registry = path.join(resolvedDirectory, 'plugins-registry.json'); + let installedCopy = false; if (pluginRoot && fs.existsSync(registry)) { const stat = fs.lstatSync(registry); if (stat.isSymbolicLink() || !stat.isFile() || stat.size > 2 * 1024 * 1024) @@ -383,16 +388,19 @@ export function installStudioConnection( if ( record?.enabled === true && typeof record.installPath === 'string' && - fs.existsSync(record.installPath) && - normalizeComparablePath(record.installPath) !== normalizeComparablePath(pluginRoot) - ) - return { - installed: false, - needsHostImport: true, - importDirectory: path.resolve(pluginRoot), - reason: - '本次只完成了新版配置。请在 Studio 插件中心更新 RDK Robot Learning Platform,选择本次解压后的完整插件目录。若当前 Studio 只提供「导入本地插件」,先移除插件中心的旧条目,再导入这个目录。完成后新建对话,用 rdk_plugin_status 核对运行版本。', - }; + fs.existsSync(record.installPath) + ) { + installedCopy = + normalizeComparablePath(record.installPath) === normalizeComparablePath(pluginRoot); + if (!installedCopy) + return { + installed: false, + needsHostImport: true, + importDirectory: path.resolve(pluginRoot), + reason: + '本次只完成了新版配置。请在 Studio 插件中心更新 RDK Robot Learning Platform,选择本次解压后的完整插件目录。若当前 Studio 只提供「导入本地插件」,先移除插件中心的旧条目,再导入这个目录。完成后新建对话,用 rdk_plugin_status 核对运行版本。', + }; + } } const target = path.join(resolvedDirectory, 'mcp.json'); let existing = null, @@ -431,7 +439,7 @@ export function installStudioConnection( } const mergedEntry = result.configuration.mcpServers[result.name]; const pluginManifestSynced = pluginRoot - ? syncPreservedConfigToPluginManifest(pluginRoot, mergedEntry) + ? syncPreservedConfigToPluginManifest(pluginRoot, mergedEntry, installedCopy) : false; const registrySync = pluginRoot ? syncStudioPluginRegistryVersion({ directory: resolvedDirectory, pluginRoot, pluginVersion }) diff --git a/scripts/package-platform-plugin.mjs b/scripts/package-platform-plugin.mjs index 2ccfb044..b003edd6 100644 --- a/scripts/package-platform-plugin.mjs +++ b/scripts/package-platform-plugin.mjs @@ -351,7 +351,7 @@ def write_studio_entries(add, studio): }, }}}), 0o100644) if studio['universal']: - platform = '此包适用于 Windows x64 和 Apple 芯片 Mac(已内置对应 Node.js 运行时,导入即用);Intel Mac 与 Windows ARM64 双击下方安装器也会自动拉取校验版运行时。' + platform = '此包适用于 Windows x64 和 Apple 芯片 Mac(已内置对应 Node.js 运行时);Intel Mac 与 Windows ARM64 双击下方安装器也会自动拉取校验版运行时。' launcher = 'Windows 双击 setup-studio-windows.cmd,macOS 双击 setup-studio-macos.command。安装器会选择或准备本机架构的运行时。' else: target = studio['runtimes'][0]['target'] @@ -363,8 +363,9 @@ def write_studio_entries(add, studio): + platform + '\n\n' '1. 解压 ZIP,打开 Studio。\n' '2. 在扩展中心选择「添加 → 从目录导入插件」,选中解压后的插件目录。升级时选择覆盖安装。\n' - '3. 在扩展中心的 MCP 页测试 rdk-robot-learning-platform 的连接,成功后新建对话说「开始 OriginMan Workshop」。首次访问账号数据按页面提示登录。\n\n' - '只有早期 Studio 无法启动 MCP 或需要额外架构运行时时,才运行兼容安装器。' + launcher + '兼容安装器会核对 Studio 已导入的副本与连接。\n\n' + '3. 完全退出 Studio,运行解压目录中的安装器。' + launcher + '\n' + '4. 重新打开 Studio,在扩展中心的 MCP 页测试 rdk-robot-learning-platform 的连接,成功后新建对话说「开始 OriginMan Workshop」。首次访问账号数据按页面提示登录。\n\n' + '安装器会核对 Studio 已导入的副本,登记学习平台 MCP 连接。\n\n' '安装完成后,启动文件位于 Studio 的插件安装目录。解压来源可移走。' '如需停用此插件,也在 Studio 的 MCP 设置中停用机器人学习连接。\n' ).encode(), 0o100644) diff --git a/scripts/portable-studio-setup.mjs b/scripts/portable-studio-setup.mjs index 343256e7..e34d43ed 100644 --- a/scripts/portable-studio-setup.mjs +++ b/scripts/portable-studio-setup.mjs @@ -14,6 +14,7 @@ const allowed = new Set([ '--studio-data-dir', '--connection-name', '--resource-id', + '--studio-login', ]); function readFile(file) { @@ -87,11 +88,21 @@ async function verifyImportedFiles(installed) { } } -async function verifyWorkshopTools(installed, binary, version) { - const config = JSON.parse(readFile(path.join(installed, '.mcp.json'))).mcpServers[name]; +async function verifyWorkshopTools(installed, binary, version, dataDirectory, connectionName) { + const registry = JSON.parse(readFile(path.join(dataDirectory, 'mcp.json'))); + const config = registry.mcpServers?.[connectionName]; + const entryPoint = path.join(installed, 'scripts', 'experience-mcp.mjs'); + if ( + config?.command !== binary || + config.args?.length !== 1 || + config.args[0] !== entryPoint || + registry.disabled?.includes(connectionName) + ) { + throw Error('Studio MCP 注册未保存。请退出 Studio 后重新运行安装器。'); + } const client = connectMcp({ - command: binary, - args: [path.join(installed, 'scripts', 'experience-mcp.mjs')], + command: config.command, + args: config.args, env: { ...process.env, ...config.env }, timeoutMs: 15_000, }); @@ -199,7 +210,19 @@ try { ); if (child.error) throw child.error; if (child.status === 0 && child.stdout.includes('"installationState":"installed"')) { - await verifyWorkshopTools(installed, binary, manifest.version); + const receipt = child.stdout + .split(/\r?\n/) + .filter((line) => line.startsWith('{')) + .map((line) => JSON.parse(line)) + .find((value) => value.installationState === 'installed'); + if (!receipt?.name) throw Error('安装器未报告 Studio MCP 连接名。'); + await verifyWorkshopTools( + installed, + binary, + manifest.version, + matchedDataDirectory, + receipt.name, + ); console.log('Workshop 工具连接检查通过。'); } process.stdout.write(child.stdout ?? ''); diff --git a/scripts/verify-universal-studio-bundle.mjs b/scripts/verify-universal-studio-bundle.mjs index 73d39ab2..1f3d9152 100644 --- a/scripts/verify-universal-studio-bundle.mjs +++ b/scripts/verify-universal-studio-bundle.mjs @@ -58,11 +58,11 @@ env.PATH = windows env.RDK_DATA_DIR = data; env.CI = 'true'; -function launchInstaller() { +function launchInstaller(args = []) { const cwd = unpacked; return windows - ? run('cmd.exe', ['/d', '/c', 'setup-studio-windows.cmd'], { cwd, env, input: '\r\n' }) - : run('./setup-studio-macos.command', [], { cwd, env, input: '' }); + ? run('cmd.exe', ['/d', '/c', 'setup-studio-windows.cmd', ...args], { cwd, env, input: '\r\n' }) + : run('./setup-studio-macos.command', args, { cwd, env, input: '' }); } const requests = []; @@ -157,13 +157,8 @@ try { await direct.close(); } const configuration = path.join(data, 'mcp.json'); - fs.writeFileSync( - configuration, - JSON.stringify({ - mcpServers: { [pluginName]: { env: { RDK_SIM2REAL_MCP_BASE_URL: platformUrl } } }, - }), - ); - const installer = requireExit(launchInstaller(), 0); + fs.writeFileSync(configuration, JSON.stringify({ version: 1, mcpServers: {}, disabled: [] })); + const installer = requireExit(launchInstaller(['--platform-url', platformUrl]), 0); assert.match(installer, /"installationState":"installed"/); assert.match(installer, /Workshop 工具连接检查通过/); const connections = readJson(configuration).mcpServers; @@ -180,8 +175,8 @@ try { assert.equal(entry.permissions.tools.rdk_compute_resource_register, undefined); assert.equal(entry.requestTimeoutMs, 150_000); const declarations = readJson(path.join(imported, '.mcp.json')).mcpServers; - assert.equal(declarations[pluginName].command, './mcp/runtime/' + binary); - assert.deepEqual(declarations[pluginName].args, ['./scripts/experience-mcp.mjs']); + assert.equal(declarations[pluginName].command, entry.command); + assert.deepEqual(declarations[pluginName].args, entry.args); // Simulate a learner moving the downloaded folder after installation. fs.renameSync(download, path.join(fixture, '已移动 下载')); diff --git a/services/sim2real-web/public/downloads.html b/services/sim2real-web/public/downloads.html index a14ff9f8..5035b8c9 100644 --- a/services/sim2real-web/public/downloads.html +++ b/services/sim2real-web/public/downloads.html @@ -36,8 +36,8 @@

下载 RDK Robot Learning 插件

Studio 通用包

推荐 -

Apple 芯片 Mac 与 Windows x64 解压后从扩展中心导入即可使用,包内已内置 Node 运行时。

-

适用机型:Apple 芯片 Mac、Windows x64 导入即用;Intel Mac、Windows ARM64 解压后先运行包内安装器。

+

内置 Apple 芯片 Mac 和 Windows x64 的 Node 运行时。

+

适用机型:支持 Apple 芯片 Mac、Windows x64、Intel Mac 和 Windows ARM64。

版本
读取中
@@ -51,9 +51,10 @@

Studio 通用包

  1. 解压 ZIP,得到 rdk-robot-learning-platform 目录。
  2. 打开 RDK Studio,在扩展中心选择「添加 → 从目录导入插件」,选中该目录并启用;升级时勾选覆盖安装。
  3. -
  4. 在扩展中心的 MCP 页对「rdk-robot-learning-platform」点击「测试连接」,成功后新建对话说「开始 OriginMan Workshop」。首次访问账号数据时按页面提示登录。
  5. +
  6. 完全退出 Studio,双击包内的 setup-studio-windows.cmd 或 setup-studio-macos.command 登记 MCP 连接。
  7. +
  8. 重新打开 Studio,在扩展中心的 MCP 页对「rdk-robot-learning-platform」点击「测试连接」,成功后新建对话说「开始 OriginMan Workshop」。首次访问账号数据时按页面提示登录。
-

Intel Mac 与 Windows ARM64:解压后先双击 setup-studio-macos.command 或 setup-studio-windows.cmd,安装器会自动准备对应的运行时。

+

Intel Mac 和 Windows ARM64 的运行时由安装器下载并校验。

From 33ad27634a0de881e1ed9c54f6f4b021f4948821 Mon Sep 17 00:00:00 2001 From: lx-1997 <13500790262@163.com> Date: Fri, 4 Dec 2026 15:18:44 +0800 Subject: [PATCH 2/2] chore(release): publish 1.1.2 with the Studio universal package only Studio can list a plugin as enabled while its MCP registry stays empty, so the installer now verifies the connection it records. Ship that fix as the single Studio universal package: the download page offers only this package and `--studio-universal-only` leaves the base and Apple Silicon downloads on 1.1.1. --- CHANGELOG.md | 6 ++ docs/api/openapi.yaml | 2 +- package-lock.json | 4 +- package.json | 2 +- .../.codex-plugin/plugin.json | 2 +- .../.qoder-plugin/plugin.json | 2 +- .../.rdstudio-plugin/plugin.json | 2 +- .../rdk-robot-learning-platform/FILES.sha256 | 12 +-- plugins/rdk-robot-learning-platform/README.md | 2 + .../rdk-robot-learning-platform/plugin.json | 2 +- .../provenance.json | 2 +- scripts/publish-plugin-downloads.mjs | 98 ++++++++++++------- scripts/publish-plugin-downloads.test.mjs | 52 ++++++++++ services/sim2real-web/downloads-page.spec.mjs | 20 ++-- .../sim2real-web/public/downloads-page.mjs | 46 +++------ services/sim2real-web/public/downloads.css | 30 ------ services/sim2real-web/public/downloads.html | 50 +--------- services/sim2real-web/ui-ia.spec.mjs | 43 ++++---- 18 files changed, 184 insertions(+), 193 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c8dc584..ecb1dda2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ 本仓库的显著变更按版本倒序记录。验证结果以对应 PR 和发布回执为准。 +## 1.1.2 — 2026-12-04 + +- Studio 安装器从空 MCP 注册表创建连接,回读并验证实际登记的 Node 与脚本路径。已安装副本使用绝对路径,启动不依赖 Studio 的工作目录。 +- 下载页与安装包明确提示先导入,再退出 Studio 运行安装器。需要沿用 Studio 登录时可显式选择登录继承。 +- 下载页只提供 Studio 通用包,发布流程支持仅发布通用包。基础包与 Apple 芯片专用包自本版起不再更新,已有下载地址继续指向 1.1.1。 + ## 1.1.1 — 2026-12-04 - OriginMan Workshop 直接打开「数据与仿真」,提示与「快检跟跳 · 8,192 步」按钮一致。旧地址保留算力参数与实验记录深链,由服务端重定向。 diff --git a/docs/api/openapi.yaml b/docs/api/openapi.yaml index 5fd835ac..9bda125a 100644 --- a/docs/api/openapi.yaml +++ b/docs/api/openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.1.0 info: title: RDK Robot Learning Platform API - version: 1.1.1 + version: 1.1.2 description: >- Versioned control-plane contract for the standalone MicroDuck/RDK Duck Sim2Real workflow. The legacy /api/sim2real paths are aliases. diff --git a/package-lock.json b/package-lock.json index 6528bc73..ef283590 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@d-robotics/robot-learning-platform", - "version": "1.1.1", + "version": "1.1.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@d-robotics/robot-learning-platform", - "version": "1.1.1", + "version": "1.1.2", "dependencies": { "@deepseek-ai/cordis": "4.0.2", "@deepseek-ai/dsh-agent": "0.1.5-rc.2", diff --git a/package.json b/package.json index d89066d3..90c51be9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@d-robotics/robot-learning-platform", - "version": "1.1.1", + "version": "1.1.2", "private": false, "description": "RDK-X5 × MicroDuck robot learning platform for browser simulation, RL training, model artifacts, Sim2Real evaluation, and deployment.", "homepage": "https://github.com/D-Robotics/robot-learning-platform#readme", diff --git a/plugins/rdk-robot-learning-platform/.codex-plugin/plugin.json b/plugins/rdk-robot-learning-platform/.codex-plugin/plugin.json index e54c755c..6333b19a 100644 --- a/plugins/rdk-robot-learning-platform/.codex-plugin/plugin.json +++ b/plugins/rdk-robot-learning-platform/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "rdk-robot-learning-platform", - "version": "1.1.1", + "version": "1.1.2", "description": "通用机器人学习插件,支持按机型和任务进入仿真与录制、强化学习与模仿学习、Sim2Real 评测与回放、制品管理和受控部署。OriginMan Workshop 提供预置舞蹈、动作组自由编排和舞蹈仿真回放。", "displayName": "RDK Robot Learning Platform", "mcpServers": "./.mcp.json", diff --git a/plugins/rdk-robot-learning-platform/.qoder-plugin/plugin.json b/plugins/rdk-robot-learning-platform/.qoder-plugin/plugin.json index 51ec3c70..288b3209 100644 --- a/plugins/rdk-robot-learning-platform/.qoder-plugin/plugin.json +++ b/plugins/rdk-robot-learning-platform/.qoder-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "rdk-robot-learning-platform", - "version": "1.1.1", + "version": "1.1.2", "description": "通用机器人学习插件,支持按机型和任务进入仿真与录制、强化学习与模仿学习、Sim2Real 评测与回放、制品管理和受控部署。OriginMan Workshop 提供预置舞蹈、动作组自由编排和舞蹈仿真回放。", "displayName": "RDK Robot Learning Platform", "mcpServers": "./.mcp.json", diff --git a/plugins/rdk-robot-learning-platform/.rdstudio-plugin/plugin.json b/plugins/rdk-robot-learning-platform/.rdstudio-plugin/plugin.json index e54c755c..6333b19a 100644 --- a/plugins/rdk-robot-learning-platform/.rdstudio-plugin/plugin.json +++ b/plugins/rdk-robot-learning-platform/.rdstudio-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "rdk-robot-learning-platform", - "version": "1.1.1", + "version": "1.1.2", "description": "通用机器人学习插件,支持按机型和任务进入仿真与录制、强化学习与模仿学习、Sim2Real 评测与回放、制品管理和受控部署。OriginMan Workshop 提供预置舞蹈、动作组自由编排和舞蹈仿真回放。", "displayName": "RDK Robot Learning Platform", "mcpServers": "./.mcp.json", diff --git a/plugins/rdk-robot-learning-platform/FILES.sha256 b/plugins/rdk-robot-learning-platform/FILES.sha256 index 4bf92ce7..f09ee40e 100644 --- a/plugins/rdk-robot-learning-platform/FILES.sha256 +++ b/plugins/rdk-robot-learning-platform/FILES.sha256 @@ -1,9 +1,9 @@ -d511bc9dcdf2d23f77bd83af862d9a9ea8665f2d0825e7eeea13aa7c9ae70d40 .codex-plugin/plugin.json +1cc424c4dc5a06a6210330d71a1225030bb4d6df8a01db856de0ab5cc5a63f61 .codex-plugin/plugin.json d8e397af03b5b032f21d0aa967086f0c78b33c87b76f2e9898ae0a144df7de02 .mcp.json -da2c2d8660b24491d2a105baa7334a7c57608a620c40d3f5c3efa3cfccaa1b8e .qoder-plugin/plugin.json -d511bc9dcdf2d23f77bd83af862d9a9ea8665f2d0825e7eeea13aa7c9ae70d40 .rdstudio-plugin/plugin.json +3aba8d70cb2391a040cfccab1aa7a7e9281f4394b32e071ca523180587380f13 .qoder-plugin/plugin.json +1cc424c4dc5a06a6210330d71a1225030bb4d6df8a01db856de0ab5cc5a63f61 .rdstudio-plugin/plugin.json c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 LICENSE -ea323272fdbe4cfeb3318f13e2a0ee7b983ecd4435776fc4218ee4d6e41faba4 README.md +7e287215ca220ed27ebe3e5d740d3ab54367f5ec26bb4c388e29e682b61d214a README.md bd7b84d85126d8186e7d690159ee038dfb6b8bb609d988ea9e189b821add5cb8 THIRD_PARTY_NOTICES.md 8ffe83addbd05a4626bfe247e1870542651d763c5b580b6e17909a83843029d1 configure.mjs 741f623f21840d24212f9e7d39088d37fe3983377eb107f94d031ec71111575e experience-extension.json @@ -16,8 +16,8 @@ bd7b84d85126d8186e7d690159ee038dfb6b8bb609d988ea9e189b821add5cb8 THIRD_PARTY_NO 512c385b487a2e2baef3cb9b0a690b9b4ee7c2521984dd876309beff16da606c mcp/bundle.mjs ccd805b7927d7bd8a1e67dd4f8c42fe826ccb7e39e12c8c14046ff105b2a62c1 mcp/retained-core.mjs 90083a11362304cab596b10d3432bb587f7939db1e0961e5c44d4ec5e4f66d31 mcp/source-checkout.example.json -62e1a989af8962f906a3c1ad3cb0959ccf2fddeb412a0dce05114e5f5b1b1ba5 plugin.json -38b0de1063b2a75e34c44b9fd1a25df28f504018c003308361e280d9a34fd03b provenance.json +6695e5e46209ff264bc5ec484ee0293ea97ed81ce69011f3ee0497f5a69c67e3 plugin.json +fb47c3f1dbd20faf9cfcd53eaf664152dd5c6d347ce59d6651c2f6f6bf139a62 provenance.json 69180fff7f969d9997e8f9d57f102b89e8dd64bf79a58971684fd9f42ff8973b references/api-workflows.md 556766514a5d70c22cea788fade80d77b31d0d78398a5e352795a908159ec069 references/classroom-guardrails.md a770c873487ab28d632b0db684c8a26b77ae4d3633ffa3f362d3f78d0d0f00ec references/cli-capabilities.md diff --git a/plugins/rdk-robot-learning-platform/README.md b/plugins/rdk-robot-learning-platform/README.md index 503e07a4..ddbe0bd7 100644 --- a/plugins/rdk-robot-learning-platform/README.md +++ b/plugins/rdk-robot-learning-platform/README.md @@ -4,6 +4,8 @@ 自建算力请看 [Worker 接入协议](references/runner-contract.md),包括 `GET /healthz` 和 `POST /train`。 +1.1.2 修复 Studio 插件导入后 MCP 未登记的恢复路径。导入后请退出 Studio 并运行通用包安装器,重新打开 Studio 后测试连接。 + 1.1.1 让 OriginMan Workshop 直接打开「数据与仿真」,并同步快检按钮提示和插件的板端运行登记工具目录。 1.1.0 五个工具改为短名,使其在 RDK Studio 中可被调用:`rdk_x5_bundle_export`(原 `rdk_originman_cpu_bundle_export`)、`rdk_x5_cpu_rehearse`(原 `rdk_originman_dance_cpu_rehearse`)、`rdk_x5_closed_loop`(原 `rdk_originman_board_closed_loop`)、`rdk_dance_replay_read`(原 `rdk_originman_dance_replay_read`)、`rdk_record_board_run`(原 `rdk_deployment_record_board_run`)。Studio 1.7.0 会把超过 64 字符的调用名折叠成带哈希的别名,而其派发表无法解析该别名,这五个工具此前在清单中可见、调用却返回 Unknown tool。旧名不再提供;平台接口与插件内置核心仍使用 `rdk_deployment_record_board_run`。另新增门禁:所有可暴露工具的 Studio 调用名不得超过 64 字符。 diff --git a/plugins/rdk-robot-learning-platform/plugin.json b/plugins/rdk-robot-learning-platform/plugin.json index 7510b834..233ce21e 100644 --- a/plugins/rdk-robot-learning-platform/plugin.json +++ b/plugins/rdk-robot-learning-platform/plugin.json @@ -1,5 +1,5 @@ { "name": "rdk-robot-learning-platform", - "version": "1.1.1", + "version": "1.1.2", "description": "通用机器人学习插件,支持按机型和任务进入仿真与录制、强化学习与模仿学习、Sim2Real 评测与回放、制品管理和受控部署。OriginMan Workshop 提供预置舞蹈、动作组自由编排和舞蹈仿真回放。" } diff --git a/plugins/rdk-robot-learning-platform/provenance.json b/plugins/rdk-robot-learning-platform/provenance.json index d421a109..a32f7368 100644 --- a/plugins/rdk-robot-learning-platform/provenance.json +++ b/plugins/rdk-robot-learning-platform/provenance.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, "name": "rdk-robot-learning-platform", - "version": "1.1.1", + "version": "1.1.2", "description": "通用机器人学习插件,支持按机型和任务进入仿真与录制、强化学习与模仿学习、Sim2Real 评测与回放、制品管理和受控部署。OriginMan Workshop 提供预置舞蹈、动作组自由编排和舞蹈仿真回放。", "composition": "retained-core-with-host-neutral-workflow-extension", "coreBundleSha256": "ccd805b7927d7bd8a1e67dd4f8c42fe826ccb7e39e12c8c14046ff105b2a62c1", diff --git a/scripts/publish-plugin-downloads.mjs b/scripts/publish-plugin-downloads.mjs index 9a35e898..a175ccc4 100644 --- a/scripts/publish-plugin-downloads.mjs +++ b/scripts/publish-plugin-downloads.mjs @@ -34,7 +34,7 @@ export function sha256File(filePath) { return hash.digest('hex'); } -export function collectPublishArtifacts({ distDir, pluginName, version }) { +export function collectPublishArtifacts({ distDir, pluginName, version, universalOnly = false }) { if (!/^[a-z][a-z0-9-]+$/.test(pluginName)) { throw new Error(`Invalid plugin name: ${pluginName}`); } @@ -57,25 +57,27 @@ export function collectPublishArtifacts({ distDir, pluginName, version }) { filename: `${pluginName}-${version}-studio-universal.zip`, latestSymlink: `${pluginName}-studio-universal-latest.zip`, }, - ].map((entry) => { - const filePath = path.join(distDir, entry.filename); - if (!fs.existsSync(filePath)) { - throw new Error(`Missing packaged plugin archive: ${filePath}`); - } - const stat = fs.statSync(filePath); - if (!stat.isFile() || stat.size < 1024) { - throw new Error(`Invalid plugin archive size (${stat.size} B): ${filePath}`); - } - return { - ...entry, - filePath, - sizeBytes: stat.size, - sha256: sha256File(filePath), - }; - }); + ] + .filter((entry) => !universalOnly || entry.role === 'studio-universal') + .map((entry) => { + const filePath = path.join(distDir, entry.filename); + if (!fs.existsSync(filePath)) { + throw new Error(`Missing packaged plugin archive: ${filePath}`); + } + const stat = fs.statSync(filePath); + if (!stat.isFile() || stat.size < 1024) { + throw new Error(`Invalid plugin archive size (${stat.size} B): ${filePath}`); + } + return { + ...entry, + filePath, + sizeBytes: stat.size, + sha256: sha256File(filePath), + }; + }); const sumsFilename = `${pluginName}-${version}-SHA256SUMS.txt`; const sumsContent = files.map((f) => `${f.sha256} ${f.filename}`).join('\n') + '\n'; - return { pluginName, version, files, sumsFilename, sumsContent }; + return { pluginName, version, files, sumsFilename, sumsContent, universalOnly }; } export function patchMarketplaceJson( @@ -153,8 +155,15 @@ export function buildNginxLatestRedirectsConf(artifacts) { `# Auto-generated by scripts/publish-plugin-downloads.mjs for ${artifacts.pluginName} ${artifacts.version}`, '# Include inside your Nginx server{} block so -latest.zip always 302-redirects with no-store.', ]; + const redirects = [...artifacts.files]; + if (artifacts.universalOnly) { + redirects.push({ + filename: artifacts.files[0].filename, + latestSymlink: `${artifacts.pluginName}-studio-darwin-arm64-latest.zip`, + }); + } for (const prefix of ['/robotics-learning/plugins', '/ducklab-mcp/plugins']) { - for (const file of artifacts.files) { + for (const file of redirects) { lines.push( `location = ${prefix}/${file.latestSymlink} {`, ` add_header Cache-Control "no-store, max-age=0" always;`, @@ -220,6 +229,22 @@ export function buildRemoteInstallScript({ `cat <<'NGINX_EOF' > ${shellQuote(nginxConfTmp)}`, nginxConf.trimEnd(), 'NGINX_EOF', + ...(artifacts.universalOnly + ? [ + `python3 - ${shellQuote(artifacts.pluginName)} ${shellQuote(nginxConfTmp)} <<'PY'`, + 'import os, re, sys', + 'name, destination = sys.argv[1:]', + 'latest = name + "-latest.zip"', + 'if os.path.islink(latest):', + ' frozen = os.readlink(latest)', + String.raw` if not re.fullmatch(re.escape(name) + r"-\d+\.\d+\.\d+\.zip", frozen) or not os.path.isfile(frozen):`, + ' raise SystemExit("Unexpected existing base download target")', + ' with open(destination, "a", encoding="utf-8") as fh:', + ' for prefix in ("/robotics-learning/plugins", "/ducklab-mcp/plugins"):', + String.raw` fh.write(f'location = {prefix}/{latest} {{\n add_header Cache-Control "no-store, max-age=0" always;\n return 302 {prefix}/{frozen};\n}}\n')`, + 'PY', + ] + : []), // nginx reads an included file once, so the swapped redirects stay stale until a reload. `cp -f ${shellQuote(nginxConfPath)} ${shellQuote(nginxConfPrev)} 2>/dev/null || true`, `mv -f ${shellQuote(nginxConfTmp)} ${shellQuote(nginxConfPath)}`, @@ -318,7 +343,7 @@ export function buildRemoteInstallScript({ 'os.remove(rel["upload"])', 'print("UPDATED_DOWNLOADS", rel["pluginName"], rel["release"]["version"], "releases=" + str(len(document["releases"])))', 'PY', - `ls -la ${shellQuote(path.posix.join(remoteDir, `${artifacts.pluginName}-latest.zip`))} ${shellQuote(path.posix.join(remoteDir, `${artifacts.pluginName}-studio-darwin-arm64-latest.zip`))} ${shellQuote(path.posix.join(remoteDir, `${artifacts.pluginName}-studio-universal-latest.zip`))}`, + `ls -la ${artifacts.files.map((file) => shellQuote(path.posix.join(remoteDir, file.latestSymlink))).join(' ')}`, ].join('\n'); } @@ -362,21 +387,21 @@ async function verifyPublicEndpoints({ publicBase, artifacts, allowHealthzLag }) const darwinZip = artifacts.files.find((f) => f.role === 'studio-darwin-arm64'); const universalZip = artifacts.files.find((f) => f.role === 'studio-universal'); - // 1. Verify ALL THREE -latest.zip endpoints (full SHA-256 + 302 target when redirected) - const baseCheck = await verifyLatestDownload( - `${base}/robotics-learning/plugins/${baseZip.latestSymlink}`, - baseZip, - ); + // 1. Verify the published archives and the Studio macOS compatibility redirect. + const baseCheck = baseZip + ? await verifyLatestDownload( + `${base}/robotics-learning/plugins/${baseZip.latestSymlink}`, + baseZip, + ) + : null; const uniCheck = await verifyLatestDownload( `${base}/ducklab-mcp/plugins/${universalZip.latestSymlink}`, universalZip, ); - const darwinCheck = darwinZip - ? await verifyLatestDownload( - `${base}/ducklab-mcp/plugins/${darwinZip.latestSymlink}`, - darwinZip, - ) - : null; + const darwinCheck = await verifyLatestDownload( + `${base}/ducklab-mcp/plugins/${artifacts.pluginName}-studio-darwin-arm64-latest.zip`, + darwinZip ?? universalZip, + ); // 2. Verify /ducklab-mcp/marketplace.json matches version + universal SHA-256 const mpUrl = `${base}/ducklab-mcp/marketplace.json`; @@ -431,7 +456,7 @@ async function verifyPublicEndpoints({ publicBase, artifacts, allowHealthzLag }) { ok: true, version: artifacts.version, - baseLatest: baseCheck, + ...(baseCheck ? { baseLatest: baseCheck } : {}), universalLatest: uniCheck, ...(darwinCheck ? { darwinArm64Latest: darwinCheck } : {}), marketplaceVersion: entry.version, @@ -457,15 +482,17 @@ function parseCli(argv) { dryRun: false, skipPublicCheck: false, allowHealthzLag: false, + universalOnly: false, }; for (let i = 0; i < argv.length; i++) { const arg = argv[i]; if (arg === '--help') { console.log( - 'Usage: node scripts/publish-plugin-downloads.mjs [--dist-dir DIR] [--host USER@HOST] [--remote-dir DIR] [--marketplace-path PATH] [--public-base URL] [--version X.Y.Z] [--description TEXT] [--dry-run] [--skip-public-check] [--allow-healthz-lag]', + 'Usage: node scripts/publish-plugin-downloads.mjs [--dist-dir DIR] [--host USER@HOST] [--remote-dir DIR] [--marketplace-path PATH] [--public-base URL] [--version X.Y.Z] [--description TEXT] [--studio-universal-only] [--dry-run] [--skip-public-check] [--allow-healthz-lag]', ); process.exit(0); - } else if (arg === '--dry-run') opts.dryRun = true; + } else if (arg === '--studio-universal-only') opts.universalOnly = true; + else if (arg === '--dry-run') opts.dryRun = true; else if (arg === '--skip-public-check') opts.skipPublicCheck = true; else if (arg === '--allow-healthz-lag') opts.allowHealthzLag = true; else if ( @@ -506,6 +533,7 @@ if (isMain) { distDir: opts.distDir, pluginName: manifest.name, version: opts.version ?? manifest.version, + universalOnly: opts.universalOnly, }); const sumsLocalPath = path.join(opts.distDir, artifacts.sumsFilename); fs.writeFileSync(sumsLocalPath, artifacts.sumsContent, 'utf8'); @@ -550,7 +578,7 @@ if (isMain) { process.exit(0); } console.log( - `== [1/3] 上传 ${artifacts.pluginName} ${artifacts.version} 全部发行包至 ${opts.host}:${opts.remoteDir} ==`, + `== [1/3] 上传 ${artifacts.pluginName} ${artifacts.version} 发行包至 ${opts.host}:${opts.remoteDir} ==`, ); for (const item of [ ...artifacts.files.map((f) => ({ local: f.filePath, name: f.filename })), diff --git a/scripts/publish-plugin-downloads.test.mjs b/scripts/publish-plugin-downloads.test.mjs index 18723d99..3a03736a 100644 --- a/scripts/publish-plugin-downloads.test.mjs +++ b/scripts/publish-plugin-downloads.test.mjs @@ -125,6 +125,58 @@ test('collectPublishArtifacts hashes all three archives and builds deterministic } }); +test('a Studio universal-only release preserves old base downloads and aliases macOS', (t) => { + const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'publish-plugin-universal-')); + t.after(() => fs.rmSync(dir, { recursive: true, force: true })); + const version = '1.1.2'; + const base = archiveNames('1.1.1')[0]; + const universal = archiveNames(version)[2]; + fs.writeFileSync(path.join(dir, base), Buffer.alloc(2048)); + fs.writeFileSync(path.join(dir, universal), Buffer.alloc(2048)); + fs.symlinkSync(base, path.join(dir, `${PLUGIN}-latest.zip`)); + const artifacts = collectPublishArtifacts({ + distDir: dir, + pluginName: PLUGIN, + version, + universalOnly: true, + }); + const downloadsRelease = buildDownloadsRelease(artifacts, { publicBase: PUBLIC_BASE }); + assert.deepEqual( + downloadsRelease.files.map((file) => file.filename), + [universal], + ); + assert.equal(artifacts.sumsContent.trim().split(' ')[1], universal); + + const script = buildRemoteInstallScript({ + remoteDir: dir, + marketplacePath: path.join(dir, 'marketplace.json'), + stagingTag: 'test', + artifacts, + downloadsRelease, + publicBase: PUBLIC_BASE, + }); + const redirects = buildNginxLatestRedirectsConf(artifacts); + assert.match( + redirects, + /studio-darwin-arm64-latest\.zip \{[\s\S]*?1\.1\.2-studio-universal\.zip;/, + ); + const config = path.join(dir, 'redirects.conf'); + fs.writeFileSync(config, redirects); + const preserve = /python3 - [^\n]+ <<'PY'\n([\s\S]*?)\nPY/.exec(script)?.[1]; + assert.ok(preserve); + const result = spawnSync('python3', ['-c', preserve, PLUGIN, config], { + cwd: dir, + encoding: 'utf8', + }); + assert.equal(result.status, 0, result.stderr); + assert.match( + fs.readFileSync(config, 'utf8'), + /return 302 \/robotics-learning\/plugins\/rdk-robot-learning-platform-1\.1\.1\.zip;/, + ); + assert.equal(fs.readlinkSync(path.join(dir, `${PLUGIN}-latest.zip`)), base); + assert.doesNotMatch(script, /mv -f '[^']*rdk-robot-learning-platform-1\.1\.2\.zip'/); +}); + test('patchMarketplaceJson updates only target plugin and preserves sibling entries', () => { const existing = JSON.stringify({ name: 'rdk-plugins', diff --git a/services/sim2real-web/downloads-page.spec.mjs b/services/sim2real-web/downloads-page.spec.mjs index 3cb98ac4..51b8c292 100644 --- a/services/sim2real-web/downloads-page.spec.mjs +++ b/services/sim2real-web/downloads-page.spec.mjs @@ -50,7 +50,7 @@ function page() { return dom.window.document; } -test('the manifest fills every package card and the release history', async () => { +test('the download page shows only the universal package, including in release history', async () => { const document = page(); const model = await startDownloadsPage({ document, @@ -68,11 +68,7 @@ test('the manifest fills every package card and the release history', async () = `${BASE}rdk-robot-learning-platform-1.0.0-studio-universal.zip`, ); assert.equal(card('universal').querySelector('[data-copy]').hidden, false); - assert.equal( - card('darwin').querySelector('[data-field="url"]').href, - `${BASE}rdk-robot-learning-platform-1.0.0-studio-darwin-arm64.zip`, - ); - assert.equal(card('base').querySelector('[data-field="size"]').textContent, '1.1 MB'); + assert.equal(document.querySelectorAll('[data-package]').length, 1); assert.equal(document.getElementById('downloads-status').textContent, ''); const history = document.getElementById('downloads-history'); @@ -83,11 +79,7 @@ test('the manifest fills every package card and the release history', async () = assert.equal(items[0].querySelector('time').dateTime, '2026-12-04'); assert.deepEqual( [...items[0].querySelectorAll('a')].map((link) => link.getAttribute('href')), - [ - `${BASE}rdk-robot-learning-platform-0.7.47-studio-universal.zip`, - `${BASE}rdk-robot-learning-platform-0.7.47-studio-darwin-arm64.zip`, - `${BASE}rdk-robot-learning-platform-0.7.47.zip`, - ], + [`${BASE}rdk-robot-learning-platform-0.7.47-studio-universal.zip`], ); }); @@ -159,7 +151,7 @@ test('the machine hint follows the client platform and architecture', () => { environmentHint({ os: 'windows', architecture: 'x86', bitness: '64' }), /Windows x64/, ); - assert.match(environmentHint({ os: 'macos' }), /Intel 芯片需先运行包内安装器/); + assert.match(environmentHint({ os: 'macos' }), /导入通用包后运行安装器登记 MCP.*Intel 芯片/); assert.equal(environmentHint({ os: 'linux', architecture: 'x86', bitness: '64' }), ''); assert.equal(environmentHint(), ''); }); @@ -196,12 +188,12 @@ test('copy writes the package SHA-256 to the clipboard', async () => { fetch: respond(manifest), navigator: { ...plainNavigator, clipboard: { writeText: async (text) => writes.push(text) } }, }); - const button = document.querySelector('[data-package="base"] [data-copy]'); + const button = document.querySelector('[data-package="universal"] [data-copy]'); button.click(); await new Promise((resolve) => setTimeout(resolve, 0)); - assert.deepEqual(writes, [sha('c')]); + assert.deepEqual(writes, [sha('a')]); assert.equal(button.textContent, '已复制'); }); diff --git a/services/sim2real-web/public/downloads-page.mjs b/services/sim2real-web/public/downloads-page.mjs index 43063c5e..808ef71d 100644 --- a/services/sim2real-web/public/downloads-page.mjs +++ b/services/sim2real-web/public/downloads-page.mjs @@ -2,16 +2,6 @@ const PUBLIC_ORIGIN = 'https://rdkstudio.d-robotics.cc'; const DOWNLOADS_PATH = '/ducklab-mcp/plugins/'; const MANIFEST_PATH = `${DOWNLOADS_PATH}rdk-robot-learning-platform-downloads.json`; const RELEASE_HISTORY_LIMIT = 5; -const PACKAGE_ROLES = { - universal: 'studio-universal', - darwin: 'studio-darwin-arm64', - base: 'base', -}; -const HISTORY_LINKS = [ - ['universal', '通用包'], - ['darwin', 'Apple 芯片包'], - ['base', '基础包'], -]; /** Decimal units: the number macOS Finder and Safari show for the same file. */ export function formatBytes(bytes) { @@ -45,12 +35,11 @@ function normalizeFile(raw) { function normalizeRelease(raw) { if (!raw || typeof raw.version !== 'string' || !/^\d+\.\d+\.\d+$/.test(raw.version)) return null; - const files = {}; + const files = { universal: null }; for (const entry of Array.isArray(raw.files) ? raw.files : []) { - const file = normalizeFile(entry); - if (!file) continue; - const key = Object.keys(PACKAGE_ROLES).find((name) => PACKAGE_ROLES[name] === entry.role); - if (key && !files[key]) files[key] = file; + if (entry?.role !== 'studio-universal') continue; + files.universal = normalizeFile(entry); + if (files.universal) break; } if (!files.universal) return null; return { @@ -90,14 +79,14 @@ export function environmentHint({ os, architecture, bitness } = {}) { const arm = architecture === 'arm' && bitness === '64'; const x64 = architecture === 'x86' && bitness === '64'; if (os === 'macos') { - if (arm) return '当前浏览器运行在 Apple 芯片 Mac 上,可以直接导入通用包。'; - if (x64) return '当前浏览器运行在 Intel Mac 上:解压后先运行包内的 setup-studio-macos.command。'; - return '当前浏览器运行在 Mac 上:Apple 芯片可直接导入通用包,Intel 芯片需先运行包内安装器。'; + if (arm) return '当前浏览器运行在 Apple 芯片 Mac 上。通用包已内置运行时,导入后运行安装器登记 MCP。'; + if (x64) return '当前浏览器运行在 Intel Mac 上。导入后运行 setup-studio-macos.command,它会准备运行时并登记 MCP。'; + return '当前浏览器运行在 Mac 上。导入通用包后运行安装器登记 MCP,Intel 芯片需要下载运行时。'; } if (os === 'windows') { - if (x64) return '当前浏览器运行在 Windows x64 上,可以直接导入通用包。'; - if (arm) return '当前浏览器运行在 Windows ARM64 上:解压后先运行包内的 setup-studio-windows.cmd。'; - return '当前浏览器运行在 Windows 上:Windows x64 可直接导入通用包,Windows ARM64 需先运行包内安装器。'; + if (x64) return '当前浏览器运行在 Windows x64 上。通用包已内置运行时,导入后运行安装器登记 MCP。'; + if (arm) return '当前浏览器运行在 Windows ARM64 上。导入后运行 setup-studio-windows.cmd,它会准备运行时并登记 MCP。'; + return '当前浏览器运行在 Windows 上。导入通用包后运行安装器登记 MCP,ARM64 需要下载运行时。'; } return ''; } @@ -170,15 +159,12 @@ function renderHistory(doc, history) { time.textContent = date; item.append(time); } - for (const [key, label] of HISTORY_LINKS) { - const file = release.files[key]; - if (!file) continue; - const link = doc.createElement('a'); - link.href = file.url; - link.textContent = `${label} · ${formatBytes(file.sizeBytes)}`; - link.setAttribute('download', ''); - item.append(link); - } + const file = release.files.universal; + const link = doc.createElement('a'); + link.href = file.url; + link.textContent = `通用包 · ${formatBytes(file.sizeBytes)}`; + link.setAttribute('download', ''); + item.append(link); list.append(item); } details.hidden = history.length === 0; diff --git a/services/sim2real-web/public/downloads.css b/services/sim2real-web/public/downloads.css index e3b9360c..0531687f 100644 --- a/services/sim2real-web/public/downloads.css +++ b/services/sim2real-web/public/downloads.css @@ -31,14 +31,6 @@ gap: 12px; margin-bottom: 12px; } -.downloads-badge { - padding: 2px 8px; - border-radius: 6px; - background: var(--accent-soft); - color: var(--accent-text); - font-size: var(--fs-meta); - font-weight: 650; -} .downloads-card code, .downloads-requirements code { overflow-wrap: anywhere; @@ -95,16 +87,6 @@ .downloads-button:hover { background: var(--accent); } -.downloads-button-secondary { - border-color: var(--line-strong); - background: var(--panel); - color: var(--text); -} -.downloads-button-secondary:hover { - border-color: var(--accent); - background: var(--panel); - color: var(--accent-text); -} .downloads-copy { min-height: 40px; } @@ -145,15 +127,6 @@ .downloads-details[open] > summary { margin-bottom: 16px; } -.downloads-alt-grid { - display: grid; - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 16px; -} -.downloads-alt-grid .downloads-card { - padding: 20px; - box-shadow: none; -} .downloads-history-list { display: flex; flex-direction: column; @@ -200,7 +173,4 @@ .downloads-card { padding: 20px; } - .downloads-alt-grid { - grid-template-columns: 1fr; - } } diff --git a/services/sim2real-web/public/downloads.html b/services/sim2real-web/public/downloads.html index 5035b8c9..6e62e369 100644 --- a/services/sim2real-web/public/downloads.html +++ b/services/sim2real-web/public/downloads.html @@ -7,8 +7,8 @@ - - + + @@ -34,7 +34,6 @@

下载 RDK Robot Learning 插件

Studio 通用包

- 推荐

内置 Apple 芯片 Mac 和 Windows x64 的 Node 运行时。

适用机型:支持 Apple 芯片 Mac、Windows x64、Intel Mac 和 Windows ARM64。

@@ -57,49 +56,6 @@

Studio 通用包

Intel Mac 和 Windows ARM64 的运行时由安装器下载并校验。

-
- 其他安装方式 -
-
-
-

Apple 芯片专用包

-
-

只内置 Apple 芯片 Mac 的运行时,体积比通用包小。功能与通用包完全相同,确定只在这类机型上使用时可以选它。

-
-
版本
读取中
-
大小
-
-
- 下载 Apple 芯片专用包 - -
-

SHA-256

-

安装步骤与通用包相同:解压后从扩展中心导入目录,再测试 MCP 连接。

-
- -
-
-

基础包

-
-

给 Qoder 或手工配置 MCP 的宿主使用。包内不含运行时,必须先运行安装器,由它准备合规的 Node 并生成本机的 MCP 配置。

-
-
版本
读取中
-
大小
-
-
- 下载基础包 - -
-

SHA-256

-
    -
  1. 解压 ZIP,保留 .qoder-plugin、.mcp.json 等隐藏文件。
  2. -
  3. 双击 setup-qoder-macos.command 或 setup-qoder-windows.cmd。
  4. -
  5. 在 Qoder 的「扩展 → 已安装 → 添加 → 上传 Plugin」中选择安装器生成的 Qoder本机导入包.zip,不要直接上传未配置的原始包。
  6. -
-
-
-
-