pi-ptc-meter 1.0.21 → 1.0.23

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 +22 -20
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  # pi-ptc-meter
9
9
 
10
- 每轮工具调用计量:统计调用次数与耗时,并把数字回灌给模型。
10
+ 每轮工具调用计量:记录调用次数与耗时,与开工前声明的估算对比后,把实际值与偏差回灌给模型。
11
11
 
12
12
  ## 快速事实
13
13
 
@@ -15,18 +15,10 @@
15
15
  | --- | --- |
16
16
  | 配置文件 | ~/.pi/ptc-meter.json(可省略) |
17
17
  | 命令行 | /ptc [n](默认 20) |
18
- | 调用方式 | **全自动**:计数与回灌无需触发;命令只查看 |
18
+ | 调用方式 | **全自动**:计数与回灌无需触发;估算由模型在回复中自行声明(如「预计 40 次」),扩展只负责解析与对比 |
19
19
 
20
20
  完整配置(全部键与默认值):
21
21
 
22
- ```json
23
- {
24
- "threshold": 39,
25
- "inject": true,
26
- "notify": false
27
- }
28
- ```
29
-
30
22
  ## 安装
31
23
 
32
24
  ```bash
@@ -45,6 +37,15 @@ pi install npm:pi-ptc-meter
45
37
 
46
38
  其他:日志 `~/.pi/ptc-meter.jsonl`(1 MiB 截断,保留尾部整行);无环境变量。
47
39
 
40
+ ```json
41
+ {
42
+ "threshold": 39,
43
+ "inject": true,
44
+ "notify": false
45
+ }
46
+ ```
47
+
48
+
48
49
  ## 命令
49
50
 
50
51
  | 命令 | 作用 |
@@ -95,7 +96,7 @@ MIT
95
96
 
96
97
  <h1 align="center">🌐 English Version &nbsp;⬇️</h1>
97
98
 
98
- Per-turn tool-call metering: counts calls and duration, then feeds the numbers back to the model.
99
+ Per-turn tool-call metering: records calls and duration, compares them with the estimate declared before the turn, and feeds back the actuals and deviation.
99
100
 
100
101
  ## At a glance
101
102
 
@@ -103,18 +104,10 @@ Per-turn tool-call metering: counts calls and duration, then feeds the numbers b
103
104
  | --- | --- |
104
105
  | Config file | ~/.pi/ptc-meter.json (optional) |
105
106
  | Commands | /ptc [n] (default 20) |
106
- | Automation | **Fully automatic**: metering and feedback need no trigger; the command only reads |
107
+ | Automation | **Fully automatic**: metering and feedback need no trigger. The estimate is declared by the model in its reply (e.g. "about 40 calls"); the extension only parses and compares |
107
108
 
108
109
  Full config (all keys and defaults):
109
110
 
110
- ```json
111
- {
112
- "threshold": 39,
113
- "inject": true,
114
- "notify": false
115
- }
116
- ```
117
-
118
111
  ## Install
119
112
 
120
113
  ```bash
@@ -133,6 +126,15 @@ Config file `~/.pi/ptc-meter.json` (optional; invalid JSON falls back):
133
126
 
134
127
  Also: log `~/.pi/ptc-meter.jsonl` (1 MiB truncation, tail-preserving); no environment variables.
135
128
 
129
+ ```json
130
+ {
131
+ "threshold": 39,
132
+ "inject": true,
133
+ "notify": false
134
+ }
135
+ ```
136
+
137
+
136
138
  ## Commands
137
139
 
138
140
  | Command | Purpose |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-ptc-meter",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "Measures tool-call batching per turn and feeds the numbers back to the model.",
5
5
  "type": "module",
6
6
  "license": "MIT",