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-presets-hidden

v0.2.4

Published

UI-only agent preset visibility and ordering controls for DeepSeek Harness

Readme

dsh-presets-hidden

English README

DeepSeek Harness 的浏览器端预设显示与排序插件。它在“设置 -> 预设显示”中提供搜索、显隐筛选、逐项开关和顺序调整,并用处理后的名单替换新会话页的 Agent 预设选择器。

兼容性:0.2.x 需要 deepseek-harness 0.1.7-rc.1 及以上(engines.dsh: >=0.1.7-rc.1)。DSH 0.1.5 及更早版本请使用本插件 0.1.x。

0.2.1 起同时适配 0.1.7-rc.2:该版本移除了 Host 侧的“新任务可选择模式”策略字段,预设选择只由“开发者工具”控制。插件把缺失的策略字段视为“允许选择”,因此不会误报选择器已关闭。

0.2.2 起 peerDependencies 覆盖 0.1.7-rc.1 与 0.2.0-rc.1 两代,因此 DSH 0.2.0-rc.x 不再把本插件判为不兼容(此前 0.2.1 及更早版本的 peer 范围是 ^0.1.7-rc.1,在 0.2 线上会被 DSH 的插件兼容性门禁拒绝安装 / 跳过加载)。0.2 线的验证覆盖:真实安装门禁、构建与全部单元测试。

0.2.3 起跟进上游对 Coding Tools 的语义变更(issue #2)。DSH 0.2.1-alpha.1 起,developerTools.enabled 不再是「关掉就整只预设控件消失」的总开关,而是「关闭时只隐藏内置 PTC / Minimal」的 Coding Tools 开关。插件现在按同一规则处理:关闭时 PTC / Minimal 不进选择器、不可切换,控件本身保持显示。旧版 DSH(≤ 0.2.0-rc.2)上官方控件关闭时仍会整体隐藏,而本插件保留控件——这是有意的行为分歧,见「行为边界」。

0.2.4 起同时适配 cordis 4.2 线(DSH 0.2.3-alpha.2 及更新版本,issue #3)。cordis 4.2.0-alpha.1 移除了实例属性 ctx.root,改为符号键 ctx[Context.root],读取旧字段会抛 cannot get property "root" without inject;因此此前版本里“等 Loader 装配完成再导入遗留设置”这一步在 alpha 线上会被宿主静默吞掉,settings.yaml.imported 中的显隐名单永远不会导入。现在插件按两种载体读取根上下文(4.0/4.1 的 ctx.root 与 4.2 的 Symbol.for('cordis.root')),两种都读不到时只记一条警告、不猜,peerDependencies 也覆盖 cordis ~4.2.0-alpha.1。alpha 线的验证覆盖:隔离宿主真实安装与启动、遗留导入确实写进 profile、完整单元测试与 tsc。

行为边界

  • 内置预设和自定义预设都可以隐藏和调整顺序。
  • 在 loopback 页面上,显隐名单与排序作为插件 Config 的 volatile 字段写入当前 profile 的 cordis.patch.yml(条目 id preset-visibility),修改即时生效且按 profile 独立保存;非 loopback 页面仍使用当前浏览器的 localStorage,键名为 dsh.presets-hidden.visibility.v1。
  • 旧数据自动迁移(仅在 profile 尚未保存这两个字段时进行一次):DSH 0.1.7 把 $DSH_HOME/settings.yaml 重命名为 settings.yaml.imported 后,插件会把其中的 preset-visibility 段导入当前 profile;旧版 localStorage 数据也会在首次打开 loopback 页面时迁移。
  • 与官方选择器一致(Coding Tools 语义):Coding Tools(旧名「开发者工具」)关闭时,只隐藏内置的 PTC 与 Minimal——它们不出现在新会话选择器中,也不会被切换选中;Standard、Creator 与自定义预设照常可选,控件本身保持显示。设置页会给这两个预设标注「需要 Coding Tools」。Host 仍发布“新任务可选择模式”策略并将其关闭时,整个控件(以及设置页提示)按旧策略处理:不显示控件,使用 Host 默认预设。DSH 0.1.7-rc.2 起 Host 不再发布该策略字段。
  • 旧版 DSH 上的有意分歧:0.2.1-alpha.1 之前的 DSH(含 0.2.0-rc.2)把 Coding Tools 当作总开关,关闭时官方控件整体隐藏;本插件 0.2.3 起统一按新语义保留控件,只排除 PTC / Minimal。
  • 上移和下移针对完整名单;搜索或显隐筛选生效时,排序按钮会禁用,避免跨越不可见项产生歧义。
  • 新出现的自定义预设自动追加到现有顺序末尾;“恢复默认顺序”回到 Host roster 顺序。
  • 只处理新会话页的预设选择器;官方“Agent 预设”管理页、会话标题、旧会话恢复、直接 API 调用和插件诊断仍使用完整名单。
  • 隐藏当前空白会话所选预设时,插件会通过官方选择 API 切换到首个可见预设。
  • 隐藏全部预设时,新会话页不显示预设控件,Host 默认预设仍然生效。

安装

发布到 npm 后,可通过 DSH 插件机制直接安装:

dsh plugin --profile web add dsh-presets-hidden

开发

构建并测试:

pnpm install
pnpm run check

若希望使用本机 DSH 源码 checkout 进行开发,可在 .npmrc 或 package.json 的 pnpm.overrides 中把相关 @deepseek-ai/* 依赖指向本地路径,替代默认的 registry 版本。

devDependencies 固定在支持的下限(0.1.7-rc.1 线,cordis 4.0.4),用来守住向后兼容。要校验更新的 dsh / cordis 线(例如 0.2.3-alpha.2 + cordis 4.2),在仓库外的临时副本里把 @deepseek-ai/* devDependencies 钉到目标版本再跑 pnpm install && npx tsc --noEmit && npx vitest run,不要改本仓库的 devDependencies。Host 半刻意不 import { Context }:cordis 由运行中的 dsh 提供,插件包自己再引一份可能解析到另一个副本,所以根上下文按两种载体读取——cordis 4.0/4.1 的 ctx.root 字段与 4.2 的 Symbol.for('cordis.root')(见 src/root.ts)。

安装到 Web profile(本地 bundle)

先构建,再将当前目录作为本地 bundle 安装:

pnpm run build
dsh plugin --profile web add /Users/baihaoran/Code/github.com/tkliuxing/dsh-presets-hidden

从 DSH 源码 checkout 使用 CLI 时,将第二条命令改为:

pnpm dsh plugin --profile web add /Users/baihaoran/Code/github.com/tkliuxing/dsh-presets-hidden

发布

  • CI:.github/workflows/ci.yml 会在 push/PR 时执行 pnpm run check。
  • Release:在 GitHub 上发布 Release 后,.github/workflows/release.yml 会自动构建、测试并发布到 npm(带 provenance)。npm 侧已配置 Trusted Publisher,GitHub 侧无需设置 NPM_TOKEN,但 workflow 必须使用 npm-publish environment 并开启 id-token: write 权限。

插件包声明了 dsh.bundle 和 dsh.client。Host 入口导出带 volatile 字段的 Config,DSH 的 settings 服务据此提供 preset-visibility 表单(插件页的自动表单已关闭,编辑入口在“设置 → 预设显示”)。