← Back to AI Insights
Gemini Executive Synthesis

dsh-ops plugin, specifically its native worker component, on HarmonyOS (openharmony-arm64). The core issue is `cap-std`'s `openat2` fast path being blocked by platform `seccomp` policies.

Technical Positioning
Cross-platform compatibility and native execution of `dsh-ops` on HarmonyOS. The goal is to enable the plugin's worker component to function correctly on this specific ARM64 Linux-based environment, which is currently hindered by security policies and toolchain specifics.
SaaS Insight & Market Implications
This report details significant platform-specific challenges for `dsh-ops` on HarmonyOS (openharmony-arm64). While the native worker can be built with specific toolchain configurations, the core problem lies in HarmonyOS's `seccomp` policies blocking `openat2` calls, which `cap-std` uses for all directory-relative operations on Linux targets. This effectively kills the worker process, rendering the plugin non-functional despite successful compilation. This highlights a critical incompatibility between `cap-std`'s default Linux behavior and HarmonyOS's stricter security posture. For `dsh-ops` to achieve true cross-platform utility on HarmonyOS, a fundamental re-evaluation of its I/O abstraction layer or a platform-specific `cap-std` workaround is required. This issue underscores the complexities of deploying low-level tooling on emerging, security-hardened mobile-first operating systems, impacting market reach and requiring substantial engineering effort for adaptation.
Proprietary Technical Taxonomy
HarmonyOS (openharmony-arm64) worker 可构建 cap-std openat2 快路径 平台 seccomp 杀进程 设备: HarmonyOS PC HUAWEI KirinX90 HongMeng Kernel 1.13.0

Raw Developer Origin & Technical Request

Source Icon GitHub Issue Oct 14, 2026
Repo: T-Auto/dsh-ops
[平台] HarmonyOS (openharmony-arm64):worker 可构建,但 cap-std 的 openat2 快路径被平台 seccomp 杀进程

## 环境

| 项 | 值 |
| --- | --- |
| 设备 | HarmonyOS PC,HUAWEI KirinX90(20 逻辑核 / 24 GB),HongMeng Kernel 1.13.0 |
| `process.platform` / `arch` | **`openharmony`** / `arm64` |
| 目标三元组 | `aarch64-unknown-linux-ohos`(rustc 报告 `target_os="linux"` + `target_env="ohos"`) |
| C 运行库 | musl(`/lib/ld-musl-aarch64.so.1`,无 `/lib/ld-linux-aarch64.so.1`) |
| Node / 宿主 DSH | `v26.10.0` / `0.2.1-alpha.2` |
| 插件版本 | `0.3.0`(`c4d829a`);对照 npm `0.3.0` |

我在 HarmonyOS 上把插件装进 DSH 试跑,宿主层(配置、组件开关、提示词、工具注册、manifest
校验)都正常,原生层是两个独立问题:一个是环境/平台识别,另一个是**平台 seccomp 策略禁止
`openat2`,而 `cap-std` 在 Linux 目标上把所有目录相对操作都实现成 `openat2`**。

---

## 一、worker 可以构建(配方)

官方 rustup 在本机不可用:aarch64-unknown-linux-gnu 与 static-musl 两版 `rustup-init` 都因
缺少 `/lib/ld-linux-aarch64.so.1` 拒绝执行(`errno=13`)。平台自带的包管理器有原生
`rust 1.99.0`(`arm64_ohos` bottle),装上后 `cargo build` 需要三处额外配置:

```console
$ brew install rust
$ rustc -vV | grep host
host: aarch64-unknown-linux-ohos

$ export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_OHOS_LINKER=aarch64-linux-ohos-gcc
$ export RUSTFLAGS="-L native=$(brew --prefix ohos-sdk-native)/llvm/lib/aarch64-linux-ohos"
$ cargo build --release --locked --manifest-path native/Cargo.toml
Finished `release` profile [optimized] target(s) in 17.64s

$ file native/target/release/dsh-ops-worker
ELF shared object, 64-bit LSB arm64, dynamic (/lib/ld-musl-aarch64.so.1), not stripped
```

- 默认不存在 `cc`,链接器必须指向 `aarch64-linux-ohos-gcc`;
- Rust 的 `aarch64-unknown-linux-ohos` std 会链接 `-lunwind`,它只在 OHOS 原生 SDK 的
`llvm/lib/aarch...

Developer Debate & Comments

XCxyTianQ • Oct 14, 2026
## 更新:绝对路径后端已实现,四个文件工具在鸿蒙上实测可用 按上面第四节的思路做完了,分支:`feat/openharmony-explicit-worker`(commit `3845adc`,含 `docs/harmonyos.md` 的完整记录与原始输出)。 **做法**(`native/src/file_path.rs` 按平台分派,其他平台**逐字保留**原有受审计的句柄相对遍历): - `target_env = "ohos"` 下改用绝对路径:`Dir::open_ambient_dir` 打开目录、`entries()` 枚举、 逐组件 `symlink_metadata` 拒绝链接; - 用路径打开文件后,与已校验的元数据**比对 dev/ino**——在校验与打开之间被换成链接的条目 仍会被拒绝; - 锚点不再固定 `/`:根目录打不开时回退到**最深的可打开祖先目录**(本机 `/`、`/storage`、 `/data`、`/system` 都不允许打开,而 `stat` 对所有路径可用); - `file.rs` 的遍历与 `atomic_write` 同样分派:ohos 下 `create_new` 建临时文件、同目录 `rename` 发布、fsync 父目录。 **实机验证**(HarmonyOS PC / `aarch64-unknown-linux-ohos`,真实 `dsh-subprocess-local` + 真实桥接 `lib/file/worker.js`,`workspace-write` 会话): | 调用 | 结果 | | --- | --- | | `ops_glob` `**/*.txt` | 命中 2 文件,`complete:true` | | `ops_grep`(content / count) | 命中行与逐文件计数正确 | | `ops_inspect_local_file`(text / hex) | 正常 | | `ops_replace` dryRun | revision 与 bytes 统计正确,未写盘 | | `ops_replace` 执行 | `changed:1`,内容变为 `alpha\nBETA\ngamma\n`,**无临时文件残留** | | `...
XCxyTianQ • Oct 14, 2026
## 更新:批量/结果后端已打通,以及 `ops_batch` 实际效用的实测 ### 1. 端口进展 `feat/ohos-batch-backend` @ `0f3f659`:`paths.rs` / `store.rs` / `batch.rs` / `lib.rs` 改用按平台分派的 `HostDir`(新增 `native/src/hostfs.rs`;非 ohos 分支**逐字转发**原有 cap-std 调用,ohos 分支改为「绝对路径 + `std::fs`」)。ohos 下**不需要** `O_NOFOLLOW`:读取先 `symlink_metadata` 拒绝链接、打开后用 dev/ino 复核,`create_new` 用 `O_CREAT|O_EXCL`,`remove_file`/`rename`/`read_link` 本身不跟随链接。 本机验收(`verify-ohos/run-all.sh`,10 项全绿):构建零警告、`validate-manifest` 58/58、platform 套件 11/11、仓库套件与本机基线一致、四文件工具端到端、文件工具安全面 7/7、组件挂载(file 4/4;**PTC 作用域下 `ops_batch`/`ops_result` 2/2 发布**)、`ops_batch`/`ops_result` 端到端(**带断言**,并做反向对照:对移植前的 worker 该脚本退出 1、11 项不符)、非 ohos 分支编译不变。 真实会话里也跑通:模型在 PTC 会话中调用 `tools.ops_batch` → `status: completed, done: 1`;同一会话内 `ops_result` 分页返回逐项 `state`。 ### 2. 实测:什么时候有用,什么时候是纯开销 口径:宿主 dsh 0.2.0-rc.2(安装版)、模型 deepseek-flash、`danger-full-access`、每轮重建夹具、产物逐项校验;同一任务同一模型,只切换「装/不装插件」。成本为 `metered = uncachedInput + cacheRead`。 | 场景 | n | 基线 | 装插件 | 结论 | |---|---|---|---|---| | 读/搜/统计类...
MakeBlackSheepGreat • Oct 14, 2026
We hit the same SIGSYS-on-openat2 failure on a HarmonyOS PC (HongMeng kernel 1.12.0, aarch64) and traced it further: besides the openat2/SIGSYS blocker there are two more OHOS-specific failures — (1) the root-anchor open of is denied (EACCES), failing every worker preflight with ACCESS_DENIED, and (2) fsync on the O_PATH directory fds that cap-std hands out returns EBADF, which made report **after** the rename had already succeeded (false negative). Full analysis in ; a cfg-gated fix (vendor cap-primitives with an openat2 guard + deepest-openable-path anchor + skip O_PATH dir fsync on OHOS) is up as . With those three patches a locally built passes all four file tools plus ops_batch/ops_result on-device.
XCxyTianQ • Oct 14, 2026
## 更新:跨平台复测 + 权限边界探测(3 项新发现,其中 1 项跨平台) 本轮做了两件事:**在 Windows 11 上跑完 34 次同口径对照**(3 轮 × 10 条件 + 4 探针),以及**在鸿蒙本机做权限边界探测**。结论有对有错,按"先纠正自己"的顺序列。 ### 1. 原假设被证伪:Windows 上 PTC 程序级 `fs` 并未受沙箱管辖 | 探针 | 模式 | 程序内直连 fs 读文件 | |---|---|---| | p3-ptc-base-ws / p3-ptc-plugin-ws | **workspace-write** | **成功 2/2** | | p3-ptc-base-full / p3-ptc-plugin-full | danger-full-access | 成功 2/2 | 会话日志里 DSH 自己追加了 `File sandbox enforcement is partial on this host.`(追加点 `packages/core/tools/src/ptc.ts:377`),出现范围干净:**14 个受限轮次共 104 次,12 个全权限轮次 0 次**。 根因不是缺陷而是**仓库自己文档化的设计限制**(`packages/sandbox/sandbox-local/README.md:131`): > **Windows ACL enforcement is partial** — NTFS hard links alias one file object across workspace and external paths, **reads stay unconfined**, … The provider reports `enforcement: 'partial'` rather than overstating that boundary as full. 也就是说:Windows 的约束落在**写入侧**,而只读任务恰好吃在不设防的维度上。我原先"Windows 程序受沙箱管辖 → 工具层才有价值 → 插件更值得装"的推论**不成立**。 ### 2. 普通任务 vs 契约任务:两个平台的表现一致(逐轮中位数) | 形态 | HarmonyOS | Window...
MakeBlackSheepGreat • Oct 15, 2026
We independently reproduced both security findings deterministically on our HarmonyOS PC (HongMeng kernel 1.12.0, worker built from our branch, invoked through the real host bridge `lib/file/worker.js#invoke` under `workspace-write`): **Finding A (reads escape the session root) — reproduced.** With workspace `ws/` and `outside/secret.txt` containing a sentinel string, a single request each of `ops_inspect_local_file {path:"../outside/secret.txt"}`, `ops_grep {path:"../outside", pattern:""}` and `ops_glob {path:"../outside", pattern:["**/*"]}` all returned `completed` with the outside content in the result. The relative path is resolved by the host layer (`lib/file/worker.js` `absoluteTarget()`), then passed as an absolute path to the worker — so the containment gap is exactly where you located it, and it reproduces with absolute paths too (the worker's read path has no root-bounding check of its own). **Finding B (bare `tmpdir()` write root) — reproduced, with one nu...

Adjacent Repository Pain Points

Other highly discussed features and pain points extracted from T-Auto/dsh-ops.

Extracted Positioning
dsh-ops plugin for DSH, specifically its workspace preparation script (`prepare-workspace.ps1`) and underlying JavaScript logic (`lib/workspace-preparation.js`).
dsh-ops aims to reduce token usage and task execution time for low-level operations within DSH. The goal is reliable execution of tools (`run_code`, `pwsh`, `bash`) on Windows, which is currently blocked by PowerShell security policies.
Extracted Positioning
dsh-ops plugin, specifically its `ops_bash` tool and the underlying `lib/bash-ipc.js` mechanism for MSYS compatibility and security.
Secure and compatible execution of `bash` commands within DSH, particularly in `workspace-write` (restricted) mode. The plugin enforces a strict policy against unverified MSYS DLLs to maintain sandbox integrity.
Extracted Positioning
dsh-ops@0.3.0 plugin within DSH desktop, specifically its workspace preparation mechanism in `workspace-write` mode.
Reliable operation of `dsh-ops` in DSH desktop environments, particularly when operating in a `workspace-write` mode that implies elevated permissions or specific operational contexts. The issue indicates a complete failure of command-class tools under this mode.
Top Replies
zhou18-book • Oct 11, 2026
补充两条正文里没展开的硬证据,以及复现命令。 ## 证据一:桌面端是**代码里主动替换**这一行,不是"配置恰好长这样" `resources/app/lib/profile-hhId3Pkk.js:1098-1108`(DSH Desktop `2.0.17`): ```js cons...
jp20010908 • Oct 11, 2026
## 本机反证:在「不替换行 id」的旧版桌面端上,接管**是生效的** 补充一条对照数据,或可帮助定位 的边界。 **环境对照** | 项 | 本报告者 | 本评论 | |---|---|---| | DSH Desktop | 2.0.17 | **0.2.0-rc.2**...
ljyzww • Oct 12, 2026
补充一组独立的本机复现,供确认影响范围: - Windows x64,DSH Desktop 2.0.17,内核 @deepseek-ai/dsh 0.2.0-rc.2,desktop profile。 - 在 dsh-ops 0.2.6 开启 Shell 组件并手动重启后,日志显示 Shell 组件挂...
Top Replies
surfishs • Oct 13, 2026
同样遇到此问题,并非偶发,建议重点修复。
Limgxo • Oct 13, 2026
排查了一晚上,才到找是插件的问题,通用设置里选择新会话的默认权限模式切换功能也失效,无法切换,关了插件立马就好
milesravencroft • Oct 14, 2026
在宿主已带活跃会话运行时把 dsh-ops 装进 profile(dsh plugin --profile desktop add dsh-ops),5.585 秒后该会话的工具通道即断:所有工具调用在 1–2 毫秒内失败,报 cannot get required service "sessionPr...

Frequently Asked Questions

Market intelligence mapped to dsh-ops plugin, specifically its native worker component, on HarmonyOS (openharmony-arm64). The core issue is `cap-std`'s `openat2` fast path being blocked by platform `seccomp` policies..

How is dsh-ops plugin, specifically its native worker component, on HarmonyOS (openharmony-arm64). The core issue is `cap-std`'s `openat2` fast path being blocked by platform `seccomp` policies. positioned in the market?
Based on our AI analysis of the original developer request, its primary technical positioning is: Cross-platform compatibility and native execution of `dsh-ops` on HarmonyOS. The goal is to enable the plugin's worker component to function correctly on this specific ARM64 Linux-based environment, which is currently hindered by security policies and toolchain specifics.
What is the general sentiment around dsh-ops plugin, specifically its native worker component, on HarmonyOS (openharmony-arm64). The core issue is `cap-std`'s `openat2` fast path being blocked by platform `seccomp` policies.?
Yes, we have tracked 4 direct responses and active debates regarding this specific topic originating from GitHub Issue.
What are the foundational technologies related to dsh-ops plugin, specifically its native worker component, on HarmonyOS (openharmony-arm64). The core issue is `cap-std`'s `openat2` fast path being blocked by platform `seccomp` policies.?
Our proprietary extraction maps dsh-ops plugin, specifically its native worker component, on HarmonyOS (openharmony-arm64). The core issue is `cap-std`'s `openat2` fast path being blocked by platform `seccomp` policies. to adjacent architectural concepts including HarmonyOS (openharmony-arm64), worker 可构建, cap-std, openat2 快路径.

Engagement Signals

4
Replies
open
Issue Status

Cross-Market Term Frequency

Quantifies the cross-market adoption of foundational terms like rustup and HarmonyOS (openharmony-arm64) by tracking occurrence frequency across active SaaS architectures and enterprise developer debates.