npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pi-dtime

v0.2.0

Published

Pi extension that appends localized response duration and local completion time to the transcript

Readme

pi-dtime

English | 简体中文

pi-dtime is a lightweight Pi extension that appends the duration and local completion time after every fully settled agent response.

中文:本次回复耗时 4 秒 · 结束于 20:30:03
English: Response took 4 seconds · Finished at 20:30:03
日本語:今回の応答時間 4 秒 · 完了時刻 20:30:03

Features

  • Measures from the first agent_start until agent_settled, so automatic retries, compaction recovery, and queued continuation remain part of one complete run.
  • Uses a monotonic clock for elapsed time, so wall-clock adjustments do not corrupt the duration.
  • Records the local wall-clock completion time and includes the full date when a run crosses a local date boundary.
  • Optionally follows the active pi-di18n /lang locale for copy, duration units, and date/time formatting.
  • Re-renders historical response-timing entries in the current locale without changing the persisted v1 data contract.
  • Persists a TUI-only custom transcript entry without using the footer, status bar, or a live timer.
  • Never calls sendMessage; timing entries are not added to later LLM context.
  • Has zero runtime dependencies beyond Pi's bundled peer packages.

Installation

Install the latest npm release:

pi install npm:pi-dtime

To make timing lines follow /lang, install both packages:

pi install npm:pi-di18n
pi install npm:pi-dtime

Install the pinned GitHub release:

pi install git:github.com/ssdiwu/[email protected]

Restart Pi after installation, or run /reload in an existing session.

Localization behavior

When pi-di18n is available, pi-dtime connects through the public pi-core/i18n/requestApi contract and reads the current locale at render time. Changing /lang and reloading therefore updates both new and existing timing entries.

The maintained locale set matches the 25 TUI locales currently shipped by pi-di18n: cs, da, de, el, en, es, fi, fr, hi, id, it, ja, ko, nl, pl, pt-BR, pt-PT, ro, sg, sv, tr, uk, vi, zh-CN, and zh-TW.

If pi-di18n is absent or its API is unavailable, pi-dtime remains fully functional and uses Simplified Chinese. Unknown valid locales follow the i18n fallback and default to English.

Development

git clone https://github.com/ssdiwu/pi-dtime.git
cd pi-dtime
npm install
npm run typecheck
npm test
npm pack --dry-run

To try the local checkout without installed extensions:

pi --no-extensions -e ./index.ts

The current tested compatibility baseline is @earendil-works/pi-coding-agent 0.84.1. Localization integration targets the pi.i18n.v1 contract exposed by pi-di18n.

Project layout

  • index.ts — Pi extension entry point, timing lifecycle, and optional i18n bridge.
  • src/locales.ts — locale messages, bundle metadata, aliases, and fallback rules.
  • tests/ — extension registration, localization, and behavior regression tests.
  • doc/README.md — documentation map and source-of-truth boundaries.
  • AGENTS.md — implementation and verification constraints.

Scope

pi-dtime measures only complete runs of the main Pi agent. It does not measure individual tool calls or independent pi-dteam workers.

License

MIT