zero360-TYN/dsh-sage-mode ↗★ 0

dsh-sage-mode

提供仅限读取和搜索工具的只读咨询会话模式 适合需要安全地进行代码理解、教学或错误分析,避免模型误改代码的用户。

包名
dsh-sage-mode
兼容性
待验证
版本
1.0.0
许可证
MIT
最近更新
2026年10月13日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:zero360-TYN/dsh-sage-mode

Usage

InputEffect
/sageEnter Sage mode: read-only tools only, advisory prompt injected
/sage Enter the mode and send that question as your next message (images/files allowed)
/sage offLeave; the full toolset is restored immediately

Typical uses: understanding an unfamiliar implementation, learning a codebase, comparing design options, brainstorming, pasting a stack trace. When you are ready to actually change code, run /sage off.

Entering the mode changes what the model can call, not the sandbox: hidden tools are removed from the request's tool catalog entirely, and anything that still reaches dispatch is refused by a tools.guard() that returns "let the user run /sage off first".

Configuration

The row's defaults live in cordis.patch.yml. Your own overrides belong in the profile's user layer ($DSH_HOME/profiles//cordis.patch.yml). A patch replaces the targeted row's whole config, so restate every key you want to keep:

- id: sage-mode
  name: dsh-sage-mode
  config:
    command: sage          # command name (default: sage)
    sectionOrder: 3255     # prompt section placement
    allowedTools: [read, grep, web_search]   # keep only these
    optionalTools:         # optional deps: adopt their read-only tools when present
      dsh-ops: [ops_glob, ops_grep, ops_inspect_local_file]
    section: |             # the full advisory prompt
      ...

Unknown keys fail at load instead of being ignored, so a typo cannot silently disable your configuration. Missing keys fall back to their defaults.