DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Agents Playbook — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins

dsh-agents-playbook

Agents Playbook

Agent-Playbook 的 DeepSeek Harness 插件:多代理认领、隔离的 git worktree,以及强制执行的验收检查。“完成”是退出代码,而不是声明。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add dsh-agents-playbook@0.8.0
README兼容性版本

兼容性与来源证明

Agents Playbook 以 dsh-agents-playbook 发布,当前版本为 0.8.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
npm
Registry 更新时间
2026/10/16

版本

0.8.0stable
2026/10/13
0.7.1stable
2026/10/9
0.7.0stable
2026/10/8
查看其余 2 个版本收起版本
0.6.3stable
2026/9/18
0.6.2stable
2026/9/17

相关插件

正在加载相关插件…

最新版
0.8.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
1.6 MB
文件数
90
Surface
web
许可证
MIT
发布源
npm
周下载
364
安全扫描
✓ v0.8.0 扫描通过
查看源码 ↗项目主页 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 agents-orchestration 分类下经过校验的插件。

Headless@deepseek-ai/dsh-headlessdsh one-shot bundle:基于 dsh-base 的直接核心 Agent/Session 运行器,不包含 Host、HTTP 或浏览器层Experimental Agent Team Profile@deepseek-ai/dsh-experimental-agent-team-profile在一个实验性捆绑包中提供 Agent Teams 协作、工具和 Web UIExperimental Ralph Bundle@deepseek-ai/dsh-experimental-ralph-bundle使用全新代理执行明确请求的重复工作。Hindsight Coding Agents@vectorize-io/hindsight-coding-agents面向编程代理的仅反思式 Hindsight 长期记忆(可插拔支持多种运行框架:opencode、……),自动在后台导入(无需设置 CLI)。

README

dsh-agents-playbook

A DeepSeek Harness plugin for Agent-Playbook.

The engine's whole thesis is one sentence: "done" is an exit code, not a claim. A task's acceptance_checks are shell commands, and recording it done re-runs them and refuses if any fail. This plugin brings that loop into the harness — with multi-agent attribution and isolated git worktrees.


Why a plugin, and what it deliberately does not do

OwnsSystem
Truth — backlog, claims, journals, acceptance checks, worktreesAgent-Playbook (the engine)
Convenience — agent identity, context injection, model-facing toolsthis plugin (the harness)

The plugin never re-implements a gate. Every action translates into a pb invocation. If something cannot be expressed as a pb call, the engine does not support it yet — and inventing a second opinion about "done" is exactly the failure this design refuses.

It also shells out rather than importing the engine. That is not laziness: every engine command reports refusal with process.exit(), so an in-process call would terminate the harness instead of returning an error. As a subprocess, the exit code remains the contract.


What it gives you

1. Multi-agent writes stay attributable

Fan-out is the point, and it is where naive setups lose data. The plugin stamps every engine call with a real identity:

VariableMeaning
PB_AGENT_IDwho is writing (defaults to the harness session id)
PB_SESSION_IDwhich harness session it came from
PB_PARENT_AGENT_IDthe spawning agent, for sub-agents
PB_AGENT_CHAINthe full delegation path (root,sub,grand)
PB_CLAIM_TOKENproof of entitlement to the task this agent holds
PB_RUNTIMEdsh, so records show which host wrote them

So a sub-agent writes as itself and is recorded as itself, while the engine can still verify it was entitled to touch its ancestor's claim. A refused write is flagged ownership: unproven — never silently dropped, never silently allowed.

Under the hood the engine serializes every state write through one lock and an atomic replace, and stamps each journal row with a monotonic seq. "Who wrote first, who wrote last, and on whose behalf" is a recorded fact, not an inference from colliding timestamps.

2. Isolated worktrees, gated merges

worker actions drive a real git worktree per task:

create   → open a slot (atomic: one live slot per task, no orphan worktrees)
status   → ahead / behind / uncommitted / head
exec     → run a command INSIDE the worktree
verify   → run the task's acceptance_checks INSIDE the worktree
merge    → gated by merge-ready; refuses unless the branch actually carries verified work
remove   → tear the slot down

The merge gate reads the branch, not just the journal: a worktree that is missing, dirty, or has zero commits ahead of its base cannot be merged, and a verification that has gone stale is reported rather than trusted.

3. The constitution survives compaction

Before each agent step the plugin stages a short context block on the agent's inbox:

[agent-playbook]
playbook: my-project v0.3.6
loop: loop-7 — finish the worktree lifecycle
north star: Make "done" mean a verified exit code, not a claim.
backlog: 2 todo · 1 in_progress · 0 blocked · 4 done
in progress: T1 (alice)
task in hand: [T1] Do the thing
done means these exit 0:
  $ npm test
  $ node scripts/pb.mjs validate
Rule: "done" is an exit code, not a claim. Record with `pb record` — it re-runs the checks and refuses on failure.

The North Star, the active loop, the task in hand and its checks are re-injected every step, so a long session or a compaction cannot lose the plot. When the backlog has nothing actionable the block is suppressed (quietWhenIdle) rather than burning tokens.

4. The playbook's own skills are loadable

The project's skills/<id>/SKILL.md files are registered as harness skills, so its procedures load the same way the harness's built-in ones do — including mode-local skills, because the ENGINE's own resolution decides which are active (nothing is re-implemented in the plugin).

They are namespaced playbook-<id>: a harness skill is invoked by slot (/name) and a playbook skill by path, so a bare id could shadow an unrelated harness skill. The catalog is discovered live on each list, so a skill added to skills/index.yaml appears without a restart; bodies load on demand rather than at discovery.

A loaded body is prefixed with its routing, because a playbook skill that says "follow the process" is useless without knowing which process file the engine's skills-first routing keys on:

# Playbook skill: run-task
This skill belongs to the workspace playbook. Operate the project through it:
- skill file: skills/run-task/SKILL.md
- canonical process: processes/run-task.yaml — follow it step by step
- record work with the `playbook` tool; "done" is an acceptance check exiting 0, not a claim

Install

The plugin carries the engine, so this is one install — no separate engine checkout and no version to keep in step by hand.

dsh plugin --profile <profile> add dsh-agents-playbook

That is the whole install. It installs the package AND enables it: dsh plugin forwards to pnpm inside the profile directory, then reconciles dsh.profile.bundles — a dependency whose package declares dsh.bundle.patch is appended to the layer stack automatically. There is no bundle list to edit by hand.

Verified end to end — after that one command, $DSH_HOME/profiles/<profile>/package.json contains both

"dependencies": { "dsh-agents-playbook": "^0.6.2" },
"dsh": { "profile": { "bundles": ["@deepseek-ai/dsh-base", "…", "dsh-agents-playbook"] } }

and dsh --profile <profile> --dump-config composes - id: agent-playbook.

Prerequisite: pnpm

dsh plugin is a pnpm forwarder, so pnpm must be on PATH:

npm install -g pnpm        # or, if you have corepack: corepack enable pnpm

Without it the command fails with dsh: pnpm not found on PATH (exit 127).

What does NOT work: plain npm install

npm install dsh-agents-playbook does not enable the plugin. It installs a package into whatever directory you happen to be in, and the harness only reads $DSH_HOME/profiles/<name>/package.json — so the plugin lands where nothing looks for it and nothing appears to happen. That is the confusing "installed but DSH wants more steps" state.

If you would rather manage the dependency yourself, the manual equivalent is to install it into the profile directory and add it to the bundle list — the package declares dsh.bundle.patch, so the name alone is the mount:

{ "dsh": { "profile": { "bundles": ["@deepseek-ai/dsh-base", "dsh-agents-playbook"] } } }

Two things that look like problems but are not

  • pnpm peers check reports five missing peers. It inspects only the profile's own node_modules. The harness resolves its packages through $DSH_HOME/profiles/node_modules — a directory of junctions the launcher maintains, one level above the profile — so @deepseek-ai/cordis, dsh-agent, dsh-llm, dsh-tools and schemastery all resolve at runtime.
  • pnpm edits pnpm-workspace.yaml. Installing a package published minutes earlier makes pnpm record a minimumReleaseAgeExclude entry. That is its supply-chain guard recording a deliberate exception, not an error.

After installing

  1. Reload the session. The profile is composed at boot (patchReload is live for the web profile and startup for headless), so a profile that gained a package wants a restart.
  2. Give the workspace a playbook. The plugin is deliberately dormant until it finds one.

Then scaffold one for the workspace you want to operate, from the agent itself:

playbook action=init

That writes .agents-playbook/ (engine + master + runtime files) into the session workspace, hydrates it with the engine's own init, and validates the result — all from the bundled engine. The workspace copy then takes over, so the playbook is self-hosting: it can scaffold further playbooks, and it does not depend on the plugin being installed to keep working.

If you already have a playbook (or want it somewhere else), point the plugin at it instead:

- insert:
    - id: agent-playbook
      name: 'dsh-agents-playbook'
      config:
        playbookPath: ''                  # '' → discover: nested locations, then ancestors
        playbookDir: '.agents-playbook'   # where action=init scaffolds
        injectContext: true
        quietWhenIdle: true
        maxContextChars: 4000
        commandTimeoutMs: 120000

There is no engine install requirement to load the plugin: it looks for a playbook in the well-known nested locations (.agents-playbook, .agent-playbook, .playbook, agent-playbook) and then walks up from the session workspace. The plural .agents-playbook is canonical; the singular .agent-playbook is a supported legacy alias for projects scaffolded before the spelling settled. It stays dormant when there is none — except that action=init always works, because that is what the bundled engine is for.

Which workspace it uses. The session's own directory, resolved from the harness workspace registry — never the server's process cwd. When no workspace can be resolved the plugin refuses (unknown workspace) rather than guessing, because guessing is how a playbook gets scaffolded into an unrelated project.

Which engine runs, and where

Two separate things, deliberately:

meaning
which enginethe workspace's own copy if it has one, else the bundled one
which playbookalways a real workspace playbook — never the plugin's vendored copy

A workspace playbook therefore wins over the bundle, and the bundle is never used as a target. That matters because the plugin now contains a playbook-shaped tree: a naive ancestor walk would "discover" it and operate on the wrong project.

Configuration

FieldDefaultMeaning
playbookPath''Absolute path, or '' to discover (nested locations, then ancestors).
playbookDir.agents-playbookWhere action=init scaffolds a playbook.
injectContexttrueStage the constitution on the agent's inbox each step.
quietWhenIdletrueStay silent when nothing is todo or in_progress.
maxContextChars4000Character cap on the staged block.
commandTimeoutMs120000Per-pb-invocation timeout.
stopGatetrueHold a turn open (once per claim) when it ends with an unresolved claim.

The Stop gate

Everything else in this plugin asks the agent to verify. The gate is the one place the harness refuses: when a turn is about to end while this agent still holds a claim it never resolved, the turn is held open and the model is told which task to resolve and how.

It is built on agent/turn-stopping, which fires as a turn would otherwise close; a handler that calls agent.steer() keeps it open. That contract is pinned by scripts/test-dsh-stop-gate.mjs and was confirmed in a live session — the handler steered at fire 1 and the loop fired again for the same turn.

It is deliberately timid, because the harness documents the opposite failure: a handler that blocks unconditionally force-continues every step. So a given claim is reminded about at most once, the session caps its total, and the message says so. One extra step is a nudge; an unbounded one is a runaway. Set stopGate: false to make the loop advisory again.

The playbook tool

ActionWhat it does
statusOrient: backlog counts, active loop, guardrail state, recent records.
anchorRe-inject the constitution (North Star + current cycle).
nextShow the next claimable task and its checks, without claiming.
claimClaim it. Returns the claim token — pass it to a sub-agent so it can record on your behalf.
taskOne task's projection: status, holder, checks, gate quality, worker.
checkRun that task's acceptance_checks on demand.
recordRecord an outcome. status=done re-runs the checks and refuses on failure.
workerWorktree lifecycle: create / status / exec / verify / merge / remove.
initScaffold + hydrate a playbook from the bundled engine (works with none present).
unlockReport and (with force) clear a leaked lock.
repairCheck or rebuild the state projection from the append-only journal.

Delegating to a sub-agent

1. playbook action=claim                     → task + claim token
2. spawn the sub-agent with:
     PB_AGENT_ID=<sub>
     PB_PARENT_AGENT_ID=<you>
     PB_AGENT_CHAIN=<you>,<sub>
     PB_CLAIM_TOKEN=<token>
3. the sub-agent works in `worker create`/`verify` and records as ITSELF, proven
4. playbook action=worker workerAction=merge  → only after the gate opens

Development

npm run build:plugin          # bundle the engine into dsh-plugin/engine/ (generated, gitignored)
npm run pack:plugin           # build + `npm pack --dry-run` + manifest checks
node scripts/test-dsh-plugin-core.mjs    # host-independent logic (no harness needed)
DSH_PACKAGES=<path to @deepseek-ai> node scripts/test-dsh-plugin-index.mjs

core.mjs holds everything host-independent (identity, discovery, subprocess results, context rendering) so it is testable with plain node. index.js is the thin Cordis layer. The index suite loads the real module, registers the tool against a stub ctx, and executes it against a real playbook on disk; the bundle suite proves the shipped engine is complete, clean of this repository's state, and can bootstrap a workspace. Both skip cleanly when their prerequisites are absent, rather than failing for something the checkout cannot fix.

License

MIT