dsh-context-mode

DSH PLUGIN记忆与知识

仓库 icanfinish11/dsh-context-mode

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

为 DeepSeek Harness 提供上下文窗口优化:工具输出在进程内沙箱化,仅打印内容进入对话,并以 FTS5 知识库持久化会话记忆。

验证等级 L5 L5 · 运行验证通过
GitHub 星标 3 复刻 0 · 未关闭 issue 未标注
最近更新 2026-09-09 创建于 2026-09-09
README 5.6 KB 正文体量,越大说明说明书写得越细

安装

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

能做什么

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

dsh-context-mode:为 DeepSeek Harness 优化上下文窗口的 DSH plugin

  • 工具输出进程内沙箱化
  • 仅打印内容进入上下文
  • FTS5 知识库持久记忆
  • BM25 检索与索引工具
  • 系统提示词路由约束

适用场景

记忆数据库

上游标签

dsh-plugin

验证等级与安全审查

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 安装产物已确认 方式:沙盒安装执行
  • L4.4_RESOLVED_ARTIFACT 安装版本已解析 方式:沙盒安装执行
L5 · 运行已测 ✓ 通过
  • L5.1_INSTALL_PASSED_SANDBOXED 沙盒安装通过 方式:沙盒安装执行
  • L5.2_WEB_BOOT_READY Web 启动就绪 方式:Web 启动
  • L5.3_HTTP_SERVED HTTP 服务响应 方式:HTTP 请求
  • L5.4_PLUGIN_INVENTORY_ACTIVE 插件清单中已激活 方式:插件清单查询
— · 其它检查项
  • L4_0_SANDBOX 沙盒安装判定 方式:沙盒安装执行

风险详情

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

仓库档案

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

README 全文

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

dsh-context-mode

Context Mode (the MCP server that keeps raw data out of the context window) as
a self-contained DeepSeek Harness plugin package. This folder is its own
npm package (package.json declares dsh.bundle), so it installs and
publishes independently of the context-mode npm package.

The plugin loads context-mode's engine library in-process (build/server.js
of the dependency context-mode package — the same module the OpenCode/Kilo
native adapter imports) and registers the ctx_* tools natively into dsh's
tools registry under their bare names — no MCP child process, no
mcp__context-mode__ prefix. The engine is always taken from the original
author's published npm package; this repo ships only the dsh adapter.

Contents

Path Purpose
index.js Plugin module (name / inject / apply), engine location + registration
cordis.patch.yml dsh bundle patch (insert row id context-mode)
package.json npm metadata + dsh.bundle.patch manifest, depends on context-mode
scripts/dev-harness.mjs Engine-level test: mock ctx, tool registration + FTS5 round trip
scripts/dev-boot-probe.mjs Real dsh profile boot probe (dsh-app-boot), tool catalog check

What you get

context-mode surface dsh surface
ctx_execute / ctx_execute_file / ctx_batch_execute native dsh tools (sandbox subprocess, only printed output enters the conversation)
ctx_index / ctx_search / ctx_fetch_and_index native dsh tools (persistent FTS5 knowledge base, BM25 search)
ctx_stats / ctx_doctor / ctx_purge / ctx_insight native dsh tools
SessionStart routing-block hook context-mode:routing system-prompt section (dsh has no hook channel; the section plus the tool schemas are the enforcement surface)
session continuity (PreCompact/PostToolUse capture) not wired — dsh has its own session/compaction layers; use ctx_index explicitly for durable memory

All tools run the exact context-mode implementations, including security
routing (curl/wget/inline-fetch blocking), the executor's language matrix, and
the FTS5 content store. Storage defaults to dsh's own home
($DSH_HOME/context-mode, i.e. ~/.dsh/context-mode) so the knowledge base
is per-harness and never writes into another harness's config tree; set the
plugin storageDir (or CONTEXT_MODE_DIR/config) to override.

Install

Requirements: Node.js ≥ 22.5 and a running dsh profile. The context-mode
engine package is a regular dependency and is installed automatically; no
build step is needed for this plugin (pure JS).

From GitHub (the canonical install):

dsh plugin --profile web add icanfinish11/dsh-context-mode

From npm (once the dsh-context-mode package is published):

dsh plugin --profile web add dsh-context-mode

From a local checkout of this repo:

npm install                              # installs the context-mode engine dependency
dsh plugin --profile web add link:/path/to/dsh-context-mode

> If you develop with this folder checked out inside a context-mode repo
> clone (dsh/ next to the engine root), build the engine first
> (npm run build in the engine root) so the sibling layout resolves; a
> normal install never needs that.

Restart dsh web. Verify with ctx stats in a session, or:

node scripts/dev-boot-probe.mjs          # DSH_HOME + DSH_PROFILE env required

Engine location order

  1. config.enginePath (plugin config)
  2. CONTEXT_MODE_ENGINE env var
  3. the dependency context-mode package via Node resolution — the
    context-mode/package.json subpath export when upstream provides it,
    otherwise the package root resolved from its main entry by walking up to
    the context-mode package.json (works with the published package as of
    1.0.169, under npm flat/nested and pnpm store layouts)
  4. sibling layout (../build/server.js — dev inside the context-mode repo only)

If none resolve, the plugin degrades to routing-only and logs a warning; it
never fails the dsh profile boot.

Configuration

The plugin row id is context-mode (see cordis.patch.yml). Override
per-profile in $DSH_HOME/profiles//cordis.patch.yml:

- id: context-mode
config:
storageDir: ~/.dsh/context-mode        # isolate the FTS5 store
routing: true                          # inject the routing section
tools:
purge: false                         # hide destructive tools
upgrade: false                       # host-hook updater (default off)

Development

  • index.js resolves the engine via Node resolution first (dependency
    context-mode), then the sibling layout — the same code works published and
    in-repo.
  • CONTEXT_MODE_EMBEDDED_PLUGIN_TOOLS=1 is set around the engine import so
    context-mode skips its stdio transport boot and process-wide handlers
    (matching the OpenCode/Kilo in-process contract).
  • scripts/dev-harness.mjs runs the plugin against a mock ctx and proves the
    FTS5 ctx_index → ctx_search round trip; scripts/dev-boot-probe.mjs
    boots a real dsh profile and checks the registered tool catalog.

Credits

This plugin is an independent dsh adapter by icanfinish11. The engine it
loads is Context Mode by Mert Koseoğlu
(mksglu): , distributed on npm as
context-mode under the Elastic License 2.0. The engine is consumed as a
runtime dependency from the original author's published package — it is not
vendored or re-published here, and this repo contains no engine code.

常见问题

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

在 DSH 里执行 `dsh plugin --profile web add github:icanfinish11/dsh-context-mode` 即可。

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

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

dsh-context-mode 安全吗?

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

dsh-context-mode 支持哪些 DSH 版本?

上游记录的兼容版本包括 0.2.0-rc.2、0.2.0-rc.1、0.1.7-rc.2、0.1.7-alpha.2、0.1.6-alpha.2、0.1.6-alpha.1、0.1.5-rc.2、0.1.3-alpha.2。

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

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

dsh-context-mode 有哪些功能?

工具输出进程内沙箱化、仅打印内容进入上下文、FTS5 知识库持久记忆、BM25 检索与索引工具、系统提示词路由约束。

这条记录的数据可靠吗?

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

同名或近似条目

1 条
不同作者的仓库分开列,请确认你要装的是哪一个
记忆与知识
按星标排序,可作替代方案

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 万 星

icanfinish11 的其它插件

1 个

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