pi-ptc-meter 1.0.15 → 1.0.16

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 +18 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -42,6 +42,15 @@ pi install npm:pi-ptc-meter
42
42
  - `session_start`:模块级计量归零。
43
43
  - system 内 section `ptc_meter` 只含逐字不变的骨架。
44
44
 
45
+ ```mermaid
46
+ flowchart TD
47
+ A[tool_call] -->|计数 +1| B[turn_end<br/>记录次数与耗时]
48
+ B --> C[agent_end<br/>落盘一行日志]
49
+ C --> D[before_agent_start<br/>结算上一轮]
50
+ D -->|nextTurn 尾部消息<br/>次数 / 耗时 / 偏差 / 中位| A
51
+ D -.->|system 只留静态骨架| S[ptc_meter section]
52
+ ```
53
+
45
54
  ## License
46
55
 
47
56
  MIT
@@ -87,6 +96,15 @@ Also: log `~/.pi/ptc-meter.jsonl` (1 MiB truncation, tail-preserving); no enviro
87
96
  - `session_start`: resets module-level counters.
88
97
  - The `ptc_meter` system section holds only a byte-stable skeleton.
89
98
 
99
+ ```mermaid
100
+ flowchart TD
101
+ A[tool_call] -->|counter +1| B[turn_end<br/>record calls and duration]
102
+ B --> C[agent_end<br/>write one log line]
103
+ C --> D[before_agent_start<br/>settle previous turn]
104
+ D -->|nextTurn message<br/>calls / duration / deviation / median| A
105
+ D -.->|system keeps a static skeleton| S[ptc_meter section]
106
+ ```
107
+
90
108
  ## License
91
109
 
92
110
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-ptc-meter",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
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",