Compare commits

..
Author SHA1 Message Date
cflmy 0b47cf05fd test: skip real bootstrap when the platform is outside the release contract
ci/woodpecker/push/ci Pipeline was successful
CI bookworm reports glibc 2.36; the published CLI declares 2.39. Bootstrap\nmust refuse that platform, so the gated test skips with the real reason and\nremains covered on a supported host. Records the split in STATUS.
2026-11-28 23:55:00 +08:00
cflmy 682032c769 feat: capture CLI and routed workbench failures as diagnostics
ci/woodpecker/push/ci Pipeline failed
CLI check/execution failures from marqdo_program and unexpected Web API failures are persisted as local redacted reports, routed to the owning area (cli/knowledge/ecosystem/bootstrap/update/web). Submission remains explicit.
2026-11-28 23:41:03 +08:00
cflmy 3033d37b93 feat: add the read-only ecosystem catalog
ci/woodpecker/push/ci Pipeline was canceled
Project Runtime, Tool, Std, Ext and Knowledge in a fixed order from real\nservices. Ext exposes marqdo.yaml/marqdo.lock identity without a second parser;\nsemantic validation and trusted candidate discovery are explicit user actions.\nNo page open/filter action downloads, installs or executes.\n\nAdds /mqdh/api/ecosystem/candidates and /mqdh/api/ecosystem/project-check,\npublic std:<relative> import projection, unit tests and CAT/READER status.
2026-11-28 23:39:42 +08:00
cflmy 980e07dfae build: pin the DSH upstream identity in the package manifest
ci/woodpecker/push/ci Pipeline was canceled
The tag-only package lane cannot rely on an upstream git remote. Record the\ntested DSH baseline in packages/marqdo/harness/package.json and let the release\nmanifest/evidence fall back to it, so a clean clone still produces a complete\nmanifest. UPSTREAM.md documents the single record and update rule.
2026-11-28 23:14:48 +08:00
cflmy 475e774536 ci: scope the shared-egress gate to Node-side sources
The browser API client in src/web/assets.ts must use fetch; the gate now only rejects Node-side product sources that bypass src/network. CI passes end-to-end with real Release install and Bootstrap.
2026-11-28 23:12:51 +08:00
cflmy 307a44d6f1 docs: record egress, bootstrap, diagnostics and distribution evidence 2026-11-28 23:10:55 +08:00
cflmy 5f56c23455 feat: add unified egress, bootstrap, diagnostics and app distribution
Implements the four follow-up design issues for MQDH:\n\n- network: one policy/proxy/mirror/offline/audit client for product egress\n- bootstrap: first-run state machine, default Tools, real smoke, doctor/repair\n- diagnostics: local redacted reports and explicit Gitea issue submission\n- distribution: release manifest, user install tree, update/rollback, installer\n\nThe product CLI exposes bootstrap/doctor/repair/report/update/network and the\n/mqdh workbench renders the same services. Marqdo runtime artifacts remain\ndownloaded from trusted releases; unsupported platforms and unrun gates stay\nUNVERIFIED in docs/mqdh/STATUS.md.
2026-11-28 23:07:07 +08:00
cflmy 9b6acf0569 refactor: rename the product abbreviation to MQDH
ci/woodpecker/push/ci Pipeline was successful
Rename the downstream identity consistently: MQDH_HOME and MQDH_* env
vars, @marqdo/mqdh-harness, @marqdo/mqdh-bundle, the mqdh profile and
launcher, /mqdh routes, marqdo.mqdh.* schemas, docs/mqdh, CI variables and
all user-facing prose. Product name remains Marqdo Harness; command is
mqdh. No behavior change; 29 tests and the host typecheck pass.

Part of marqdo#25.
2026-11-28 16:34:44 +08:00
cflmy ee482a23c2 ci: skip upstream git-hook installation in submodule CI
ci/woodpecker/push/ci Pipeline was successful
The upstream install script refuses extensions.worktreeConfig when a
submodule keeps core.worktree in its common config. Its documented CI skip
path is CI=true; hooks are not needed in the pipeline. This keeps the
independent app CI and the root Node lane installable from a submodule.

Part of marqdo#25 (S09).
2026-11-28 11:03:08 +08:00
cflmy 44282ead84 docs: record the independent-clone build evidence
ci/woodpecker/manual/ci Pipeline is running
A depth-1 clone of origin/main installs the frozen lockfile and builds all
10 gates, so R04 is verified rather than inferred from the development
checkout. The parent pipeline's candidate-manifest bug is recorded as
fixed with its rerun still pending.

Part of marqdo#25.
2026-11-28 10:54:53 +08:00
cflmy 210ac86b0b feat: save a reviewed completed run as static knowledge
Add the reviewed outcome flow: a completed, fresh run can be confirmed
into a static knowledge document that records applicability, executable
asset identity, run/evidence id and boundaries. The generated document has
no @exec region and grants no execution permission; it enters the same
private knowledge index and can be searched later.

Expose it as POST /mdh/api/runs/<id>/candidate with explicit confirmation
and a workbench button, and cover the policy in tests. Record the View
result-binding gap as marqdo-view#15 instead of rendering results here.

Part of marqdo#25 (MDH-07, K07).
2026-11-28 10:52:32 +08:00
cflmy d28c5e4051 types: make the downstream package strict-clean in the host aggregate
Register the package sources in the host typecheck program and fix the
strict findings: explicit Error.name overrides, exact optional properties,
index/array narrowing and the webserver route auth field. No behavior
change; the same 28 tests pass and the host aggregate reports 0 errors.

Part of marqdo#25.
2026-11-28 10:46:25 +08:00
cflmy 25fc24eea4 feat: add Marqdo Harness product services and workbench
Implement the downstream product in `packages/marqdo`:

- `@marqdo/mdh-harness`: application home layout, atomic writes, locks,
  bounded fixed-argv processes, safe tar extraction, Observation 1 and
  ValueWire validation;
- trusted Gitea release discovery, SHA-256/platform/Bundle verification,
  transactional environment install, rollback and cleanup, CLI Tool changes;
- private knowledge collections with strict import policy, the official
  `marqdo-knowledge` compile/query adapter and a disclosed locator fallback;
- Analysis 3 parsing, approved run/call execution, evidence and staleness;
- the six model operations (find/read/check/program/ecosystem/knowledge_search);
- the `/mdh` workbench over the existing web server with a same-origin fence;
- `mdh` launcher, CI/package/upstream scripts and a Woodpecker pipeline.

Tests: 28 node:test cases (27 PASS, one network-gated install test also PASS
with MDH_TEST_INSTALL=1). Product install/workbench evidence is recorded in
docs/mdh/evidence.

Part of marqdo#25 (MDH-03..MDH-08).
2026-11-28 10:41:39 +08:00
cflmy 2d4eef4fe0 fork: establish the Marqdo Harness downstream baseline
- keep the full DSH history, MIT license and third-party notices;
- remove upstream publish/upload/desktop packaging workflows so downstream
  CI cannot trigger official credentials or channels;
- exclude the downstream `packages/marqdo/*` packages from the upstream
  bundling graph (they run as TypeScript through Node's type stripping);
- declare app-boot's production peer for the deployed launcher;
- document the product architecture, gates, upstream policy, modification
  log and the M0/M1-M6 evidence.

Upstream: deepseek-harness 4b399c39a6.
Part of marqdo#25 (MDH-00/MDH-02).
2026-11-28 10:41:04 +08:00
imccyu 4b399c39a6 Merge pull request #8961 from deepseek-harness/worktree-release-dsh-0.2.3-alpha.2
release(dsh): 0.2.3-alpha.2
2026-11-22 16:50:28 +08:00
imccyu 267805d20d release(dsh): 0.2.3-alpha.2 2026-11-22 15:27:28 +08:00
imccyu 5d8fdab85a release(vendor): cordis 4.2.0-alpha.1, cosmokit 1.10.0-alpha.1, group 1.2.0-alpha.1, hmr 1.2.0-alpha.1, include 1.2.0-alpha.1, loader 1.2.0-alpha.1, logger-console 1.2.0-alpha.1, schemastery 3.20.0-alpha.1, timer 1.3.0-alpha.1 (#8960) 2026-11-22 15:18:14 +08:00
imccyu bae489ee61 release(vendor): cordis 4.2.0-alpha.1, cosmokit 1.10.0-alpha.1, group 1.2.0-alpha.1, hmr 1.2.0-alpha.1, include 1.2.0-alpha.1, loader 1.2.0-alpha.1, logger-console 1.2.0-alpha.1, schemastery 3.20.0-alpha.1, timer 1.3.0-alpha.1 2026-11-22 15:15:43 +08:00
imccyu 09d9609a28 Merge pull request #8837 from deepseek-harness/chore/node-24-22-3-floor
chore(deps): raise the Node.js floor to 24.22.3
2026-11-22 11:23:51 +08:00
572 changed files with 16193 additions and 4325 deletions

No files matched your search

@@ -24,8 +24,8 @@
en: 4a55602284b462e8
zh: 762c4f8b719f179c
/agent-note-single-file-executable-sdk-runtime-distribution-single-exe/decision/python-sdk-distribution-two-carriers-exe-for-production-node-for-development:
en: b2a740a1ab7a5002
zh: a48be6ca6fc65912
en: ea49431552a3f35d
zh: 355a26743e2e9a2d
/agent-note-single-file-executable-sdk-runtime-distribution-single-exe/decision/naming-lineage:
en: 31a5aecb8bf828bb
zh: 2dffb6fd2e0f8194
@@ -56,7 +56,7 @@ CI: [`.github/workflows/build-exe-for-python-sdk.yml`](../../../../.github/workf
### Python SDK distribution: two carriers, exe for production, node for development
The Python SDK lives at [`python/`](../../../../python/README.md): `python/sdk` is the client and `python/sdk-runtime` is the runtime carrier package. The runtime package's data directory holds the build-injected platform executable with its required `-rg` sidecar, lightweight download metadata and Office skills, and optional macOS helper, plus the build-injected `runtime/node/` closure tree for repository development. `resolve_bundled_launch_args()` selects the executable by default; explicit `DSH_RUNTIME_MODE=node` runs `runtime/node/runtime-bootstrap.mjs` on system Node 24.9 or newer. The node carrier never enters wheel distributions, and neither carrier uses a checked-in complete `cordis.yml`.
The Python SDK lives at [`python/`](../../../../python/README.md): `python/sdk` is the client and `python/sdk-runtime` is the runtime carrier package. The runtime package's data directory holds the build-injected platform executable with its required `-rg` sidecar, lightweight download metadata and Office skills, and optional macOS helper, plus the build-injected `runtime/node/` closure tree for repository development. `resolve_bundled_launch_args()` selects the executable by default; explicit `DSH_RUNTIME_MODE=node` runs `runtime/node/runtime-bootstrap.mjs` on system Node `^24.22.3 || >=26.13.1`. The node carrier never enters wheel distributions, and neither carrier uses a checked-in complete `cordis.yml`.
[`scripts/build-python-release.py`](../../../../scripts/build-python-release.py) reads the authoritative `X.Y.Z` or prerelease version from the repository root `package.json`, converts prereleases to their PEP 440 spelling, and stages both packages at that wheel version, with `deepseek-harness-sdk` depending exactly on the matching `deepseek-harness-runtime-bin`. An optional `python-v<repository-version>` release tag is a consistency assertion and is rejected when it differs from the repository version; the source `pyproject.toml` development sentinel never determines a release version. Staging also carries the repository license into both wheels and the third-party notices into the bundled runtime wheel. The SDK is a `py3-none-any` wheel; each wheel-only runtime package contains one exe, lightweight resource metadata and skills, and its architecture-matched ripgrep sidecar, and the macOS wheel also contains its architecture-matched spawn helper. Runtime wheels use `py3-none-manylinux_2_28_x86_64`, `py3-none-manylinux_2_28_aarch64`, `py3-none-macosx_14_0_arm64`, `py3-none-macosx_14_0_x86_64`, or `py3-none-win_amd64`; the Hatch hook rejects sdists, universal tags, mixed-platform payloads, missing or extra sidecars, and unsupported platforms. Both macOS tags deliberately declare a conservative 14.0 installation floor: the packaged Node 24 executables declare macOS 13.5, and the x64 PTY helper declares 10.7, but release validation proves the complete payload only against the 14.0 wheel claim rather than promising each observed component minimum as a supported host. The two macOS wheels remain architecture-specific; no universal2 wheel is published.
@@ -56,7 +56,7 @@ CI 使用 [`.github/workflows/build-exe-for-python-sdk.yml`](../../../../.github
### Python SDK 分发:双载体,exe 用于生产,`node` 用于开发
Python SDK 位于 [`python/`](../../../../python/README.zh.md):`python/sdk` 是客户端,`python/sdk-runtime` 是运行时载体包。运行时包的数据目录包含构建注入的平台可执行文件及其必需的 `-rg` 伴随文件、轻量下载元数据与 Office skills 和可选的 macOS helper,以及供仓库开发使用的构建注入 `runtime/node/` 闭包树。`resolve_bundled_launch_args()` 默认选择可执行文件;显式设置 `DSH_RUNTIME_MODE=node` 会在系统 Node 24.9 或更高版本上运行 `runtime/node/runtime-bootstrap.mjs`。node 载体从不进入 wheel 分发,两种载体都不使用检入的完整 `cordis.yml`。
Python SDK 位于 [`python/`](../../../../python/README.zh.md):`python/sdk` 是客户端,`python/sdk-runtime` 是运行时载体包。运行时包的数据目录包含构建注入的平台可执行文件及其必需的 `-rg` 伴随文件、轻量下载元数据与 Office skills 和可选的 macOS helper,以及供仓库开发使用的构建注入 `runtime/node/` 闭包树。`resolve_bundled_launch_args()` 默认选择可执行文件;显式设置 `DSH_RUNTIME_MODE=node` 会在系统 Node `^24.22.3 || >=26.13.1` 上运行 `runtime/node/runtime-bootstrap.mjs`。node 载体从不进入 wheel 分发,两种载体都不使用检入的完整 `cordis.yml`。
[`scripts/build-python-release.py`](../../../../scripts/build-python-release.py) 从仓库根目录的 `package.json` 读取权威的 `X.Y.Z` 或预发布版本,把预发布版本转换为 PEP 440 写法,并以该 wheel 包版本暂存两个包,让 `deepseek-harness-sdk` 精确依赖匹配版本的 `deepseek-harness-runtime-bin`。可选的 `python-v<repository-version>` 发布标签只是一项一致性断言,与仓库版本不同时会被拒绝;源码 `pyproject.toml` 中的开发占位版本从不决定发布版本。暂存过程还会把仓库许可证放入两个 wheel 包,并把第三方声明放入内置运行时 wheel 包。SDK 是 `py3-none-any` wheel 包;每个只提供 wheel 包的运行时包都包含一个 exe、轻量资源元数据与 skills 及架构匹配的 ripgrep 伴随文件,macOS wheel 包还包含与其架构匹配的 spawn helper。运行时 wheel 包使用 `py3-none-manylinux_2_28_x86_64`、`py3-none-manylinux_2_28_aarch64`、`py3-none-macosx_14_0_arm64`、`py3-none-macosx_14_0_x86_64` 或 `py3-none-win_amd64`;Hatch 钩子拒绝 sdist、通用标签、混合平台载荷、伴随文件缺失或多余,以及不支持的平台。两个 macOS 标签都会特意声明保守的 14.0 安装下限:打包后的 Node 24 可执行文件声明 macOS 13.5,x64 PTY helper 声明 10.7,但发布验证只按照 14.0 wheel 声明证明完整载荷,不会把各组件实测的最低版本承诺为受支持宿主。两个 macOS wheel 包仍按架构分别发布,不发布 universal2 wheel 包。
@@ -9,8 +9,8 @@
en: 6379f0a2522f4c46
zh: c45ffeb5089be274
/agent-note-one-outbound-proxy-policy-installed-before-anything-can-request/decision:
en: 5168301af05473ed
zh: 30b840cb41998bee
en: ab8483f25f1a8561
zh: ef0934416e44d2af
/agent-note-one-outbound-proxy-policy-installed-before-anything-can-request/alternatives-considered:
en: df6c078f239a11f5
zh: 914da26836aa373b
@@ -48,7 +48,7 @@ This accepts a documented seam. Such a context matches bypass entries by Node's
**SDK transports need independent verification.** The OTLP exporter selects `http-exporter-transport` on Node, which posts through `node:http` and bypasses the global fetch dispatcher; a `globalThis.fetch` reference in its browser implementation does not prove Node routing. The [E2B removal](../simplification/2026-09-11-remove-e2b-providers.md) retires a second SDK transport integration without changing this requirement.
**Telemetry stays direct on purpose.** Routing it needs one of two things, and both cost more than the channel is worth. An `http.Agent` reads the environment through `proxyEnv`, which arrived in Node 22.21 and 24.5 — above the runtime floor at adoption, so Node 22.19, 22.20, and 24.0–24.4 stayed direct regardless, and the proxy package would have to keep a `createNodeHttpAgent` export for a path that worked on some runtimes. The Node 24.9 floor removes this API gap; routing still needs independent transport integration and must preserve compression. Replacing the transport with the SDK's `fetch` delegate covers every runtime, but that delegate has no compression, and the shipped `base` bundle enables gzip: a realistic OTLP batch measures 6.4x smaller with it. An attempt that refused `exporter.compression` instead broke every test that boots the shipped bundle, and one that gzipped at the serializer worked but put transport code in a telemetry plugin to keep it working.
**Telemetry stays direct on purpose.** Routing it needs one of two things, and both cost more than the channel is worth. An `http.Agent` reads the environment through `proxyEnv`, which arrived in Node 22.21 and 24.5 — above the runtime floor at adoption, so Node 22.19, 22.20, and 24.0–24.4 stayed direct regardless, and the proxy package would have to keep a `createNodeHttpAgent` export for a path that worked on some runtimes. The supported Node 24.22.3 floor removes this API gap; routing still needs independent transport integration and must preserve compression. Replacing the transport with the SDK's `fetch` delegate covers every runtime, but that delegate has no compression, and the shipped `base` bundle enables gzip: a realistic OTLP batch measures 6.4x smaller with it. An attempt that refused `exporter.compression` instead broke every test that boots the shipped bundle, and one that gzipped at the serializer worked but put transport code in a telemetry plugin to keep it working.
Weighed against that, telemetry is the one outbound channel whose loss costs the user nothing: no tool, no model request, and no session depends on it, and an export that cannot connect is already dropped silently. A user behind a mandatory proxy is left exactly where they were before this change rather than regressed. `egress.spec.ts` now asserts the exclusion — an SDK upgrade that moved the exporter onto `fetch` would start routing telemetry through a proxy silently, and that case is what makes it visible.
@@ -48,7 +48,7 @@ URL 层策略未受影响:仅 `http(s)`、禁止内嵌凭据、长度上限与
**SDK 传输需要独立验证。** OTLP 导出器在 Node 上选择 `http-exporter-transport`,通过 `node:http` 投递并绕过全局 fetch dispatcher;其浏览器实现中的 `globalThis.fetch` 引用不能证明 Node 路由。[E2B 移除决策](../simplification/2026-09-11-remove-e2b-providers.zh.md)撤下另一项 SDK 传输集成,但不改变这一要求。
**遥测的直连是有意为之。** 要让它走代理只有两条路,代价都超过这条通道本身的价值。`http.Agent` 通过 `proxyEnv` 读取环境,而该选项自 Node 22.21 与 24.5 才有——高于采用此决策时的运行时下限,因此 Node 22.19、22.20 与 24.0–24.4 无论如何仍是直连,而代理包还得为一条只在当时部分运行时生效的路径保留 `createNodeHttpAgent` 导出。Node 24.9 下限消除了这一 API 缺口;代理路由仍需要独立集成传输,并保留压缩。改用 SDK 的 `fetch` delegate 替换传输可以覆盖所有运行时,但该 delegate 没有压缩能力,而随附的 `base` bundle 启用了 gzip:实测一批真实规模的 OTLP 数据启用后体积只有 1/6.4。曾有一版转而在加载期拒绝 `exporter.compression`,结果凡是启动随附 bundle 的测试全部失败;另一版在 serializer 处 gzip 确实能跑通,但代价是把传输层代码塞进了遥测插件。
**遥测的直连是有意为之。** 要让它走代理只有两条路,代价都超过这条通道本身的价值。`http.Agent` 通过 `proxyEnv` 读取环境,而该选项自 Node 22.21 与 24.5 才有——高于采用此决策时的运行时下限,因此 Node 22.19、22.20 与 24.0–24.4 无论如何仍是直连,而代理包还得为一条只在当时部分运行时生效的路径保留 `createNodeHttpAgent` 导出。受支持的 Node 24.22.3 下限消除了这一 API 缺口;代理路由仍需要独立集成传输,并保留压缩。改用 SDK 的 `fetch` delegate 替换传输可以覆盖所有运行时,但该 delegate 没有压缩能力,而随附的 `base` bundle 启用了 gzip:实测一批真实规模的 OTLP 数据启用后体积只有 1/6.4。曾有一版转而在加载期拒绝 `exporter.compression`,结果凡是启动随附 bundle 的测试全部失败;另一版在 serializer 处 gzip 确实能跑通,但代价是把传输层代码塞进了遥测插件。
与之相比,遥测是唯一一条丢失了对用户毫无代价的出网通道:没有任何工具、模型请求或会话依赖它,而连不上的导出本就被静默丢弃。处在强制代理后的用户,只是停留在本次改动之前的状态,而不是被弄坏。`egress.spec.ts` 现在断言这一排除——若某次 SDK 升级把导出器挪到 `fetch` 上,遥测就会开始静默走代理,而该用例正是让这件事暴露出来的东西。
@@ -24,8 +24,8 @@
en: f5ec9b53f6fd483a
zh: f6a22f29bf13e66e
/agent-note-ci-failover-runbook-hosted-pools-in-house-pool/capacity-during-failover:
en: 3dffe12ecf2356c2
zh: 7e2385fcabab1398
en: acd7524d5ead1686
zh: e7cfc563a67aadce
/agent-note-ci-failover-runbook-hosted-pools-in-house-pool/capacity-during-failover/switch-back:
en: 63cf911019db8d2f
zh: 5eb3903b0ceb30db
@@ -40,7 +40,7 @@ The two switches are independent: flip only the one whose platform is degraded.
## Capacity during failover
Capacity includes the master standby, main-CI jobs, and three release-rehearsal jobs for each eligible PR or master push while the Linux switch is set. Each trusted PR also adds two Node compatibility jobs at gate concurrency one, including the build-backed Node 24.9 leg and cold temporary runtime downloads. The release rehearsal workflows cancel superseded runs within each workflow/ref group under the [cancellation policy](../../../../.github/workflows/ci.yml); different refs can still add concurrent build, pack, and install load. Check current CPU, memory, disk, and queue pressure before extending self-hosted operation; extra registrations on this VM add scheduling slots, not machine resources. Do not infer spare capacity from the standby alone. When host resources permit extra registrations, use an org registration token (org Settings → Actions → Runners → New runner). Clone an existing runner directory **excluding its identity files** — `rsync -a --exclude '.runner*' --exclude '.credentials*' --exclude '_diag' --exclude '_work' <src>/ <dst>/` (the globs also catch `.runner_migrated`/`.credentials_migrated`, which GitHub writes on migrated runners and which equally trigger the already-configured refusal) — then run `config.sh` (copying `.runner`/`.credentials` verbatim makes it refuse with "already configured"), and **start the listener**: `sudo ./svc.sh install ubuntu && sudo ./svc.sh start`. Registration alone leaves the runner offline; a started service adds a scheduling slot, not CPU or memory.
Capacity includes the master standby, main-CI jobs, and three release-rehearsal jobs for each eligible PR or master push while the Linux switch is set. Each trusted PR also adds two Node compatibility jobs at gate concurrency one, including the build-backed Node 24.22.3 leg and cold temporary runtime downloads. The release rehearsal workflows cancel superseded runs within each workflow/ref group under the [cancellation policy](../../../../.github/workflows/ci.yml); different refs can still add concurrent build, pack, and install load. Check current CPU, memory, disk, and queue pressure before extending self-hosted operation; extra registrations on this VM add scheduling slots, not machine resources. Do not infer spare capacity from the standby alone. When host resources permit extra registrations, use an org registration token (org Settings → Actions → Runners → New runner). Clone an existing runner directory **excluding its identity files** — `rsync -a --exclude '.runner*' --exclude '.credentials*' --exclude '_diag' --exclude '_work' <src>/ <dst>/` (the globs also catch `.runner_migrated`/`.credentials_migrated`, which GitHub writes on migrated runners and which equally trigger the already-configured refusal) — then run `config.sh` (copying `.runner`/`.credentials` verbatim makes it refuse with "already configured"), and **start the listener**: `sudo ./svc.sh install ubuntu && sudo ./svc.sh start`. Registration alone leaves the runner offline; a started service adds a scheduling slot, not CPU or memory.
### Switch back
@@ -40,7 +40,7 @@ Status: implemented
## 切换期间的容量
Linux 开关启用期间,容量需覆盖 master 热备、主 CI 作业,以及每个符合条件的 PR 或 master 推送的三个发布演练作业。每个可信 PR 还会增加两个门禁并发度为一的 Node 兼容性作业,包括需要构建的 Node 24.9 条目和冷临时运行时下载。发布演练工作流依据[取消策略](../../../../.github/workflows/ci.yml)取消各工作流/引用组内被取代的运行;不同引用仍可能增加并发构建、打包和安装负载。延长自托管运行前,检查当前 CPU、内存、磁盘和队列压力;同一虚拟机上新增注册只增加调度槽位,不增加机器资源。不能只依据热备负载推断空闲容量。主机资源允许增加注册实例时,使用组织级注册 token(组织 Settings → Actions → Runners → New runner)。复制现有 runner 目录时**必须排除身份文件**——`rsync -a --exclude '.runner*' --exclude '.credentials*' --exclude '_diag' --exclude '_work' <src>/ <dst>/`(通配同时排除 `.runner_migrated`/`.credentials_migrated`——GitHub 会在迁移过的运行器上写入这些文件,它们同样会触发 already-configured 拒绝)——再跑 `config.sh`(原样拷贝 `.runner`/`.credentials` 会使其以 "already configured" 拒绝),然后**启动监听器**:`sudo ./svc.sh install ubuntu && sudo ./svc.sh start`。仅注册不会上线;启动服务增加的是调度槽位,而非 CPU 或内存。
Linux 开关启用期间,容量需覆盖 master 热备、主 CI 作业,以及每个符合条件的 PR 或 master 推送的三个发布演练作业。每个可信 PR 还会增加两个门禁并发度为一的 Node 兼容性作业,包括需要构建的 Node 24.22.3 条目和冷临时运行时下载。发布演练工作流依据[取消策略](../../../../.github/workflows/ci.yml)取消各工作流/引用组内被取代的运行;不同引用仍可能增加并发构建、打包和安装负载。延长自托管运行前,检查当前 CPU、内存、磁盘和队列压力;同一虚拟机上新增注册只增加调度槽位,不增加机器资源。不能只依据热备负载推断空闲容量。主机资源允许增加注册实例时,使用组织级注册 token(组织 Settings → Actions → Runners → New runner)。复制现有 runner 目录时**必须排除身份文件**——`rsync -a --exclude '.runner*' --exclude '.credentials*' --exclude '_diag' --exclude '_work' <src>/ <dst>/`(通配同时排除 `.runner_migrated`/`.credentials_migrated`——GitHub 会在迁移过的运行器上写入这些文件,它们同样会触发 already-configured 拒绝)——再跑 `config.sh`(原样拷贝 `.runner`/`.credentials` 会使其以 "already configured" 拒绝),然后**启动监听器**:`sudo ./svc.sh install ubuntu && sudo ./svc.sh start`。仅注册不会上线;启动服务增加的是调度槽位,而非 CPU 或内存。
### 切回
@@ -9,8 +9,8 @@
en: e5c984fa32cc5e69
zh: 25d5742b2106d830
/agent-note-pr-artifact-builds-and-aggregate-typescript-checks/decision:
en: 2b047b7d8ffaaeb9
zh: 035e1a99cb0ffe84
en: e2a114f00135c33d
zh: 4185b33b87f72949
/agent-note-pr-artifact-builds-and-aggregate-typescript-checks/alternatives-considered:
en: f61da066f9ddcd62
zh: 816fd6e0063017cd
@@ -20,9 +20,9 @@ The Python executable builder selects `build:artifacts` artifact compilation wit
PR artifact builds in CI invoke the root manifest's `build:artifacts`; a PR that edits these root manifest scripts activates the separate native-addon platform matrix, a trade-off [the build split](2026-10-11-build-artifacts-check-split.md) records. The vendor rehearsal and benchmark lanes invoke the internal build helpers directly.
Benchmark sample counts stay fixed. The Linux artifact consumers emit artifacts only; the aggregate test and script type checks belong to the master lanes, and lint plus duplication run in their own lane, which compiles package declarations because oxlint's type-aware rules read them, so a red lint no longer costs a rerun of the snapshot and artifact consumers. The two compatibility cases run one job at a time; both x64 Python runtime targets start after the keyless Python SDK job succeeds in CI Python. Five Linux lanes, one compatibility job, three Windows lanes, and the Python SDK job permit at most eleven worker jobs initially. Once the SDK job finishes, those five Linux lanes, one compatibility job, and three Windows lanes run beside the two runtime targets, permitting at most eleven. Each runtime caller's plan and wheel stages precede its target and each use one job. This permits runtime validation to overlap the Node 24.9 build within the eleven-job ceiling. Coverage partitions reuse compact file-cost metadata within their platform and runner pool. Parallel release packing uses pnpm's existing bounded scheduler; serial publication keeps family order.
Benchmark sample counts stay fixed. The Linux artifact consumers emit artifacts only; the aggregate test and script type checks belong to the master lanes, and lint plus duplication run in their own lane, which compiles package declarations because oxlint's type-aware rules read them, so a red lint no longer costs a rerun of the snapshot and artifact consumers. The two compatibility cases run one job at a time; both x64 Python runtime targets start after the keyless Python SDK job succeeds in CI Python. Five Linux lanes, one compatibility job, three Windows lanes, and the Python SDK job permit at most eleven worker jobs initially. Once the SDK job finishes, those five Linux lanes, one compatibility job, and three Windows lanes run beside the two runtime targets, permitting at most eleven. Each runtime caller's plan and wheel stages precede its target and each use one job. This permits runtime validation to overlap the Node 24.22.3 build within the eleven-job ceiling. Coverage partitions reuse compact file-cost metadata within their platform and runner pool. Parallel release packing uses pnpm's existing bounded scheduler; serial publication keeps family order.
Each Node version runs the same eight source compatibility specs in one serial Vitest invocation. Both file parallelism and the CLI worker limit are fixed to one, and the gate sets `VITEST_MAX_WORKERS=1` because that environment variable overrides Vitest's CLI limit. Files retain fork isolation; the build-backed Node 24.9 lazy-search smoke keeps its separate build dependency. The original seven-spec paired samples preserve all 253 assertion outcomes and reduce startup-only median time from 11.52 to 8.69 seconds, without increasing owned descendant-process peak.
Each Node version runs the same eight source compatibility specs in one serial Vitest invocation. Both file parallelism and the CLI worker limit are fixed to one, and the gate sets `VITEST_MAX_WORKERS=1` because that environment variable overrides Vitest's CLI limit. Files retain fork isolation; the build-backed Node 24.22.3 lazy-search smoke keeps its separate build dependency. The original seven-spec paired samples preserve all 253 assertion outcomes and reduce startup-only median time from 11.52 to 8.69 seconds, without increasing owned descendant-process peak.
## Alternatives considered
@@ -20,9 +20,9 @@ Python executable builder 在验证 runtime closure 后,通过 `--build-artifa
CI 的 PR 产物构建调用 root manifest 中的 `build:artifacts`;修改 root manifest 中这些 script 的 PR 会激活独立的 native-addon 平台矩阵,[构建拆分](2026-10-11-build-artifacts-check-split.zh.md)记录这一取舍。vendor 演练与 benchmark lane 直接调用内部 build helper。
benchmark sample 数量保持固定。Linux 产物消费者只产出产物;聚合的 test 与 script 类型检查归 master lane;lint 与 duplication 单独占用一个 lane,该 lane 会先编译包声明(oxlint 的类型感知规则要读它们),因此 lint 变红不再让 snapshot 与 artifact 消费者整体重跑。两个 compatibility case 每次运行一个 job;两个 x64 Python runtime target 都在 CI Python 中于 keyless Python SDK job 成功后启动。五个 Linux lane、一个 compatibility job、三个 Windows lane 与 Python SDK job,初始最多占用十一个 worker job。SDK job 完成后,这五个 Linux lane、一个 compatibility job 与三个 Windows lane 与两个 runtime target 并行,最多占用十一个 job。每个 runtime 调用方的 plan 与 wheel 阶段先于其 target,各占一个 job。这允许 runtime 验证与 Node 24.9 构建重叠,同时保持十一个 job 的上限。覆盖率分区在各自的平台和 runner pool 内复用精简的文件成本元数据。并行 release 打包使用 pnpm 现有的有界调度器;串行发布保持 family 顺序。
benchmark sample 数量保持固定。Linux 产物消费者只产出产物;聚合的 test 与 script 类型检查归 master lane;lint 与 duplication 单独占用一个 lane,该 lane 会先编译包声明(oxlint 的类型感知规则要读它们),因此 lint 变红不再让 snapshot 与 artifact 消费者整体重跑。两个 compatibility case 每次运行一个 job;两个 x64 Python runtime target 都在 CI Python 中于 keyless Python SDK job 成功后启动。五个 Linux lane、一个 compatibility job、三个 Windows lane 与 Python SDK job,初始最多占用十一个 worker job。SDK job 完成后,这五个 Linux lane、一个 compatibility job 与三个 Windows lane 与两个 runtime target 并行,最多占用十一个 job。每个 runtime 调用方的 plan 与 wheel 阶段先于其 target,各占一个 job。这允许 runtime 验证与 Node 24.22.3 构建重叠,同时保持十一个 job 的上限。覆盖率分区在各自的平台和 runner pool 内复用精简的文件成本元数据。并行 release 打包使用 pnpm 现有的有界调度器;串行发布保持 family 顺序。
每个 Node 版本在一次串行 Vitest 调用中运行相同的八个 source compatibility spec。文件并行和 CLI worker 上限均固定为一,gate 还设置 `VITEST_MAX_WORKERS=1`,因为该环境变量会覆盖 Vitest 的 CLI 上限。文件保持 fork 隔离;依赖构建的 Node 24.9 lazy-search smoke 保留独立的 build 依赖。原来七个 spec 的成对样本保持全部 253 个 assertion outcome,将启动开销比较的 median 从 11.52 秒降至 8.69 秒,且不增加所拥有 descendant process 的峰值。
每个 Node 版本在一次串行 Vitest 调用中运行相同的八个 source compatibility spec。文件并行和 CLI worker 上限均固定为一,gate 还设置 `VITEST_MAX_WORKERS=1`,因为该环境变量会覆盖 Vitest 的 CLI 上限。文件保持 fork 隔离;依赖构建的 Node 24.22.3 lazy-search smoke 保留独立的 build 依赖。原来七个 spec 的成对样本保持全部 253 个 assertion outcome,将启动开销比较的 median 从 11.52 秒降至 8.69 秒,且不增加所拥有 descendant process 的峰值。
## Alternatives considered
@@ -21,8 +21,8 @@
en: 6a1b4ed0d9910133
zh: f32c6882208ded71
/agent-note-split-build-artifacts-and-build-check-with-build-running-both-concurrently/decision/callers:
en: 130636aa0395c746
zh: 0314fe0490f64410
en: 754af17fdaf8282c
zh: 9a31ebe528785e15
/agent-note-split-build-artifacts-and-build-check-with-build-running-both-concurrently/decision/measurements:
en: b3a753ac2aab6073
zh: 19cbd0e32751896f
@@ -51,7 +51,7 @@ Each command does only its own job.
| `dev:web` ([`scripts/dev-web.ts`](../../../../scripts/dev-web.ts)), `dev:desktop` (`apps/desktop/scripts/dev.ts`) | `build:artifacts` | None before launch; after `dev:web` launches, its `tsc -b tsconfig.client.json --watch` keeps checking the Client aggregate root program |
| Prerequisite step of `lint`, `lint:fix`, `doc-typecheck`, and the CI Typert contracts gate | Source-only Typert generation before Host package compilation (`compile-referenced-projects.ts host-contracts`), without any bundle | None |
| CI node 24 / build (`check:ci:build`), whose restored output `node 24 / snapshots and artifacts` (`check:ci:consumers-prebuilt`) and `node 24 / web snapshots <shard>/2` consume, windows node 24 / build & observational (`check:ci:windows-blocking`) | `build` | Yes, the two required lanes |
| CI node-compat 24.9 | `build:artifacts` (through run-gates) | None |
| CI node-compat 24.22.3 | `build:artifacts` (through run-gates) | None |
| CI python runtime | `build-exe-for-python-sdk.ts --build-artifacts` | None |
| PR rehearsals in `e2e.yml` and `release.yml` | `pnpm run build:artifacts --profile official` | None |
| `build-preview-cloudflare.yml` | `pnpm run build:artifacts` | None |
@@ -51,7 +51,7 @@ Status: implemented
| `dev:web`([`scripts/dev-web.ts`](../../../../scripts/dev-web.ts))、`dev:desktop`(`apps/desktop/scripts/dev.ts`) | `build:artifacts` | 启动前无;`dev:web` 启动后的 `tsc -b tsconfig.client.json --watch` 持续检查 Client 聚合根程序 |
| `lint`、`lint:fix`、`doc-typecheck` 与 CI 的 Typert contracts gate 的前置步骤 | 仅源码 Typert 生成后进行 Host 包编译(`compile-referenced-projects.ts host-contracts`),不含任何 bundle | 无 |
| CI node 24 / build(`check:ci:build`,`node 24 / snapshots and artifacts`(`check:ci:consumers-prebuilt`)与 `node 24 / web snapshots <shard>/2` 恢复并消费其产物)、windows node 24 / build & observational(`check:ci:windows-blocking`) | `build` | 有,两个必需 lane |
| CI node-compat 24.9 | `build:artifacts`(经 run-gates) | 无 |
| CI node-compat 24.22.3 | `build:artifacts`(经 run-gates) | 无 |
| CI python runtime | `build-exe-for-python-sdk.ts --build-artifacts` | 无 |
| `e2e.yml`、`release.yml` 的 PR 演练 | `pnpm run build:artifacts --profile official` | 无 |
| `build-preview-cloudflare.yml` | `pnpm run build:artifacts` | 无 |
@@ -9,11 +9,11 @@
en: 1e45546d7452029f
zh: d99966ac42bb193f
/agent-note-node-runtime-floor-and-compatibility-coverage/decision:
en: 13b84da1ca9bbb1f
zh: 5bf45cf6f742cd5a
en: 582c4e09cac8dae9
zh: 9c09b8fce011ecdd
/agent-note-node-runtime-floor-and-compatibility-coverage/consequences:
en: 224ce4b13f297f8b
zh: 1bb5f8ebdf3243b3
en: 6b16198e89927132
zh: 8b28e6e053fbe900
/agent-note-node-runtime-floor-and-compatibility-coverage/alternatives-considered:
en: 413d1133689bd55c
zh: fc77301991e1f425
en: 54fb33cb0b6055e7
zh: cab9ecf206cd49e1
@@ -10,24 +10,26 @@ The root `engines.node` range promises that the installed workspace supports eac
## Decision
Set `engines.node` to `>=24.9.0`. Node 24.9 is the minimum for DSH and its development carriers, including the experimental OAR subagent integration, whose `@botiverse/oar` library requires Node 24. This supersedes the [Node 22.19 floor](../../archived/process/2026-07-06-node-engine-floor.md); its Node 23 exclusion remains satisfied, and the declaration policy below remains narrower than the runtime floor. Migration instructions live in the [upgrade guide](../../../../docs/upgrade-guide/v0.2.1-rc.2/node-24/guide.md).
Set `engines.node` to `^24.22.3 || >=26.13.1`. Node 24.22.3 is the Node 24 minimum for DSH and its development carriers, including the experimental OAR subagent integration, whose `@botiverse/oar` library requires Node 24. It is a Node security release and the Node version embedded in Electron 44.11.4 and later, so source, npm, desktop, and Python SDK executable installations run the same minimum Node release. Node 24.22.3 bundles undici 7.30.2; Node 26.13.1 is the first Node 26 release whose bundled undici, 8.12.4, carries the same security fixes, so the range excludes earlier Node 26 releases. The Python SDK executable pins exactly this release in `scripts/build-exe-for-python-sdk.ts`, and the desktop primary runtime pins it in `scripts/primary-runtime/lock.json`. This supersedes the [Node 22.19 floor](../../archived/process/2026-07-06-node-engine-floor.md); its Node 23 exclusion remains satisfied, and the declaration policy below remains narrower than the runtime floor. Migration instructions live in the [Node 24.9 upgrade guide](../../../../docs/upgrade-guide/v0.2.1-rc.2/node-24/guide.md) and the [Node 24.22.3 upgrade guide](../../../../docs/upgrade-guide/v0.2.3-alpha.1/node-24-22-3/guide.md).
The primary Node 24 jobs own complete typechecking and unit coverage. Focused compatibility jobs run on pinned Node 24.9 and Node 26. Node 24.9 supports the existing `import.meta.main` script entrypoints and native TypeScript stripping. Pinning 24.9 exercises this verified minimum and its v1 private module loader; the primary jobs track the latest Node 24 and exercise its v2 loader, introduced in 24.12.0. A floating `24` compatibility job would duplicate the primary loader coverage and stop testing the minimum.
The primary Node 24 jobs own complete typechecking and unit coverage. Focused compatibility jobs run on pinned Node 24.22.3 and Node 26. Pinning 24.22.3 exercises the verified minimum; the primary jobs track the latest Node 24. A floating `24` compatibility job would duplicate the primary coverage and stop testing the minimum. Every supported Node 24 release uses the v2 private module loader introduced in 24.12.0; the v1 loader adapters in `app-boot` and `hmr` are no longer reachable on a supported runtime.
The Node 24.9 compatibility job also builds artifacts and checks that the shipped Web CLI starts and disposes with full-text Session search disabled. Command-entrypoint, source-worker, Zstandard, source-launch, profile-resolution, and jsdom-storage checks run on both compatibility versions. Real-API e2e jobs stay on Node 24 because they validate provider integration.
The Node 24.22.3 compatibility job also builds artifacts and checks that the shipped Web CLI starts and disposes with full-text Session search disabled. It requests these build-backed gates with `DSH_NODE_COMPAT_BUILD=1`, which `run-gates` rejects on any other Node release. The Node version alone does not select them: the primary jobs can run the floor release and nest the same compatibility mode beside readers of restored build output, where a rebuild would delete the files under test. Command-entrypoint, source-worker, Zstandard, source-launch, profile-resolution, and jsdom-storage checks run on both compatibility versions. Real-API e2e jobs stay on Node 24 because they validate provider integration.
The root, Web, and desktop projects retain `@types/node` on the 22.x line. Their current code needs no Node 24-only declarations. A narrower type API remains valid on the supported runtime and avoids unrelated declaration changes. Raise these declarations when a supported API requires them, and keep their major no newer than the runtime floor. The independently published native addon has its own runtime and type support policy.
## Consequences
- Node 22 installations must upgrade before running DSH. Packaged applications with an embedded runtime do not require a system Node upgrade.
- Node 22, Node 24 releases before 24.22.3, and Node 26 releases before 26.13.1 must upgrade before running DSH. Packaged applications with an embedded runtime do not require a system Node upgrade.
- Supported runtimes provide `node:sqlite` and native TypeScript stripping without opt-in flags. The source CLI still uses its declared `tsx/esm` launcher.
- The compatibility graph retains both private loader interfaces used by supported Node versions.
- The compatibility graph exercises only the v2 private loader interface; the unreachable v1 adapters can be removed.
- A future runtime-floor change updates `engines.node`, compatibility jobs, current documentation, this note, and an upgrade guide together.
## Alternatives considered
- **Keep Node 22 support.** It excludes the OAR library from the supported installation.
- **Use OAR’s declared minimum of Node 24.0.** Existing script entrypoints depend on `import.meta.main`, which Node 24.0 lacks. A dependency minimum alone does not establish the application minimum.
- **Test only the latest Node 24.** It does not exercise the minimum or the older private loader interface still used within the supported 24.x line.
- **Keep the Node 24.9 floor.** It admits Node releases older than the runtime embedded in the desktop application and Python SDK executable, and releases without the 24.22.3 security fixes.
- **Keep `>=24.22.3`.** It admits Node 26 releases before 26.13.1, whose bundled undici lacks the security fixes in Node 24.22.3.
- **Test only the latest Node 24.** It does not exercise the minimum.
- **Raise Node declarations ahead of the minimum.** It allows code to compile against APIs that a supported runtime can lack.
@@ -10,24 +10,26 @@ Status: implemented
## 决策
将 `engines.node` 设为 `>=24.9.0`。Node 24.9 是 DSH 及其开发载体的下限,也允许实验性 OAR 子代理集成使用要求 Node 24 的 `@botiverse/oar` 库。此决策取代 [Node 22.19 下限](../../archived/process/2026-07-06-node-engine-floor.md);Node 23 仍被排除,下文的声明策略也仍比运行时下限更窄。迁移说明见[升级指南](../../../../docs/upgrade-guide/v0.2.1-rc.2/node-24/guide.zh.md)。
将 `engines.node` 设为 `^24.22.3 || >=26.13.1`。Node 24.22.3 是 DSH 及其开发载体在 Node 24 上的下限,也允许实验性 OAR 子代理集成使用要求 Node 24 的 `@botiverse/oar` 库。它是 Node 安全版本,也是 Electron 44.11.4 及之后版本内嵌的 Node 版本,因此源码、npm、桌面应用和 Python SDK 可执行文件安装都运行同一个最低 Node 版本。Node 24.22.3 内置 undici 7.30.2;Node 26.13.1 是第一个内置 undici(8.12.4)包含同一批安全修复的 Node 26 版本,因此该范围排除更早的 Node 26 版本。Python SDK 可执行文件在 `scripts/build-exe-for-python-sdk.ts` 中精确固定此版本,桌面主运行时在 `scripts/primary-runtime/lock.json` 中固定此版本。此决策取代 [Node 22.19 下限](../../archived/process/2026-07-06-node-engine-floor.md);Node 23 仍被排除,下文的声明策略也仍比运行时下限更窄。迁移说明见 [Node 24.9 升级指南](../../../../docs/upgrade-guide/v0.2.1-rc.2/node-24/guide.zh.md)和 [Node 24.22.3 升级指南](../../../../docs/upgrade-guide/v0.2.3-alpha.1/node-24-22-3/guide.zh.md)。
主要的 Node 24 任务负责完整的类型检查和单元测试覆盖率。聚焦的兼容性任务在固定的 Node 24.9 和 Node 26 上运行。Node 24.9 支持现有 `import.meta.main` 脚本入口和原生 TypeScript 类型剥离。固定 24.9 能验证这个已验证的下限及其 v1 私有模块加载器;主要任务跟随最新的 Node 24,验证 24.12.0 引入的 v2 加载器。浮动的 `24` 兼容性任务会重复主要任务的加载器覆盖,并停止验证下限。
主要的 Node 24 任务负责完整的类型检查和单元测试覆盖率。聚焦的兼容性任务在固定的 Node 24.22.3 和 Node 26 上运行。固定 24.22.3 能验证这个已验证的下限;主要任务跟随最新的 Node 24。浮动的 `24` 兼容性任务会重复主要任务的覆盖,并停止验证下限。所有受支持的 Node 24 版本都使用 24.12.0 引入的 v2 私有模块加载器;`app-boot` 和 `hmr` 中的 v1 加载器适配代码在受支持的运行时上已不可达。
Node 24.9 兼容性任务还构建产物,并检查随产品提供的 Web CLI 能在禁用全文 Session 搜索时启动和释放资源。command-entrypoint、source-worker、Zstandard、source-launch、profile-resolution 和 jsdom-storage 检查在两个兼容性版本上运行。真实 API 的 e2e 任务保留在 Node 24 上,因为它们验证的是提供方集成。
Node 24.22.3 兼容性任务还构建产物,并检查随产品提供的 Web CLI 能在禁用全文 Session 搜索时启动和释放资源。它通过 `DSH_NODE_COMPAT_BUILD=1` 请求这些依赖构建的 gate,`run-gates` 会在其他 Node 版本上拒绝该请求。Node 版本本身不会触发它们:主要任务可能运行下限版本,并在读取已恢复构建产物的 gate 旁嵌套同一兼容性模式,此时重新构建会删除正在被测试的文件。command-entrypoint、source-worker、Zstandard、source-launch、profile-resolution 和 jsdom-storage 检查在两个兼容性版本上运行。真实 API 的 e2e 任务保留在 Node 24 上,因为它们验证的是提供方集成。
根项目、Web 和桌面项目将 `@types/node` 保留在 22.x 线。它们当前的代码不需要 Node 24 专属声明。较窄的类型 API 仍适用于受支持的运行时,也避免无关的声明变更。当受支持的 API 需要时再提升这些声明,并确保其主版本不高于运行时下限。独立发布的原生 addon 有自己的运行时和类型支持策略。
## 后果
- 使用 Node 22 的安装必须先升级,才能运行 DSH。内嵌运行时的打包应用不要求升级系统 Node。
- 使用 Node 22、24.22.3 之前的 Node 24 版本或 26.13.1 之前的 Node 26 版本的安装必须先升级,才能运行 DSH。内嵌运行时的打包应用不要求升级系统 Node。
- 受支持的运行时无需启用标志即可使用 `node:sqlite` 和原生 TypeScript 类型剥离。源码 CLI 仍使用声明的 `tsx/esm` 启动器。
- 兼容性任务图保留受支持 Node 版本使用的两种私有加载器接口。
- 兼容性任务图只验证 v2 私有加载器接口;不可达的 v1 适配代码可以删除。
- 后续提升运行时下限时,必须一起更新 `engines.node`、兼容性任务、当前文档、本文和升级指南。
## 考虑过的替代方案
- **保留 Node 22 支持。** 这会将 OAR 库排除在受支持的安装之外。
- **采用 OAR 声明的 Node 24.0 下限。** 现有脚本入口依赖 `import.meta.main`,而 Node 24.0 缺少该功能。仅凭依赖下限无法确定应用下限。
- **只验证最新的 Node 24。** 这既不能验证下限,也不能验证受支持 24.x 系列仍使用的旧私有加载器接口。
- **保留 Node 24.9 下限。** 这会允许早于桌面应用和 Python SDK 可执行文件内嵌运行时的 Node 版本,以及缺少 24.22.3 安全修复的版本。
- **保留 `>=24.22.3`。** 这会允许 26.13.1 之前的 Node 26 版本,其内置 undici 缺少 Node 24.22.3 中的安全修复。
- **只验证最新的 Node 24。** 这无法验证下限。
- **将 Node 声明提升至下限之上。** 这会允许代码使用受支持运行时可能缺少的 API 编译通过。
@@ -1,530 +0,0 @@
name: Build single-exe
# Native builds for the release targets; see
# .agents/notes/implemented/architecture/2026-07-10-single-file-executable-sdk-runtime-distribution.md.
# A full target run retains one SDK wheel and five runtime wheels; subset
# dispatch retains the SDK wheel and selected runtime wheels. Bare executables
# and source closures are test inputs. Run manually or call it from the Python
# release workflow. There is no `pull_request` trigger: a label trigger would
# list gray skipped checks on every unrelated PR label event. Checkout uses the
# triggering ref, so dispatch needs no separate ref input.
on:
workflow_call:
inputs:
targets:
description: Comma-separated pkg targets to build; empty builds all five.
type: string
required: false
default: ''
release:
description: Run as the native builder for the Python release workflow.
type: boolean
required: false
default: false
ci:
description: Run Python runtime CI validation for the selected targets.
type: boolean
required: false
default: false
secrets:
DEEPSEEK_API_KEY_EXTERNAL:
description: Real DeepSeek API key for trusted installed-wheel pull-request tests.
required: false
workflow_dispatch:
inputs:
targets:
description: >-
Comma-separated pkg targets to build. Any subset of:
node24-linux-x64, node24-linux-arm64, node24-macos-arm64,
node24-macos-x64, node24-win-x64. Empty builds all five.
type: string
required: false
default: ''
concurrency:
# Keep the called workflow distinct from its caller's concurrency group;
# github.workflow identifies the caller inside a reusable workflow and keeps
# an ordinary CI run from cancelling a full release validation on the same ref.
group: build-single-exe-${{ github.workflow }}-${{ github.ref }}
# Release-owned builds are part of an intentional publication transaction.
cancel-in-progress: ${{ !inputs.release }}
permissions:
contents: read
env:
# CI runs must never report to the production telemetry endpoint baked
# into apps/cli/cordis.yml (AppCLIEntry disables the row when set).
DSH_TELEMETRY_DISABLED: '1'
jobs:
# Job-level conditions cannot inspect `matrix`, so validate target names and
# construct the matrix before the dependent jobs.
plan:
name: plan targets
if: inputs.ci || inputs.release || github.event_name == 'workflow_dispatch'
runs-on: >-
${{ inputs.ci && !inputs.release && vars.DSH_CI_FAILOVER_LINUX == 'blacksmith'
&& 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
timeout-minutes: 5
outputs:
matrix: ${{ steps.plan.outputs.matrix }}
version: ${{ steps.version.outputs.version }}
repository-version: ${{ steps.version.outputs.repository-version }}
steps:
- uses: actions/checkout@v7.0.1
- name: Resolve repository version
id: version
run: |
set -euo pipefail
python3 - <<'PY' >> "$GITHUB_OUTPUT"
import runpy
release = runpy.run_path("scripts/build-python-release.py")
repository_version = release["repository_version"]()
wheel_version = release["pep440_version"](repository_version)
print(f"repository-version={repository_version}")
print(f"version={wheel_version}")
PY
- name: Compute matrix from targets input
id: plan
env:
# Blank dispatch inputs build all targets.
TARGETS: ${{ inputs.targets || 'node24-linux-x64,node24-linux-arm64,node24-macos-arm64,node24-macos-x64,node24-win-x64' }}
run: |
set -euo pipefail
matrix='[]'
IFS=',' read -r -a targets <<< "$TARGETS"
for raw in "${targets[@]}"; do
t="$(echo "$raw" | xargs)" # trim surrounding whitespace
[ -z "$t" ] && continue
# Native-only: hosted arm64 Linux uses ubuntu-24.04-arm, while
# macos-latest is Apple Silicon; macos-15-intel is native x64.
case "$t" in
node24-linux-x64) runner=ubuntu-latest ;;
node24-linux-arm64) runner=ubuntu-24.04-arm ;;
node24-macos-arm64) runner=macos-latest ;;
node24-macos-x64) runner=macos-15-intel ;;
node24-win-x64) runner=windows-2025 ;;
*)
echo "::error::Unknown target '$t'. Supported: node24-linux-x64, node24-linux-arm64, node24-macos-arm64, node24-macos-x64, node24-win-x64."
exit 1
;;
esac
matrix="$(jq -c --arg target "$t" --arg runner "$runner" '. + [{target: $target, runner: $runner}]' <<< "$matrix")"
done
if [ "$matrix" = '[]' ]; then
echo "::error::The targets input selected nothing to build."
exit 1
fi
echo "Matrix: $matrix"
echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
sdk-wheel:
needs: plan
name: deepseek_harness_sdk-${{ needs.plan.outputs.version }}-py3-none-any.whl
runs-on: >-
${{ inputs.ci && !inputs.release && vars.DSH_CI_FAILOVER_LINUX == 'blacksmith'
&& 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
timeout-minutes: 5
steps:
- uses: actions/checkout@v7.0.1
- uses: actions/setup-python@v6.3.0
with:
python-version: '3.10'
- name: Install Python build tooling
run: python -m pip install uv==0.11.23
- name: Build release-shaped SDK wheel
run: >-
python scripts/build-python-release.py
--package sdk
--output-dir dist-python
- uses: actions/upload-artifact@v7.0.1
with:
name: deepseek_harness_sdk-${{ needs.plan.outputs.version }}-py3-none-any.whl
path: dist-python/deepseek_harness_sdk-${{ needs.plan.outputs.version }}-py3-none-any.whl
if-no-files-found: error
retention-days: 7
# Blacksmith x64 CI builds use 2 vCPU for compilation, bundling, and wheel smokes.
# Release macOS builds use larger GitHub runners; ordinary CI and direct
# builder dispatches retain the standard native target matrix.
build:
needs: [plan, sdk-wheel]
name: ${{ matrix.target }}
runs-on: >-
${{ inputs.release && matrix.target == 'node24-macos-x64' && 'macos-15-large'
|| inputs.release && matrix.target == 'node24-macos-arm64' && 'macos-15-xlarge'
|| inputs.ci && !inputs.release && matrix.target == 'node24-linux-x64'
&& vars.DSH_CI_FAILOVER_LINUX == 'blacksmith' && 'blacksmith-2vcpu-ubuntu-2404'
|| inputs.ci && !inputs.release && matrix.target == 'node24-win-x64'
&& vars.DSH_CI_FAILOVER_WINDOWS == 'blacksmith' && 'blacksmith-2vcpu-windows-2025'
|| matrix.runner }}
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.plan.outputs.matrix) }}
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: pnpm/action-setup@v5.0.0
with:
dest: ${{ runner.temp }}/setup-pnpm-js-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }}
- name: Enable Windows Developer Mode (symlink support)
if: runner.os == 'Windows'
shell: pwsh
run: >-
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock"
/t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
# setup-node's built-in pnpm store cache keys on platform AND arch, so
# the Linux architectures sharing runner.os stay on separate caches.
- uses: actions/setup-node@v7.0.0
with:
node-version: 24
cache: pnpm
- uses: actions/setup-python@v6.3.0
with:
python-version: '3.10'
- name: Install Python build tooling
run: python -m pip install uv==0.11.23
# Cache pkg's target Node binary; lockfile changes roll the
# exact key while the restore prefix can seed its replacement.
- uses: actions/cache@v6.1.0
with:
path: ~/.pkg-cache
key: pkg-fetch-${{ matrix.target }}-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
pkg-fetch-${{ matrix.target }}-
- name: Install (immutable)
# node-gyp fetches Node headers from nodejs.org during install; that
# endpoint stalls intermittently (observed 10 s connect timeouts).
# Bounded retries mirror the wine lane's transfer policy without a
# mirror, since these installs also resolve native addons.
shell: bash
run: |
for attempt in 1 2 3; do
if pnpm install --frozen-lockfile; then exit 0; fi
[ "$attempt" -lt 3 ] && sleep 10
done
exit 1
- name: Rebuild Linux node-pty against manylinux 2.28
if: runner.os == 'Linux'
env:
RUNNER_ARCH: ${{ runner.arch }}
run: |
set -euo pipefail
case "$RUNNER_ARCH" in
X64) image=quay.io/pypa/manylinux_2_28_x86_64 ;;
ARM64) image=quay.io/pypa/manylinux_2_28_aarch64 ;;
*) echo "::error::Unsupported Linux runner architecture $RUNNER_ARCH"; exit 1 ;;
esac
addon_dir="$(realpath packages/subprocess/subprocess-local/node_modules/node-pty)"
pnpm_setup_root="$(realpath "$(dirname "$(dirname "$PNPM_HOME")")")"
# Verification installs would install node-gyp inside the package and package it into the exe.
(cd "$addon_dir" && npm_config_build_from_source=true pnpm --config.verifyDepsBeforeRun=false run install)
addon="$addon_dir/build/Release/pty.node"
[ -f "$addon_dir/build/Makefile" ] || {
echo "::error::node-pty install did not generate $addon_dir/build/Makefile"
exit 1
}
docker run --rm \
--user "$(id -u):$(id -g)" \
-v "$PWD:$PWD" \
-v "$HOME/.cache/node-gyp:$HOME/.cache/node-gyp:ro" \
-v "$pnpm_setup_root:$pnpm_setup_root:ro" \
-w "$addon_dir" \
"$image" \
bash -euxo pipefail -c \
'rm -rf build/Release && make -C build -j2 BUILDTYPE=Release'
[ -f "$addon" ] || { echo "::error::$addon missing after manylinux rebuild"; exit 1; }
readelf --version-info "$addon" | tee node-pty-glibc-versions.txt
maximum="$(sed -n 's/.*Name: GLIBC_\([0-9.]*\).*/\1/p' node-pty-glibc-versions.txt | sort -V | tail -1)"
[ -n "$maximum" ] || { echo "::error::No GLIBC requirements found in $addon"; exit 1; }
dpkg --compare-versions "$maximum" le 2.28 || {
echo "::error::node-pty addon requires GLIBC_$maximum but wheel claims manylinux_2_28"
exit 1
}
- name: Build single-exe
env:
DSH_BUILD_CLIENT_PROFILE: official
# Brotli runs at quality 9 through the vendored pkg patch: the same
# payload measured 16.3 s at quality 9 against 132.8 s at pkg's default
# quality 11, for an archive 10% larger. Which quality each lane uses is
# therefore not a workflow choice.
run: >-
pnpm exec tsx scripts/build-exe-for-python-sdk.ts --targets=${{ matrix.target }}
${{ inputs.ci && github.event_name == 'pull_request' && '--build-artifacts' || '' }}
- name: Resolve platform outputs (POSIX)
id: runtime-posix
if: runner.os != 'Windows'
env:
TARGET: ${{ matrix.target }}
VERSION: ${{ needs.plan.outputs.version }}
run: |
set -euo pipefail
platform="${TARGET#node24-}"
exe="$PWD/dist-exe/deepseek-harness-sdk-runtime-$platform"
case "$platform" in
linux-x64) wheel=deepseek_harness_runtime_bin-$VERSION-py3-none-manylinux_2_28_x86_64.whl ;;
linux-arm64) wheel=deepseek_harness_runtime_bin-$VERSION-py3-none-manylinux_2_28_aarch64.whl ;;
macos-arm64) wheel=deepseek_harness_runtime_bin-$VERSION-py3-none-macosx_14_0_arm64.whl ;;
macos-x64) wheel=deepseek_harness_runtime_bin-$VERSION-py3-none-macosx_14_0_x86_64.whl ;;
*) echo "::error::Unsupported runtime platform $platform"; exit 1 ;;
esac
[ -x "$exe" ] || { echo "::error::$exe missing or not executable"; exit 1; }
echo "platform=$platform" >> "$GITHUB_OUTPUT"
echo "exe=$exe" >> "$GITHUB_OUTPUT"
echo "wheel=$wheel" >> "$GITHUB_OUTPUT"
- name: Resolve platform outputs (Windows)
id: runtime-windows
if: runner.os == 'Windows'
shell: pwsh
env:
TARGET: ${{ matrix.target }}
VERSION: ${{ needs.plan.outputs.version }}
run: |
if ($env:TARGET -ne 'node24-win-x64') { throw "Unsupported runtime target $env:TARGET" }
$platform = 'win-x64'
$exe = Join-Path $PWD 'dist-exe\deepseek-harness-sdk-runtime-win-x64.exe'
$wheel = "deepseek_harness_runtime_bin-$env:VERSION-py3-none-win_amd64.whl"
if (-not (Test-Path -LiteralPath $exe -PathType Leaf)) { throw "Runtime executable is missing at $exe" }
"platform=$platform" >> $env:GITHUB_OUTPUT
"exe=$exe" >> $env:GITHUB_OUTPUT
"wheel=$wheel" >> $env:GITHUB_OUTPUT
- name: Build release-shaped runtime wheel
run: >-
python scripts/build-python-release.py
--package runtime
--platform "${{ steps.runtime-posix.outputs.platform || steps.runtime-windows.outputs.platform }}"
--runtime-exe "${{ steps.runtime-posix.outputs.exe || steps.runtime-windows.outputs.exe }}"
--output-dir dist-python
- uses: actions/download-artifact@v8.0.1
with:
name: deepseek_harness_sdk-${{ needs.plan.outputs.version }}-py3-none-any.whl
path: dist-python
- name: Install local SDK and runtime wheels into a clean venv (POSIX)
id: smoke-venv-posix
if: runner.os != 'Windows'
env:
RUNTIME_WHEEL: ${{ steps.runtime-posix.outputs.wheel }}
SDK_WHEEL: deepseek_harness_sdk-${{ needs.plan.outputs.version }}-py3-none-any.whl
run: |
set -euo pipefail
venv="$(python -c 'import tempfile; print(tempfile.mkdtemp(prefix="dsh-sdk-smoke-"))')"
python -m venv "$venv"
smoke_python="$venv/bin/python"
"$smoke_python" -m pip install \
"dist-python/$SDK_WHEEL" \
"dist-python/$RUNTIME_WHEEL" \
'pytest>=8.0'
echo "python=$smoke_python" >> "$GITHUB_OUTPUT"
- name: Install local SDK and runtime wheels into a clean venv (Windows)
id: smoke-venv-windows
if: runner.os == 'Windows'
shell: pwsh
env:
RUNTIME_WHEEL: ${{ steps.runtime-windows.outputs.wheel }}
SDK_WHEEL: deepseek_harness_sdk-${{ needs.plan.outputs.version }}-py3-none-any.whl
run: |
$venv = (& python -c 'import tempfile; print(tempfile.mkdtemp(prefix="dsh-sdk-smoke-"))').Trim()
python -m venv $venv
$smokePython = Join-Path $venv 'Scripts\python.exe'
& $smokePython -m pip install "dist-python/$env:SDK_WHEEL" "dist-python/$env:RUNTIME_WHEEL" 'pytest>=8.0'
if ($LASTEXITCODE -ne 0) { throw "Wheel installation failed with exit code $LASTEXITCODE" }
"python=$smokePython" >> $env:GITHUB_OUTPUT
- name: Run installed-wheel keyless black-box tests (POSIX)
if: runner.os != 'Windows'
run: |
set -euo pipefail
blackbox_root="$(python -c 'import tempfile; print(tempfile.mkdtemp(prefix="dsh-sdk-blackbox-"))')"
cd "$blackbox_root"
env -u PYTHONPATH -u DSH_RUNTIME_MODE \
"${{ steps.smoke-venv-posix.outputs.python }}" \
"$GITHUB_WORKSPACE/scripts/smoke-python-runtime.py" \
--scenario all \
--installed-wheel
- name: Run installed-wheel keyless black-box tests (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$blackboxRoot = (& python -c 'import tempfile; print(tempfile.mkdtemp(prefix="dsh-sdk-blackbox-"))').Trim()
Remove-Item Env:PYTHONPATH -ErrorAction SilentlyContinue
Remove-Item Env:DSH_RUNTIME_MODE -ErrorAction SilentlyContinue
Push-Location $blackboxRoot
try {
& "${{ steps.smoke-venv-windows.outputs.python }}" "$env:GITHUB_WORKSPACE\scripts\smoke-python-runtime.py" --scenario all --installed-wheel
if ($LASTEXITCODE -ne 0) { throw "Installed-wheel black-box failed with exit code $LASTEXITCODE" }
} finally {
Pop-Location
}
- name: Run installed-wheel native command tests (POSIX)
if: runner.os != 'Windows'
run: >-
"${{ steps.smoke-venv-posix.outputs.python }}" -I
"$GITHUB_WORKSPACE/python/sdk/tests/run_installed_commands.py"
- name: Run installed-wheel native command tests (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
& "${{ steps.smoke-venv-windows.outputs.python }}" -I "$env:GITHUB_WORKSPACE\python\sdk\tests\run_installed_commands.py"
if ($LASTEXITCODE -ne 0) { throw "Installed-wheel native command tests failed with exit code $LASTEXITCODE" }
- name: Preflight installed-wheel real API test (POSIX)
if: >-
inputs.ci
&& runner.os != 'Windows'
&& (github.event_name != 'pull_request'
|| !(github.event.pull_request.head.repo.fork
|| github.event.pull_request.user.login == 'dependabot[bot]'))
env:
DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY_EXTERNAL }}
run: |
set -euo pipefail
if [ -z "${DEEPSEEK_API_KEY:-}" ]; then
echo "::error::DEEPSEEK_API_KEY_EXTERNAL is empty; the installed-wheel real API test cannot self-skip."
exit 1
fi
- name: Preflight installed-wheel real API test (Windows)
if: >-
inputs.ci
&& runner.os == 'Windows'
&& (github.event_name != 'pull_request'
|| !(github.event.pull_request.head.repo.fork
|| github.event.pull_request.user.login == 'dependabot[bot]'))
shell: pwsh
env:
DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY_EXTERNAL }}
run: |
if ([string]::IsNullOrWhiteSpace($env:DEEPSEEK_API_KEY)) {
throw 'DEEPSEEK_API_KEY_EXTERNAL is empty; the installed-wheel real API test cannot self-skip.'
}
- name: Run installed-wheel real API black-box test (POSIX)
if: >-
inputs.ci
&& runner.os != 'Windows'
&& (github.event_name != 'pull_request'
|| !(github.event.pull_request.head.repo.fork
|| github.event.pull_request.user.login == 'dependabot[bot]'))
env:
DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY_EXTERNAL }}
DEEPSEEK_BASE_URL: https://api.deepseek.com/anthropic
run: |
set -euo pipefail
blackbox_root="$(python -c 'import tempfile; print(tempfile.mkdtemp(prefix="dsh-sdk-blackbox-live-"))')"
cd "$blackbox_root"
env -u PYTHONPATH -u DSH_RUNTIME_MODE \
"${{ steps.smoke-venv-posix.outputs.python }}" \
"$GITHUB_WORKSPACE/scripts/smoke-python-runtime.py" \
--scenario sdk-live \
--installed-wheel
- name: Run installed-wheel real API black-box test (Windows)
if: >-
inputs.ci
&& runner.os == 'Windows'
&& (github.event_name != 'pull_request'
|| !(github.event.pull_request.head.repo.fork
|| github.event.pull_request.user.login == 'dependabot[bot]'))
shell: pwsh
env:
DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY_EXTERNAL }}
DEEPSEEK_BASE_URL: https://api.deepseek.com/anthropic
run: |
$blackboxRoot = (& python -c 'import tempfile; print(tempfile.mkdtemp(prefix="dsh-sdk-blackbox-live-"))').Trim()
Remove-Item Env:PYTHONPATH -ErrorAction SilentlyContinue
Remove-Item Env:DSH_RUNTIME_MODE -ErrorAction SilentlyContinue
Push-Location $blackboxRoot
try {
& "${{ steps.smoke-venv-windows.outputs.python }}" "$env:GITHUB_WORKSPACE\scripts\smoke-python-runtime.py" --scenario sdk-live --installed-wheel
if ($LASTEXITCODE -ne 0) { throw "Installed-wheel live API smoke failed with exit code $LASTEXITCODE" }
} finally {
Pop-Location
}
- name: Check Linux GLIBC requirements
if: runner.os == 'Linux'
run: |
set -euo pipefail
readelf --version-info "${{ steps.runtime-posix.outputs.exe }}" | tee glibc-versions.txt
maximum="$(sed -n 's/.*Name: GLIBC_\([0-9.]*\).*/\1/p' glibc-versions.txt | sort -V | tail -1)"
[ -n "$maximum" ] || { echo "::error::No GLIBC requirements found"; exit 1; }
dpkg --compare-versions "$maximum" le 2.28 || {
echo "::error::Executable requires GLIBC_$maximum but wheel claims manylinux_2_28"
exit 1
}
- name: Check macOS payload architecture and deployment target
if: runner.os == 'macOS'
env:
EXE: ${{ steps.runtime-posix.outputs.exe }}
PLATFORM: ${{ steps.runtime-posix.outputs.platform }}
run: |
set -euo pipefail
case "$PLATFORM" in
macos-arm64) macho_arch=arm64 ;;
macos-x64) macho_arch=x86_64 ;;
*) echo "::error::Unsupported macOS platform $PLATFORM"; exit 1 ;;
esac
for payload in "$EXE" "$EXE-rg" "$EXE-spawn-helper"; do
lipo "$payload" -verify_arch "$macho_arch"
done
python3 scripts/check-macos-deployment-target.py \
--platform "$PLATFORM" "$EXE" "$EXE-rg" "$EXE-spawn-helper"
- name: Run wheel in a manylinux 2.28 container
if: runner.os == 'Linux'
env:
RUNNER_ARCH: ${{ runner.arch }}
RUNTIME_WHEEL: ${{ steps.runtime-posix.outputs.wheel }}
SDK_WHEEL: deepseek_harness_sdk-${{ needs.plan.outputs.version }}-py3-none-any.whl
run: |
set -euo pipefail
case "$RUNNER_ARCH" in
X64) image=quay.io/pypa/manylinux_2_28_x86_64 ;;
ARM64) image=quay.io/pypa/manylinux_2_28_aarch64 ;;
*) echo "::error::Unsupported Linux runner architecture $RUNNER_ARCH"; exit 1 ;;
esac
docker run --rm -e RUNTIME_WHEEL -e SDK_WHEEL -e DSH_TELEMETRY_DISABLED -v "$PWD:/work" -w /work "$image" bash -euxo pipefail -c '
/opt/python/cp310-cp310/bin/python -m venv /tmp/dsh-sdk
/tmp/dsh-sdk/bin/python -m pip install "/work/dist-python/$SDK_WHEEL" "/work/dist-python/$RUNTIME_WHEEL"
mkdir -p /tmp/dsh-sdk-manylinux-smoke
cd /tmp/dsh-sdk-manylinux-smoke
env -u PYTHONPATH -u DSH_RUNTIME_MODE /tmp/dsh-sdk/bin/python /work/scripts/smoke-python-runtime.py --scenario sdk-default --installed-wheel
env -u PYTHONPATH -u DSH_RUNTIME_MODE /tmp/dsh-sdk/bin/python /work/scripts/smoke-python-runtime.py --scenario sdk-mcp --installed-wheel
'
- uses: actions/upload-artifact@v7.0.1
with:
name: ${{ steps.runtime-posix.outputs.wheel || steps.runtime-windows.outputs.wheel }}
path: dist-python/${{ steps.runtime-posix.outputs.wheel || steps.runtime-windows.outputs.wheel }}
if-no-files-found: error
retention-days: 7
@@ -1,127 +0,0 @@
name: Build SSH helper
on:
workflow_call:
inputs:
targets:
description: Comma-separated native Node 24 targets; empty builds all four.
type: string
default: ''
release:
description: Retain a complete release build when another run starts.
type: boolean
default: false
workflow_dispatch:
inputs:
targets:
description: Linux/macOS x64/arm64 pkg targets; empty builds all four.
type: string
default: ''
permissions:
contents: read
concurrency:
group: ssh-helper-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !inputs.release }}
env:
DSH_TELEMETRY_DISABLED: '1'
jobs:
plan:
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
matrix: ${{ steps.targets.outputs.matrix }}
steps:
- name: Validate native targets
id: targets
env:
REQUESTED_TARGETS: ${{ inputs.targets }}
run: |
node --input-type=module <<'JS'
import { appendFileSync } from 'node:fs';
const runners = {
'node24-linux-x64': 'ubuntu-24.04',
'node24-linux-arm64': 'ubuntu-24.04-arm',
'node24-macos-arm64': 'macos-latest',
'node24-macos-x64': 'macos-15-intel',
};
const raw = process.env.REQUESTED_TARGETS;
const targets = raw ? raw.split(',').map(value => value.trim()) : Object.keys(runners);
if (new Set(targets).size !== targets.length || targets.some(target => !Object.hasOwn(runners, target))) throw new Error('Invalid or duplicate SSH helper target');
appendFileSync(process.env.GITHUB_OUTPUT, `matrix=${JSON.stringify(targets.map(target => ({target, runner: runners[target]})))}\n`);
JS
build:
needs: plan
name: ${{ matrix.target }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.plan.outputs.matrix) }}
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: pnpm/action-setup@v4
with:
dest: ${{ runner.temp }}/setup-pnpm-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
- uses: actions/cache@v4
with:
path: ~/.pkg-cache
key: ssh-pkg-${{ matrix.target }}-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: ssh-pkg-${{ matrix.target }}-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Prepare Linux compiler and sandbox
if: runner.os == 'Linux'
run: |
sudo apt-get update -q
sudo apt-get install -yq musl-tools bubblewrap
if sysctl kernel.apparmor_restrict_unprivileged_userns >/dev/null 2>&1; then
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
fi
bwrap --ro-bind / / --dev /dev --unshare-pid --proc /proc --die-with-parent -- true
- name: Build compatible Linux PTY addon
if: runner.os == 'Linux'
run: bash scripts/prepare-linux-node-pty.sh
- name: Build native release archive
env:
HELPER_TARGET: ${{ matrix.target }}
run: pnpm exec tsx scripts/build-exe-for-ssh-helper.ts --target="$HELPER_TARGET"
- name: Verify relocated executable and confinement
env:
HELPER_TARGET: ${{ matrix.target }}
run: |
archives=(dist-exe/ssh-helper/*.tar.gz)
test "${#archives[@]}" -eq 1
pnpm exec tsx scripts/verify-ssh-helper-artifact.ts --archive="${archives[0]}" --sandbox=required --report="dist-exe/ssh-helper/$HELPER_TARGET.json"
- name: Verify the packaged Landlock backend
if: runner.os == 'Linux'
env:
HELPER_TARGET: ${{ matrix.target }}
run: |
archives=(dist-exe/ssh-helper/*.tar.gz)
pnpm exec tsx scripts/verify-ssh-helper-artifact.ts --archive="${archives[0]}" --sandbox=required --backend=landlock-run --report="dist-exe/ssh-helper/$HELPER_TARGET.landlock.json"
- name: Verify OpenSSH on glibc 2.28 without Node
if: runner.os == 'Linux'
env:
HELPER_TARGET: ${{ matrix.target }}
run: |
archives=(dist-exe/ssh-helper/*.tar.gz)
test "${#archives[@]}" -eq 1
pnpm exec tsx scripts/verify-ssh-helper-ssh.ts --archive="${archives[0]}" --report="dist-exe/ssh-helper/$HELPER_TARGET.ssh.json"
- name: Upload verified archive and evidence
uses: actions/upload-artifact@v7
with:
name: ssh-helper-${{ matrix.target }}
path: dist-exe/ssh-helper/*
if-no-files-found: error
@@ -1,220 +0,0 @@
name: Build PR preview
# Every push to a pull request publishes that pull request's preview to
# Cloudflare Pages under its own branch alias, behind Cloudflare Access. The
# upload carries build products plus the snapshot diff page, which embeds
# committed `snapshots/` diff text: the workflow never grants the deployment
# platform access to this repository's sources. This lane also owns the
# aggregate test and script type checks that the required Linux consumers no
# longer repeat on every pull request.
on:
pull_request:
types: [opened, synchronize, reopened]
# Within one pull request the newest build wins. Across pull requests there is
# nothing to serialize: each uploads to its own branch alias, so two deployments
# never contend for the same URL.
concurrency:
group: build-preview-cloudflare-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
env:
PRIMARY_NODE_VERSION: '24'
# Cloudflare Pages project receiving the upload. Its preview deployments are
# the surface the Access application protects; the project's production branch
# is deliberately a name no deployment uses, so no unprotected URL exists.
CF_PROJECT: dsh-build-preview
# CI runs must never report to the production telemetry endpoint baked into
# apps/cli/cordis.yml (AppCLIEntry disables the row when set).
DSH_TELEMETRY_DISABLED: '1'
jobs:
preview:
# The required outcome is the build, which runs four TypeScript programs
# (Host and Client package compilation, then each face's aggregate test and
# script check) after the Typert pass. Publishing is best effort: transport,
# Access, and comment failures warn instead of failing the check.
runs-on: >-
${{ vars.DSH_CI_FAILOVER_LINUX == 'blacksmith' && 'blacksmith-4vcpu-ubuntu-2404'
|| 'ubuntu-24.04' }}
name: cloudflare pages preview
steps:
# The pull_request checkout is the merge commit; depth 2 brings its first
# parent, the base branch tip, for the snapshot diff page.
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
fetch-depth: 2
- uses: pnpm/action-setup@v5.0.0
with:
dest: ${{ runner.temp }}/setup-pnpm
- uses: actions/setup-node@v7.0.0
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
- name: Configure pnpm store path
id: pnpm-store
run: |
store_root="$HOME/.local/share/pnpm/store"
echo "PNPM_CONFIG_STORE_DIR=$store_root" >> "$GITHUB_ENV"
store_path=$(PNPM_CONFIG_STORE_DIR="$store_root" pnpm store path --silent)
echo "path=$store_path" >> "$GITHUB_OUTPUT"
# Read-only: the preview lane consumes the default-branch cache without
# putting cache upload on its own path.
- uses: actions/cache/restore@v6.1.0
with:
path: ${{ steps.pnpm-store.outputs.path }}
key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
- name: Install (immutable)
run: pnpm install --frozen-lockfile
# apps/web consumes workspace packages as built lib products, and
# build:preview packs the image through the packer's installed bin
# (lib/bin.js), so neither half exists before the artifact build runs.
# The required Linux consumers emit artifacts only; the complete build
# here also runs the aggregate test and script checks, which share the
# Typert output and the two package compilations.
- name: Build workspace and check aggregate programs
run: pnpm run build
- name: Build the preview page and pack the VFS image
env:
DSH_CLIENT_TITLE: DSH preview pr-${{ github.event.pull_request.number }}
run: pnpm --filter @deepseek-ai/dsh-web-frontend run build:preview
# Sourcemaps carry complete sources and stay off the deployment platform.
# index.html is the served page, which cannot boot without a host
# injecting window.__DSH_BOOT__; replacing it with the worker page makes
# the deployment root the usable entry instead of a page that never boots.
- name: Shape the upload
run: |
find apps/web/dist -name '*.map' -delete
cp apps/web/dist/preview.html apps/web/dist/index.html
# Reviewers read snapshot changes at /snapshot-diff/, which opens on the
# SDK blank-Session catalog (system prompt and tool schemas); the source
# chooser links to it. The page serves review only, so a failure warns
# like publication instead of failing the build.
- name: Render the snapshot diff page
id: snapshot-diff
continue-on-error: true
run: >-
pnpm exec tsx scripts/snapshot-diff-page.ts --base HEAD^1 --head HEAD
--out apps/web/dist/snapshot-diff
--preview-manifest apps/web/dist/preview/fixtures.json
- name: Upload to Cloudflare Pages
id: upload
continue-on-error: true
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: |
npx --yes wrangler@4 pages deploy apps/web/dist \
--project-name "$CF_PROJECT" \
--branch "pr-${{ github.event.pull_request.number }}" \
--commit-dirty=true
# The image is what a worker boot fails on first and least visibly, so the
# run only passes once the protected URL serves it as gzip bytes. Three
# facts are asserted, each with its own failure meaning:
# 200 Access admitted the request; a 302 means the
# Access policy is missing its Service Auth rule
# for this token
# no content-encoding the platform did not claim transport
# compression, which would make the browser
# decode the body and leave the worker's
# DecompressionStream inflating a plain tar
# gzip magic 1f 8b the bytes really are the gzip member the
# packer wrote
# Accept-Encoding is sent because a browser sends it; the assertion is
# about what the platform does with a body that is already compressed.
- name: Verify the protected deployment serves the image
id: verify
continue-on-error: true
env:
CF_ACCESS_CLIENT_ID: ${{ secrets.CF_ACCESS_CLIENT_ID }}
CF_ACCESS_CLIENT_SECRET: ${{ secrets.CF_ACCESS_CLIENT_SECRET }}
run: |
url="https://pr-${{ github.event.pull_request.number }}.${CF_PROJECT}.pages.dev"
image="$url/preview/vfs-image.tar.gz"
code=000
for attempt in 1 2 3 4 5; do
code=$(curl -sS -o image.bin -D headers.txt -w '%{http_code}' \
-H 'Accept-Encoding: gzip' \
-H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
-H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET" \
"$image" || echo 000)
echo "attempt $attempt: HTTP $code"
if [ "$code" = "200" ]; then break; fi
sleep 10
done
if [ "$code" != "200" ]; then
echo "the protected image URL answered $code, not 200"
head -20 headers.txt
exit 1
fi
if grep -qi '^content-encoding:' headers.txt; then
echo "the platform declared transport compression on an already-compressed image:"
grep -i '^content-encoding:' headers.txt
exit 1
fi
magic=$(head -c 2 image.bin | od -An -tx1 | tr -d ' \n')
if [ "$magic" != "1f8b" ]; then
echo "image does not start with the gzip magic number: $magic"
exit 1
fi
echo "image served as $(wc -c < image.bin) gzip bytes"
# The alias URL follows from the pull request number, so it is stable
# across redeploys and worth stating once. The marker makes the comment
# idempotent: a pull request opened before this workflow existed never
# sees an `opened` event, and every later push must not restate the URL;
# an existing comment with older text is edited in place.
- name: Comment the preview URL
id: comment
continue-on-error: true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR: ${{ github.event.pull_request.number }}
SNAPSHOT_DIFF: ${{ steps.snapshot-diff.outcome }}
run: |
marker='<!-- dsh-preview-url -->'
url="https://pr-$PR.${CF_PROJECT}.pages.dev"
links="[Preview for #$PR]($url)"
if [ "$SNAPSHOT_DIFF" = success ]; then links="$links · [snapshot changes]($url/snapshot-diff/)"; fi
# The marker sits on its own line: markdown renders no link on a
# line that opens with a raw HTML comment.
body=$(printf '%s\n\n%s\n' "$marker" "$links (requires Cloudflare Access sign-in)")
existing=$(gh api "repos/$GITHUB_REPOSITORY/issues/$PR/comments" --paginate \
--jq "[.[] | select(.user.login == \"github-actions[bot]\" and (.body | contains(\"$marker\")))] | first // empty | [.id, .body] | @json")
if [ -z "$existing" ]; then
printf '%s' "$body" | gh pr comment "$PR" --body-file -
elif [ "$(jq -r '.[1]' <<< "$existing")" != "$body" ]; then
gh api -X PATCH "repos/$GITHUB_REPOSITORY/issues/comments/$(jq -r '.[0]' <<< "$existing")" -f body="$body" > /dev/null
else
echo "preview URL already commented"
fi
# Publishing stays outside the required verdict: a snapshot diff page,
# Cloudflare, Access, or comment failure warns, while a build failure
# still fails this check.
- name: Report preview publication failures
if: >-
steps.snapshot-diff.outcome == 'failure' || steps.upload.outcome == 'failure'
|| steps.verify.outcome == 'failure' || steps.comment.outcome == 'failure'
run: |
message='preview publication failed; the build passed, see the snapshot diff, upload, verify, and comment steps'
echo "::warning::$message"
echo "$message" >> "$GITHUB_STEP_SUMMARY"
+1 -1
View File
@@ -26,7 +26,7 @@ permissions:
contents: read
env:
PRIMARY_NODE_VERSION: '24'
PRIMARY_NODE_VERSION: '^24.22.3'
# CI runs must never report to the production telemetry endpoint baked
# into apps/cli/cordis.yml (AppCLIEntry disables the row when set).
DSH_TELEMETRY_DISABLED: '1'
+2 -2
View File
@@ -12,7 +12,7 @@ permissions:
contents: read
env:
PRIMARY_NODE_VERSION: '24'
PRIMARY_NODE_VERSION: '^24.22.3'
# CI runs must never report to the production telemetry endpoint baked
# into apps/cli/cordis.yml (AppCLIEntry disables the row when set).
DSH_TELEMETRY_DISABLED: '1'
@@ -40,7 +40,7 @@ jobs:
- uses: actions/setup-node@v7.0.0
with:
node-version: 24
node-version: '^24.22.3'
- name: Test production blame scoring
run: uv run --python 3.10 --with-requirements .github/review-ownership/requirements.txt python -m unittest discover -s .github/review-ownership -p 'test_*.py'
+2 -2
View File
@@ -12,7 +12,7 @@ permissions:
contents: read
env:
PRIMARY_NODE_VERSION: '24'
PRIMARY_NODE_VERSION: '^24.22.3'
# CI runs must never report to the production telemetry endpoint baked
# into apps/cli/cordis.yml (AppCLIEntry disables the row when set).
DSH_TELEMETRY_DISABLED: '1'
@@ -41,7 +41,7 @@ jobs:
path: publisher-isolated
- uses: actions/setup-node@v7.0.0
with:
node-version: '24'
node-version: '^24.22.3'
- name: Check preflights before dependency installation
working-directory: publisher-isolated
run: node apps/desktop-publisher/tests/preinstall.mjs
+9 -6
View File
@@ -6,7 +6,7 @@ permissions:
contents: read
env:
PRIMARY_NODE_VERSION: '24'
PRIMARY_NODE_VERSION: '^24.22.3'
# CI runs must never report to the production telemetry endpoint baked
# into apps/cli/cordis.yml (AppCLIEntry disables the row when set).
DSH_TELEMETRY_DISABLED: '1'
@@ -40,7 +40,7 @@ jobs:
path: publisher-isolated
- uses: actions/setup-node@v7.0.0
with:
node-version: '24'
node-version: '^24.22.3'
- name: Check preflights before dependency installation
working-directory: publisher-isolated
run: node apps/desktop-publisher/tests/preinstall.mjs
@@ -1015,6 +1015,7 @@ jobs:
env:
DSH_GATE_CONCURRENCY: ${{ matrix.gate_concurrency }}
DSH_NODE_COMPAT_SKIP_TYPECHECK: '1'
DSH_NODE_COMPAT_BUILD: ${{ matrix.build }}
# A failed smoke aborts the remaining compatibility gates instead of
# letting the build-backed legs run against an already-red aggregate.
DSH_GATE_FAIL_FAST: '1'
@@ -1023,16 +1024,18 @@ jobs:
max-parallel: 1
matrix:
include:
# Pin the supported floor, whose internal loader is v1. Primary
# jobs track latest 24 and exercise v2, introduced in 24.12.0.
- node: '24.9'
name: node 24.9
# Pin the supported floor. Primary jobs track latest 24, which can be
# this same release, so only this leg requests the build-backed gates.
- node: '24.22.3'
name: node 24.22.3
runner: ubuntu-latest
gate_concurrency: '1'
build: '1'
- node: 26
name: node 26
runner: ubuntu-latest
gate_concurrency: '1'
build: ''
steps:
- uses: actions/checkout@v7.0.1
with:
@@ -1,109 +0,0 @@
name: Package CUA helper · macOS · arm64 + x64
on:
workflow_dispatch:
inputs:
preset:
description: '机器上的签名配置'
type: choice
options: [test, production]
default: test
required: true
workflow_call:
inputs:
reuse:
type: boolean
default: false
cua_macos_run_id:
type: string
default: ''
preset:
type: string
default: production
outputs:
artifact-id:
description: '包含两个架构的已签名、公证 helper 的产物编号'
value: ${{ jobs.package.outputs.artifact-id }}
run-id:
description: '产物所属的构建运行编号'
value: ${{ jobs.package.outputs.run-id }}
build-key:
description: '源码和构建配置的摘要'
value: ${{ jobs.package.outputs.build-key }}
permissions:
contents: read
actions: read
# Desktop uses the same keychain search list and optional system proxy transaction.
concurrency:
group: macos-desktop-package
cancel-in-progress: false
jobs:
package:
runs-on: [self-hosted, macOS, ARM64, dsh-mac-package-trial]
timeout-minutes: 60
outputs:
artifact-id: ${{ steps.retained.outputs.artifact-id || steps.upload.outputs.artifact-id }}
run-id: ${{ steps.retained.outputs.run-id || github.run_id }}
build-key: ${{ steps.build-inputs.outputs.build-key }}
env:
DSH_PACKAGING_PRESET: ${{ inputs.preset }}
DSH_TELEMETRY_DISABLED: '1'
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
clean: true
- name: Validate run ref and preset
run: |
node -e 'const fs=require("node:fs"); const ref=process.env.GITHUB_REF;
if(!ref || (!ref.startsWith("refs/heads/") && !ref.startsWith("refs/tags/"))) throw Error("Select a trusted repository branch or release tag");
const tag=ref.replace(/^refs\/tags\//, "");
if(tag.startsWith("dsh-v") && tag!=="dsh-v"+JSON.parse(fs.readFileSync("package.json","utf8")).version) throw Error("Release tag must match product version");
if(!["test","production"].includes(process.env.DSH_PACKAGING_PRESET)) throw Error("Invalid preset");'
- uses: actions/setup-node@v7.0.0
with:
node-version: '24'
package-manager-cache: false
- name: Record CUA helper build inputs
id: build-inputs
run: node scripts/cua-helper/build-inputs.ts
- name: Find reusable CUA helper
if: inputs.reuse
id: retained
env:
GH_TOKEN: ${{ github.token }}
CUA_MACOS_RUN_ID: ${{ inputs.cua_macos_run_id }}
CUA_BUILD_KEY: ${{ steps.build-inputs.outputs.build-key }}
run: node scripts/cua-helper/select-artifact.ts
- uses: pnpm/action-setup@v5.0.0
if: steps.retained.outputs.artifact-id == ''
with:
dest: ${{ runner.temp }}/setup-pnpm-cua-${{ github.run_id }}-${{ github.run_attempt }}
- name: Install locked dependencies
if: steps.retained.outputs.artifact-id == ''
run: pnpm install --frozen-lockfile --ignore-scripts --ignore-pnpmfile
- name: Build and verify notarized applications
if: steps.retained.outputs.artifact-id == ''
env:
CUA_EXPECTED_BUILD_KEY: ${{ steps.build-inputs.outputs.build-key }}
run: |
mkdir -p dist
node --import tsx/esm scripts/cua-helper/package.ts --out dist/cua-helper
- uses: actions/upload-artifact@v7.0.1
if: steps.retained.outputs.artifact-id == ''
id: upload
with:
name: cua-helper-macos-${{ github.run_id }}-${{ github.run_attempt }}-${{ steps.build-inputs.outputs.build-key }}
path: dist/cua-helper/*
if-no-files-found: error
compression-level: 0
retention-days: 14
- name: Record newly built artifact
if: steps.retained.outputs.artifact-id == ''
env:
CUA_ARTIFACT_ID: ${{ steps.upload.outputs.artifact-id }}
run: |
printf '已构建 CUA helper,run ID `%s`,artifact ID `%s`。\n' "$GITHUB_RUN_ID" "$CUA_ARTIFACT_ID" >> "$GITHUB_STEP_SUMMARY"
@@ -1,107 +0,0 @@
name: Package CUA helper · Windows · x64
on:
workflow_dispatch:
workflow_call:
outputs:
artifact-id:
description: '包含 win-x64 helper ZIP 的产物编号'
value: ${{ jobs.package.outputs.artifact-id }}
run-id:
description: '产物所属的构建运行编号'
value: ${{ jobs.package.outputs.run-id }}
build-key:
description: '提交 SHA、.NET SDK 版本和 win-x64 RID 的 SHA-256 摘要'
value: ${{ jobs.package.outputs.build-key }}
permissions:
contents: read
jobs:
package:
runs-on: windows-latest
timeout-minutes: 30
defaults:
run:
shell: pwsh
outputs:
artifact-id: ${{ steps.upload.outputs.artifact-id }}
run-id: ${{ github.run_id }}
build-key: ${{ steps.metadata.outputs.build-key }}
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: actions/setup-dotnet@v5.4.0
with:
dotnet-version: '10.0.x'
- name: Restore locked Windows helper and run protocol checks
run: |
dotnet restore packages/experimental/cua-windows/native/cua-windows.slnx --locked-mode
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
dotnet run --project packages/experimental/cua-windows/native/tests/Protocol.Tests.csproj --configuration Release --no-restore
- name: Publish Windows CUA helper
run: >-
dotnet publish packages/experimental/cua-windows/native/entry/CuaWindows.csproj
--configuration Release
--runtime win-x64
--self-contained true
--no-restore
--output dist/cua-helper-win-x64
# Standalone helper zip contract: flat root with cua-helper.json,
# dsh-cua-windows.exe, and its runtime files. Installed providers place
# the same payload under native/bin/win-x64.
- name: Add helper metadata
id: metadata
env:
GITHUB_SHA: ${{ github.sha }}
run: |
$ErrorActionPreference = 'Stop'
$directory = 'dist/cua-helper-win-x64'
$exe = Join-Path $directory 'dsh-cua-windows.exe'
if (-not (Test-Path $exe -PathType Leaf)) { throw "helper executable is missing: $exe" }
$version = (Get-Content package.json -Raw | ConvertFrom-Json).version
$commit = $env:GITHUB_SHA
$sdk = (& dotnet --version).Trim()
$keyBytes = [Text.Encoding]::UTF8.GetBytes("$commit`n$sdk`nwin-x64")
$buildKey = [Convert]::ToHexString([Security.Cryptography.SHA256]::HashData($keyBytes)).ToLowerInvariant()
$files = [ordered]@{}
Get-ChildItem $directory -Recurse -File | Sort-Object FullName | ForEach-Object {
$relative = [IO.Path]::GetRelativePath($directory, $_.FullName) -replace '\\', '/'
$files[$relative] = (Get-FileHash $_.FullName -Algorithm SHA256).Hash.ToLowerInvariant()
}
# sha256 is the executable alias of files[dsh-cua-windows.exe].
# signing is an enum: unsigned or authenticode.
$metadata = [ordered]@{
schemaVersion = 1
platform = 'windows'
buildKey = $buildKey
version = $version
commit = $commit
architecture = 'x64'
executable = 'dsh-cua-windows.exe'
sha256 = $files['dsh-cua-windows.exe']
signing = 'unsigned'
files = $files
}
$json = $metadata | ConvertTo-Json -Depth 5
Set-Content -Path (Join-Path $directory 'cua-helper.json') -Value "$json`n" -NoNewline -Encoding utf8NoBOM
Add-Content -Path $env:GITHUB_OUTPUT -Value "build-key=$buildKey`n" -NoNewline -Encoding utf8
- name: Archive publish output
run: |
$zipPath = 'dist/cua-helper-win-x64.zip'
Compress-Archive -Path dist/cua-helper-win-x64/* -DestinationPath $zipPath
$zip = [IO.Compression.ZipFile]::OpenRead((Resolve-Path $zipPath).Path)
try {
foreach ($name in 'dsh-cua-windows.exe', 'cua-helper.json') {
if (-not $zip.GetEntry($name)) { throw "Missing root entry in helper ZIP: $name" }
}
} finally { $zip.Dispose() }
- uses: actions/upload-artifact@v7.0.1
id: upload
with:
name: cua-helper-windows-${{ github.run_id }}-${{ github.run_attempt }}-${{ steps.metadata.outputs.build-key }}
path: dist/cua-helper-win-x64.zip
if-no-files-found: error
compression-level: 0
retention-days: 14
-264
View File
@@ -1,264 +0,0 @@
name: Publish Desktop · COS
run-name: Publish Desktop package ${{ inputs.package_run_id }} / attempt ${{ inputs.package_run_attempt || 'latest' }}
on:
workflow_dispatch:
inputs:
package_run_id:
description: '打包运行 ID:填写成功的 Package Desktop run ID;发布环境和 release ID 沿用原包'
type: string
required: true
staging_percentage:
description: '更新灰度比例:0–100 整数,默认 100;留空沿用包内值,作用于原包所属渠道'
type: string
required: false
default: '100'
upload_website:
description: '同时上传官网安装包并刷新缓存(仅 production);取消后仅执行版本与自动更新发布'
type: boolean
default: true
required: true
package_run_attempt:
description: '打包尝试次数:留空选择最新一次,且必须成功;失败时不会回退到旧包'
type: string
required: false
default: ''
permissions:
contents: read
actions: read
jobs:
route:
runs-on: ubuntu-latest
outputs:
selection: ${{ steps.route.outputs.selection }}
runner: ${{ steps.route.outputs.runner }}
steps:
- name: Require master for publication
run: node -e "if (process.env.GITHUB_REF !== 'refs/heads/master') throw new Error('Desktop publication must be dispatched from master')"
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- name: Reject debugging packages before dependency installation
id: preflight
env:
GH_TOKEN: ${{ github.token }}
run: node apps/desktop-publisher/src/preflight-desktop-publish.mjs
- uses: pnpm/action-setup@v5.0.0
- uses: actions/setup-node@v7.0.0
with:
node-version: '24'
- run: pnpm install --frozen-lockfile
- name: Resolve original package and machine
id: route
env:
GH_TOKEN: ${{ github.token }}
DESKTOP_PUBLISH_RUNNERS: ${{ vars.DESKTOP_PUBLISH_RUNNERS }}
DESKTOP_PACKAGE_ATTEMPT: ${{ steps.preflight.outputs.attempt }}
run: node --import tsx apps/desktop-publisher/src/resolve-desktop-publish-ci.ts
prepare:
needs: route
runs-on: [self-hosted, '${{ needs.route.outputs.runner }}']
timeout-minutes: 30
outputs:
route: ${{ steps.local.outputs.route }}
preset: ${{ steps.local.outputs.preset }}
approval: ${{ steps.check.outputs.approval }}
website-approval: ${{ steps.check.outputs.website-approval }}
website-destination: ${{ steps.check.outputs.website-destination }}
label: ${{ steps.check.outputs.label }}
env:
DESKTOP_STAGING_PERCENTAGE: ${{ inputs.staging_percentage }}
DESKTOP_PACKAGE_SELECTION: ${{ needs.route.outputs.selection }}
DESKTOP_UPLOAD_WEBSITE: ${{ inputs.upload_website }}
DSH_TELEMETRY_DISABLED: '1'
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
clean: false
path: desktop-publisher
- uses: pnpm/action-setup@v5.0.0
with:
package_json_file: desktop-publisher/package.json
dest: ${{ runner.temp }}/publish-pnpm-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v7.0.0
with:
node-version: '24'
- name: Check local publication configuration before dependency installation
working-directory: desktop-publisher
run: node apps/desktop-publisher/src/preflight-desktop-publish-local.mjs
- run: pnpm install --frozen-lockfile
working-directory: desktop-publisher
- name: Resolve retained package and approval environment
id: local
working-directory: desktop-publisher
env:
GH_TOKEN: ${{ github.token }}
run: node --import tsx apps/desktop-publisher/src/resolve-retained-desktop-publish-ci.ts
- name: Verify local package without upload credentials
id: check
working-directory: desktop-publisher
env:
DESKTOP_PUBLISH_ROUTE: ${{ steps.local.outputs.route }}
run: node --import tsx apps/desktop/scripts/publish-desktop-ci.ts --check
publish:
name: Approve ${{ needs.prepare.outputs.label }}
needs: [route, prepare]
runs-on: [self-hosted, '${{ needs.route.outputs.runner }}']
environment: ${{ needs.prepare.outputs.preset == 'production' && 'desktop-production' || 'desktop-test' }}
concurrency:
group: desktop-publish-${{ needs.route.outputs.runner }}-${{ needs.prepare.outputs.preset }}
cancel-in-progress: false
timeout-minutes: 90
env:
DESKTOP_STAGING_PERCENTAGE: ${{ inputs.staging_percentage }}
DESKTOP_APPROVED_PACKAGE: ${{ needs.prepare.outputs.approval }}
DESKTOP_PUBLISH_ROUTE: ${{ needs.prepare.outputs.route }}
DSH_TELEMETRY_DISABLED: '1'
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
clean: false
path: desktop-publisher
- uses: pnpm/action-setup@v5.0.0
with:
package_json_file: desktop-publisher/package.json
dest: ${{ runner.temp }}/publish-pnpm-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v7.0.0
with:
node-version: '24'
- name: Check local publication configuration before dependency installation
working-directory: desktop-publisher
run: node apps/desktop-publisher/src/preflight-desktop-publish-local.mjs
- run: pnpm install --frozen-lockfile
working-directory: desktop-publisher
- name: Verify local package without upload credentials
id: check
working-directory: desktop-publisher
run: node --import tsx apps/desktop/scripts/publish-desktop-ci.ts --check
- name: Read machine GitHub App key
if: needs.prepare.outputs.preset == 'production'
id: key
env:
APP_KEY_FILE: ${{ steps.check.outputs.app-key-file }}
working-directory: desktop-publisher
run: node apps/desktop/scripts/read-desktop-app-key.mjs
- name: Create short-lived tag token
if: needs.prepare.outputs.preset == 'production'
id: app
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1
with:
client-id: ${{ steps.check.outputs.app-client-id }}
private-key: ${{ steps.key.outputs.private-key }}
owner: ${{ github.repository_owner }}
repositories: ${{ github.event.repository.name }}
permission-contents: write
- name: Publish files, update feeds and record release tag
id: publish
working-directory: desktop-publisher
env:
DESKTOP_TAG_TOKEN: ${{ steps.app.outputs.token }}
run: node --import tsx apps/desktop/scripts/publish-desktop-ci.ts --publish
- name: Retain publication audit
continue-on-error: true
if: always() && steps.publish.outputs.record != ''
uses: actions/upload-artifact@v7.0.1
with:
name: desktop-publication-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ steps.publish.outputs.record }}/
if-no-files-found: error
retention-days: 30
upload-website-installer:
needs: [route, prepare, publish]
if: inputs.upload_website && needs.prepare.outputs.preset != 'test'
runs-on: [self-hosted, '${{ needs.route.outputs.runner }}']
environment: desktop-production
timeout-minutes: 60
concurrency:
group: desktop-website-upload-${{ needs.prepare.outputs.website-destination }}
cancel-in-progress: false
env:
DESKTOP_PUBLISH_ROUTE: ${{ needs.prepare.outputs.route }}
DESKTOP_WEBSITE_APPROVAL: ${{ needs.prepare.outputs.website-approval }}
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
clean: false
path: website-publisher
- uses: pnpm/action-setup@v5.0.0
with:
package_json_file: website-publisher/package.json
dest: ${{ runner.temp }}/website-pnpm-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v7.0.0
with:
node-version: '24'
- name: Check local publication configuration
working-directory: website-publisher
run: node apps/desktop-publisher/src/preflight-desktop-publish-local.mjs
- run: pnpm install --frozen-lockfile
working-directory: website-publisher
- name: Upload website installer
id: website
working-directory: website-publisher
run: node --import tsx apps/desktop-publisher/src/publish-website-ci.ts upload
- name: Archive website publication diagnostics
if: always() && steps.website.outputs.record != ''
continue-on-error: true
uses: actions/upload-artifact@v7.0.1
with:
name: website-upload-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ steps.website.outputs.record }}/
if-no-files-found: warn
retention-days: 30
purge-website-installer:
needs: [route, prepare, upload-website-installer]
if: inputs.upload_website && needs.prepare.outputs.preset != 'test'
runs-on: [self-hosted, '${{ needs.route.outputs.runner }}']
environment: desktop-production
timeout-minutes: 60
concurrency:
group: desktop-website-purge-${{ needs.prepare.outputs.website-destination }}
cancel-in-progress: false
env:
DESKTOP_PUBLISH_ROUTE: ${{ needs.prepare.outputs.route }}
DESKTOP_WEBSITE_APPROVAL: ${{ needs.prepare.outputs.website-approval }}
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
clean: false
path: website-publisher
- uses: pnpm/action-setup@v5.0.0
with:
package_json_file: website-publisher/package.json
dest: ${{ runner.temp }}/website-pnpm-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v7.0.0
with:
node-version: '24'
- name: Check local publication configuration
working-directory: website-publisher
run: node apps/desktop-publisher/src/preflight-desktop-publish-local.mjs
- run: pnpm install --frozen-lockfile
working-directory: website-publisher
- name: Recover and observe website cache purge
id: website
working-directory: website-publisher
run: node --import tsx apps/desktop-publisher/src/publish-website-ci.ts purge
- name: Archive website publication diagnostics
if: always() && steps.website.outputs.record != ''
continue-on-error: true
uses: actions/upload-artifact@v7.0.1
with:
name: website-purge-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ steps.website.outputs.record }}/
if-no-files-found: warn
retention-days: 30
-262
View File
@@ -1,262 +0,0 @@
name: Publish Desktop · Rollout & Website
run-name: Rollout Desktop package ${{ inputs.package_run_id }} / attempt ${{ inputs.package_run_attempt }} · ${{ inputs.rollout_percentage && format('{0}%', inputs.rollout_percentage) || 'website only' }}
on:
workflow_dispatch:
inputs:
package_run_id:
description: '已经完成首次 COS 发布的 Package Desktop run ID'
type: string
required: true
rollout_percentage:
description: '目标放量比例:0–100 整数,只允许保持或增加;留空只发布官网'
type: string
required: false
default: ''
upload_website:
description: '上传已发布版本的官网安装包并刷新缓存(仅 production,不要求放量达到 100%)'
type: boolean
default: false
required: true
package_run_attempt:
description: '已发布的原打包 attempt;默认 1,请核对原 run'
type: string
required: true
default: '1'
permissions:
contents: read
actions: read
jobs:
route:
runs-on: ubuntu-latest
outputs:
selection: ${{ steps.route.outputs.selection }}
runner: ${{ steps.route.outputs.runner }}
steps:
- name: Require master for publication
run: node -e "if (process.env.GITHUB_REF !== 'refs/heads/master') throw new Error('Desktop publication must be dispatched from master')"
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- name: Reject debugging packages before dependency installation
id: preflight
env:
GH_TOKEN: ${{ github.token }}
run: node apps/desktop-publisher/src/preflight-desktop-publish.mjs
- uses: pnpm/action-setup@v5.0.0
- uses: actions/setup-node@v7.0.0
with:
node-version: '24'
- run: pnpm --filter @deepseek-ai/dsh-desktop-publisher --fail-if-no-match install --prod --frozen-lockfile --ignore-scripts
- name: Resolve original package and machine
id: route
env:
GH_TOKEN: ${{ github.token }}
DESKTOP_PUBLISH_RUNNERS: ${{ vars.DESKTOP_PUBLISH_RUNNERS }}
DESKTOP_PACKAGE_ATTEMPT: ${{ steps.preflight.outputs.attempt }}
working-directory: apps/desktop-publisher
run: node --import tsx src/resolve-desktop-publish-ci.ts
prepare:
needs: route
runs-on: [self-hosted, '${{ needs.route.outputs.runner }}']
timeout-minutes: 30
outputs:
route: ${{ steps.local.outputs.route }}
preset: ${{ steps.local.outputs.preset }}
rollout-requested: ${{ steps.check.outputs.rollout-requested }}
approval: ${{ steps.check.outputs.approval }}
website-approval: ${{ steps.check.outputs.website-approval }}
website-destination: ${{ steps.check.outputs.website-destination }}
label: ${{ steps.check.outputs.label }}
env:
DESKTOP_ROLLOUT_PERCENTAGE: ${{ inputs.rollout_percentage }}
DESKTOP_PACKAGE_SELECTION: ${{ needs.route.outputs.selection }}
DESKTOP_UPLOAD_WEBSITE: ${{ inputs.upload_website }}
DSH_TELEMETRY_DISABLED: '1'
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
clean: false
path: desktop-rollout
- uses: pnpm/action-setup@v5.0.0
with:
package_json_file: desktop-rollout/package.json
dest: ${{ runner.temp }}/publish-pnpm-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v7.0.0
with:
node-version: '24'
- name: Check local publication configuration before dependency installation
working-directory: desktop-rollout
run: node apps/desktop-publisher/src/preflight-desktop-publish-local.mjs
- run: pnpm --filter @deepseek-ai/dsh-desktop-publisher --fail-if-no-match install --prod --frozen-lockfile --ignore-scripts
working-directory: desktop-rollout
- name: Resolve retained package and approval environment
id: local
working-directory: desktop-rollout/apps/desktop-publisher
env:
GH_TOKEN: ${{ github.token }}
run: node --import tsx src/publish-desktop-rollout-ci.ts route
- name: Verify initial publication and metadata without upload credentials
id: check
working-directory: desktop-rollout/apps/desktop-publisher
env:
DESKTOP_PUBLISH_ROUTE: ${{ steps.local.outputs.route }}
run: node --import tsx src/publish-desktop-rollout-ci.ts check
publish:
name: Approve ${{ needs.prepare.outputs.label }}
needs: [route, prepare]
if: needs.prepare.outputs.rollout-requested == 'true'
runs-on: [self-hosted, '${{ needs.route.outputs.runner }}']
environment: ${{ needs.prepare.outputs.preset == 'production' && 'desktop-production' || 'desktop-test' }}
concurrency:
group: desktop-publish-${{ needs.route.outputs.runner }}-${{ needs.prepare.outputs.preset }}
cancel-in-progress: false
timeout-minutes: 90
env:
DESKTOP_ROLLOUT_PERCENTAGE: ${{ inputs.rollout_percentage }}
DESKTOP_ROLLOUT_APPROVAL: ${{ needs.prepare.outputs.approval }}
DESKTOP_UPLOAD_WEBSITE: ${{ inputs.upload_website }}
DESKTOP_PUBLISH_ROUTE: ${{ needs.prepare.outputs.route }}
DSH_TELEMETRY_DISABLED: '1'
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
clean: false
path: desktop-rollout
- uses: pnpm/action-setup@v5.0.0
with:
package_json_file: desktop-rollout/package.json
dest: ${{ runner.temp }}/publish-pnpm-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v7.0.0
with:
node-version: '24'
- name: Check local publication configuration before dependency installation
working-directory: desktop-rollout
run: node apps/desktop-publisher/src/preflight-desktop-publish-local.mjs
- run: pnpm --filter @deepseek-ai/dsh-desktop-publisher --fail-if-no-match install --prod --frozen-lockfile --ignore-scripts
working-directory: desktop-rollout
- name: Verify initial publication and metadata without upload credentials
id: check
working-directory: desktop-rollout/apps/desktop-publisher
run: node --import tsx src/publish-desktop-rollout-ci.ts check
- name: Apply rollout to the published feed
id: publish
working-directory: desktop-rollout/apps/desktop-publisher
run: node --import tsx src/publish-desktop-rollout-ci.ts apply
- name: Retain publication audit
continue-on-error: true
if: always() && steps.publish.outputs.record != ''
uses: actions/upload-artifact@v7.0.1
with:
name: desktop-publication-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ steps.publish.outputs.record }}/
if-no-files-found: error
retention-days: 30
upload-website-installer:
name: Website ${{ needs.prepare.outputs.label }}
needs: [route, prepare, publish]
if: ${{ !cancelled() && inputs.upload_website && needs.prepare.result == 'success' && needs.prepare.outputs.preset != 'test' && (needs.publish.result == 'success' || (needs.publish.result == 'skipped' && needs.prepare.outputs.rollout-requested == 'false')) }}
runs-on: [self-hosted, '${{ needs.route.outputs.runner }}']
environment: desktop-production
timeout-minutes: 60
concurrency:
group: desktop-website-upload-${{ needs.prepare.outputs.website-destination }}
cancel-in-progress: false
env:
DESKTOP_PUBLISH_ROUTE: ${{ needs.prepare.outputs.route }}
DESKTOP_WEBSITE_APPROVAL: ${{ needs.prepare.outputs.website-approval }}
DESKTOP_ROLLOUT_APPROVAL: ${{ needs.prepare.outputs.approval }}
DESKTOP_ROLLOUT_PERCENTAGE: ${{ inputs.rollout_percentage }}
DESKTOP_UPLOAD_WEBSITE: ${{ inputs.upload_website }}
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
clean: false
path: website-rollout
- uses: pnpm/action-setup@v5.0.0
with:
package_json_file: website-rollout/package.json
dest: ${{ runner.temp }}/website-pnpm-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v7.0.0
with:
node-version: '24'
- name: Check local publication configuration
working-directory: website-rollout
run: node apps/desktop-publisher/src/preflight-desktop-publish-local.mjs
- run: pnpm --filter @deepseek-ai/dsh-desktop-publisher --fail-if-no-match install --prod --frozen-lockfile --ignore-scripts
working-directory: website-rollout
- name: Upload website installer
id: website
working-directory: website-rollout/apps/desktop-publisher
run: node --import tsx src/publish-desktop-rollout-ci.ts website-upload
- name: Archive website feed verification
if: always() && steps.website.outputs.rollout-record != ''
continue-on-error: true
uses: actions/upload-artifact@v7.0.1
with:
name: website-feed-verification-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ steps.website.outputs.rollout-record }}/
if-no-files-found: warn
retention-days: 30
- name: Archive website publication diagnostics
if: always() && steps.website.outputs.record != ''
continue-on-error: true
uses: actions/upload-artifact@v7.0.1
with:
name: website-upload-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ steps.website.outputs.record }}/
if-no-files-found: warn
retention-days: 30
purge-website-installer:
needs: [route, prepare, upload-website-installer]
if: ${{ !cancelled() && inputs.upload_website && needs.prepare.outputs.preset != 'test' && needs.upload-website-installer.result == 'success' }}
runs-on: [self-hosted, '${{ needs.route.outputs.runner }}']
timeout-minutes: 60
concurrency:
group: desktop-website-purge-${{ needs.prepare.outputs.website-destination }}
cancel-in-progress: false
env:
DESKTOP_PUBLISH_ROUTE: ${{ needs.prepare.outputs.route }}
DESKTOP_WEBSITE_APPROVAL: ${{ needs.prepare.outputs.website-approval }}
DESKTOP_UPLOAD_WEBSITE: ${{ inputs.upload_website }}
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
clean: false
path: website-rollout
- uses: pnpm/action-setup@v5.0.0
with:
package_json_file: website-rollout/package.json
dest: ${{ runner.temp }}/website-pnpm-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v7.0.0
with:
node-version: '24'
- name: Check local publication configuration
working-directory: website-rollout
run: node apps/desktop-publisher/src/preflight-desktop-publish-local.mjs
- run: pnpm --filter @deepseek-ai/dsh-desktop-publisher --fail-if-no-match install --prod --frozen-lockfile --ignore-scripts
working-directory: website-rollout
- name: Recover and observe website cache purge
id: website
working-directory: website-rollout/apps/desktop-publisher
run: node --import tsx src/publish-desktop-rollout-ci.ts website-purge
- name: Archive website publication diagnostics
if: always() && steps.website.outputs.record != ''
continue-on-error: true
uses: actions/upload-artifact@v7.0.1
with:
name: website-purge-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ steps.website.outputs.record }}/
if-no-files-found: warn
retention-days: 30
-93
View File
@@ -1,93 +0,0 @@
# Publish the documentation website to GitHub Pages. This workflow is manual-only
# (workflow_dispatch) and intentionally does not listen to pull_request or push:
# the site presents a released snapshot, so publication is an explicit act from a
# dsh-v* tag and must never appear as a PR check. `release:verify` rejects every
# other ref, and the github-pages environment repeats that restriction as a
# deployment tag policy with required reviewers.
#
# The build signal does not depend on this workflow. Every pull request builds
# the production site through `check:ci:static`, and ci-master.yml builds it
# again on master.
name: Deploy documentation
on:
workflow_dispatch:
concurrency:
group: github-pages
cancel-in-progress: false
permissions:
contents: read
env:
PRIMARY_NODE_VERSION: '24'
# Projected source links target the public repository, whose history can
# differ from this workflow's source repository. This stays on master rather
# than following the dispatched tag: that repository advances only to each
# release commit, so its master never carries unreleased work, and it retains
# only the most recent tags — following the tag would leave every projected
# source link on an older deploy unresolvable.
DOCS_REPOSITORY_REF: master
# CI runs must never report to the production telemetry endpoint baked
# into apps/cli/cordis.yml (AppCLIEntry disables the row when set).
DSH_TELEMETRY_DISABLED: '1'
jobs:
build:
runs-on: blacksmith-8vcpu-ubuntu-2404
permissions:
contents: read
pages: read
steps:
# Complete history: the release scripts read tags.
- uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- uses: pnpm/action-setup@v5.0.0
- uses: actions/setup-node@v7.0.0
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
cache: pnpm
- name: Install (immutable)
run: pnpm install --frozen-lockfile
# One definition of "released" for the site and the npm sequence: this
# rejects every ref that is not a dsh-v* tag naming the version this tree
# carries.
- name: Verify release version
env:
RELEASE_PUBLISH: 'true'
run: pnpm run release:verify --family dsh
- name: Configure Pages
id: pages
uses: actions/configure-pages@v6
- name: Verify and build documentation
env:
DOCS_BASE: ${{ steps.pages.outputs.base_path }}/
run: pnpm run doc-sync
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v5
with:
path: website/.dist
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
+1 -1
View File
@@ -73,7 +73,7 @@ jobs:
- uses: actions/setup-node@v7.0.0
with:
node-version: 24
node-version: '^24.22.3'
cache: pnpm
- name: Install (immutable)
-247
View File
@@ -1,247 +0,0 @@
name: Package Desktop · macOS · Intel
on:
workflow_dispatch:
inputs:
source_ref:
description: '打包源码:test 支持仓库内分支或 dsh-v* tag;production 仅支持 master 或 dsh-v* tag;源码须包含 CI 适配脚本'
type: string
default: master
required: true
preset:
description: '打包环境:选择机器上的 test 或 production 配置;同时决定后续发布环境'
type: choice
options: [test, production]
default: test
required: true
update_channel:
description: '升级通道:人工选择 nightly 或 stable,与版本后缀无关;默认通道由此打包输入确定'
type: choice
options: [nightly, stable]
default: nightly
required: true
version_mode:
description: '版本模式:default 按环境自动选择(test 取 build-number,production 取 follow-dsh);follow-dsh 跟随 dsh 包版本号;build-number 自动追加构建编号;manual 手填'
type: choice
options: [default, follow-dsh, build-number, manual]
default: default
required: true
build_version:
description: '手动版本号:仅 manual 时填写完整版本;须为产品原版本或受支持的预发布后缀'
type: string
default: ''
required: false
test_release_id:
description: '测试 release ID:32 位小写十六进制随机前缀(非鉴权);留空使用机器默认值,连续升级测试须保持相同值'
type: string
default: ''
required: false
compression_level:
description: 'ZIP 压缩等级:只影响 ZIP 和自动升级下载,不影响 DMG;3 打包较快,7 压缩更强'
type: choice
options: ['3', '7']
default: '3'
required: true
skip_notarization:
description: '跳过公证和 stapling:仅限内部调试,禁止发布到 test / production 或用于自动更新;需要发布请勿勾选'
type: boolean
default: false
required: true
permissions:
contents: read
concurrency:
group: macos-desktop-package
cancel-in-progress: false
jobs:
package:
outputs:
directory: ${{ steps.retained.outputs.directory }}
runner: ${{ steps.retained.outputs.runner }}
runner-name: ${{ steps.retained.outputs.runner-name }}
attempt: ${{ steps.retained.outputs.attempt }}
version: ${{ steps.settings.outputs.version }}
mode: ${{ steps.settings.outputs.mode }}
runs-on: [self-hosted, macOS, ARM64, dsh-mac-package-trial]
timeout-minutes: 180
defaults:
run:
shell: bash
env:
DSH_DESKTOP_TARGET_PLATFORM: darwin
DSH_DESKTOP_TARGET_ARCH: x64
PACKAGE_MACOS_ZIP_COMPRESSION_LEVEL: ${{ inputs.compression_level }}
PACKAGE_SKIP_NOTARIZATION: ${{ inputs.skip_notarization }}
PACKAGE_SOURCE_REF: ${{ inputs.source_ref }}
# TODO: Remove this legacy source_ref mode mapping on 2027-01-04 with the parser aliases.
PACKAGE_VERSION_MODE: ${{ inputs.version_mode == 'follow-dsh' && 'product' || inputs.version_mode == 'build-number' && 'auto' || inputs.version_mode }}
DSH_DESKTOP_UPDATE_CHANNEL: ${{ inputs.update_channel }}
DSH_TELEMETRY_DISABLED: '1'
DSH_PACKAGING_PRESET: ${{ inputs.preset }}
PACKAGE_TEST_RELEASE_ID: ${{ inputs.test_release_id }}
steps:
- uses: actions/checkout@v7.0.1
id: checkout
with:
persist-credentials: false
clean: true
ref: ${{ inputs.source_ref }}
- name: Validate selected source and adapter support
run: >-
node -e "const fs=require('node:fs'); const ref=process.env.PACKAGE_SOURCE_REF;
const cp=require('node:child_process'); const preset=process.env.DSH_PACKAGING_PRESET;
if(!['test','production'].includes(preset)) throw Error('Unknown packaging preset');
const tag=/^dsh-v[0-9][0-9A-Za-z.-]*$/.test(ref);
if(preset==='production' && ref!=='master' && !tag) throw Error('Production source must be master or dsh-v*');
if(tag) {
const v=JSON.parse(fs.readFileSync('package.json','utf8')).version;
if(ref!=='dsh-v'+v) throw Error('Source tag must match product version');
const tagged=cp.execFileSync('git',['rev-parse','--verify','refs/tags/'+ref+'^{commit}'],{encoding:'utf8'}).trim();
const head=cp.execFileSync('git',['rev-parse','HEAD'],{encoding:'utf8'}).trim();
if(tagged!==head) throw Error('Checkout does not match source tag');
} else {
const branch=cp.execFileSync('git',['rev-parse','--abbrev-ref','HEAD'],{encoding:'utf8'}).trim();
if(branch==='HEAD' || branch!==ref || ref.startsWith('refs/')) throw Error('Select a branch in this repository, not a SHA or PR ref');
}
if(!fs.readFileSync('apps/desktop/scripts/prepare-macos-ci.mjs','utf8').includes('resolveDesktopBuildTarget')) throw Error('Source lacks Intel macOS CI support; select a newer source');
if(!fs.readFileSync('apps/desktop/scripts/retain-desktop-ci.ts','utf8').includes('--check-runner')) throw Error('Source lacks independent Desktop artifact archival support; select a newer source');
if(!fs.readFileSync('apps/desktop/scripts/desktop-ci-version.mjs','utf8').includes('PACKAGE_VERSION_MODE')) throw Error('Source lacks Desktop channel/version CI support; select a newer release');"
- uses: pnpm/action-setup@v5.0.0
with:
dest: ${{ runner.temp }}/setup-pnpm-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v7.0.0
with:
node-version: '24'
- name: Configure persistent package caches
env:
DSH_DESKTOP_PACKAGE_CACHE_DIR: ${{ runner.tool_cache }}/dsh-desktop-package-cache
run: |
echo "DSH_DESKTOP_PACKAGE_CACHE_DIR=$DSH_DESKTOP_PACKAGE_CACHE_DIR" >> "$GITHUB_ENV"
echo "PNPM_CONFIG_STORE_DIR=$DSH_DESKTOP_PACKAGE_CACHE_DIR/workspace-pnpm-store" >> "$GITHUB_ENV"
- name: Check Rosetta execution
run: arch -x86_64 /usr/bin/true
- name: Install locked dependencies
run: pnpm install --frozen-lockfile
- name: Check original machine archival route
env:
DESKTOP_PUBLISH_RUNNERS: ${{ vars.DESKTOP_PUBLISH_RUNNERS }}
run: node --import tsx apps/desktop/scripts/retain-desktop-ci.ts --check-runner
- name: Validate preset and resolve build version
id: settings
env:
PACKAGE_BUILD_VERSION: ${{ inputs.build_version }}
run: node apps/desktop/scripts/prepare-macos-ci.mjs
- name: Check packaging configuration and toolchain
env:
PACKAGE_VERSION: ${{ steps.settings.outputs.version }}
run: |
args=()
if [[ "$PACKAGE_SKIP_NOTARIZATION" = true ]]; then args+=(--skip-notarization); fi
pnpm run package:desktop:mac:x64 --check --build-version "$PACKAGE_VERSION" "${args[@]}"
- name: Build and stage notarized Computer Use helpers
# A source whose dsh ships the Computer Use bundle packs the workspace provider into the Desktop runtime,
# which therefore needs the same notarized helper npm publication stages.
run: |
if ! node -e "process.exit(require('./apps/cli/package.json').dependencies?.['@deepseek-ai/dsh-cua-bundle'] ? 0 : 1)"; then
echo 'This source does not ship Computer Use in Desktop; no helper is staged.'
exit 0
fi
if [[ ! -f scripts/cua-helper/package.ts ]]; then
echo '::warning::This source ships Computer Use but predates helper packaging; Computer Use cannot prepare its helper in this package.'
exit 0
fi
mkdir -p dist
pnpm exec tsx scripts/cua-helper/package.ts --out dist/cua-helper
mkdir dist/cua-helper/extracted
tar -xzf dist/cua-helper/cua-helper.tgz -C dist/cua-helper/extracted
pnpm exec tsx scripts/cua-helper/stage.ts --from dist/cua-helper/extracted
- name: Build signed installers
env:
PACKAGE_VERSION: ${{ steps.settings.outputs.version }}
run: |
args=()
if [[ "$PACKAGE_SKIP_NOTARIZATION" = true ]]; then args+=(--skip-notarization); fi
pnpm run package:desktop:mac:x64 --build-version "$PACKAGE_VERSION" "${args[@]}"
- name: Retain complete package outside the checkout
id: retained
env:
DESKTOP_PUBLISH_RUNNERS: ${{ vars.DESKTOP_PUBLISH_RUNNERS }}
PACKAGE_SOURCE_SHA: ${{ steps.checkout.outputs.commit }}
PACKAGE_VERSION: ${{ steps.settings.outputs.version }}
run: node --import tsx apps/desktop/scripts/retain-desktop-ci.ts
- name: Retain packaging diagnostics
continue-on-error: true
if: always() && steps.checkout.outcome == 'success'
uses: actions/upload-artifact@v7.0.1
with:
name: macos-x64-package-logs-${{ github.run_id }}-${{ github.run_attempt }}
include-hidden-files: true
path: apps/desktop/.desktop-build/packaging-runs/
if-no-files-found: warn
retention-days: 14
upload-artifact:
needs: package
runs-on: [self-hosted, '${{ needs.package.outputs.runner }}']
timeout-minutes: 30
env:
DESKTOP_RETAINED_DIRECTORY: ${{ needs.package.outputs.directory }}
DESKTOP_ARCHIVE_NAME: macos-x64-${{ needs.package.outputs.mode }}-${{ needs.package.outputs.version }}-${{ github.run_id }}-${{ needs.package.outputs.attempt }}.zip
DESKTOP_PACKAGE_ATTEMPT: ${{ needs.package.outputs.attempt }}
DESKTOP_PACKAGE_RUNNER: ${{ needs.package.outputs.runner-name }}
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
path: artifact-archiver
- uses: pnpm/action-setup@v5.0.0
with:
package_json_file: artifact-archiver/package.json
dest: ${{ runner.temp }}/archive-pnpm-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v7.0.0
with:
node-version: '24'
- name: Configure persistent package caches
env:
DSH_DESKTOP_PACKAGE_CACHE_DIR: ${{ runner.tool_cache }}/dsh-desktop-package-cache
run: |
echo "DSH_DESKTOP_PACKAGE_CACHE_DIR=$DSH_DESKTOP_PACKAGE_CACHE_DIR" >> "$GITHUB_ENV"
echo "PNPM_CONFIG_STORE_DIR=$DSH_DESKTOP_PACKAGE_CACHE_DIR/workspace-pnpm-store" >> "$GITHUB_ENV"
- run: pnpm install --frozen-lockfile
working-directory: artifact-archiver
- name: Archive verified retained build
id: archive
working-directory: artifact-archiver
run: node --import tsx apps/desktop/scripts/archive-desktop-ci.ts --split-macos
- name: Retain DMG installer
if: ${{ !cancelled() && steps.archive.outcome == 'success' }}
uses: actions/upload-artifact@v7.0.1
with:
name: ${{ steps.archive.outputs.dmg-name }}
path: ${{ steps.archive.outputs.dmg-path }}
archive: false
if-no-files-found: error
retention-days: 14
overwrite: true
- name: Retain update ZIP
if: ${{ !cancelled() && steps.archive.outcome == 'success' }}
uses: actions/upload-artifact@v7.0.1
with:
name: ${{ steps.archive.outputs.update-name }}
path: ${{ steps.archive.outputs.update-path }}
archive: false
if-no-files-found: error
retention-days: 14
overwrite: true
- name: Retain package metadata
if: ${{ !cancelled() && steps.archive.outcome == 'success' }}
uses: actions/upload-artifact@v7.0.1
with:
name: ${{ steps.archive.outputs.metadata-name }}
path: ${{ steps.archive.outputs.metadata-path }}
archive: false
if-no-files-found: error
retention-days: 14
overwrite: true
-244
View File
@@ -1,244 +0,0 @@
name: Package Desktop · macOS · Apple Silicon
on:
workflow_dispatch:
inputs:
source_ref:
description: '打包源码:test 支持仓库内分支或 dsh-v* tag;production 仅支持 master 或 dsh-v* tag;源码须包含 CI 适配脚本'
type: string
default: master
required: true
preset:
description: '打包环境:选择机器上的 test 或 production 配置;同时决定后续发布环境'
type: choice
options: [test, production]
default: test
required: true
update_channel:
description: '升级通道:人工选择 nightly 或 stable,与版本后缀无关;默认通道由此打包输入确定'
type: choice
options: [nightly, stable]
default: nightly
required: true
version_mode:
description: '版本模式:default 按环境自动选择(test 取 build-number,production 取 follow-dsh);follow-dsh 跟随 dsh 包版本号;build-number 自动追加构建编号;manual 手填'
type: choice
options: [default, follow-dsh, build-number, manual]
default: default
required: true
build_version:
description: '手动版本号:仅 manual 时填写完整版本;须为产品原版本或受支持的预发布后缀'
type: string
default: ''
required: false
test_release_id:
description: '测试 release ID:32 位小写十六进制随机前缀(非鉴权);留空使用机器默认值,连续升级测试须保持相同值'
type: string
default: ''
required: false
compression_level:
description: 'ZIP 压缩等级:只影响 ZIP 和自动升级下载,不影响 DMG;3 打包较快,7 压缩更强'
type: choice
options: ['3', '7']
default: '3'
required: true
skip_notarization:
description: '跳过公证和 stapling:仅限内部调试,禁止发布到 test / production 或用于自动更新;需要发布请勿勾选'
type: boolean
default: false
required: true
permissions:
contents: read
concurrency:
group: macos-desktop-package
cancel-in-progress: false
jobs:
package:
outputs:
directory: ${{ steps.retained.outputs.directory }}
runner: ${{ steps.retained.outputs.runner }}
runner-name: ${{ steps.retained.outputs.runner-name }}
attempt: ${{ steps.retained.outputs.attempt }}
version: ${{ steps.settings.outputs.version }}
mode: ${{ steps.settings.outputs.mode }}
runs-on: [self-hosted, macOS, ARM64, dsh-mac-package-trial]
timeout-minutes: 180
defaults:
run:
shell: bash
env:
DSH_DESKTOP_TARGET_PLATFORM: darwin
DSH_DESKTOP_TARGET_ARCH: arm64
PACKAGE_MACOS_ZIP_COMPRESSION_LEVEL: ${{ inputs.compression_level }}
PACKAGE_SKIP_NOTARIZATION: ${{ inputs.skip_notarization }}
PACKAGE_SOURCE_REF: ${{ inputs.source_ref }}
# TODO: Remove this legacy source_ref mode mapping on 2027-01-04 with the parser aliases.
PACKAGE_VERSION_MODE: ${{ inputs.version_mode == 'follow-dsh' && 'product' || inputs.version_mode == 'build-number' && 'auto' || inputs.version_mode }}
DSH_DESKTOP_UPDATE_CHANNEL: ${{ inputs.update_channel }}
DSH_TELEMETRY_DISABLED: '1'
DSH_PACKAGING_PRESET: ${{ inputs.preset }}
PACKAGE_TEST_RELEASE_ID: ${{ inputs.test_release_id }}
steps:
- uses: actions/checkout@v7.0.1
id: checkout
with:
persist-credentials: false
clean: true
ref: ${{ inputs.source_ref }}
- name: Validate selected source and adapter support
run: >-
node -e "const fs=require('node:fs'); const ref=process.env.PACKAGE_SOURCE_REF;
const cp=require('node:child_process'); const preset=process.env.DSH_PACKAGING_PRESET;
if(!['test','production'].includes(preset)) throw Error('Unknown packaging preset');
const tag=/^dsh-v[0-9][0-9A-Za-z.-]*$/.test(ref);
if(preset==='production' && ref!=='master' && !tag) throw Error('Production source must be master or dsh-v*');
if(tag) {
const v=JSON.parse(fs.readFileSync('package.json','utf8')).version;
if(ref!=='dsh-v'+v) throw Error('Source tag must match product version');
const tagged=cp.execFileSync('git',['rev-parse','--verify','refs/tags/'+ref+'^{commit}'],{encoding:'utf8'}).trim();
const head=cp.execFileSync('git',['rev-parse','HEAD'],{encoding:'utf8'}).trim();
if(tagged!==head) throw Error('Checkout does not match source tag');
} else {
const branch=cp.execFileSync('git',['rev-parse','--abbrev-ref','HEAD'],{encoding:'utf8'}).trim();
if(branch==='HEAD' || branch!==ref || ref.startsWith('refs/')) throw Error('Select a branch in this repository, not a SHA or PR ref');
}
if(!fs.readFileSync('apps/desktop/scripts/retain-desktop-ci.ts','utf8').includes('--check-runner')) throw Error('Source lacks independent Desktop artifact archival support; select a newer source');
if(!fs.readFileSync('apps/desktop/scripts/desktop-ci-version.mjs','utf8').includes('PACKAGE_VERSION_MODE')) throw Error('Source lacks Desktop channel/version CI support; select a newer release');"
- uses: pnpm/action-setup@v5.0.0
with:
dest: ${{ runner.temp }}/setup-pnpm-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v7.0.0
with:
node-version: '24'
- name: Configure persistent package caches
env:
DSH_DESKTOP_PACKAGE_CACHE_DIR: ${{ runner.tool_cache }}/dsh-desktop-package-cache
run: |
echo "DSH_DESKTOP_PACKAGE_CACHE_DIR=$DSH_DESKTOP_PACKAGE_CACHE_DIR" >> "$GITHUB_ENV"
echo "PNPM_CONFIG_STORE_DIR=$DSH_DESKTOP_PACKAGE_CACHE_DIR/workspace-pnpm-store" >> "$GITHUB_ENV"
- name: Install locked dependencies
run: pnpm install --frozen-lockfile
- name: Check original machine archival route
env:
DESKTOP_PUBLISH_RUNNERS: ${{ vars.DESKTOP_PUBLISH_RUNNERS }}
run: node --import tsx apps/desktop/scripts/retain-desktop-ci.ts --check-runner
- name: Validate preset and resolve build version
id: settings
env:
PACKAGE_BUILD_VERSION: ${{ inputs.build_version }}
run: node apps/desktop/scripts/prepare-macos-ci.mjs
- name: Check packaging configuration and toolchain
env:
PACKAGE_VERSION: ${{ steps.settings.outputs.version }}
run: |
args=()
if [[ "$PACKAGE_SKIP_NOTARIZATION" = true ]]; then args+=(--skip-notarization); fi
pnpm run package:desktop:mac:arm64 --check --build-version "$PACKAGE_VERSION" "${args[@]}"
- name: Build and stage notarized Computer Use helpers
# A source whose dsh ships the Computer Use bundle packs the workspace provider into the Desktop runtime,
# which therefore needs the same notarized helper npm publication stages.
run: |
if ! node -e "process.exit(require('./apps/cli/package.json').dependencies?.['@deepseek-ai/dsh-cua-bundle'] ? 0 : 1)"; then
echo 'This source does not ship Computer Use in Desktop; no helper is staged.'
exit 0
fi
if [[ ! -f scripts/cua-helper/package.ts ]]; then
echo '::warning::This source ships Computer Use but predates helper packaging; Computer Use cannot prepare its helper in this package.'
exit 0
fi
mkdir -p dist
pnpm exec tsx scripts/cua-helper/package.ts --out dist/cua-helper
mkdir dist/cua-helper/extracted
tar -xzf dist/cua-helper/cua-helper.tgz -C dist/cua-helper/extracted
pnpm exec tsx scripts/cua-helper/stage.ts --from dist/cua-helper/extracted
- name: Build signed installers
env:
PACKAGE_VERSION: ${{ steps.settings.outputs.version }}
run: |
args=()
if [[ "$PACKAGE_SKIP_NOTARIZATION" = true ]]; then args+=(--skip-notarization); fi
pnpm run package:desktop:mac:arm64 --build-version "$PACKAGE_VERSION" "${args[@]}"
- name: Retain complete package outside the checkout
id: retained
env:
DESKTOP_PUBLISH_RUNNERS: ${{ vars.DESKTOP_PUBLISH_RUNNERS }}
PACKAGE_SOURCE_SHA: ${{ steps.checkout.outputs.commit }}
PACKAGE_VERSION: ${{ steps.settings.outputs.version }}
run: node --import tsx apps/desktop/scripts/retain-desktop-ci.ts
- name: Retain packaging diagnostics
continue-on-error: true
if: always() && steps.checkout.outcome == 'success'
uses: actions/upload-artifact@v7.0.1
with:
name: macos-package-logs-${{ github.run_id }}-${{ github.run_attempt }}
include-hidden-files: true
path: apps/desktop/.desktop-build/packaging-runs/
if-no-files-found: warn
retention-days: 14
upload-artifact:
needs: package
runs-on: [self-hosted, '${{ needs.package.outputs.runner }}']
timeout-minutes: 30
env:
DESKTOP_RETAINED_DIRECTORY: ${{ needs.package.outputs.directory }}
DESKTOP_ARCHIVE_NAME: macos-arm64-${{ needs.package.outputs.mode }}-${{ needs.package.outputs.version }}-${{ github.run_id }}-${{ needs.package.outputs.attempt }}.zip
DESKTOP_PACKAGE_ATTEMPT: ${{ needs.package.outputs.attempt }}
DESKTOP_PACKAGE_RUNNER: ${{ needs.package.outputs.runner-name }}
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
path: artifact-archiver
- uses: pnpm/action-setup@v5.0.0
with:
package_json_file: artifact-archiver/package.json
dest: ${{ runner.temp }}/archive-pnpm-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v7.0.0
with:
node-version: '24'
- name: Configure persistent package caches
env:
DSH_DESKTOP_PACKAGE_CACHE_DIR: ${{ runner.tool_cache }}/dsh-desktop-package-cache
run: |
echo "DSH_DESKTOP_PACKAGE_CACHE_DIR=$DSH_DESKTOP_PACKAGE_CACHE_DIR" >> "$GITHUB_ENV"
echo "PNPM_CONFIG_STORE_DIR=$DSH_DESKTOP_PACKAGE_CACHE_DIR/workspace-pnpm-store" >> "$GITHUB_ENV"
- run: pnpm install --frozen-lockfile
working-directory: artifact-archiver
- name: Archive verified retained build
id: archive
working-directory: artifact-archiver
run: node --import tsx apps/desktop/scripts/archive-desktop-ci.ts --split-macos
- name: Retain DMG installer
if: ${{ !cancelled() && steps.archive.outcome == 'success' }}
uses: actions/upload-artifact@v7.0.1
with:
name: ${{ steps.archive.outputs.dmg-name }}
path: ${{ steps.archive.outputs.dmg-path }}
archive: false
if-no-files-found: error
retention-days: 14
overwrite: true
- name: Retain update ZIP
if: ${{ !cancelled() && steps.archive.outcome == 'success' }}
uses: actions/upload-artifact@v7.0.1
with:
name: ${{ steps.archive.outputs.update-name }}
path: ${{ steps.archive.outputs.update-path }}
archive: false
if-no-files-found: error
retention-days: 14
overwrite: true
- name: Retain package metadata
if: ${{ !cancelled() && steps.archive.outcome == 'success' }}
uses: actions/upload-artifact@v7.0.1
with:
name: ${{ steps.archive.outputs.metadata-name }}
path: ${{ steps.archive.outputs.metadata-path }}
archive: false
if-no-files-found: error
retention-days: 14
overwrite: true
@@ -1,188 +0,0 @@
# Build and publish the @deepseek-ai/node-addon-system package family from the
# harness source of record. Rehearsal and publication consume the same packed
# tarballs; each native binary is built on its matching architecture.
name: Node Addon System Release
on:
workflow_dispatch:
inputs:
publish:
description: Publish packed tarballs to npm. Must run from a node-addon-system-v* tag.
required: true
type: boolean
default: false
permissions:
contents: read
concurrency:
# Stable/prerelease dist-tags are shared registry state; serialize release
# runs so two versions cannot race the final tag assignment.
group: ${{ github.workflow }}
cancel-in-progress: false
defaults:
run:
working-directory: native/system
jobs:
matrix:
name: Matrix
runs-on: ubuntu-24.04
outputs:
prebuilds: ${{ steps.matrix.outputs.prebuilds }}
steps:
- uses: actions/checkout@v7.0.1
- id: matrix
run: echo "prebuilds=$(node ./scripts/github-matrix.mjs release-prebuild)" >> "$GITHUB_OUTPUT"
build-prebuilds:
name: ${{ matrix.package }}
needs: matrix
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.matrix.outputs.prebuilds) }}
steps:
- uses: actions/checkout@v7.0.1
- uses: pnpm/action-setup@v5.0.0
with:
package_json_file: package.json
- uses: actions/setup-node@v7.0.0
with:
node-version: 24
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --filter @deepseek-ai/node-addon-system-workspace... --frozen-lockfile
- name: Install musl toolchain
if: runner.os == 'Linux'
run: |
sudo apt-get update -q
sudo apt-get install -yq musl-tools
- name: Build native binaries
run: pnpm build:native
- name: Verify binary metadata
run: node ./scripts/verify-launcher-binary.mjs ${{ matrix.dir }}
- name: Verify the built entry and flock
run: |
pnpm build:ts
pnpm build:test-oracle
pnpm test:flock
pnpm test:packaging
- name: Upload prebuild artifact
uses: actions/upload-artifact@v7.0.1
with:
name: ${{ matrix.artifact }}
path: native/system/${{ matrix.dir }}/bin/**
if-no-files-found: error
retention-days: 7
pack:
name: Pack npm tarballs
needs: build-prebuilds
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7.0.1
- uses: pnpm/action-setup@v5.0.0
with:
package_json_file: package.json
- uses: actions/setup-node@v7.0.0
with:
node-version: 24
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --filter @deepseek-ai/node-addon-system-workspace... --frozen-lockfile
- name: Build TypeScript
run: pnpm build:ts
- name: Verify release version
run: node ./scripts/verify-release.mjs
env:
RELEASE_PUBLISH: ${{ inputs.publish }}
- name: Download prebuild artifacts
uses: actions/download-artifact@v8.0.1
with:
pattern: prebuild-*
path: native/system/.release/prebuild-artifacts
- name: Assemble and verify prebuilds
run: node ./scripts/assemble-prebuilds.mjs .release/prebuild-artifacts
- name: Verify release payload
run: node ./scripts/verify-release.mjs --prebuilds
env:
RELEASE_PUBLISH: ${{ inputs.publish }}
- name: Pack release tarballs
run: node ./scripts/pack-release.mjs dist/npm
- name: Verify packed install
run: node ./scripts/verify-packed-install.mjs dist/npm
env:
NALR_REQUIRE_LANDLOCK: 1
- name: Upload npm tarballs
uses: actions/upload-artifact@v7.0.1
with:
name: npm-tarballs
path: native/system/dist/npm/*
if-no-files-found: error
retention-days: 7
publish:
name: Publish to npm
if: inputs.publish
needs: pack
runs-on: ubuntu-24.04
environment: npm-publish
permissions:
contents: read
id-token: write
steps:
# The publish script is the only repository file this job needs, and it
# imports nothing outside Node's builtins, so there is no install step.
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@v7.0.0
with:
node-version: 24
registry-url: https://registry.npmjs.org
- name: Download npm tarballs
uses: actions/download-artifact@v8.0.1
with:
name: npm-tarballs
path: native/system/dist/npm
- name: Configure npm token fallback
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
if [[ -n "$NPM_TOKEN" ]]; then
echo "NODE_AUTH_TOKEN=$NPM_TOKEN" >> "$GITHUB_ENV"
fi
- name: Publish tarballs
# Publication is decided per package against the registry, so re-running
# this job over the same artifact skips what already landed instead of
# failing on it. A bare `npm publish` loop could not be retried: the
# registry answers a repeat of an existing version permanently.
run: node ./scripts/publish-release.mjs dist/npm
+1 -1
View File
@@ -71,7 +71,7 @@ jobs:
- uses: actions/setup-node@v7.0.0
with:
node-version: 24
node-version: '^24.22.3'
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
+1 -1
View File
@@ -36,7 +36,7 @@ jobs:
- uses: actions/setup-node@v7.0.0
with:
node-version: 24
node-version: '^24.22.3'
cache: pnpm
- name: Install (immutable)
+1 -1
View File
@@ -36,7 +36,7 @@ jobs:
- uses: actions/setup-node@v7.0.0
with:
node-version: '24'
node-version: '^24.22.3'
package-manager-cache: false
# The check app's token makes the review check run its own row instead of joining this workflow's suite.
@@ -20,7 +20,7 @@ jobs:
steps:
- uses: actions/setup-node@v7.0.0
with:
node-version: '24'
node-version: '^24.22.3'
package-manager-cache: false
- uses: deepseek-harness/deepseek-harness-check@master
@@ -30,7 +30,7 @@ jobs:
- uses: actions/setup-node@v7.0.0
with:
node-version: '24'
node-version: '^24.22.3'
package-manager-cache: false
- id: check
@@ -115,7 +115,7 @@ jobs:
- uses: actions/setup-node@v7.0.0
if: steps.merge.outputs.merged == 'true'
with:
node-version: '24'
node-version: '^24.22.3'
package-manager-cache: false
- name: Run the tree's pre-merge check
-101
View File
@@ -1,101 +0,0 @@
name: Release (SSH helper)
# Validation accepts any ref; publication requires the matching dsh-v<version> tag.
on:
workflow_dispatch:
inputs:
publish:
description: Publish verified archives to GitHub Release. Must run from the matching dsh-v<version> tag.
type: boolean
required: true
default: false
permissions:
contents: read
concurrency:
group: publish-ssh-helper-${{ github.ref }}
cancel-in-progress: false
jobs:
validate:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.source.outputs.version }}
commit: ${{ steps.source.outputs.commit }}
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Resolve source and validate publication tag
id: source
env:
PUBLISH: ${{ inputs.publish }}
run: |
node --input-type=module <<'JS'
import { readFileSync, appendFileSync } from 'node:fs';
import { execFileSync } from 'node:child_process';
const {version} = JSON.parse(readFileSync('package.json', 'utf8'));
if (process.env.PUBLISH === 'true' && (process.env.GITHUB_REF_TYPE !== 'tag' || process.env.GITHUB_REF_NAME !== `dsh-v${version}`)) throw new Error('Publication requires the matching dsh-v<version> tag');
const commit = execFileSync('git', ['rev-parse', 'HEAD'], {encoding:'utf8'}).trim();
appendFileSync(process.env.GITHUB_OUTPUT, `version=${version}\ncommit=${commit}\n`);
JS
build:
needs: validate
uses: ./.github/workflows/build-exe-for-ssh-helper.yml
with:
release: true
verify:
needs: [validate, build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: pnpm/action-setup@v4
with:
dest: ${{ runner.temp }}/setup-pnpm-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
- uses: actions/download-artifact@v8
with:
pattern: ssh-helper-node24-*
path: dist-exe/ssh-helper
merge-multiple: true
- name: Require complete evidence from the selected source commit
env:
RELEASE_VERSION: ${{ needs.validate.outputs.version }}
SOURCE_COMMIT: ${{ needs.validate.outputs.commit }}
run: pnpm exec tsx scripts/ssh-helper/release.ts --directory=dist-exe/ssh-helper --version="$RELEASE_VERSION" --commit="$SOURCE_COMMIT"
- name: Upload verified release checksums
uses: actions/upload-artifact@v7
with:
name: ssh-helper-release-checksums
path: dist-exe/ssh-helper/SHA256SUMS
if-no-files-found: error
publish:
if: inputs.publish
needs: [validate, verify]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v8
with:
pattern: ssh-helper-*
path: dist-exe/ssh-helper
merge-multiple: true
- name: Attach the verified archives to the GitHub release
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
RELEASE_TAG: ${{ github.ref_name }}
run: |
if ! gh release view "$RELEASE_TAG" >/dev/null 2>&1; then
gh release create "$RELEASE_TAG" --verify-tag --draft --title "$RELEASE_TAG" --notes 'SSH helper executables for Linux and macOS.'
fi
gh release upload "$RELEASE_TAG" dist-exe/ssh-helper/*.tar.gz dist-exe/ssh-helper/SHA256SUMS
-248
View File
@@ -1,248 +0,0 @@
name: Release (Python)
# A manual run with publish=false builds and validates the complete release
# without registry credentials. Publication is accepted only from a manual run
# on the matching python-v* tag when the private publisher-repository identity
# and public-PyPI switch are configured.
on:
workflow_dispatch:
inputs:
publish:
description: Publish the validated wheels to public PyPI. Must run from a python-v* tag.
required: true
type: boolean
default: false
permissions:
contents: read
concurrency:
# Public runs stay globally serialized across tags. Dry runs remain isolated
# by ref so they do not block an intentional publication.
group: ${{ github.event_name == 'workflow_dispatch' && inputs.publish && 'python-publication' || format('{0}-{1}', github.workflow, github.ref) }}
cancel-in-progress: false
jobs:
build:
name: Build six wheels
uses: ./.github/workflows/build-exe-for-python-sdk.yml
with:
targets: node24-linux-x64,node24-linux-arm64,node24-macos-arm64,node24-macos-x64,node24-win-x64
release: true
python-compat:
name: Python ${{ matrix.python }} / installed SDK
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
python: ['3.10', '3.14']
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@v6.3.0
with:
python-version: ${{ matrix.python }}
- uses: actions/download-artifact@v8.0.1
with:
pattern: deepseek_harness_*
path: dist
merge-multiple: true
- name: Resolve installed wheel version
id: compatibility-version
run: |
python - <<'PY' >> "$GITHUB_OUTPUT"
import runpy
release = runpy.run_path("scripts/build-python-release.py")
repository_version = release["repository_version"]()
print(f"version={release['pep440_version'](repository_version)}")
PY
- name: Install local release wheels and run the public entry path
env:
VERSION: ${{ steps.compatibility-version.outputs.version }}
run: |
python -m pip install \
"dist/deepseek_harness_sdk-$VERSION-py3-none-any.whl" \
"dist/deepseek_harness_runtime_bin-$VERSION-py3-none-manylinux_2_28_x86_64.whl"
python scripts/smoke-python-runtime.py --scenario sdk-default
python scripts/smoke-python-runtime.py --scenario sdk-mcp
validate:
name: Validate release candidate
needs: [build, python-compat]
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@v6.3.0
with:
python-version: '3.10'
- name: Resolve release version
id: version
run: |
python3 - <<'PY' >> "$GITHUB_OUTPUT"
import runpy
release = runpy.run_path("scripts/build-python-release.py")
repository_version = release["repository_version"]()
wheel_version = release["pep440_version"](repository_version)
print(f"repository-version={repository_version}")
print(f"version={wheel_version}")
PY
- name: Authorize publication request
env:
PUBLISH: ${{ github.event_name == 'workflow_dispatch' && inputs.publish }}
PUBLIC_PYPI_RELEASE_ENABLED: ${{ vars.PUBLIC_PYPI_RELEASE_ENABLED }}
PYPI_PUBLISHER_REPOSITORY: ${{ vars.PYPI_PUBLISHER_REPOSITORY }}
REPOSITORY: ${{ github.repository }}
REF_NAME: ${{ github.ref_name }}
REF_TYPE: ${{ github.ref_type }}
REPOSITORY_VERSION: ${{ steps.version.outputs.repository-version }}
run: |
set -euo pipefail
if [ "$PUBLISH" = true ]; then
[ -n "$PYPI_PUBLISHER_REPOSITORY" ] || {
echo "::error::Set the repository variable PYPI_PUBLISHER_REPOSITORY before publication."
exit 1
}
[ "$REPOSITORY" = "$PYPI_PUBLISHER_REPOSITORY" ] || {
echo "::error::This repository is not the configured PyPI publisher repository."
exit 1
}
[ "$PUBLIC_PYPI_RELEASE_ENABLED" = true ] || {
echo "::error::Set PUBLIC_PYPI_RELEASE_ENABLED=true before public publication."
exit 1
}
[ "$REF_TYPE" = tag ] && [ "$REF_NAME" = "python-v$REPOSITORY_VERSION" ] || {
echo "::error::Publication must run from tag python-v$REPOSITORY_VERSION."
exit 1
}
fi
- uses: actions/download-artifact@v8.0.1
with:
pattern: deepseek_harness_*
path: dist
merge-multiple: true
- name: Check release contents
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
set -euo pipefail
expected="$(mktemp)"
actual="$(mktemp)"
printf '%s\n' \
"deepseek_harness_runtime_bin-$VERSION-py3-none-macosx_14_0_arm64.whl" \
"deepseek_harness_runtime_bin-$VERSION-py3-none-macosx_14_0_x86_64.whl" \
"deepseek_harness_runtime_bin-$VERSION-py3-none-manylinux_2_28_aarch64.whl" \
"deepseek_harness_runtime_bin-$VERSION-py3-none-manylinux_2_28_x86_64.whl" \
"deepseek_harness_runtime_bin-$VERSION-py3-none-win_amd64.whl" \
"deepseek_harness_sdk-$VERSION-py3-none-any.whl" > "$expected"
find dist -maxdepth 1 -type f -name '*.whl' -exec basename {} \; | sort > "$actual"
diff -u "$expected" "$actual"
while IFS= read -r wheel; do
size="$(stat -c '%s' "dist/$wheel")"
[ "$size" -lt 100000000 ] || {
echo "::error::$wheel is $size bytes; public PyPI accepts at most 100000000 bytes by default."
exit 1
}
done < "$actual"
- name: Validate package metadata
run: |
python -m pip install twine==6.2.0
python -m twine check dist/*.whl
- name: Record artifact hashes
run: |
cd dist
sha256sum *.whl | sort -k2 > SHA256SUMS
cat SHA256SUMS
- uses: actions/upload-artifact@v7.0.1
with:
name: python-release-${{ steps.version.outputs.version }}
path: dist/*
if-no-files-found: error
retention-days: 7
publish-runtime:
name: Publish runtime wheels to public PyPI
if: github.event_name == 'workflow_dispatch' && inputs.publish
needs: validate
runs-on: ubuntu-latest
timeout-minutes: 10
environment: pypi-runtime
permissions:
contents: read
id-token: write
steps:
- uses: actions/download-artifact@v8.0.1
with:
name: python-release-${{ needs.validate.outputs.version }}
path: dist
- name: Verify release artifact hashes
run: cd dist && sha256sum -c SHA256SUMS
- name: Select runtime wheels
run: |
mkdir -p dist/runtime
mv dist/deepseek_harness_runtime_bin-*.whl dist/runtime/
- name: Publish runtime wheels
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/runtime/
# Public attestations reveal the private publisher repository. OIDC
# authentication remains enabled without uploading that repository identity.
attestations: false
# Keep the SDK in a dependent job. If its upload fails after the immutable
# runtime files arrive, "re-run failed jobs" resumes here without attempting
# to overwrite the runtime release.
publish-sdk:
name: Publish SDK wheel to public PyPI
if: github.event_name == 'workflow_dispatch' && inputs.publish
needs: [validate, publish-runtime]
runs-on: ubuntu-latest
timeout-minutes: 10
environment: pypi
permissions:
contents: read
id-token: write
steps:
- uses: actions/download-artifact@v8.0.1
with:
name: python-release-${{ needs.validate.outputs.version }}
path: dist
- name: Verify release artifact hashes
run: cd dist && sha256sum -c SHA256SUMS
- name: Select SDK wheel
run: |
mkdir -p dist/sdk
mv dist/deepseek_harness_sdk-*.whl dist/sdk/
- name: Publish SDK wheel
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/sdk/
attestations: false
-182
View File
@@ -1,182 +0,0 @@
# Publish the dsh release sequence to npm. This workflow is manual-only
# (workflow_dispatch) and intentionally does not listen to pull_request or push:
# publication is an explicit, reviewed act; dsh-v* tag validation is enabled by
# default and may be skipped through the dispatch input. It never appears as a PR check. It repacks the current tree before publishing
# so the bytes uploaded are exactly what this dispatch produced.
name: Release publish (dsh)
on:
workflow_dispatch:
inputs:
cua_macos_run_id:
description: 'macOS CUA helper run ID,留空复用源码逐字节一致的产物,无匹配则构建'
type: string
required: false
default: ''
skip-tag-check:
description: Skip release tag validation for the selected ref; other publication checks still apply.
type: boolean
required: false
default: false
permissions:
contents: read
actions: read
env:
PRIMARY_NODE_VERSION: '24'
DSH_TELEMETRY_DISABLED: '1'
jobs:
cua-helper-macos:
if: startsWith(github.ref, 'refs/tags/dsh-v') || inputs.skip-tag-check
uses: ./.github/workflows/cua-helper-package-macos.yml
with:
reuse: true
preset: production
cua_macos_run_id: ${{ inputs.cua_macos_run_id }}
pack:
name: Pack npm tarballs
needs: cua-helper-macos
runs-on: ubuntu-24.04
permissions:
contents: read
actions: read
steps:
# Complete history: the release scripts read tags.
- uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- uses: pnpm/action-setup@v5.0.0
with:
dest: ${{ runner.temp }}/setup-pnpm
- uses: actions/setup-node@v7.0.0
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
- name: Configure pnpm store path
id: pnpm-store
run: |
store_root="$HOME/.local/share/pnpm/store"
echo "PNPM_CONFIG_STORE_DIR=$store_root" >> "$GITHUB_ENV"
store_path=$(PNPM_CONFIG_STORE_DIR="$store_root" pnpm store path --silent)
echo "path=$store_path" >> "$GITHUB_OUTPUT"
- uses: actions/cache/restore@v6.1.0
with:
path: ${{ steps.pnpm-store.outputs.path }}
key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
- name: Install (immutable)
run: pnpm install --frozen-lockfile
- name: Verify release version
env:
RELEASE_PUBLISH: 'true'
run: pnpm run release:verify --family dsh ${{ inputs.skip-tag-check && '--skip-tag-check' || '' }}
- name: Download selected macOS CUA helper
uses: actions/download-artifact@v8.0.1
with:
artifact-ids: ${{ needs.cua-helper-macos.outputs.artifact-id }}
run-id: ${{ needs.cua-helper-macos.outputs.run-id }}
github-token: ${{ github.token }}
path: dist/cua-helper
- name: Build
run: pnpm run build:official --serial
- name: Stage verified macOS helper applications
env:
CUA_EXPECTED_BUILD_KEY: ${{ needs.cua-helper-macos.outputs.build-key }}
run: |
mkdir dist/cua-helper/extracted
tar -xzf dist/cua-helper/cua-helper.tgz -C dist/cua-helper/extracted
pnpm exec tsx scripts/cua-helper/stage.ts --from dist/cua-helper/extracted
- name: Record macOS CUA source and publication retry instructions
env:
CUA_MACOS_RUN_ID: ${{ needs.cua-helper-macos.outputs.run-id }}
CUA_ARTIFACT_ID: ${{ needs.cua-helper-macos.outputs.artifact-id }}
run: |
{
printf '采用 macOS CUA helper 构建 run ID `%s`,artifact ID `%s`。\n\n' "$CUA_MACOS_RUN_ID" "$CUA_ARTIFACT_ID"
printf '%s\n\n' 'npm 部分发布失败时,只重跑 Publish to npm job,复用原 dsh-npm-tarballs;不要重跑全部 job。'
printf '需要重新打包时,可留空自动查找,或填写 `cua_macos_run_id=%s` 指定该 helper;源码和构建配置必须匹配。\n' "$CUA_MACOS_RUN_ID"
} >> "$GITHUB_STEP_SUMMARY"
- name: Pack release tarballs
run: pnpm run release:pack --family dsh --out dist/npm
# The harness packages declare the vendored framework as a peer, and this
# verification must not depend on the registry already carrying matching
# versions — one pull request may bump both families before either
# publishes — so it installs that family's pack output too. Only dist/npm
# is published.
- name: Pack the vendored framework for verification
run: pnpm run release:pack --family vendor --out dist/npm-vendor
# dsh-sandbox-local declares the Landlock entry as a runtime dependency, so
# the verification needs its tarball. Its platform packages stay out: they
# are optional, and building them needs a musl toolchain per architecture.
- name: Pack the Landlock entry for verification
run: |
pnpm --dir native/system run build:ts
pnpm --dir native/system/packages/entry pack --pack-destination "$PWD/dist/npm-landlock"
- name: Verify packed install
run: pnpm run release:verify-packed-install --family dsh --from dist/npm --from dist/npm-vendor --from dist/npm-landlock
- uses: actions/upload-artifact@v7.0.1
with:
name: dsh-npm-tarballs
path: dist/npm/*
if-no-files-found: error
retention-days: 7
publish:
name: Publish to npm
needs: pack
runs-on: ubuntu-24.04
# Required reviewers and the allowed tags live on the environment; this is
# the only job in the sequence that can write to the registry.
environment: npm-publish
concurrency:
group: Release-publish
cancel-in-progress: false
permissions:
contents: read
steps:
# Checkout and install carry the release scripts only. There is no build
# step: publication uploads the bytes the pack job produced.
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: pnpm/action-setup@v5.0.0
with:
dest: ${{ runner.temp }}/setup-pnpm
- uses: actions/setup-node@v7.0.0
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
registry-url: https://registry.npmjs.org
- name: Install (immutable, no package scripts)
run: pnpm install --frozen-lockfile --ignore-scripts
- uses: actions/download-artifact@v8.0.1
with:
name: dsh-npm-tarballs
path: dist/npm
- name: Publish tarballs
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm run release:publish --family dsh --from dist/npm
@@ -1,126 +0,0 @@
# Publish the vendored framework sequence to npm. This workflow is manual-only
# (workflow_dispatch) and intentionally does not listen to pull_request or push:
# publication must always be an explicit, reviewed act from a vendor-* tag, and
# it must never appear as a PR check. It repacks the current tree before
# publishing so the bytes uploaded are exactly what this dispatch produced.
name: Release publish (vendor)
on:
workflow_dispatch:
inputs:
dist-tag:
description: Optional unused npm channel. Leave empty for latest (stable) or next (prerelease).
required: false
type: string
default: ''
permissions:
contents: read
env:
PRIMARY_NODE_VERSION: '24'
DSH_TELEMETRY_DISABLED: '1'
jobs:
pack:
name: Pack npm tarballs
runs-on: ubuntu-24.04
steps:
# Complete history: the release scripts read tags.
- uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- uses: pnpm/action-setup@v5.0.0
with:
dest: ${{ runner.temp }}/setup-pnpm
- uses: actions/setup-node@v7.0.0
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
- name: Configure pnpm store path
id: pnpm-store
run: |
store_root="$HOME/.local/share/pnpm/store"
echo "PNPM_CONFIG_STORE_DIR=$store_root" >> "$GITHUB_ENV"
store_path=$(PNPM_CONFIG_STORE_DIR="$store_root" pnpm store path --silent)
echo "path=$store_path" >> "$GITHUB_OUTPUT"
- uses: actions/cache/restore@v6.1.0
with:
path: ${{ steps.pnpm-store.outputs.path }}
key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
- name: Install (immutable)
run: pnpm install --frozen-lockfile
- name: Verify release version
env:
RELEASE_PUBLISH: 'true'
run: pnpm run release:verify --family vendor
# The vendored packages publish their own sources and build outputs; the
# host build produces what their manifests select.
- name: Build
run: pnpm run build:lib:host
- name: Pack release tarballs
run: pnpm run release:pack --family vendor --out dist/npm-vendor
- name: Verify packed install
run: pnpm run release:verify-packed-install --family vendor --from dist/npm-vendor
- uses: actions/upload-artifact@v7.0.1
with:
name: vendor-npm-tarballs
path: dist/npm-vendor/*
if-no-files-found: error
retention-days: 7
publish:
name: Publish to npm
needs: pack
runs-on: ubuntu-24.04
environment: npm-publish
concurrency:
group: Release-publish
cancel-in-progress: false
permissions:
contents: read
steps:
# Checkout and install carry the release scripts only; no build step.
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: pnpm/action-setup@v5.0.0
with:
dest: ${{ runner.temp }}/setup-pnpm
- uses: actions/setup-node@v7.0.0
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
registry-url: https://registry.npmjs.org
- name: Install (immutable, no package scripts)
run: pnpm install --frozen-lockfile --ignore-scripts
- uses: actions/download-artifact@v8.0.1
with:
name: vendor-npm-tarballs
path: dist/npm-vendor
- name: Publish tarballs
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
RELEASE_DIST_TAG: ${{ inputs.dist-tag }}
run: |
args=()
if [[ -n "$RELEASE_DIST_TAG" ]]; then
args+=(--dist-tag "$RELEASE_DIST_TAG")
fi
pnpm run release:publish --family vendor --from dist/npm-vendor "${args[@]}"
-107
View File
@@ -1,107 +0,0 @@
# Pack the vendored framework sequence: the nine rescoped Cordis packages under
# vendor/, each on its own version line. This sequence releases independently of
# dsh and of the native packages.
#
# Pack runs without credentials on every pull request and master push.
# Publication is a manual workflow_dispatch of release-vendor-publish.yml from a
# vendor-* tag; a vendor release can carry several versions, so each package has
# its own tag.
name: Release (vendor)
on:
pull_request:
push:
branches: [master]
workflow_dispatch:
permissions:
contents: read
concurrency:
# Pack runs per ref so concurrent pull requests never displace each other.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PRIMARY_NODE_VERSION: '24'
DSH_TELEMETRY_DISABLED: '1'
jobs:
pack:
name: Pack npm tarballs
# Persistent runners accept only trusted, credential-free rehearsals.
runs-on: >-
${{ vars.DSH_CI_FAILOVER_LINUX == 'selfhosted'
&& github.repository == 'deepseek-harness/deepseek-harness'
&& github.actor != 'dependabot[bot]'
&& ((github.event_name == 'push' && github.ref == 'refs/heads/master')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.repository
&& github.event.pull_request.head.repo.fork == false
&& github.event.pull_request.user.login != 'dependabot[bot]'))
&& fromJSON('["self-hosted", "linux", "x64", "vm-backup"]')
|| 'ubuntu-24.04' }}
steps:
# Complete history: the release scripts read tags.
- uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
persist-credentials: false
clean: true
- name: Configure runner-private caches
run: |
echo "NODE_COMPILE_CACHE=${{ runner.temp }}/node-compile-cache" >> "$GITHUB_ENV"
echo "npm_config_devdir=${{ runner.temp }}/node-gyp" >> "$GITHUB_ENV"
echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
- uses: pnpm/action-setup@v5.0.0
with:
dest: ${{ runner.temp }}/setup-pnpm-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }}
- uses: actions/setup-node@v7.0.0
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
package-manager-cache: false
- name: Configure pnpm store path
id: pnpm-store
run: |
store_root="$HOME/.local/share/pnpm/store"
echo "PNPM_CONFIG_STORE_DIR=$store_root" >> "$GITHUB_ENV"
store_path=$(PNPM_CONFIG_STORE_DIR="$store_root" pnpm store path --silent)
echo "path=$store_path" >> "$GITHUB_OUTPUT"
- uses: actions/cache/restore@v6.1.0
if: runner.environment == 'github-hosted'
with:
path: ${{ steps.pnpm-store.outputs.path }}
key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
- name: Install (immutable)
run: pnpm install --frozen-lockfile
- name: Verify release version
run: pnpm run release:verify --family vendor
# The vendored packages publish their own sources and build outputs; the
# host build produces what their manifests select.
- name: Build
run: ${{ github.event_name == 'pull_request' && 'pnpm exec tsx scripts/compile-referenced-projects.ts host-libraries' || 'pnpm run build:lib:host' }}
# Concurrency here is rehearsal-only: the credentialed publish workflows
# invoke release:pack without the flag and keep the strictly serial path.
- name: Pack release tarballs
run: pnpm run release:pack --family vendor --out dist/npm-vendor --concurrency 8
- name: Verify packed install
run: pnpm run release:verify-packed-install --family vendor --from dist/npm-vendor
- uses: actions/upload-artifact@v7.0.1
with:
name: vendor-npm-tarballs
path: dist/npm-vendor/*
if-no-files-found: error
retention-days: 7
-190
View File
@@ -1,190 +0,0 @@
# Pack the dsh release sequence: every package under packages/ plus the apps/
# entries, all on one version. The vendored framework and the native packages are
# separate sequences with their own workflows and version lines.
#
# Pack and dependency-layout verification run without credentials on every pull
# request and master push. Publication is a manual workflow_dispatch of
# release-publish.yml from a dsh-v* tag.
name: Release (dsh)
on:
pull_request:
push:
branches: [master]
workflow_dispatch:
permissions:
contents: read
concurrency:
# Pack runs per ref so concurrent pull requests never displace each other.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PRIMARY_NODE_VERSION: '24'
DSH_TELEMETRY_DISABLED: '1'
jobs:
dependencies:
name: Dependency layout
# Persistent runners accept only trusted, credential-free rehearsals.
runs-on: >-
${{ vars.DSH_CI_FAILOVER_LINUX == 'blacksmith' && 'blacksmith-4vcpu-ubuntu-2404'
|| vars.DSH_CI_FAILOVER_LINUX == 'selfhosted'
&& github.repository == 'deepseek-harness/deepseek-harness'
&& github.actor != 'dependabot[bot]'
&& ((github.event_name == 'push' && github.ref == 'refs/heads/master')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.repository
&& github.event.pull_request.head.repo.fork == false
&& github.event.pull_request.user.login != 'dependabot[bot]'))
&& fromJSON('["self-hosted", "linux", "x64", "vm-backup"]')
|| 'ubuntu-24.04' }}
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
clean: true
- name: Configure runner-private caches
run: |
echo "NODE_COMPILE_CACHE=${{ runner.temp }}/node-compile-cache" >> "$GITHUB_ENV"
echo "npm_config_devdir=${{ runner.temp }}/node-gyp" >> "$GITHUB_ENV"
echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
- uses: pnpm/action-setup@v5.0.0
with:
dest: ${{ runner.temp }}/setup-pnpm-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }}
- uses: actions/setup-node@v7.0.0
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
package-manager-cache: false
- name: Configure pnpm store path
id: pnpm-store
run: |
store_root="$HOME/.local/share/pnpm/store"
echo "PNPM_CONFIG_STORE_DIR=$store_root" >> "$GITHUB_ENV"
store_path=$(PNPM_CONFIG_STORE_DIR="$store_root" pnpm store path --silent)
echo "path=$store_path" >> "$GITHUB_OUTPUT"
- uses: actions/cache/restore@v6.1.0
if: runner.environment == 'github-hosted'
with:
path: ${{ steps.pnpm-store.outputs.path }}
key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
- name: Install (immutable)
run: pnpm install --frozen-lockfile
# The two verifications read different inputs (manifests versus an npm
# install in a scratch directory), so they run beside each other.
- name: Verify dependency policy and npm install layout
run: |
pnpm run verify-package-dependencies &
dependencies_pid=$!
pnpm run verify-npm-install-layout &
layout_pid=$!
dependencies_status=0
wait "$dependencies_pid" || dependencies_status=$?
layout_status=0
wait "$layout_pid" || layout_status=$?
if (( dependencies_status != 0 )); then exit "$dependencies_status"; fi
exit "$layout_status"
pack:
name: Pack npm tarballs
# Persistent runners accept only trusted, credential-free rehearsals.
runs-on: >-
${{ vars.DSH_CI_FAILOVER_LINUX == 'selfhosted'
&& github.repository == 'deepseek-harness/deepseek-harness'
&& github.actor != 'dependabot[bot]'
&& ((github.event_name == 'push' && github.ref == 'refs/heads/master')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.repository
&& github.event.pull_request.head.repo.fork == false
&& github.event.pull_request.user.login != 'dependabot[bot]'))
&& fromJSON('["self-hosted", "linux", "x64", "vm-backup"]')
|| 'ubuntu-24.04' }}
steps:
# Complete history: the release scripts read tags.
- uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
persist-credentials: false
clean: true
- name: Configure runner-private caches
run: |
echo "NODE_COMPILE_CACHE=${{ runner.temp }}/node-compile-cache" >> "$GITHUB_ENV"
echo "npm_config_devdir=${{ runner.temp }}/node-gyp" >> "$GITHUB_ENV"
echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
- uses: pnpm/action-setup@v5.0.0
with:
dest: ${{ runner.temp }}/setup-pnpm-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }}
- uses: actions/setup-node@v7.0.0
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
package-manager-cache: false
- name: Configure pnpm store path
id: pnpm-store
run: |
store_root="$HOME/.local/share/pnpm/store"
echo "PNPM_CONFIG_STORE_DIR=$store_root" >> "$GITHUB_ENV"
store_path=$(PNPM_CONFIG_STORE_DIR="$store_root" pnpm store path --silent)
echo "path=$store_path" >> "$GITHUB_OUTPUT"
- uses: actions/cache/restore@v6.1.0
if: runner.environment == 'github-hosted'
with:
path: ${{ steps.pnpm-store.outputs.path }}
key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
- name: Install (immutable)
run: pnpm install --frozen-lockfile
- name: Verify release version
run: pnpm run release:verify --family dsh
- name: Build
run: ${{ github.event_name == 'pull_request' && 'pnpm run build:artifacts --profile official' || 'pnpm run build:official' }}
# Concurrency here is rehearsal-only: the credentialed publish workflows
# invoke release:pack without the flag and keep the strictly serial path.
- name: Pack release tarballs
run: pnpm run release:pack --family dsh --out dist/npm --concurrency 8
# The harness packages declare the vendored framework as a peer, and this
# verification must not depend on the registry already carrying matching
# versions — one pull request may bump both families before either
# publishes — so it installs that family's pack output too. Only dist/npm
# is published.
- name: Pack the vendored framework for verification
run: pnpm run release:pack --family vendor --out dist/npm-vendor --concurrency 8
# dsh-sandbox-local declares the Landlock entry as a runtime dependency, so
# the verification needs its tarball. Its platform packages stay out: they
# are optional, and building them needs a musl toolchain per architecture.
- name: Pack the Landlock entry for verification
run: |
pnpm --dir native/system run build:ts
pnpm --dir native/system/packages/entry pack --pack-destination "$PWD/dist/npm-landlock"
- name: Verify packed install
run: pnpm run release:verify-packed-install --family dsh --from dist/npm --from dist/npm-vendor --from dist/npm-landlock
- uses: actions/upload-artifact@v7.0.1
with:
name: dsh-npm-tarballs
path: dist/npm/*
if-no-files-found: error
retention-days: 7
+2 -2
View File
@@ -72,7 +72,7 @@ jobs:
- uses: actions/setup-node@v7.0.0
with:
node-version: 24
node-version: '^24.22.3'
- name: Install (immutable)
run: pnpm install --frozen-lockfile
@@ -152,7 +152,7 @@ jobs:
- uses: actions/setup-node@v7.0.0
with:
node-version: 24
node-version: '^24.22.3'
- name: Install (immutable)
run: pnpm install --frozen-lockfile
-278
View File
@@ -1,278 +0,0 @@
name: Package Desktop · Windows · x64
on:
workflow_dispatch:
inputs:
source_ref:
description: '打包源码:test 支持仓库内分支或 dsh-v* tag;production 仅支持 master 或 dsh-v* tag;源码须包含 CI 适配脚本'
type: string
default: master
required: true
preset:
description: '打包环境:选择机器上的 test 或 production 配置;同时决定后续发布环境'
type: choice
options: [test, production]
default: test
required: true
update_channel:
description: '升级通道:人工选择 nightly 或 stable,与版本后缀无关;默认通道由此打包输入确定'
type: choice
options: [nightly, stable]
default: nightly
required: true
version_mode:
description: '版本模式:default 按环境自动选择(test 取 build-number,production 取 follow-dsh);follow-dsh 跟随 dsh 包版本号;build-number 自动追加构建编号;manual 手填'
type: choice
options: [default, follow-dsh, build-number, manual]
default: default
required: true
build_version:
description: '手动版本号:仅 manual 时填写完整版本;须为产品原版本或受支持的预发布后缀'
type: string
default: ''
required: false
test_release_id:
description: '测试 release ID:32 位小写十六进制随机前缀(非鉴权);留空使用机器默认值,连续升级测试须保持相同值'
type: string
default: ''
required: false
compression_level:
description: '安装器压缩等级:3 打包较快,7 压缩更强;覆盖本轮机器配置'
type: choice
options: ['3', '7']
default: '3'
required: true
signing:
description: '签名方式:unsigned 仅限内部调试,禁止发布到 test / production 或用于自动更新;需要发布请选择 signed(EV 硬件令牌)'
type: choice
options: [signed, unsigned]
default: signed
required: true
cache_namespace:
description: '缓存测量命名空间:留空使用共享缓存;新名称用于冷缓存,再次使用同名测热缓存,不清除现有缓存'
type: string
default: ''
required: false
permissions:
contents: read
concurrency:
group: windows-desktop-package
cancel-in-progress: false
jobs:
package:
outputs:
directory: ${{ steps.retained.outputs.directory }}
runner: ${{ steps.retained.outputs.runner }}
runner-name: ${{ steps.retained.outputs.runner-name }}
attempt: ${{ steps.retained.outputs.attempt }}
version: ${{ steps.settings.outputs.version }}
mode: ${{ steps.settings.outputs.mode }}
runs-on: dsh-win-package-trial
timeout-minutes: 120
defaults:
run:
shell: pwsh
env:
PACKAGE_SOURCE_REF: ${{ inputs.source_ref }}
# TODO: Remove this legacy source_ref mode mapping on 2027-01-04 with the parser aliases.
PACKAGE_VERSION_MODE: ${{ inputs.version_mode == 'follow-dsh' && 'product' || inputs.version_mode == 'build-number' && 'auto' || inputs.version_mode }}
DSH_DESKTOP_UPDATE_CHANNEL: ${{ inputs.update_channel }}
DSH_TELEMETRY_DISABLED: '1'
DSH_PACKAGING_PRESET: ${{ inputs.preset }}
PACKAGE_TEST_RELEASE_ID: ${{ inputs.test_release_id }}
PACKAGE_SIGNING: ${{ inputs.signing }}
PACKAGE_CACHE_NAMESPACE: ${{ inputs.cache_namespace }}
PACKAGE_WINDOWS_COMPRESSION_LEVEL: ${{ inputs.compression_level }}
steps:
- name: Reset packaging checkout
working-directory: ${{ runner.temp }}
run: |
$workspace = [IO.Path]::GetFullPath($env:GITHUB_WORKSPACE)
$parent = [IO.Path]::GetFullPath($env:RUNNER_WORKSPACE)
if ([IO.Path]::GetDirectoryName($workspace) -ne $parent) { throw 'Checkout must be a direct child of RUNNER_WORKSPACE' }
for ($item = [IO.DirectoryInfo]::new($workspace); $null -ne $item; $item = $item.Parent) {
if ($item.Exists -and ($item.Attributes -band [IO.FileAttributes]::ReparsePoint)) { throw 'Checkout ancestors cannot be links' }
}
node -e "const fs = require('node:fs'); fs.rmSync(process.argv[1], { recursive: true, force: true, maxRetries: 3 }); fs.mkdirSync(process.argv[1])" $workspace
if ($LASTEXITCODE -ne 0) { throw 'Checkout cleanup failed' }
- name: Checkout workflow helpers
uses: actions/checkout@v7.0.1
with:
persist-credentials: false
ref: ${{ github.workflow_sha }}
sparse-checkout: apps/desktop/scripts
- name: Stage workflow helpers
id: helpers
run: |
$helpers = Join-Path $env:RUNNER_TEMP "packaging-helpers-$env:GITHUB_RUN_ID-$env:GITHUB_RUN_ATTEMPT"
New-Item -ItemType Directory -Path $helpers -ErrorAction Stop | Out-Null
foreach ($name in @('windows-packaging-priority.ps1', 'windows-packaging-summary.mjs')) {
Copy-Item -LiteralPath (Join-Path 'apps/desktop/scripts' $name) -Destination $helpers -ErrorAction Stop
}
"PACKAGE_CI_HELPERS=$helpers" >> $env:GITHUB_ENV
- uses: actions/checkout@v7.0.1
id: checkout
with:
persist-credentials: false
clean: true
ref: ${{ inputs.source_ref }}
- name: Validate selected source and adapter support
run: >-
node -e "const fs=require('node:fs'); const ref=process.env.PACKAGE_SOURCE_REF;
const cp=require('node:child_process'); const preset=process.env.DSH_PACKAGING_PRESET;
if(!['test','production'].includes(preset)) throw Error('Unknown packaging preset');
const tag=/^dsh-v[0-9][0-9A-Za-z.-]*$/.test(ref);
if(preset==='production' && ref!=='master' && !tag) throw Error('Production source must be master or dsh-v*');
if(tag) {
const v=JSON.parse(fs.readFileSync('package.json','utf8')).version;
if(ref!=='dsh-v'+v) throw Error('Source tag must match product version');
const tagged=cp.execFileSync('git',['rev-parse','--verify','refs/tags/'+ref+'^{commit}'],{encoding:'utf8'}).trim();
const head=cp.execFileSync('git',['rev-parse','HEAD'],{encoding:'utf8'}).trim();
if(tagged!==head) throw Error('Checkout does not match source tag');
} else {
const branch=cp.execFileSync('git',['rev-parse','--abbrev-ref','HEAD'],{encoding:'utf8'}).trim();
if(branch==='HEAD' || branch!==ref || ref.startsWith('refs/')) throw Error('Select a branch in this repository, not a SHA or PR ref');
}
if(!fs.readFileSync('apps/desktop/scripts/retain-desktop-ci.ts','utf8').includes('--check-runner')) throw Error('Source lacks independent Desktop artifact archival support; select a newer source');
if(!fs.readFileSync('apps/desktop/scripts/desktop-ci-version.mjs','utf8').includes('PACKAGE_VERSION_MODE')) throw Error('Source lacks Desktop channel/version CI support; select a newer release');"
- uses: pnpm/action-setup@v5.0.0
with:
dest: ${{ runner.temp }}/setup-pnpm-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v7.0.0
with:
node-version: '24'
- name: Configure persistent pnpm store
# PNPM_HOME belongs to this run; keep downloaded packages outside its temporary directory.
env:
DSH_DESKTOP_PACKAGE_CACHE_DIR: ${{ runner.tool_cache }}/dsh-desktop-package-cache
run: |
$storeRoot = Join-Path ([IO.Path]::GetPathRoot($env:GITHUB_WORKSPACE)) '.pnpm-store'
$namespace = $env:PACKAGE_CACHE_NAMESPACE
if ($namespace) {
if ($namespace -cnotmatch '^[a-z0-9][a-z0-9-]{0,63}\z') { throw 'Cache namespace must contain 1-64 lowercase letters, digits or hyphens' }
if ($namespace -match '^(con|prn|aux|nul|com[1-9]|lpt[1-9])$') { throw 'Cache namespace cannot be a Windows device name' }
$storeRoot = Join-Path $storeRoot $namespace
$env:DSH_DESKTOP_PACKAGE_CACHE_DIR = Join-Path $env:DSH_DESKTOP_PACKAGE_CACHE_DIR $namespace
}
"DSH_DESKTOP_PACKAGE_CACHE_DIR=$env:DSH_DESKTOP_PACKAGE_CACHE_DIR" >> $env:GITHUB_ENV
"PNPM_CONFIG_STORE_DIR=$storeRoot" >> $env:GITHUB_ENV
- name: Install locked dependencies
run: |
& "$env:PACKAGE_CI_HELPERS/windows-packaging-priority.ps1" -BestEffort
node -e "const os=require('node:os'); console.log(JSON.stringify({node:process.version,availableParallelism:os.availableParallelism(),logicalCpus:os.cpus().length,totalMemoryBytes:os.totalmem(),freeMemoryBytes:os.freemem()}))"
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
pnpm store path
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
pnpm install --frozen-lockfile
exit $LASTEXITCODE
- name: Check original machine archival route
env:
DESKTOP_PUBLISH_RUNNERS: ${{ vars.DESKTOP_PUBLISH_RUNNERS }}
run: node --import tsx apps/desktop/scripts/retain-desktop-ci.ts --check-runner
- name: Validate preset and resolve build version
id: settings
env:
PACKAGE_BUILD_VERSION: ${{ inputs.build_version }}
run: node apps/desktop/scripts/prepare-windows-ci.mjs
- name: Summarize packaging parameters
if: always() && steps.helpers.outcome == 'success'
env:
PACKAGE_INPUT_VERSION_MODE: ${{ inputs.version_mode }}
PACKAGE_BUILD_VERSION: ${{ inputs.build_version }}
PACKAGE_SOURCE_SHA: ${{ steps.checkout.outputs.commit }}
PACKAGE_VERSION: ${{ steps.settings.outputs.version }}
run: node "$env:PACKAGE_CI_HELPERS/windows-packaging-summary.mjs"
- name: Check packaging configuration and toolchain
env:
PACKAGE_VERSION: ${{ steps.settings.outputs.version }}
run: |
$packageArgs = @('run', 'package:desktop:win:x64', '--check', '--build-version', $env:PACKAGE_VERSION)
if ($env:PACKAGE_SIGNING -eq 'unsigned') { $packageArgs += '--unsigned' }
pnpm @packageArgs
exit $LASTEXITCODE
- name: Build installer and verify packaged runtime
env:
PACKAGE_VERSION: ${{ steps.settings.outputs.version }}
run: |
& "$env:PACKAGE_CI_HELPERS/windows-packaging-priority.ps1" -BestEffort
$packageArgs = @('run', 'package:desktop:win:x64', '--build-version', $env:PACKAGE_VERSION)
if ($env:PACKAGE_SIGNING -eq 'unsigned') { $packageArgs += '--unsigned' }
pnpm @packageArgs
exit $LASTEXITCODE
- name: Retain complete package outside the checkout
id: retained
env:
DESKTOP_PUBLISH_RUNNERS: ${{ vars.DESKTOP_PUBLISH_RUNNERS }}
PACKAGE_SOURCE_SHA: ${{ steps.checkout.outputs.commit }}
PACKAGE_VERSION: ${{ steps.settings.outputs.version }}
run: node --import tsx apps/desktop/scripts/retain-desktop-ci.ts
- name: Retain packaging diagnostics
continue-on-error: true
if: always() && steps.checkout.outcome == 'success'
uses: actions/upload-artifact@v7.0.1
with:
name: windows-package-logs-${{ github.run_id }}-${{ github.run_attempt }}
include-hidden-files: true
path: ${{ github.workspace }}/apps/desktop/.desktop-build/packaging-runs/
if-no-files-found: warn
retention-days: 14
upload-artifact:
defaults:
run:
shell: pwsh
needs: package
runs-on: [self-hosted, '${{ needs.package.outputs.runner }}']
timeout-minutes: 30
env:
PACKAGE_CACHE_NAMESPACE: ${{ inputs.cache_namespace }}
DESKTOP_RETAINED_DIRECTORY: ${{ needs.package.outputs.directory }}
DESKTOP_ARCHIVE_NAME: windows-x64-${{ inputs.signing }}-${{ needs.package.outputs.version }}-${{ github.run_id }}-${{ needs.package.outputs.attempt }}.zip
DESKTOP_PACKAGE_ATTEMPT: ${{ needs.package.outputs.attempt }}
DESKTOP_PACKAGE_RUNNER: ${{ needs.package.outputs.runner-name }}
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
path: artifact-archiver
- uses: pnpm/action-setup@v5.0.0
with:
package_json_file: artifact-archiver/package.json
dest: ${{ runner.temp }}/archive-pnpm-${{ github.run_id }}-${{ github.run_attempt }}
- uses: actions/setup-node@v7.0.0
with:
node-version: '24'
- name: Configure persistent pnpm store
# PNPM_HOME belongs to this run; keep downloaded packages outside its temporary directory.
env:
DSH_DESKTOP_PACKAGE_CACHE_DIR: ${{ runner.tool_cache }}/dsh-desktop-package-cache
run: |
$storeRoot = Join-Path ([IO.Path]::GetPathRoot($env:GITHUB_WORKSPACE)) '.pnpm-store'
$namespace = $env:PACKAGE_CACHE_NAMESPACE
if ($namespace) {
if ($namespace -cnotmatch '^[a-z0-9][a-z0-9-]{0,63}\z') { throw 'Cache namespace must contain 1-64 lowercase letters, digits or hyphens' }
if ($namespace -match '^(con|prn|aux|nul|com[1-9]|lpt[1-9])$') { throw 'Cache namespace cannot be a Windows device name' }
$storeRoot = Join-Path $storeRoot $namespace
$env:DSH_DESKTOP_PACKAGE_CACHE_DIR = Join-Path $env:DSH_DESKTOP_PACKAGE_CACHE_DIR $namespace
}
"DSH_DESKTOP_PACKAGE_CACHE_DIR=$env:DSH_DESKTOP_PACKAGE_CACHE_DIR" >> $env:GITHUB_ENV
"PNPM_CONFIG_STORE_DIR=$storeRoot" >> $env:GITHUB_ENV
- run: pnpm install --frozen-lockfile
working-directory: artifact-archiver
- name: Archive verified retained build
id: archive
working-directory: artifact-archiver
run: node --import tsx apps/desktop/scripts/archive-desktop-ci.ts
- name: Retain installers for the selected mode
if: success()
uses: actions/upload-artifact@v7.0.1
with:
name: ${{ env.DESKTOP_ARCHIVE_NAME }}
path: ${{ steps.archive.outputs.path }}
archive: false
if-no-files-found: error
retention-days: 14
overwrite: true
+3
View File
@@ -52,3 +52,6 @@ native/system/test/bin/
# Generated company-signed CUA release record.
/packages/experimental/cua-macos/cua-helper.json
# Local CI output
/.ci/
+55
View File
@@ -0,0 +1,55 @@
# Marqdo Harness CI.
#
# The application is an independent repository: this pipeline installs the
# locked toolchain, builds the forked DSH artifacts, runs the downstream tests
# against one pinned trusted Marqdo CLI release, and exercises real release
# installation. It never uses upstream official publishing credentials.
when:
- event: [push, pull_request, manual, tag]
steps:
install:
image: node:24.22.3-bookworm
environment:
# The upstream hook installer refuses a submodule common config; CI is
# the documented skip path and hooks are not needed in this pipeline.
CI: "true"
commands:
- corepack enable
- corepack prepare pnpm@11.28.5 --activate
- pnpm install --frozen-lockfile
build:
image: node:24.22.3-bookworm
depends_on: [install]
environment:
CI: "true"
commands:
- corepack enable
- corepack prepare pnpm@11.28.5 --activate
- pnpm run build
test:
image: node:24.22.3-bookworm
depends_on: [build]
environment:
CI: "true"
commands:
- corepack enable
- corepack prepare pnpm@11.28.5 --activate
- MQDH_TEST_INSTALL=1 MARQDO_CI_OUT=.ci bash scripts/ci.sh
package:
image: node:24.22.3-bookworm
depends_on: [test]
when:
- event: tag
environment:
MQDH_BUNDLE_NODE: "1"
MQDH_PACKAGE_WORK: /tmp/mqdh-package-work
commands:
- corepack enable
- corepack prepare pnpm@11.28.5 --activate
- MARQDO_CI_OUT=.ci bash scripts/package.sh
- cat .ci/package-evidence.json
- cat .ci/mqdh-release.json
+19 -1
View File
@@ -83,7 +83,7 @@ Package groups: [packages/README.md](packages/README.md). [Experimental status](
## Commands
```sh
pnpm install # pnpm workspaces, node >=24.9
pnpm install # node ^24.22.3 || >=26.13.1
pnpm run clean # remove build outputs and safe residue from deleted packages
pnpm run test # unit tests
pnpm run test:coverage # CI coverage gate: per-file 100% on packages/*/*/src
@@ -190,3 +190,21 @@ Docs accompany every code change: update affected README and JSDoc contracts tog
## Vendoring policy
`vendor/` packages are pinned source copies (manifest with upstream SHAs in [vendor/README.md](vendor/README.md)). Update via the sync procedure there; re-apply or retire the logged local modifications; rerun `pnpm run test && pnpm run build`.
<!-- marqdo:repo-conventions v1 -->
## Marqdo Harness downstream rules
This repository is `app-harness` in the Marqdo ecosystem (parent path `apps/harness`, remote `https://git.cflmy.cn/cflmy/marqdo-app-harness.git`). Root conventions: [docs/REPOSITORY-CONVENTIONS.md](https://git.cflmy.cn/cflmy/marqdo/src/branch/main/docs/REPOSITORY-CONVENTIONS.md).
- Keep the single product profile `mqdh` and the single launcher `scripts/mqdh.mjs`; do not add a second user-selectable execution mode or a second Marqdo parser.
- `@marqdo/*` packages own application behavior; upstream `packages/**` changes require an entry in [docs/mqdh/upstream-delta.md](docs/mqdh/upstream-delta.md).
- Never copy Marqdo CLI/stdlib/extension/tool source into this repository. Runtime artifacts are installed from trusted releases into `MQDH_HOME`.
- Product defaults are loopback-only, telemetry/session-upload/plugin-install off, workspace-write sandbox on, and one-shot approval for every document execution or ecosystem mutation.
- Evidence discipline: record the app SHA, upstream SHA, CLI source SHA, Bundle digest, platform, command and exit code. Unrun gates stay `UNVERIFIED` in [docs/mqdh/STATUS.md](docs/mqdh/STATUS.md).
- Upstream contract defects go to `marqdo-cli`, `marqdo-std-*`, `marqdo-ext-*`, `marqdo-knowledge` or `marqdo-view`; this repository only consumes their published contracts.
- Run `scripts/ci.sh` before pushing; use `scripts/upstream.sh candidate <sha>` for a synchronisation branch and never auto-merge upstream.
- All product-owned egress goes through `packages/marqdo/harness/src/network/`; do not add direct `fetch` calls to product sources. The model transport remains upstream DSH.
- One bootstrap state machine (`src/bootstrap`), one platform table (`src/platform`), one application release manifest (`src/release`), one diagnostics store (`src/diagnostics`). Do not add a second installer, platform list, version table or log protocol.
- Diagnostics are local-first: redact before writing, submit only with explicit user confirmation, and never expose token/report content to the model.
- The application install tree (`MQDH_INSTALL_ROOT`) is separate from `MQDH_HOME`; updates must never change the ecosystem or user knowledge, and unverified platforms/signatures must not be published as supported.
+3
View File
@@ -5,6 +5,9 @@
/deepseek-harness:
en: f68c4f080ce55ff2
zh: 88a76d7f7f0b260e
/deepseek-harness/marqdo-harness-downstream:
en: 47d010896d91fd89
zh: c6f02e41707e9d8d
/deepseek-harness/developer-preview:
en: 4ef4d8a71ac143f0
zh: 1bfc3149ba8e5543
+22
View File
@@ -8,6 +8,28 @@ It is built on an **everything-is-a-plugin** architecture and powered by [Cordis
Documentation: [https://deepseek-harness.github.io/deepseek-harness/](https://deepseek-harness.github.io/deepseek-harness/)
## Marqdo Harness (downstream)
This repository is the **Marqdo Harness (MQDH)** downstream fork of DeepSeek Harness. It is the official single-user application of the Marqdo ecosystem: it installs and verifies Marqdo runtimes, executes `.mq.md` documents through the public CLI contract, keeps a private local knowledge library, and preserves run evidence for reuse.
The upstream history, MIT license and third-party notices are retained. `origin` is `https://git.cflmy.cn/cflmy/marqdo-app-harness.git`; `upstream` is the Gitea DSH mirror. Product documentation lives under `docs/mqdh/` (ARCHITECTURE, STATUS, UPSTREAM, upstream-delta).
Run the product from this checkout with `node scripts/mqdh.mjs` after `pnpm install && pnpm run build`. The web workbench is served at `/mqdh` on the same loopback listener as the DSH client. The application does not bundle a Marqdo CLI, stdlib, extension or tool implementation; those are downloaded from trusted Gitea releases into an application-owned home.
Product commands (everything else is forwarded to the forked DSH launcher):
```sh
node scripts/mqdh.mjs --version
node scripts/mqdh.mjs bootstrap --json # first-run runtime + default Tools + real smoke
node scripts/mqdh.mjs doctor --json # platform, disk, runtime, protocols, network, last error
node scripts/mqdh.mjs repair --json # rebuild staging/index/bootstrap state only
node scripts/mqdh.mjs report list # local redacted diagnostics; submit only with --confirm
node scripts/mqdh.mjs update check --json # application release channel
node scripts/mqdh.mjs network check --json # controlled egress probes per purpose
```
A user-level install tree is produced by `scripts/package.sh`; it contains a bundled Node runtime and `install.sh`, and is separate from `MQDH_HOME`. Distribution, bootstrap, network, diagnostics and releasing contracts live in `docs/mqdh/` (DISTRIBUTION, BOOTSTRAP, NETWORK, DIAGNOSTICS, RELEASING).
## Developer preview
DeepSeek Harness is in _developer preview_ and iterating rapidly. **THERE WILL BE COMPATIBILITY-BREAKING CHANGES.**
+22
View File
@@ -8,6 +8,28 @@ DeepSeek Harness(`dsh`)是由 [DeepSeek AI](https://deepseek.com) 开发的
文档:[https://deepseek-harness.github.io/deepseek-harness/](https://deepseek-harness.github.io/deepseek-harness/)
## Marqdo Harness(下游)
本仓库是 DeepSeek Harness 的 **Marqdo Harness(MQDH)** 下游分支,是 Marqdo 生态的官方单用户应用:安装并校验 Marqdo 运行时,通过公开 CLI 合同执行 `.mq.md` 文稿,维护私人本地知识库,并保留可复用的运行证据。
保留上游历史、MIT 许可与第三方声明。`origin` 为 `https://git.cflmy.cn/cflmy/marqdo-app-harness.git`,`upstream` 为 Gitea DSH 镜像。产品文档位于 `docs/mqdh/`(ARCHITECTURE、STATUS、UPSTREAM、upstream-delta)。
在 checkout 中执行 `pnpm install && pnpm run build` 后,用 `node scripts/mqdh.mjs` 启动;`/mqdh` 工作台与 DSH 客户端共用同一 loopback listener。应用不携带 Marqdo CLI、stdlib、扩展或工具实现,它们由受信任 Gitea Release 安装到应用专属 home。
产品命令(其余参数转发给 DSH 启动器):
```sh
node scripts/mqdh.mjs --version
node scripts/mqdh.mjs bootstrap --json # first-run runtime + default Tools + real smoke
node scripts/mqdh.mjs doctor --json # platform, disk, runtime, protocols, network, last error
node scripts/mqdh.mjs repair --json # rebuild staging/index/bootstrap state only
node scripts/mqdh.mjs report list # local redacted diagnostics; submit only with --confirm
node scripts/mqdh.mjs update check --json # application release channel
node scripts/mqdh.mjs network check --json # controlled egress probes per purpose
```
`scripts/package.sh` 生成用户级安装树(内置 Node 与 `install.sh`),与 `MQDH_HOME` 分离。发行、引导、网络、诊断与发布的详细合同位于 `docs/mqdh/`(DISTRIBUTION/BOOTSTRAP/NETWORK/DIAGNOSTICS/RELEASING)。
## 开发者预览
DeepSeek Harness 处于 _开发者预览_ 阶段,正在快速迭代。**未来将出现破坏兼容性的变更。**
+28 -27
View File
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh",
"description": "dsh CLI: profile launch, plugin management, and configuration inspection",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"publishConfig": {
"access": "public"
},
@@ -29,14 +29,16 @@
"license": "MIT",
"dependencies": {
"@deepseek-ai/cordis": "workspace:~",
"@deepseek-ai/dsh-hmr": "workspace:*",
"@deepseek-ai/cordis-plugin-group": "workspace:~",
"@deepseek-ai/cordis-plugin-include": "workspace:~",
"@deepseek-ai/cordis-plugin-loader": "workspace:~",
"@deepseek-ai/cordis-plugin-timer": "workspace:~",
"@deepseek-ai/dsh-acp-app": "workspace:*",
"@deepseek-ai/dsh-agent-instructions": "workspace:*",
"@deepseek-ai/dsh-agent-preset": "workspace:*",
"@deepseek-ai/dsh-agent-tool-presentation": "workspace:*",
"@deepseek-ai/dsh-app-boot": "workspace:*",
"@deepseek-ai/dsh-atomic-write": "workspace:*",
"@deepseek-ai/dsh-base": "workspace:*",
"@deepseek-ai/dsh-client-ui-agent-preset": "workspace:*",
"@deepseek-ai/dsh-client-ui-cordis": "workspace:*",
@@ -46,18 +48,37 @@
"@deepseek-ai/dsh-compaction-basic": "workspace:*",
"@deepseek-ai/dsh-compaction-tool-result-pruner": "workspace:*",
"@deepseek-ai/dsh-cordis-client-runner": "workspace:*",
"@deepseek-ai/dsh-cua-bundle": "workspace:*",
"@deepseek-ai/dsh-cua-mcp": "workspace:*",
"@deepseek-ai/dsh-deepseek-chat-import": "workspace:*",
"@deepseek-ai/dsh-experimental-auto-review": "workspace:*",
"@deepseek-ai/dsh-experimental-badge-skill-bundle": "workspace:*",
"@deepseek-ai/dsh-experimental-cot-translation-bundle": "workspace:*",
"@deepseek-ai/dsh-experimental-forge-bundle": "workspace:*",
"@deepseek-ai/dsh-experimental-inspector-profile": "workspace:*",
"@deepseek-ai/dsh-experimental-liveshare": "workspace:*",
"@deepseek-ai/dsh-experimental-plugin-market-bundle": "workspace:*",
"@deepseek-ai/dsh-experimental-ralph-bundle": "workspace:*",
"@deepseek-ai/dsh-experimental-session-search": "workspace:*",
"@deepseek-ai/dsh-experimental-session-titles-bundle": "workspace:*",
"@deepseek-ai/dsh-experimental-terminal-bundle": "workspace:*",
"@deepseek-ai/dsh-experimental-tool-worktree": "workspace:*",
"@deepseek-ai/dsh-experimental-voice-input-bundle": "workspace:*",
"@deepseek-ai/dsh-fs-local": "workspace:*",
"@deepseek-ai/dsh-goal": "workspace:*",
"@deepseek-ai/dsh-goal-round-driver": "workspace:*",
"@deepseek-ai/dsh-headless": "workspace:*",
"@deepseek-ai/dsh-hmr": "workspace:*",
"@deepseek-ai/dsh-home-paths": "workspace:*",
"@deepseek-ai/dsh-http-proxy": "workspace:*",
"@deepseek-ai/dsh-jobs-local": "workspace:*",
"@deepseek-ai/dsh-launch-environment": "workspace:*",
"@deepseek-ai/dsh-mcp-client": "workspace:*",
"@deepseek-ai/dsh-mcp-resources": "workspace:*",
"@deepseek-ai/dsh-official-bundles": "workspace:*",
"@deepseek-ai/dsh-persona": "workspace:*",
"@deepseek-ai/dsh-plan-mode": "workspace:*",
"@deepseek-ai/dsh-plugin-manager": "workspace:*",
"@deepseek-ai/dsh-pwsh-local": "workspace:*",
"@deepseek-ai/dsh-pwsh-sandbox": "workspace:*",
"@deepseek-ai/dsh-schedule": "workspace:*",
@@ -69,21 +90,21 @@
"@deepseek-ai/dsh-skill": "workspace:*",
"@deepseek-ai/dsh-skill-filesystem": "workspace:*",
"@deepseek-ai/dsh-skill-office": "workspace:*",
"@deepseek-ai/dsh-tool-workspace-dependencies": "workspace:*",
"@deepseek-ai/dsh-terminal": "workspace:*",
"@deepseek-ai/dsh-terminal-bash": "workspace:*",
"@deepseek-ai/dsh-time-context": "workspace:*",
"@deepseek-ai/dsh-timeline": "workspace:*",
"@deepseek-ai/dsh-tmux-context": "workspace:*",
"@deepseek-ai/dsh-token-meter": "workspace:*",
"@deepseek-ai/dsh-tool-ask-user": "workspace:*",
"@deepseek-ai/dsh-tool-bash": "workspace:*",
"@deepseek-ai/dsh-tool-bash-persistent": "workspace:*",
"@deepseek-ai/dsh-tool-cordis": "workspace:*",
"@deepseek-ai/dsh-tool-present": "workspace:*",
"@deepseek-ai/dsh-tool-fs": "workspace:*",
"@deepseek-ai/dsh-tool-fs-search": "workspace:*",
"@deepseek-ai/dsh-tool-goal": "workspace:*",
"@deepseek-ai/dsh-tool-jobs": "workspace:*",
"@deepseek-ai/dsh-tool-present": "workspace:*",
"@deepseek-ai/dsh-tool-pwsh": "workspace:*",
"@deepseek-ai/dsh-tool-pwsh-persistent": "workspace:*",
"@deepseek-ai/dsh-tool-schedule": "workspace:*",
@@ -94,33 +115,13 @@
"@deepseek-ai/dsh-tool-todo": "workspace:*",
"@deepseek-ai/dsh-tool-web": "workspace:*",
"@deepseek-ai/dsh-tool-workflow": "workspace:*",
"@deepseek-ai/dsh-tool-workspace-dependencies": "workspace:*",
"@deepseek-ai/dsh-web-app": "workspace:*",
"@deepseek-ai/dsh-workflow-ptc": "workspace:*",
"@deepseek-ai/schemastery": "workspace:~",
"commander": "^15.0.0",
"js-yaml": "^4.3.2",
"node-addon-require-builtin": "^0.1.9",
"@deepseek-ai/dsh-http-proxy": "workspace:*",
"@deepseek-ai/dsh-mcp-resources": "workspace:*",
"@deepseek-ai/dsh-plugin-manager": "workspace:*",
"@deepseek-ai/dsh-atomic-write": "workspace:*",
"@deepseek-ai/dsh-agent-preset": "workspace:*",
"@deepseek-ai/dsh-experimental-voice-input-bundle": "workspace:*",
"@deepseek-ai/dsh-experimental-auto-review": "workspace:*",
"@deepseek-ai/dsh-experimental-cot-translation-bundle": "workspace:*",
"@deepseek-ai/dsh-experimental-badge-skill-bundle": "workspace:*",
"@deepseek-ai/dsh-experimental-ralph-bundle": "workspace:*",
"@deepseek-ai/dsh-experimental-session-titles-bundle": "workspace:*",
"@deepseek-ai/dsh-experimental-terminal-bundle": "workspace:*",
"@deepseek-ai/dsh-experimental-liveshare": "workspace:*",
"@deepseek-ai/dsh-experimental-session-search": "workspace:*",
"@deepseek-ai/dsh-experimental-tool-worktree": "workspace:*",
"@deepseek-ai/dsh-cua-bundle": "workspace:*",
"@deepseek-ai/dsh-cua-mcp": "workspace:*",
"@deepseek-ai/dsh-timeline": "workspace:*",
"@deepseek-ai/dsh-experimental-plugin-market-bundle": "workspace:*",
"@deepseek-ai/dsh-experimental-forge-bundle": "workspace:*",
"@deepseek-ai/dsh-deepseek-chat-import": "workspace:*"
"node-addon-require-builtin": "^0.1.10"
},
"devDependencies": {
"@deepseek-ai/dsh-brand": "workspace:*",
@@ -188,6 +189,6 @@
"./package.json": "./package.json"
},
"engines": {
"node": ">=24.9.0"
"node": "^24.22.3 || >=26.13.1"
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh-desktop-host",
"description": "Private Node-mode host process for the Electron desktop application",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"private": true,
"license": "MIT",
"type": "module",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@deepseek-ai/dsh-desktop-publisher",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"description": "Private Desktop release metadata, rollout and website publisher",
"private": true,
"type": "module",
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh-desktop",
"description": "Electron desktop shell for a bundled dsh runtime and external plugins",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"private": true,
"license": "MIT",
"author": {
@@ -73,7 +73,7 @@
"@types/semver": "^7.8.0",
"app-builder-lib": "26.17.0",
"cos-nodejs-sdk-v5": "3.0.0",
"electron": "^44.7.0",
"electron": "^44.11.5",
"electron-builder": "^26.17.0",
"extract-zip": "^2.0.1",
"js-yaml": "^4.3.2",
@@ -1,11 +1,11 @@
{
"windows": {
"electron": "44.7.0",
"electron": "44.11.5",
"electron-updater": "6.8.9",
"builder-util-runtime": "9.7.0"
},
"macos": {
"electron": "44.7.0",
"electron": "44.11.5",
"electron-updater": "6.8.9",
"builder-util-runtime": "9.7.0"
}
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh-plugin-market-generator",
"description": "Reference generator of plugin market index files from a list of npm packages and Git repositories",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"private": true,
"type": "module",
"scripts": {
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh-web-frontend",
"description": "Web application entry: vite build over the @deepseek-ai/dsh-client-web shell library; dist/ served by apps/cli's dsh web",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"publishConfig": {
"access": "public"
},
+4 -4
View File
@@ -9,8 +9,8 @@
en: 5207d17725c07a27
zh: 258884c4300ac63a
/development-guide/setup-tutorial/prerequisites:
en: 89e7008a741a290a
zh: 78012740025203b0
en: 0bf77d9e2203102d
zh: 67516252ca96151e
/development-guide/setup-tutorial/windows-and-wsl-2:
en: e86be579be6f1813
zh: 14f6a220337d0861
@@ -27,8 +27,8 @@
en: 9a0b2f1a520cfc68
zh: 62c9ec565909f605
/development-guide/contributor-reference/git-integrations:
en: 075658ecfc10da20
zh: 69e664417bbde87e
en: 1e1514e49dfbb938
zh: fe2312200a5b7118
/development-guide/contributor-reference/ci-gates:
en: dfa3a24d9070478f
zh: fa889b3536ab58e2
+2 -2
View File
@@ -8,7 +8,7 @@ The setup tutorial takes a new contributor from prerequisites to a checked check
### Prerequisites
- 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 24.22.3 or a newer 24.x release, or Node.js 26.13.1 or newer. CI covers 24.22.3, 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 `pnpm@11.28.5` 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.
@@ -149,7 +149,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.9, 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.22.3, 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.
+2 -2
View File
@@ -10,7 +10,7 @@
### 前置条件
- 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 要求 24.22.3 或更高的 24.x 版本,或 26.13.1 或更高版本。CI 覆盖 24.22.3、最新的 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` 中固定使用 `pnpm@11.28.5`;如果 `pnpm --version` 无法通过 Corepack 解析,请先运行 `corepack enable`。
- Git 2.26 或更高版本;钩子设置会启用 Git 的 worktree 专属配置扩展。
@@ -154,7 +154,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.9、最新的 24 和 26 兼容性矩阵。
除限定范围的配对和提供方元数据检查外,这些钩子有意不运行测试、快照、文档检查、构建或 `hygiene`。贡献者只运行一次[与改动行为相关的检查](../AGENTS.md#run-relevant-checks-locally);CI 负责全量覆盖率门禁、构建产物冒烟测试,以及 Node 24.22.3、最新的 24 和 26 兼容性矩阵。
贡献者可以选择运行 `pnpm run check:all`,执行全面的本地门禁集。该命令独立于 Git 钩子,也不是对 agent 的指令。
+180
View File
@@ -0,0 +1,180 @@
# Marqdo Harness(MQDH)架构
Marqdo Harness 是 Marqdo 生态的官方单用户应用:一个基于 [DeepSeek Harness](https://git.cflmy.cn/cflmy/deepseek-harness)(DSH)的下游 fork。 它复用 DSH 的模型接入、Agent Loop、会话、事件、工具审批和 Web 外壳,新增四类产品能力:
1. **生态管理**:发现、安装、验证、切换与回退 Marqdo CLI / Bundle / Tool / Ext;
2. **文稿原生程序化执行(Marqdo PTC)**:以完整 `.mq.md` 为程序化调用单元,
经官方 `check` / `run` / `call` 与 Observation 1 产生可核对结果;
3. **私人知识库**:本地静态知识集合的导入、编译、检索、引用与沉淀;
4. **成果复用**:运行证据、离线阅读、知识候选与再次执行。
现行产品状态以 [STATUS.md](STATUS.md) 为准;本文描述边界和组件关系,不声称门禁已通过。
## 1. 与 DSH 的关系
| 能力 | 归属 | MQDH 的处理 |
| --- | --- | --- |
| Agent Loop、模型适配、会话、持久事件、工具门禁、取消、子任务 | DSH 上游 | 复用,不建立第二套状态机 |
| Cordis、Profile、Bundle、Web 外壳 | DSH 上游 | 保留;产品通过唯一 `mqdh` profile 叠层 |
| 文件、Shell、MCP 等通用工具 | DSH 上游 | 保留受控基础能力;关闭插件管理与默认外联 |
| 生态安装 / 更新 | MQDH 下游 | `@marqdo/mqdh-harness` 的 ecosystem 模块 |
| 文稿执行 | MQDH 下游 | `marqdo_program` 单一模型入口 |
| 私人知识 | MQDH 下游 | 集合、导入、索引适配、检索与授权 |
| 产品页面 | MQDH 下游 | 复用 DSH Web 的 webserver route,新增 `/mqdh` 工作台 |
上游身份、同步规则和下游修改清单见 [UPSTREAM.md](UPSTREAM.md) 与 [upstream-delta.md](upstream-delta.md)。任何对上游包的修改都必须先登记在 delta 中。
## 2. 仓库与包
```text
apps/harness/ # 独立应用仓库(父仓 gitlink:apps/harness)
├── packages/marqdo/harness/ # @marqdo/mqdh-harness:Cordis 插件与产品服务
│ ├── src/core/ # home、原子写、锁、进程、Observation、ValueWire、tar
│ ├── src/network/ # 唯一出口:用途策略、代理、镜像、离线、审计
│ ├── src/platform/ # 唯一平台探测与发布目标矩阵
│ ├── src/release/ # 应用发行清单、签名、Gitea 发现
│ ├── src/ecosystem/ # 信任来源、安装事务、环境、回退、Tool 安装
│ ├── src/bootstrap/ # 首次启动状态机、doctor、repair
│ ├── src/distribution/ # 安装根、应用更新/回退/卸载
│ ├── src/diagnostics/ # 脱敏报告、去重、Gitea Issue 提交
│ ├── src/knowledge/ # 私人知识集合、导入、索引适配、检索
│ ├── src/execution/ # Analysis 3、CLI argv、审批、证据
│ ├── src/cli/ # 产品命令(bootstrap/doctor/repair/report/update/network)
│ ├── src/tools/ # 面向模型的六个操作
│ ├── src/web/ # /mqdh 页面与同源只读/受控写 API
│ └── tests/ # node:test 单元与真实 CLI/Release 集成
├── packages/marqdo/bundle/ # @marqdo/mqdh-bundle:唯一产品 profile patch
├── scripts/mqdh.mjs # 唯一产品启动器(产品命令/DSH 转发)
├── scripts/ci.sh # 组件 CI 入口
├── scripts/package.sh # 归档 + 冷安装 + 发行清单
├── scripts/install.sh # 用户级安装/卸载(随归档分发)
├── scripts/release-manifest.ts # 发行清单/签名/证据
├── scripts/release.ts # Gitea 发布(默认 dry-run)
└── scripts/upstream.sh # 上游同步候选
```
`@marqdo/mqdh-harness` 在运行期只依赖 Node 内置模块和 Cordis 注入的服务,不 import 上游包的实现。这样应用可以独立构建/测试,也避免复制上游状态机。上游包只通过 `ctx.tools`、`ctx.approval`、`ctx.systemPrompt`、`ctx.webServer` 等公开 seam 使用。
## 3. 产品装配
唯一正式入口是 `scripts/mqdh.mjs`(安装后命令 `mqdh`),唯一产品 profile 是 `mqdh`:
```json
{
"dsh": { "profile": { "bundles": [
"@deepseek-ai/dsh-base",
"@deepseek-ai/dsh-web-app",
"@marqdo/mqdh-bundle"
] } }
}
```
`@marqdo/mqdh-bundle/cordis.patch.yml` 在 base + web-app 之上:
- 插入 `mqdh-harness` 与 `mqdh-web` 两行;
- 关闭 `preset-ptc`(DSH 默认 Node PTC 模型入口),只保留 `marqdo_program`;
- 关闭 `plugin-manager` 服务与插件 market/manager 工具;
- 关闭 `session-log-deepseek`、`session-telemetry-otel`、`message-feedback`;
- 关闭默认 web search/fetch 工具与 DeepSeek 外联;
- 保留 bash/fs 沙箱与审批链,默认 `workspace-write`。
扫描 `--dump-config` 可以核对有效装配;MQDH 不在运行期探测或降级到第二套协议。
## 4. 应用 home 与数据
```text
MQDH_HOME/ # 默认 $XDG_DATA_HOME/marqdo-harness,0700
├── harness/ # DSH profile/session/config(应用专属)
├── ecosystem/
│ ├── artifacts/ # 已验收的内容身份(只读)
│ ├── staging/ # 未激活候选
│ ├── environments/ # 一组 CLI + Bundle + Tool home
│ ├── current.json # 原子活动指针
│ └── install.lock
├── knowledge/
│ ├── sources/<collection>/ # 用户导入的原文副本
│ ├── collections.json # 集合元数据与 revision
│ └── index/<collection>/ # 可重建的 Knowledge Tool 索引
├── workspaces/ # 用户项目
├── evidence/
│ ├── runs/ # 运行证据(0600,本机)
│ ├── bootstrap/ # 首次启动终态证据
│ ├── network/audit.jsonl # 出口审计(无正文/密钥)
│ └── reports/<id>/ # 脱敏诊断报告、摘要、附件
└── config/ # 产品配置
├── bootstrap.json # 唯一引导状态
├── product.json # 首次完成标记
├── update.json # 应用更新缓存与历史
├── network.json # 可选出口覆盖
└── credentials.json # 用户提供的 Gitea token(0600)
```
规则:
- 不覆盖用户已有的 `~/.dsh`;DSH home 固定在 `MQDH_HOME/harness`。
- 任务启动时固定环境 ID、CLI 绝对路径、Tool home、Bundle 与锁摘要;之后不从
`current` 再解析。
- 活动环境与回退目标不会被清理;staging 与未被引用的环境可受控清理。
- 运行证据只记录引用与摘要,不把完整私有知识或模型密钥写入日志。
## 5. 文稿执行生命周期
```text
模型写/改工作区 .mq.md
-> marqdo_check: 绝对 CLI check --emit analysis.json(只读,Analysis 3)
-> 冻结 source digest / Analysis digest / env / grants
-> 审批(ctx.approval,一次授权只对本次 action)
-> marqdo_program: 固定 argv 的 run/call,--output jsonl/json + --observation-file
-> 校验 Observation 1:schema、run_id、连续 seq、唯一终态、Analysis digest
-> 有界结果 + evidence 引用;原始事件保存在 0600 证据文件
```
- 模型不能提供任意 CLI argv、绝对路径根、URL 或授权 flags;`path` 必须在工作区内。
- `pure` 不带任何资源 grant;`project`/`strict` 的 grant 由审批后映射为精确 flags。
- 不用 stdout 最后一行或模型“成功”字样判定完成;EOF 无终态即 `incomplete`。
- 同一次运行只产生一个序号序列;DSH 事件只保存引用/摘要。
- 源文稿、锁或输入改变后,旧证据标记 `stale`,不会冒充当前结果。
## 6. 私人知识
- 集合由用户创建;导入默认复制到 `knowledge/sources`,原文件不被修改。
- 导入拒绝越界路径、符号链接、特殊文件、超限、大小写/NFC 冲突;
`.mq.md` 或含执行区域的内容不得作为静态知识导入。
- 检索优先调用已安装的 `marqdo-knowledge` 公开命令
(`compile` / `check` / `query --format json`),消费 `marqdo.knowledge.result` v1 的 `hits[].source` 身份;索引与源摘要不匹配即标记过期。
- 没有 Knowledge Tool 时只提供明确披露的只读文件定位器(`mode: "locator"`,
`indexed: false`),不伪造编译/索引完成。
- 搜索结果必须包含集合、源相对路径、摘要、标题/锚点和片段;模糊查询只返回候选。
- 知识文本是低信任输入,不作为系统级指令拼接;知识不授予执行、安装或网络权限。
## 7. Web 工作台
`/mqdh` 是 DSH Web 内的真实服务器渲染工作台(同一 webserver、同一 loopback 绑定)。生态目录固定按 Runtime → Tool → Std → Ext → Knowledge 展示真实来源;打开/筛选无副作用,候选检查、项目锁检查与 Tool 变更由按钮显式发起。Ext 只显示项目文件摘要,语义检查由 CLI `sync --locked --json` 承担:
- Runtime:CLI/Bundle/平台/环境 ID/遥测关闭状态;
- Knowledge:集合、导入(浏览器上传文本/文件)、搜索、删除、导出;
- Ecosystem:四层实际状态、候选版本、安装/回退(真实事件与错误);
- Runs:真实运行记录、结果来源、fresh/stale、证据链接;
- Settings/Diagnostics:home、工作区、脱敏诊断与责任仓链接。
写操作要求同源 `Host`/`Origin`/`Sec-Fetch-Site` 校验,只接受 POST/PUT/DELETE; 页面与静态资源仅由同一 listener 提供,不依赖在线字体、第三方脚本或危险 HTML。
## 8. 安全边界
- 默认只绑定 loopback;远程绑定需要显式配置并自行承担认证/隔离。
- 关闭上游默认会话上传、反馈会话日志、独立 DeepSeek session log 与遥测。
- 模型密钥只用于模型通信,不进入 Marqdo 子进程环境;子进程用 allowlist 环境。
- 固定 argv、绝对可执行路径、进程组终止、超时/输出上限;不把 `project` 或
worker 名称当成 OS 隔离证明。
- 生态安装只接受 Gitea 权威 release 的不可变 tag、资产名、平台、大小与 SHA-256;
安全解包拒绝链接/特殊文件/越界;失败保留旧组合。
- 私人知识、完整会话、路径、环境变量、密钥和用户源码默认不进入诊断对外内容。
## 9. 出口、发行与引导边界
- **唯一网络出口**:`src/network` 是产品自有出站的唯一实现;组件发现/下载、引导、应用更新、Issue 提交都走它。模型传输仍归上游 DSH,`model` 用途只做策略分类/探测/审计。
- **唯一平台表**:`src/platform/detect` 决定 target/glibc/Node/磁盘;Bootstrap、更新、doctor 共用,未发布平台明确拒绝。
- **唯一发行清单**:应用用 `src/release/manifest.ts` 的 `mqdh-release.json`;组件继续使用其既有 `RELEASE_INFO.json` 合同,二者不互相替代。
- **安装与数据分离**:应用安装树在 `MQDH_INSTALL_ROOT`(默认 `~/.local/opt/mqdh`),用户数据/运行时在 `MQDH_HOME`;更新不改变运行时,运行时升级不重装应用。
- **诊断先本地后外发**:捕获只写本地脱敏报告;提交必须用户确认,且只通过 `purpose=issue` 的统一出口。
- **启动顺序**:Web 首次启动页/`mqdh bootstrap` 使用同一 `BootstrapManager`;没有第二套安装器或进度实现。
+87
View File
@@ -0,0 +1,87 @@
# 首次启动引导
实现:`packages/mqdh-harness/src/bootstrap/manager.ts`;命令:`mqdh bootstrap`、`mqdh doctor`、`mqdh repair`;Web:`/mqdh` 的“首次启动”页。应用自身不携带 Marqdo 源码或二进制。
## 1. 状态与文件
| 文件 | 内容 |
| --- | --- |
| `MQDH_HOME/config/bootstrap.json` | 唯一的引导状态:status/phase/steps/candidate/environment/tools/smoke/last_error/evidence |
| `MQDH_HOME/config/product.json` | 首次完成标记:产品、应用版本、通道、环境 ID |
| `MQDH_HOME/config/bootstrap.lock` | 单实例锁 |
| `MQDH_HOME/evidence/bootstrap/*.json` | 每次终态证据(0600) |
状态:`never → running → ready | degraded | failed`。`degraded` 表示运行时已激活但某个默认 Tool 失败或跳过;`failed` 表示没有激活新环境,旧环境保持可用。
## 2. 步骤
```text
platform 检测 target/glibc/Node/磁盘/bwrap/CA;不支持或磁盘不足 fail-closed
home 清理未激活 staging;检查 current 环境结构
candidate release:按通道解析最新 CLI;offline:校验本地归档
download 真实字节进度;中断后重启先清理 staging 再重来
activate 摘要/tag/source/平台/RELEASE_INFO/Bundle/协议校验 → 解包 → CLI smoke → 原子切换
smoke-runtime 在候选内真实 check + call,要求 Observation completed 且值为 120
tools 默认安装 knowledge、view Tool(受信任 Release → tool.json → CLI tool install)
smoke-knowledge 在已激活环境真实 compile + query,要求 mode=compiled 且命中>0
onboard 写 product.json,记录终态证据
```
`smoke-runtime` 在切换 `current.json` 之前执行;失败不会激活候选。`smoke-knowledge` 在激活后执行,失败或 Tool 缺失只把状态标为 `degraded`,并明确披露 locator 模式,不回滚可用运行时。
## 3. 幂等、恢复与并发
- 已有 `status=ready`、环境结构健康且 knowledge Tool 已安装时,第二次 `bootstrap` 只校验并写完成标记,不访问网络(实测约 0.2s)。
- `--force` 忽略复用,重新执行完整事务。
- `bootstrap.lock` 保证单实例;生态安装另有 `install.lock`,两个事务不能并发改 `current.json`。
- 启动时清理 `ecosystem/staging` 下未激活目录;不会把未验证 staging 当作已安装。
- `current.json` 只在全部校验与 smoke 通过后原子替换;失败保留旧环境与回退目标。
## 4. 通道
`--channel stable` 只接受 Gitea 非 prerelease;当前 CLI 只有 rc 发行,因此会回退到最新 beta 并在状态与证据中写 `runtime_channel: "beta-fallback"`,不伪装成 stable。`--channel beta` 直接接受 prerelease。应用自身的更新通道见 [DISTRIBUTION.md](DISTRIBUTION.md),两者不共用候选。
## 5. 离线
`mqdh bootstrap --offline <dir>`(或 `MQDH_BOOTSTRAP_OFFLINE`)从本地目录安装:
- 运行时归档名必须匹配 `marqdo-<version>-<target>.tar.gz`;有 `.sha256` 则使用,否则本地计算摘要并记录。
- Tool 归档为 `marqdo-knowledge-...`/`marqdo-view-...`;缺失时标记 `skipped` + `bootstrap.offline_tool_missing`。
- 解包后仍校验 `SOURCE_SHA`、`RELEASE_INFO.json`、二进制摘要、Bundle digest、Analysis 3/Observation 1 与真实 smoke;离线不等于放宽校验。
## 6. 失败处理
| 失败 | code | 行为 |
| --- | --- | --- |
| 平台不支持 | `bootstrap.platform_unsupported` | 不下载 |
| 磁盘不足 | `bootstrap.disk_insufficient` | 不写 staging |
| 下载/摘要/大小 | `bootstrap.<network code>` / `bootstrap.install_failed` | 清理 staging,不切换 |
| smoke 失败 | `bootstrap.smoke_failed` | 不激活候选 |
| Tool 失败 | `bootstrap.<release/ecosystem code>` | 运行时保留,状态 degraded |
| 知识 smoke | `bootstrap.knowledge_failed` | 状态 degraded,保留真实 index 状态 |
失败会调用诊断存储生成脱敏本地报告,`report_id` 写入 `last_error`。CLI 退出码:`failed` 为 1,`degraded` 为 0(运行时可用但披露缺项)。
## 7. doctor 与 repair
`mqdh doctor --json` 输出应用版本、安装根、平台、磁盘、网络配置与最近出口、运行时/Bundle/协议/Tool、引导状态、最近错误和逐项检查;`overall` 为 `ok|warn|fail`。
`mqdh repair --json` 只做:
1. 清理 staging;
2. 检查 current 环境 CLI/RELEASE_INFO/Bundle 结构(不删除、不切换);
3. 对每个启用集合真实重编索引;
4. 用实际状态重写 `bootstrap.json`。
不删除用户知识、不删除 current/回退环境、不安装或升级运行时。环境损坏时返回 `needs_install` 并提示运行 `mqdh bootstrap`。
## 8. 验收
真实证据(`MQDH_TEST_INSTALL=1`,本机 Linux x86_64):
```sh
node --import tsx/esm --test packages/marqdo/harness/tests/bootstrap.test.ts
# ready;CLI rc.6;Bundle db905508…;knowledge/view 安装;smoke value=120;knowledge mode=compiled hits=3;二次复用;doctor ok;repair repaired
```
未验证:macOS/Windows 首次启动、第二台干净主机、真实弱网/断网、大文件续传、企业代理下的引导。
+83
View File
@@ -0,0 +1,83 @@
# 诊断与 Issue 提交
实现:`packages/mqdh-harness/src/diagnostics/`;命令:`mqdh report ...`;Web:`/mqdh` 的“诊断报告”页;也有只读 `/mqdh/api/diagnostics` 预览。
原则:**错误默认只记录在本地;用户核对脱敏后的完整内容并明确确认后才发送。** 没有遥测、崩溃自动上传或后台发送。
## 1. 捕获点
| 来源 | code 前缀 | 已接入 |
| --- | --- | --- |
| Bootstrap | `bootstrap.*` | 失败统一经 `DiagnosticsSink.capture` |
| 生态安装 | `bootstrap.install_failed` | 经 Bootstrap 汇总 |
| 网络 | `bootstrap.network_*`、`submit_*` | 结构化 `NetworkError` |
| Web | `web.request_failed` | 路由未预期异常(4xx 不记录) |
| 应用更新 | `update.*` | CLI/Web 抛出稳定错误码 |
| 知识 | `bootstrap.knowledge_failed` | 引导 smoke 与 repair |
| CLI 执行 | 既有运行证据 | 证据记录 run_id/Analysis;报告可引用 |
模型文本、知识正文不能触发报告或提交;提交入口不注册为模型工具。
## 2. 本地报告
`MQDH_HOME/evidence/reports/<report_id>/`(目录 0700,文件 0600):
```text
report.json schema/version、report_id、fingerprint、occurrences、identity、
error{code,area,phase,message,cause_chain}、detail、reproduction、
evidence{run_id,analysis_digest,asset_sha256}、redaction、target、attachments、status、issue
summary.md 用户可读摘要与脱敏字段
attachments/ 用户显式选择的附件(≤4 MiB/个,上传时再次校验路径)
```
`MQDH_HOME/evidence/reports/index.json` 保存轻量索引、提交时间与去重信息。相同 fingerprint 在 24h 内只保留一个报告并累加 `occurrences`;不同消息中的数字/长十六进制会归一化后再计算指纹。
## 3. 脱敏
写入前执行(`redact.ts`):
- `MQDH_HOME` → `$MQDH_HOME`,工作区 → `$WORKSPACE`,用户 home → `$HOME`;
- 主机名 → `$HOST`,用户名 → `$USER`;
- 环境变量中名称匹配 token/secret/password/credential/api_key/private_key 的值 → `$SECRET`(公开发行公钥除外);
- `authorization: …`、`token=…`、URL userinfo → `$REDACTED`;
- 对象中敏感键整项删除,记录 `fields_removed`;深度 8、数组 100、字符串 8 KiB 上限;
- cause chain 最多 5 层,每层同样脱敏。
Issue 正文不含私人知识正文、完整会话、模型密钥或真实网络凭据;只保留错误码、阶段、版本/SHA、平台、协议、命令形状与最小证据引用。
## 4. 提交
```sh
mqdh report list [--json]
mqdh report show <id> [--json]
mqdh report export <id> --out <dir>
mqdh report submit <id> --confirm [--repo owner/name] [--title ...] [--body ...] [--attach name]... [--offline]
mqdh report token --stdin # 从 stdin 读取 token,不进入 argv
mqdh report delete <id> --confirm
```
Web 预览会返回将发送的**完整 title/body**,用户可编辑;必须勾选确认。若输入 token,则保存到 `MQDH_HOME/config/credentials.json`(0600)。
规则:
- 默认目标由区域路由:CLI→`cflmy/marqdo-cli`、knowledge→`cflmy/marqdo-knowledge`、view→`cflmy/marqdo-view`、app/bootstrap/network/update/web→`cflmy/marqdo-app-harness`、stdlib/ext→对应组件仓(提供 subject 时)否则治理仓。
- 目标仓库可用 `--repo` 修改,但必须匹配 `owner/name`;实际权限由 Gitea 返回的错误展示。
- 同 fingerprint 在 24h 内已有 Issue 时,追加评论而不是新建;无 Issue URL 时只本地计数。
- 每用户每小时最多 5 次提交(可配置);超限提示本地保留。
- 离线提交只入队(`status=queued`),恢复后由用户再次确认发送。
- 创建成功后把 issue URL 写回报告与索引;附件上传失败不回滚 Issue,逐项返回错误。
- 附件只从报告目录读取,拒绝越界/符号链接/超 4 MiB;上传使用 multipart。
## 5. 安全
- 只有 HTTPS;目标 host 受出口策略(`purpose=issue`)与配置约束;证书校验不可关闭。
- token 不出现在 URL、报告、审计、日志、Issue 正文或 Web 响应;审计不记录请求头。
- 提交必须 `confirm: true`,且 Web 再要求勾选;没有后台/定时发送。
- 删除报告不会撤回已提交 Issue(界面与文档均提示)。
- 目标仓库与 token 由用户提供;应用不持有跨仓写权限,不自动代表用户建单。
## 6. 验收
`tests/diagnostics.test.ts` 真实本地 HTTP Gitea 替身覆盖:脱敏(路径/token/敏感键)、去重计数、显式确认、token 私有保存且不回显、新建议题、同指纹评论、附件上传与越界拒绝、离线队列、小时限额、删除/导出、无 token 时不发请求。
未验证:真实公网 Gitea 组织权限差异、企业 broker、Issue 模板/标签在各仓的最终形态、Web 文件选择上传(当前附件通过 CLI/导出准备)。
+96
View File
@@ -0,0 +1,96 @@
# 应用发行、安装与更新
MQDH 是**默认对外发行**的单用户应用:用户下载安装包,在自己的电脑上安装,不依赖 Rust、Node、pnpm 或源码 checkout。应用安装与 `MQDH_HOME`(会话、私人知识、运行证据、Marqdo 运行时)严格分离。
## 1. 平台矩阵
| 平台 | 首版 | 状态 |
| --- | --- | --- |
| Linux x86_64 glibc ≥ 2.39 | `.tar.gz`(内置 Node 运行时 + 用户级 `install.sh`) | 已构建并冷安装验证 |
| Linux aarch64 | 未发布 | `UNVERIFIED`;不生成同名制品 |
| macOS arm64/x64 | 未发布 | `UNVERIFIED`;没有签名/公证证书 |
| Windows x64/arm64 | 未发布 | `UNVERIFIED` |
`detectPlatform` 对未发布目标返回 `supported=false` 与具体原因;更新检查在下载前按 manifest 的 target/min_glibc/Node/CLI 兼容范围拒绝。应用不继承 DSH 桌面或官方发布声明。
## 2. 安装布局
```text
MQDH_INSTALL_ROOT/ # 默认 ~/.local/opt/mqdh
├── versions/<version>-<sha12>/ # 不可变应用树(含 runtime/node、scripts、apps、packages)
├── staging/ # 更新候选(未激活)
├── current.json # 原子活动版本指针(schema/version/install_id/source_sha/previous)
└── bin/mqdh # 生成的用户级启动器(读 current.json)
~/.local/bin/mqdh # 可选符号链接
MQDH_HOME/ # 用户数据,卸载默认保留
```
`install.sh` 支持 `--prefix`、`--no-path`、`--uninstall`;卸载只删除安装树与指向它的 wrapper,保留 `MQDH_HOME`。安装/卸载不需要 root,不写系统目录,不修改全局 PATH。
`mqdh` wrapper 优先使用安装树内的 `runtime/node`,否则要求系统 Node ≥ 24;应用包因此不要求用户预装 Node。`SOURCE_SHA` 与 `packages/marqdo/harness/package.json` 固定应用身份。
## 3. 发行合同
`mqdh-release.json`(一个平台一个文件)由 `scripts/release-manifest.ts` 生成:
```json
{
"schema": "marqdo.mqdh.release",
"schema_version": 1,
"app": { "name": "marqdo-harness", "command": "mqdh", "version": "0.1.0",
"source_sha": "<40hex>", "dsh_upstream_sha": "<40hex>", "node": "v24.22.3" },
"platform": { "target": "x86_64-unknown-linux-gnu", "os": "linux", "arch": "x64",
"min_glibc": "2.39", "minimum_os": null },
"channel": "stable",
"asset": { "name": "marqdo-harness-0.1.0-x86_64-unknown-linux-gnu.tar.gz",
"size": 782566718, "sha256": "<64hex>", "target": "x86_64-unknown-linux-gnu" },
"compatibility": { "cli": ">=3.0.0-rc.6 <4.0.0", "bundle": ">=0.1.0",
"protocols": { "analysis": 3, "observation": 1 }, "node": ">=24.22.3" },
"known_limits": [],
"published_at": "…",
"signature": { "algorithm": "ed25519", "key_id": "ed25519:…", "value": "<base64>" }
}
```
- tag:`mqdh-v<version>`;资产命名:`marqdo-harness-<version>-<target>.tar.gz`,禁止同名覆盖。
- 同 Release 至少包含:归档、`.sha256`、`mqdh-release.json`、`release-evidence.json`;有签名时附 `mqdh-release.json.sig`。
- 签名:Ed25519,签名覆盖“去掉 `signature` 字段后的 canonical JSON”。公钥通过 `MQDH_RELEASE_PUBLIC_KEY` 配置;没有公钥时 `unsigned` 明确披露,不伪造。发布流水线只有提供 `MQDH_RELEASE_PRIVATE_KEY`/`MQDH_RELEASE_PUBLIC_KEY` 才生成签名。
- `channel`:版本含 prerelease 后缀即 `beta`,否则 `stable`;应用更新不跨通道自动切换。
- 应用发布名、包名、发行地址与 DeepSeek 官方 DSH 完全分离。
## 4. 更新
```sh
mqdh update check [--json] [--channel stable|beta] [--force]
mqdh update install --confirm [--version <v>] [--json]
mqdh update rollback --confirm [--json]
```
流程:检查(默认 30 分钟缓存,`--force` 立即)→ 版本/平台/glibc/Node/CLI 兼容判断 → 下载到 `staging` → SHA-256/大小 → 解包 → `SOURCE_SHA`、产品版本、`scripts/mqdh.mjs`、`apps/cli/lib/bin.js` 校验 → 用内置 Node 运行候选 `--version` smoke(临时 home)→ 原子写 `current.json` → 保留上一版本供回退。
- 运行中的进程继续使用已加载的版本;**下一次启动**由 wrapper 读取新指针。活跃任务不因更新切换环境。
- 失败关闭:摘要/平台/兼容/smoke 任一失败都不改指针,staging 清理。
- 更新不触碰 `MQDH_HOME/ecosystem`;Marqdo 运行时仍由 Bootstrap/生态中心独立管理。
- 应用仓库当前为私有开发仓时,匿名检查返回 403/404,状态显示 `update.unavailable`(不是伪造“已是最新”)。正式发行需公开仓库或显式配置凭据。
## 5. 构建与发布
```sh
pnpm install --frozen-lockfile
pnpm run build # 10/10 gates
MQDH_PACKAGE_WORK=/path bash scripts/package.sh
# .ci/: 归档、.sha256、mqdh-release.json、release-evidence.json、package-evidence.json
MQDH_GITEA_TOKEN=... node scripts/release.ts --version 0.1.0 \
--source "$(git rev-parse HEAD)" --assets .ci # dry-run
MQDH_GITEA_TOKEN=... node scripts/release.ts ... --publish # 不可变发布
```
`package.sh` 会从**归档**做一次冷安装:解包到干净目录、`install.sh --prefix`、`mqdh --version`、`mqdh doctor --json`、`mqdh --dump-config`,并把版本/schema/结果写入 `package-evidence.json`。生产发布顺序:同 SHA CI 通过 → 构建 → 冷安装 → 生成/签名 manifest → 上传权威 Gitea Release → 保存证据。生产签名、macOS/Windows、第二台干净主机、真实回滚演练仍未验证,见 [STATUS.md](STATUS.md)。
## 6. 边界与非目标
- 不做应用商店、静默自动升级、遥测、账号或多租户。
- 不把 Marqdo CLI/stdlib/ext/tool 源码或二进制打进应用安装包。
- 不新建第二套包管理器/锁/发行索引;复用 Gitea Release 与 `mqdh-release.json`。
- 未验证平台不得出现在发行清单;不伪造签名/公证。
+102
View File
@@ -0,0 +1,102 @@
# 网络出口合同
本文件是 MQDH 自有出站请求的唯一规范。实现位于 `packages/marqdo/harness/src/network/`,由 Bootstrap、Distribution、Diagnostics 与 `mqdh network` 共同消费。运行时模块不再各自调用 `fetch`。
## 1. 用途闭集
`purpose` 只允许下列值;未知用途直接拒绝。
| purpose | 默认目标 | 触发 | 默认 |
| --- | --- | --- | --- |
| `release` | `https://git.cflmy.cn` | 发现/下载组件 Release | 允许(仅权威源或已配置镜像) |
| `bootstrap` | 同上 | 首次启动解析候选 | 允许(仅权威源或已配置镜像) |
| `update` | 同上 | 应用发行清单/安装包 | 允许(仅权威源或已配置镜像) |
| `issue` | 配置的 Gitea API | 用户确认后提交 Issue | 允许(仅确认时) |
| `model` | 用户配置的模型端点 | 出口探测/审计 | 仅显式 `allowed_hosts` |
| `knowledge-embedding` | 用户配置的端点 | 可选 | 仅显式 `allowed_hosts` |
模型 API 的实际传输仍由上游 DSH 的模型适配器负责;MQDH 的网络服务负责产品自有出口、策略展示与审计,不建立第二套模型传输。
默认禁止:遥测、反馈上传、第三方 CDN/字体/脚本、任意 URL、内网扫描。云端 metadata 地址(`169.254.169.254`、`fd00:ec2::254`、`100.100.100.200`)使用独立拒绝码。
## 2. 配置
默认值写在 `defaultNetworkConfig()`;用户配置为 `MQDH_HOME/config/network.json`(0600),未知键直接报错,避免拼写错误静默放宽策略。
```json
{
"schema": "marqdo.mqdh.network",
"schema_version": 1,
"offline": false,
"release_authority": "https://git.cflmy.cn",
"issue_endpoint": "https://git.cflmy.cn/api/v1",
"allowed_hosts": ["model.example:443"],
"allow_loopback": ["127.0.0.1:8080"],
"allow_private": ["gitea.internal:443"],
"mirrors": { "release": "https://mirror.example/marqdo" },
"proxy": { "http": null, "https": "http://proxy.example:3128", "no_proxy": ["git.cflmy.cn"] },
"ca_file": "/etc/ssl/certs/ca-certificates.crt",
"max_redirects": 3,
"timeout_ms": 120000,
"max_bytes": 536870912,
"audit": true
}
```
环境变量覆盖:
- `MQDH_OFFLINE=1`、`MQDH_PROXY`、`HTTPS_PROXY`/`HTTP_PROXY`、`NO_PROXY`、`MQDH_CA_FILE`
- `MQDH_RELEASE_AUTHORITY`、`MQDH_ISSUE_ENDPOINT`(测试或企业镜像)
- `MQDH_RELEASE_PUBLIC_KEY`(发行清单签名公钥)
## 3. 校验顺序
`classifyUrl` 按固定顺序判定并返回稳定拒绝码:
1. 用途属于闭集,URL 可解析且不含 userinfo;
2. scheme 为 `https`,或 `http` 且 authority 在 `allow_loopback`/`allow_private` 中;
3. 离线模式只允许 loopback/已显式允许的本地目标;
4. metadata 地址默认拒绝;
5. 私有/loopback 解析结果必须有显式 authority 授权;
6. authority 属于该用途默认集合或 `allowed_hosts`。
实际连接前会用 `dns.lookup` 解析全部地址,任一地址为私有而未被 `allow_private`/`allow_loopback` 授权即拒绝;直连时连接固定到已验证地址,TLS `servername` 与 `Host` 仍使用原 authority,因此证书校验与主机名验证保持开启。代理路径固定 CONNECT 到已验证地址,再以原主机名做 TLS。
## 4. 请求行为
- 仅允许 `GET`/`HEAD` 自动跟随重定向;非 GET 重定向 fail-closed,避免重放提交。
- 每一跳重新 classify;最多 `max_redirects`(默认 3)。
- 响应大小、下载大小、声明长度三重上限;超限立即销毁连接。
- 超时覆盖连接建立与响应读取;调用方 `AbortSignal` 可取消。
- 下载先写同目录随机 `.part`(0600),校验 SHA-256 与大小后原子 rename;摘要不符删除临时文件。
- 证书校验不可关闭,没有 `--insecure`。仅 `ca_file` 可替换信任根。
- 镜像:仅当请求 authority 等于 `release_authority` 时按 purpose 改写;镜像必须先通过同一 classify。镜像不可用(网络错误/5xx)回退主源一次;摘要不符绝不回退。
## 5. 代理
支持 `http://` CONNECT 代理(HTTPS 目标经隧道;loopback HTTP 也可隧道)。`NO_PROXY` 支持 `*`、host、`.domain`、`host:port`。代理 URL 中的凭据只用于 `Proxy-Authorization`,不进入日志、审计或报告。`https://` 代理尚未实现,配置时返回 `proxy_unsupported_scheme`,不静默降级。
## 6. 审计
`MQDH_HOME/evidence/network/audit.jsonl`(0600,1 MiB 轮转一份):
```json
{"at":"…","purpose":"release","method":"GET","authority":"git.cflmy.cn","status":200,"bytes":41099,"duration_ms":257,"mirror":false,"outcome":"ok","code":null}
```
不记录 URL 路径、查询串、请求头、响应体、token、代理凭据。写入失败只降级为无审计,不阻塞请求。`/mqdh` 与 `mqdh doctor --json` 展示最近记录。
## 7. 离线
`MQDH_OFFLINE=1` 时除 loopback/已配置本地镜像外全部拒绝;`mqdh network check` 返回 `offline_denied` 而不发请求。Bootstrap 的 `--offline <dir>` 在本地校验归档摘要、`SOURCE_SHA`、Bundle 与协议后安装,不访问网络;离线资产未验证同样拒绝。
## 8. 验收与边界
已由 `tests/network.test.ts` 覆盖:默认允许/拒绝、loopback HTTP、重定向到未授权 host、大小上限、超时、摘要不符、镜像选择、HTTPS CONNECT 代理 + 测试 CA、审计不含内容。
未验证/限制:
- 企业代理的 NTLM/Kerberos、`https://` 代理、SOCKS 代理未实现;
- 代理路径以 IP 发起 CONNECT,个别只接受主机名的代理会返回隧道拒绝;
- 模型传输由 DSH 负责,本服务只对 `model` 用途做 classify/探测与审计,不代理模型请求;
- 真实弱网/断网与大文件续传尚未作为独立门禁运行(下载中断走干净重试)。
+16
View File
@@ -0,0 +1,16 @@
# Marqdo Harness 文档
| 文档 | 内容 |
| --- | --- |
| [ARCHITECTURE.md](ARCHITECTURE.md) | 产品边界、包结构、数据布局、执行与安全模型 |
| [NETWORK.md](NETWORK.md) | 默认出口、代理/镜像/离线、审计与拒绝码 |
| [BOOTSTRAP.md](BOOTSTRAP.md) | 首次启动状态机、`doctor`/`repair`、离线与失败处理 |
| [DIAGNOSTICS.md](DIAGNOSTICS.md) | 本地脱敏报告、去重/限额与显式 Issue 提交 |
| [DISTRIBUTION.md](DISTRIBUTION.md) | 平台矩阵、安装布局、发行清单、更新/回退 |
| [RELEASING.md](RELEASING.md) | 构建、签名、发布与发布后验证 |
| [STATUS.md](STATUS.md) | 唯一现状与门禁矩阵(PASS/PARTIAL/UNVERIFIED) |
| [UPSTREAM.md](UPSTREAM.md) | DSH 远端、同步规则、许可 |
| [upstream-delta.md](upstream-delta.md) | 对上游文件的全部修改 |
| [evidence/](evidence/) | 可复核的命令、SHA、摘要与结果 |
产品入口:`scripts/mqdh.mjs`(安装后命令 `mqdh`)。唯一产品 profile:`mqdh`。工作台:`/mqdh`。
+78
View File
@@ -0,0 +1,78 @@
# 发布流程
发布工具:`scripts/package.sh`(构建 + 冷安装验证)、`scripts/release-manifest.ts`(清单/签名/证据)、`scripts/release.ts`(Gitea 发布,默认 dry-run)。凭据只来自环境,不写入仓库、日志或制品。
## 1. 发布前
1. 责任提交已在 `main`,`docs/mqdh/STATUS.md` 与证据已更新。
2. 同 SHA 的应用 CI 通过:`scripts/ci.sh`(含真实 Release 安装、Bootstrap、全部测试)与父仓候选组合。
3. 版本在 `packages/marqdo/harness/package.json` 唯一维护;tag 必须是 `mqdh-v<version>`。
4. 准备 Node 24 / pnpm 11 构建环境与 ≥ 12 GiB 临时空间(归档 + 解包 + 冷安装)。
## 2. 构建
```sh
pnpm install --frozen-lockfile
pnpm run build
MQDH_PACKAGE_WORK=/var/tmp/mqdh-package bash scripts/package.sh
```
输出 `.ci/`:
| 文件 | 说明 |
| --- | --- |
| `marqdo-harness-<version>-x86_64-unknown-linux-gnu.tar.gz` | 便携树 + 内置 Node + `install.sh` + `mqdh` |
| `…tar.gz.sha256` | 归档摘要 |
| `mqdh-release.json` | 发行清单 |
| `mqdh-release.json.sig` | 可选 Ed25519 签名 |
| `release-evidence.json` | 构建身份、tag、签名状态、未验证项 |
| `package-evidence.json` | 冷安装实测结果 |
## 3. 签名(可选但推荐)
```sh
MQDH_RELEASE_PRIVATE_KEY=/secure/mqdh-release.key \
MQDH_RELEASE_PUBLIC_KEY=/secure/mqdh-release.pub \
bash scripts/package.sh
```
- 私钥只用于构建环境;公钥进入安装/更新信任配置 `MQDH_RELEASE_PUBLIC_KEY`。
- 没有密钥时 manifest 明确为 unsigned;不得手工添加假签名。
- 轮换密钥必须同时提高版本并在证据中记录新旧 `key_id`。
## 4. 发布
```sh
MQDH_GITEA_TOKEN=... node scripts/release.ts --version 0.1.0 \
--source "$(git rev-parse HEAD)" --assets .ci # dry-run:校验本地资产
MQDH_GITEA_TOKEN=... node scripts/release.ts ... --publish # 创建 tag/Release 并上传
```
脚本会:校验 manifest/source/版本/摘要/证据一致 → 确认 tag 尚不存在(发行不可变)→ 创建 Release(prerelease 依据版本后缀)→ 逐项上传资产。任何一步失败都不能重命名/覆盖已发布资产;修正后提升版本重新发布。
## 5. 发布后验证
在干净用户/干净主机(无 Node/Rust/pnpm/源码)执行:
```sh
tar -xzf marqdo-harness-<version>-x86_64-unknown-linux-gnu.tar.gz
cd marqdo-harness-<version>-x86_64-unknown-linux-gnu
./install.sh --prefix ~/.local/opt/mqdh
~/.local/opt/mqdh/bin/mqdh --version
~/.local/opt/mqdh/bin/mqdh doctor --json
~/.local/opt/mqdh/bin/mqdh bootstrap --json
~/.local/opt/mqdh/bin/mqdh --dump-config
```
再验证更新/回退:用上一个已发布版本安装 → `mqdh update check --json` → `mqdh update install --confirm` → 新版本启动 → `mqdh update rollback --confirm` → 旧版本启动且 `MQDH_HOME/ecosystem` 不变。证据记录应用 SHA、tag、平台、Node、命令、退出码、size/sha256、冷安装日志与已知限制。
## 6. 失败与回滚
- 构建/冷安装失败:不发布;删除 `.ci` 产物,修复后同版本重试。
- 上传中途失败:不覆盖同名资产;保留流水线产物,按 Gitea 返回的实际状态清理草稿后重试。
- 已发布版本有缺陷:发布更高版本;不删除或重写旧资产。用户侧可 `mqdh update rollback --confirm`。
- 签名错误:停止发布,轮换密钥并提升版本;不得重新上传同 tag。
## 7. 未验证
生产签名证书/密钥托管、macOS/Windows 构建与公证、第二台干净主机、低于 2.39 glibc 的平台、真实断网更新与弱网大文件下载。以上保持 `UNVERIFIED`,不得写成 PASS。
+132
View File
@@ -0,0 +1,132 @@
# Marqdo Harness 状态与门禁
本文件是 MQDH 现状的唯一产品状态来源。日期:2026-11-28。应用提交以 `git rev-parse HEAD` 为准;上游基线为 DSH `4b399c39a6d1479cd84ca591b4d7c88e24d38a96`(标签 `dsh-v0.2.3-alpha.2`)。证据目录见 [evidence/](evidence/)。
状态定义:**PASS** 表示本仓库或本机真实命令已通过并记录;**PARTIAL** 表示实现存在且已覆盖主要路径,但门禁要求的一部分尚未验证;**UNVERIFIED** 表示未运行或环境不具备,不能当作通过;**FAIL** 表示真实失败。
## 仓库与上游(R)
| 门禁 | 状态 | 证据或限制 |
| --- | --- | --- |
| R01 历史/远端/许可 | PASS | fork 自 DSH 全历史;`origin` 为 Gitea 应用仓,`upstream` 为 Gitea DSH 镜像;MIT 与 `THIRD_PARTY_NOTICES.md` 保留。见 m0-baseline。 |
| R02 父仓 app 类型/gitlink | PASS(父仓) | 父仓 ADR 0002、`kind = "app"` 校验、`apps/harness` gitlink 与 catalog;负例覆盖路径/远端/嵌套/依赖方向。 |
| R03 planned/active 纪律 | PASS | 首轮以 planned 固定真实提交;激活提交登记 `entry = scripts/ci.sh`。 |
| R04 独立 clone 构建 | PASS | 对 `origin/main` 做 depth-1 独立 clone:`pnpm install --frozen-lockfile` 后 `pnpm run build` 10/10 gates PASS(235.73s),无父仓/兄弟源码。 |
| R05 上游基线 + 下游测试 | PASS | 上游 `pnpm run build` 10/10 gates PASS;下游 28 项测试 PASS(1 项网络安装测试由 `MQDH_TEST_INSTALL=1` 单独通过)。 |
| R06 上游同步演练 | UNVERIFIED | 当前镜像 HEAD 等于基线,没有更新的上游提交;`scripts/upstream.sh candidate` 已实现,未执行真实合并。 |
| R07 发布路径分离 | PASS | 删除上游发布/上传/桌面打包工作流;下游包名、命令、发行地址独立;仓库内无官方凭证。 |
| R08 无 Marqdo 生产源码副本 | PASS | 仓库只含应用代码;CLI/Bundle/Tool 由运行时安装;测试使用发布资产或自写 fixture。 |
## 安装与更新(E)
| 门禁 | 状态 | 证据或限制 |
| --- | --- | --- |
| E01 无 Marqdo 可启动 | PASS(对话待模型) | 无 Runtime 时 Web 启动成功,`/mqdh/api/status` 显示 `installed=false`;真实模型对话需模型凭据,见 S09。 |
| E02 真实 CLI/Bundle 安装 | PASS | `install.test.ts` 真实安装 rc.5/rc.6;API 安装 rc.6 校验资产 SHA-256、`SOURCE_SHA`、`RELEASE_INFO`、二进制与相邻 Bundle digest。 |
| E03 Tool install/list/remove | PASS | 通过 CLI 安装 `marqdo-knowledge` 0.1.0-beta.3,`record.json` 出现在隔离 Tool home;remove 后状态为空,再次安装成功。 |
| E04 Ext Package/lock | PARTIAL | 应用不建立第二套 lock/解析器;Ext 的 manifest/lock/artifact 校验由 CLI 在 `run`/`call` 时执行。尚未用篡改锁的真实 Ext 工程跑负例。 |
| E05 四层一致性 | PASS | Runtime/Std/Tool 来自真实环境;Ext 由 CLI 锁管理;Knowledge 来自私人数据;未安装项显示不可用。 |
| E06 安装失败保留旧组合 | PASS | 坏版本/无候选不改变 `current.json`;下载/SHA/平台/解包失败清理 staging;`cleanup` 保护 active 与 rollback 目标。 |
| E07 更新只影响新任务 | PARTIAL | 每次运行记录环境 ID 与 CLI 身份;尚未实现“活跃任务固定原环境”的会话级绑定。 |
| E08 未知来源/扩权审批 | PASS(工具层) | `marqdo_program`/`marqdo_ecosystem` 通过 `ctx.approval.request` 一次一授权;模型不能提供 URL/argv/安装根;单位测试覆盖 argv/路径拒绝。审批 UI 的真实浏览器流程见 S06。 |
| E09 通知与对账 | UNVERIFIED | 首版只在用户显式查询/安装时发现 release;应用更新检查(30 分钟缓存)不等于发行通知/对账。 |
| E10 应用/运行时独立升级 | PARTIAL | 安装时校验 Analysis 3 / Observation 1;协议不兼容会拒绝。尚无跨大版本阻塞 UI。 |
## 执行与文稿(P)
| 门禁 | 状态 | 证据或限制 |
| --- | --- | --- |
| P01 单一文稿入口 | PASS | profile 只保留 `marqdo_program`;`preset-ptc` 与 `tool-executor-ptc` 在产品组合中关闭(`bundle.test.ts`)。 |
| P02 静态发现来自 Analysis | PASS | `marqdo_find`/`marqdo_check` 解析 `check --emit` 的 Analysis revision 3;真实 fixture 返回函数身份与签名。 |
| P03 合法 `.mq.md` 与拒绝旧语法 | PARTIAL | CLI 的 check/run 是唯一语法与执行者;未做真实模型生成文稿的验收。 |
| P04 多步纯计算 | PASS(fixture) | factorial `n=5` 真实得到 `{\"type\":\"int\",\"decimal\":\"120\"}`;独立期望由测试固定。校准任务 A 见 P10。 |
| P05 Observation 校验 | PASS | 校验 schema、run_id、连续 seq、唯一终态、Analysis digest、stdout 与 snapshot 一致性;缺失/重复/摘要不符均失败。 |
| P06 失败/超时/取消 | PARTIAL | 真实除零运行得到 `failed` + `runtime.division_by_zero`;进程超时/取消与进程组清理有单元测试;CLI 级超时/取消待补。 |
| P07 ValueWire | PASS | 超过安全范围的整数被拒绝;`decimal` 字符串原样保留。 |
| P08 只读检查/源变更重检 | PASS | check/read 不执行;源 digest 变化使证据 `stale`,重新 check 才可再次执行。 |
| P09 View 离线导出 | UNVERIFIED(上游缺口) | `marqdo-view` 0.3.0 的 `view export` 没有接受既有运行身份的公开参数;已开 [marqdo-view#15](https://git.cflmy.cn/cflmy/marqdo-view/issues/15)。Harness 不自行渲染结果。 |
| P10 真实模型任务 A | UNVERIFIED | 当前环境没有可用模型凭据;没有用 fixture 冒充。 |
## 私人知识与复用(K)
| 门禁 | 状态 | 证据或限制 |
| --- | --- | --- |
| K01 无账号本地集合 | PASS | 集合/导入/查看全部本地;无账号、Git 或公共服务。 |
| K02 Markdown 导入 + 真实编译查询 | PARTIAL | 真实 `marqdo-knowledge compile/query` 已通过,命中带源路径/摘要/span/通道;OKF 完整兼容未验收。 |
| K03 重名/变更/删除精确定位 | PARTIAL | 每条命中携带集合+相对路径+摘要;源摘要不匹配标记 stale。重名标题的专项负例待补。 |
| K04 恶意知识不触发执行 | PASS | `.mq.md`、`@exec` 区域、符号链接、越界路径、危险类型、超限均拒绝;知识无执行入口。 |
| K05 启停/删除/导出/索引重建 | PASS | 单元测试覆盖;原始外部文件不被修改。 |
| K06 远程上下文仅批准片段 | PARTIAL | `knowledge_search` 只返回有界片段与来源,未启用集合不会检索;尚未接入模型请求的逐请求审计 UI。 |
| K07 用户审核后保存候选 | PASS(API/单元) | `POST /mqdh/api/runs/<id>/candidate` 要求 completed + fresh + 显式确认,生成无 `@exec` 的静态知识文档并进入私人索引;单元测试覆盖拒绝多行标题与可检索性。浏览器按钮流程属 S06。 |
| K08 任务 B 真实复用 | UNVERIFIED | 依赖真实模型;`marqdo_program` 复用同一文稿与函数身份、且每次生成新 run_id/新证据的能力已具备。 |
| K09 旧证据标记 | PASS | 源变更后记录 `stale`;不把旧结果当新运行。 |
## 安全、产品与交付(S)
| 门禁 | 状态 | 证据或限制 |
| --- | --- | --- |
| S01 loopback 与同源 | PASS | 默认 loopback;`/mqdh` API 拒绝 cross-site/错误 Host/不匹配 Origin;跨站请求返回 403。 |
| S02 密钥与遥测 | PARTIAL | 子进程使用 allowlist 环境;bundle 关闭 telemetry/session upload/DeepSeek log;未做网络抓包核对。 |
| S03 文件/进程/网络边界 | PARTIAL | 路径/符号链接/argv/进程组/超时/输出上限有测试;OS 级隔离依赖 DSH 沙箱,未声称强隔离。 |
| S04 插件/profile 旁路 | PASS | `plugin-manager` 服务关闭;插件 market/manager 工具不可用;不是仅隐藏 UI。 |
| S05 工作区隔离 | PARTIAL | 工作区显式且路径受控;未实现每任务独立目录与跨工作区审计。 |
| S06 浏览器真实交互 | PARTIAL | HTTP 验证页面/状态/知识导入检索/生态安装/工具安装;未运行浏览器自动化。 |
| S07 诊断脱敏 | PASS(本地/替身) | 捕获→脱敏→本地报告→显式提交全链路由 `tests/diagnostics.test.ts` 覆盖;真实公网 Gitea 权限与模板未验证,见 DIAG-03/05。 |
| S08 独立归档冷安装 | PASS(本机) | 归档内置 Node + `install.sh`;从归档冷安装后 `mqdh --version`、`doctor --json`、`--dump-config` 通过(见 m7 证据)。未在第二台干净主机验证。 |
| S09 CI/真实模型/发布 | PARTIAL | `scripts/ci.sh` 与 `.woodpecker/ci.yml` 已实现;父仓 PR#48 的 Woodpecker pipeline 已运行并暴露/修复 candidate manifest bug,最终通过证据以 PR 为准。真实模型两轮验收 UNVERIFIED。 |
| S10 父仓组合验收 | PASS(父仓) | 父仓 Node app lane 使用同一 CLI/Bundle 候选;app optional,不阻塞 CLI 独立发行。 |
## 网络出口(NET)
| 门禁 | 状态 | 证据或限制 |
| --- | --- | --- |
| NET-01 用途/目标策略与统一客户端的拒绝码 | PASS | `tests/network.test.ts`:默认允许/拒绝、userinfo、scheme、metadata、offline、loopback/private 显式授权。 |
| NET-02 代理、NO_PROXY、镜像与离线 | PASS(本机) | HTTPS CONNECT + 测试 CA、镜像选择、离线拒绝;`https://` 代理/SOCKS 与真实企业代理未验证。 |
| NET-03 重定向/私网/metadata/大小/超时负例 | PASS | 每一跳重新 classify;非 GET 重定向拒绝;大小/超时/摘要不符 fail-closed。 |
| NET-04 Bootstrap/Distribution/Diagnostics 接入,删除散落 fetch | PASS | 组件发现、下载、更新、Issue 提交均走 `EgressClient`;CI 新增产品源码 `fetch(` 扫描。 |
| NET-05 企业内网/隔离网演练与文档 | UNVERIFIED | 需要真实企业代理/隔离网环境,不以 mock 冒充。 |
## 首次启动(BOOT)
| 门禁 | 状态 | 证据或限制 |
| --- | --- | --- |
| BOOT-01 状态机、候选解析、staging、校验、doctor | PASS(本机) | `bootstrap.test.ts` 在 glibc 2.43 主机真实安装 rc.6,`doctor` overall=ok;CI bookworm glibc 2.36 按 CLI 合同被拒绝并 skip。 |
| BOOT-02 首次启动 Web 向导、真实进度、CLI bootstrap | PASS | `/mqdh/api/bootstrap` 与 `/mqdh` 页面实测;真实下载字节进度与步骤状态。 |
| BOOT-03 断点/恢复/并发锁、失败回滚、离线包 | PARTIAL | staging 清理 + 单实例锁 + 失败不切换已实现并测试;离线目录安装已实现;真实弱网/断网与续传演练未运行。 |
| BOOT-04 Knowledge/View 默认 Tool 安装与真实 smoke | PASS | knowledge v0.1.0-beta.3、view v0.3.0 安装成功;知识 compile/query hits=3;view 工具能力仍受上游接口限制(P09)。 |
| BOOT-05 跨平台验证、repair、发布候选 | PARTIAL | `repair` 已实现并测试;macOS/Windows 引导未验证。 |
## 诊断(DIAG)
| 门禁 | 状态 | 证据或限制 |
| --- | --- | --- |
| DIAG-01 错误模型、捕获点、report schema、脱敏器 | PASS | `diagnostics.test.ts`:路径/secret/敏感键/cause chain 脱敏,写入前完成。 |
| DIAG-02 `mqdh report` + `/mqdh` 报告页 + 预览/删除 | PASS | CLI/Web 路由与页面已实现;预览返回完整 title/body。 |
| DIAG-03 Gitea Issue 提交、目标仓路由、模板、去重/限额 | PASS(替身) | 本地 Gitea 替身真实创建 Issue/评论、附件 multipart、小时限额;真实公网组织权限未验证。 |
| DIAG-04 离线队列、附件选择、结果回填 | PASS | `--offline` 入队;附件仅从报告目录读取;issue URL 回填索引。 |
| DIAG-05 真实失败演练、负例/安全测试、发布证据 | PARTIAL | 真实 Bootstrap/知识/CLI 失败样本与公网提交演练未全部运行;不得写成 PASS。 |
## 发行与更新(DIST)
| 门禁 | 状态 | 证据或限制 |
| --- | --- | --- |
| DIST-01 清单 schema、命名、tag/证据、Linux tar 冷安装 | PASS(本机) | `mqdh-release.json` + `.sha256` + `release-evidence.json`;归档 747 MB,内置 Node,冷安装/`doctor`/`dump-config` 通过;未发布。 |
| DIST-02 Linux `.deb`/AppImage、用户级安装/卸载 | PARTIAL | 用户级 `install.sh`/`--uninstall` 已实现并测试;`.deb`/AppImage 未构建。 |
| DIST-03 macOS/Windows 构建与冷安装 | UNVERIFIED | 无签名/公证证书;不生成同名制品。 |
| DIST-04 签名、SBOM、代理/镜像、离线安装 | PARTIAL | Ed25519 清单签名/验证与测试密钥通过;官方密钥、SBOM、离线应用更新未运行。 |
| DIST-05 更新检查/安装/回退、通知与对账 | PARTIAL | `update check/install/rollback` 用本地发布服务器完成真实切换与回退;无可发布的真实 Release;通知/对账未实现。 |
## 生态目录、局部调用与阅读(CAT)
| 门禁 | 状态 | 证据或限制 |
| --- | --- | --- |
| CAT-01 固定顺序 Runtime/Tool/Std/Ext/Knowledge 与真实来源 | PARTIAL | `/mqdh` 生态目录按固定顺序投影真实状态;Runtime/Tool/Std/Knowledge 来自服务,Ext 只做文件摘要投影。浏览器/键盘/窄窗口/主题验收未运行。 |
| CAT-02 打开、筛选、查看详情无自动安装/执行 | PASS | `/ecosystem` 只做本地状态与文件读取;候选检查、项目锁检查、Tool 移除均由按钮显式发起。 |
| CAT-03 Ext 锁语义(声明/锁差异/权限) | PARTIAL | 应用不解析第二套依赖图;显示 `marqdo.yaml`/`marqdo.lock` 存在性与摘要,显式按钮调用 CLI `sync --locked --json`,错误原文展示。 |
| CAT-04 真实浏览器与主题回归 | UNVERIFIED | 本轮无浏览器自动化环境;未伪造截图或键盘证据。 |
| READER-01 文稿/知识复用 Marqdo View 只读阅读 | UNVERIFIED(上游阻塞) | 等待 `marqdo-view#16` 公开只读嵌入与主题身份、`marqdo-view#15` 结果绑定;应用不实现第二套 Markdown/主题。 |
| SCOPE-01 局部调用、规则审阅与跨会话复用 | UNVERIFIED | 依赖真实模型/浏览器、E07 环境固定与主仓 #28 的独立规则/预期;应用现有 `marqdo_program` 已提供固定 argv/审批/证据基础,但未做真实模型验收。 |
## 明确边界
公共知识共享插件、知识市场、多租户、云托管、桌面签名、独立 TUI、完整 DSH host-binding PTC、自动发布用户成果均不在首版范围。未验证限制不得在发行说明中改写为通过。
+29
View File
@@ -0,0 +1,29 @@
# 上游同步与许可
## 远端
| 远端 | URL | 用途 |
| --- | --- | --- |
| `origin` | `https://git.cflmy.cn/cflmy/marqdo-app-harness.git` | 下游权威源码、工单与发布 |
| `upstream` | `https://git.cflmy.cn/cflmy/deepseek-harness.git` | DSH 权威镜像,跟踪 `master` 与 `dsh-v*` 标签 |
GitHub 官方仓库(`deepseek-ai/deepseek-harness`)只作为审计与回馈来源,不进入父仓 `.gitmodules`,也不作为构建时的隐式输入。
## 固定基线
当前 DSH 基线是 `4b399c39a6d1479cd84ca591b4d7c88e24d38a96`(`dsh-v0.2.3-alpha.2`),唯一记录在 `packages/marqdo/harness/package.json` 的 `dshUpstreamSha` 字段;发行清单与发布证据从该字段读取。同步上游时在同一个提交更新该字段、测试与证据,不另建版本表。
## 同步规则
1. `main` 是已接受的下游组合;不得自动合并或自动推送上游变更。
2. 一次同步使用正常 `git merge`,分支名 `sync/dsh-<短 SHA>`;冲突解决与影响范围写入 PR。
3. 同步先跑上游相关 gate,再跑 `scripts/ci.sh`;API 破坏性变化只更新唯一现行适配器,不维护旧版兼容分支。
4. 所有对上游文件的修改先登记 [upstream-delta.md](upstream-delta.md);通用缺陷优先向上游回馈。
5. 上游安全修复优先评估;同步失败可暂缓并保留当前可用发行。
6. 用户安装的 Marqdo 运行时与 DSH 应用升级相互独立:应用升级不改变 `MQDH_HOME/ecosystem`,运行时升级不要求重建应用。
## 许可
- 上游代码、本仓库新增代码与文档采用 MIT;根 Marqdo 的 Apache-2.0 不替换上游许可。
- 保留 `LICENSE`、`THIRD_PARTY_NOTICES.md` 与上游署名。
- 下游包使用 `@marqdo/*` 名称、`mqdh` 命令与独立发行地址;不得向官方 DeepSeek 包名或发布渠道上传制品。
@@ -0,0 +1,46 @@
# M0 基线与仓库准入证据(2026-11-28)
## 环境
| 项目 | 值 |
| --- | --- |
| 主机 | Linux x86_64,8 vCPU,14 GB RAM |
| glibc | 2.43 |
| Node | v24.22.3 |
| pnpm | 11.28.5(本地安装,未修改系统全局) |
| Python | 3.14.4 |
| 工作目录 | `/root/work/marqdo/apps/harness` |
## 审计身份
| 对象 | 身份 | 核对方式 |
| --- | --- | --- |
| DSH 上游 | `4b399c39a6d1479cd84ca591b4d7c88e24d38a96`,标签 `dsh-v0.2.3-alpha.2` | `git ls-remote https://git.cflmy.cn/cflmy/deepseek-harness.git`;`git describe --tags --exact-match` |
| DSH 根 manifest | `@deepseek-ai/dsh-root` 0.2.3-alpha.2,MIT,pnpm 11.28.5,Node `^24.22.3 \|\| >=26.13.1` | `package.json` |
| 应用仓库 | `cflmy/marqdo-app-harness`,服务端 fork,默认分支 `main` | Gitea API;`git push -u origin main` |
| CLI | `3.0.0-rc.6`,source `63776735e924ade279cdf59d5c733dc24bfdabbb` | 父仓 gitlink 与 release-evidence 一致 |
| CLI 资产 | `marqdo-3.0.0-rc.6-x86_64-unknown-linux-gnu.tar.gz`,sha256 `8dc0b006302e03c23451b8ea9f8a0fcdae8bf67c80c546bee2434bf69755bfe3` | 下载后 `sha256sum` 与 release-evidence 一致 |
| Bundle | `marqdo-stdlib` 0.2.0,tree digest `sha256:db905508dde89763b9d43b47fc5d52c6a1d5445a91f3c86a550ced43e8aac9d7` | `RELEASE_INFO.json` 与 `stdlib/stdlib.json` |
| Knowledge | 父仓 gitlink `3cc477de60632bfe10acb83fdf8979729f74e28e`;release `0.1.0-beta.3` | `spec/knowledge.md`;release 资产 sha256 `feaa99701c01123c6eab3e804226dbb4096c3272b1e4f917c421233948198c55` |
| View | 父仓 gitlink `13f89f758d869efcfa6e4c2b494898f3c4590ad9`;0.3.0 | 父仓 `components.toml` 与仓库 README |
## 已执行命令
| 命令 | 退出码 | 结果 |
| --- | --- | --- |
| `git clone https://git.cflmy.cn/cflmy/deepseek-harness.git` | 0 | 完整历史,HEAD 为审计 SHA |
| Gitea fork + `git push -u origin main` | 0 | 服务端 fork 保留全部历史与标签;避免 435 MB 直推的 CDN 524 |
| `pnpm install --frozen-lockfile` | 0 | 1m 24.8s,锁文件一致 |
| `pnpm run build`(首次) | 1 | 失败:tsdown 把下游 `@marqdo/mqdh-bundle` 当作上游包,找不到 `lib/types/{index,startup}.js`。已按 delta 排除下游包。 |
| `pnpm run build`(修复后) | 0 | 10 passed / 0 failed / 0 skipped;含 host compiler、Host/Desktop/Client bundle、Web build、aggregate checks |
| `node --import tsx/esm --test packages/marqdo/harness/tests/*.test.ts` | 0 | 28 tests:27 PASS,1 SKIP(网络安装测试) |
| `MQDH_TEST_INSTALL=1 node --test .../install.test.ts` | 0 | rc.5 → rc.6 安装、Bundle 校验、回退、坏版本保持当前环境 |
| 独立 depth-1 clone `pnpm install --frozen-lockfile` + `pnpm run build` | 0 | 10/10 gates,235.73s;R04 |
| `scripts/package.sh` | 0 | 预构建归档 748,901,507 bytes,sha256 `21a532d2949a25bae76a41b2a4e0f08d06f39a084db2f02a1cd1506ad5a24617`;全新目录 `--dump-config` PASS |
## 依赖与平台缺口
- 首次 `pnpm run build` 的 FAIL 已保留上述原因;修复只改下游 `tsdown.config.ts`,未删除任何上游测试。
- `pnpm deploy` 无法闭合 DSH 的 peer 依赖(缺 `cordis-plugin-group`、`dsh-error` 等),因此候选归档采用预构建 portable tree,并在全新目录做冷组合验证;它不是最小化安装器。
- 本机没有模型凭据,因此真实模型对话与两轮任务验收为 UNVERIFIED,不以 fixture 代替。
- 当前环境的 `glibc 2.43` 高于 CLI rc.6 声明的 glibc 2.39 下限;未在更低 glibc 上复核。
@@ -0,0 +1,102 @@
# M1–M6 产品验收证据(2026-11-28)
应用提交在每次提交后由 `git rev-parse HEAD` 固定;本文件记录可复核的命令与结果,不把未运行项写成 PASS。
## 1. 产品 profile 与隐私默认
```sh
node --import tsx/esm --test packages/marqdo/harness/tests/bundle.test.ts
# 2 tests, 2 PASS
```
组合断言:`preset-ptc` 关闭、`plugin-manager` 关闭、`session-log-deepseek`/`session-telemetry-otel`/`message-feedback` 关闭、默认 web search/fetch 关闭、`mqdh-harness` 与 `mqdh-web` 存在、单一 product persona。
`scripts/mqdh.mjs --dump-config` 在全新 `MQDH_HOME` 中组成 profile,无 patch warning(早先两个错误 row id 已修正)。
## 2. 无 Marqdo 启动
```sh
MQDH_HOME=<new-home> node scripts/mqdh.mjs --port 38093 --no-open
# dsh web: http://127.0.0.1:38093/?token=...
curl -s http://127.0.0.1:38093/mqdh # 200, text/html
curl -s http://127.0.0.1:38093/mqdh/api/status # runtime.installed = false
```
## 3. 真实 Release 安装
```sh
MQDH_TEST_INSTALL=1 node --import tsx/esm --test packages/marqdo/harness/tests/install.test.ts
# PASS
```
工作台 API 安装 rc.6:
```text
POST /mqdh/api/ecosystem/install {"confirm":true,"version":"3.0.0-rc.6"}
environment.id = cli-3.0.0-rc.6-8dc0b006302e
asset.sha256 = 8dc0b006302e03c23451b8ea9f8a0fcdae8bf67c80c546bee2434bf69755bfe3
source_sha = 63776735e924ade279cdf59d5c733dc24bfdabbb
bundle = sha256:db905508dde89763b9d43b47fc5d52c6a1d5445a91f3c86a550ced43e8aac9d7
```
## 4. 真实文稿执行
```sh
MARQDO_BIN=<rc.6>/marqdo node --import tsx/esm --test packages/marqdo/harness/tests/execution.test.ts
# 2 tests, 2 PASS
```
factorial `n=5` 的 Observation 终态为 `completed`,值 `{"type":"int","decimal":"120"}`;除零运行终态为 `failed`,错误码 `runtime.division_by_zero`;Analysis digest 不匹配时状态降级为 `incomplete`;源文件变化后旧证据为 `stale`。
## 5. 私人知识
```sh
node --import tsx/esm --test packages/marqdo/harness/tests/knowledge.test.ts
# 9 tests, 9 PASS
```
工作台真实链路(安装 `marqdo-knowledge 0.1.0-beta.3` 后):
```text
POST /mqdh/api/knowledge/collections -> 201 kc-...
POST /mqdh/api/knowledge/collections/kc-.../import -> imported calibration.md (102 bytes)
POST /mqdh/api/knowledge/collections/kc-.../compile -> mode=compiled, snapshot_digest=sha256:18c32c...
GET /mqdh/api/knowledge/search?q=校正 -> mode=compiled, index_current=true
hit: calibration.md, span 0..102,
digest sha256:286b5019..., channels lexical+fuzzy
```
安装前同一查询返回 `mode=locator, index_current=false`,明确说明是只读文件定位而非编译索引。
## 6. 同源与安全
```text
GET /mqdh -> 200 text/html
GET /mqdh/api/status -> 200 JSON
GET /mqdh/api/status Sec-Fetch-Site: cross-site -> 403
GET /mqdh/api/status Host: evil.example -> 403
GET /mqdh/api/status Origin: http://evil.example -> 403
```
上游 `plugin-manager` 服务关闭后,`creation-recommendations`/`plugin-recommendations` 等待该服务且不激活;不是仅隐藏 UI。
## 7. 成果沉淀
```text
POST /mqdh/api/runs/<completed-fresh-run>/candidate {"confirm":true,"title":...,"applicability":...}
-> 201 collection=<id> source=outcome-<evidence>.md executable=none
```
单元测试 `knowledge.test.ts` 验证生成文档含适用条件/来源/运行 ID/边界、无 `@exec`、可被检索;多行标题被拒绝。
## 8. 候选归档
```text
scripts/package.sh
archive: marqdo-harness-4b399c39a6-x86_64-unknown-linux-gnu.tar.gz
size: 748,901,507 bytes
sha256: 21a532d2949a25bae76a41b2a4e0f08d06f39a084db2f02a1cd1506ad5a24617
cold_compose: PASS (fresh MQDH_HOME, no network)
```
归档是预构建 portable tree,不是最小安装器;签名、第二台干净主机与真实模型 E2E 未验证。
@@ -0,0 +1,100 @@
# M7 网络、引导、诊断与发行验收证据(2026-11-28)
本轮实现四个后续设计工单:网络出口(#5)、首次启动(#3)、诊断(#4)与应用发行/更新(#2)。应用实现提交 `5f56c2345506ba65b7ec3603b9b1edc1b1a370c3`(基线 `9b6acf05` 之上)。归档由该提交的干净工作树构建;其后的提交只修改证据、CI gate 与发行清单的上游身份回退,不改变产品运行时。归档**没有被发布**,不能当作已发行制品。
## 身份
| 对象 | 值 |
| --- | --- |
| 应用提交 | `5f56c2345506ba65b7ec3603b9b1edc1b1a370c3` |
| 上游 DSH | `4b399c39a6d1479cd84ca591b4d7c88e24d38a96` |
| 平台 | `x86_64-unknown-linux-gnu`,glibc 2.43,Node v24.22.3 |
| 归档 | `marqdo-harness-0.1.0-x86_64-unknown-linux-gnu.tar.gz`,782,584,384 bytes,sha256 `9422b6d9fea83b0dec2f1b4cc8c8b2cf8681d498a61d22261d8f1c514d07a08e` |
| 内置 Node | v24.22.3,sha256 `a7ec1b37e6ff9d187e4198c5b6df9a4eb1c74dd31804fb3bac55cc4ceca1ac01` |
| 发行清单 | `mqdh-release.json`;`unsigned`(未配置官方签名密钥,未伪造) |
| 真实 CLI | v3.0.0-rc.6,source `63776735e924ade279cdf59d5c733dc24bfdabbb`,资产 sha256 `8dc0b006302e03c23451b8ea9f8a0fcdae8bf67c80c546bee2434bf69755bfe3` |
| Bundle | `sha256:db905508dde89763b9d43b47fc5d52c6a1d5445a91f3c86a550ced43e8aac9d7` |
| 默认 Tool | knowledge v0.1.0-beta.3;view v0.3.0 |
## 类型与测试
```sh
node --max-old-space-size=8192 node_modules/typescript/bin/tsc -p tsconfig.host.json
# exit 0(host aggregate,含 packages/marqdo/harness/src 与 tests)
MQDH_TEST_INSTALL=0 MARQDO_BIN=... \
node --import tsx/esm --test packages/marqdo/harness/tests/*.test.ts
# tests 58, pass 56, fail 0, skipped 2(两个真实网络测试由 MQDH_TEST_INSTALL 选择)
MQDH_TEST_INSTALL=1 MARQDO_BIN=... \
node --import tsx/esm --test --test-concurrency=1 \
packages/marqdo/harness/tests/install.test.ts \
packages/marqdo/harness/tests/bootstrap.test.ts
# tests 2, pass 2, fail 0
```
新增测试文件与覆盖:
| 文件 | 覆盖 |
| --- | --- |
| `tests/network.test.ts` | 默认允许/拒绝、loopback/private、metadata、offline、重定向、大小/超时、摘要、镜像、HTTPS CONNECT 代理 + 测试 CA、审计不含正文/查询 |
| `tests/release.test.ts` | manifest 解析/资产名/协议、Ed25519 签名与篡改、版本/通道/范围、兼容性 |
| `tests/platform.test.ts` | target triple、glibc 下限、真实平台探测 |
| `tests/diagnostics.test.ts` | 脱敏、去重计数、确认、token 私有、Issue/评论、附件 multipart/越界、离线队列、限额、删除/导出、无 token 不发请求 |
| `tests/updater.test.ts` | 签名校验、兼容、下载摘要、staged smoke、原子切换、回退、篡改拒绝、不可兼容拒绝 |
| `tests/bootstrap.test.ts` | 真实运行时/默认 Tool/真实 smoke/二次复用/doctor/repair |
| `tests/cli.test.ts` | 命令解析、版本/帮助、用法错误、doctor/report/network JSON、stdin token |
## 真实首次启动
```sh
MQDH_HOME=<clean> node scripts/mqdh.mjs bootstrap --json
# status=ready, runtime_channel=beta-fallback
# environment=cli-3.0.0-rc.6-8dc0b006302e
# source_sha=63776735e924ade279cdf59d5c733dc24bfdabbb
# bundle=sha256:db905508...
# smoke: check+call value=120, analysis digest sha256:bba12075...
# knowledge: mode=compiled, hits=3
# tools: knowledge=ok, view=ok
```
重复执行同一 home:`status=ready`,不重复下载/安装(第二次约 0.2 s)。Web 首次启动页通过 `POST /mqdh/api/bootstrap` 实测同一状态机;`GET /mqdh/api/network` 返回真实审计记录。
`mqdh doctor --json`(已安装 home):`overall=ok`,platform/runtime/protocols/knowledge/network/bootstrap 全部 ok。
## 网络出口探测
```sh
MQDH_HOME=<clean> node scripts/mqdh.mjs network check --json
# release/update/issue/bootstrap: allowed, HTTP 200(git.cflmy.cn/api/v1/version)
# model/knowledge-embedding: not_configured(默认不配置)
```
## 归档与冷安装
```sh
MQDH_PACKAGE_WORK=<disk> bash scripts/package.sh
# archive 782,584,384 bytes, sha256 9422b6d9...
# cold extract → install.sh --prefix <clean> --no-path
# <prefix>/bin/mqdh --version → mqdh 0.1.0(使用内置 runtime/node)
# mqdh doctor --json → schema marqdo.mqdh.doctor
# mqdh --dump-config → 含 mqdh-harness / mqdh-web
# package-evidence.json status=PASS
```
```sh
MQDH_GITEA_TOKEN=... node scripts/release.ts --version 0.1.0 \
--source 5f56c234... --assets .ci
# dry-run: would create mqdh-v0.1.0 and upload 4 assets(未发布)
```
## 明确未验证
- 真实公网 Gitea 组织权限/token 的 Issue 提交与附件;测试使用本地 Gitea 替身。
- 官方 Ed25519 私钥/公钥托管与签名发行;本轮只验证测试密钥与 unsigned 披露。
- 已发布 Release 的 `update check/install/rollback`;本轮用本地发布服务器验证完整切换,未创建真实 tag/Release。
- macOS/Windows 构建与冷安装、第二台干净主机、低于 glibc 2.39、真实断网/弱网、企业代理与 `https://`/SOCKS 代理。
- 浏览器自动化(页面/API 已用真实 HTTP 验证)。
- 通知与对账(E09)、真实模型任务 A/B、View 结果绑定导出(P09)。
以上在 `docs/mqdh/STATUS.md` 保持 PARTIAL/UNVERIFIED,不改写为 PASS。
+19
View File
@@ -0,0 +1,19 @@
# 上游修改清单(upstream-delta)
任何对上游 DSH 包的修改都记录在这里。新增的下游包不伪装成上游实现;产品特化优先通过 bundle patch 与公开 seam 完成。
| 路径 | 修改 | 原因 | 能否使用公开 seam | 测试 | 上游 Issue/PR | 移除条件 |
| --- | --- | --- | --- | --- | --- | --- |
| `.github/workflows/*`(发布/上传/桌面打包/Cloudflare/Pages 共 18 个) | 删除 | 防止下游误用官方发布凭证与上传路径;Gitea/Woodpecker 是下游 CI 权威 | 不需要 | 仓库内无这些 workflow;`grep` 审计 | 无(下游发布策略) | 上游发布机制被下游显式复用时重新评估 |
| `tsdown.config.ts` | 从 workspace bundle 列表排除 `packages/marqdo/*` | 下游包以 TypeScript 源码由 Node 24 原生类型剥离执行,没有 `lib/types` 产物 | 上游 workspace 配置即公开构建入口 | `pnpm run build` 10/10 gates PASS | 无 | 下游包改为产出 `lib/types` 时 |
| `apps/cli/package.json` | 增加 `@deepseek-ai/cordis-plugin-group` 运行时依赖 | app-boot 将其列为 peer;生产部署闭包需要它 | 上游依赖声明 | `pnpm install --frozen-lockfile`;部署 smoke | 可作为通用打包修复回馈 | 上游把该 peer 改为直接依赖 |
| `packages/marqdo/harness`、`packages/marqdo/bundle`、`scripts/mqdh.mjs`、`docs/mqdh` | 新增下游产品代码与文档 | Marqdo Harness 产品能力 | 新包,不改上游 | `scripts/ci.sh` | 无 | 不适用 |
## 未修改但依赖的上游 seam
- `ctx.tools.register`:六个模型操作。
- `ctx.approval.request`:文稿执行与生态变更的一次性授权。
- `ctx.systemPrompt.section`:产品提示词段落。
- `ctx.webServer.register`:`/mqdh` 工作台与 JSON API。
- `ctx.provide('mqdhRuntime')`:host 与 web 半部共享运行时。
- profile/bundle 的 `dsh.bundle.patch`:唯一产品组合入口。
@@ -0,0 +1,16 @@
# Bilingual-pair consistency record for guide.md (docs/i18n/README.md): per heading
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
# After editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/upgrade-guide/v0.2.3-alpha.1/node-24-22-3/guide.md
/:
en: c37a122c447816e4
zh: fa4966282d31d51e
/node-js-24-22-3-or-26-13-1-is-required:
en: 426912ecafca795e
zh: a3f067a13ebf102c
/node-js-24-22-3-or-26-13-1-is-required/change:
en: 492fa2b6b900b514
zh: 2e14f29d7e1a684e
/node-js-24-22-3-or-26-13-1-is-required/migration:
en: caa478a02e246170
zh: 753e9ea6a2e42599
@@ -0,0 +1,17 @@
---
kind: upgrade-guide
description: "DSH requires Node.js 24.22.3 or newer in the 24.x line, or Node.js 26.13.1 or newer; earlier Node.js 24 and 26 releases are no longer supported."
---
# Node.js 24.22.3 or 26.13.1 is required
English | [中文](guide.zh.md)
## Change
DSH requires Node.js 24.22.3 or a newer 24.x release, or Node.js 26.13.1 or newer (`engines.node` is `^24.22.3 || >=26.13.1`). These are the first releases whose bundled undici includes the November 2026 security fixes. The previous release supported Node.js 24.9 and newer, including every Node.js 26 release. 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 Node.js 24.22.3 runtime.
## Migration
1. Upgrade the Node.js installation used to start DSH to version 24.22.3 or a newer 24.x release, or to 26.13.1 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 24.22.3 or a newer 24.x release, or 26.13.1 or newer.
3. For a source checkout, run `pnpm install`. Start DSH with the profile you normally use and confirm that it starts successfully.
@@ -0,0 +1,17 @@
---
kind: upgrade-guide
description: "DSH 要求 24.x 系列中的 Node.js 24.22.3 或更高版本,或 Node.js 26.13.1 或更高版本,不再支持更早的 Node.js 24 与 26 版本。"
---
# 必须使用 Node.js 24.22.3 或 26.13.1
[English](guide.md) | 中文
## 变更
DSH 要求 Node.js 24.22.3 或更高的 24.x 版本,或 Node.js 26.13.1 或更高版本(`engines.node` 为 `^24.22.3 || >=26.13.1`)。这些是内置 undici 首次包含 2026 年 11 月安全修复的版本。上一版本支持 Node.js 24.9 及更高版本,包括所有 Node.js 26 版本。此变更影响 npm 安装、源码检出,以及 Python SDK 显式指定 `DSH_RUNTIME_MODE=node` 的开发载体。打包的桌面应用和 Python SDK 的内置可执行文件自带 Node.js 24.22.3 运行时。
## 迁移
1. 将用于启动 DSH 的 Node.js 安装升级至 24.22.3 或更高的 24.x 版本,或 26.13.1 或更高版本。更新开发环境、容器和 CI 任务中固定的 Node 版本。
2. 在同一环境中运行 `node --version`,确认版本为 24.22.3 或更高的 24.x 版本,或 26.13.1 或更高版本。
3. 对于源码检出,运行 `pnpm install`。使用平常的 profile 启动 DSH,确认它能成功启动。
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@deepseek-ai/dsh-root",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"license": "MIT",
"private": true,
"type": "module",
"packageManager": "pnpm@11.28.5",
"engines": {
"node": ">=24.9.0"
"node": "^24.22.3 || >=26.13.1"
},
"workspaces": [
"vendor/*",
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh-deepseek-account",
"description": "Sign in to DeepSeek and manage account credentials and notifications",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"publishConfig": {
"access": "public"
},
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh-deepseek-auth",
"description": "DeepSeek request authentication (ctx.deepseekAuth): choose between the API key and the account sign-in for one DeepSeek API request and release its headers",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"publishConfig": {
"access": "public"
},
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh-acp",
"description": "Automation-only Agent Client Protocol server for driving DeepSeek Harness agents over JSON-RPC stdio",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"publishConfig": {
"access": "public"
},
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh-api-gateway",
"description": "Typert Remote Host dispatcher and Client API endpoint",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"publishConfig": {
"access": "public"
},
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh-api-job-controller",
"description": "Job Remote observation stream and the reference-counted client job-output service",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"publishConfig": {
"access": "public"
},
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh-api-remote-access",
"description": "Method-level Remote access control for non-owner Peers and the per-Peer access snapshot",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"publishConfig": {
"access": "public"
},
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh-api-remotes",
"description": "Remote BFF assembly for application-selected Host capabilities",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"publishConfig": {
"access": "public"
},
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh-api-session-controller",
"description": "Session Remote commands, cold reads, and live control transport",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"publishConfig": {
"access": "public"
},
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh-api-settings-controller",
"description": "Remote owner for the configuration surfaces over the settings-domain seams",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"publishConfig": {
"access": "public"
},
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh-api-terminal-controller",
"description": "Session-owned interactive terminals with shell discovery, screen recovery and typed Remote control",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"publishConfig": {
"access": "public"
},
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh-api-workspace-controller",
"description": "Workspace Remote commands and reconnect-safe state transport",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"publishConfig": {
"access": "public"
},
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh-api-workspace-files",
"description": "Workspace file service and Client resource provider: bounded reads, directory listing, and live metadata over the workspaceFiles Remote namespace",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"publishConfig": {
"access": "public"
},
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh-attachment-local",
"description": "Private content-addressed DSH_HOME attachment storage",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"publishConfig": {
"access": "public"
},
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh-attachment",
"description": "Durable immutable attachment storage seam for the DeepSeek Harness",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"publishConfig": {
"access": "public"
},
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh-app-boot",
"description": "Shared boot glue for the app bins: .env loading, fail-loud Loader guards, snapshot-aware config resolution, and the Loader boot sequence",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"publishConfig": {
"access": "public"
},
@@ -40,7 +40,7 @@
"@deepseek-ai/dsh-package-manifest": "workspace:*",
"@eslint-community/regexpp": "^4.12.2",
"ajv": "^8.20.0",
"node-addon-require-builtin": "^0.1.9",
"node-addon-require-builtin": "^0.1.10",
"resolve.exports": "^2.0.3",
"semver": "^7.8.5",
"@deepseek-ai/dsh-native-command": "workspace:*"
@@ -903,7 +903,7 @@ export function installRuntimeInterception(
}
let restoreEsm: () => void
/* v8 ignore else -- CI coverage runs Node 24 v2; the Node 24.0 matrix exercises the v1 adapter */
/* v8 ignore else -- supported Node releases use v2; the v1 adapter serves Node before 24.12, below the supported floor */
if (modern) {
const loader = esm as ModuleLoaderV2
const original = Reflect.get(loader, 'resolveSync')
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh-cmdline",
"description": "Immutable command-line handoff from a dsh launcher to any app plugin that injects cmdlineArgs",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"publishConfig": {
"access": "public"
},
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh-config-editor",
"description": "Persist plugin configuration through profile patches and Loader reconciliation",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"publishConfig": {
"access": "public"
},
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh-hmr",
"description": "Coordinated module and profile configuration hot reload",
"version": "0.2.3-alpha.1",
"version": "0.2.3-alpha.2",
"publishConfig": {
"access": "public"
},
@@ -43,7 +43,7 @@
"dependencies": {
"@babel/code-frame": "^7.29.0",
"chokidar": "5.0.0",
"node-addon-require-builtin": "^0.1.9",
"node-addon-require-builtin": "^0.1.10",
"picomatch": "^4.0.7",
"@deepseek-ai/schemastery": "workspace:~"
},
+1 -1
View File
@@ -111,7 +111,7 @@ function captureEsmResolveCache(native: NativeAccess, parentURL: string): Map<st
}
try {
const loader = native.esmLoader
/* v8 ignore else -- CI coverage runs the Node 24 loader; the Node 24.0 matrix exercises the v1 signature */
/* v8 ignore else -- supported Node releases use the v2 loader; the v1 signature serves Node before 24.12, below the supported floor */
if ('getOrCreateModuleJob' in loader) loader.resolveSync(parentURL, { specifier: 'node:path', attributes: {} })
else loader.resolveSync('node:path', parentURL, {})
} finally {
Loaded 100 of 572 files, more files were not shown because too many files have changed in this diff. Show more