Neplich/dsh_plugin--packages-agent-dsh-agent-webuse ↗★ 1

@neplich/dsh-agent-webuse

dsh agent plugin: browser-use (computer-use style) tools — a Playwright-driven automation Chrome with navigate/snapshot/click/fill/screenshot and graceful no-image degradation 适合需要让智能体操作网页的用户;卸载后浏览器配置目录与降级截图需手动清理。

パッケージ
@neplich/dsh-agent-webuse
互換性
未検証
Harness ピア範囲
^0.1.2-alpha.3
Cordis ピア範囲
^4.0.2
バージョン
0.1.0
ライセンス
MIT
最終更新
2026/09/01

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Neplich/dsh_plugin#c83599509c2f790ba23c59b19d90e521fa774c1d&path:packages/agent/dsh-agent-webuse

ドキュメント

README 全文を読む ↗

@neplich/dsh-agent-webuse

中文文档

Browser-use (computer-use style) tools for the dsh agent: a Playwright-driven automation Chrome the model can navigate, inspect, click, type into, and screenshot.

Features

Twelve model-facing tools, served by one long-lived driver process that owns a persistent Chrome instance:

ToolPurpose
webuse_launchStart (or attach to) the automation browser
webuse_navigateOpen a URL, optionally in a new tab
webuse_snapshotNumber the page's interactive elements (stable until the next navigation)
webuse_click / webuse_fillAct on a numbered element
webuse_press / webuse_scroll / webuse_backKeyboard, scrolling, history
webuse_tabsList / switch / open tabs
webuse_evalRun a JavaScript expression in the page for data extraction
webuse_screenshotPNG screenshot into model context via the attachment service
webuse_closeShut the browser and driver down

The browser is headed by default so you can watch the agent work. Element numbers are pinned onto the live DOM (data-dsh-webuse-idx attributes) and stay valid across tool calls until the page changes.

Screenshot degradation

webuse_screenshot never hard-fails on image-less deployments:

  • Normal path — the PNG is committed through the durable attachment service and returned as an image block the model can see.
  • Degraded path — when no attachment service is mounted, or the routed model does not declare image input, the PNG is saved to a temp file instead and the result carries the file path plus a page text summary (first 3000 characters), so the model keeps a textual "view" of the page and the user has a file to open.

Requirements

  • macOS/Linux/Windows with a Chrome-compatible browser installed (located through the Playwright channel config, default chrome).
  • playwright-core is a runtime dependency and installs with the plugin; no browser binaries are downloaded.

Install

dsh plugin --profile  add @neplich/dsh-agent-webuse

Config (cordis.yml)

KeyDefaultMeaning
port9334Loopback port for the driver HTTP server
headlessfalseRun Chrome headless instead of headed
channelchromePlaywright channel used to locate the browser
profileDir$DSH_HOME/webuse/chrome-profileChrome user-data dir (cookies and logins persist here)
viewportWidth / viewportHeight1280 / 800Browser viewport
fallbackDir/dsh-webuse-fallbackWhere degraded screenshots are written

Uninstall

dsh plugin --profile  remove @neplich/dsh-agent-webuse

Removing the plugin stops the driver and the browser. Artifacts it writes are not removed automatically:

ArtifactDefault locationCleanup
Chrome profile (cookies, logins)$DSH_HOME/webuse/Delete the directory manually
Degraded screenshots/dsh-webuse-fallback/Left to OS temp cleanup, or delete manually

Known limitations

  • One browser instance per plugin load; all tool calls serialize against it.
  • Element numbers from webuse_snapshot are invalidated by navigation and DOM changes — re-snapshot before acting.
  • The display of screenshots inside the Web GUI chat stream is a separate concern; pair with @neplich/dsh-agent-imagevault for stable chat-renderable image URLs.