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

dsh-timesheet

v0.1.0

Published

Timesheet for DeepSeek Harness (dsh): turn-based time tracking from session logs — totals, per-day, per-project, per-provider, per-source rollups, tool-call counts, failure rates, and time-to-first-token. CLI + agent-callable timesheet tool, zero runtime

Readme

dsh-timesheet

CI License: MIT dsh-plugin

Timesheet for DeepSeek Harness (dsh): turn-based time tracking from session logs.

Token dashboards tell you what you spent; this one tells you how much wall-clock time you spent with your agents — totals, per-day, per-project, per-provider, per-source, plus tool-call counts, failure rates, and time-to-first-token. Zero runtime dependencies; reads *.jsonl session logs only.

Install

dsh plugin add dsh-timesheet

Or run standalone:

npx dsh-timesheet ~/.codex/sessions

CLI

dsh-timesheet <dir> [--json]
  • dir must contain *.jsonl session logs (e.g. ~/.codex/sessions, a dsh session directory, or any exported session folder).
  • Prints a Markdown report; --json prints the machine-readable dsh-timesheet/v1 envelope.
  • Exit codes: 0 report generated, 1 no turns found / warnings, 2 usage/IO error.
npx dsh-timesheet ~/.codex/sessions
npx dsh-timesheet ~/.codex/sessions --json

In-harness usage (agent-callable)

Ask your dsh agent:

给我出一份时间报表:timesheet,目录指向会话日志目录。 Give me a timesheet report: timesheet with dir set to your session-log directory.

The tool returns a dsh-timesheet/v1 report:

{
  "schema": "dsh-timesheet/v1",
  "target": "~/.codex/sessions",
  "ok": true,
  "scannedFiles": 42,
  "sessions": 42,
  "turns": 310,
  "totalDurationMs": 64800000,
  "failedTurns": 7,
  "toolCalls": 1284,
  "byDay": [ { "key": "2026-08-18", "turns": 22, "durationMs": 5400000, "ttftMs": 110000, "failed": 1, "avgMs": 245454 } ],
  "byProject": [ ... ],
  "byProvider": [ ... ],
  "bySource": [ ... ],
  "warnings": []
}

What it reads

Session logs use the standard dsh event envelope:

  • session_meta → session id, workspace (cwd), model provider, source (desktop / CLI / VS Code / ...)
  • event_msg / task_started → turn begin
  • event_msg / task_complete → turn end, duration_ms, time_to_first_token_ms, error
  • response_item / function_call → tool-call counts

Files ending in .jsonl are parsed; malformed lines are skipped with a warning. Compressed .jsonl.zstd logs are not read directly — export or decompress them first (the format is plain JSONL after decompression).

Why it exists

  • The ecosystem tracks tokens and cost, but no plugin tracked wall-clock time — the WakaTime-shaped hole in the dsh plugin registry.
  • Answering “where did my 6 hours go?” is the first step to spending agent time deliberately.
  • Zero runtime dependencies, read-only by construction: it never writes to your sessions.

Development

pnpm install
pnpm typecheck
pnpm build
pnpm test
pnpm test:integration

CI runs the dsh-plugin-doctor preflight, unit tests, packed-artifact integration (real timesheet invocation), and a fresh-profile dsh web boot smoke on Windows.

License

MIT © 2026 zoahdev


dsh-timesheet(中文)

DeepSeek Harness(dsh)的时间报表插件:从会话日志做基于 turn 的时间跟踪。

Token 仪表盘告诉你花了多少钱;这个插件告诉你真实花了多少墙钟时间——总计、按天、按项目、按模型供应商、按来源,外加工具调用次数、失败率和首 token 延迟。零运行时依赖,只读 *.jsonl 会话日志。

安装

dsh plugin add dsh-timesheet

独立使用:

npx dsh-timesheet ~/.codex/sessions

CLI

dsh-timesheet <dir> [--json]
  • dir 需要包含 *.jsonl 会话日志(如 ~/.codex/sessions、dsh 会话目录或导出的会话目录)。
  • 输出 Markdown 报告;--json 输出机器可读的 dsh-timesheet/v1 报告。
  • 退出码:0 生成成功,1 没有 turn / 有警告,2 用法/IO 错误。
npx dsh-timesheet ~/.codex/sessions
npx dsh-timesheet ~/.codex/sessions --json

在 harness 内使用(agent 可调用)

对 agent 说:

给我出一份时间报表:timesheet,目录指向会话日志目录。

工具返回 dsh-timesheet/v1 报告(结构见英文版 JSON 示例)。

读取什么

会话日志使用标准 dsh 事件结构:

  • session_meta → 会话 id、工作区(cwd)、模型供应商、来源(desktop / CLI / VS Code / ...)
  • event_msg / task_started → turn 开始
  • event_msg / task_complete → turn 结束、duration_mstime_to_first_token_mserror
  • response_item / function_call → 工具调用计数

只解析 .jsonl,畸形行跳过并告警。压缩的 .jsonl.zstd 不直接读取——先解压(解压后就是纯 JSONL)。

为什么需要它

  • 生态里到处是 token 和成本统计,但没有人统计墙钟时间——这是 dsh 插件注册表里 WakaTime 形状的空洞。
  • 回答“我 6 小时去哪了”是开始有意支配 agent 时间的第一步。
  • 零运行时依赖、天然只读:永远不会写你的会话。

开发

pnpm install
pnpm typecheck
pnpm build
pnpm test
pnpm test:integration

CI 跑 dsh-plugin-doctor 预检、单元测试、打包集成(真实 timesheet 调用)、Windows 全新 profile 的 dsh web 启动冒烟。

许可证

MIT © 2026 zoahdev