@hk_net/pi-timestamp

Pi extension that shows timestamps for user input and agent completion timing

Packages

Package details

extension

Install @hk_net/pi-timestamp from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@hk_net/pi-timestamp
Package
@hk_net/pi-timestamp
Version
0.1.13
Published
Aug 29, 2026
Downloads
991/mo · 46/wk
Author
hk_net
License
EUPL-1.2
Types
extension
Size
28.8 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./timestamp.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-timestamp

Shows timestamps for user input and agent completion timing. Requires Pi 0.84.4 or newer.

What it does

  • User input: Shows Sent HH:MM:SS as a dim status line in the chat display after each user message
  • Agent completion: Shows Done at HH:MM:SS · duration as a dim status line in the chat display after each agent turn. If an extension UI prompt paused the run, it instead shows total, active-agent, and user-waiting time (e.g., Done at 14:32:05 · total 8.2s · active 3.2s · waiting 5.0s).
  • Session/runtime summaries: Shows accent-colored summaries when switching sessions and at final Pi exit, including start/end times and durations. The final summary includes the complete Pi process runtime and every session interval.

All timestamps and summaries are display-only — session-switch summaries render in Pi's UI and the final runtime summary prints after Pi restores the terminal in TUI mode. They never enter the LLM context.

Display behavior

Timestamps appear inline in the chat display, similar to Pi's built-in tool timing lines such as Took 1.9s. They are not appended to the session as user or custom messages, so they do not pollute the model context.

Installation

Avoid duplicate installation. Install this npm package or the GitHub bundle, not both. Loading both copies can duplicate timestamps and runtime summaries.

pi install npm:@hk_net/pi-timestamp

Or copy manually:

mkdir -p ~/.pi/agent/extensions
cp packages/pi-timestamp/timestamp.ts ~/.pi/agent/extensions/timestamp.ts

Duration measurement

Captured from the first agent_start to agent_settled, so automatic retries, compaction recovery, tool calls, and queued continuations are included in one complete task duration. When an extension opens a blocking UI prompt during that run, Pi 0.84.4's prompt events subtract that user-wait time from the reported active-agent duration while retaining it in the total.

Issues and feedback

Found a bug or have a feature request? Please report it on GitHub Issues.

For security vulnerabilities, please use GitHub's private vulnerability reporting instead of opening a public issue.