ztc1522021381/dsh-context-mode ↗★ 0

dsh-context-mode

context-mode adapter for DeepSeek Harness: routes flood-prone tool calls into the context-mode MCP sandbox. Implements the PreToolUse deny + SessionStart routing equivalents that Claude Code gets from hooks. 适合需要减少大段工具输出对上下文占用,并配置工具拦截、截断与路由规则的用户。

Package
dsh-context-mode
Compatibility
Unverified
Cordis peer range
~4.0.5-alpha.1
Version
0.1.0
License
MIT
Last updated
Oct 26, 2026

Other repositories with this package name

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ztc1522021381/dsh-context-mode

配置

- id: context-mode
  name: dsh-context-mode
  config:
    enabled: true
    denyTools: [web_fetch]
    truncateTools: [pwsh, read, grep, glob]
    maxResultBytes: 20000      # Tier 2 阈值
    minCommandBytes: 0         # 短命令跳过 Tier 1 判定
    readThresholdBytes: 50000  # read 的 Tier 1 提醒线(Tier 2 仍截留)
    interceptSubagent: false
    sectionOrder: 3090         # MCP_SERVERS 是 3100
    serverName: ''             # 留空 = 自动探测

enabled: false 一行回到原生行为,MCP server 仍挂着。