DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Infinite Context — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
I

dsh-infinite-context

Infinite Context

DeepSeek Harness plugin: multi-tier memory management, semantic retrieval, structured memory, and model-context awareness for infinite context.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:chocobo77/dsh-infinite-context#03321eff6007848a57c1b7fe23294e7548a199ad
READMECompatibilityVersions

Compatibility and provenance

Infinite Context is published as dsh-infinite-context and currently resolves to version 0.1.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
any
Release source
github
Registry updated
8/29/2026

Versions

0.1.0stable
8/29/2026

Related plugins

Loading related plugins…

Latest
0.1.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
any
License
MIT
Source
github
GitHub
★ 0
Weekly downloads
0
Last push
9/10/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in memory-context.

Memory Plugin@openviking/dsh-memory-pluginOpenViking memory and context bundle for DeepSeek HarnessContextdsh-contextA DeepSeek Harness plugin for context insight and management, with context dashboard and context command, for understanding how the context is made of, and how it evolves.Weknora@wxg-prc-cpg/dsh-weknoraWeKnora knowledge retrieval tools for DeepSeek Harness (dsh): semantic search, document reading and RAG/agent answers over your own knowledge bases.Mnemondsh-mnemonComposable three-tier memory control plane for DeepSeek Harness: persistent runtime context, searchable project documents, pluggable long-term memory, guarded strategies, WebUI, and headless tools.

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.