fix: validate the Node 24.9 runtime floor

This commit is contained in:
Tianyi Cui committed 2026-10-15 23:33:49 +08:00
1 parent c6a59a1ae9
commit cfb65d3bb2
60 files changed
+256 -127

No files matched your search

+6 -6
View File
@@ -9,8 +9,8 @@
en: 5207d17725c07a27
zh: 258884c4300ac63a
/development-guide/setup-tutorial/prerequisites:
en: 8b66d0af052e353e
zh: 3864c56cf31ea53d
en: 89e7008a741a290a
zh: 78012740025203b0
/development-guide/setup-tutorial/windows-and-wsl-2:
en: e86be579be6f1813
zh: 14f6a220337d0861
@@ -27,11 +27,11 @@
en: dba2c72ee6ffa930
zh: b65c27fbb9129ec8
/development-guide/contributor-reference/git-integrations:
en: 2b5d506c14cf4b14
zh: a1ee5d27996fefa4
en: 2efb7c4e482413fc
zh: 75386476a283111a
/development-guide/contributor-reference/ci-gates:
en: b64a914e41b1d285
zh: 6c031b507c3c0e84
en: 16e515e3d94f1cfc
zh: fe8cf9deec64581a
/development-guide/contributor-reference/daily-commands:
en: 08aa6ec1cdabfeb7
zh: dcce5ae9d3c829d0
+3 -3
View File
@@ -8,7 +8,7 @@ The setup tutorial takes a new contributor from prerequisites to a checked check
### Prerequisites
- Node.js requires 24.0 or newer. CI covers 24.0, the latest 24, and 26; see the [Node engine floor Agent Note](../.agents/notes/implemented/process/2026-07-06-node-engine-floor.md).
- Node.js 24.9 or newer. CI covers 24.9, the latest 24, and 26; see the [Node engine floor Agent Note](../.agents/notes/implemented/process/2026-10-15-node-24-runtime-floor.md).
- Node.js TypeScript type stripping enabled. The repository build scripts load `tsdown.config.ts` with tsdown's native config loader, so they fail when `--no-experimental-strip-types` is in `NODE_OPTIONS` or the Node.js build lacks TypeScript support; `pnpm run build` checks this first and names the cause.
- Corepack-enabled pnpm. The repo pins `[email protected]` in `package.json`; run `corepack enable` if `pnpm --version` does not resolve through Corepack.
- Git 2.26 or newer; hook setup enables Git's worktree-specific configuration extension.
@@ -144,7 +144,7 @@ The vendor manifest guard checks that changes under `vendor/*/src` are staged wi
The pi-ai check regenerates expected metadata in memory. It rejects stale data without rewriting or staging files. After a pi-ai dependency or generator change, follow the package's [provider metadata update steps](../packages/llm/llm-pi-ai/README.md#generated-provider-metadata).
Apart from the scoped pairing and provider metadata checks, the hooks intentionally do not run tests, snapshots, documentation checks, builds, or hygiene. Contributors run the [checks relevant to the changed behavior](../AGENTS.md#run-relevant-checks-locally) once; CI owns exhaustive coverage, built-artifact smokes, and the Node 24.0, latest 24, and 26 compatibility matrix.
Apart from the scoped pairing and provider metadata checks, the hooks intentionally do not run tests, snapshots, documentation checks, builds, or hygiene. Contributors run the [checks relevant to the changed behavior](../AGENTS.md#run-relevant-checks-locally) once; CI owns exhaustive coverage, built-artifact smokes, and the Node 24.9, latest 24, and 26 compatibility matrix.
Contributors can opt into the comprehensive local gate set with `pnpm run check:all`. The command is independent of the Git hooks and is not an agent instruction.
@@ -154,7 +154,7 @@ Outside CI (`CI` other than `true`), default worker counts follow the [local wor
The keyless [CI workflow](../.github/workflows/ci.yml) groups independent gates into broad lanes and runs a smaller compatibility signal across supported Node versions. Artifact consumers wait for one build within their lane. Coverage partitions reuse file timings scoped to their platform and runner pool to balance work within the configured worker limit. Required benchmarks run separately on standard GitHub-hosted Linux; the [benchmark runner reference](../benchmarks/AGENTS.md) owns routing and the job timeout. The separate real-API workflow runs `pnpm run test:e2e` with its configured worker bound. See [scripts/run-gates.ts](../scripts/run-gates.ts) and the workflow files for the current gate and job inventory.
The credential-free dsh dependency-layout and dsh/vendor pack rehearsals use the existing Linux self-hosted pool only when `DSH_CI_FAILOVER_LINUX=selfhosted` and the event is a trusted master push or same-repository, non-fork, non-Dependabot pull request. All other cases, including manual dispatch, use `ubuntu-24.04`; manual publication stays hosted. See the [release rehearsal runner reference](../.agents/notes/implemented/process/2026-07-26-ci-failover-runbook.md) for persistent-store isolation and fallback limits.
The credential-free dsh dependency-layout and dsh/vendor pack rehearsals use the existing Linux self-hosted pool only when `DSH_CI_FAILOVER_LINUX=selfhosted` and the event is a trusted master push or same-repository, non-fork, non-Dependabot pull request. All other cases, including manual dispatch, use `ubuntu-24.94`; manual publication stays hosted. See the [release rehearsal runner reference](../.agents/notes/implemented/process/2026-07-26-ci-failover-runbook.md) for persistent-store isolation and fallback limits.
### Daily commands
+3 -3
View File
@@ -10,7 +10,7 @@
### 前置条件
- Node.js 要求 24.0 或更高版本。CI 覆盖 24.0、最新的 24 和 26;见 [Node 引擎下限 Agent Note](../.agents/notes/implemented/process/2026-07-06-node-engine-floor.zh.md)。
- Node.js 要求 24.9 或更高版本。CI 覆盖 24.9、最新的 24 和 26;见 [Node 引擎下限 Agent Note](../.agents/notes/implemented/process/2026-10-15-node-24-runtime-floor.zh.md)。
- 启用 Node.js TypeScript 类型剥离。仓库构建脚本用 tsdown 的 native 配置加载器加载 `tsdown.config.ts`,因此当 `NODE_OPTIONS` 含 `--no-experimental-strip-types` 或 Node.js 构建缺少 TypeScript 支持时会失败;`pnpm run build` 会先检查这一条件并指出原因。
- 启用了 Corepack 的 pnpm。仓库在 `package.json` 中固定使用 `[email protected]`;如果 `pnpm --version` 无法通过 Corepack 解析,请先运行 `corepack enable`。
- Git 2.26 或更高版本;钩子设置会启用 Git 的 worktree 专属配置扩展。
@@ -149,7 +149,7 @@ vendor manifest 守卫检查 `vendor/*/src` 下的改动是否连同对应的 `v
pi-ai 检查会在内存中重新生成预期元数据。数据过期时,检查拒绝提交,不改写或暂存文件。修改 pi-ai 依赖或生成器后,请按包内的[提供方元数据更新步骤](../packages/llm/llm-pi-ai/README.zh.md#generated-provider-metadata)操作。
除限定范围的配对和提供方元数据检查外,这些钩子有意不运行测试、快照、文档检查、构建或 `hygiene`。贡献者只运行一次[与改动行为相关的检查](../AGENTS.md#run-relevant-checks-locally);CI 负责全量覆盖率门禁、构建产物冒烟测试,以及 Node 24.0、最新的 24 和 26 兼容性矩阵。
除限定范围的配对和提供方元数据检查外,这些钩子有意不运行测试、快照、文档检查、构建或 `hygiene`。贡献者只运行一次[与改动行为相关的检查](../AGENTS.md#run-relevant-checks-locally);CI 负责全量覆盖率门禁、构建产物冒烟测试,以及 Node 24.9、最新的 24 和 26 兼容性矩阵。
贡献者可以选择运行 `pnpm run check:all`,执行全面的本地门禁集。该命令独立于 Git 钩子,也不是对 agent 的指令。
@@ -159,7 +159,7 @@ pi-ai 检查会在内存中重新生成预期元数据。数据过期时,检
keyless [CI 工作流](../.github/workflows/ci.yml) 将独立门禁分组到若干宽粒度 lane,并在受支持的 Node 版本上运行一组较小的兼容性检查。产物消费方在各自 lane 内等待一次 build。覆盖率分区复用按平台和运行器池隔离的文件耗时,在配置的 worker 上限内均衡工作量。必需 benchmark 在标准 GitHub 托管 Linux 上独立运行;[benchmark 运行器说明](../benchmarks/AGENTS.md)拥有路由及 job 超时。单独的真实 API 工作流按其配置的 worker 上限运行 `pnpm run test:e2e`。当前门禁和 job 清单以 [scripts/run-gates.ts](../scripts/run-gates.ts) 和工作流文件为准。
不带凭据的 dsh 依赖布局检查与 dsh/vendor 打包演练仅在 `DSH_CI_FAILOVER_LINUX=selfhosted`,且事件为受信任的 master 推送或同仓库、非 fork、非 Dependabot 拉取请求时使用现有 Linux 自托管池。其余情况(包括手动触发)均使用 `ubuntu-24.04`;手动发布仍使用托管运行器。持久化存储隔离与回退限制见[发布演练运行器说明](../.agents/notes/implemented/process/2026-07-26-ci-failover-runbook.zh.md)。
不带凭据的 dsh 依赖布局检查与 dsh/vendor 打包演练仅在 `DSH_CI_FAILOVER_LINUX=selfhosted`,且事件为受信任的 master 推送或同仓库、非 fork、非 Dependabot 拉取请求时使用现有 Linux 自托管池。其余情况(包括手动触发)均使用 `ubuntu-24.94`;手动发布仍使用托管运行器。持久化存储隔离与回退限制见[发布演练运行器说明](../.agents/notes/implemented/process/2026-07-26-ci-failover-runbook.zh.md)。
### 日常命令
@@ -3,14 +3,14 @@
# After editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/upgrade-guide/v0.2.1-alpha.4/node-24/guide.md
/:
en: 3e522f1f0e3a5539
zh: ea94801bb527f209
en: 59f0a8ea5e09a902
zh: 2c4a18f247a8f36c
/node-js-24-is-required:
en: cc6b7b01b28de18d
zh: 05b7c46ae86fd688
/node-js-24-is-required/change:
en: 63cadfd5c0c7f662
zh: 989401b7f33dcdd8
en: ca2d29f4225a9883
zh: 13ec2ae202dd2e39
/node-js-24-is-required/migration:
en: 09189e3b48519ef6
zh: bd60335c71d71434
en: 375d422a3627042b
zh: 9455a6b87431050f
@@ -1,6 +1,6 @@
---
kind: upgrade-guide
description: "DSH requires Node.js 24.0 or newer and no longer supports Node.js 22."
description: "DSH requires Node.js 24.9 or newer and no longer supports Node.js 22."
---
# Node.js 24 is required
@@ -8,10 +8,10 @@ English | [中文](guide.zh.md)
## Change
DSH requires Node.js 24.0 or newer. The previous release also supported Node.js 22.19 and newer releases in the 22.x line. This change affects npm installations, source checkouts, and the Python SDK's explicit `DSH_RUNTIME_MODE=node` development carrier. Packaged desktop applications and the Python SDK's bundled executable provide their own runtime.
DSH requires Node.js 24.9 or newer. The previous release also supported Node.js 22.19 and newer releases in the 22.x line. This change affects npm installations, source checkouts, and the Python SDK's explicit `DSH_RUNTIME_MODE=node` development carrier. Packaged desktop applications and the Python SDK's bundled executable provide their own runtime.
## Migration
1. Upgrade the Node.js installation used to start DSH to version 24.0 or newer. Update Node version pins in development environments, containers, and CI jobs.
2. Run `node --version` in the same environment and confirm that it reports version 24.0 or newer.
1. Upgrade the Node.js installation used to start DSH to version 24.9 or newer. Update Node version pins in development environments, containers, and CI jobs.
2. Run `node --version` in the same environment and confirm that it reports version 24.9 or newer.
3. For a source checkout, run `pnpm install`. Start DSH with the profile you normally use and confirm that it starts successfully.
@@ -1,6 +1,6 @@
---
kind: upgrade-guide
description: "DSH 要求 Node.js 24.0 或更高版本,不再支持 Node.js 22。"
description: "DSH 要求 Node.js 24.9 或更高版本,不再支持 Node.js 22。"
---
# 必须使用 Node.js 24
@@ -8,10 +8,10 @@ description: "DSH 要求 Node.js 24.0 或更高版本,不再支持 Node.js 22
## 变更
DSH 要求 Node.js 24.0 或更高版本。上一版本还支持 Node.js 22.19 及 22.x 系列中的后续版本。此变更影响 npm 安装、源码检出,以及 Python SDK 显式指定 `DSH_RUNTIME_MODE=node` 的开发载体。打包的桌面应用和 Python SDK 的内置可执行文件自带运行时。
DSH 要求 Node.js 24.9 或更高版本。上一版本还支持 Node.js 22.19 及 22.x 系列中的后续版本。此变更影响 npm 安装、源码检出,以及 Python SDK 显式指定 `DSH_RUNTIME_MODE=node` 的开发载体。打包的桌面应用和 Python SDK 的内置可执行文件自带运行时。
## 迁移
1. 将用于启动 DSH 的 Node.js 安装升级至 24.0 或更高版本。更新开发环境、容器和 CI 任务中固定的 Node 版本。
2. 在同一环境中运行 `node --version`,确认版本为 24.0 或更高版本。
1. 将用于启动 DSH 的 Node.js 安装升级至 24.9 或更高版本。更新开发环境、容器和 CI 任务中固定的 Node 版本。
2. 在同一环境中运行 `node --version`,确认版本为 24.9 或更高版本。
3. 对于源码检出,运行 `pnpm install`。使用平常的 profile 启动 DSH,确认它能成功启动。
+2 -2
View File
@@ -15,8 +15,8 @@
en: 307f5b01e6e09661
zh: 39eccb0287afc128
/run-dsh-behind-a-network-proxy/limits-worth-knowing:
en: d0defd7e52100d1f
zh: 50f38176e16f55e4
en: a2d2a969d1a76624
zh: 83b06f86d6002275
/run-dsh-behind-a-network-proxy/what-stays-direct:
en: 34b04f98af3e09ae
zh: 4c530b755b552942
+1 -1
View File
@@ -57,7 +57,7 @@ export NODE_EXTRA_CA_CERTS=/path/to/corporate-ca.pem
Node reads that variable only at process start, so export it before running `dsh`.
**Tools DSH runs for you follow the same proxy.** Commands in the bash tool, `git`, `gh`, and MCP servers started as child processes all inherit these variables. A child that is itself a Node program honors them only on Node 22.21 or later; an older Node connects directly. If one of your proxy variables holds a value DSH rejected — a SOCKS URL, say — Node-based tools also connect directly rather than fail to start, while `curl` and `git` still read that value.
**Tools DSH runs for you follow the same proxy.** Commands in the bash tool, `git`, `gh`, and MCP servers started as child processes all inherit these variables. A child Node program uses its own installed runtime: Node 22.21+ and Node 24+ honor these variables; an older runtime connects directly. If one of your proxy variables holds a value DSH rejected — a SOCKS URL, say — Node-based tools also connect directly rather than fail to start, while `curl` and `git` still read that value.
**A password in the proxy URL reaches those tools too.** `HTTPS_PROXY=http://alice:[email protected]:8080` is a normal environment variable, so every command DSH runs — including the ones the model writes — can read it, and a command that prints its environment puts the password in output that is kept. This is how the variable already behaves for everything else in your shell. If that matters, give the proxy a credential-free entry point, or authenticate it some other way than in the URL.
+1 -1
View File
@@ -57,7 +57,7 @@ export NODE_EXTRA_CA_CERTS=/path/to/corporate-ca.pem
Node 只在进程启动时读取该变量,所以要在运行 `dsh` 之前导出。
**DSH 替你运行的工具遵循同一个代理。** bash 工具里的命令、`git`、`gh`,以及作为子进程启动的 MCP 服务器都会继承这些变量。子进程若本身是 Node 程序,则需 Node 22.21 或更高版本才会遵循;更旧的 Node 会直连。如果你的某个代理变量是 DSH 拒绝的值——比如 SOCKS URL——基于 Node 的工具同样直连而不是起不来,`curl` 与 `git` 则仍会读取那个值。
**DSH 替你运行的工具遵循同一个代理。** bash 工具里的命令、`git`、`gh`,以及作为子进程启动的 MCP 服务器都会继承这些变量。Node 子程序使用自己安装的运行时:Node 22.21+ 和 Node 24+ 遵循这些变量;更旧的运行时会直连。如果你的某个代理变量是 DSH 拒绝的值——比如 SOCKS URL——基于 Node 的工具同样直连而不是起不来,`curl` 与 `git` 则仍会读取那个值。
**代理 URL 里的密码同样会到达这些工具。** `HTTPS_PROXY=http://alice:[email protected]:8080` 就是一个普通环境变量,因此 DSH 运行的每一条命令——包括模型编写的那些——都能读到它,而打印环境的命令会把密码写进被保留的输出。这与该变量在你 shell 里对其他一切程序的行为一致。若这一点重要,请为代理提供一个无需凭据的入口,或改用 URL 之外的方式认证。