dsh-subagent-profile
Verifieddsh-subagent-profile Β· v0.3.3 Β· MIT Β· Web UI
Dispatch one-shot subtasks to derived subagents with per-task overrides (preset/model/provider/reasoningEffort/persona/tool whitelist), a runtime-derived cost guard, a subagent-profiles service, observability metadata, and a web-GUI settings page plus a d
Install
dsh plugin add dsh-subagent-profile Confirm the layer applied with dsh --profile default --dump-config β see the install guide.
Source
Tags
Creators
Readme
dsh-subagent-profile
For DeepSeek Harness (DSH).
Thinking, Fast and Slow: System 1 is fast and cheap, System 2 is slow and careful. The built-in
subagentgives every subtask the same brain as its parent β no way to tell them apart.dsh-subagent-profilelets you pick per subtask: research with a fast brain, deep work with a careful one, saved as named profiles.
Why this plugin
Built-in subagent |
dsh-subagent-profile |
|
|---|---|---|
| Per-subtask model / preset | β same brain for every subtask | β pick per subtask |
| Reusable named setups | β | β profiles |
| Tool-scope narrowing | β | β
whitelist β© parent, run_code always removed |
| Cost guardrails | β | β model / effort / tokens / depth capped |
| GUI management | β | β settings page |
- Per-subtask control over the child's brain.
dispatchsets, per subtask: which preset (composition), which model, which reasoning effort, which tools, and the token cap. A research subtask and a coding subtask can run with completely different setups β something the plainsubagenttool can't do (it only inherits the parent). - Named, reusable profiles. A profile is one bundle of preset + model + reasoning effort + tool scope + persona. Save "research" as
researcher(reasoning off, search-only tools) and dispatch withdispatch(profile="researcher"); two built-ins ship (swap-standard= full standard coding toolkit,researcher), and you can add/edit/remove your own in the settings page. - Fully observable. Every result reports the effective profile / preset / model / reasoning effort; logs are tagged
[dsh-subagent-profile].
Installation
dsh plugin --profile web add dsh-subagent-profile # published package
dsh plugin --profile web add ./dsh-subagent-profile # from a local checkout
Restart dsh web. This is a standard bundle plugin: it provides the dispatch tool, the profile provider, the subagent-profiles service, the /subagent-profiles/* loopback management routes, the settings page (γε Agent ζΉζ‘γ), and the dispatch tool-call card in the web GUI. On startup it also self-installs an agent preset β orchestrator (γηΌζθ
樑εΌγ) β pick it in the new-session preset picker. The sync is idempotent and re-runs on every startup, so upgrading the plugin updates the preset.
Usage
1. Configure sub-agent profiles
Profiles are managed in the settings page β each one bundles preset + model + reasoning effort + tool scope (and optionally a persona), and can be enabled, disabled, edited, or reset individually. Two built-ins ship:
| Profile | Purpose |
|---|---|
swap-standard |
switch the child to the full standard coding toolkit |
researcher |
deep reasoning off, search-only tools |
Profiles live in ~/.dsh/subagent-profiles.json and take effect immediately (edits are made from the settings page).


2. Dispatch per subtask β the dispatch tool
dispatch(
profile: "researcher", // preset + model + reasoning effort + tool scope
prompt: "Survey the DSH plugin ecosystem and compare direct competitors",
run_in_background: true
)

Safety model
Delegation never lets a subagent gain more power than you already have β this is the default, with no configuration:
- Tools only shrink. A child's tool set is the intersection of the profile's tools and the parent's tools, and
run_codeis always removed. - Approval is always "never". A child cannot widen its own permissions; operations that need approval are rejected automatically.
- Cost is capped. Model, reasoning effort, tokens, and recursion depth are all bounded; out-of-range values fail loudly instead of silently downgrading.
Data
~/.dsh/subagent-profiles.jsonβ the profile registry (edited from the settings page).~/.dsh/subagent-profiles.state.jsonβ the plugin's enable/disable switch (default enabled).~/.dsh/subagent-profiles.failed-traces.jsonβ the failure ledger (dispatch failure traces).~/.dsh/.agent-presets/orchestrator/β the self-installedorchestratoragent preset (synced from the bundledpresets/orchestrator/on every startup).
DSH_HOME is respected and defaults to ~/.dsh. Uninstalling the plugin removes the three data files above and the self-installed orchestrator preset directory (other plugins' presets are left untouched); re-installing or re-launching re-syncs the preset and regenerates the data files.
Known limitations
- Background one-shot dispatch requires
@deepseek-ai/dsh-jobsand@deepseek-ai/dsh-tool-jobsto be loaded; otherwise it fails with "dispatch: εε°ζ΄ΎεδΈε―η¨οΌηΌΊε° jobs ζε‘". - Continuable mode goes through the DSH standard composition path, so the
presetswap andreasoningEffortare ignored (the child inherits the parent preset at the default reasoning effort). - Continuable tool gate is a plugin-side mitigation: the child's
allowis pre-computed as a closed set β parent tool set βrun_codeβdeny, then intersected withallow. Assumption: continuable inherits the parent preset, so the child's tool set β the parent's. Failure condition: any host behavior change that makes the child's tool set differ from the parent's (not only preset swap β e.g. a future preset swap, composing a different tool set) means the parent set can contain tools the child does not have, sotools.restrictthrows "unknown tool" and this mitigation automatically degrades to fail-loud (conservatively safe); it must then be replaced with a true parent β© child intersection once the upstream provides a provider guard seam.
Repository structure
dsh-subagent-profile/
βββ index.mjs # host side: the plugin itself (dispatch tool, profile provider, service, HTTP routes)
βββ lib/
β βββ client.js # browser side: settings page + dispatch tool-call card
β βββ core/ # host-side modules (lightweight layering)
β βββ pure.mjs # dependency-free pure functions (sanitize / prune / guard math β unit-tested)
β βββ shims.mjs # the single @deepseek-ai import facade (guards fail loud, helpers degrade softly)
β βββ catalog.mjs # tool-name β zh / category tables (zero-dep)
β βββ catalog-cache.mjs # process-shared catalog snapshot (models / presets / tools, TTL cache)
β βββ cost-guard.mjs # runtime capability checks (provider / model / reasoning effort)
β βββ decision-trace.mjs # decision trace (gates / effective / settled) + failure ledger
β βββ delegation.mjs # background one-shot settling + child usage collection
β βββ dispatch-gates.mjs # pre-dispatch gates (whitelist / cost / intersection / budget)
β βββ dispatch-guard.mjs # concurrency + per-parent token budget guard
β βββ dispatch-schema.mjs # dispatch tool input/output schema declarations
β βββ dispatch-tool.mjs # dispatch tool factory (defineTool + execute + syncTool)
β βββ escape.mjs # escape-hatch allow store
β βββ evolution-ledger.mjs # dispatch ledger (jsonl) + governance audit
β βββ evolution-summary.mjs # T1 aggregate summaries + advice text
β βββ http-routes.mjs # settings loopback HTTP routes
β βββ intersection.mjs # tool-intersection pure core
β βββ presets-sync.mjs # bundled preset self-install (hash-gated sync)
β βββ profile-provider.mjs # the `profile` subagent provider
β βββ profiles-store.mjs # profile registry store + switch persistence
β βββ whitelist.mjs # system-trust preset whitelist
βββ presets/orchestrator/ # bundled "orchestrator" agent preset (self-installed, synced on every startup)
βββ cordis.patch.yml # bundle patch: inserts the plugin row into the host composition
βββ .gitea/workflows/ci.yml # bare-CI (Gitea Actions; needs an Act runner on the server)
βββ package.json # metadata, files whitelist, exports (test / test:bare / preflight scripts)
βββ scripts/
β βββ preflight.mjs # preflight: preset-tree reconciliation + no hardcoded version badge (zero-dep)
β βββ leak-scan.mjs # public-release gate: scans all history + worktree for sensitive patterns
βββ docs/
β βββ screenshots/ # README screenshots
βββ test/ # host-side tests (node:test, zero extra deps; 352 cases β bare subset in CI, junction local)
β βββ README.md / README.zh.md # test directory guide (EN/ZH) β two-tier split explained
β βββ harness/ctx.mjs # fake Cordis ctx + ~/.dsh isolation
β βββ pure / input-schema / catalog-integrity.test.mjs # bare tier (import-free, runs in bare CI)
β βββ *.test.mjs # junction tier (local only): characterization / facade / gating / persist / recycle /
β # cost-guard / continuable-guard / decision-trace / dispatch-guard / escape-hatch /
β # evolution-* / csrf / label-preset-sync / percall-spec / trust-label / audit-meta / β¦
βββ README.md / README.zh.md # this document (EN/ZH)
βββ LICENSE
Contributing
Found a bug or have an idea? Open an issue or submit a pull request β all contributions are welcome.
If this plugin has been useful to you, please give it a β on GitHub β it helps others find it.
Credits
The bundled orchestrator agent preset was inspired by dsh-liangshen (ζ’η₯樑εΌ) from dsh-web-ui, licensed under Apache-2.0. Thanks to its author for the great work.
License
MIT β Copyright (c) 2026 muzyLink