pi-think-anchor 1.0.30 → 1.0.32
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.md +46 -40
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -153,32 +153,35 @@ think-anchor 信号(词频启发式,非判据):连续偏离。动作:
|
|
|
153
153
|
|
|
154
154
|
## 原理(专业)
|
|
155
155
|
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
156
|
+
```text
|
|
157
|
+
turn_end ─ 读 assistant thinking
|
|
158
|
+
↓
|
|
159
|
+
词频指纹 pos / neg / neu
|
|
160
|
+
↓
|
|
161
|
+
本轮命中 ≥ minHits?
|
|
162
|
+
├─ 否 ──▶ 只推进窗口,回到 turn_end
|
|
163
|
+
↓ 是
|
|
164
|
+
滑窗聚合 + alpha 平滑比率
|
|
165
|
+
↓
|
|
166
|
+
波段
|
|
167
|
+
├─ spec ──▶ 静默,回到 turn_end
|
|
168
|
+
├─ mixed ──▶ 观察,回到 turn_end
|
|
169
|
+
└─ react ──▶ 状态机 L1 / L2 ─ nextTurn 尾部消息 ──▶ 回到 turn_end
|
|
167
170
|
```
|
|
168
171
|
|
|
169
172
|
## 原理(小白)
|
|
170
173
|
|
|
171
174
|
**像一个跑步教练**:看你说话的用词判断此刻是专注还是走神;一直走神就轻轻提醒一句,恢复专注就不打扰。
|
|
172
175
|
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
176
|
+
```text
|
|
177
|
+
你说的话
|
|
178
|
+
↓
|
|
179
|
+
教练看用词
|
|
180
|
+
↓
|
|
181
|
+
清晰吗
|
|
182
|
+
├─ 清晰 ──▶ 回到「你说的话」
|
|
183
|
+
├─ 有点散 ──▶ 轻提醒 ──▶ 回到「你说的话」
|
|
184
|
+
└─ 一直散 ──▶ 认真提醒 ──▶ 回到「你说的话」
|
|
182
185
|
```
|
|
183
186
|
|
|
184
187
|
## 借鉴
|
|
@@ -341,32 +344,35 @@ think-anchor signal (heuristic, not a verdict): sustained drift. Action: stop ex
|
|
|
341
344
|
|
|
342
345
|
## How it works (technical)
|
|
343
346
|
|
|
344
|
-
```
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
347
|
+
```text
|
|
348
|
+
turn_end ─ read assistant thinking
|
|
349
|
+
↓
|
|
350
|
+
word fingerprint pos / neg / neu
|
|
351
|
+
↓
|
|
352
|
+
hits >= minHits?
|
|
353
|
+
├─ no ──▶ window only, back to turn_end
|
|
354
|
+
↓ yes
|
|
355
|
+
sliding window + alpha-smoothed ratio
|
|
356
|
+
↓
|
|
357
|
+
band
|
|
358
|
+
├─ spec ──▶ silent, back to turn_end
|
|
359
|
+
├─ mixed ──▶ watch, back to turn_end
|
|
360
|
+
└─ react ──▶ state machine L1 / L2 ─ nextTurn message ──▶ back to turn_end
|
|
355
361
|
```
|
|
356
362
|
|
|
357
363
|
## How it works (plain words)
|
|
358
364
|
|
|
359
365
|
**Like a running coach**: reads your words to judge whether you are focused or drifting; a mild nudge when you drift, silence when you recover.
|
|
360
366
|
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
367
|
+
```text
|
|
368
|
+
what you say
|
|
369
|
+
↓
|
|
370
|
+
coach reads wording
|
|
371
|
+
↓
|
|
372
|
+
focused?
|
|
373
|
+
├─ yes ──▶ back to what you say
|
|
374
|
+
├─ slightly off ──▶ gentle nudge ──▶ back to what you say
|
|
375
|
+
└─ drifting ──▶ stronger nudge ──▶ back to what you say
|
|
370
376
|
```
|
|
371
377
|
## Credits
|
|
372
378
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-think-anchor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.32",
|
|
4
4
|
"description": "Monitors thinking focus drift and nudges the model back on track.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,7 +28,10 @@
|
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@earendil-works/pi-coding-agent": "*"
|
|
30
30
|
},
|
|
31
|
-
"author":
|
|
31
|
+
"author": {
|
|
32
|
+
"name": "15066212pp",
|
|
33
|
+
"url": "https://github.com/op15066212"
|
|
34
|
+
},
|
|
32
35
|
"homepage": "https://github.com/op15066212/pi-plugins-publish/tree/main/pi-think-anchor#readme",
|
|
33
36
|
"bugs": {
|
|
34
37
|
"url": "https://github.com/op15066212/pi-plugins-publish/issues"
|