rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Domush/dsh-plugin-context-mode
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Native DeepSeek Harness (DSH) plugin adding full, native support for context-mode by Mert Koseoglu.
Context Mode is a lightweight, local-first context optimization engine designed to prevent LLM context window degradation and token bloat. In standard agentic loops, commands and tools often dump dozens or hundreds of kilobytes into the context window, causing:
Context Mode solves this by keeping tool outputs out of the model's context window:
ctx_search) to retrieve only the exact snippets it needs on demand.ctx_resume).ctx_execute: Sandboxed execution of Node.js, Python, or shell code with an output cap of 16 KB. Full outputs are indexed; intent-guided semantic filtering retrieves only relevant excerpts.ctx_batch: Batch execution of multiple shell commands, concatenated and indexed into SQLite FTS5 for unified querying.ctx_index: Explicitly index files, raw text, or web URLs into SQLite FTS5 without expanding the context window.ctx_search: Query indexed chunks across sessions or worktrees using BM25 and Trigram Reciprocal Rank Fusion (RRF_K=60).ctx_resume: Rebuild context state and memory across compaction boundaries or subagent delegates with compact state blocks (<= 2048 B).ctx_stats: Real-time analytics on intercepted bytes, kept-out bytes, and estimated token savings.ctx_doctor: Health diagnostics for SQLite FTS5 tokenizers (Porter + Trigram) and runtime environments.ctx_purge: Clean up indexed sources or wipe Context Mode tables.node:sqlite (DatabaseSync) with virtual FTS5 tables (porter unicode61 and trigram).tools/post-execute waterfall lifecycle.replaceTriggerBytes (default 4 KB) are safely intercepted and replaced with head/tail previews and search handles.en.json, zh.json).dsh-plugin-context-mode
Run the plugin install command in your terminal:
dsh plugin install dsh-plugin-context-mode
package.json)Add the plugin to your DeepSeek Harness profile dependencies:
{
"dependencies": {
"dsh-plugin-context-mode": "^1.0.0"
},
"dsh": {
"profile": {
"bundles": [
"dsh-plugin-context-mode"
]
}
}
}
In your cordis.patch.yml or DSH Settings:
- insert:
- id: dsh-plugin-context-mode
name: dsh-plugin-context-mode
config:
enabled: true
autoIntercept: true
replaceTriggerBytes: 4096
injectSystemPrompt: true
dbPath: "" # defaults to ~/.context-mode/context.db
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
boolean | true |
Enable or disable the plugin. |
autoIntercept |
boolean | true |
Automatically intercept and index tool outputs exceeding threshold. |
replaceTriggerBytes |
number | 4096 |
Output byte threshold to trigger interception & FTS5 indexing. |
injectSystemPrompt |
boolean | true |
Inject Context Mode tool guidelines into model system prompt. |
dbPath |
string | "" |
Optional custom SQLite database path. |
ctx_executeExecute code in a child process with output bounding (16 KB cap). Commands run with DSH's permissions and environment; outputs exceeding the cap are automatically indexed into SQLite FTS5.
{
"language": "shell",
"code": "git log --oneline -n 100",
"intent": "merge commit"
}
ctx_batchExecute multiple shell commands in batch and query results.
{
"commands": ["pnpm test", "git status --short", "cat package.json"],
"queries": ["dependencies", "test failed"]
}
ctx_indexIndex a file, URL, or string into SQLite FTS5.
{
"path": "docs/architecture.md",
"source": "architecture-doc"
}
ctx_searchSearch indexed content using BM25 + Trigram RRF.
{
"queries": ["PostToolUse", "FTS5 schema"],
"limit": 5
}
ctx_statsCheck your context savings report.
{
"scope": "all"
}
SQLite database is located at ~/.context-mode/context.db.
Tables:
events: Turn-by-turn journal tracking executed commands, intercepted outputs, and token savings.sources: Catalog of all indexed files, batches, and outputs.chunks: Virtual table using FTS5 tokenize = 'porter unicode61 remove_diacritics 2' for English and stemmed terms.chunks_tri: Virtual table using FTS5 tokenize = 'trigram' for exact code symbols, paths, and substrings.meta: Key-value configuration metadata.MIT © Domush
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness、deepseek-harness-plugin、deepseek-harness-plugins。