面向编码代理的本地优先 HTML 审阅与标注工作区:在浏览器编辑器中打开文件的隔离副本,收集文本修改、格式调整与元素/区域评注,并把持久的交接(handoff)交还给代理认领和落实。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:philmingdao/anno#path:/adapters/dsh-native
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
@philmingdao/anno-dsh-native is a native DeepSeek Harness plugin for Anno — a local-first HTML review, editing, and annotation workspace for coding agents.
Unlike @philmingdao/anno-dsh, which bridges the MCP server through the official DSH MCP client, this package runs Anno in-process: the local review HTTP server, the on-disk session store, and the six html_review_* model tools all live inside the Harness process. There is no MCP layer, no child npx process, and no separate server to launch.
What it provides
A loopback-only HTTP review server (
127.0.0.1, ephemeral port).Persistent review sessions under
$ANNO_DATA_DIR(default~/.anno/sessions); the source file is never overwritten and outputs are versioned (-reviewed.html,-reviewed-v2.html, …).Six model tools, registered with DSH's native tool registry:
html_review_start_sessionhtml_review_get_sessionhtml_review_claim_handoffhtml_review_mark_handoff_senthtml_review_list_sessionshtml_review_register_final
A
tool:annosystem-prompt section that teaches the agent the start → review → claim → resolve workflow.
Requirements
- DeepSeek Harness
>=0.1.0-rc.6 <0.2.0 - Node.js 22 or newer
Install
The package is a DSH profile bundle: dsh plugin add installs it and applies its cordis.patch.yml, which inserts the anno-native row into the profile (host) composition.
dsh plugin --profile web add @philmingdao/anno-dsh-native
# or from a source checkout:
dsh plugin --profile web add ./adapters/dsh-native
Then start Harness normally:
dsh web
The tools appear as html_review_* (no MCP namespace prefix). Because the row sits on the host plane, every agent on that profile shares one review server and one session store.
Source checkout
npm install
cd adapters/dsh-native
npm test
dsh plugin --profile web add "$(pwd)"
Use a temporary --dsh-home when testing without changing your normal profiles.
Use
Ask Harness to open or review an HTML file. It calls html_review_start_session with the absolute source path and opens the returned review_url for the user.
When the user clicks 提交给 Agent in the browser editor, the review server prepares the handoff and pushes it straight back into the originating agent conversation: the plugin captures the calling agent when the session is created and, on submission, queues an ordinary follow-up turn (agent.followup) carrying the full review — in-place text edits, format changes, element/area annotations, and page notes — so the agent claims the handoff immediately and resolves it into a verified standalone HTML file via html_review_register_final, without any manual polling.
The receiving turn's prompt instructs the agent to call html_review_claim_handoff first (durable receipt), then html_review_get_session to reload the full session and apply the edits and annotations against the draft HTML, then html_review_register_final. The in-process push is best-effort: if the originating agent is no longer live, the handoff is still persisted on disk and the agent can claim it through the ordinary html_review_* tools.
Architecture
DSH profile composition
-> @philmingdao/anno-dsh-native (cordis plugin + bundle patch)
-> anno-core.js (HTTP server + on-disk session/review/handoff store, node-only)
-> index.js (registers html_review_* tools + tool:anno prompt section)
lib/anno-core.js is deliberately free of DSH imports and is unit-tested directly (npm test). It exposes an onHandoff hook (invoked by the HTTP generate endpoint with the full review payload) and a hasHostTarget predicate (reported as has_host_target on the session projection) so the host binding can deliver handoffs without the core depending on any host runtime.
lib/index.js is the thin Cordis binding that injects tools, systemPrompt, and agents, starts the server as a fiber-owned effect, and registers the tools using raw JSON-Schema definitions directly against the tools registry. It captures the calling agent on html_review_start_session and, through onHandoff, delivers the submission back as an agent.followup notice. It imports no @deepseek-ai/dsh-tools (or any other DSH package) — the follow-up user message is built from the same shape createUserMessage produces, using only node:crypto — so the package keeps zero external dependencies and loads from any location (including a link:-installed source checkout).
Configuration
The anno-native row accepts:
| Field | Default | Meaning |
|---|---|---|
host |
dsh |
Host kind stamped on session records. |
dataDir |
$ANNO_DATA_DIR or ~/.anno |
Root for persisted review sessions. |
assetsDir |
package assets/ |
Directory holding editor.html / handoff.html. |
Uninstall
dsh plugin --profile web remove @philmingdao/anno-dsh-native
Existing review sessions under the data directory are left in place.
License
MIT. The editor UI is the same Anno asset set; see the repository root for the bundled font's SIL Open Font License.
链接
同类插件
Tencent/WeKnora#dsh-weknora★ 35014
把 WeKnora 知识库接入 dsh 的四个只读工具:列出知识库、混合检索原文片段、按顺序还原单篇文档,以及直接取用 WeKnora 自己带引用的 RAG 或 ReAct agent 回答(含可续聊的 session id)。
superdesigndev/treg★ 5944
给 Agent 的工具目录:按「要做的事」检索约 2,600 个外部接口(SEO 与 SERP、外链、社交、人物与公司信息补全、广告库、抓取),查看参数与单次调用价格后直接调用,凭据由服务端注入。附带技能,MCP 行在未设置 TREG_TOKEN 前保持禁用。
T-Auto/dsh-ops★ 3709
为 Windows 的 DSH 提供 bash、PowerShell 7 及 Rust 高性能工具,减少 token 消耗。
TencentCloudBase/CloudBase-AI-Toolkit#dsh-plugin★ 1141
把腾讯云 CloudBase 后端接入 DeepSeek Harness——在对话里搭好并部署全栈应用,查询结果渲染为表格卡片(分页、排序、导出 CSV),部署后可预览真实域名,并提供 CloudBase MCP 工具集(`mcp__cloudbase__*`),登录走 device-code 流程。
sixtysevenlf/dsh-blender-plugin★ 1019
让 DSH agent 通过直连 TCP 通道驱动本地 Blender,提供 16 个工具:视口帧、自定义视角渲染、Python 执行、无头与作业卸载、事务回滚,以及 28 个 family / 186 个 op 的规划层。
anysearch-team/anysearch-dsh★ 634
基于 AnySearch 的实时网页与垂直搜索插件,为 DeepSeek Harness 提供搜索工具。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。