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

@hy-sde-org/dsh-llm-slots

v0.2.0-rc.2

Published

Host-wide model-slot admission control (ctx.modelSlots) decided FIFO at the llm/stream waterfall: a shared budget over every model call so 2-3 concurrent local inference slots stay predictable, as a standalone npm package.

Readme

@hy-sde-org/dsh-llm-slots

Host-wide model-slot admission control (ctx.modelSlots) for the DeepSeek Harness. A deployment that runs a handful of concurrent model providers behind one local inference endpoint (typically 2–3 slots, ~1M context each) needs an explicit budget over every model call — otherwise the main agent's turns, running subagents, and workflow fan-out stack dozens of simultaneous bursts against the endpoint and every call slows to queue latency.

Published standalone as @hy-sde-org/dsh-llm-slots; it mirrors @deepseek-ai/dsh-llm-slots in the hy-sde deepseek-harness fork (the fork-only package is not on npm and not in upstream stock).

How it works

  • One chokepoint. Admission decides FIFO at the llm/stream waterfall — the single boundary every model-backed call crosses (main agent loops, in-process subagents, worker-thread children, workflows, title/compaction side-requests), regardless of which session or context initiated it.
  • Host-global budget. The gate lives in module scope, so every derived context and plugin instance shares one pool. Capacity is configured on the llm-slots row (default 3) and adjustable at runtime: ctx.modelSlots.setCapacity(n).
  • Cancellable waits. A call waiting for a slot observes its AbortSignal; cancellation while queued surfaces as an AbortError upstream and never receives a freed slot.
  • One slot per logical call. A call holds its slot for its full lifetime, including adapter retries, which also prevents a failing endpoint from fanning out an unbounded retry storm.

Composition

Mount once per host in a shared-row composition:

- id: llm-slots
  name: '@hy-sde-org/dsh-llm-slots'
  config:
    enabled: true
    capacity: 3

Additional mounts share the same global budget and are safe but redundant.

Service surface

ctx.modelSlots exposes:

  • stats() — { enabled, capacity, running, waiting, acquiredTotal }.
  • setEnabled(boolean) — toggle admission without touching capacity.
  • setCapacity(number) — change the budget; a shrink applies as calls drain.

The optional ./invariant entry registers package-owned admission-accounting checks with a Cordis host's ctx.invariants service and needs @deepseek-ai/cordis + @deepseek-ai/dsh-invariants peers only when you use that entry.

Development

pnpm install
pnpm -r check       # strict typecheck (src + tests)
pnpm -r test        # gate + admission tests
pnpm -r build       # tsc -> dist

No model-facing tools ship here; the package deliberately reads no LLM service state (it only listens on the shared event bus), which keeps it trivially testable and safe to mount in any context.

Known Limitations and Deferred Work

  • The gate is process-global: capacity is not partitioned per provider or per session, and the budget never drains below what in-flight calls hold (a shrink takes effect as calls finish).
  • acquire() grants one slot per logical call; there is no priority or fair-share scheduling beyond arrival order (FIFO).

License

MIT. Derived from the DeepSeek Harness codebase; see THIRD-PARTY-NOTICES.md for provenance.