@aiwayds/dsh-dcp 0.10.0 → 0.11.0

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.
package/README.en.md CHANGED
@@ -3,7 +3,7 @@
3
3
  Deterministic context-compaction backend for dsh (DeepSeek Harness): **context
4
4
  compaction without an LLM call**, works out of the box.
5
5
 
6
- **Requires dsh >= 0.1.2-rc.1** — this plugin targets the dsh RC/stable line only (CI and releases resolve the newest of the `latest`/`next` dist-tags at runtime). **The alpha line is no longer supported.**
6
+ **Requires dsh >= 0.1.5-rc.2** — this plugin targets the dsh RC/stable line only (CI and releases resolve the newest of the `latest`/`next` dist-tags at runtime). **The alpha line is no longer supported.**
7
7
 
8
8
  > [简体中文](README.md) · **English**
9
9
 
@@ -131,15 +131,25 @@ Removing the package without the reverse step leaves the mount pointing at the v
131
131
 
132
132
  | Command | Effect |
133
133
  |---|---|
134
- | `/dcp` | status: config, compaction count, tokens saved |
135
- | `/dcp compact` | compact now (zero LLM) |
134
+ | `/dcp` | compact now (zero LLM); same as `/dcp compact` |
135
+ | `/dcp status` | status: config, compaction count, tokens saved |
136
+ | `/dcp help` / `--help` / `-h` | show the command grammar |
136
137
  | `/dcp set <k> <v>` | adjust a knob for this session, with a persist hint |
137
138
 
138
139
  Settable: `dedup`, `purgeErrors`, `maxItems`, `maxItemChars`,
139
140
  `maxSummaryTokens`, `language`, `tokenEstimate`, `thresholdRatio`,
140
141
  `roundInterval`, `notice`, `onModelSwitch`, `modelSwitchMinTokens`.
141
142
 
142
- The `/dcp` status also lists every session that has compacted (subagents
143
+ The bare `/dcp` and `/dcp compact` hit the same manual compaction seam:
144
+ the common action takes zero arguments, so nobody has to remember a
145
+ subcommand, while the read-only and tuning verbs stay behind explicit
146
+ arguments (`/dcp status` for the block, `/dcp help` for usage).
147
+
148
+ > **Behavior change in 0.11.0**: the bare `/dcp` now compacts instead of
149
+ > showing status; the status output moved to `/dcp status`. After
150
+ > upgrading, use `/dcp status` to inspect — the bare command compacts.
151
+
152
+ The `/dcp status` block also lists every session that has compacted (subagents
143
153
  included): `per-session: session-1 (2 compactions, ~444 tokens), child
144
154
  (1 compaction, ~22 tokens)`. Compactions count per session; disposed
145
155
  sessions (one-shot subagents included) fall out of the overview
@@ -154,11 +164,11 @@ for the rest) so the status stays one line.
154
164
  | Overflow recovery | on a provider context-window error | inherited |
155
165
  | **Round interval** | every `roundInterval` assistant messages | added by this plugin; one round = one LLM roundtrip (each tool-iteration response counts, so one-shot subagents trigger too). **Default 50**: first compaction after message 50, then every 50 more (100, 150, …); any compaction (pressure included) restarts the clock. Fires at the first idle boundary after the count is reached (below the pressure threshold too). `0` disables; requires the default `auto: true` |
156
166
  | **Model switch** | the session's effective provider/model route changes | added by this plugin (`onModelSwitch`). Default `notice`: appends one row suggesting `/dcp compact` first to shadow the old model's history and save tokens; `auto` compacts at the session's next idle boundary; `off` disables. Two gates: switches within 10 assistant messages of the last compaction are ignored (nothing stale to shadow), and switches while the context is below `modelSwitchMinTokens` (default 32768, `0` disables this gate) are ignored (not enough to be worth shadowing); `auto` requires the default `auto: true`, otherwise it degrades to `notice` |
157
- | Manual | `/dcp compact`, `/compact` | anytime |
167
+ | Manual | `/dcp` (bare), `/dcp compact`, `/compact` | anytime |
158
168
 
159
169
  - **Subagents are covered**: in-process subagents (including continuable and one-shot children) dispatch through the same events, so pressure/overflow/round/model-switch triggers count and fire per child session independently. The round trigger counts assistant messages, so a one-shot subagent whose whole run is a single turn (many tool iterations) triggers too.
160
170
  - **How model-switch detection works**: the per-request `request/context` routing snapshot is folded per session (a provider or model change alone counts as a switch), covering every switch entry point — TUI `/model`, web clients, changed default-model settings. A session's first observed request only seeds the baseline. `notice: false` silences the compaction rows only; the switch row is controlled by `onModelSwitch` independently. The size floor is measured by the host token meter (`measure().surfaceTokens`) and fails open when unavailable.
161
- - **Visibility**: after every trigger event a one-line notice row (`dcp: compacted N history items (~X tokens, trigger)`) is appended to the session; frontends render it as a collapsed row. Note the row also rides the model request context (~15–25 tokens per compaction), and it is **on by default since 0.4.0** — disable with `notice: false`. `/dcp` stats count every committed region (a pressure retry loop may commit several).
171
+ - **Visibility**: after every trigger event a one-line notice row (`dcp: compacted N history items (~X tokens, trigger)`) is appended to the session; frontends render it as a collapsed row. Note the row also rides the model request context (~15–25 tokens per compaction), and it is **on by default since 0.4.0** — disable with `notice: false`. `/dcp status` stats count every committed region (a pressure retry loop may commit several).
162
172
 
163
173
  ## Configuration
164
174
 
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  dsh(DeepSeek Harness)的确定性压缩后端:**上下文压缩不调 LLM**,开箱即用。
4
4
 
5
- **要求 dsh >= 0.1.2-rc.1** — 本插件只跟随 dsh RC/stable 线(CI 与发版在运行时解析 latest/next 中更新的 dist-tag)。**不再支持 alpha 线。**
5
+ **要求 dsh >= 0.1.5-rc.2** — 本插件只跟随 dsh RC/stable 线(CI 与发版在运行时解析 latest/next 中更新的 dist-tag)。**不再支持 alpha 线。**
6
6
 
7
7
  > **简体中文** · [English](README.en.md)
8
8
 
@@ -110,13 +110,18 @@ npx dsh-dcp-setup --remove /path/to/cordis.patch.yml
110
110
 
111
111
  | 命令 | 作用 |
112
112
  |---|---|
113
- | `/dcp` | 状态:配置、压缩次数、省下的 token |
114
- | `/dcp compact` | 立即压缩(零 LLM) |
113
+ | `/dcp` | 立即压缩(零 LLM);等同于 `/dcp compact` |
114
+ | `/dcp status` | 状态:配置、压缩次数、省下的 token |
115
+ | `/dcp help` / `--help` / `-h` | 显示命令用法 |
115
116
  | `/dcp set <k> <v>` | 会话内调参,并提示如何持久化 |
116
117
 
117
118
  可调键:`dedup`、`purgeErrors`、`maxItems`、`maxItemChars`、`maxSummaryTokens`、`language`、`tokenEstimate`、`thresholdRatio`、`roundInterval`、`notice`、`onModelSwitch`、`modelSwitchMinTokens`。
118
119
 
119
- `/dcp` 状态还会列出每个发生过压缩的会话(per-session 概览,含子代理),例如 `per-session: session-1 (2 compactions, ~444 tokens), child (1 compaction, ~22 tokens)`。压缩按会话独立计数;已销毁的会话(含 one-shot 子代理)自动从概览消失;列表封顶一行(最多前 10 个会话,超出显示 `+N more`)。
120
+ 裸 `/dcp` 与 `/dcp compact` 走同一条手动压缩缝——最常用的动作零参数直达,不必记子命令;只读或调参的动作留在显式子命令后面(看状态打 `/dcp status`,用法打 `/dcp help`)。
121
+
122
+ > **0.11.0 起语义变更**:裸 `/dcp` 由「显示状态」改为「立即压缩」,原来的状态输出移到 `/dcp status`。升级后别再用裸 `/dcp` 查状态——它会直接压一次。
123
+
124
+ `/dcp status` 还会列出每个发生过压缩的会话(per-session 概览,含子代理),例如 `per-session: session-1 (2 compactions, ~444 tokens), child (1 compaction, ~22 tokens)`。压缩按会话独立计数;已销毁的会话(含 one-shot 子代理)自动从概览消失;列表封顶一行(最多前 10 个会话,超出显示 `+N more`)。
120
125
 
121
126
  ## 触发条件
122
127
 
@@ -126,11 +131,11 @@ npx dsh-dcp-setup --remove /path/to/cordis.patch.yml
126
131
  | 溢出恢复 | 模型报 context 超限时 | 继承官方 |
127
132
  | **轮数触发** | 会话每收到 `roundInterval` 条 assistant message | 本插件新增;一条 = 一次 LLM 往返(每轮工具迭代各算一条,one-shot 子代理也能触发)。**默认 50**:第 50 条后触发第一次,之后每 50 条一次(100、150……);任何一次压缩(含压力触发)都会重置轮数时钟。到达条数后的第一个空闲点触发(阈值之下也压)。`0` 关闭;需保持 `auto: true`(默认开) |
128
133
  | **模型切换** | 会话实际路由的 provider/model 变化时 | 本插件新增(`onModelSwitch`)。默认 `notice`:追加一行提醒"建议先执行 `/dcp compact` 压缩旧模型历史,节省 token";`auto` 在该会话下一个空闲点自动压缩;`off` 关闭。两道门控:距上次压缩不足 10 条 assistant message 忽略(没有旧账可甩),上下文不足 `modelSwitchMinTokens`(默认 32768,`0` 关闭该门)忽略(不够甩的量);`auto` 需保持 `auto: true`(默认开),否则降级为 `notice` |
129
- | 手动 | `/dcp compact`、`/compact` | 随时可用 |
134
+ | 手动 | `/dcp`(无参数)、`/dcp compact`、`/compact` | 随时可用 |
130
135
 
131
136
  - **subagent 同样生效**:进程内 subagent(含 continuable 与 one-shot 子代理)走同一套事件分发,压力/溢出/轮数/模型切换对子会话独立计数、独立触发。轮数触发按 assistant message 计数,所以全程只有 1 个 turn 的 one-shot 子代理(多次工具迭代)也能触发。
132
137
  - **模型切换检测原理**:折叠每请求的 `request/context` 路由快照(provider 或 model 任一变化即判定切换),覆盖所有切换入口(TUI `/model`、Web 客户端、默认模型设置变更);会话首个请求只播种基线不告警。`notice: false` 只关压缩通知行,模型切换提醒行由 `onModelSwitch` 独立控制。上下文下限按宿主 tokenMeter 的实测计价(`measure().surfaceTokens`),测不到时 fail-open(只留轮数门控)。
133
- - **压缩可见性**:每次压缩成功后,会话里追加一行 `dcp: 已压缩 N 条历史(约 X tokens,触发方式)` 通知行(前端渲染为折叠行)。注意该行也会作为上下文随请求发给模型(每次压缩约 15–25 tokens),且 **0.4.0 起默认开启**;`notice: false` 可关闭。`/dcp` 的 stats 持续累计(压力触发的多次 region 提交各计一次)。
138
+ - **压缩可见性**:每次压缩成功后,会话里追加一行 `dcp: 已压缩 N 条历史(约 X tokens,触发方式)` 通知行(前端渲染为折叠行)。注意该行也会作为上下文随请求发给模型(每次压缩约 15–25 tokens),且 **0.4.0 起默认开启**;`notice: false` 可关闭。`/dcp status` 的 stats 持续累计(压力触发的多次 region 提交各计一次)。
134
139
 
135
140
  ## 配置
136
141
 
package/lib/command.js CHANGED
@@ -1,7 +1,11 @@
1
1
  /**
2
- * The `/dcp` slash command: status, manual compaction, and runtime knobs —
3
- * one entry point, no required arguments (design references opencode-dcp's
4
- * `/dcp` panel in a dsh-idiomatic, text-only form).
2
+ * The `/dcp` slash command: manual compaction by default, plus status and
3
+ * runtime knobs — one entry point, no required arguments (design references
4
+ * opencode-dcp's `/dcp` panel in a dsh-idiomatic, text-only form).
5
+ *
6
+ * The bare command compacts, matching how a user reaches for `/dcp` when the
7
+ * context feels heavy; the infrequent read-only and tuning verbs stay behind
8
+ * explicit arguments (`status`, `set`), and `--help` prints the grammar.
5
9
  *
6
10
  * @module dsh-dcp/command
7
11
  */
@@ -10,8 +14,10 @@ import { ManualCompactionError } from '@deepseek-ai/dsh-compaction'
10
14
  import { RUNTIME_SETTABLE } from './config.js'
11
15
 
12
16
  const USAGE = `Usage:
13
- /dcp show status (mode, config, compaction stats)
14
- /dcp compact compact now (deterministic, no LLM call)
17
+ /dcp compact now (deterministic, no LLM call)
18
+ /dcp compact same as the bare command
19
+ /dcp status show status (mode, config, compaction stats)
20
+ /dcp help show this help (also --help / -h)
15
21
  /dcp set <k> <v> adjust a knob for this session (dedup, purgeErrors,
16
22
  maxItems, maxItemChars, maxSummaryTokens, language,
17
23
  tokenEstimate, thresholdRatio, roundInterval, notice,
@@ -127,10 +133,10 @@ async function compactNow(ctx, invocation, engine) {
127
133
  export async function executeDcp(ctx, invocation, engine, version) {
128
134
  const tokens = invocation.rawInput.trim().split(/\s+/).filter((token) => token.length > 0)
129
135
  const [subcommand, ...rest] = tokens
130
- if (subcommand === undefined) return success(statusText(engine, version))
131
- if (subcommand === 'status') return success(statusText(engine, version))
132
- if (subcommand === 'help') return success(USAGE)
136
+ if (subcommand === undefined) return compactNow(ctx, invocation, engine)
133
137
  if (subcommand === 'compact') return compactNow(ctx, invocation, engine)
138
+ if (subcommand === 'status') return success(statusText(engine, version))
139
+ if (subcommand === 'help' || subcommand === '--help' || subcommand === '-h') return success(USAGE)
134
140
  if (subcommand === 'set') {
135
141
  if (rest.length < 2) return failure(USAGE)
136
142
  const outcome = applySet(engine, rest[0], rest.slice(1).join(' '))
@@ -149,7 +155,8 @@ export async function executeDcp(ctx, invocation, engine, version) {
149
155
  export function registerDcpCommand(ctx, engine, version) {
150
156
  return ctx.commands.register({
151
157
  name: 'dcp',
152
- description: 'dsh-dcp: deterministic compaction status and controls',
158
+ description: 'dsh-dcp: compact now (deterministic, zero LLM) — /dcp --help for status and controls',
159
+ input: { hint: '[compact|status|help|set <k> <v>]' },
153
160
  handler: (invocation) => executeDcp(ctx, invocation, engine, version),
154
161
  })
155
162
  }
package/lib/skill.js CHANGED
@@ -39,7 +39,7 @@ const SKILL_RESOURCE_BASE = {
39
39
  const SKILL_INVOCATION = { modelInvocable: true, userInvocable: true }
40
40
 
41
41
  /** Routing description; must stay identical to the SKILL.md frontmatter (asserted in tests). */
42
- export const SKILL_DESCRIPTION = 'dsh 压缩引擎插件(@aiwayds/dsh-dcp)使用与配置指南。凡涉及上下文压缩、/dcp 命令、压缩调参(阈值/密度/语言/轮数触发/模型切换),或要配置 dcp 时先读本指南:/dcp 状态与 /dcp set 十二个可调键、持久化到 cordis.patch.yml 挂载块 config: 段(dsh-dcp-setup 管理)、ask_user_question 调参向导、五类触发(压力/溢出/轮数/模型切换/手动)、subagent 会话独立计数生效。触发词:dcp、压缩、compaction、上下文超限、摘要、thresholdRatio、roundInterval、onModelSwitch。'
42
+ export const SKILL_DESCRIPTION = 'dsh 压缩引擎插件(@aiwayds/dsh-dcp)使用与配置指南。凡涉及上下文压缩、/dcp 命令、压缩调参(阈值/密度/语言/轮数触发/模型切换),或要配置 dcp 时先读本指南:裸 /dcp 即压缩、/dcp status 看状态与 /dcp set 十二个可调键、持久化到 cordis.patch.yml 挂载块 config: 段(dsh-dcp-setup 管理)、ask_user_question 调参向导、五类触发(压力/溢出/轮数/模型切换/手动)、subagent 会话独立计数生效。触发词:dcp、压缩、compaction、上下文超限、摘要、thresholdRatio、roundInterval、onModelSwitch。'
43
43
 
44
44
  const SKILL_CANDIDATE = {
45
45
  name: SKILL_PROVIDER_NAME,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiwayds/dsh-dcp",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
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",
@@ -53,17 +53,17 @@
53
53
  "dependencies": {},
54
54
  "peerDependencies": {
55
55
  "@deepseek-ai/cordis": "^4.0.2",
56
- "@deepseek-ai/dsh-agent": ">=0.1.2-rc.1",
57
- "@deepseek-ai/dsh-brand": ">=0.1.2-rc.1",
58
- "@deepseek-ai/dsh-commands": ">=0.1.2-rc.1",
59
- "@deepseek-ai/dsh-compaction": ">=0.1.2-rc.1",
60
- "@deepseek-ai/dsh-compaction-basic": ">=0.1.2-rc.1",
61
- "@deepseek-ai/dsh-compaction-tool-result-pruner": ">=0.1.2-rc.1",
62
- "@deepseek-ai/dsh-invariants": ">=0.1.2-rc.1",
63
- "@deepseek-ai/dsh-llm": ">=0.1.2-rc.1",
64
- "@deepseek-ai/dsh-session": ">=0.1.2-rc.1",
65
- "@deepseek-ai/dsh-skill": ">=0.1.2-rc.1",
66
- "@deepseek-ai/dsh-token-meter": ">=0.1.2-rc.1",
56
+ "@deepseek-ai/dsh-agent": ">=0.1.5-rc.2",
57
+ "@deepseek-ai/dsh-brand": ">=0.1.5-rc.2",
58
+ "@deepseek-ai/dsh-commands": ">=0.1.5-rc.2",
59
+ "@deepseek-ai/dsh-compaction": ">=0.1.5-rc.2",
60
+ "@deepseek-ai/dsh-compaction-basic": ">=0.1.5-rc.2",
61
+ "@deepseek-ai/dsh-compaction-tool-result-pruner": ">=0.1.5-rc.2",
62
+ "@deepseek-ai/dsh-invariants": ">=0.1.5-rc.2",
63
+ "@deepseek-ai/dsh-llm": ">=0.1.5-rc.2",
64
+ "@deepseek-ai/dsh-session": ">=0.1.5-rc.2",
65
+ "@deepseek-ai/dsh-skill": ">=0.1.5-rc.2",
66
+ "@deepseek-ai/dsh-token-meter": ">=0.1.5-rc.2",
67
67
  "@deepseek-ai/schemastery": "^3.18.2"
68
68
  },
69
69
  "peerDependenciesMeta": {
@@ -110,34 +110,34 @@
110
110
  "devDependencies": {
111
111
  "@types/node": "^24.0.0",
112
112
  "@deepseek-ai/cordis": "4.0.2",
113
- "@deepseek-ai/dsh-agent": "0.1.2-rc.1",
114
- "@deepseek-ai/dsh-brand": "0.1.2-rc.1",
115
- "@deepseek-ai/dsh-commands": "0.1.2-rc.1",
116
- "@deepseek-ai/dsh-compaction": "0.1.2-rc.1",
117
- "@deepseek-ai/dsh-compaction-basic": "0.1.2-rc.1",
118
- "@deepseek-ai/dsh-compaction-tool-result-pruner": "0.1.2-rc.1",
119
- "@deepseek-ai/dsh-invariants": "0.1.2-rc.1",
120
- "@deepseek-ai/dsh-llm": "0.1.2-rc.1",
121
- "@deepseek-ai/dsh-session": "0.1.2-rc.1",
122
- "@deepseek-ai/dsh-token-meter": "0.1.2-rc.1",
113
+ "@deepseek-ai/dsh-agent": "0.1.5-rc.2",
114
+ "@deepseek-ai/dsh-brand": "0.1.5-rc.2",
115
+ "@deepseek-ai/dsh-commands": "0.1.5-rc.2",
116
+ "@deepseek-ai/dsh-compaction": "0.1.5-rc.2",
117
+ "@deepseek-ai/dsh-compaction-basic": "0.1.5-rc.2",
118
+ "@deepseek-ai/dsh-compaction-tool-result-pruner": "0.1.5-rc.2",
119
+ "@deepseek-ai/dsh-invariants": "0.1.5-rc.2",
120
+ "@deepseek-ai/dsh-llm": "0.1.5-rc.2",
121
+ "@deepseek-ai/dsh-session": "0.1.5-rc.2",
122
+ "@deepseek-ai/dsh-token-meter": "0.1.5-rc.2",
123
123
  "@deepseek-ai/schemastery": "3.18.2",
124
124
  "typescript": "~5.9.0"
125
125
  },
126
126
  "overrides": {
127
- "@deepseek-ai/dsh-agent": "0.1.2-rc.1",
128
- "@deepseek-ai/dsh-brand": "0.1.2-rc.1",
129
- "@deepseek-ai/dsh-commands": "0.1.2-rc.1",
130
- "@deepseek-ai/dsh-compaction": "0.1.2-rc.1",
131
- "@deepseek-ai/dsh-compaction-tool-result-pruner": "0.1.2-rc.1",
132
- "@deepseek-ai/dsh-invariants": "0.1.2-rc.1",
133
- "@deepseek-ai/dsh-llm": "0.1.2-rc.1",
134
- "@deepseek-ai/dsh-session": "0.1.2-rc.1",
135
- "@deepseek-ai/dsh-token-meter": "0.1.2-rc.1",
136
- "@deepseek-ai/dsh-scope": "0.1.2-rc.1",
137
- "@deepseek-ai/dsh-attachment": "0.1.2-rc.1",
138
- "@deepseek-ai/dsh-session-projection": "0.1.2-rc.1",
139
- "@deepseek-ai/dsh-system-prompt": "0.1.2-rc.1",
140
- "@deepseek-ai/dsh-llm-retry": "0.1.2-rc.1"
127
+ "@deepseek-ai/dsh-agent": "0.1.5-rc.2",
128
+ "@deepseek-ai/dsh-brand": "0.1.5-rc.2",
129
+ "@deepseek-ai/dsh-commands": "0.1.5-rc.2",
130
+ "@deepseek-ai/dsh-compaction": "0.1.5-rc.2",
131
+ "@deepseek-ai/dsh-compaction-tool-result-pruner": "0.1.5-rc.2",
132
+ "@deepseek-ai/dsh-invariants": "0.1.5-rc.2",
133
+ "@deepseek-ai/dsh-llm": "0.1.5-rc.2",
134
+ "@deepseek-ai/dsh-session": "0.1.5-rc.2",
135
+ "@deepseek-ai/dsh-token-meter": "0.1.5-rc.2",
136
+ "@deepseek-ai/dsh-scope": "0.1.5-rc.2",
137
+ "@deepseek-ai/dsh-attachment": "0.1.5-rc.2",
138
+ "@deepseek-ai/dsh-session-projection": "0.1.5-rc.2",
139
+ "@deepseek-ai/dsh-system-prompt": "0.1.5-rc.2",
140
+ "@deepseek-ai/dsh-llm-retry": "0.1.5-rc.2"
141
141
  },
142
142
  "dsh": {
143
143
  "bundle": {
@@ -146,11 +146,11 @@
146
146
  },
147
147
  "pnpm": {
148
148
  "overrides": {
149
- "@deepseek-ai/dsh-scope": "0.1.2-rc.1",
150
- "@deepseek-ai/dsh-attachment": "0.1.2-rc.1",
151
- "@deepseek-ai/dsh-session-projection": "0.1.2-rc.1",
152
- "@deepseek-ai/dsh-system-prompt": "0.1.2-rc.1",
153
- "@deepseek-ai/dsh-llm-retry": "0.1.2-rc.1"
149
+ "@deepseek-ai/dsh-scope": "0.1.5-rc.2",
150
+ "@deepseek-ai/dsh-attachment": "0.1.5-rc.2",
151
+ "@deepseek-ai/dsh-session-projection": "0.1.5-rc.2",
152
+ "@deepseek-ai/dsh-system-prompt": "0.1.5-rc.2",
153
+ "@deepseek-ai/dsh-llm-retry": "0.1.5-rc.2"
154
154
  }
155
155
  }
156
156
  }
package/scripts/setup.mjs CHANGED
@@ -124,4 +124,4 @@ if (existed) {
124
124
  fs.mkdirSync(path.dirname(target), { recursive: true })
125
125
  fs.appendFileSync(target, plan.block)
126
126
  console.log(`${plan.action === 'create' ? 'created' : 'patched'} ${target}`)
127
- console.log('restart dsh, then run /dcp to verify.')
127
+ console.log('restart dsh, then run /dcp status to verify.')
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: dsh-dcp-config
3
- description: "dsh 压缩引擎插件(@aiwayds/dsh-dcp)使用与配置指南。凡涉及上下文压缩、/dcp 命令、压缩调参(阈值/密度/语言/轮数触发/模型切换),或要配置 dcp 时先读本指南:/dcp 状态与 /dcp set 十二个可调键、持久化到 cordis.patch.yml 挂载块 config: 段(dsh-dcp-setup 管理)、ask_user_question 调参向导、五类触发(压力/溢出/轮数/模型切换/手动)、subagent 会话独立计数生效。触发词:dcp、压缩、compaction、上下文超限、摘要、thresholdRatio、roundInterval、onModelSwitch。"
3
+ description: "dsh 压缩引擎插件(@aiwayds/dsh-dcp)使用与配置指南。凡涉及上下文压缩、/dcp 命令、压缩调参(阈值/密度/语言/轮数触发/模型切换),或要配置 dcp 时先读本指南:裸 /dcp 即压缩、/dcp status 看状态与 /dcp set 十二个可调键、持久化到 cordis.patch.yml 挂载块 config: 段(dsh-dcp-setup 管理)、ask_user_question 调参向导、五类触发(压力/溢出/轮数/模型切换/手动)、subagent 会话独立计数生效。触发词:dcp、压缩、compaction、上下文超限、摘要、thresholdRatio、roundInterval、onModelSwitch。"
4
4
  ---
5
5
 
6
6
  # dsh-dcp 使用指南(确定性上下文压缩)
@@ -80,7 +80,7 @@ dsh-dcp 自有键(除 `thresholdRatio` 外全部可用 `/dcp set` 调):
80
80
  | 溢出 | 模型报 context 超限 | 继承官方恢复流程 |
81
81
  | 轮数 | 每累计 `roundInterval` 条 assistant message | 任何一次压缩(含压力/手动)都重置时钟;`0` 关闭;需保持 `auto: true`(默认开) |
82
82
  | 模型切换 | 会话实际路由的 provider/model 变化 | `onModelSwitch` 控制(默认 `notice` 提醒);`auto` 在下一个空闲点自动压缩;两道门:距上次压缩 <10 条消息、上下文 <`modelSwitchMinTokens` |
83
- | 手动 | `/dcp compact`、`/compact` | 随时可用 |
83
+ | 手动 | `/dcp`(无参数)、`/dcp compact`、`/compact` | 随时可用 |
84
84
 
85
85
  - **subagent 同样生效**:进程内子代理(含 continuable 与 one-shot)走同一套事件分发,
86
86
  压力/溢出/轮数/模型切换对每个会话独立计数、独立触发。
@@ -89,8 +89,9 @@ dsh-dcp 自有键(除 `thresholdRatio` 外全部可用 `/dcp set` 调):
89
89
 
90
90
  ## 排障
91
91
 
92
- 1. `/dcp`(无参数)看状态:当前配置、压缩次数、省下的 LLM 调用,以及
92
+ 1. `/dcp status` 看状态:当前配置、压缩次数、省下的 LLM 调用,以及
93
93
  per-session 概览(含子代理;已销毁的会话自动消失,列表最多前 10 个,超出显示 `+N more`)。
94
+ 手动压缩打裸 `/dcp`(或 `/dcp compact`);命令用法打 `/dcp help`。
94
95
  2. 会话压不动 → 先确认 `auto` 是否为 `true`(自动触发总开关,默认开),再看
95
96
  `thresholdRatio` 是否设得过高、`roundInterval` 是否为 `0`。
96
97
  3. `npx dsh-dcp-setup --remove` 后出现 `WARN: a compaction-basic entry remains...` →