pi-ptc-meter 1.0.18 → 1.0.20
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 +25 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -64,26 +64,27 @@ pi install npm:pi-ptc-meter
|
|
|
64
64
|
|
|
65
65
|
```mermaid
|
|
66
66
|
flowchart TD
|
|
67
|
-
A[
|
|
68
|
-
B --> C[
|
|
69
|
-
C --> D[
|
|
70
|
-
D
|
|
71
|
-
|
|
67
|
+
A[本轮开工前<br/>声明 预计 N 次 / 预计 Ns] --> B[tool_call<br/>计数 +1]
|
|
68
|
+
B --> C[turn_end<br/>记录实际次数与耗时 + 解析预计值]
|
|
69
|
+
C --> D[agent_end<br/>落盘一行日志(含预计)]
|
|
70
|
+
D --> E[before_agent_start<br/>结算上一轮]
|
|
71
|
+
E --> F[对比:实际 vs 预计 → 偏差 %]
|
|
72
|
+
F -->|nextTurn 尾部消息| A
|
|
73
|
+
F -.->|system 只留静态骨架| S[ptc_meter section]
|
|
72
74
|
```
|
|
73
75
|
|
|
74
76
|
## 原理(小白)
|
|
75
77
|
|
|
76
|
-
|
|
78
|
+
**像记账对账**:开工前先说「这趟大概 5 步」,收工后对账「实际 7 步,比预计多 40%」,下次开工前把账报给你。
|
|
77
79
|
|
|
78
80
|
```mermaid
|
|
79
|
-
flowchart
|
|
80
|
-
A[
|
|
81
|
-
B --> C[
|
|
82
|
-
C --> D[
|
|
81
|
+
flowchart TD
|
|
82
|
+
A[开工前先估:预计几步] --> B[干活:实际跑几步]
|
|
83
|
+
B --> C[收工对比:实际 vs 预计]
|
|
84
|
+
C --> D[下次开工时报出偏差]
|
|
83
85
|
D --> A
|
|
84
86
|
```
|
|
85
87
|
|
|
86
|
-
|
|
87
88
|
## License
|
|
88
89
|
|
|
89
90
|
MIT
|
|
@@ -151,21 +152,24 @@ Also: log `~/.pi/ptc-meter.jsonl` (1 MiB truncation, tail-preserving); no enviro
|
|
|
151
152
|
|
|
152
153
|
```mermaid
|
|
153
154
|
flowchart TD
|
|
154
|
-
A[
|
|
155
|
-
B --> C[
|
|
156
|
-
C --> D[
|
|
157
|
-
D
|
|
158
|
-
|
|
155
|
+
A[before the turn<br/>declare: about N calls / Ns] --> B[tool_call<br/>counter +1]
|
|
156
|
+
B --> C[turn_end<br/>record actual calls and duration + parse estimate]
|
|
157
|
+
C --> D[agent_end<br/>write one log line (includes estimate)]
|
|
158
|
+
D --> E[before_agent_start<br/>settle the previous turn]
|
|
159
|
+
E --> F[compare: actual vs estimate -> deviation %]
|
|
160
|
+
F -->|nextTurn message| A
|
|
161
|
+
F -.->|system keeps a static skeleton| S[ptc_meter section]
|
|
162
|
+
```
|
|
159
163
|
|
|
160
164
|
## How it works (plain words)
|
|
161
165
|
|
|
162
|
-
Like a
|
|
166
|
+
**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.
|
|
163
167
|
|
|
164
168
|
```mermaid
|
|
165
|
-
flowchart
|
|
166
|
-
A[
|
|
167
|
-
B --> C[
|
|
168
|
-
C --> D[report
|
|
169
|
+
flowchart TD
|
|
170
|
+
A[before starting: guess N steps] --> B[work: actually N steps]
|
|
171
|
+
B --> C[at the end: actual vs guess]
|
|
172
|
+
C --> D[report the gap next time]
|
|
169
173
|
D --> A
|
|
170
174
|
```
|
|
171
175
|
flowchart TD
|
|
@@ -174,7 +178,6 @@ flowchart TD
|
|
|
174
178
|
C --> D[before_agent_start<br/>settle previous turn]
|
|
175
179
|
D -->|nextTurn message<br/>calls / duration / deviation / median| A
|
|
176
180
|
D -.->|system keeps a static skeleton| S[ptc_meter section]
|
|
177
|
-
```
|
|
178
181
|
|
|
179
182
|
## License
|
|
180
183
|
|