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

@harness-desktop/dsh-pwsh-sandbox

v1.0.0

Published

Sandbox-consuming implementation of the DeepSeek Harness PowerShell executor seam (confines every command via ctx.sandbox, reports denial/enforcement result facts)

Downloads

419

Readme

@harness-desktop/dsh-pwsh-sandbox

English | 中文

沙盒消费型的 ctx.shell 执行器 seam 的 PowerShell 实现:每条命令以 pwsh -NoLogo -NoProfile -NonInteractive -Command <command> 运行,ctx.sandbox 隔离,选定模式、强制完整性、拒绝事实都盖在每次结算的结果上。它是 @harness-desktop/dsh-bash-sandbox 的 pwsh 孪生,按 pwsh 执行器与工具决策 逐调用镜像——隔离实体本身是平台无关的:Windows 上沙盒 seam 解析到 ACL 受限令牌 runner 链(@harness-desktop/dsh-sandbox-windows-acl),Linux/macOS 上解析到 bwrap/Landlock/Seatbelt。

执行器继承 @harness-desktop/dsh-pwsh-local 的进程机制,并消费其 argv 级 seam(argv() / runArgv() / startArgv() / onProcessDone())把精确的 pwsh 调用经 provider 包装。沙盒策略(模式 + 工作区根目录)不是本包的配置:每次调用由 ctx.sandboxPolicy 随行(工具层传调用会话解析后的策略;直接调用回退到部署策略)。

行为

  • danger-full-access:命令经本地执行器原样运行;结果携带 sandbox: { mode, denied: false }
  • 受限模式(read-onlyworkspace-write):pwsh argv 由 ctx.sandbox.confine() 包装;runner 启动失败按 fail-closed 抛 SANDBOX_UNAVAILABLE(前台抛错、后台记 runnerFailed 事实),被拒绝的写按所选后端的 denialSignatures 分类为 sandbox.denied

模型体验

隔离生效,拒绝以命令失败呈现

模型看到什么

受限命令自身的 stderr(Windows ACL runner 下如 Access to the path '...' is denied.);工具层把分类后的拒绝转成标准权限拒绝面,与 bash 工具完全一致。

Token 影响

除命令 stderr 与工具层标准拒绝面外,无额外模型可见文本。

KV Cache 影响

无直接影响;拒绝呈现面属于工具层。

已知限制与后续工作

  • Windows 上读不受限(ACL runner 只限写);读边界文档在 @harness-desktop/dsh-sandbox-windows-acl
  • Windows workspace-write 的临时权限按每个活跃的会话/工作区对私有;无 agent(智能体)的调用每次都获得一个新的私有目录。环境临时根目录绝不会被授权,runner 会在 spawn 前将 TMP/TEMP 重写为该私有目录。
  • Windows read-only 不授予任何显式可写根目录,但仍为部分强制执行,因为受限令牌必须保留 Everyone。DACL 向 Everyone 授予写访问的对象——包括以兼容方式打开的 NUL 设备——仍构成环境权限来源;PowerShell 的 > $null 重定向仍可工作,且不会打开 NUL。