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

@klarkxy/dsh-mood

v0.1.6

Published

Requirements: the current agent records, reads, and updates this task's requirements, with no extra model calls.

Readme

@klarkxy/dsh-mood

Mood gives the current Agent one tool to record, read and update its understanding of the current task. The Agent uses its existing instructions, conversation and latest user request; Mood does not call or select another model.

简体中文

Requires Node.js ≥22 and DSH ≥0.1.7-rc.2. Enable or disable the bundle using the native plugin manager. It works without Web services in TUI and other hosts. There is no settings panel, requirements card or model selector.

npm install @klarkxy/dsh-mood
dsh plugin --profile web add @klarkxy/dsh-mood

Agent workflow

  1. Call mood_requirements with {"action":"read"} at the start of a substantive task.
  2. Use the current context to identify the goal, deliverables, scope, constraints and completion criteria. Keep assumptions and unresolved questions distinct from explicit requirements.
  3. Call mood_requirements with action: "record", the returned revision as expectedRevision, the returned sourceVersion, and requirements.
  4. Reuse the record during tool continuations. Read and update it when the user corrects or changes the requirements. A plain “continue” preserves the task anchor.

Example record call after a read returned revision 0 and sourceVersion user-message-id:

{
  "action": "record",
  "expectedRevision": 0,
  "sourceVersion": "user-message-id",
  "requirements": {
    "goal": "Fix the search error description",
    "deliverables": ["A verified fix"],
    "constraints": ["Keep the existing public interface"],
    "acceptance": ["The regression test passes"],
    "assumptions": [],
    "questions": []
  }
}

requirements.goal is required; optional list fields are deliverables, inScope, outOfScope, constraints, acceptance, assumptions and questions. Omitted lists remain empty. Record concise conclusions, not private reasoning or credentials. The result returns the current revision, source version and full requirements. A new user request marks an older interpretation as stale; reread before updating. Conflicting revisions or request versions fail without overwriting the record.

Session identity comes only from the invoking Agent. Model and session overrides are rejected. The summary is the Agent's interpretation, not human confirmation or execution permission. Necessary questions and native approvals remain with the main Agent and Host. Registration makes the tool available and describes when to use it; it does not force every model to call it.

Existing records and integration

The existing dsh_editor_mood storage domain and TaskContract fields remain readable. Recap can continue to use aiMood.getContract(sessionId). Historical notes, answers, held requests and settings are preserved. Old model selections are inert; no requests are replayed and no background analysis is started.

When Web services are present, /dsh-mood/status and /dsh-mood/contract remain authenticated read-only compatibility endpoints. The former UI operations (model, mode, manual, edit, retry) return MOOD_TOOL_ONLY without changing settings, calling a model or resuming messages. Future writes use only the current Agent's tool.

A failed save leaves the previous record unchanged. Writes are serialized; cancellation before a write starts prevents it, while an accepted storage write remains committed. Disposal waits for started writes to finish and rejects queued or new work.

Validation

pnpm --filter @klarkxy/dsh-mood typecheck
pnpm --filter @klarkxy/dsh-mood test
pnpm --filter @klarkxy/dsh-mood build

Tests cover current-session binding, full summary persistence, corrections and continuation, stale revisions, concurrency, cancellation, disposal, storage failures, legacy data, native registration and headless host loading.

Publishing · License