@hy-sde-org/dsh-tool-browser

中文文档
0.2.1-rc.5发布于 2026/11/01MITTypeScriptES Module

Model-facing browser tool (open/close/run over launch, CDP-attach and relay backends, ARIA-snapshot + screenshot observations) for DeepSeek Harness — a standalone plugin with no upstream harness changes required.

原始使用文档
文档目录4 节
  1. What it does
  2. ARIA refs
  3. Configuration
  4. Session isolation

@hy-sde-org/dsh-tool-browser

The model-facing agentic browser tool for the DeepSeek Harness (ported from omp / oh-my-pi), resolving the host @hy-sde-org/dsh-browser service through a launch / patch / attach / relay backend. Agent-plane: this package mounts as a preset row and registers no service of its own. A standalone plugin — no upstream harness changes required.

What it does

Registers one tool (browser) and a browser:tools system-prompt section:

  • open — navigate the named tab (url, wait_until, optional code to run after load), returning the observation (title, url, ARIA snapshot).
  • run — evaluate code in the tab, then re-observe best-effort.
  • state — return the current observation without navigating.
  • close — close one tab, all tabs, or with kill the spawned browser.
  • Screenshots — screenshot: yes writes a PNG (into screenshotDir, default <cwd>/.dsh-browser) and returns its path for the model to re-read.

Backends mirror omp's app object: app.path spawns a stealth-patched browser, app.patch uses the CloakBrowser source-patched Chromium (optional cloakbrowser peer — C++-level fingerprint randomization), app.cdp_url attaches to an existing CDP endpoint, app.relay drives the user's own tabs through the local relay + extension.

ARIA refs

Every observation carries a Playwright ARIA snapshot with [ref=eN] ids. The ids are renumbered per snapshot and remain valid until the next one; address elements by CSS selector as a fallback. Prefer the snapshot over a screenshot when pixels don't matter — snapshots are cheap, screenshots are not.

Configuration

  • cwd — default working directory (session header first; default process cwd).
  • maxAriaChars — ARIA snapshot cap returned to the model (default 20000).
  • screenshotDir — screenshot output directory (default <cwd>/.dsh-browser).
  • waitUntil — default wait condition (load).
  • timeoutSeconds — default per-call timeout (30).

Session isolation

The browser service is shared host-plane; the tool namespaces its tab key per session id, so concurrent sessions never steer each other's tabs.

版本与发布记录

@hy-sde-org/dsh-tool-browser 共发布 10 个版本,首次发布于 2026/08/26;过去 12 个月发布了 10 个版本。

版本发布日期距今
0.2.1-rc.5latest2026/11/012 天前
0.2.1-rc.32026/10/259 天前
0.2.1-alpha.42026/10/1618 天前
0.2.1-alpha.22026/10/1321 天前
0.2.0-rc.22026/10/031 个月前
0.1.7-rc.22026/09/291 个月前

关于 @hy-sde-org/dsh-tool-browser 的常见问题

@hy-sde-org/dsh-tool-browser 是什么?

面向模型的浏览器工具(打开/关闭/运行启动,cdp附加和中继后端,aria快照+截图观察),用于DeepSeek Harness -一个独立的插件,不需要更改上游的Harness。

如何安装 @hy-sde-org/dsh-tool-browser?

在项目目录运行 npm install @hy-sde-org/dsh-tool-browser,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@deepseek-ai/cordis(~4.0.5)、@deepseek-ai/dsh-tools(^0.2.1-rc.5)、@hy-sde-org/dsh-browser(^0.2.1-rc.5)、@deepseek-ai/dsh-system-prompt(^0.2.1-rc.5)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@hy-sde-org/dsh-tool-browser 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@hy-sde-org/dsh-tool-browser 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@hy-sde-org/dsh-tool-browser 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.19.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@hy-sde-org/dsh-tool-browser 可以商用吗?

@hy-sde-org/dsh-tool-browser 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@hy-sde-org/dsh-tool-browser 还在维护吗?

最新版本 0.2.1-rc.5 发布于 2026/11/01(2 天前);至今共发布 10 个版本,其中过去 12 个月发布了 10 个;首次发布于 2026/08/26。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。