Skip to content

chore(deps): 宿主开发依赖对齐 0.2 线(0.1.0-rc.6 → 0.2.0-rc.1) - #344

Merged
modusensus merged 1 commit into
mainfrom
feat/dsh-0.2-compat
Sep 30, 2026
Merged

modusensus merged 1 commit into
mainfrom
feat/dsh-0.2-compat

Conversation

@modusensus

Copy link
Copy Markdown
Collaborator

问题

peerDependencies 从 #121 起就声明覆盖 0.2.x:

>=0.1.0-rc.6 <0.2.0 || >=0.1.5-rc.0 <0.3.0 || >=0.2.0-rc.0 <0.3.0

但 devDependencies 一直停在 ^0.1.0-rc.6 —— 在 0.x 语义下这等于 >=0.1.0-rc.6 <0.2.0,永远装不到 0.2.x —— lockfile 锁在 0.1.0-rc.8,CI 的 npm ci 装的也是这套。

结果:声明支持 0.2,却没有任何测试跑在 0.2 上。中间隔着 0.1.5 / 0.1.6 / 0.1.7 三条线,外加整个 0.2.0。而当前桌面端 DSH NEXT 2.0.16-next 内置的内核已经是 0.2.0-rc.1 —— 用户跑在从未被验证过的版本上。

改动

  • 四个 @deepseek-ai/dsh-* 开发依赖 ^0.1.0-rc.6 → ^0.2.0-rc.1(现锁 0.2.0-rc.2,caret 覆盖整个 0.2.x)
  • README 前置条件的兼容性说明改为与 peer 声明一致(原文只写「兼容 DSH 0.1.x」)

运行时代码零改动:src/ 未动、lib/ 未重新生成(check-sync 通过)。peerDependencies 未改,0.1.x 仍可安装。

验证

测试 1437 项,两个内核版本都跑过:

内核 结果 说明
0.2.0-rc.1 1436 通过 / 0 失败 / 1 跳过 当前桌面端 2.0.16-next 内置
0.2.0-rc.2 1436 通过 / 0 失败 / 1 跳过 ^0.2.0-rc.1 解析到的最新

另有完整 CI 路径回放(npm ci → check-sync → npm test)全绿。

依赖面本身很小,升级无需改代码。src/ 只用到宿主四个 API:

API 包 0.2 线上状态
createUserMessage dsh-llm 在,签名不变({content, source})
BlockAssembler dsh-llm 在
defineTool dsh-tools 在
z schemastery 在(3.18.4)

另注:createMessage 在 0.2 上仍是 structuredClone + deepFreeze、不带 schema 校验,所以 source.kind: "plugin:dsh-mneme" 这类自定义取值不会被拦。

一个遗留问题(不在本 PR 范围)

改完之后,0.1.x 变成了「声明但不再被 CI 覆盖」的那一侧。本 PR 保留 peer 里的 0.1.x 分支(老桌面端仍可安装,且运行时代码零改动所以行为不变),但要让两边都有覆盖,需要给 CI 加一个宿主版本矩阵维度——代价是 CI 时间翻倍。要不要做、怎么做,想听意见。

peerDependencies 自 #121 起已声明覆盖 0.2.x,但 devDependencies 与 lockfile
一直停在 0.1.0-rc.8,CI 的 npm ci 装的也是这套——声明支持 0.2 却从未验证,
中间隔着 0.1.5 / 0.1.6 / 0.1.7 三条线外加整个 0.2.0。本次把四个
@deepseek-ai/dsh-* 开发依赖提到 ^0.2.0-rc.1(现锁 0.2.0-rc.2),并让
README 的兼容性说明与 peer 声明一致(原文只写「兼容 DSH 0.1.x」)。

运行时代码零改动:src/ 未动、lib/ 未重新生成,check-sync 通过。测试 1437 项
在 0.2.0-rc.1(当前桌面端 2.0.16-next 内置内核)与 0.2.0-rc.2 上均
1436 通过 / 0 失败 / 1 跳过。

依赖面本身很小,升级无需改代码:src/ 只用到宿主四个 API——dsh-llm 的
createUserMessage 与 BlockAssembler、dsh-tools 的 defineTool、schemastery 的
z;0.2 线上这四个都在,createMessage 仍是 structuredClone + deepFreeze、
不带 schema 校验,故 source.kind: "plugin:dsh-mneme" 之类的自定义取值不受影响。
Copilot AI lite review requested due to automatic review settings September 30, 2026 11:08
@coderabbitai

coderabbitai Bot commented Sep 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 6 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: slow-stack/mneme/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: a7245c9a-342c-4e2d-8295-c3c073e819e8

📥 Commits

Reviewing files that changed from the base of the PR and between 8519f57 and 979fec2.

⛔ Files ignored due to path filters (1)
  • dsh-mneme/package-lock.json is excluded by !**/package-lock.json, !**/package-lock.json
📒 Files selected for processing (2)
  • dsh-mneme/README.md
  • dsh-mneme/package.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Sep 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@modusensus
modusensus merged commit 9968bd0 into main Sep 30, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants