cdxiaodong/dsh-llm-inspector
Project Overview项目介绍
This is a native plugin built exclusively for DeepSeek Harness, that bundles four independently toggleable features for LLM interaction management: reasoning effort control, external thinking content export, traffic analysis for LLM requests, and full session logging for auditing purposes. Each feature can be turned on or off via a simple YAML configuration entry in your DSH profile. To install the plugin, you can run the official DSH CLI command dsh plugin --profile <your-profile> add github:cdxiaodong/dsh-llm-inspector directly from your terminal. Pre-built output files are already committed to the Git repository, so no local build step is required after installation.
The plugin adapts its workflow to different types of LLM models. For open source models that return reasoning content in plain text, it captures the reasoning block directly from the output stream without any intrusive changes to the request flow. For closed source models from providers like OpenAI, Anthropic, and Google that encrypt native reasoning content, it uses an external thinking approach adapted from the oh-my-pi project to get readable reasoning output from the model. It is designed for DSH users who need to audit LLM interactions, control reasoning budget, or analyze model request traffic.
The plugin is released under the permissive MIT open source license. It exposes two public services that other DSH plugins can inject and use: one for taking snapshots of traffic statistics, and another for logging audit data and flushing logs to disk. If you enable the session persistence feature, all your LLM requests and responses, including sensitive content like reasoning processes and potential credentials, will be saved to local disk, so you must only enable this feature in a trusted environment and secure the log directory permissions.
这是一款专为 DeepSeek Harness 开发的原生插件,整合了四类可通过配置独立开关的核心能力:LLM 推理强度控制、外部思考(think)结果导出、模型请求流量数据包分析、全对话会话内容落盘审计。用户可通过 DSH 官方 CLI 命令直接从 GitHub 仓库安装,预编译产物已提交到代码库,不需要额外本地构建即可使用。
对不同推理模式的模型,插件提供适配的处理逻辑:对明文返回推理过程的开源模型,可直接零侵入抓取推理块;对推理过程加密的闭源厂商模型,它通过复刻 oh-my-pi 的外部思考思路,让模型把推理过程输出到可读取的工具参数中,方便开发者读取和分析。它适合需要审计模型交互、控制推理开销或分析模型请求的 DSH 用户使用。
插件采用 MIT 许可证开源,对外提供两个可被其他插件注入调用的服务,分别用于获取流量统计快照和写入审计日志。开启会话落盘功能后,插件会将包含推理过程、请求内容在内的全部会话数据写入本地日志,用户需要注意存储位置的访问权限,仅在可信环境开启该功能。外部思考触发率依赖模型遵循指令程度,不保证 100% 触发。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-llm-inspector(cdxiaodong/dsh-llm-inspector)
仓库:https://github.com/cdxiaodong/dsh-llm-inspector
本站详情页:https://www.yhbd.top/plugins/cdxiaodong-dsh-llm-inspector/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证未声明 · ⭐ 4 · 最近提交 2026-08-15 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
- Only 4 stars - very few users, little community feedback星标只有 4,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:cdxiaodong/dsh-llm-inspector
把 cdxiaodong/dsh-llm-inspector 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-llm-inspector
统一 LLM 请求/响应检查器 —— DeepSeek Harness 插件
一个插件收编四类能力,全部通过配置开关:reasoning 控制、外部思考(think)导出、流量/包分析、会话落盘审计。
功能
| 功能 | 实现机制 | 配置项 |
|---|---|---|
| reasoning 控制 | 挂 agent/request waterfall,改写 LlmCallConfig.reasoningEffort(关推理 / 调 budget) |
reasoningEffort |
| 外部思考导出 | 注册 think 工具(schema 自动流入请求体)+ systemPrompt 注入"先调 think"指令,再从 llm/stream 抓回 thoughts 参数 |
externalThinking |
| 流量/包分析 | 挂 llm/stream waterfall 拦截每个 chunk,按类型统计 token/字符、捕获 reasoning 与 tool-call 块 |
trafficAnalysis |
| 会话落盘审计 | 订阅 session/event + 命中的流式块,写入 audit.jsonl |
persistSession |
外部思考(external thinking)说明
对明文返回 reasoning 的模型(DeepSeek 等开源模型),本插件直接从 llm/stream 抓 reasoning 块,零侵入。
对加密推理的模型(OpenAI / Anthropic / Gemini),原生推理被厂商加密藏起。本插件复刻 oh-my-pi 的 externalThinking 思路:
reasoningEffort: 'none'关掉原生隐藏推理;- 注册一个
think工具(description 为 "private scratchpad; not shown to user"),其 schema 经ctx.tools.register()自动进入发往 LLM 的请求体; - 通过
systemPrompt.section()注入"回答任何问题前必须先调用 think"的指令; - 模型把推理写进
think的thoughts参数,本插件在llm/stream拦截该 tool-call 块并抓回、落盘。
⚠️ 与 omp 的差异:DSH 核心
LlmCallConfig刻意裁剪了tool_choice,因此本插件用 system prompt 强制 替代 omp 的 API 层tool_choice强制。这意味着 think 触发是"软强制",触发率取决于模型遵循度,不保证 100%。这是上架前需实测验证的已知边界。
安装
dsh plugin --profile <你的profile> add github:cdxiaodong/dsh-llm-inspector
配置
plugins:
dsh-llm-inspector:
reasoningEffort: 'none' # 可选:'none' 关推理,或 adapter 支持的 'low'/'medium'/'high'
externalThinking: true # 是否启用 think 导出
trafficAnalysis: true # 是否做流量/包分析
persistSession: true # 是否落盘审计
logDir: '.dsh-inspector' # 落盘目录
# thinkPrompt: '...' # 可选,覆盖默认强制提示
服务
插件对外提供两个 Service(可被其他插件 inject):
inspectorTraffic—— 流量统计:snapshot()返回{ calls, chunks, reasoningChars, thinkCalls, thinkChars, byKind }inspectorAudit—— 审计:log(tag, payload)/flush()
开发
npm install
npm run build # tsc 产出 lib/(已提交进 git,DSH 可直接从 Git 安装)
npm test # node --test,7 个零依赖测试
安全与信任声明
按 DSH 社区约定:GitHub topics 不是安全审核,也不是官方背书。本插件会拦截并(在开启 persistSession 时)落盘你的模型请求/响应内容,其中可能包含推理过程、代码、甚至凭证。请:
- 仅在可信环境开启
persistSession; - 注意
audit.jsonl的存储位置与访问权限; - 安装前自审源码(
src/index.ts,约 200 行)。
License
MIT
Nagi-ovo/dsh-visualize
omdsh-dev/dsh-data-agent
youdotcom-oss/agent-skills
Awu12277/dsh-stock-watch
dream12347/dsh-session-manager
yuezengwu/dsh-explain
merenguesL/dsh-tool-normalizer
1321928757/dsh-mysql