JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 39
  • Score
    100M100P100Q84029F
  • License MIT

Chronova heartbeat tracking extension for oh-my-pi — sends coding activity to your Chronova dashboard via chronova-cli

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, and ast_edit tool 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-plugin

Configuration

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

  1. On session_start, the plugin records the project directory
  2. On tool_result events, 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 fileReplacements count
  3. When the rate limit allows (1/min/project), pending changes are flushed to chronova-cli
  4. 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 - deletions

Project 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.log

License

MIT © NX Solutions UG