DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-ops-mac

S

dsh-ops-mac

Discovered★ 3

macOS (Apple Silicon) port of dsh-ops — Rust-powered file tools & PTC batching for DeepSeek Harness. Ported from T-Auto/dsh-ops.

dsh-ops-mac

origin Powered by DeepSeek Powered by GLM

⚠️ 本项目已停止移植 / 不再维护

上游 T-Auto/dsh-ops 自 v0.3.1(2026-10-16) 起已原生支持 macOS Apple Silicon(darwin-arm64),并在 v0.4.x 中持续维护与修复。因此本移植项目不再继续移植,也不再跟进上游更新。

请直接使用上游版本:https://github.com/T-Auto/dsh-ops。从 npm 安装 dsh-ops(最新 0.4.1)即可,安装方式见上游 README。本仓库仅作为历史记录保留。

(历史)macOS(Apple Silicon)移植版的 dsh-ops —— 一个 DSH(DeepSeek Harness)性能工具插件:用 Rust 重写文件检索与批处理工具,减少 AI 编码时的 token 消耗、报错循环和任务耗时。

改造来源声明(历史):本项目基于 T-Auto/dsh-ops(v0.3.0,commit e6160ba)移植到 macOS arm64,属于上游尚未支持 macOS 时期的临时方案。上游插件当时面向 Windows x64 设计;本移植版保留其核心(原生 Rust 文件工具 + PTC 批处理),移除了 Windows 专属部分。上游的 CHANGELOG 与载荷来源记录保留在 CHANGELOG.md、PROVENANCE.md。移植改动清单见下方「移植了什么」。上游现已原生支持 macOS,本仓库不再维护。


这是什么

DSH 标准模式下,插件发布 4 个高性能文件工具(schema 直接进模型上下文);PTC(Persistent Tool Context)会话下,额外发布 2 个批处理/结果引用工具(通过 run_code 以代码方式调用,不占用模型工具 schema,批量任务零往返)。

工具用途模式
ops_inspect_local_file有界 UTF-8 文本 / hex 读取标准
ops_grepRust 正则搜索,多文件过滤,count/summary 模式标准
ops_glob多模式 glob 找路径,支持排除标准
ops_replace跨文件字面批量替换,dryRun 预检 + 原子写入标准
ops_batch预检并执行 copy/move/remove,带审计与恢复仅 PTC
ops_result有界结果引用:写入、分页、释放仅 PTC

所有工具遵循 DSH 会话沙箱策略(read-only / workspace-write / danger-full-access),路径以会话 cwd 为基准,UTF-8 优先,不遍历符号链接 / .git / 隐藏文件。工具失败以值返回(status: "error" | "rejected" + error.code),不抛异常。

安装(已弃用,请改用上游)

本节仅为历史记录。上游已原生支持 macOS,请勿再安装本移植版;请安装上游 dsh-ops(npm 包名 dsh-ops,最新 0.4.1)。

前置条件:macOS(Apple Silicon)、Node.js ^22.19 || >=24、已初始化的 DSH 桌面应用(0.2.0-rc.2)。

# 1. 本目录放入任意位置(例如 ~/dsh-ops-mac)
# 2. 用桌面应用自带 CLI 以 link 方式装入 profile:
"/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh" \
  plugin --profile desktop add /path/to/dsh-ops-mac

# 3. 完全退出并重启 DSH 桌面应用,开新会话即可

验证:新会话里问模型「列出以 ops_ 开头的工具」。标准会话应看到 4 个文件工具;PTC 会话里 run_code 的 tools.* 绑定中应有 6 个(ops_batch、ops_result 仅在此出现)。

卸载:

"/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh" \
  plugin --profile desktop remove dsh-ops

从源码重建 worker

runtime/darwin-arm64/dsh-ops-worker 是预编译产物(附 sha256 receipt,运行时校验,不匹配拒绝加载)。自己编译:

# 需要 Rust 1.88+(rustup)
cd native && cargo build --release
# 产物在 native/target/release/dsh-ops-worker
# 复制到 runtime/darwin-arm64/,并同步更新 provenance.json 的 sha256 与 version

移植了什么(相对上游的改动)

上游是 Windows x64 专用(os: win32, cpu: x64,随包携带 MSYS bash 5.3.15、PowerShell 7.6.6、FastCtx 二进制,约 718 MB)。本移植版:

保留并适配:

  • dsh-ops/file 组件 —— Rust 原生文件工具,worker 为 darwin-arm64 重新编译(纯 Rust、unsafe_code = "forbid"、零 C++ 依赖)
  • dsh-ops/ptc 组件 —— 已在真实 DSH 桌面端(Seatbelt 沙箱)端到端验证

移除(Windows 专属):

  • dsh-ops/shell 组件 —— 随包 MSYS bash / PowerShell 7 及其 IPC 代理(msys-2.0.dll 补丁、命名管道)在 macOS 上无意义:DSH 的 macOS 会话本身就运行 bash,并有宿主自己的 Seatbelt 沙箱
  • dsh-ops/background 组件 —— FastCtx 后台任务托管(未携带 darwin 二进制;且新版 DSH 宿主已内置后台任务工具)
  • Windows 工作区 ACL 准备(prepare-workspace.ps1)—— 上游代码本身有 win32 门控,本移植版连同其组件一起裁掉
  • vendor/fastctx/ 上游源码树 —— 不随本仓库分发,见上游 PROVENANCE.md

macOS 专属修复:

  • /tmp → /private/tmp、/var → /private/var 符号链接:Rust worker 逐组件 no-follow 打开路径,符号链接祖先会被 POLICY_DENIED 拒绝。移植版在 JS 桥(lib/file/worker.js、lib/ptc/worker.js 的 darwinRealPath())把路径规范化到真实路径,不存在的尾部(新文件)也正确处理
  • 平台门控放开:lib/ptc/runtime.js 的 PLATFORMS、package.json 的 os/cpu、dsh-plugin.json 的平台声明

已知保留的上游行为(与上游 0.3.0 一致,移植时未改动):

  • 读类工具(ops_inspect_local_file / ops_grep / ops_glob)不校验工作区边界,可读取 OS 可读的任意路径。上游维护者在 issue #34 将其定义为预期行为(「workspace-write 并非读范围围栏」);写入边界是完整的。介意的话可在 lib/file/worker.js 的读路径补上 inside() 包含性检查(该文件里已有现成的辅助函数)。

与上游默认值的一个差异:PTC 默认开启

上游 0.3.0 的 dsh-ops/ptc 组件默认关闭(disabled: true),因为它是 Windows 上的新功能、验证未铺开。本移植版将其默认开启(cordis.patch.yml 中 disabled: false):移植者已在 macOS 桌面端完成 PTC 全链路验证——run_code 内调用 ops_batch / ops_result / 文件工具均正常,Seatbelt 沙箱探测通过,批处理写入边界(工作区外拒绝)有效。

若你只想要文件工具、不需要批处理,把 cordis.patch.yml 里 dsh-ops-ptc 的 disabled 改回 true 即可。注意两点:

  • ops_batch / ops_result 仅在 PTC-only 会话中发布(DSH 的呈现机制,不是插件开关);标准会话里它们自动隐藏
  • PTC 会话里所有 ops_ 工具(含文件工具)都通过 run_code 的 tools.* 绑定调用,模型看不到它们的 schema——这是省 token 的机制,不是故障

文档

上游的完整文档保留在 docs/(中文为主:使用指南、组件参考、配置参考、常见问题、PTC 设计),但其内容描述的是 Windows 全量组件(shell/background/pwsh 路由等),阅读时请以上方「移植了什么」为准,本移植版不维护差异副本。

许可证

与上游一致:MIT AND Apache-2.0(插件源码 MIT,见 LICENSE、NOTICE)。上游的 Rust 核心基于 yc-duan/fastctx(Apache-2.0)改造,声明见上游 PROVENANCE.md。本移植版对上游代码的修改遵循相同许可证分发,不由上游作者背书。

致谢

上游项目

平台与工具

Powered by DeepSeek Powered by GLM

Comments

Loading…

Similar plugins

dsh-self-update

by Shane-Jay

In-app self-update for DeepSeek Harness git-source installs + optional native macOS shell

UI & ExperienceManifest valid

★ 2

↓ 70/wk

MIT

TypeScript

Oct 21, 2026

dsh plugin --profile web add dsh-self-update

by wangyong1972

Native macOS computer-use plugin for DeepSeek Harness with trusted mouse/keyboard control, screenshots, and multi-display selection.

Manifest valid

★ 0

MIT

TypeScript

Aug 23, 2026

dsh plugin --profile web add @wangyong1972/dsh-computer-use-macos

by 18126295767-cell

Give DeepSeek Harness hands on your Mac: native browser and desktop control tools for macOS.

Tools & CapabilitiesManifest valid

★ 0

MIT

JavaScript

Aug 24, 2026

dsh plugin --profile web add dsh-mac-control

by songer522

macOS menu bar app for the DSH web server, plus the host plugin it reads: the plugin writes the running server's port, PID and tokenized URL to ~/.config/dsh-launcher/runtime.json and removes it on sh

Tools & CapabilitiesDevelopment & InfrastructureTerminal & ClientsManifest valid

★ 1

MIT

Swift

Sep 12, 2026

dsh plugin --profile web add dsh-menubar-launcher

by amplifthq

A curated distribution of DeepSeek Harness. Overlay, not a fork.

Dev presetsManifest valid

★ 16

↓ 190/wk

MIT

TypeScript

Oct 17, 2026

dsh plugin --profile web add oh-my-dsh

by aa2246740

macOS-only DeepSeek Harness plugin: private cua-driver computer-use for DSH

Tools & CapabilitiesManifest valid

★ 0

MIT

TypeScript

Sep 12, 2026

dsh plugin --profile web add dsh-cua-drive