pi-ptc-meter 1.0.25 → 1.0.26
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 +52 -30
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -72,27 +72,38 @@ PTC 计量:上一轮 9 次工具调用 · 实际 34s · 命中 92% · 预计 8
|
|
|
72
72
|
|
|
73
73
|
## 原理(专业)
|
|
74
74
|
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
75
|
+
```text
|
|
76
|
+
本轮开工前 ─ 声明「预计 N 次 / 预计 Ns」
|
|
77
|
+
↓
|
|
78
|
+
tool_call ─ 计数 +1
|
|
79
|
+
↓
|
|
80
|
+
turn_end ─ 记录实际次数与耗时 + 解析预计值
|
|
81
|
+
↓
|
|
82
|
+
agent_end ─ 落盘一行日志(含预计)
|
|
83
|
+
↓
|
|
84
|
+
before_agent_start ─ 结算上一轮
|
|
85
|
+
↓
|
|
86
|
+
对比:实际 vs 预计 → 偏差 %
|
|
87
|
+
↓ nextTurn 尾部消息
|
|
88
|
+
(回到本轮开工前)
|
|
89
|
+
|
|
90
|
+
system 只留静态骨架(ptc_meter section)
|
|
84
91
|
```
|
|
85
92
|
|
|
86
93
|
## 原理(小白)
|
|
87
94
|
|
|
88
95
|
**像记账对账**:开工前先说「这趟大概 5 步」,收工后对账「实际 7 步,比预计多 40%」,下次开工前把账报给你。
|
|
89
96
|
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
```text
|
|
98
|
+
开工前先估:预计几步
|
|
99
|
+
↓
|
|
100
|
+
干活:实际跑几步
|
|
101
|
+
↓
|
|
102
|
+
收工对比:实际 vs 预计
|
|
103
|
+
↓
|
|
104
|
+
下次开工时报出偏差
|
|
105
|
+
↓
|
|
106
|
+
(回到开工前先估)
|
|
96
107
|
```
|
|
97
108
|
|
|
98
109
|
## License
|
|
@@ -168,27 +179,38 @@ PTC metering: last turn 9 tool calls · 34s actual · 92% cache hit · estimated
|
|
|
168
179
|
|
|
169
180
|
## How it works (technical)
|
|
170
181
|
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
182
|
+
```text
|
|
183
|
+
before the turn ─ declare: about N calls / Ns
|
|
184
|
+
↓
|
|
185
|
+
tool_call ─ counter +1
|
|
186
|
+
↓
|
|
187
|
+
turn_end ─ record actual calls and duration + parse estimate
|
|
188
|
+
↓
|
|
189
|
+
agent_end ─ write one log line (includes estimate)
|
|
190
|
+
↓
|
|
191
|
+
before_agent_start ─ settle the previous turn
|
|
192
|
+
↓
|
|
193
|
+
compare: actual vs estimate -> deviation %
|
|
194
|
+
↓ nextTurn message
|
|
195
|
+
(back to before the turn)
|
|
196
|
+
|
|
197
|
+
the system prompt keeps only a static skeleton (ptc_meter section)
|
|
180
198
|
```
|
|
181
199
|
|
|
182
200
|
## How it works (plain words)
|
|
183
201
|
|
|
184
202
|
**Like a ledger**: you estimate "about 5 steps" before starting, the ledger compares it with the actual 7 (40% over), and reports the gap before the next job.
|
|
185
203
|
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
204
|
+
```text
|
|
205
|
+
before starting: guess N steps
|
|
206
|
+
↓
|
|
207
|
+
work: actually N steps
|
|
208
|
+
↓
|
|
209
|
+
at the end: actual vs guess
|
|
210
|
+
↓
|
|
211
|
+
report the gap next time
|
|
212
|
+
↓
|
|
213
|
+
(back to before starting)
|
|
192
214
|
```
|
|
193
215
|
## License
|
|
194
216
|
|