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.
Files changed (2) hide show
  1. package/README.md +46 -40
  2. package/package.json +5 -2
package/README.md CHANGED
@@ -153,32 +153,35 @@ think-anchor 信号(词频启发式,非判据):连续偏离。动作:
153
153
 
154
154
  ## 原理(专业)
155
155
 
156
- ```mermaid
157
- flowchart TD
158
- A[turn_end<br/>读 assistant thinking] --> B[词频指纹 pos/neg/neu]
159
- B --> C{本轮命中 >= minHits?}
160
- C -->|否:只推进窗口| A
161
- C -->|是| D[滑窗聚合 + alpha 平滑比率]
162
- D --> E{波段}
163
- E -->|spec:静默| A
164
- E -->|mixed:观察| A
165
- E -->|react| H[状态机 L1 / L2]
166
- H -->|nextTurn 尾部消息| A
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
- ```mermaid
174
- flowchart TD
175
- A[你说的话] --> B[教练看用词]
176
- B --> C{清晰吗}
177
- C -->|清晰| A
178
- C -->|有点散| E[轻提醒]
179
- C -->|一直散| F[认真提醒]
180
- E --> A
181
- F --> A
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
- ```mermaid
345
- flowchart TD
346
- A[turn_end<br/>read assistant thinking] --> B[word fingerprint pos/neg/neu]
347
- B --> C{hits >= minHits?}
348
- C -->|no: window only| A
349
- C -->|yes| D[sliding window + alpha-smoothed ratio]
350
- D --> E{band}
351
- E -->|spec: silent| A
352
- E -->|mixed: watch| A
353
- E -->|react| H[state machine L1 / L2]
354
- H -->|nextTurn message| A
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
- ```mermaid
362
- flowchart TD
363
- A[what you say] --> B[coach reads wording]
364
- B --> C{focused?}
365
- C -->|yes| A
366
- C -->|slightly off| E[gentle nudge]
367
- C -->|drifting| F[stronger nudge]
368
- E --> A
369
- F --> A
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.30",
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": "15066212pp",
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"