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

@1outres/dsh-plugin-mode-memory

v0.15.0

Published

Remembers the agent preset each project last used and gives it to new blank DeepSeek Harness sessions of that project.

Readme

@1outres/dsh-plugin-mode-memory

Remembers the agent preset ("mode") each project last used and opens that project's new blank sessions with it. Without this plugin every new session starts with the global default preset, and reusing an existing blank session switches it back to that default.

dsh plugin add @1outres/dsh-plugin-mode-memory

Or install it with every plugin in the repository through the @1outres/dsh-plugins bundle. Enable one or the other: both insert the same mode-memory row.

When it remembers

A choice is saved when a session commits a different preset outside a session.create call: you pick one in the new-session chip, or Settings syncs one. The plugin listens for agent-preset/selected and stores the preset under the session's cwd, so a project keeps one preset however many sessions it opens.

The Host switches a reused blank session to the global default inside session.create. That reset is not a choice and is never remembered, so a project with no memory keeps following the global default, including later changes to it.

These selections are ignored:

  • an unknown session;
  • a subagent session;
  • a session without a cwd;
  • any selection made inside a session.create call.

When a request already names a preset, the plugin passes it through unchanged and remembers the preset that actually ran afterwards. An explicit choice, such as a Creator entry or reopening a blank session, is never overridden.

When it applies

When a workspace is opened or New session is pressed, the Web UI calls sessionController.create. If that request names no preset, the plugin looks up the project's remembered preset and adds it. The project is the workspace path when the request names a workspace, otherwise the request cwd.

A remembered preset is used only while the preset roster still lists it and does not mark it broken. A request without a project path, or with an unknown workspace id, is left alone.

Forgotten presets

When the remembered preset is no longer listed, or is listed as broken, the plugin forgets it and lets the session start with the global default. A renamed or deleted preset therefore never blocks a new session. If the roster cannot be read, the plugin logs a warning and also leaves the session to the global default; the memory is kept and tried again next time.

Storage

The memory lives in the durable storage domain mode_memory, table projects. The key is the normalized project path: trailing slashes are removed, so /work/repo and /work/repo/ are the same project. The value is the preset id and the time of the choice.

Limits

  • The plugin wraps the internal sessionController.create method through its cordis Proxy. A DSH upgrade can move or rename that method. The plugin then fails to start with a clear error instead of misbehaving.
  • It only affects sessions created through the Web UI's session.create. Sessions created by other means keep their own preset handling.
  • The project is matched by path spelling. The same directory reached through a symlink or a different relative spelling is a different project.
  • There is no browser half and no settings; the plugin adds no Web UI of its own.

Development

The package is part of my-dsh-plugins. Its unit tests use fakes and need no running Harness.

License

MIT