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

@sevten/pi-time-context

v0.1.0

Published

Pi extension that gives conversations wall-clock context: sparse, deterministic timestamps and idle gaps for user messages and tool results.

Downloads

147

Readme

pi-time-context

A Pi agent extension that gives conversations wall-clock context — sparse, stable, and quiet.

pi-time-context attaches a small timestamp block to outbound user messages and tool results at intervals — just enough for the model to always know the real time, without stamping every message:

sent_at: 2026-08-22 14:15 +08:00
user_idle_for: 2h15m

Your original message or tool result...

How it works

When the first message of a session is sent, it receives a baseline stamp marking the session start. After that, a stamp is added only once a 10-minute window (configurable) has passed, attached to the next outbound user message or tool result.

  • Sparse by design — a few well-placed stamps give the model a sense of real time without filling its context with timestamp noise; if you truly want a stamp on every message, one option turns it on.
  • Idle-aware — when the previous assistant or tool activity ended more than 30 minutes ago (configurable), the stamp also includes user_idle_for, telling the model the conversation has a gap.
  • Deterministic — each stamp is frozen the first time a message is sent. Retries, /resume, /reload, /fork, /clone, and /tree reproduce identical timestamps, and already-sent context never changes, keeping prompt caches warm.
  • Visible, not intrusive — the model sees the stamps; you see them too, as a dim one-line marker in the chat UI. Session data and the system prompt are never touched.

Installation

pi install npm:@sevten/pi-time-context

Usage

Nothing to set up. In the chat UI, each stamped message shows a dim marker under it, for example:

sent_at 14:15 +08:00 · User idle for 2h15m

That marker mirrors exactly what the model received — nothing extra is written into the session file. After a compaction drops the session's early messages, a session_started_at: line is prepended to the summary so the model still knows when the session began.

Configuring with /time-config

There are two ways to configure, both writing to the global config file (~/.pi/agent/pi-time-context.json) and taking effect right away — subsequent messages are stamped by the new settings, while already-stamped messages keep their original stamps.

Interactive menu — run /time-config without arguments:

  Stamp a timestamp every   10 min
  Show idle gap after       30 min idle
  Show times in             local

  enter select  ·  esc back
  • Stamp a timestamp every — presets (5, 10, 15, 30, 60, 120 min), Every message, or a custom value. Picking a concrete interval switches every-message mode off, and vice versa.
  • Show idle gap after — minimum idle gap before user_idle_for is added.
  • Show times in — local, UTC, or any IANA time zone (Asia/Shanghai); custom values are typed inline.

Text commands:

/time-config show                     current config, next checkpoint, recent stamps
/time-config interval <minutes|every>  set the interval, or "every" for every-message mode
/time-config threshold <minutes>
/time-config tz <IANA|local|UTC>

Development

npm ci --ignore-scripts
npm run validate

npm run validate runs the TypeScript check, the Vitest suite, and an npm package dry run.

License

MIT