DeepSeek Harness 插件

zampie/request-frame-preview

Star 数 ★ 0 下载量(近 30 天) 41 分类 开发与运行时 收录于 2026-09-07 npm request-frame-preview

会话头部按钮:预览并下载 DeepSeek Harness 真正发给模型的请求帧——完整 system prompt、声明的工具数组 tools 与 wire 消息数组(system/user/assistant/tool-result),按 agent loop 读取所用的同一会话折叠重建。

安装

# npm 包(预构建)

dsh plugin --profile web add request-frame-preview

# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)

dsh plugin --profile web add github:zampie/request-frame-preview

装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWEDERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yamlallowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。

README

该插件的 README 只有英文版本。

Preview and download the exact request frame that DeepSeek Harness sends to the model for a session: the full system prompt, the tool declarations (tools), and the wire message array (system → user / assistant / tool-result in order), rebuilt from the session log.

A small DSH plugin with a host half (one read-only HTTP endpoint) and a browser half (a "请求预览 / Request preview" button in the session header).

Install

dsh plugin --profile web add request-frame-preview

or from a local checkout:

dsh plugin --profile web add /path/to/request-frame-preview

Restart dsh web (or let the plugin market restart it) so the bundle is loaded. A 请求预览 button then appears in the session header utilities, next to the built-in "Session log" button.

What it does

Click the button to open an overlay showing, top to bottom:

  1. ① system prompt — message #0 of the wire array (collapsed by default).
  2. ② tools — the tool declarations carried by the request, one tool row each; click a row to see its parameters.
  3. ③ messages — the wire message array from #1 on, with user, assistant, tool-result chips, tool_call_ids, reasoning content and tool_calls expanded inline.

下载 JSON / Download JSON saves the whole frame (config + system + tools with full parameter schemas + messages) as dsh-request-<sessionId>.json.

How the data is produced

  • Live session first: requestHeader() and deriveMessages() — the very same folds the agent loop reads when it builds each request.
  • Cold session fallback: sessionQuery.readSession + readSurface from the durable log.
  • Wire expansion mirrors the DeepSeek chat-completions adapter's text path: the system prompt becomes message #0; each tool-result block becomes its own role: "tool" message; assistant text, reasoning and tool_calls are split into their wire fields.

Layout

package.json        dsh.bundle.patch -> ./cordis.patch.yml; dsh.client.platform web
cordis.patch.yml    inserts the plugin row into the profile layer stack
lib/index.js        host half: registers GET /request-frame-preview/api
lib/client.js       browser half (window.__ModuleLoader__ bundle)

Security notes

  • The endpoint is read-only (GET/HEAD) and serves no state mutation.
  • Cross-origin requests are rejected when an Origin header is present and does not match Host; requests without Origin (curl, <a download>) are allowed, mirroring dshmarket's GET route convention.
  • This is a debugging aid: it exposes the session's full system prompt, tool schemas and message contents to anyone who can reach the endpoint. The host endpoint is not a security boundary.

内容来自项目 README(GitHub)↗

链接

同类插件

查看整个分类 →

社区评论

评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。