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-exec-extension

v0.1.3

Published

Official-pattern dsh bundle: replace headless-startup with per-invocation CLI flags without writing settings

Downloads

191

Readme

dsh-exec-extension

npm · English

DeepSeek Harness bundle,一次性 exec,形状与官方 surface 插件相同(dsh.bundle.patch + parseCmdline + commander)。官方 headless-startup 只声明 [task...];本包禁用该行并插入仍提供 headlessStartup.task 的实现,不改 headless-runner。

CLI 对齐 OpenCode run 与 Pi -p:stdin 拼进 prompt,@file / -f 附文件,--format json 打 session 事件流,--dir 设 cwd,--yolo 跳过审批询问(不关闭 sandbox,不是全开权限)。模型覆盖只在进程内(Rust WASM),不写 settings.yaml。

安装

dsh plugin --profile exec add @deepseek-ai/dsh-headless@$(npm view @deepseek-ai/dsh version)
dsh plugin --profile exec add dsh-exec-extension
dsh --profile exec --help

跟随 dsh CLI 的 npm latest 通道(官方默认:npx @deepseek-ai/dsh / npm install --global @deepseek-ai/dsh)。除非你装的是 dsh@next,否则不要用 @next。@deepseek-ai/dsh-headless 自己的 latest 标签是过期 rc,所以第一行取 CLI 的 latest 版本,而不是 headless 自己的 latest。dsh-exec-extension 走本包 latest。只有需要快照时才用 @<version> 冻结。npm 安装不必放行 prepare。

Git 备选:dsh plugin --profile exec add github:LvDAO/dsh-exec-extension

只用独立 profile。官方 headless --model 必须仍因未知选项失败。

命令行

dsh --profile exec [options] [--] [task|-]
cat README.md | dsh --profile exec "summarize this"
dsh --profile exec @notes.md --full-auto "use the notes"

| 旗标 | 含义 | |------|------| | -m, --model | 本进程模型(不进入 task) | | --effort, --reasoning-effort | off\|high\|max | | --thinking | Pi 档位;xhigh/max → max,minimal/low/medium/high → high | | --provider | 本进程 provider | | -C, --cwd / --cd / --dir | 工作目录(发布到 headlessStartup.cwd) | | --timeout <seconds> | N 秒后 appExit(1) | | -s, --sandbox / --permission-mode | read-only | workspace-write | danger-full-access | | --approval ask\|never\|allow | ask 无 UI 则 fail-closed;never 自动拒绝;allow 自动批准 | | --full-auto | workspace-write + auto-allow(CI) | | --yolo / --dangerously-skip-permissions | 跳过审批询问(auto-allow)。不设 danger-full-access;默认 sandbox 仍是 workspace-write。全开权限请用 --sandbox danger-full-access | | --tools-mode native\|code\|both | 工具呈现 | | -f, --file / @path | 把文件正文附进 task | | --output-schema <path> | prompt 约束 JSON Schema,不是解码期强制 | | -o, --output-last-message <path> | 同时把最终 assistant 文本写入文件 | | --format text\|json / --mode json | json 为 session 事件 JSONL | | -c, --config key=value | 可重复的本进程覆盖 | | --env KEY=VALUE / --api-key | 只改进程环境变量,不写盘 | | --print-selection | 打印 overlay 后的 selection JSON 并退出 |

未知旗标报错。Overlay 从不调用 saveSelection()。

--output-schema 只是 prompt 约束,不是解码期强制。--approval allow 与 --yolo 会装本进程 auto-grant:dsh 的 never 是自动拒绝,headless 又没有审批 UI。--yolo 不会改成 danger-full-access;要全开请用 --sandbox danger-full-access。

headlessStartup 为 { task, cwd, permissionMode, approvalPolicy, autoApprove, toolsMode?, format }。sandbox-policy / approval / tools 通过 !!js ctx.headlessStartup.* 注入。官方 headless-runner 仍只读 task。

非目标

MCP、Host、HTTP、resume、--image、分叉 headless-runner。MCP 放 profile 静态 patch + 进程 env。

npm test
DSH_BIN=/path/to/dsh npm run acceptance