DeepSeek Harness 插件

dsh-annotation-plugin

Quote selected assistant text into the next request with a host annotation service and a Web quote dock.(英文原文)

跳到安装方式

来源信息

GitHub 仓库
boboozeng/dsh-annotation-plugin
最近更新
2026年8月14日
分类
界面增强
GitHub stars
1
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/boboozeng/dsh-annotation-plugin
插件名:dsh-annotation-plugin
作者:boboozeng

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器2 个文件
README.md来源说明 · 只读预览

dsh-annotation-plugin

Quote selected assistant text into your next request — a standalone plugin for DeepSeek Harness.

This plugin ships both halves of the feature in one npm package:

  • Host half (dsh.bundle + cordis.patch.yml): an annotation plugin that records quotes as log-only session events (annotation/added / annotation/removed), exposes a Typert Remote (record / list / discard), and materializes pending quotes into the model-facing message batch at agent/pre-step.
  • Browser half (dsh.client): a quote button on each assistant message and a floating, collapsible pending-quote card above the composer.

Install

Requires a DeepSeek Harness profile that composes @deepseek-ai/dsh-base (the official base layer provides session, agent, web and the client runtime).

From npm (recommended)

dsh plugin --profile <name> add dsh-annotation-plugin

The published package ships prebuilt artifacts, so nothing builds at install time.

From GitHub

A git install fetches sources, not built artifacts — the package's prepare script (tsdown) builds lib/ after checkout, and pnpm refuses to run a git dependency's prepare until you explicitly allow it. The first add fails and dsh prints the exact package key to allow:

dsh plugin --profile <name> add github:you/dsh-annotation-plugin
# → pnpm refuses to run the prepare script; copy the package key it prints
#   into the profile's pnpm-workspace.yaml, then re-run the add:
# <profile dir>/pnpm-workspace.yaml
allowBuilds:
  dsh-annotation-plugin: true
dsh plugin --profile <name> add github:you/dsh-annotation-plugin   # re-run

That allowance is permission to execute the package's code on your machine at install time, outside any sandbox the agent runs under. Only allow packages whose source you trust, and pin a commit so a later push cannot silently change what runs:

dsh plugin --profile <name> add github:you/dsh-annotation-plugin#<sha>

If you would rather not ask users for the allowance, install the npm build instead (or distribute a tarball from pnpm pack — neither needs any build permission).

The bundle layer inserts the annotation plugin row; the client-modules table picks up the dsh.client declaration and loads the browser bundle in the Web GUI.

Usage

1. Select text in an assistant message. 2. Click the quote button (✎) in the message action strip — the selection is recorded and a floating card appears above the composer: Quotes · N ▴. 3. Click the card to expand the quoted-text list; use on a row to cancel that quote. 4. Send your message — the pending quotes are materialized as quoted context for the model and the card disappears.

Requirements

PackageVersion
@deepseek-ai/dsh-base^0.1.0-rc.5
react (host web bundle)^18.2.0

Peer dependencies (@deepseek-ai/dsh-session, @deepseek-ai/dsh-client-ui-conversation, …) are satisfied by the profile's dependency tree.

Development

pnpm install
pnpm build        # tsdown: lib/index.mjs (node half) + lib/client.js (browser bundle)
pnpm test         # vitest (jsdom client specs)
pnpm typecheck

Regenerating the Remote contribution

src/remote.ts is a committed copy of the Typert-generated descriptors. After changing any @Remote method signature in src/index.ts, regenerate it (e.g. from the official checkout: pnpm run build:lib:host, then copy packages/session/annotation/lib/typert.remote-client.js into src/remote.ts and adapt the package ids). An out-of-date descriptor silently strips fields on the client — the classic "schema missing a field" failure.

Notes

  • The Host half uses the namespace plugin form (name / inject / apply named exports). Do not add an export default — the Loader's unwrapExports would discard the namespace.
  • The browser half mounts its own Typert Remote contribution (ctx.remote.$mount) because the published @deepseek-ai/dsh-api-remotes does not carry the annotation namespace.
  • The discard Remote export maps to the remove method (method: "discard", implementation: "remove"); keep the generated descriptor in sync.

License

MIT