@agimon-ai/doompi-log 0.0.1-alpha.21 → 0.0.1-alpha.22
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 +43 -37
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,63 +1,69 @@
|
|
|
1
1
|
# @agimon-ai/doompi-log
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Session metrics, findings, sink status, and a Log Metrics overlay for Pi.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
overlay. Counters and spans stay useful to the person running the session instead of
|
|
7
|
-
disappearing into a database nobody opens.
|
|
5
|
+
The extension aggregates telemetry it observes in-process and can query historical data from `@agimon-ai/log-sink-mcp`.
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
> **Alpha:** metric attribution and UI contracts may change between releases.
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
|
|
11
|
+
- Node.js 22.19.0 or newer
|
|
12
|
+
- Pi 0.84.2 and Pi TUI 0.84.2
|
|
11
13
|
|
|
12
14
|
## Install
|
|
13
15
|
|
|
16
|
+
DoomPi loads Log as core. For standalone Pi:
|
|
17
|
+
|
|
14
18
|
```bash
|
|
15
|
-
|
|
19
|
+
pi install npm:@agimon-ai/doompi-log
|
|
16
20
|
```
|
|
17
21
|
|
|
18
|
-
|
|
22
|
+
Use `SPC h l` to open the current session's Log Metrics overlay.
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
`.doom/modes.yaml`. The bare package name follows its Pi manifest and loads the Pi adapter.
|
|
24
|
+
## What is collected
|
|
22
25
|
|
|
23
|
-
|
|
26
|
+
The in-process aggregator tracks operational records such as turn token totals, cache use, tool calls and failures, operation durations, recent errors, and event counts. It derives findings from those records without requiring an external sink.
|
|
24
27
|
|
|
25
|
-
|
|
28
|
+
Historical panels resolve a sink over HTTP first and then use the Log Sink CLI fallback. Without a reachable sink, current-session headline, findings, errors, and tool metrics still work; historical top-consumer and burn-rate views are unavailable. Sink failures are reported in status rather than failing the Pi session.
|
|
26
29
|
|
|
27
|
-
|
|
30
|
+
Turn cost attribution is contextual: when a turn invokes several tools, the emitted turn total can be associated with each participating tool. The overlay uses that value for ranking, not as a precise per-tool share.
|
|
28
31
|
|
|
29
|
-
|
|
30
|
-
next — so every row is something you can act on.
|
|
32
|
+
Keys: `r` refreshes, `g` changes dimension, `p` changes period, `?` opens details, and Escape closes.
|
|
31
33
|
|
|
32
|
-
|
|
33
|
-
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
34
|
-
| Headline | Tokens, cache hit rate, cost per turn, tool failure rate, and issues. Cache and tool-failure values are coloured against a threshold; the rest are workload-dependent and stay neutral. |
|
|
35
|
-
| `WHAT TO FIX` | Ranked findings derived from the session, each paired with the change that moves it: a failing tool, redone turns, a cold cache, a tool dragging outsized turns. Critical first. |
|
|
36
|
-
| `TOOL COST` | Tools ranked by cost per call rather than by how often they run, with call count, failure rate, and p95 latency alongside. |
|
|
37
|
-
| `TOP CONSUMERS` | Biggest token consumers from the sink database for the selected dimension and period. Rows with issues render in the error colour. |
|
|
38
|
-
| `TOKEN BURN` | Token spend per time bucket, newest last. |
|
|
39
|
-
| `RECENT ERRORS` | The session's most recent failures, newest first. |
|
|
40
|
-
| `SINK STATUS` | Backend and endpoint. Press `?` for full wiring, collection scope, and the caveats behind each panel. |
|
|
34
|
+
## Telemetry controls
|
|
41
35
|
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
| Variable | Effect |
|
|
37
|
+
| -------------------------- | ------------------------------------------------------ |
|
|
38
|
+
| `AGENT_TELEMETRY_DISABLED` | Disables the extension's telemetry export |
|
|
39
|
+
| `OTEL_SDK_DISABLED` | Disables OpenTelemetry SDK export |
|
|
40
|
+
| `AGENT_OTEL_TRACES` | Enables/disables trace export; logs can remain enabled |
|
|
44
41
|
|
|
45
|
-
|
|
46
|
-
teaches you to ignore the panel.
|
|
42
|
+
File fallback is opt-in through host options. No configured/reachable endpoint does not prevent in-process aggregation. Exceptions and caller-supplied attributes can still be sensitive; do not assume “metadata” is harmless.
|
|
47
43
|
|
|
48
|
-
|
|
44
|
+
The overlay requires a TUI. The aggregator, findings, and metrics-source APIs can be embedded in headless hosts.
|
|
49
45
|
|
|
50
|
-
|
|
51
|
-
attribution Pi emits. A turn running several tools attributes its total to each of them,
|
|
52
|
-
so the number ranks tools by the weight of the turns they appear in — it is not a per-tool
|
|
53
|
-
share of spend. The same caveat is available in the overlay under `?`.
|
|
46
|
+
## Public API
|
|
54
47
|
|
|
55
|
-
|
|
48
|
+
```ts
|
|
49
|
+
import {
|
|
50
|
+
createDoomLogExtension,
|
|
51
|
+
deriveFindings,
|
|
52
|
+
LogMetricsAggregator,
|
|
53
|
+
openLogMetricsOverlay,
|
|
54
|
+
} from '@agimon-ai/doompi-log';
|
|
55
|
+
```
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
Focused exports provide extension options, metrics types, the metrics source, and the overlay component.
|
|
58
|
+
|
|
59
|
+
## Development
|
|
58
60
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
```bash
|
|
62
|
+
pnpm build
|
|
63
|
+
pnpm typecheck
|
|
64
|
+
pnpm test
|
|
65
|
+
pnpm lint
|
|
66
|
+
```
|
|
61
67
|
|
|
62
68
|
## License
|
|
63
69
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/doompi-log",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.22",
|
|
4
4
|
"description": "Pi log-sink telemetry extension with session-local metrics and a Log Metrics overlay",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"registry": "https://registry.npmjs.org/"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.
|
|
61
|
-
"@agimon-ai/doompi-telemetry": "0.0.1-alpha.
|
|
62
|
-
"@agimon-ai/log-sink-mcp": "0.29.
|
|
60
|
+
"@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.22",
|
|
61
|
+
"@agimon-ai/doompi-telemetry": "0.0.1-alpha.22",
|
|
62
|
+
"@agimon-ai/log-sink-mcp": "0.29.12"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@earendil-works/pi-coding-agent": "0.84.2",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"tsdown": "0.22.14",
|
|
70
70
|
"typescript": "6.0.3",
|
|
71
71
|
"vitest": "4.1.10",
|
|
72
|
-
"@agimon-ai/doompi-ui": "0.0.1-alpha.
|
|
72
|
+
"@agimon-ai/doompi-ui": "0.0.1-alpha.22"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"@earendil-works/pi-coding-agent": "0.84.2",
|