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

v0.1.0

Published

DeepSeek Harness plugin: /logs command and a stderr log exporter, so ctx.logger output is actually visible

Readme

dsh-logbook

A DeepSeek Harness plugin that makes ctx.logger output visible: a /logs command in the chat, and a stderr exporter that is on by default for warnings and errors.

The problem it fixes

Every dsh plugin logs through ctx.logger, but no shipped profile mounts a log sink. The only default destination is a 1000-record in-memory buffer, and that buffer has a surprise: it silently drops warn and debug records. Cordis orders its levels error=0, info=1, warn=2, debug=3, and the buffer exporter falls back to each logger's default level of 1, so warnings never make it in. A plugin can warn about a real problem and there is no way to see it, live or after the fact (discussions #2905, #1241, #4994).

dsh-logbook registers one full-capture exporter (it asks cordis for everything, then filters itself) and gives you two views:

  1. stderr, live. By default only warnings and errors, so a healthy session stays silent. Open it up per plugin with a config map. Never writes to stdout, which stays free for SDK and ACP protocol traffic.
  2. /logs in the chat. The recent history (default ring of 2000 records, all levels), with filters:
/logs
/logs --level warn
/logs --name llm-gate --grep queue
/logs --since 10m --limit 100
logs: 3 of 41 records shown (ring 2000, buffer seeded 12)
14:01:59 llm-gate info llm-gate: llamacpp session=059a680f queued (depth 1)
14:02:03 llm-gate info llm-gate: llamacpp session=059a680f dispatched after 4012ms
14:02:11 llm-gate warn llm-gate: llamacpp session=059a680f queue full, rejecting

Install

dsh plugin --profile web add dsh-logbook

That is enough. To tune it, add to your profile's cordis.patch.yml:

- id: logs
  config:
    ring: 2000            # records kept for /logs
    stderr:
      enabled: true
      types:
        default: warn     # error | warn | info | debug | off
        llm-gate: debug   # everything from one plugin
        hmr: off          # silence one logger entirely

A value means "this type and anything more severe", in the order error, warn, info, debug. This deliberately differs from cordis's numeric levels, where info sits below warn and "warnings and errors only" cannot be expressed.

What you should know

  • The ring captures every level from the moment the plugin mounts, and seeds itself from the built-in buffer for anything earlier. Records from before the mount can only be error and info, because of the buffer behaviour described above.
  • The stderr writer attaches an error listener so a closed pipe (for example a dying tee) cannot crash dsh, and it never throws into the logging path.
  • Upstream note: cordis's ctx.logger.exporter() disposer currently removes the most recently registered exporter rather than its own, so any plugin reload can detach some other plugin's log sink. dsh-logbook keeps an internal flag so a stale copy of its exporter goes inert instead of double-reporting.
  • Related work: dsh-logger-panel is a web Settings page with rotating JSONL files; dsh-boot-doctor mounts a minimal console sink aimed at boot problems; dsh-o11y-plugin exports to OpenTelemetry. dsh-logbook is the terminal-and-chat option: filters, stderr, no web dependency, works headless.

License

MIT