pi-ptc-meter 1.0.19 → 1.0.21
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 +22 -26
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -64,22 +64,24 @@ 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
81
|
flowchart TD
|
|
80
|
-
A[
|
|
81
|
-
B --> C[
|
|
82
|
-
C --> D[
|
|
82
|
+
A[开工前先估:预计几步] --> B[干活:实际跑几步]
|
|
83
|
+
B --> C[收工对比:实际 vs 预计]
|
|
84
|
+
C --> D[下次开工时报出偏差]
|
|
83
85
|
D --> A
|
|
84
86
|
```
|
|
85
87
|
|
|
@@ -150,32 +152,26 @@ Also: log `~/.pi/ptc-meter.jsonl` (1 MiB truncation, tail-preserving); no enviro
|
|
|
150
152
|
|
|
151
153
|
```mermaid
|
|
152
154
|
flowchart TD
|
|
153
|
-
A[
|
|
154
|
-
B --> C[
|
|
155
|
-
C --> D[
|
|
156
|
-
D
|
|
157
|
-
|
|
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]
|
|
159
162
|
```
|
|
160
163
|
|
|
161
164
|
## How it works (plain words)
|
|
162
165
|
|
|
163
|
-
**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.
|
|
164
167
|
|
|
165
168
|
```mermaid
|
|
166
169
|
flowchart TD
|
|
167
|
-
A[
|
|
168
|
-
B --> C[
|
|
169
|
-
C --> D[report next
|
|
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]
|
|
170
173
|
D --> A
|
|
171
174
|
```
|
|
172
|
-
flowchart TD
|
|
173
|
-
A[tool_call] -->|counter +1| B[turn_end<br/>record calls and duration]
|
|
174
|
-
B --> C[agent_end<br/>write one log line]
|
|
175
|
-
C --> D[before_agent_start<br/>settle previous turn]
|
|
176
|
-
D -->|nextTurn message<br/>calls / duration / deviation / median| A
|
|
177
|
-
D -.->|system keeps a static skeleton| S[ptc_meter section]
|
|
178
|
-
|
|
179
175
|
## License
|
|
180
176
|
|
|
181
177
|
MIT
|