dsh-subagent-model-notes:爲 Subagent 路由補充逐模型說明

前言

在 DeepSeek Harness(DSH)裏啓用子智能體(Subagent)後,你可以在官方 Subagent 設置裏授權一組 provider/model 路由,主智能體還能通過 list_subagent_models 發現這些選項。但授權列表裏通常只有提供商和模型名,沒有「什麼時候該選哪一個」的說明;對 pi-ai 等來源,模型目錄裏也不帶描述。主智能體在委派任務時,往往只能對着一串路由 ID 猜。

社區插件 dsh-subagent-model-notes(維護者 097794,分類:工作流)補的是這一層:在官方 Subagent 設置頁旁邊增加 Subagent model notes 頁面,爲每個可授權模型寫一條可編輯說明,並在組裝系統提示詞時,把當前 Session 實際可選路由對應的說明,注入到委派方智能體的 system prompt 裏(緊接在 subagent 工具指引之後),方便按你的規劃選子模型。

這是什麼

dsh-subagent-model-notes 是 DSH 的 profile bundle 插件(版本 0.1.0,MIT 許可證)。它不改動官方 Subagent 白名單,也不調用模型或改路由;說明只是給主智能體的指引,真正的允許列表仍由 @deepseek-ai/dsh-tool-subagent 與 Subagent 設置 enforce。

核心功能

下面介紹插件在資料中明確描述的能力。

  1. 設置頁:在 Settings → Plugins → Built-in plugin settings 中,位於官方 Subagent 條目下方,出現 Subagent model notes(order: 11)。頁面通過 ctx.configForms 讀寫 volatile 配置項 notes,並拉取 live 模型目錄與 subagent-model-selection-settings 白名單,列表與當前 Session 可選範圍對齊。

  2. 逐模型備註:每個可能被選的模型對應一行可編輯 note,保存後寫入 bundle 配置。

  3. System prompt 注入:Host 側監聽 system-prompt/assemble waterfall;讀取 Session 投影 subagentModelSelectionPolicy(無 policy 則插件不做任何事)。只保留 policy 裏出現的路由所對應的 note,在描述含 list_subagent_models 的工具指引段之後插入 subagent-model-notes 段;段內 interpolate: false,note 原文進 prompt,{{...}} 不會破壞模板。

  4. 行狀態標記(設置頁 UI):

標記 含義
Authorized 路由在當前 Subagent 白名單內,note 會進入 agent 的 system prompt。
Not authorized for subagents note 已保存,但未授權前不生效。
Not in the current catalog 模型暫不可用,note 仍保留。
  1. 純邏輯可測:路由過濾與段落拼裝主要在 lib/prompt.js,無 DSH 依賴,可用 Node 單測驗證。

安裝與啓用

需要帶插件系統的 DSH 構建(dsh.bundle + client modules),例如 README 寫明在 DSH 0.2.1-rc.2 desktop 上開發與驗證。package.json 中 engines.dsh 爲 >=0.2.1-rc.1 <0.3.0-0,Node >=22.19.0。

資料中的安裝步驟不是 dsh plugin add github:...,而是本地目錄安裝:

  1. 將本倉庫目錄 clone 或複製到穩定路徑(用戶自行獲取源碼;本文不展開 clone 命令)。
  2. 任選一種方式安裝爲 profile bundle:
    - Plugins 頁 → Add plugin → local directory → 選中該文件夾;或
    - 插件管理工具:對應該文件夾的絕對路徑調用 install_bundle。
  3. 本地目錄安裝是鏈接而非複製,請保留該文件夾位置。

Bundle 會新增一行 subagent-model-notes,含 volatile 的 notes 配置與瀏覽器編輯頁。

典型用法

  1. 打開 Settings → Plugins → Built-in plugin settings,在 Subagent 下方進入 Subagent model notes:
Settings → Plugins → Built-in plugin settings → Subagent model notes
  1. 爲已在 Subagent 設置裏授權的每個模型填寫 note,例如:cheap and fast — boilerplate and low-risk tasks。

  2. 保存。主智能體下一步組裝 system prompt 時纔會帶上 note;且只包含「已授權且寫了 note」的路由。

前提:當前 Session 啓用了 subagent model selection;未啓用時 Host 半段不會注入內容。

適用場景與注意

適合誰:已經在 DSH 裏配置 Subagent 模型白名單、又希望主智能體在委派時能看到「人工寫的選型說明」的工作流用戶。

兼容性:插件依賴 system-prompt/assemble、plugins.item、volatile Config、subagentModelSelectionPolicy 等面向插件的 API;README 說明這些在 0.2.1-rc.2 上較穩定,但不是公開兼容性承諾,升級 DSH 後可能需要跟進社區版。若 preset 在 waterfall 之後摺疊爲帶 complete persona 的配置(例如 minimal),notes 段會被去掉——與其他 system-prompt/assemble 插件共用的 harness 約束。

權限與安全:插件以當前 DSH 進程權限運行;安裝前請閱讀源碼與 MIT 許可證,確認 bundle 行爲符合你的環境策略。社區目錄 skillhub.cn 與 DeepSeek / 幻方無官方從屬關係,本文僅作插件事實介紹。

開發自測(維護者側):

node --test test/prompt.test.mjs

結尾

dsh-subagent-model-notes 在官方 Subagent 路由之上增加「逐模型說明 + system prompt 注入」,不替代白名單 enforcement。若你正在用 DSH 做子智能體委派,又缺一層可編輯的選型上下文,可以從目錄頁或 GitHub 獲取 bundle,按 README 做本地目錄安裝後,在 Subagent model notes 裏維護 note 即可。

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

小夜