dsh-agent-browser
开发工具 活跃维护

dsh-agent-browser

jhlee111/dsh-agent-browser

属于DeepSeek Harness生态的浏览器插件,内置注入式拾取绘制工具栏与聊天反馈卡片,支持快速圈选标注页面元素、同步提交交互反馈,开箱即用无需额外配置。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
24 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:jhlee111/dsh-agent-browser
git clone https://github.com/jhlee111/dsh-agent-browser.git
git clone git@github.com:jhlee111/dsh-agent-browser.git
README.md main

dsh-agent-browser

A DeepSeek Harness plugin: a headed
browser with an injected Pick/Draw toolbar, a chat feedback card, launch
settings
, and dev-server auto-start.

https://github.com/jhlee111/dsh-agent-browser · topics:
dsh-plugin, deepseek-harness


⚡ How you use this (read this first)

This is a plugin, not a CLI — there is no npx one-liner. The packages expose no
bin, so npx @deepseek-ai/dsh-agent-browser does not work.

Want the one-clone install? Use the pre-wired fork branch
👉 https://github.com/jhlee111/deepseek-harness/tree/agent-browser — it ships this
plugin already integrated (see AGENT_BROWSER.md there for the 6-command quickstart).

This repo is the canonical source. To integrate it yourself:

  1. You must have a DeepSeek Harness checkout (the plugin's runtime packages
    @deepseek-ai/dsh-* are workspace packages there).
  2. You integrate these two packages into that checkout (copy + a few one-line edits).
  3. You build, then run dsh web. The plugin loads inside the harness — the agent
    browser opens as a Chrome window and its feedback card/settings appear in the GUI.

It is not a standalone browser tool you run by itself. If you just want a browser
you control from a script, this isn't that — it is a harness extension.

Minimum prerequisites

  • Node.js 22.19+ / 24+, Corepack-enabled pnpm@11.7.0
  • A Chrome install (host launches it in headed mode)
  • A DeepSeek Harness source checkout

What it does

  • Host half (packages/dsh-agent-browser) — launches headed Chrome
    (browser_launch), injects the toolbar into every document, exposes agent tools
    (browser_launch, browser_feedback, browser_capture), and serves a local HTTP
    endpoint.
  • Toolbar — Pick / Draw / viewport presets, Reload, Send → agent.
  • Chat feedback card — surfaces toolbar feedback as a card above the composer;
    [Send to agent] hands it to the model, [✕] dismisses it.
  • Launch settings — GUI Settings → Agent Browser to set default URL, viewport,
    OS window size, and a dev-server command (run in a working dir, wait for a port,
    then open the browser — e.g. envrun .env iex -S mix phx.server).
  • Page driving — host POST /evaluate runs JS in the page so the agent can
    fill/submit forms.

Repository layout

packages/
  dsh-agent-browser/          # host half  (node Cordis plugin, consumes `tools`)
  dsh-client-ui-agent-browser/# client half (web `dsh.client` surface)

Install (integrate into a DeepSeek Harness checkout)

The harness expects the two packages by their @deepseek-ai/... names, so they stay
@deepseek-ai/dsh-agent-browser and @deepseek-ai/dsh-client-ui-agent-browser even
though the source lives in this repo.

1. Get the code

git clone https://github.com/jhlee111/dsh-agent-browser
# or copy the packages into your harness checkout:
#   packages/dsh-agent-browser                -> <harness>/packages/agent-browser/agent-browser
#   packages/dsh-client-ui-agent-browser      -> <harness>/packages/client/ui-agent-browser

2. Register build references

In <harness>/tsconfig.client.json add:

{ "path": "./packages/client/ui-agent-browser" }

In <harness>/tsconfig.host.json add:

{ "path": "./packages/agent-browser/agent-browser" }

3. Declare bundle dependencies

In <harness>/packages/bundle/web-app/package.json dependencies:

"@deepseek-ai/dsh-agent-browser": "workspace:^",
"@deepseek-ai/dsh-client-ui-agent-browser": "workspace:^"

4. Register the client surface (browser roster)

In <harness>/packages/bundle/web-app/cordis.patch.yml:

- insert:
    - id: ui-agent-browser
      name: '@deepseek-ai/dsh-client-ui-agent-browser'

5. Enable the host half per session (agent preset)

In ~/.dsh/.agent-presets/agent-browser/agent.cordis.yml:

- id: agent-browser
  name: '@deepseek-ai/dsh-agent-browser'
  config:
    defaultUrl: http://localhost:4000/todos

6. Install & build (from the harness root)

pnpm install
pnpm run build:lib:host
pnpm run build:lib:client

7. Run

pnpm dsh web --port 3081

Configure & use it daily

  1. Open the harness web GUI (http://127.0.0.1:3081), hard-refresh (Cmd/Ctrl+Shift+R).
  2. In the GUI, open Settings → Agent Browser:
    • set Default URL, Viewport, Window size
    • set a Dev server cmd / Working dir / Port (optional) — e.g.
      envrun .env iex -S mix phx.server, working dir = your project, port = its listen
      port. On the next launch the host runs the command, waits for the port, then opens
      the browser there.
  3. Use the browser's injected toolbar to Pick / Draw, then Send → agent. The
    feedback appears as a card above the composer; [Send to agent] submits it.
  4. The agent can also drive the page directly via
    POST http://127.0.0.1:4600/evaluate ({"code": "..."}).

Launch settings are stored per-host in feedback/launch-settings.json inside the
agent-browser package; envrun, project paths, and ports are your settings, not
part of this plugin.


FAQ

Can I just npx @deepseek-ai/dsh-agent-browser?
No. This is a harness plugin with no bin. It must be loaded by DeepSeek Harness.
A true one-command install would require the harness's @deepseek-ai/dsh-* runtime
packages to be published to npm and a published dsh-agent-browser installed and
declared in your profile — still launched via dsh web, never a standalone binary.

Can I use it without forking DeepSeek Harness?
Today the harness's runtime/UI packages are unpublished workspace packages, so the
plugin is integrated into a harness checkout (steps above). Once they're published, the
integration becomes dependency + profile entries only.

Notes

  • The model catalog inputModalities fix for vision models is per-deployment model
    configuration, not part of this plugin.