DSH Hub

omdsh-dev/dsh-toolkit

dsh-toolkit

BundleWorkflow28 GitHub stars· updated 2026-09-10

dsh-toolkit is a community DeepSeek Harness plugin. Read the repository README before installing.

Install

npx @deepseek-ai/dsh plugin --profile <p> add <子包>`);collection

Restart `dsh web` after install. Bundle APIs can change during the developer preview.

README badge

dsh-toolkit DSH Hub badge
[![DSH Hub](https://dshhub.dev/badge/dsh-toolkit.svg)](https://dshhub.dev/plugins/dsh-toolkit)

Paste this into your README. The star count updates with every catalog sync.

From the README

Excerpt from omdsh-dev/dsh-toolkit, cleaned of badges and images.

🧰 dsh-toolkit

English

DSH 零依赖工具包 collection —— time / encoding / json / calculator / csv / regex / markdown / diff / stat / schema 十个确定性工具,统一入口一键安装。

为什么

DSH 生态仓库持续增长,单插件在 hub 中容易被淹没;collection 分类是辨识度最高的形态。本仓库把 10 个工具插件 vendored 冻结为 pack artifact 快照(各子仓库独立演进,当前源位于 omdsh-dev 组织下),统一工程、统一测试、统一维护。

定位(官方 Profile Bundle 生态方向):本仓库是 collection 与安装辅助仓库——每个子包都是可独立安装/启用/禁用/卸载的 bundle(dsh plugin --profile <p> add <子包>);collection 提供目录、清单与批量安装脚本。meta 包 @deepseek-ai/dsh-toolkit 保留为可选的原子挂载模型(见下文两种运行模型)。

分发边界:根 meta 包保持 private: true,用于 Git/collection 分发,不代表会发布到 npm registry。根目录已提交由当前 src 构建出的 lib/index.js 与 lib/types/index.d.ts,因此从 Git 安装时不依赖消费端 lifecycle;prepack 仍会在生成 pack artifact 前执行完整构建。

工具一览

工具能力用例数
timeISO 8601 / 时区 / 日历运算 / 时长差65
encodingbase64 / url / hex / hash / UUID46
jsonJMESPath 子集查询66
calculator安全数学表达式求值(无 eval)31
csvRFC 4180 解析 / 查询 / 统计(严格引号)50
regex测试 / 提取 / 替换 / 静态解释(worker 硬超时)63
markdownHTML↔Markdown / GFM 表格 / 目录生成(白名单安全)71
diff文本/JSON/CSV/Markdown 结构化比较与 unified diff(只读)124
stat描述统计 / 百分位数 / 频数分布 / 相关性(零依赖确定性)82
schemaJSON Schema 验证 / 路径 / 解释 / 安全 default(零网络零动态)125
合计723

架构

dsh-toolkit/
├── src/index.ts          # meta 包:相对路径动态导入 10 个子包 apply(),聚合注册
├── packages/dsh-tool-*   # vendored 子包(pack artifact 快照,name 保持 @deepseek-ai/dsh-tool-*)
├── scripts/
│   ├── link-deps.sh      # 构建期 junction(cordis → vendor/cordis,dsh-tools → packages/core/tools)
│   ├── build-all.sh      # 一键构建 10 子包 + meta 包(tsc)
│   ├── test-all.sh       # 一键跑 10 子包 vitest(合计用例数)
│   ├── install.sh        # meta / 逐包两种挂载模式(含 dry-run)
│   ├── install-web.sh    # 独立 bundle 批量安装 → web profile
│   ├── install-headless.sh # 独立 bundle 批量安装 → headless profile
│   └── install-all.sh    # web + headless 都装
├── catalog.json          # collection 清单(hub collection 分类识别依据)
└── tsconfig.base.json    # 共享编译配置(固化踩坑经验)

与实施文档方案 A 的工程化适配:子包为私有 Git/collection 包,peer 名解析在 profile 内不可行, 故 meta 包采用相对路径动态导入(零解析魔法、打包自足);子包 runtime 依赖 (@deepseek-ai/dsh-tools)在 npm 独立模式(默认)下不依赖 DSH monorepo,monorepo 模式经子包构建期 junction 解析。

安装

仓库位于 omdsh-dev/dsh-toolkit(public)。

独立 bundle 模型(推荐)

每个子包独立安装、启用、禁用、卸载:

# 安装单个工具到 web profile
dsh plugin --profile web add github:omdsh-dev/dsh-tool-csv
# 一次性任务(headless)profile
dsh plugin --profile headless add github:omdsh-dev/dsh-tool-diff

批量安装(collection 辅助脚本,幂等——重复执行不会重复添加):

./scripts/install-web.sh       # 全部 10 工具 → web profile
./scripts/install-headless.sh  # 全部 10 工具 → headless profile(dsh run 使用面)
./scripts/install-all.sh       # 两个 profile 都装

验证与运行:

dsh --profile web --dump-config | grep tool-csv     # 行存在即安装成功
dsh run "使用 csv 工具解析 'a,b\n1,2'"               # headless 端到端

⚠️ web 与 headless 是不同 profile:web 安装不会自动覆盖 headless;dsh run 默认使用 headless。 Windows 路径使用正斜杠(C:/...)。

npm pack tarball 安装

本地构建后用 tarball 路径安装(不依赖 GitHub):

# tarball 方式(web 为例;headless 同)
npm pack
dsh plugin --profile web add <npm pack 产物 tarball 路径>

meta bundle 模型(可选)

需要一次原子挂载全部工具时,挂载根 meta 包:

dsh plugin --profile web add github:omdsh-dev/dsh-toolkit
dsh --profile web --dump-config | grep tool-kit

…

Related plugins