dsh-context

DSH PLUGIN记忆与知识

仓库 bowenliang123/dsh-context · npm dsh-context

记忆与知识 L5 · 运行验证通过 安全审查:低风险 可信度:金 可安装插件
安装这个插件

DSH plugin 上下文可视化与管理插件,提供 Context 面板与 /context 命令,透视上下文组成、演进与压缩事件。

验证等级 L5 L5 · 运行验证通过
GitHub 星标 1,982 复刻 62 · 未关闭 issue 未标注
最近更新 2026-10-11 创建于 2026-08-14
README 16.6 KB 正文体量,越大说明说明书写得越细

安装

可安装插件
在 DSH 里执行,装完用 dsh plugin list 确认已挂上;标了 L4 / L5 的命令已在沙盒里真实跑通
dsh plugin --profile web add dsh-context@0.66.1
兼容 DSH 版本0.2.0-rc.2 等 13 个版本版本不匹配时安装会报错
Node.js 要求未标注来自仓库 package.json 的 engines 字段
前置依赖无需要同时安装的同级依赖
npm 包名dsh-context可用 npm view 查看包信息

能做什么

4 项功能
字段来自项目仓库与公开索引,中文说明由本站标注

dsh-context:DeepSeek Harness 的上下文洞察与管理插件

  • 上下文仪表盘
  • /context 命令
  • 组成与趋势分析
  • 事件与文件活动

适用场景

记忆联网搜索

上游标签

cordis-plugindeepseek-harnessdeepseek-harness-plugindsh-externaldsh-plugindsh-plugins

验证等级与安全审查

L5 · 运行验证通过
自动化流程结论,不是人工审核
验证等级L5 · 运行验证通过在 dsh 沙盒中完成安装与运行冒烟——装得上、跑得起来
安全审查低风险静态分析结论,未标注不代表已通过审查
仓库健康度活跃按仓库活跃度与最近更新时间给出
可信度金综合仓库活跃度与验证结果

上面的结论来自上游最近一次自动化验证(2026-10-08): 同一套检查会在插件发新版后重跑,页面显示的是最新一次的逐项结果。

逐项检查结果

L1 · 已找到 ✓ 通过
  • L1.0_DEFAULTED_FROM_L3 由 L3 推定 默认通过——L3 安装规范已通过(全库 L3 扫描策略)
L2 · 结构化 ✓ 通过
  • L2.0_DEFAULTED_FROM_L3 由 L3 推定 默认通过——L3 安装规范已通过(全库 L3 扫描策略)
L3 · 安装规范 ✓ 通过
  • L3.1_INSTALL_COMMAND_PARSED 安装命令已解析 方式:安装规范解析
  • L3.2_DSH_VERSION_DECLARED DSH 版本已声明 方式:DSH 版本声明
L4 · 安装已测 ✓ 通过
  • L4.1_INSTALL_EXECUTED_CONFINED 受限沙盒内执行安装 方式:沙盒安装执行
  • L4.2_INSTALL_SUCCESS 沙盒安装成功 方式:沙盒安装执行
  • L4.3_ARTIFACT_CONFIRMED 安装产物已确认 方式:沙盒安装执行
L5 · 运行已测 ✓ 通过
  • L5.1_INSTALL_PASSED_SANDBOXED 沙盒安装通过 方式:沙盒安装执行
  • L5.2_WEB_BOOT_READY Web 启动就绪 方式:Web 启动
  • L5.3_HTTP_SERVED HTTP 服务响应 方式:HTTP 请求
  • L5.4_PLUGIN_INVENTORY_ACTIVE 插件清单中已激活 方式:插件清单查询

风险详情

  • 审查结论 通过
  • 结论说明 vet 静态分析未发现可疑行为,判定为干净(clean)。
  • 风险计数 严重 0 / 高 0 / 中 0
  • 风险详情 未发现严重或警告级问题。

仓库档案

记忆与知识
字段来自项目仓库与公开索引,中文说明由本站标注
作者 / 维护方bowenliang123仓库 dsh-context · 默认分支 未标注
分类记忆与知识memory
收录类型可安装插件声明了 dsh.bundle、可用 dsh plugin add 安装的条目
开发语言TypeScript仓库主语言
许可证Apache-2.0商用或二次分发前请确认条款原文
星标 / 复刻 / issue1,982 / 62 / 未标注收录时的数值,非实时
创建 / 更新2026-08-14 · 2026-10-11最后推送 未标注
本站收录2026-08-14首次进入本站目录的时间

README 全文

16.6 KB
作者原文,中文版优先;只做安全转义,不改内容

dsh-context



The best DeepSeek Harness plugin for Agent's context insights and management.

> Recommended and starred by DeepSeek Harness staff @tianyicui and @turtle1999 — see this post on X.

dsh-context provides full context lifecycle management features.
- Context Insights page — the cross-session overview as a first-level sidebar panel (beside Plugins and Automation tasks): KPI band with a 7-day token/cost usage chart, activity heatmap, aggregate composition ring, and filterable session cards that jump straight into any session.
- Context tab — an UI context dashboard for DeepSeek Harness's context stats, composition, trend, events, and messages.
- Fleet tab — the agent family's own page: the current agent, its parents, and every subagent as one live card each.
- Context panel — the same dashboard as a right-sidebar tab: pick Context on the sidebar's guide page and the panel opens beside the chat, agent network included.
- /context command — the slash command shows the context model for current context composition and recent context evolution.

Install / Update

Install on DeekSeek Harness web or desktop

Fill dsh-context in the Add plugin wizard's search box, and click Install:

Install with dsh cli

Install dsh-context plugin from DeepSeek Harness:

dsh plugin --profile web add dsh-context

Or update the dsh-context plugin:

dsh plugin --profile web update dsh-context@latest

Then start the web UI with dsh web. No build step, no restart.

Use it

Five surfaces, one story — what your agent is carrying, how it got there, and what it did with it:

Where What you get
Context Insights page Every session at a glance: usage, cost, cache hit, daily activity, and per-session context profiles — filtered by range, day, group, or search, one click to jump in.
Context tab The full dashboard: stats, composition, per-request trend, events, and file activity — in every session.
Fleet tab The agent network: the current agent, its parents, and every subagent, live.
/context command A centered modal with the same composition and context browser, without leaving the chat.
Preferences card Per-user defaults: view placement, trend granularity & mode, File Activity sort, and the system prompt prefix/suffix joined around every session.

🗂️ The Context Insights page

Click Context Insights / 上下文洞察 in the sidebar's panel list — the same row level as Plugins and Automation tasks — and the page opens as a full center-column panel:

Section The question it answers
KPI band How much am I using — sessions, billed tokens, estimated cost, and cache-hit rate over the picked range (7d / 30d / all).
7-day usage chart When did I spend what — each of the last 7 days' billed tokens and estimated cost as a bar pair, folded per turn off the sessions' own request times (not the session's last-active day).
Activity heatmap When do I actually work — the last 8 weeks of daily billed tokens; click a day to filter the sessions that were active on it.
Settings entry One row under the heatmap — the same guarded jump to this plugin's preferences as the Context tab's Plugin Info card.
Context Composition Where the context windows went, summed over the range's sessions.
Session cards Each session's profile: composition ring, billed tokens, turns, cost, and its workspace-group / project breadcrumb — sorted by recency, tokens, or context size, searchable, grouped by workspace. A card click opens the session.

📊 The Context tab

Open any session and click the Context / 上下文 tab:

Card The question it answers
Context Stats Turns, steps, human inputs, live tool calls — plus a cost estimated from the models.dev list prices (hover the ? for per-1M rates; DeepSeek peak/off-peak aware).
Token Stats Where the billed tokens went — the same total as the chat stats line under the composer, split by composition (system, tools, messages…) with the provider-exact output closing the ring, and the session's cache-hit rate in the corner.
Timing Stats How active time split across model calls, tool runs, and overhead.
Current Context What's in the window right now.
Context Trend Every request's size — and its story.
Context Browser What any request was actually assembled from.
Context Events When and why the window changed.
File Activity What the agent did to your files.

The headline occupancy and composition read the same official token-meter projections as the chat composer's context ring (contextPressure / contextBreakdown), so the figures always match what the ring tells you — the card's percentage is that same occupancy, printed with one decimal.

The Context Stats card's Agent Network cell (the billed tokens and estimated cost of the whole family) jumps to the Fleet tab.

Context Stats

Token Stats and Timing Stats

Context Stats

🧱 Current Context — what's in the context window now

A six-color stacked bar against the model's full window (hatching = free headroom): system prompt, tool schemas, user messages, injected context, assistant replies, tool results — each with its ≈token figure and share. When a conversation starts degrading, this is where you see which part is responsible.

📈 Context Trend — how the context grew and evolved by turn or steps

One stacked bar per model request — finer than per-message — so you watch the window grow turn by turn:

  • ✨ Step brief — three plain-language rows under the chart: User recalls the message that opened the turn, In lists what newly entered (usually the previous tool results), Response shows the reply and/or tools called. Click a row to open that exact message in the Context browser.
  • ✂ marks the events — compactions and prunes are pinned to the bar where they happened, so the drops explain themselves.
  • Read it your way — Step / Turn granularity, Total (cumulative makeup) or Delta (each request's signed change), and sideways scrolling through the whole session. In Delta mode, growth piles up above the baseline and a compaction dives below it:

  • Hover & pin — scrub for an instant tooltip; click to pin the full breakdown, with provider-reported Actual Prompt / Output / Cache next to the estimates.

  • Live linkage — hovering a bar previews that step's assembled context in the Context browser beside the chart; leaving the chart returns to your own pick.

🧭 Context Browser — open the box of any request

Pick Live (next request) or any retained step, and browse what that request was assembled from: seven collapsible categories expand into one row per element with its token price, and every element expands again into its actual content — the system prompt, each tool's JSON schema, message text, reasoning, tool arguments, and tool outputs. Skill content (the available-skills catalog, /skill invocations, and skill-tool loads) has its own Skill Injections category, so a stealthy skill's context footprint can't hide inside the injected-context and tool-result buckets.

  • Who provides each tool — every tool-schema row carries a best-effort source chip: tool-* first-party packages, dsh-* capability packages, mcp: proxies, or the exact plugin watched live from tools.register(). Sort by size / name, and filter every category by its own searchable fields:

  • Filter assistant replies by kind — the assistant category's search box carries Thinking / Tools / Answer chips, each with the shown step's message count (one reply can carry several); click one to keep only the matching replies, click again to clear:

  • Tool results open into the full call — the tool name and arguments with its OK/error status, the result body with line count and a Raw / Markdown toggle:

  • Image payloads render as cards — thumbnails with name, dimensions, stored size, and the official DeepSeek image-token estimate (the dsh multimodal pipeline, e.g. read_image results and image attachments):

  • Diff against the previous turn — signed delta badges per category (+N items, ±Nk tokens) tell you what a turn added or reclaimed at one glance. Steps older than a compaction are reconstructed from the removed-message archive — and the card says so when a step's makeup is only approximate.

⚡ Context Events — when and why the window changed

Every injection, compaction, prune, model switch, and plan-mode toggle — labeled with its producer (instruction file, plugin id, skill name), its net token delta (compactions show what they reclaimed), turn/step, and time. The Inject / Compact / Prune / Switch / Mode chips filter the log by kind, each carrying its whole-session event tally.

📁 File Activity — what the agent did to your files

One row per touched file — read, written, or searched — aggregated up to whichever step you pick on the trend chart:

  • Per-purpose counts with header chips doubling as filters (Read / Written / Searched / Images) and a path search box.
  • Line deltas — every edit/write contributes its estimated +added / −removed footprint, per file and summed.
  • Every mode counts — native tools, the Minimal preset's str_replace_editor, and the nested calls inside PTC run_code programs are all folded into per-tool rows.
  • Searches land on real files — matched files get their own ops rows with hit counts.
  • Click a row to expand its full operation log — every op jumps straight to the exact tool result in the Context browser.
  • Click a file name to open its preview in the right Sidebar, exactly as the built-in Files sidebar does — the same viewer, the same tab-per-file behavior. On a harness without that column the name opens on your system as before.

🚢 The Fleet tab

Open any session and click the Fleet / 编队 tab (right of Context) — the agent family on a page of its own, with room for the collaboration surfaces that follow:

🕸 Agent Network — the family portrait

The current agent, its parents, and every subagent — one card per agent: its title, live context size and window occupancy, a composition bar, and how long it has run for and how many steps it has taken. Edges fan out from each parent in the lineage's color — hover a card to light its whole chain and read the full breakdown in the detail strip; click to jump into that session's own Context tab. Running agents breathe with a green pulse on their incoming edge and turn over the harness's own rolling spinner beside their title, which settles into the same green dot the header's subagent list uses once the work is done; narrow panes fold the family into tidy rows — never a horizontal scrollbar.

The right Sidebar's Context panel keeps the same card inline, so the family stays one click away while you read the chat. Don't want the tab at all? Turn Fleet tab off in the preferences card — the card then lives on in that panel, and the Context tab's family cell opens it there whenever a Sidebar is served.

⌨️ /context command

Type /context (or pick it from the / menu) and press Enter:

A centered dialog opens with the Current Composition card and the Context browser — the same composition bar, per-step picker, and vs previous turn diff badges as the tab:

⚙️ Settings

The Context preferences card holds this plugin's per-user settings — default placement (the Context and Fleet conversation tabs, the right Sidebar panel, or both), the Fleet tab's own Show/Hide switch, trend granularity (Step/Turn), trend mode (Total/Delta), the trend duration curve (shown by default), tool and File Activity sort, and the sidebar insights entry. It lives on the Plugins page: the sidebar Plugins entry → the dsh-context bundle's page → its Configuration section (the card is served by the entry's live Config form).

The System Prompt · Prefix / Suffix rows hold free text joined at the very start / end of every session's system prompt, for all agents (subagents included) — a per-deployment persona or behavioral rule that rides the harness's own prompt assembly. Edits apply from the next turn; leave a row empty to disable it.

In-chart and in-card toggles stay per-view and never overwrite the stored preference.

Good to know

  • Estimates vs actuals — category figures use dsh's own fixed-density heuristic (the same one as its built-in token meter); the pinned trend details show provider-reported actuals next to them, and the Token card pairs its ≈-estimated composition shares with the provider-exact billed total.
  • Compatibility — works on @deepseek-ai/dsh 0.1.7-rc.2+ (the 0.1.7 line from rc.2 and the 0.2.0 line from rc.2), the V4 session-log generation, from one shape-driven code path. The per-release matrix and how it is verified: docs/compatibility.md.
  • I18n — UI in English and 简体中文.

Like it?

If dsh-context helped you understand what your agent is carrying around, a ⭐ on GitHub is much appreciated — and issues/PRs are welcome!

License

Apache-2.0

常见问题

7 问
答案由本站依据条目字段整理,不引用上游原文
dsh-context 怎么安装?

在 DSH 里执行 `dsh plugin --profile web add dsh-context@0.66.1` 即可。对应的 npm 包名是 `dsh-context`。

dsh-context 的验证等级是什么意思?

L5 · 运行验证通过。在 dsh 沙盒中完成安装与运行冒烟——装得上、跑得起来

dsh-context 安全吗?

低风险。vet 静态分析未发现可疑行为,判定为干净(clean)。

dsh-context 支持哪些 DSH 版本?

上游记录的兼容版本包括 0.2.0-rc.2、0.2.0-rc.1、0.1.7-rc.2、0.1.7-rc.1、0.1.7-alpha.2、0.1.6-alpha.2、0.1.6-alpha.1、0.1.5-rc.2。版本较多,只列出前 8 个。

dsh-context 用的是什么许可证?

上游标注为 Apache-2.0。商用或二次分发前请到仓库确认许可证原文。

dsh-context 有哪些功能?

上下文仪表盘、/context 命令、组成与趋势分析、事件与文件活动。

这条记录的数据可靠吗?

本站按仓库名去重后合并整理,字段以作者仓库与 npm 元数据为准;安装命令、仓库地址与 README 保持原文,带 L4 / L5 标记的安装命令已在隔离沙盒里真实跑通。

记忆与知识
按星标排序,可作替代方案

ruflo

ruflo

L3 · 安装规范通过 7.4 万 星

OpenViking

OpenViking

面向 DeepSeek Harness 的 OpenViking 记忆与上下文插件:pre-step 自动召回与画像注入、会话捕获、`vik

L3 · 安装规范通过 3.9 万 星

WeKnora

WeKnora

把 WeKnora 知识库接入 dsh 的四个只读工具:列出知识库、混合检索原文片段、按顺序还原单篇文档,以及直接取用 WeKnora 自己

L4 · 沙盒安装通过 3.3 万 星

distilly

distilly

Distilly — Distill how they think into reusable Skills for any Agent o

L4 · 沙盒安装通过 2.5 万 星

EverOS

EverOS

L4 · 沙盒安装通过 1.3 万 星

MemOS

MemOS

L4 · 沙盒安装通过 1.2 万 星

bowenliang123 的其它插件

1 个

插件的元信息来自作者仓库;分类、验证等级与安全结论的中文说明为中文整理,最近核验 2026-10-08。