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

dsh-tool-browser

v0.1.0

Published

Native browser automation tools for DeepSeek Harness, powered by Playwright + Edge

Downloads

263

Readme

dsh-tool-browser

给 DeepSeek Harness(DSH)的原生浏览器自动化工具插件,由 Playwright 驱动。 默认直接使用本机安装的 Microsoft Edge(channel: "msedge",无需下载浏览器), Edge 缺失时自动回退到 Playwright 自带的 Chromium。

能力

面向模型的只读/交互工具(全部注册进 DSH 的 ctx.tools):

| 工具 | 作用 | |---|---| | browser_navigate | 打开 URL,返回标题与最终地址 | | browser_snapshot | 返回页面可见文本(body innerText,限长) | | browser_click | 按 CSS 选择器点击元素 | | browser_type | 按 CSS 选择器向输入框填入文本 | | browser_press_key | 按键盘键(Enter / Escape 等) | | browser_evaluate | 在页面执行 JS 表达式并返回 JSON 结果 | | browser_take_screenshot | 截图保存为 PNG,返回文件路径 | | browser_console_messages | 返回页面控制台消息 | | browser_wait_for | 等待固定毫秒数 | | browser_back | 返回上一页 | | browser_fill_form | 一次填多个表单字段 | | browser_select_option | 下拉框选择选项 | | browser_hover | 悬停元素 | | browser_drag | 拖拽(源元素 → 目标元素) | | browser_resize | 调整视口尺寸 | | browser_open_tab | 新开标签页(可带 URL) | | browser_tabs | 列出所有标签页 | | browser_switch_tab | 切换到指定标签页 | | browser_close_tab | 关闭当前标签页 |

设计要点:

  • 共享页面:插件实例维护一个浏览器 + 一个页面,会话内浏览状态连续;工具默认互斥(非并发安全),避免相互干扰。
    • 限制:使用该插件的所有会话共享同一个页面,跨会话会互相影响;需要隔离时请用独立 profile 实例。
  • 中止安全:每个工具转发 exec.signal,超时/中止策略不会挂死 agent 回合。
  • 结果结构化:全部返回 { text },快照/求值结果限长,控制 KV cache 影响。

安装

npm 发布后一条命令:

dsh plugin --profile <name> add dsh-tool-browser

发布前可用 GitHub 或本地路径:

dsh plugin --profile <name> add https://github.com/MashedPotato817/dsh-tool-browser.git
# 或本地:dsh plugin --profile <name> add /path/to/dsh-tool-browser

在 profile 的 cordis.patch.yml 里启用:

- insert:
    - id: dsh-tool-browser
      name: dsh-tool-browser

配置

| 键 | 默认值 | 含义 | |---|---|---| | channel | msedge | Playwright 浏览器 channel(msedge / chrome / 缺省=自带 Chromium) | | allowedHosts | [] | 允许访问的 host 白名单(空=全部允许,*=全部,如 example.com);data:/about: 始终允许 | | headless | true | 无头模式(调试可设 false) | | outputDir | 系统临时目录 | 截图输出目录 | | timeoutMs | 60000 | 工具调用总超时 | | navigationTimeoutMs | 60000 | 页面导航超时 | | actionTimeoutMs | 10000 | 单次动作(点击/输入)超时 | | snapshotMaxChars | 12000 | snapshot 文本上限 | | evaluateMaxChars | 4000 | evaluate 结果上限 | | viewportWidth/Height | 1280x720 | 视口尺寸 |

开发

npm install
npm run check   # 语法校验
npm test        # smoke + 真实浏览器集成测试(本机 Edge;CI 用自带 Chromium)

License

MIT