dshbase

Plugin directory / Developer / dsh-subagent-profile

dsh-subagent-profile

Verified · install-tested on dsh muzyLink

✓ Actively maintained Builds on 4 official DSH packages

View on GitHub ↗ ← Back to plugin directory

3Stars
0Forks
0Open issues
Language
2026-08-23Last push
Cross-platformPlatform

What it does

DeepSeek Harness 子 Agent 派发方案化插件:按任务指定预设/模型/推理强度/工具范围,常用组合存成命名方案一键派发,内置成本护栏。

Our take
Works — verified, early-stage project

DeepSeek Harness 子 Agent 派发方案化插件:按任务指定预设/模型/推理强度/工具范围,常用组合存成命名方案一键派发,内置成本护栏。 It installs cleanly and boots without issues in our testing. It's early-stage but functional.

“Verified” means our automated CI actually ran dsh plugin add in a clean profile and it booted — nothing more. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.

README

dsh-subagent-profile

Subagent dispatch, profiled — the right agent for the right task (preset / model / reasoning effort)

License: MIT npm DSH
English · 中文

For DeepSeek Harness (DSH).

Thinking, Fast and Slow: System 1 is fast and cheap, System 2 is slow and careful. The built-in subagent gives every subtask the same brain as its parent — no way to tell them apart. dsh-subagent-profile lets 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. dispatch sets, 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 plain subagent tool 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 with dispatch(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 presetorchestrator (「编排者模式」) — 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).

Built-in profile list — editable, deletable, individually toggleable

Configure profiles — the full settings page with the new-profile form

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
)

dispatch tool-call card — every result shows what actually ran

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_code is 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-installed orchestrator agent preset (synced from the bundled presets/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-jobs and @deepseek-ai/dsh-tool-jobs to be loaded; otherwise it fails with "dispatch: 后台派发不可用:缺少 jobs 服务".
  • Continuable mode goes through the DSH standard composition path, so the preset swap and reasoningEffort are ignored (the child inherits the parent preset at the default reasoning effort).
  • Continuable tool gate is a plugin-side mitigation: the child's allow is pre-computed as a closed set — parent tool set − run_codedeny, then intersected with allow. 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, so tools.restrict throws "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

Install

🧩 Let your agent install it (recommended)

Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:

dsh plugin add dshbase-catalog

Then say "install dsh-subagent-profile for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.

This plugin is GitHub source (not published to npm) — install it straight from the repo:

Web profile:

dsh plugin --profile web add github:muzyLink/dsh-subagent-profile

Headless (CLI) profile:

dsh plugin --profile headless add github:muzyLink/dsh-subagent-profile

Test report

Verified: L1 install + L2 load + L3 runtime from GitHub source on dsh 0.1.0-rc.6.

Security: not yet scanned — our daily static scan will cover it shortly.

Share this badge

More in Developer

Browse all 7789 plugins →