Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 56 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,32 +27,35 @@ jobs:
cache: npm
- name: Install Zstandard CLI for Node 20 compression and codec checks
run: sudo apt-get update && sudo apt-get install -y zstd
- name: Install deps (cordis/react/react-dom for the host+client suites)
run: npm ci
- name: Test suite (reader + host smoke + client render; hermetic, no dsh install needed)
- name: Install dependencies without lifecycle scripts
run: npm ci --ignore-scripts
- name: Existing and live-sync regression suites plus actual-tarball privacy gate
run: npm test
- name: CLI smoke
run: node bin/dsh-codex-sync.js --help

# Real DSH host boot: a harness release that breaks the plugin contract
# fails here instead of on the user's machine.
# Composition only: a successful dump is not host boot or GUI acceptance.
dsh-boot-smoke:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
dsh: [0.2.0-rc.2, 0.2.1-rc.2, 0.2.1-rc.3]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm ci
node-version: 24
- run: npm ci --ignore-scripts
- run: npm install -g pnpm
- name: pack plugin and add to a scratch web profile
- name: Pack exact source and add to a scratch web profile
run: |
export DSH_HOME="$RUNNER_TEMP/dsh-home"
npm pack --json > pack.json
npm pack --ignore-scripts --json > pack.json
TGZ="$(node -p 'JSON.parse(require("fs").readFileSync("pack.json"))[0].filename')"
mkdir "$RUNNER_TEMP/packed-plugin"
tar -xzf "$TGZ" -C "$RUNNER_TEMP/packed-plugin"
Expand All @@ -62,9 +65,50 @@ jobs:
cmp docs/COMPATIBILITY.md "$RUNNER_TEMP/packed-plugin/package/docs/COMPATIBILITY.md"
git rev-parse HEAD
sha256sum "$TGZ"
pnpm dlx @deepseek-ai/dsh@0.2.0-rc.2 plugin --profile web add "$PWD/$TGZ"
pnpm dlx @deepseek-ai/dsh@${{ matrix.dsh }} plugin --profile web add "$PWD/$TGZ"
echo "DSH_HOME=$DSH_HOME" >> "$GITHUB_ENV"
- name: composed config mentions this plugin
- name: Composed config mentions this plugin
run: |
pnpm dlx @deepseek-ai/dsh@0.2.0-rc.2 --profile web --dump-config > composed.txt
pnpm dlx @deepseek-ai/dsh@${{ matrix.dsh }} --profile web --dump-config > composed.txt
grep -E "dsh-codex-sync|codex-sync" composed.txt

current-skills-contract:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
node: [20, 22]
fixture: [current-runtime, current-runtime-rc3]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: npm ci --ignore-scripts
- name: Locked Skills contract for one supported runtime
run: npm run test:current -- test/${{ matrix.fixture }}

native-mcp-contract:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
fixture: [native-runtime, native-runtime-rc3, native-runtime-020-rc2]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: 24
- run: npm ci --ignore-scripts
- name: Locked native MCP contract for one supported runtime
run: npm run test:native -- test/${{ matrix.fixture }}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
node_modules/
*.tgz
.DS_Store
runtime-status*.json
*.log
.env
.env.*
!.env.example
.npmrc
.release-artifacts/
pack.json
composed.txt
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## Unreleased

- Admit the DSH MCP client 0.2.1-rc.2 without compatibility exemptions; resolve shipped clients through the Host Loader with an npm fallback.
- Make Codex Skills cache invalidation registration-owned and watched, including late-created roots and master/per-item changes; parse real YAML invocation policies and fix flat-file resource bases.
- Use complete TOML parsing and portable field validation; keep unsupported tool policies fail-closed and diagnostics free of source excerpts/credential values.
- Retain actual Cordis Fibers, cancel the full startup pipeline, join namespace retirement before replacement, and admit revocations independently of unrelated starts/teardowns. Preserve explicit native reconnect and late dependency activation.
- Add hermetic lifecycle/cache/native-protocol suites and actual-tarball privacy gates; exclude local deployment notes/runtime artifacts and export localized metadata plus an original MIT icon.


## 1.6.2 — 2026-10-05

- Import sessions in the installed DSH current format and support handle-based persistence, incremental assistant replies, new turns, and idempotent re-imports (PR #3).
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ When adopting or exploring **DeepSeek Harness (DSH)**, developers typically face
### 2. ⚡ Live First-Class Skills Mounting
- Mounts `~/.codex/skills/*/SKILL.md` directly into DSH's native skill catalog;
- Full support for nested directory resources and multi-file skill bundles;
- **Zero-restart updates**: Edit a skill file on disk, and DSH recognizes the change on the next turn.
- **Zero-restart updates**: additions, deletion, rename and YAML metadata changes invalidate the owning registry cache; bodies are reread on load. Master/per-item switches also update cached catalogs.

For the bounded 0.2 upgrade policy (including 0.2.1-rc.3), native API checks, supported fields, trust boundary and synthetic release checks, see [Live sync compatibility](docs/LIVE-SYNC.md). No user-specific profiles, service inventories or runtime snapshots are included.

### 3. 🔌 Automated Bidirectional MCP Mirroring
- **Codex → DSH**: Watches `~/.codex/config.toml` live, dynamically mirroring `[mcp_servers.*]` to DSH with conflict avoidance and stderr silencing;
Expand Down
4 changes: 3 additions & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@
### 2. ⚡ Skills 实时一等公民挂载
- 直接将 `~/.codex/skills/*/SKILL.md` 注册为 DSH 原生一等公民技能;
- 支持完整的子目录资源引用与多文件架构;
- **改完即用**:在本地修改 `SKILL.md`,DSH 下次调用即时生效,无需重启 DSH 服务。
- **改完即用**:新增、删除、重命名和 YAML 元数据变化使所属注册缓存失效;正文按需重读。总开关及逐项同步开关同样更新已有缓存。

0.2 系列的有界升级策略(含 0.2.1-rc.3)、原生接口能力检查、字段支持、执行信任边界及合成发布测试见 [实时同步兼容说明](docs/LIVE-SYNC.md)。不包含个人 profile、服务库存或运行快照。

### 3. 🔌 MCP 自动双向镜像
- **Codex → DSH**:后台自动监听 `~/.codex/config.toml`,将 `[mcp_servers.*]` 动态镜像到 DSH,支持热重载,并内置常用服务的静音与冲突排除策略;
Expand Down
15 changes: 9 additions & 6 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,18 +124,21 @@ Two sources (lib/mcp.js):
server (`@deepseek-ai/dsh-mcp-client`, optional peer; graceful warning if
missing).
- **Auto-mirror** (`mcpMirror`, default on) — parses `~/.codex/config.toml`
`[mcp_servers.*]` (TOML-lite parser: command/args/env/cwd + url/
bearer_token_env_var + enabled), maps:
`[mcp_servers.*]` (complete TOML parser; command/args/env/env_vars/cwd,
URL/static/environment headers, bearer references, timeouts and enabled), maps:
- stdio → `{ transport: 'stdio', serverName, command, args, env }`
- url → `{ transport: 'streamable-http', url, headers: { Authorization:
'Bearer <process.env[VAR]>' } }`
- skips `enabled = false`; **always excludes `dsh-plugins`** (the reverse
bridge — would recurse); `mcpMirrorDeny`/`mcpMirrorOnly` filter; names in
explicit `mcpServers` win.
- `fs.watch(config.toml)` + 500 ms debounce → diff mount/unmount, so
editing codex's config live-syncs dsh's MCP servers.
- `failOnStartupError: false` on every instance: a failing server logs and
continues.
- Parent-directory observation plus bounded polling handles missing roots and
repeated atomic replacements; only changed generations are replaced.
- Per-generation cancellation and same-name retirement barriers do not block
later revocations behind another server's startup or teardown.
- Mirrored clients require initial readiness and own bounded initial retries;
explicit clients retain native dependency waiting and reconnect behavior.
See [live-sync contracts](LIVE-SYNC.md) for limits and synthetic tests.

## 6. Client bundle (lib/client.js)

Expand Down
30 changes: 25 additions & 5 deletions docs/COMPATIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,31 @@ The PR #3 local follow-up was tested with the official npm/CLI
and session-format catalog v4. Desktop version numbers are independent and
are not substitutes for npm package versions.

The optional MCP client peer admits `0.2.0-rc.2` explicitly, alongside the
existing `^0.0.1-rc.1` range. This does not claim compatibility with every
future 0.2 release or prove full MCP mirroring acceptance. Session import
requires the host's production migration/catalog packages; development-only
migration packages must not be installed into a production profile as a fix.
Host admission now uses `engines.dsh: ^0.0.1-rc.1 || >=0.2.0-rc.2 <0.3.0-0`,
retaining the legacy declaration while admitting later 0.2 patch and prerelease
versions, including `0.2.1-rc.3`. DSH matches this range with
`includePrerelease: true`; the `-0` upper bound also excludes **0.3 prereleases**.
This is a bounded candidate family, not certification of every future release.
No version exemption or exact RC comparison is used at runtime.

The optional native MCP peer likewise uses bounded ranges; a 0.2.1 lower tuple
is retained because npm's own peer matcher does not enable `includePrerelease`.
Host admission is explicitly separate from that npm peer hint: DSH gives
`engines.dsh` precedence rather than treating every SDK peer as a core-version
pin. A new patch-level SDK prerelease may still need a peer-hint update for
standalone npm installations, but cannot by itself block Host Loader admission.

Isolated real SkillRegistry fixtures cover `0.2.1-rc.2` and `0.2.1-rc.3`.
Native MCP protocol/lifecycle fixtures cover `0.2.0-rc.2`, `0.2.1-rc.2` and
`0.2.1-rc.3`. Native config-field checks and independently owned Skills
registration provide a fail-closed boundary when an admitted runtime changes
an interface. See [LIVE-SYNC.md](LIVE-SYNC.md) for exact scope and reproducible
commands. These checks do not prove full Desktop GUI acceptance or every
historical/future implementation's semantics.

Session import requires the host's production migration/catalog packages;
development-only migration packages must not be installed into a production
profile as a fix.

Use a profile dependency plus the bundle patch insert, as in
`examples/web-profile.cordis.patch.yml`. Do not also add the same bundle to
Expand Down
Loading