Overview¶
In the DeepSeek Harness (DSH) workflow, the agent writes code and declares the task complete. A common problem is that the agent often treats the work as finished only after reading source code, without proactively opening a browser to verify the actual rendered result. As a result, the frontend may contain errors, layout issues, or broken interactions, ultimately requiring manual intervention.
Introduction¶
dsh-preview is a workflow plugin maintained by Viger1. It gives DSH agents a pair of “eyes”: a headless browser verification toolkit and a bundled frontend-verify skill.
Unlike standalone browser tools, its core value lies in process. It enforces a closed-loop verification flow before the agent may claim completion: open the page, inspect the console, read the layout, perform interaction tests, record screenshots, and fix errors.
Core Features¶
The plugin provides 6 browser tools and 1 self-check skill.
Browser Tools¶
browser_open: Opens anhttp(s)URL or a local file/directory (automatically served through 127.0.0.1). Returns the page ID and console errors captured during loading.browser_console: Captures console messages and failed network requests since page load.browser_read: Performs deterministic, non-visual reading. Reads text, HTML, or styles for a specific selector (including bounding box and key computed styles).browser_interact: Clicks, inputs, presses keys, or scrolls on a selector, and reports errors caused by the interaction.browser_screenshot: Saves a viewport, full-page, or single-element PNG to the workspace.browser_close: Closes the page after verification completes.
frontend-verify Skill¶
This is an automated verification loop that chains the tools above together:
1. Open the page
2. Inspect the console
3. Read layout facts
4. Execute interactions
5. Record screenshots
6. Fix issues
7. Re-verify
The skill accurately reports what has passed verification and explicitly identifies parts that cannot be verified (such as GPU rendering fidelity or pointer-lock feel), instead of making a blanket claim of completion.
Installation¶
Run the following command in the terminal to install it:
dsh plugin --profile web add dsh-preview
Configuration¶
The plugin configuration is located in the profile’s cordis.patch.yml. Here is an example of the default configuration:
- id: preview
name: dsh-preview
config:
headless: true
browserChannels: [chrome, msedge, chromium]
viewportWidth: 1280
viewportHeight: 800
navigationTimeoutMs: 15000
actionTimeoutMs: 5000
screenshotDir: .dsh-preview
maxReadChars: 20000
maxConsoleMessages: 100
allowedHosts: [] # 允许访问的额外主机名
registerSkill: true # 启用内置的 frontend-verify 技能
The security model specifies:
* localhost / 127.0.0.1 / ::1 are always allowed.
* Other hosts are denied by default and must be explicitly authorized in allowedHosts.
* Local paths are served read-only on a temporary 127.0.0.1 port.
Notes¶
- Runtime environment: Node.js is required, with version
^22.19 || >=24. - Browser support: The plugin uses Playwright and supports any Chromium on your machine (Chrome and Edge are automatically detected; otherwise, run
npx playwright install chromiumand configurebrowserChannels). - Rendering differences: Headless rendering differs from a real desktop browser. The behavior of pointer locking, some GPU code paths, and OS dialogs may differ. The built-in skill reminds the agent to pay attention to these differences.
- Visual capability: There is currently no visual description capability. Machine verification is done through
browser_readandbrowser_console; screenshots are only for human review. - Process model: Each DSH process shares a single browser process. Pages are lightweight, but agents running in parallel share that process.
Summary¶
dsh-preview turns “verification” from a manual task into a built-in agent capability. It does not add extra “superpowers”; instead, it establishes a rigorous verification discipline that allows the agent, after the code build is completed, to independently complete the frontend acceptance loop.