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-pth-interface

v0.5.1

Published

dsh (DeepSeek Harness) interface-mode plugin for PTH: exposes only pth_* management tools + a usage manual — the agent becomes a pure frontend of a PTH task-pool system

Readme

dsh-pth-interface

English

dsh(DeepSeek Harness)interface 模式插件:让 agent 只持有 pth_* 管理工具 + 内置使用手册——无 shell、无文件系统、无网络、无子代理——纯充当 PTH 任务池管理系统的前端操作员。

功能

  • 注册 10 个模型面工具(走 PTH HTTP API): pth_submit / pth_status / pth_tasks / pth_cancel / pth_transcript / pth_kernel_status / pth_worker_activity / pth_worker_context / pth_roles
  • systemPrompt 注入精简版「PTH 使用手册」(世界观 / 标签路由 / 结果契约 / 排查配方)。
  • 附带现成 profile 模板,逐行禁用其他全部模型面工具(tool-bashtool-fstool-subagent 等),组合出的 agent 严格只有 interface 能力。

前置条件

  • dsh CLI(npx dsh 或已安装的 dsh)
  • 可达的 PTH kernel API(默认 http://localhost:3000)与 bearer token

安装

npm install -g dsh-pth-interface

# headless 形态(一次性自动化)→ ~/.dsh/profiles/pth
dsh-pth-interface install --variant headless --name pth

# web UI 形态(交互式)→ ~/.dsh/profiles/pth-web
dsh-pth-interface install --variant web --name pth-web

形态三:agent preset(web UI 模式选择器)

除独立 profile 外,本包还附带两个 dsh agent preset——装好后直接出现在 web UI 的模式选择器里,与 极简/标准/创造 同级:

  • PTH Interface——任务与观测面(9 个 pth_* HTTP 工具,无本机能力,不阻塞交互)
  • PTH Ops(运维)——生命周期面(pth_ops 白名单:容器栈/更新/构建/日志/体检/工具容器 + 只读观测)。需要在 ~/.dsh/.agent-presets/pth-ops/agent.cordis.yml 配置 repoDir(pth 仓库路径)。
dsh-pth-interface install --variant preset

它把一个零外部依赖的自包含 preset 拷入 ~/.dsh/.agent-presets/pth-interface/。发现是实时的(每次调用重扫根目录),无需重启——打开 web UI 新建会话时选择「PTH Interface」即可。

使用

export PTH_TOKEN=<你的 pth token>

# headless 一次性执行
dsh --profile pth "给 developer 发个任务计算 21*2,把 taskId 给我"

# web UI
dsh --profile pth-web

验证组合树(所有非 pth 工具行应为 disabled: true):

dsh --dump-config --profile pth

配置

编辑 ~/.dsh/profiles/<name>/cordis.patch.ymlpth-interface 行:

| 键 | 默认 | 含义 | |---|---|---| | baseUrl | http://localhost:3000 | PTH kernel API 地址 | | tokenEnv | PTH_TOKEN | 存放 token 的环境变量名 | | token | "" | 配置里直接写 token(明文落盘,优先级低于环境变量——仅本地单用户场景;web UI 形态下 dsh 进程不继承你的 shell 环境变量,用它最方便) | | requestTimeoutMs | 15000 | 单次 HTTP 请求超时 |

设计决策

  • 为什么是插件而不是 skill:skill 只有指令没有工具面——既不能注册工具也不能禁用内建工具;interface 模式两者都要,所以是 cordis 插件 + profile 补丁层。
  • 无阻塞等待:刻意不提供 wait 工具——interface 模式绝不在运行中的任务上阻塞交互。提交即返回;之后操作员询问时再用 pth_status / pth_tasks 按需查询。
  • 失败降级:所有工具失败返回 { ok:false, error:{...} } 而不抛错,模型可据此自行修复调用。
  • 保留 user-questions:操作员与 agent 的对话通道(patch 文件注释里有关闭方法)。

License

MIT