DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Infinite Context — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
I

dsh-infinite-context

Infinite Context

DeepSeek Harness 插件:多层级记忆管理、语义检索、结构化记忆和模型上下文感知,实现无限上下文。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:chocobo77/dsh-infinite-context#03321eff6007848a57c1b7fe23294e7548a199ad
README兼容性版本

兼容性与来源证明

Infinite Context 以 dsh-infinite-context 发布,当前版本为 0.1.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/8/29

版本

0.1.0stable
2026/8/29

相关插件

正在加载相关插件…

最新版
0.1.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/9/10
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 memory-context 分类下经过校验的插件。

Memory Plugin@openviking/dsh-memory-plugin适用于 DeepSeek Harness 的 OpenViking 记忆与上下文套件Contextdsh-context用于上下文洞察和管理的 DeepSeek Harness 插件,提供上下文仪表板和上下文命令,帮助了解上下文的构成及其演变过程。Weknora@wxg-prc-cpg/dsh-weknora适用于 DeepSeek Harness (dsh) 的 WeKnora 知识检索工具:通过自有知识库进行语义搜索、文档阅读以及 RAG/代理回答。Mnemondsh-mnemon面向 DeepSeek Harness 的可组合三层记忆控制平面:持久化运行时上下文、可搜索的项目文档、可插拔的长期记忆、受保护的策略、WebUI 和无头工具。

README

dsh-infinite-context

🇨🇳 中文 | 🇬🇧 English


简介

一个 DeepSeek Harness (DSH) 插件,通过多层记忆管理让长对话拥有「无限上下文」体验:

  • 渐进式压缩 — token 压力驱动,最老消息优先摘要,近期对话原样保留
  • 三层记忆金字塔 — short(近期原文)→ mid(LLM 摘要)→ long(合并摘要)
  • 持久化存储 — SQLite(node:sqlite),重启不丢记忆
  • 语义检索 — 记忆嵌入、索引,每轮注入最相关的 top-K 记忆
  • 三层去重 — 精确 + 归一化模糊 + 语义余弦,防止重复入库
  • 结构化记忆 — 四分类(user/feedback/project/reference)+ 索引 + 审计 + 忘得可见
  • 模型上下文感知 — 自动采纳 DSH 解析的真实模型 CTX,本地小模型提前压缩
  • 高价值过滤 — 只入库高价值工具结果,低价值工具自动过滤
  • 手动工具 — 10 个:search / status / index / maintain / model_probe / forget / consolidate / reset / force_compress / ingest

核心特性

特性说明
渐进式压缩compress_trigger_ratio: 0.85 — 上下文 >85% 才压缩;compress_target_ratio: 0.6 — 只摘要溢出部分
三层去重精确(hasText)+ 归一化(normalizeForDedup)+ 语义(cosine ≥ 0.92)
结构化记忆memory_index(MEMORY.md 索引)+ memory_maintain(审计)+ 忘得可见
模型 CTX 感知自动读取 DSH 模型目录的 contextWindow;Ollama 可选主动探测
高价值过滤denylist 过滤 23 个低价值工具;importance 分级(short=0.3/mid=0.6/long=0.6,long 继承批次 max)

架构

src/
├── types.ts              核心类型(无依赖)
├── embedder.ts           轻量级特征哈希嵌入器(无依赖)
├── vector-index.ts       内存向量索引(无依赖)
├── memory-store.ts       SQLite 持久化存储(无依赖)
├── token-budget.ts       CJK-aware token 估算(无依赖)
├── forgetting.ts         遗忘策略(无依赖)
├── memory-engine.ts      记忆引擎核心(无依赖)
├── model-context.ts      模型上下文跟踪器(无依赖)
├── model-probe.ts        主动探测:llama/ollama/openai
├── config.ts             schemastery 配置解析
├── memory-context.ts     Cordis 服务(动态 CTX 感知)
├── memory-compaction.ts  压缩引擎(渐进式 + RAG + 清理)
├── OutputSanitizer.ts    工具结果清理
├── VectorRetriever.ts    RAG 检索/入库
├── strings.ts            共享字符串工具
├── core.ts               公共导出桶
├── index.ts              完整导出桶
└── tools.ts              10 个手动工具
tests/                    62 个单元测试

手动工具

工具说明
memory_search(query?, k?)语义检索持久化记忆
memory_status报告分层计数、预算、嵌入器、遗忘策略、模型 CTX
memory_index(limit?)MEMORY.md 风格结构化索引
memory_maintain只读审计:重复/冲突/过时
memory_model_probe(forceProbe?, model?)报告模型 CTX 来源,可强制探测
memory_forget执行遗忘扫描
memory_consolidate强制金字塔合并
memory_reset清空所有记忆
memory_force_compress(sessionId?)强制压缩指定会话
memory_ingest(text, source)手动入库一条文本(自动触发见 tools/result 回调)

配置参考

memory-context 配置

键默认值说明
storePathdsh-infinite-context.dbSQLite 路径;:memory: 禁用持久化
contextWindow94000模型上下文窗口(回退值;插件自动采纳 DSH 解析的真实窗口)
headroomRatio0.25系统/工具/输入/输出预留比例
modelProbe.enabled/kind/baseURLfalse可选主动探测(llama/ollama/openai)
embedder.kindlightweightlightweight(无依赖)或 transformers
budget.short/mid/long/retrieved10000/20000/5000/15000分层 token 预算
forgetting.minScore0.25低于此分数的记忆被遗忘
forgetting.maxMemories500记忆总数上限

memory-compaction 配置

键默认值说明
compress_trigger_ratio0.85上下文 >85% 预算时才压缩
compress_target_ratio0.6压缩目标水位(只处理溢出部分)
retain_recent_messages4最近 N 条消息永不压缩
rag_top_k3每轮注入的记忆数
rag_min_score0.3注入的最低相似度
rag_ingest_denylist内置 21 个低价值工具过滤列表
rag_ingest_importance0.3工具结果重要性(遗忘优先淘汰)

部署

# 方式一:通过 --patch 临时加载
dsh web --patch ./cordis.yml

# 方式二:安装到 profile
dsh plugin --profile web add .

# 方式三:手动复制到 DSH plugins 目录 + 编辑 cordis.patch.yml

测试

# 单元测试(62 个,无 DSH 依赖)
vitest run --config vitest.config.ts

# 类型检查
tsc -p tsconfig.typecheck.json --noEmit

Introduction

A DeepSeek Harness (DSH) plugin that gives long sessions an "infinite context" feel via multi-tier memory management:

  • Progressive compression — token-pressure driven, oldest-first summarization, recent context preserved verbatim
  • Three-tier memory pyramid — short (recent turns) → mid (LLM summaries) → long (consolidated summaries)
  • Persistent store — SQLite (node:sqlite), memories survive restarts
  • Semantic retrieval — memories embedded, indexed, and top-K spliced into context per turn
  • Three-layer dedup — exact + normalized fuzzy + semantic cosine, prevents duplicate ingestion
  • Structured memory — four classifications (user/feedback/project/reference) + index + audit + visible forgetting
  • Model-context awareness — auto-adopts DSH-resolved real model CTX, small local models compress early
  • High-value filtering — only high-value tool results ingested, low-value tools filtered
  • Manual tools — 10: search / status / index / maintain / model_probe / forget / consolidate / reset / force_compress / ingest

Key Features

FeatureDescription
Progressive compressioncompress_trigger_ratio: 0.85 — compress only when >85% full; compress_target_ratio: 0.6 — only summarize overflow
Three-layer dedupExact (hasText) + normalized (normalizeForDedup) + semantic (cosine ≥ 0.92)
Structured memorymemory_index (MEMORY.md style) + memory_maintain (audit) + visible forgetting
Model CTX awarenessAuto-reads DSH model catalog contextWindow; optional active probe for Ollama
High-value filteringdenylist filters 23 low-value tools; importance tiers (short=0.3/mid=0.6/long=0.6, long inherits batch max)

Manual Tools

ToolDescription
memory_search(query?, k?)Semantic search over persisted memories
memory_statusReport tier counts, budgets, embedder, forgetting policy, model CTX
memory_index(limit?)MEMORY.md-style structured index
memory_maintainRead-only audit: duplicates/conflicts/stale
memory_model_probe(forceProbe?, model?)Report model CTX source, force probe
memory_forgetRun a forgetting sweep
memory_consolidateForce pyramid consolidation
memory_resetErase all memories
memory_force_compress(sessionId?)Force compress a session
memory_ingest(text, source)Manually ingest a text (auto-triggered via the tools/result callback)

Deployment

# Option 1: Temporary load via --patch
dsh web --patch ./cordis.yml

# Option 2: Install into profile
dsh plugin --profile web add .

# Option 3: Manual copy to DSH plugins dir + edit cordis.patch.yml

Testing

# Unit tests (62, no DSH dependency)
vitest run --config vitest.config.ts

# Type check
tsc -p tsconfig.typecheck.json --noEmit

See ARCHITECTURE.md for the full design. See DSH插件开发经验.md for development lessons learned. See REVIEW.md for the code review report.