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

dsh-fixed-new-session-model

v0.2.2

Published

固定新会话默认模型与 Agent 预设模式,并支持按工作区独立绑定

Readme

dsh-fixed-new-session-model

中文 | English

npm stars

为 DeepSeek Harness(DSH)固定新会话的默认 Agent 预设与模型,并支持按工作区设置独立规则。

打开 设置 → 默认模式与模型,即可在一个页面中完成全部配置。

全局默认设置

每个工作区都可以跟随全局默认值,也可以绑定自己的预设与模型。

工作区独立配置

安装

dsh plugin --profile web add dsh-fixed-new-session-model

安装完成后重启当前 DSH Web 进程,然后打开 设置 → 默认模式与模型。

从源码安装或参与开发时,可以在仓库目录执行:

dsh plugin --profile web add .

你会得到

  • 稳定的全局 Agent 预设——未配置工作区独立规则时,新会话始终使用指定预设
  • 稳定的全局模型——固定提供方、模型 ID 与推理等级,不受会话内临时切换模型影响
  • 工作区独立规则——可以为每个工作区指定专属的 Agent 预设与模型
  • 按字段继承——只覆盖预设并让模型跟随全局,或者同时配置两者
  • 自动应用——创建工作区会话或复用已有空白会话时自动应用匹配规则
  • 保护已有会话——已经产生对话内容的会话不会被后台规则强制切换
  • 原生设置界面——直接在 DSH 设置页编辑、查看和恢复规则

使用

  1. 打开 设置 → 默认模式与模型。
  2. 在“全局默认设置”中选择 Agent 预设、提供方、模型和可选的推理等级,然后保存。
  3. 某个项目需要不同配置时,切换到“工作区独立配置”。
  4. 选择目标工作区和预设;模型可以跟随全局,也可以绑定工作区专属模型。
  5. 新建会话或切换到该工作区的空白会话,插件会自动应用对应配置。

“恢复跟随全局”会删除当前工作区的独立规则,不会修改全局配置。

配置优先级

工作区独立配置
    ↓ 未显式配置的字段继续继承
插件全局默认配置
    ↓
DSH 原有默认配置

Agent 预设与模型分别继承。例如,可以让某个工作区始终使用 standard-codex,同时让模型继续跟随全局选择。

工作原理

  • Host 插件注册 workspace-defaults 设置结构,并阻止会话内临时模型选择覆盖已保存的全局默认值。
  • Web 客户端通过原生 settings.section 注册设置页面。
  • 创建工作区会话前,插件会把匹配到的 Agent 预设注入 session.create。
  • DSH 复用工作区空白会话时,插件会在打开会话前同步预设与模型。
  • 全部规则复用 DSH 原有设置系统;插件不会创建独立数据库或凭据文件。

| 设置命名空间 | 保存内容 | | --- | --- | | agent-presets | 全局 Agent 预设 | | agent-default-model | 全局提供方、模型与推理等级 | | workspace-defaults | 各工作区的独立规则 |

兼容性

本插件支持标准版 DeepSeek Harness(DSH),当前已在以下环境验证:

  • @deepseek-ai/dsh 0.1.1-rc.2 与 0.1.2-rc.1
  • 标准 Web Profile
  • npm 安装与本地 link: bundle

插件通过 DSH 的 Settings、Remote 和模型选择服务工作。升级 DSH 后,请重新在 Web Profile 中执行 pnpm install,并确认设置项仍能正常加载。

安全

  • 不读取或存储模型 API Key
  • 不向外部服务发送网络请求
  • 只使用 DSH 自身的设置、会话、工作区、预设和模型选择接口

开发验证

node --check index.js
node --check lib/client.js
npm test
npm pack --dry-run

许可证

MIT

欢迎通过 Issues 反馈问题或建议。