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

@yadsh/dsh-plugin-log

v0.4.2

Published

Shared structured file logging and runtime logger discovery for DSH plugins

Readme

@yadsh/dsh-plugin-log

Structured JSON or readable-text file logging for server-side DeepSeek Harness plugins, with daily rotation, retention, console mirroring, live record streaming, and runtime discovery.

import {
  createHostLoggerSink,
  getPluginLogger,
  getRegisteredPluginLoggers,
  setPluginLogFormat,
  setPluginLogLevel,
  subscribePluginLogRecords,
  subscribePluginLoggerRegistry,
} from "@yadsh/dsh-plugin-log";

const log = getPluginLogger({
  pluginId: "dsh-example",
  consoleSink: createHostLoggerSink(ctx.logger),
});
log.info("example.ready");

const unsubscribe = subscribePluginLoggerRegistry((loggers) => {
  console.info("active logger consumers", loggers);
});

// Every record that passes its logger's level, as it is recorded.
const stopStreaming = subscribePluginLogRecords((record) => {
  console.info(record.pluginId, record.level, record.event, record.fields);
});

setPluginLogLevel("dsh-example", "debug");
setPluginLogFormat("text");
stopStreaming();
unsubscribe();
await log.close();

The registry is process-wide and tracks active logger instances automatically; the record bus carries what those loggers actually record, so a live consumer needs neither the file nor a level of its own. A record's fields already have the emitting logger's redact paths applied — one pass over the fields feeds the file, the console mirror and the bus alike, and a record whose fields throw when read is dropped rather than emitted raw — and the logger never freezes the object its caller passed it. @yadsh/dsh-plugin-log-ui uses both: live defaults, per-plugin level overrides, and a json/text selector in DSH settings, plus a Plugin logs panel in the host's right Sidebar that streams the bus behind level and text filters. See the repository's docs/PLUGIN_LOGGING.md for the complete behavior and API contract.

Structural logging surface

Plugins that keep their services decoupled from the concrete logger accept the narrow PluginLoggerLike contract (debug/info/warn/error with event codes and metadata fields). The real PluginLogger satisfies it structurally, and silentPluginLogger() provides the no-op stand-in for tests and optional diagnostics:

import { getPluginLogger, silentPluginLogger, type PluginLoggerLike } from "@yadsh/dsh-plugin-log";

function createService(log: PluginLoggerLike = silentPluginLogger()) {
  log.info("service.ready", { modules: 3 });
}

createService(getPluginLogger({ pluginId: "dsh-example" }));

Development

pnpm --filter @yadsh/dsh-plugin-log check

License

MIT