← 返回列表
D

qmd-autosearch

v0.1.0 · 2 天前发布

DSH plugin: auto-supplement QMD semantic search when the model greps/globs a knowledge-base directory

dsh-plugindeepseek-harnessdshqmdsemantic-searchmcpknowledge-base

README

qmd-autosearch

自动补搜插件:当模型在知识库目录执行 grep / glob 搜索时,自动补充一次 QMD 语义检索,并把结果注入模型上下文。

DeepSeek Harness 插件(dsh-plugin)。零外部依赖。

功能

  • 自动触发:模型在 QMD 集合对应的目录内执行 grep / glob(顶层调用)即触发,无需显式调用

  • 语义补搜:QMD 单次查询(lex + vec,服务端 LLM 重排),检索范围限定在配置的 collections

  • 智能查询词:以最近的用户消息(任务要求)为语义主查询;消息过短或与搜索主题无关时,回退使用 grep pattern

  • 异步注入:结果排队到 agent.inbox.nextStep,下一个 pre-step 注入模型上下文,不阻塞当前工具调用

  • 防重复:同一 agent 内相同(工具、路径、pattern)签名只补搜一次

  • 容错:QMD 服务不可用或查询无结果时静默跳过,不影响原流程
  • 工作原理


    grep/glob 执行完成 → tools/result 钩子
    → 路径在触发范围内(由 QMD status 解析的集合路径)?
    → QMD query(collections 限定 + LLM 重排)
    → 结果排队 agent.inbox.nextStep
    → 下一个 pre-step 注入模型上下文(user 角色 system-reminder 风格)

    安装

    方式一:npm 安装(发布后可用)

    bash
    dsh plugin --profile web add qmd-autosearch

    方式二:本地路径引用(开发调试)

    查看完整 README →

    版本兼容矩阵

    DSH 版本状态说明
    dsh@0.1.0-rc.6 ❓ 未知 metadata 缺失
    dsh@0.1.0 ❓ 未知
    dsh@0.2.0 ⚠️ 待验证 待实测(API 可能在变)
    dsh@0.3.0+ ❓ 未知 尚未发布

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

    元数据

    License
    MIT
    npm
    qmd-autosearch
    Repo
    git+https://github.com/zhangzhenwen1/qmd-autosearch.git
    Engines
    {"node":">=18"}
    Weekly DL
    0
    Monthly DL
    0
    dsh.bundle
    {}