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

@kingjazz/dsh-sage-router

v0.1.0

Published

SAGE routing as a DeepSeek Harness plugin: progress-aware SELF/HANDOFF/COLLABORATE routing and task-DAG scheduling for A2A agent networks

Readme

dsh-sage-router

SAGE routing as a DeepSeek Harness plugin. The plugin exposes sage_route_task and sage_orchestrate_task, and keeps model/provider credentials in the host Harness profile; no credential is stored in this package.

Real LLM smoke

The fixed smoke baseline is @deepseek-ai/dsh 0.1.1-rc.2. Build and install the bundle into a profile, then run the opt-in install/config/model smoke:

pnpm install --frozen-lockfile
pnpm run build
SAGE_DSH_BIN=dsh SAGE_DSH_PROFILE=headless SAGE_DSH_VERSION=0.1.1-rc.2 pnpm run smoke:harness

SAGE_DSH_BIN is useful when more than one global dsh installation is on PATH. The command must point to the same Harness CLI/profile that owns the configured provider and credentials. smoke:harness runs dsh plugin add, verifies --dump-config, checks the fixed CLI version, and asks the real model to call sage_route_task once.

The ordinary pnpm test suite skips the model call unless SAGE_LLM_SMOKE=1 is set.

Subagent execution

The plugin exposes sage_orchestrate_task. Keep autoOrchestrate: false for route-only operation. When enabled, each declared agent may set provider and model for its LLM, plus subagentProvider: spawn or fork for the Harness child backend. maxDelegationDepth defaults to 1 and is passed to the Harness depth-limit seam. Child cancellation, tool filtering, and lifecycle ownership remain enforced by ctx.subagents.

Event persistence and recovery

When the calling Agent has a Harness session, the plugin can append four log-only event types: sage/route, sage/execution, sage/outcome, and sage/model-update. They contain route identifiers, declared Agent IDs, requirement names, scores, costs, latency, error codes, and numeric learning state only; prompts, credentials, files, tool arguments, and child transcripts are not persisted by SAGE.

These session-log appends are off by default (sessionEventLog: false). Harness builds that do not know the sage/* types refuse to resume any session whose log contains them unless each event is marked ignorable, and current Harness releases give plugins no way to set that marker — writing unmarked custom events permanently breaks resume for that session. Enable sessionEventLog: true only on a Harness that natively supports these types or ignorable/registered custom events. Learning state does not depend on this option: it is stored through the storage domain regardless.

If the Harness storage-domain service is loaded, the plugin stores the latest learning snapshot under the sage_router_learning domain. Revisions use compare-and-set semantics, so a stale process cannot overwrite newer learning. Session events (when present, including historical logs) can be folded to restore route assignments and the last consistent learning revision. If an append or flush fails, orchestration returns persistenceUncertain: true instead of reporting a durable success.