← 返回列表
D

dsh-keyword-context

v0.1.0 · 0 天前发布

DeepSeek Harness (DSH) plugin — inject context when user input or model output hits configured keywords, with toggleable/configurable rules and model-editable memory.

deepseekharnessdshdsh-plugincontextmemorykeywordcordis

README

dsh-keyword-context

当用户输入或模型输出命中配置的关键词时,向模型注入上下文。可开关、可配置,并可选择允许模型读写记忆。

功能

  • 命中注入:监听用户输入(agent/inbox/inserted)与模型输出(session/eventassistant/message),命中任一触发词即激活对应规则,把配置的上下文注入到后续模型上下文。

  • 可开关:设置页「启用上下文注入」总开关,关闭后立即停止注入并清空命中状态。

  • 可配置:触发规则(关键词 ↔ 注入文本)、记忆条目(key/value)均可在设置页增删改,持久化到 config.json

  • 模型可读写记忆:开启「允许模型读写」后,注册 memory_get / memory_set 两个工具,并在注入上下文中附上工具用法说明。
  • 安装

    powershell
    dsh plugin --profile web add dsh-keyword-context

    然后确认 ~/.dsh/profiles/web/cordis.patch.yml 里挂载了 host 半区:

    yaml
  • insert:

  • - id: keyword-context
    name: dsh-keyword-context

    重启 dsh web,浏览器 Ctrl+F5 强刷。

    结构

    ```
    dsh-keyword-context/
    ├── package.json # dsh.client.platform: "web" + exports ./client
    ├── config.json # 持久化配置(enabled / allowModel

    查看完整 README →

    版本兼容矩阵

    DSH 版本状态说明
    dsh@0.1.0-rc.6 ✅ 兼容 cordis patch ✅
    dsh@0.1.0 ✅ 兼容 标准 patch ✅
    dsh@0.2.0 ⚠️ 待验证 待实测(API 可能在变)
    dsh@0.3.0+ ❓ 未知 尚未发布

    💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正

    元数据

    License
    MIT
    npm
    dsh-keyword-context
    Repo
    git+https://github.com/QQQW114/dsh-keyword-context.git
    Engines
    {}
    Weekly DL
    0
    Monthly DL
    0
    dsh.bundle
    {"client":{"platform":"web","inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-settings"]}}