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

@dijkspicy/lazy-dsh

v0.5.1

Published

Installer for the lazy-dsh (懒人模式) dsh agent preset: six named-role subagent tools with fixed model routes, a model-routing skill, and the always-on 躺主 orchestrator persona.

Readme

@dijkspicy/lazy-dsh

懒人模式 dsh agent preset 的安装器:主 Agent 常驻「躺主」orchestrator 职责书(只规划、委派、整合、验证,不亲自硬扛);六个具名角色子代理工具(oracle / librarian / explorer / observer / designer / fixer)各自绑定固定模型路由(选角色即选路由),通用 subagent 与 subagent_fork 沿用父路由(fork 复用 KV Cache),workflow 脚本可按阶段用 provider/model 独立覆盖;preset 自带 model-routing skill 说明整套路由策略。

安装

npm i -g @dijkspicy/lazy-dsh && dldsh install
# 或一次性执行:
npx @dijkspicy/lazy-dsh install

已手工建过同名 preset(<dsh-home>/.agent-presets/lazy-dsh)且内容与包内 payload 完全一致的机器,install 会自动 adopt(原地写入管理标记,不重装、不改内容)。

环境要求

  • Node.js >= 20;本包零运行时依赖。
  • 目标机必须是 dsh 安装,且其 settings.yaml 声明了 provider huawei-free(llm-pi-ai)以及下表中的 model id —— 否则子代理 spawn 会在预检阶段失败。
  • 生效条件:preset 在新会话创建时采样,改路由只对新会话生效;preset 的选择是手动且用户自有的 —— dsh web 端的 preset 选择器,或 dsh-tui 里执行 /preset lazy-dsh。前端解析优先级(profile patch dsh-tui.config.preset > dsh-tui 持久化的 /preset 选择 > roster 默认 standard)是前端自身的行为,lazy-dsh 不写入、不管理任何选择配置。

命令

| 命令 | 说明 | |---|---| | dldsh install | 安装/更新到 <dsh-home>/.agent-presets/lazy-dsh;未装 → installed;已装且版本一致 → up-to-date;版本不同 → 原子换新 updated;无标记但内容与 payload 逐字节一致 → adopted | | dldsh install --force | 冲突(外来管理标记 / 无标记但内容分叉)时照常安装;备份是所有改写步骤的默认行为,--force 只决定是否越过冲突 | | dldsh uninstall(别名 remove) | 只删目录:删除本工具管理的 preset 目录(删除前整体备份到 <target>.bak-<ts>);不触碰任何 preset 选择配置(用户自有);幂等(目录未装时输出 not installed) | | dldsh uninstall --force | 目录冲突(外来管理标记 / 无标记)时也照删;删除前同样备份到 <target>.bak-<ts> | | dldsh status | 报告 payload 版本、安装状态与标记版本、内容是否与 payload 一致、用户自有的 preset 选择配置(dsh-tui profile patch、settings.yaml agent-presets.default,只读报告、绝不改写),以及 6 个角色解析后的实际路由 | | dldsh config --init | 在 <dsh-home>/lazy-dsh.json 生成一份起始路由配置(含 6 个角色的默认 provider/model);已存在则拒绝,--force 覆盖 | | dldsh verify | 对包内 payload 做完整性校验(等价 npm run verify) |

--dsh-home <path> 覆盖目标根目录;优先级 --dsh-home > $DSH_HOME > ~/.dsh。退出码:0 成功或无操作,1 冲突或错误。

角色工具 → 模型路由(默认值,可外置覆盖)

下表是内置默认路由。每个角色的实际路由在新会话采样时由 preset 内的 route.cjs 从外置配置 <dsh-home>/lazy-dsh.json(可用 $LAZY_DSH_CONFIG 改路径)解析并 merge 到默认值之上——见下一节「自定义模型路由」。无配置文件时行为与下表完全一致。

| 工具 | 路由 (provider/model) | 用途 | 工具面 | |---|---|---|---| | oracle | huawei-free / deepseek-v4-pro | 架构决策、方案权衡、疑难调试、代码审查 | 只读:禁 write/edit/shell 与全部委派工具 | | librarian | huawei-free / qwen3.8-flash | 外部文档检索、库调研、web 查询 | 只读:禁 write/edit/shell 与全部委派工具,保留 web/search | | explorer | huawei-free / qwen3.8-flash | 快速代码侦察,返回文件路径+摘要 | 只读:禁 write/edit/shell 与全部委派工具 | | observer | huawei-free / qwen3.8-flash | 图像/PDF/截图的视觉分析 | 只读:禁 write/edit/shell 与全部委派工具 | | designer | huawei-free / glm-5.3-flash | UI/UX 实现、视觉打磨、样式/响应式/交互 | 完整 | | fixer | huawei-free / glm-5.3 | 范围明确的实现、构建/lint/测试修复 | 完整 |

只读角色(oracle/librarian/explorer/observer)的 deny 覆盖 write/edit、平台启用的 shell(linux 为 bash,win32 为 pwsh)与全部启用中的委派工具(subagent/subagent_fork/六角色/workflow/ralph)——deny 不会传播进再下一层子代理,因此只读子代理不能再 spawn,也无法借通用 subagent 洗出写文件/跑 shell 的能力;send_message/list_agents/job_*/todo_write 保留。designer/fixer 不设 filter。

通用 subagent 与 subagent_fork 不暴露路由参数,子代理沿用父路由;批量任务按阶段换模型用 workflow 的 agent(prompt, { provider, model })。

自定义模型路由

角色→模型映射不再写死在 preset 里:agent.cordis.yml 的每个角色行用 !!js 调用随包安装的 route.cjs,在新会话采样时读取外置 JSON 配置,merge 到内置默认之上。改配置后对新会话生效(无需重装、无需重启 host,但已运行的会话不变)。

  • 路径:<dsh-home>/lazy-dsh.json;环境变量 LAZY_DSH_CONFIG 可指定其它路径(优先级最高)。
  • 脚手架:dldsh config --init 生成一份起始配置(已存在则拒绝,加 --force 覆盖)。
  • 查看实际解析结果:dldsh status 会打印每个角色解析后的 provider/model(及 effort/maxTokens)。
  • 格式(参考 oh-my-opencode-slim.json 的信封结构):
{
  "$schema": "https://unpkg.com/@dijkspicy/lazy-dsh@latest/lazy-dsh.schema.json",
  "preset": "huawei-free",
  "presets": {
    "huawei-free": {
      "oracle":    { "model": "huawei-free/deepseek-v4-pro", "effort": "max" },
      "librarian": { "model": "huawei-free/qwen3.8-flash" },
      "explorer":  { "model": "huawei-free/qwen3.8-flash" },
      "observer":  { "model": "huawei-free/qwen3.8-flash" },
      "designer":  { "model": "huawei-free/glm-5.3-flash" },
      "fixer":     { "model": "huawei-free/glm-5.3" }
    }
  }
}
  • 每个角色可用字段(对应 dsh agentOptions 的全部可选项):
    • model:"provider/model"(按第一个 / 拆分),或裸 model id(此时 provider 取 provider 字段或默认)。
    • provider:当 model 为裸 id 时单独指定 provider。
    • effort:映射到 agentOptions.reasoningEffort(取值由 adapter 决定,如 deepseek 系 off/low/high/max;none 表示不带该参数)。在调用时由 dsh 对实时 LLM 校验,非法值会让该次委派失败(不影响挂载)。
    • maxTokens:正整数。
  • 安全保证:route.cjs 永不抛错——配置缺失/不可读/JSON 损坏/字段非法/未知角色,一律回落到内置默认路由。这点很关键:!!js 求值若抛错会导致整个 preset 挂载失败、会话丢失全部委派工具。
  • 不在本配置范围内:orchestrator(主 Agent)模型由 host 层的 settings.yaml: agent-default-model 决定,preset 管不到;temperature/skills/mcps 不属于 agentOptions(需要完整插件,未实现)。
  • 配置随外置文件存在,preset payload 对所有用户逐字节一致,因此不影响 install/status 的内容比对,也不会造成安装漂移。

卸载

uninstall(remove 是它的完全别名,行为与参数一致)只删目录:删除 <dsh-home>/.agent-presets/lazy-dsh(仅限本工具管理的目录),删除前整体备份到同级 <target>.bak-<ts>(rename 转移,原子且可还原);目录未装时输出 not installed 并成功退出(幂等)。外来管理标记 / 无标记的目录会拒绝并说明原因,--force 仅决定是否越过冲突照删(备份照做)。

preset 选择配置(dsh-tui 的 profile patch、settings.yaml 的 agent-presets.default、dsh-tui 持久化的 /preset 选择)是用户自有的:lazy-dsh 从不写入或改写它们,安装时不写,卸载时也不动。卸载后目录已删而选择仍指向 lazy-dsh 时,新会话按前端自身的 agent-preset/not-found 处理退化——要恢复选择,在 dsh web 端重选,或在 dsh-tui 里执行 /preset lazy-dsh(重装 dldsh install 装回目录后同样如此)。

注意事项

  • 调整路由一律走外置配置 <dsh-home>/lazy-dsh.json(见上一节「自定义模型路由」),改完对新会话热生效。不要手改安装后的 agent.cordis.yml(各角色行的 agentOptions)来找路由:那会使安装目录与 payload 分叉,之后 dldsh install 的版本更新会报 conflict,只能 --force 重装(旧目录备份到 <target>.bak-<ts>)再手工回填改动——把这条当告诫,不是可选路径。
  • 本工具绝不触碰其它工具管理的 preset 目录(带外来管理标记的目录)与内容不一致的无标记目录,除非显式 --force。
  • uninstall / remove 只删本工具管理的目录;无标记或外来标记的目录会拒绝并说明原因。
  • 每个会改写/删除既有文件的操作都会先把原文件备份到同级 <path>.bak-<ts>:install 版本更新时保留旧目录、uninstall 删目录前转为备份。纯新增/无操作(全新安装、up-to-date、adopted 仅写标记)不产生备份。备份名带 . 与大写时间戳,不符合 dsh 的 preset 目录 id 规则(^[a-z0-9][a-z0-9-]*$),因此不会被名册误当作 preset。备份会随多次安装/卸载累积,需自行清理。