Package Exports
- @chronova/pi-plugin
- @chronova/pi-plugin/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@chronova/pi-plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
chronova-pi-plugin
Chronova heartbeat tracking extension for oh-my-pi.
Automatically sends coding activity heartbeats to your Chronova dashboard via chronova-cli — a drop-in replacement for wakatime-cli.
Features
- Automatic tracking — Monitors
read,edit,write, andast_edittool results from oh-my-pi - AI line changes — Reports net AI-written lines (
--ai-line-changes) for edit and write operations - Rate limiting — 1 heartbeat per minute per project, persisted to disk across restarts
- Force flush on exit — All pending changes are flushed when the session shuts down
- Fire-and-forget — Heartbeat invocations never block the agent loop
Prerequisites
- oh-my-pi (pi-coding-agent v15+)
- chronova-cli installed at
~/.local/bin/chronova-cli - A Chronova account with API key configured in
~/.chronova.cfg
Installation
omp plugin install @chronova/pi-pluginConfiguration
The plugin reads the API key from ~/.chronova.cfg automatically (same as chronova-cli). No separate configuration is needed.
Debug Logging
Set CHRONOVA_PI_DEBUG=1 or add debug = true to ~/.chronova.cfg to enable verbose logging to ~/.chronova-pi-plugin/plugin.log.
How It Works
- On
session_start, the plugin records the project directory - On
tool_resultevents, it extracts file paths and line changes:- read → tracked as view (no line changes)
- edit → diff parsed for additions/deletions
- write → tracked as write operation
- ast_edit → tracked from
fileReplacementscount
- When the rate limit allows (1/min/project), pending changes are flushed to
chronova-cli - On
session_shutdown, all remaining changes are force-flushed
chronova-cli Arguments
chronova-cli \
--entity <absolute-file-path> \
--entity-type file \
--project-folder <project-directory> \
--plugin "oh-my-pi/<omp-version> chronova-pi-plugin/<plugin-version>" \
--category "ai coding" \
--write \ # for write operations
--ai-line-changes <net-lines> # additions - deletionsProject Structure
src/
index.ts Extension factory: registers event handlers on ExtensionAPI
heartbeat.ts chronova-cli invocation (fire-and-forget via execFile)
tracker.ts File-change extraction from tool_result events
state.ts Per-project rate-limit state (persisted to disk)
logger.ts Debug logger writing to ~/.chronova-pi-plugin/plugin.logLicense
MIT © NX Solutions UG