dsh-web-annotator: In-Place Annotation and Questioning in DeepSeek Harness Browser

Preface

The philosophy of DeepSeek Harness (DSH) is “Everything is a Plugin.” When developing or debugging agents, it is often necessary to enable the Agent to understand the current browser context. Traditional methods, such as screenshots or manual descriptions, are inefficient and prone to information loss. The dsh-web-annotator plugin provides annotation capabilities directly within DSH’s existing Browser tab. It supports click selection, box selection, and attaches screenshots or DOM location data, facilitating the direct synchronization of web page states into the current session.

What is it

dsh-web-annotator is a client-side plugin developed by the maintainer cslkkl and released under the MIT License. It allows users to perform in-place annotation, modify properties, or ask questions on web pages within the existing DeepSeek Harness Browser environment, sending marked information as image-bearing cards to the current session.

Core Features

  • In-place Annotation: Supports clicking elements, clicking blank spaces, or dragging to select regions. You can directly input comments or questions next to the selection.
  • Property Editing: Expand the same card to adjust properties such as labels, colors, fonts, and spacing. The web page itself is not rewritten until saved.
  • Temporary Interaction: Hold the Spacebar to interact with the web page (e.g., typing, clicking); release to return to annotation mode. The Spacebar functions normally for typing inside input fields.
  • Data Attachment: Supports sending annotations with location data, including numbered screenshots, coordinate data, and DOM evidence.
  • Session Management: Supports multiple annotations, previews, retry on failure, and persistent draft storage. The chat interface displays collapsed “N annotations” cards, which can be expanded to view specific content and location data for each item.
  • Toolbar Integration: Retains the original Browser toolbar and the in-page annotation overlay.

Installation and Activation

Download the latest dsh-web-annotator-*.tgz package from Releases and install it using the official CLI:

dsh plugin --profile desktop add --ignore-scripts /absolute/path/dsh-web-annotator-<version>.tgz

After installation, you must exit and restart the Desktop normally for the changes to take effect.

Prerequisites and Notes:

  • Ensure the Harness kernel version is 0.2.1-alpha.2.
  • While enabled, this plugin replaces the official Browser, Chat, and Layout providers. Uninstalling the entire bundle and restarting will restore the official providers.
  • For users of the old local preview, dsh-layout-care and dsh-layout-care-browser-preview must be removed before installation.

Typical Usage

  1. Create Annotation: In the current session, click “Annotate Web Page” to open the Browser. After entering the address, click page elements, blank spaces, or drag the mouse to select a region, and enter content in the overlay input area.
  2. Edit Properties: Click the icon on the left to expand the property card. You can modify color, font, spacing, or toggle between “Comment/Question” types. Click the circular ✓ or press Enter to save; press Esc to cancel.
  3. Temporary Interaction: If you need to type content or click buttons on the web page, hold down the Spacebar; release to return to annotation mode.
  4. Send to Session: After saving, you can edit the text, check the annotations to be sent, select the sending method and preview, and finally send them to the current session. They will appear in the chat as “N annotations” cards.

Usage in Vite Projects:

import { defineConfig } from 'vite';
import { webAnnotator } from 'dsh-web-annotator/vite';

export default defineConfig({ plugins: [webAnnotator()] });

Security and Boundaries

  • Text, styles, and source code marks within the page are treated strictly as reference data, not as instructions.
  • Plugin callbacks do not expose DOM, arbitrary evaluators, or host capabilities to the page.
  • Annotations and screenshots are stored only in your local browser storage and are sent via the normal request flow of the current session.
  • File writing and source code modification are performed by the Agent in the current session; the plugin itself does not execute scripts.

Summary

dsh-web-annotator provides DSH users with the ability to perform web annotation, property adjustment, and data extraction directly within the Browser tab. By managing image attachments and collapsed cards, it solves the issue of fragmented web context acquisition for Agents.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye