XMoon/dsh-subagent-router2

@xmoon76/dsh-subagent-router

DSH model-facing delegation tool that routes continuable/one-shot subagents to a model-selected LLM provider and model

包名
@xmoon76/dsh-subagent-router
版本
0.3.1
最近更新
2026年8月21日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:XMoon/dsh-subagent-router

Usage walkthrough

The following flow is a practical model-facing invocation. Confirm that the profile has registered the router tools (subagent_route / subagent_fork_route) and that the selected provider/model route is configured before dispatching.

Start a continuable child (background by default)

subagent_route requires description / prompt / provider / model. The model chooses only the LLM route; deployment configuration still owns the backend and the default scheduling policy:

{
  "description": "say hi",
  "prompt": "Say hello briefly, then state which model you are using.",
  "provider": "codex",
  "model": "gpt-5.6-luna"
}
// continuable result: started subagent 

A continuable result acknowledges inbox acceptance and returns a durable id; it does not contain the child reply. Wait for the DSH settlement notice or inspect the child transcript by id.

Wait for a fresh child synchronously

Set run_in_background: false when the next action depends on the child's result. The call then runs the child in the foreground and returns its final output instead of an id:

{
  "description": "review implementation",
  "prompt": "Review the diff and report concrete risks.",
  "provider": "codex",
  "model": "gpt-5.6-luna",
  "run_in_background": false
}
// foreground result: the child's final output

Continue for more turns

Use the official send_message control tool to queue the next FIFO turn after the child has been accepted:

{
  "subagent_id": "",
  "message": "What kinds of engineering tasks are you best at?"
}
// message queued as the next turn for subagent 

The child keeps its creation-time provider/model across later turns and cold resume. There is no mid-session route switch.

Companion controls

Continuation controls are separate from this package and must be mounted from the official @deepseek-ai/dsh-tool-subagent-control plugin; background job controls come from the official @deepseek-ai/dsh-tool-jobs plugin:

ToolPurpose
send_messageQueue the next turn for a durable child (FIFO).
list_agentsList or recall started children.
interrupt_agentInterrupt a running child turn.
job_outputCollect a background one-shot job's output.
job_killStop a background one-shot job.

Official delegation tools (subagent, subagent_fork) are separate: they are instances of @deepseek-ai/dsh-tool-subagent bound to one fixed deployment route. This router never replaces them — see Official tool coexistence below.

Start a dynamic fork (one-shot)

subagent_fork_route is mounted by the bundle by default (fork + one-shot), so a forked child that inherits the parent's completed turns is available out of the box. The instance uses a non-conflicting name (never the official subagent_fork):