pi-think-anchor 1.0.6 → 1.0.8

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
@@ -21,6 +21,10 @@ Measures the "focus fingerprint" of thinking and nudges the model back when it d
21
21
  | L2 cooldown | 15 min | sustained drift, max 2 per session |
22
22
  | Word lists | Chinese | 28 focus / 18 drift terms |
23
23
 
24
+ ## Credits
25
+
26
+ Distilled from [dsh-anchored-monitor](https://dsh-plugin.org/zh/plugins/aik358/dsh-anchored-monitor) 0.3.1 (DSH ecosystem): the mechanism idea only, no code port — per-turn evaluation instead of live streaming, no separate process. Thresholds calibrated against 6151 logged turns.
27
+
24
28
  ## Install
25
29
 
26
30
  ```bash
package/README.md CHANGED
@@ -21,7 +21,7 @@
21
21
  | 启用 | 开 | `THINK_ANCHOR=0` 或配置文件 `enabled: false` 关闭 |
22
22
  | 波段阈值 | 1.2 / 0.5 | α 平滑比率:高专注 ≥1.2;发散 <0.5 |
23
23
  | 证据门槛 | 3 命中/轮 | 本轮词频命中不足 3 个 → 不评分、不干预 |
24
- | 聚合窗口 | 5 轮 | 滑动窗口 |
24
+ | 聚合窗口 | 5 条消息 | 滑动窗口(长工具链中约 1 轮) |
25
25
  | L1 冷却 | 10 分钟 | 首次跌入发散 |
26
26
  | L2 冷却 | 15 分钟 | 持续发散,会话上限 2 次 |
27
27
  | 词表 | 中文 | 专注 28 词 / 发散 18 词 |
package/index.ts CHANGED
@@ -224,7 +224,7 @@ function newState(cfg: TAConfig): TAState {
224
224
  };
225
225
  }
226
226
 
227
- /** 采样写盘(v3):非事件轮每 5 轮留一行——实测 6151 行 / 1.0 MB 逼近 1 MiB 上限,降为 1/5 仍够统计 */
227
+ /** 采样写盘(v3):非事件轮每 5 条 assistant 消息留一行——实测 6151 行 / 1.0 MB 逼近 1 MiB 上限,降为 1/5 仍够统计 */
228
228
  const SAMPLE_EVERY = 5;
229
229
  /** 自适应(v3):有效样本 ≥ AUTO_MIN 且下降率 < AUTO_RATE(不及抛硬币)即转静默,只记录不注入 */
230
230
  const AUTO_MIN = 8;
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "pi-think-anchor",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Monitors thinking focus drift and nudges the model back on track.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "keywords": [
8
8
  "pi",
9
9
  "pi-extension",
10
- "pi-coding-agent"
10
+ "pi-coding-agent",
11
+ "pi-package"
11
12
  ],
12
13
  "pi": {
13
14
  "extensions": [
@@ -23,5 +24,13 @@
23
24
  "peerDependencies": {
24
25
  "@earendil-works/pi-coding-agent": "*"
25
26
  },
26
- "author": "15066212pp"
27
+ "author": "15066212pp",
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "git+https://github.com/op15066212/pi-plugins-publish.git",
31
+ "directory": "pi-think-anchor"
32
+ },
33
+ "scripts": {
34
+ "prepublishOnly": "node ../publish-check.mjs"
35
+ }
27
36
  }