Install
Install with PiG
pig install npm:@agimon-ai/doompi-logInstall with Pi
pi install npm:@agimon-ai/doompi-logPackages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"extensions": [
"./dist/extensions/pi.mjs"
]
}README
Written by the package's publisher, shown as published in version 0.0.1-alpha.128 (README.md). PiG does not review it.
@agimon-ai/doompi-log
Session metrics, findings, sink status, and a Log Metrics overlay for Pi.
Part of the DoomPi distribution.
The extension aggregates telemetry it observes in-process and can query historical data from
@agimon-ai/log-sink-mcp.
Alpha: metric attribution and UI contracts may change between releases.
Requirements
- Node.js 22.19.0 or newer
- Pi 1.0.0 and Pi TUI 0.85.0
Install
doompi init and dpi init include Log in default.packages in .doom/modes.yaml. Remove it
or move it to a named layer to change which major modes load it. Pi discovers its sole extension
entry through package.json.pi.extensions. For standalone Pi:
pi install npm:@agimon-ai/doompi-log
Use SPC h l to open the current session's Log Metrics overlay.
What is collected
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.
Historical panels resolve a sink over HTTP first and then use the Log Sink CLI fallback. Without a reachable sink, current-session headline metrics, 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.
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.
Keys: r refreshes, g changes dimension, p changes period, ? opens details, and Escape closes.
Telemetry controls
| Variable | Effect |
|---|---|
AGENT_TELEMETRY_DISABLED | Disables the extension's telemetry export |
OTEL_SDK_DISABLED | Disables OpenTelemetry SDK export |
AGENT_OTEL_TRACES | Enables/disables trace export; logs can remain enabled |
File fallback is opt-in through host options. The absence of a configured or reachable endpoint does not prevent in-process aggregation. Exceptions and caller-supplied attributes can still be sensitive; do not assume "metadata" is harmless.
The overlay requires a TUI. The aggregator, findings, and metrics-source APIs can be embedded in headless hosts.
Public API
import { deriveFindings, LogMetricsAggregator, openLogMetricsOverlay } from '@agimon-ai/doompi-log';
Normal Pi activation uses extensions/pi. Composition hosts await doomLogExtension.install(context, pi)
from that entry. The helper owns registrations and cleanup. Session shutdown flushes final telemetry
before onDispose releases the telemetry handle. Optional UI services follow provider replacement.
src/extensions/ declares the Pi, server, and web plugins. Controllers handle events and HTTP requests,
services own aggregation and sink queries, and src/tui/ owns terminal presentation. Flat src/exports/
modules expose reusable APIs. The overlay component is available through metrics-overlay.
Development
pnpm build
pnpm typecheck
pnpm test
pnpm lint
Maintained by Agimon.
License
MIT