dsh-echo-guard 0.1.0 → 0.2.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
@@ -1,5 +1,8 @@
1
1
  # dsh-echo-guard
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/dsh-echo-guard)](https://www.npmjs.com/package/dsh-echo-guard)
4
+ [![license](https://img.shields.io/npm/l/dsh-echo-guard)](./LICENSE)
5
+
3
6
  A DeepSeek Harness (DSH) plugin that removes filler-word flooding from the **model-visible reasoning history** — and leaves everything else verbatim.
4
7
 
5
8
  ## What it treats
@@ -27,11 +30,15 @@ The event log is never modified, so "what the model remembers" and "what the log
27
30
 
28
31
  ## Install
29
32
 
33
+ From npm:
34
+
30
35
  ```bash
31
- pnpm add link:/path/to/dsh-echo-guard
36
+ pnpm add dsh-echo-guard
32
37
  ```
33
38
 
34
- Add a `link:` dependency to the profile's `package.json` and include it in `dsh.profile.bundles`.
39
+ Or install it from the DSH plugin manager with the spec `dsh-echo-guard@^0.2.0`.
40
+
41
+ For local development use `link:`: add a `link:` dependency to the profile's `package.json` and include it in `dsh.profile.bundles`.
35
42
 
36
43
  Configure via `cordis.patch.yml`. **Start with `dryRun: true`** for a day.
37
44
 
@@ -46,6 +53,30 @@ fillers: ["OK", "let me go"] # English, case-insensitive
46
53
  - **Deletion** only removes standalone ones: preceded by a non-word char, followed by punctuation/space/EOL.
47
54
  - CJK uses character boundaries, Latin uses alphanumeric boundaries; multi-word phrases are removed whole.
48
55
 
56
+ ### Per-word thresholds (0.2.0)
57
+
58
+ ```yaml
59
+ fillers: ["好", "嗯"]
60
+ fillerMinCounts:
61
+ "好": 5
62
+ "嗯": 3
63
+ burstMinCount: 5 # fallback for words without their own threshold
64
+ ```
65
+
66
+ Each word is counted and judged on its own; they never add up. `好` ×4 + `嗯` ×2 is **not** a hit, because neither reached its line. If only one word crosses, only that word is removed.
67
+
68
+ ## Manual pass: clear the last turn (0.2.0)
69
+
70
+ The automatic pass waits for the count. `/strip-last` clears the previous turn right now, in the session you type it in. Other processes (a phone UI, a bot) can drop a request file instead; the plugin writes `.result.json` back.
71
+
72
+ ```yaml
73
+ manual:
74
+ enabled: true
75
+ requestFile: "C:\\Users\\you\\.dsh\\strip-last.json" # omit = slash command only
76
+ ```
77
+
78
+ Three boundaries: only the **most recent pure-reasoning step**; never a tool-call step; and **never the turn that is currently running** — replacing a message that is still streaming would orphan its tool result and break the transcript.
79
+
49
80
  ## Receipt
50
81
 
51
82
  - `receipt: "⟪已整理⟫"` — visible (default);
@@ -63,7 +94,7 @@ Hence the threshold of 5, aimed at the "one per sentence" drift.
63
94
 
64
95
  ## Version and testing
65
96
 
66
- **Version 0.1.0.**
97
+ **Version 0.2.0.** (0.1.0 → 0.2.0: per-word thresholds; manual `/strip-last` and request-file entry; the manual path never touches a running step.)
67
98
 
68
99
  Verified on 2026-12-05 with:
69
100
 
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # dsh-echo-guard
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/dsh-echo-guard)](https://www.npmjs.com/package/dsh-echo-guard)
4
+ [![license](https://img.shields.io/npm/l/dsh-echo-guard)](./LICENSE)
5
+
3
6
  一个 DeepSeek Harness(DSH)插件:把「收束词灌水」从**模型可见的思考历史**里删掉,其余一个字不动。
4
7
 
5
8
  ## 它治什么
@@ -29,11 +32,15 @@
29
32
 
30
33
  ## 装法
31
34
 
35
+ 从 npm 装:
36
+
32
37
  ```bash
33
- pnpm add link:/path/to/dsh-echo-guard
38
+ pnpm add dsh-echo-guard
34
39
  ```
35
40
 
36
- 在 profile 的 `package.json` 里加一条 `link:` 依赖,并把它加进 `dsh.profile.bundles`。
41
+ 在 DSH 的插件管理器里装也行,spec 写 `dsh-echo-guard@^0.2.0`。
42
+
43
+ 本地改代码时用 `link:`:在 profile 的 `package.json` 里加一条 `link:` 依赖,并把它加进 `dsh.profile.bundles`。
37
44
 
38
45
  配置见 `cordis.patch.yml`。
39
46
 
@@ -52,6 +59,40 @@ fillers: ["OK", "let me go"] # 英文,大小写不敏感
52
59
  - **删除**只删单独成句的:前面不是词、后面是标点/空白/行尾。
53
60
  - 中文按汉字边界判,英文按字母数字边界判;多词短语(`let me go`)整句删。
54
61
 
62
+ ### 每个词各算各的(0.2.0)
63
+
64
+ ```yaml
65
+ fillers: ["好", "嗯"]
66
+ fillerMinCounts:
67
+ "好": 5
68
+ "嗯": 3
69
+ burstMinCount: 5 # 没单独配的词用这个
70
+ ```
71
+
72
+ 各算各的,**不互相凑数**:「好 4 个 + 嗯 2 个」不算命中,因为两边都没到自己的线。
73
+ 命中哪个只删哪个——嗯够 3 但好只有 2,就只删嗯,好一个不动。
74
+
75
+ 为什么不合计:合起来算会让两个词互相掩护,各自其实都没到线也会被清。
76
+
77
+ ## 手动清上一轮(0.2.0)
78
+
79
+ 自动那条要攒够次数。有时候不用等:想现在就清掉上一条,用 `/strip-last`。
80
+
81
+ - 在 DSH 里打字 `/strip-last` 就清当前这个框的上一轮;
82
+ - 别的进程(比如手机上的门)可以写一个请求文件,插件读它、清完把结果写回 `.result.json`:
83
+
84
+ ```yaml
85
+ manual:
86
+ enabled: true
87
+ requestFile: "C:\\Users\\you\\.dsh\\strip-last.json" # 不填 = 只留斜杠命令
88
+ ```
89
+
90
+ 三条边界:
91
+
92
+ - 只看**最近的那一条纯思考步**,不是整个历史;
93
+ - 带工具调用的步不碰(那是整步替换的活,不归这个插件);
94
+ - **正在跑的那一轮不碰**——消息还在流上时换掉,工具结果回来会找不到调用,历史就坏了。
95
+
55
96
  ## 回执
56
97
 
57
98
  删完会在那条历史里留一行。三种配法:
@@ -71,7 +112,7 @@ fillers: ["OK", "let me go"] # 英文,大小写不敏感
71
112
 
72
113
  ## 版本与验证
73
114
 
74
- **版本 0.1.0。**
115
+ **版本 0.2.0。**(0.1.0 → 0.2.0:每个词各算各的门槛;新增手动清上一轮 `/strip-last` 和请求文件入口;手动那条不碰正在跑的步。)
75
116
 
76
117
  在以下环境实测通过(2026-12-05):
77
118
 
@@ -83,7 +124,7 @@ fillers: ["OK", "let me go"] # 英文,大小写不敏感
83
124
  - 原始 `assistant/message` 事件仍在事件流里,一个字没动;
84
125
  - 命中的 5 段全是「纯思考 + 正文」、零工具调用——带工具调用的步按设计跳过;
85
126
  - 另一个会话的文件没有被写过(`onlySessions` 生效)。
86
- - 单测:`node --test test/core.test.mjs`,10 个用例全过。
127
+ - 单测:`node --test test/core.test.mjs`,16 个用例全过。
87
128
 
88
129
  **未验证**:两个插件同时命中同一步的交叉场景。设计上不重叠(带工具调用的步本插件直接跳过),但确实没实测到。
89
130
 
package/cordis.patch.yml CHANGED
@@ -1,8 +1,8 @@
1
1
  - insert:
2
2
  - id: echo-guard
3
3
  name: dsh-echo-guard
4
- # 要读 agent.session,所以等 agents 服务就绪
5
- inject: [ agents ]
4
+ # agents:要读 agent.session;commands:0.2.0 起的 /strip-last 手动清靠它注册。
5
+ inject: [ agents, commands ]
6
6
  config:
7
7
  enabled: true
8
8
 
@@ -12,7 +12,13 @@
12
12
  - "好"
13
13
  - "嗯"
14
14
 
15
- # 一段思考里这些词合计 ≥ 这个数就动手
15
+ # 每个词各算各的门槛,不互相凑数。
16
+ # 例:好 够 5 次才算,嗯 够 3 次就算;「好 4 + 嗯 2」不算命中。
17
+ fillerMinCounts:
18
+ "好": 5
19
+ "嗯": 3
20
+
21
+ # 没在 fillerMinCounts 里单独配的词,用这个数。
16
22
  burstMinCount: 5
17
23
 
18
24
  # 删完在历史里留的那一行,可配:
@@ -30,5 +36,11 @@
30
36
  # 先观察:true 时只写日志、不改历史。建议先跑一天。
31
37
  dryRun: true
32
38
 
33
- # 日志(会话标签 + 每次命中一条)
39
+ # 手动「清上一轮」(0.2.0):斜杠命令 /strip-last 一直挂着;
40
+ # 要给别的进程(比如手机上的门)用,就填一个请求文件的绝对路径。
41
+ manual:
42
+ enabled: true
43
+ # requestFile: "C:\\Users\\you\\.dsh\\strip-last.json"
44
+
45
+ # 日志(每次命中一条)
34
46
  # debugFile: "./echo-guard.log"
package/lib/core.mjs CHANGED
@@ -53,6 +53,23 @@ export function countFillers(text, fillers = DEFAULT_FILLERS) {
53
53
  return n
54
54
  }
55
55
 
56
+ /**
57
+ * 每个词各算各的次数。
58
+ * 为什么分开算:中文里「好」和「嗯」的密度不一样,合成一个门槛会互相掩护——
59
+ * 三个「好」加三个「嗯」凑成六次,各自其实都没到线。
60
+ * @returns {Record<string, number>}
61
+ */
62
+ export function countPerWord(text, fillers = DEFAULT_FILLERS) {
63
+ const out = {}
64
+ if (typeof text !== 'string' || text === '') return out
65
+ for (const word of fillers) {
66
+ if (!word) continue
67
+ const re = new RegExp(escapeRe(word), isCJKWord(word) ? 'g' : 'gi')
68
+ out[word] = (text.match(re) || []).length
69
+ }
70
+ return out
71
+ }
72
+
56
73
  /**
57
74
  * 只删单独成句的那些,其余原样。
58
75
  * @returns {{text:string, removed:number, counted:number}}
@@ -86,21 +103,33 @@ export function stripFillers(text, fillers = DEFAULT_FILLERS) {
86
103
 
87
104
  /**
88
105
  * 在一段文字里找「这些词扎堆出现」的位置。
106
+ * 每个词按自己的门槛算(没配就用 minCount),命中哪个只算哪个,不互相凑数。
89
107
  * @param {string} text
90
108
  * @param {string[]} fillers
91
- * @param {{minCount?:number}} [cfg]
92
- * @returns {null | {firstAt:number, count:number}}
109
+ * @param {{minCount?:number, minCounts?:Record<string,number>}} [cfg]
110
+ * @returns {null | {firstAt:number, count:number, words:string[]}}
93
111
  */
94
112
  export function findBurst(text, fillers = DEFAULT_FILLERS, cfg = {}) {
95
113
  if (typeof text !== 'string' || text === '') return null
96
- const minCount = Number.isSafeInteger(cfg.minCount) ? cfg.minCount : 5
97
- const count = countFillers(text, fillers)
98
- if (count < minCount) return null
99
- let firstAt = -1
114
+ const dflt = Number.isSafeInteger(cfg.minCount) ? cfg.minCount : 5
115
+ const mins = cfg.minCounts && typeof cfg.minCounts === 'object' ? cfg.minCounts : {}
116
+ const counts = countPerWord(text, fillers)
117
+ const words = []
118
+ let count = 0
100
119
  for (const word of fillers) {
101
120
  if (!word) continue
121
+ const n = counts[word] || 0
122
+ const min = Number.isSafeInteger(mins[word]) ? mins[word] : dflt
123
+ if (n >= min) {
124
+ words.push(word)
125
+ count += n
126
+ }
127
+ }
128
+ if (words.length === 0) return null
129
+ let firstAt = -1
130
+ for (const word of words) {
102
131
  const i = text.indexOf(word)
103
132
  if (i >= 0 && (firstAt < 0 || i < firstAt)) firstAt = i
104
133
  }
105
- return { firstAt, count }
134
+ return { firstAt, count, words }
106
135
  }
package/lib/index.mjs CHANGED
@@ -13,7 +13,7 @@
13
13
  */
14
14
 
15
15
  import fs from 'node:fs'
16
- import { stripFillers, countFillers, DEFAULT_FILLERS } from './core.mjs'
16
+ import { stripFillers, countFillers, findBurst, DEFAULT_FILLERS } from './core.mjs'
17
17
 
18
18
  export const name = 'echo-guard'
19
19
 
@@ -58,6 +58,81 @@ function hasToolCall(message) {
58
58
  return Array.isArray(message?.content) && message.content.some((b) => b?.type === 'tool-call')
59
59
  }
60
60
 
61
+ /** 会话 id -> 最近的 agent 句柄。手动入口要用它:命令和门都只能拿到 id。 */
62
+ const LIVE_AGENTS = new Map()
63
+
64
+ /**
65
+ * 这一轮有没有在跑、它是第几轮。
66
+ * 读法用 `session.seq` + `session.eventAt(i)`——这是宿主暴露的只读接口,别换成 session.events,
67
+ * 那个在运行时不是数组(2026-12-05 实测)。
68
+ * 拿不到就当作在跑、轮次未知(什么都不许动)。
69
+ * @returns {{live:boolean, turn:number|null, unknown:boolean}}
70
+ */
71
+ export function activeTurn(session) {
72
+ const len = session?.seq
73
+ if (!Number.isSafeInteger(len)) return { live: true, turn: null, unknown: true }
74
+ for (let i = len - 1; i >= 0; i -= 1) {
75
+ let ev
76
+ try { ev = session.eventAt?.(i) } catch { ev = undefined }
77
+ if (ev === undefined || ev === null) continue
78
+ if (ev.type === 'turn/end') return { live: false, turn: null, unknown: false }
79
+ if (ev.type === 'turn/start') return { live: true, turn: ev.data?.turn ?? null, unknown: false }
80
+ }
81
+ return { live: false, turn: null, unknown: false }
82
+ }
83
+
84
+ /**
85
+ * 手动清「上一轮」:从最近往前找第一条纯思考步,删掉单独成句的收束词,其余原文照录。
86
+ *
87
+ * 只碰纯思考步(没有 tool-call 的)——带工具调用的整步替换不归这个插件管,
88
+ * 这也是它和 thinking-guard 能同时装的原因。
89
+ * 正在跑的那一轮、以及拿不到状态的时候,一律不动。
90
+ *
91
+ * @returns {{ok:true, seq:number, deleted:number, counted:number} | {ok:false, why:string}}
92
+ */
93
+ export function stripLastTurn(agent, cfg) {
94
+ const session = agent?.session
95
+ if (session === undefined || session === null) return { ok: false, why: '这个会话拿不到' }
96
+ const turn = activeTurn(session)
97
+ if (turn.unknown) return { ok: false, why: '读不到这一轮的状态,先不动' }
98
+ const nodes = [...(session.surface?.nodes ?? [])]
99
+ for (let i = nodes.length - 1; i >= 0; i -= 1) {
100
+ const seq = nodes[i]
101
+ const event = session.eventAt(seq)
102
+ if (event === undefined || event === null) continue
103
+ if (event.type !== 'assistant/message' || event.surfaceOp !== 'append') continue
104
+ const message = session.deriveEventMessage(event)
105
+ if (message === null || !Array.isArray(message.content)) continue
106
+ const block = reasoningOf(message)
107
+ if (block === null) continue
108
+ const burst = findBurst(block.text, cfg.fillers, { minCount: cfg.burstMinCount, minCounts: cfg.fillerMinCounts })
109
+ if (burst === null) continue
110
+ if (hasToolCall(message)) {
111
+ return { ok: false, why: '这一条带工具调用,echo-guard 只清纯思考步' }
112
+ }
113
+ if (turn.live && !(Number.isSafeInteger(turn.turn) && Number.isSafeInteger(event?.data?.turn) && event.data.turn < turn.turn)) {
114
+ return { ok: false, why: '这一步还在跑,等它落地再清' }
115
+ }
116
+ const stripped = stripFillers(block.text, burst.words)
117
+ if (stripped.removed === 0) return { ok: false, why: '上一轮里没有单独成句的收束词' }
118
+ const speech = speechOf(message)
119
+ let body = cfg.receipt
120
+ if (stripped.text !== '') body = body ? `${body}\n\n${stripped.text}` : stripped.text
121
+ if (speech !== '') body = `${body}\n\n此处说出口的话(原文照录):\n${speech}`
122
+ session.append('user/message', {
123
+ id: `echo-guard-manual-${seq}-${Date.now()}`,
124
+ role: 'user',
125
+ source: { kind: 'plugin:echo-guard' },
126
+ content: [{ type: 'text', text: body }]
127
+ }, {
128
+ surfaceOp: { op: 'replace', startSeq: seq, endSeq: seq },
129
+ sourceEventSeqs: [seq]
130
+ })
131
+ return { ok: true, seq, deleted: stripped.removed, counted: stripped.counted }
132
+ }
133
+ return { ok: false, why: '上一轮里没有可清的收束词' }
134
+ }
135
+
61
136
  export function apply(ctx, config = {}) {
62
137
  if (typeof config.debugFile === 'string' && config.debugFile.length > 0) DEBUG_FILE = config.debugFile
63
138
  if (config.enabled === false) return
@@ -65,13 +140,22 @@ export function apply(ctx, config = {}) {
65
140
  const cfg = {
66
141
  fillers: Array.isArray(config.fillers) && config.fillers.length ? config.fillers.map(String) : DEFAULT_FILLERS,
67
142
  burstMinCount: Number.isSafeInteger(config.burstMinCount) ? config.burstMinCount : 5,
143
+ // 每个词各算各的门槛;没配的词用 burstMinCount。
144
+ // 例:{ "好": 5, "嗯": 3 } —— 好 够 5 次才算,嗯 够 3 次就算,不互相凑。
145
+ fillerMinCounts: config.fillerMinCounts && typeof config.fillerMinCounts === 'object' ? config.fillerMinCounts : {},
68
146
  receipt: typeof config.receipt === 'string' ? config.receipt : DEFAULT_RECEIPT,
69
147
  // 删完剩不到两成就放弃:整段都是收束词时删光只会剩个空块,不如留着。
70
148
  stripMinKeepRatio: typeof config.stripMinKeepRatio === 'number' ? config.stripMinKeepRatio : 0.2,
71
149
  // 只对这些会话生效(空 = 全部)。填会话 id 片段。
72
150
  onlySessions: Array.isArray(config.onlySessions) ? config.onlySessions.map(String) : [],
73
151
  includeSubagents: config.includeSubagents !== false,
74
- dryRun: config.dryRun === true
152
+ dryRun: config.dryRun === true,
153
+ // 手动「清上一轮」(0.2.0 起):命令 + 请求文件。
154
+ // requestFile 留空 = 不监听请求文件,只留斜杠命令。
155
+ manual: {
156
+ enabled: config.manual?.enabled !== false,
157
+ requestFile: typeof config.manual?.requestFile === 'string' ? config.manual.requestFile : ''
158
+ }
75
159
  }
76
160
 
77
161
  const state = new WeakMap() // session -> { seen: Set<seq> }
@@ -85,6 +169,7 @@ export function apply(ctx, config = {}) {
85
169
  const rawId = String(session.id ?? '')
86
170
  const inList = cfg.onlySessions.length === 0 || cfg.onlySessions.some((p) => rawId.includes(p))
87
171
  if (!inList) return next()
172
+ LIVE_AGENTS.set(rawId, agent)
88
173
 
89
174
  let s = state.get(session)
90
175
  if (s === undefined) {
@@ -123,13 +208,17 @@ export function apply(ctx, config = {}) {
123
208
  continue
124
209
  }
125
210
 
126
- const counted = countFillers(block.text, cfg.fillers)
127
- if (counted < cfg.burstMinCount) {
211
+ const burst = findBurst(block.text, cfg.fillers, {
212
+ minCount: cfg.burstMinCount,
213
+ minCounts: cfg.fillerMinCounts
214
+ })
215
+ if (burst === null) {
128
216
  s.seen.add(seq)
129
217
  continue
130
218
  }
219
+ const counted = burst.count
131
220
 
132
- const stripped = stripFillers(block.text, cfg.fillers)
221
+ const stripped = stripFillers(block.text, burst.words)
133
222
  if (stripped.text !== '' && stripped.text.length < block.text.length * cfg.stripMinKeepRatio) {
134
223
  s.seen.add(seq)
135
224
  dbg(`跳过 seq ${seq}:删完只剩 ${stripped.text.length}/${block.text.length}`)
@@ -173,4 +262,57 @@ export function apply(ctx, config = {}) {
173
262
  }
174
263
  return next()
175
264
  })
265
+
266
+ // ── 手动「清上一轮」(0.2.0)──────────────────────────────────────────
267
+ // 两个入口,同一个动作:
268
+ // ① DSH 里打 `/strip-last`;
269
+ // ② 别的进程(比如手机上的门)写一个请求文件,插件读它、清完把结果写回去。
270
+ // 手动不看次数门槛;只碰纯思考步;正在跑的那一轮不动。
271
+ if (cfg.manual.enabled) {
272
+ try {
273
+ ctx.commands?.register?.({
274
+ name: 'strip-last',
275
+ description: '清掉上一轮纯思考步里单独成句的收束词,其余原文照录',
276
+ handler: ({ agent }) => {
277
+ const r = stripLastTurn(agent, cfg)
278
+ if (!r.ok) return { kind: 'error', text: r.why }
279
+ return { kind: 'success', text: `清掉 ${r.deleted} 个(seq ${r.seq}),其余原文照录。原文仍在会话日志里。` }
280
+ }
281
+ })
282
+ dbg('已注册斜杠命令 /strip-last')
283
+ } catch (error) {
284
+ dbg(`注册命令失败:${String(error)}`)
285
+ ctx.logger?.warn?.(`[${name}] 注册 /strip-last 失败:${String(error)}`)
286
+ }
287
+
288
+ const requestFile = cfg.manual.requestFile
289
+ if (typeof requestFile === 'string' && requestFile.length > 0) {
290
+ const resultFile = requestFile.replace(/\.json$/i, '.result.json')
291
+ ctx.effect?.(() => {
292
+ const timer = setInterval(() => {
293
+ try {
294
+ if (!fs.existsSync(requestFile)) return
295
+ // 请求文件可能是别的进程写的,先去掉 BOM(PowerShell 的 UTF-8 带 BOM)。
296
+ const raw = fs.readFileSync(requestFile, 'utf8').replace(/^\uFEFF/, '')
297
+ let request = null
298
+ let parseError = null
299
+ try { request = JSON.parse(raw) } catch (error) { parseError = error }
300
+ try { fs.unlinkSync(requestFile) } catch { /* 被别的进程抢先删了也无所谓 */ }
301
+ if (parseError !== null) {
302
+ fs.writeFileSync(resultFile, JSON.stringify({ at: new Date().toISOString(), ok: false, why: `请求文件格式不对:${String(parseError)}` }), 'utf8')
303
+ return
304
+ }
305
+ const agent = LIVE_AGENTS.get(String(request?.sessionId ?? ''))
306
+ const result = agent ? stripLastTurn(agent, cfg) : { ok: false, why: '这个会话还没跑过一轮(插件手里没有它的句柄)' }
307
+ fs.writeFileSync(resultFile, JSON.stringify({ at: new Date().toISOString(), ...result }), 'utf8')
308
+ dbg(`请求文件:${JSON.stringify(result)}`)
309
+ } catch (error) {
310
+ dbg(`请求文件处理失败:${String(error)}`)
311
+ try { fs.writeFileSync(resultFile, JSON.stringify({ at: new Date().toISOString(), ok: false, why: String(error) }), 'utf8') } catch { /* 结果写不进去就只能丢 */ }
312
+ }
313
+ }, 800)
314
+ return () => clearInterval(timer)
315
+ })
316
+ }
317
+ }
176
318
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-echo-guard",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Strips filler-word bursts out of the model-visible reasoning history — only standalone occurrences, everything else verbatim. DSH plugin.",
5
5
  "type": "module",
6
6
  "main": "lib/index.mjs",