deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
DeepSeek Harness (DSH) Web 客户端插件:在右侧详情列显示当前会话的 Token 用量、消息目录(全部历史) 与 工作区文件树。跨平台(macOS / Windows / Linux)。
English: A right-side panel plugin for the DeepSeek Harness web UI. It shows token usage with per-part breakdown, a collapsible full-history message outline (click to jump to the message), context pressure, and a workspace file tree (click a file to open it with your system default app). Cross-platform: macOS / Windows / Linux.
Install (GitHub, recommended — no build needed):
dsh plugin --profile web add github:GIGHT111/dsh-workspace-inspector dsh --profile web # restart to activateRequirements:
dshinstalled andpnpmonPATH. After restarting, the panel opens on the right side; close it with ✕ and reopen it with the 📊 Overview button in the session header.
tokenUsage 会话投影。contextPressure 投影。双面(dual-face)插件:
| 半面 | 入口 | 职责 |
|---|---|---|
| host | lib/index.js(src/index.ts) |
注册三个 webserver 精确路由:GET /__dsh-workspace-inspector/list?path=<abs> 返回单层目录条目(目录+文件+size+hidden);GET /__dsh-workspace-inspector/outline?session=<id> 重放会话日志重建完整消息目录;GET /__dsh-workspace-inspector/open?path=<abs> 用系统默认应用打开文件(macOS open / Windows Invoke-Item / Linux xdg-open)。list/open 仅允许 host cwd 或已注册 workspace 根之下的绝对路径(Windows 大小写不敏感);均 Cache-Control: no-store。 |
| client | lib/client.js(src/client/index.tsx + src/client/matching.ts) |
认领右侧 details 列(single/session,priority -1 遮蔽默认 DetailsPanel),有会话时自动打开右侧列;✕ 一次关闭,会话头部「概览」按钮重新打开。消息目录 key 计算在 matching.ts(纯函数,可单测)。 |
client bundle 遵循官方 __ModuleLoader__.load({ id, factory }) 协议:平台模块(react 等)external,由浏览器模块表应答;其余依赖内联。
npm install # devDeps: esbuild / typescript / @types/*
npm run typecheck
npm run build # 产出 lib/index.js + lib/client.js + lib/types
npm run test:host # host 路由行为 + 完整消息目录重建(含边界)
npm run test:client # client 消息目录 key 纯逻辑
# 需要 pnpm 在 PATH 中
dsh plugin --profile web add /path/to/dsh-workspace-inspector
仓库已提交构建产物 lib/,从 Git 安装无需执行任何构建脚本:
dsh plugin --profile web add github:GIGHT111/dsh-workspace-inspector
# 或带分支/提交:github:GIGHT111/dsh-workspace-inspector#<branch>
Install from GitHub (English) — this repo ships its built
lib/, so no build step is needed on install:dsh plugin --profile web add github:GIGHT111/dsh-workspace-inspectorPin a stable commit with
#v0.1.0(or any tag/commit) if you prefer.
安装后重启 web profile:
dsh --profile web
之后每次修改插件代码只需 npm run build 并刷新页面(bundle 内容变更走 client HMR;manifest/行结构变更需再次重启)。
npm install # 安装构建依赖(仅开发需要)
npm run typecheck && npm run build && npm run test:host && npm run test:client
npm pack # 生成 dsh-workspace-inspector-<version>.tgz(npm pack 自动包含 lib/ + README + LICENSE + cordis.patch.yml)
*.tgz 也可直接安装:
dsh plugin --profile web add /path/to/dsh-workspace-inspector-0.1.0.tgz
可在 profile 的 cordis.patch.yml 中覆盖该行配置:
- id: workspace-inspector
config:
maxEntriesPerDir: 1000 # 单层目录最多返回条目数
ui-conversation 的 DetailsPanel 占用(当前无任何代码会打开它,处于休眠态);本插件以更低 priority 遮蔽它并在会话存在时自动打开。卸载插件后恢复原状。tokenUsage/contextPressure 来自 host 端 token-meter 投影(本会话累计)。CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。