@aiwayds/dsh-dcp 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +14 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -17,17 +17,28 @@ dsh 自带三层压缩里,`compaction-basic` 每次压缩都要付一次 LLM
17
17
  ## 快速开始
18
18
 
19
19
  ```bash
20
- # 1. 克隆并安装(依赖与 dsh 0.1.0-rc.6 对齐)
20
+ # 1. 获取插件(二选一)
21
+ # A. npm 包(分发用):
22
+ npm i @aiwayds/dsh-dcp
23
+ # B. 源码(本地挂载推荐,见下):
21
24
  git clone git@github.com:fan56/dsh-dcp.git ~/github/dsh-dcp
22
25
  cd ~/github/dsh-dcp && npm install
23
26
 
24
- # 2. 挂载:在 ~/.dsh/cordis.patch.yml 追加(name 必须是绝对路径)
27
+ # 2. 挂载:在 ~/.dsh/cordis.patch.yml 追加(name 用绝对路径最稳)
25
28
  # - id: compaction-basic
26
- # name: /Users/<you>/github/dsh-dcp/lib/index.js
29
+ # disabled: true
30
+ # - insert:
31
+ # - id: dsh-dcp
32
+ # name: /Users/<you>/github/dsh-dcp/lib/index.js
33
+ # config:
34
+ # thresholdRatio: 0.7
35
+ # language: zh
27
36
 
28
37
  # 3. 重启 dsh,输入 /dcp 验证
29
38
  ```
30
39
 
40
+ > **为什么挂载用绝对路径而不是 `name: @aiwayds/dsh-dcp`**:当前 harness 的 loader 对裸包名从 dsh 安装目录解析(`boot()` 未传 `bareModuleBaseUrl`),不从 profile 的 node_modules 解析——所以把包装进 profile 也不会被 patch 的 `name` 找到。绝对路径(或把包装进 dsh 自身 node_modules)是可靠方式;npm 包的价值在版本化分发。
41
+
31
42
  `/compact` 命令、自动压力触发、overflow 恢复、UI 的 checkpoint 卡片照常工作——它们只依赖 `ctx.compaction` 接口,与本后端无关。
32
43
 
33
44
  ## `/dcp` 命令
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiwayds/dsh-dcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Deterministic context-pruning compaction backend for dsh (DeepSeek Harness) — zero-LLM summaries, /dcp command, works out of the box. Design references Opencode-DCP/opencode-dynamic-context-pruning.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",