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-codetime

v0.1.1

Published

CodeTime backend for the DeepSeek Harness session-telemetry seam: reports session/turn/tool/file activity to codetime.dev via /v3/agent/ingest

Readme

CodeTime for DeepSeek Harness

Automatic coding-time tracking for codetime.dev, ported to the DeepSeek Harness (dsh). This is the native dsh telemetry backend — the dsh-side sibling of codetime-cli's agent adapters for Claude Code / Codex / OpenCode / Pi.

It reports session, turn, tool, file, and model activity to the same agent ingest endpoint the CLI uses (POST /v3/agent/ingest), so dsh activity lands on the same dashboard as your other AI-agent tools.

How it works

dsh already ships a telemetry seam (@deepseek-ai/dsh-session-telemetry) that captures session events live (or on demand), projects them, runs the session-telemetry/record redaction waterfall, and hands SessionTelemetryRecords to any backend that implements emit / flush / shutdown. This package is such a backend:

  1. SessionTelemetryCoordinator drives emit(record) for every projected session event.
  2. Each record is translated into a codetime canonical event (session.started, turn.started, prompt.submitted, tool.started, tool.completed, file.changed, command.completed, model.usage, …).
  3. Events accumulate per session and are rolled up (15-minute buckets, per-model / per-tool / per-file / per-turn aggregates) with the exact wire format codetime-cli uses.
  4. A periodic flush POSTs { rollups, replace: true } to /v3/agent/ingest, upserting each session's rollup by its stable key.

emit only queues in memory (no I/O), so it never blocks the session firehose. Batching, the periodic timer, and the bounded shutdown drain own the network.

Mapping

| dsh session/event type | codetime canonical event | | --- | --- | | turn/start / turn/end | turn.started / turn.completed | turn.failed | | user/message (direct prompt) | prompt.submitted | | assistant/message (with usage) | model.usage | | tool/call | tool.started | | tool/result | tool.completed | tool.failed + file.read/changed/searched | | tool/result (bash/pwsh/…) | command.completed | command.failed | | compaction/end | context.compacted | | session created / disposed | session.started / session.ended |

File activities are derived from the tool name and its parsed arguments (readread, writewrite, edit/str_replaceedit with linesAdded/linesRemoved, glob/grepsearch). session.cwd becomes the codetime project and workspaceId.

Install & wire

The package is a host-plane plugin (a process-global sessionTelemetry Service). Install it into your profile and add one row to the composition.

dsh plugin --profile web add dsh-codetime

Then merge the row from cordis.patch.yml into your profile's cordis.patch.yml (or $DSH_HOME/cordis.patch.yml).

⚠️ sessionTelemetry is a singleton — one backend per process. If your composition already enables session-telemetry-otel, disable it or pick one.

Configuration

| Key | Default | Meaning | | --- | --- | --- | | mode | DISABLED | FULL (live capture), FEEDBACK_ONLY (capture on /feedback), or DISABLED. | | apiUrl | https://codetime.dev | API base URL. | | token | — | Bearer token. | | flushIntervalMs | 60000 | Rollup flush cadence. | | shutdownTimeoutMs | 5000 | Upper bound on the final drain at teardown. |

Token resolution (first match wins): token: config → CODETIME_TOKEN env → ~/.codetime/config.json. If you already signed in with the codetime CLI or another editor extension, the shared ~/.codetime/config.json token is picked up automatically. The machine-id in ~/.codetime/machine-id identifies the machine on the dashboard (created on first use, shared with the CLI).

Limitations

  • Event buffers are held per session in memory and re-sent whole each flush (idempotent upsert); very long-lived sessions grow their in-memory buffer.
  • Historical sessions are not backfilled — this reports only activity the live process observes. Pair it with a codetime-cli dsh backfill adapter to import ~/.dsh/sessions/**/session.jsonl.zstd history.
  • No redaction rules are shipped: records leave the process exactly as captured by the seam. Mount your own session-telemetry/record waterfall rules if you export beyond a trusted boundary.

Publishing (npm)

Publishing runs through GitHub Actions using an npm Trusted Publisher (OIDC): the workflow requests a short-lived token with id-token: write, so no npm token is ever stored in the repository.

One-time npm setup

  1. If dsh-codetime does not exist on npm yet, publish the first version once from the command line to create it:

    npm publish --access public
  2. On npmjs.com, open the package → SettingsPublishing accessAdd trusted publisher (GitHub Actions):

    | Field | Value | | --- | --- | | Owner | codetime-dev | | Repository | dsh-codetime | | Workflow | .github/workflows/publish.yml |

    Leave Environment empty.

Release a version

npm version patch          # or: minor / major — bumps package.json, commits, tags vX.Y.Z
git push --follow-tags

Pushing the v* tag triggers publish.yml, which runs npm publish --provenance --access public. You can also trigger it manually from the repository's Actions tab.