@aiwayds/dsh-dcp 0.1.0 → 0.1.2

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 +22 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -16,18 +16,34 @@ dsh 自带三层压缩里,`compaction-basic` 每次压缩都要付一次 LLM
16
16
 
17
17
  ## 快速开始
18
18
 
19
+ **用我们的 TUI(`dsh-tui-pi`)?什么都不用做。** `dsh-tui-pi` ≥ 0.4.2 依赖 `@aiwayds/dsh-dcp`,并在它自己的 `cordis.patch.yml` 里自动挂载(禁用 compaction-basic + 插入 dsh-dcp):
20
+
19
21
  ```bash
20
- # 1. 克隆并安装(依赖与 dsh 0.1.0-rc.6 对齐)
21
- git clone git@github.com:fan56/dsh-dcp.git ~/github/dsh-dcp
22
- cd ~/github/dsh-dcp && npm install
22
+ npm i @aiwayds/dsh-tui-pi # 重启 dsh 即可,dcp 开箱即用,无需手动配置
23
+ ```
23
24
 
24
- # 2. 挂载:在 ~/.dsh/cordis.patch.yml 追加(name 必须是绝对路径)
25
- # - id: compaction-basic
26
- # name: /Users/<you>/github/dsh-dcp/lib/index.js
25
+ **独立使用(非 tui 环境)** —— npm 只把包装进 node_modules,**挂载(写 patch 条目)不在 npm 行为里**,除非宿主 bundle(如 dsh-tui-pi)自带挂载。不装 tui 就得手动写:
26
+
27
+ ```bash
28
+ # 1. 安装
29
+ npm i @aiwayds/dsh-dcp
30
+ # 或源码:git clone git@github.com:fan56/dsh-dcp.git && cd dsh-dcp && npm install
31
+
32
+ # 2. 手动挂载:在 ~/.dsh/cordis.patch.yml 追加
33
+ - id: compaction-basic
34
+ disabled: true
35
+ - insert:
36
+ - id: dsh-dcp
37
+ name: '@aiwayds/dsh-dcp' # 包装进 profile 后用裸包名即可(与 tui-pi 一致)
38
+ config:
39
+ thresholdRatio: 0.7
40
+ language: zh
27
41
 
28
42
  # 3. 重启 dsh,输入 /dcp 验证
29
43
  ```
30
44
 
45
+ > 挂载名用**裸包名**(`@aiwayds/dsh-dcp`)即可——只要它装进了 profile 的 node_modules(`dsh plugin add` 或 profile package.json 依赖),loader 就能像解析 tui-pi 一样找到它;用**绝对路径**指向源码入口同样可行。
46
+
31
47
  `/compact` 命令、自动压力触发、overflow 恢复、UI 的 checkpoint 卡片照常工作——它们只依赖 `ctx.compaction` 接口,与本后端无关。
32
48
 
33
49
  ## `/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.2",
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",