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

@moon16u/dsh-plugin-current-time

v0.2.2

Published

Inject the host's current date and time into agent context at the start of every turn

Readme

@moon16u/dsh-plugin-current-time

English | 中文

Inject the host's current date and time into agent context at the start of every turn.

Why

A model has no clock. It infers "today" from whatever the harness put in its context, which is fine for a short session and wrong for a long one — a conversation left open across midnight keeps reasoning from yesterday's date, and nothing in the transcript contradicts it.

This plugin puts one real wall-clock reading at the top of every turn, so relative reasoning ("due tomorrow", "that was three hours ago") has something true to anchor to.

Behavior

On the first step of each turn, the plugin appends one durable user-role message after the claimed prompt:

<system-reminder>当前时间:2026-08-22 周六 01:55:30(UTC+0800,Asia/Shanghai)。这是本轮开始时的真实时刻,每轮自动刷新;请以最近的一条为准,不要根据对话历史推断当前日期或时间。</system-reminder>

Three deliberate choices:

  • Once per turn, not once per step. agent/pre-step also fires for every later step of a tool-call loop. Stamping those would bury the transcript in near-identical readings that tell the model nothing new.
  • Appended, not prepended. The reading belongs after the prompt it describes, so the freshest timestamp is the last thing the model reads.
  • Durable, so earlier stamps remain. DSH has no ephemeral message form, so each turn's reading stays in history. That keeps the injection append-only (friendly to prompt caching) and leaves an honest timeline, at the cost of one short message per turn. The reminder's closing sentence is what stops the model from reading a stale stamp as "now".

A rejected or empty first step is left untouched — there is no request for the reading to accompany.

Weekday and timezone

Weekday names are written into the plugin rather than read from a locale: DSH runs on hosts without zh_CN installed, where toLocaleDateString would silently fall back to English. The timezone label comes from Intl.DateTimeFormat().resolvedOptions().timeZone; on a host without full ICU data the reminder still carries the numeric UTC offset.

Install

Ships as part of the @moon16u/dsh-pouch bundle (recommended) — no separate installation step. The bundle's host entry mounts it automatically:

dsh plugin --profile web add @moon16u/dsh-pouch

Or install this plugin standalone:

dsh plugin --profile web add @moon16u/dsh-plugin-current-time

Either way, restart dsh web once after installing. No manual cordis.patch.yml edits needed — the package carries its own patch.

Test

node --test test/*.test.mjs