DSH Hub

HuanLinOTO/dsh-plugin-yet-another-subagent

dsh-plugin-yet-another-subagent

UIWorkflow18 GitHub stars· updated 2026-09-24

Configurable subagent profile system: single subagent tool + profile param, with Web UI settings/real-time progress/subagent tree

Install

npx @deepseek-ai/dsh plugin --profile web add @huanlin/dsh-plugin-yet-another-subagent

Restart `dsh web` after install. Bundle APIs can change during the developer preview.

README badge

dsh-plugin-yet-another-subagent DSH Hub badge
[![DSH Hub](https://dshhub.dev/badge/dsh-plugin-yet-another-subagent.svg)](https://dshhub.dev/plugins/dsh-plugin-yet-another-subagent)

Paste this into your README. The star count updates with every catalog sync.

From the README

Excerpt from HuanLinOTO/dsh-plugin-yet-another-subagent, cleaned of badges and images.

<a href="https://dshfind.com/zh/plugins/huanlinoto/dsh-plugin-yet-another-subagent"><img src="https://dshfind.com/api/card/huanlinoto/dsh-plugin-yet-another-subagent?lang=zh" alt="dsh-plugin-yet-another-subagent card"></a>

yet-another-subagent

可配置的子代理(subagent)profile 系统,提供单一 subagent 工具 + profile 参数选择,支持 Web UI 设置、实时进度展示(工具调用/token/活动)、子代理树标签页、点击跳转子会话。

架构

单 bundle,双入口(host . + client ./client)。

不发布 ./invariant:本插件的工具/RPC/projection 注册均无独立可分歧的运行时观察(HMR 安全性由测试证明),无内容可校验——按 DSH 0.1.2-rc.1 收紧后的 invariant 规则(禁止空 installer)省略该入口及其全部接线。

  • Host 半(src/index.ts):
    • 单一 subagent 工具,通过 profile 枚举参数选择 profile(非每 profile 一个工具)
    • 复用官方 spawn provider,支持前台(foreground)和后台(continuable / one-shot)两种模式
    • Profile 状态通过 settings seam 持久化到 $DSH_HOME/settings.yaml
    • RPC CRUD:ya-subagent.profiles.* / .tools.list / .sessions.repair(/api 上的 exact Fetch route,经 connection.fetch.register 注册)
    • 两个 session projection:subagentProfile(父会话 childId→profileId 映射 + callId→childId)+ yaSubagentProgress(子会话实时 toolcall/token/活动状态);wire view 已做引用记忆化,适配 dsh 0.1.2-alpha.3 起 change feed 的 Object.is 下发门控(内容不变即静默)
  • Client 半(src/client/index.ts):
    • settings.section — Profile 编辑页
    • tool.call.toolview(key subagent)— SubagentCard 工具调用卡片
    • conversation.view(id subagent-tree)— SubagentTreeView 子代理树标签页

cordis.patch.yml 只禁用官方 tool-subagent(spawn 路径),保留 tool-subagent-fork(无名称冲突)。

配置

# cordis.patch.yml
- id: tool-subagent
  disabled: true

- insert:
    - id: yet-another-subagent
      name: '@huanlin/dsh-plugin-yet-another-subagent'
      config:
        profiles:
          - id: general
            label: General
            model: { kind: 'auto' }
            persona: { kind: 'inherit' }
            toolFilter: { kind: 'none' }
            maxDepth: 3
            backgroundMode: continuable
            builtin: true
        generalFixed: true

Profile 字段

字段类型默认值说明
idstring(小写字母/数字/连字符,1-32 字符)—Profile 唯一标识
labelstring—显示名
model.kind'auto' | 'manual'—auto 继承父代理模型;manual 指定
model.providerstring''Provider(仅 manual 时使用)
model.modelstring''模型 ID(仅 manual 时使用)
persona.kind'inherit' | 'custom''inherit'inherit 跟随部署人设;custom 自定义
persona.textstring''自定义人设文本(仅 custom 时使用)
toolFilter.kind'none' | 'allow' | 'deny''none'工具过滤策略
toolFilter.toolsstring[][]过滤工具列表
maxDepthnumber3最大递归深度
backgroundMode'continuable' | 'one-shot''continuable'run_in_background: true 时的后台策略
builtinbooleanfalse是否为内置 profile(仅展示用)

开发

pnpm install          # 安装开发依赖 + zod(唯一运行时 npm 依赖)
pnpm run typecheck    # tsc --noEmit(通过 ../dsh 解析 DSH 源码)
pnpm test             # vitest run
pnpm run build        # tsc + tsdown → lib/index.js, lib/client.js

类型检查

tsconfig.json 继承 ../dsh/tsconfig.base.client.json,通过 pnpm-workspace.yaml 的 packages/*/* glob 解析 DSH checkout 的源码。需在 ../dsh 存在 DSH checkout 的同级目录下运行。

运行

# 从 npm 安装(推荐):
dsh plugin --profile web add @huanlin/dsh-plugin-yet-another-subagent

# 本地引用(开发热更新)
dsh plugin --profile web add "link:D:/Projects/deepseek-harness/yet-another-subagent"

安装后重启 dsh web 进程,浏览器硬刷新(Ctrl+Shift+R)。

检查

…

Related plugins