@sshirkit/dsh-orchestrator 0.8.5 → 0.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +139 -93
- package/README.zh.md +210 -0
- package/lib/delegate.js +4 -1
- package/lib/gate.js +43 -3
- package/lib/index.js +469 -36
- package/lib/rules.js +5 -2
- package/lib/supervise.js +45 -9
- package/package.json +2 -2
- package/README.en.md +0 -164
package/README.md
CHANGED
|
@@ -1,128 +1,147 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
*Start from 28th October*
|
|
4
|
+
|
|
5
|
+
<div align="center">
|
|
4
6
|
|
|
5
|
-
<div align="center">
|
|
6
|
-
|
|
7
7
|
# DSH Orchestrator
|
|
8
8
|
|
|
9
9
|
</div>
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
####
|
|
12
|
+
#### **A powerful model plans, low-cost models do the work — the dispatch mode plugin with hard tool isolation for DeepSeek Harness**
|
|
13
13
|
|
|
14
|
-
[](https://github.com/SShiRkiT/dsh-orchestrator)
|
|
15
15
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
16
16
|
[](https://github.com/SShiRkiT/dsh-orchestrator)
|
|
17
17
|
[](https://nodejs.org)
|
|
18
18
|
[](package.json)
|
|
19
19
|
[](LICENSE)
|
|
20
20
|
[](https://github.com/SShiRkiT/dsh-orchestrator/stargazers)
|
|
21
|
+
[](https://www.npmjs.com/package/@sshirkit/dsh-orchestrator)
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
**English** | [简体中文](README.zh.md) · [Key differences](#why-do-you-need-this-plugin-alongside-native-subagent-and-agent-team) · [Core Features](#core-features) · [Installation](#installation) · [Configuration](#configuration) · [Contributing & Community](#contributing--community)
|
|
23
24
|
|
|
24
25
|
</div>
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
|
|
27
28
|
<div align="center">
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
|
|
30
|
+
## Core Features
|
|
30
31
|
</div>
|
|
31
|
-
DSH 客户端自带了 `subagent` / `workflow`,官方也有 `@deepseek-ai/dsh-experimental-agent-team-profile`(Agent Team),但它们在实际高强度开发中仍有三个痛点——而这正是 **DSH Orchestrator** 独有的设计核心:
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
| --- | --- | --- |
|
|
35
|
-
| **主代理总忍不住自己动手** | **靠自觉(软提示词)**:主代理 / Team Lead 手里依然握有 `read`、`edit`、`bash` 等全套工具,聊几轮就经常脱轨亲自去读文件、跑命令,瞬间撑爆主上下文 | **白名单式驱动(Whitelist-Driven Hard Gate)**:主代理默认仅放行 12 项规划与委派核心工具(`allowedTools`),其余一切宿主读写/终端工具及未来新增的 MCP/第三方插件工具一律自动隐藏并在执行层强制拦截(连 `run_code` 嵌套偷调也拦),**逼迫 Main Agent 100% 只做规划与验收,Subagent 100% 只干苦力活** |
|
|
36
|
-
| **便宜模型干活卡死/跑偏** | **运行期黑盒**:派出后只能干等结束或超时,或者靠 `wait_agent` 阻塞轮询 | **后台事件日志定时巡检 + 强模型动态纠偏**:后台定时器直接读取运行中 Worker 的会话事件日志(读取与汇总本身不调用模型),汇总运行时长、轮次、新增工具调用与最后输出;异常或超时时以一条轻量摘要通知唤醒主代理,由强模型判断后精准纠偏 |
|
|
37
|
-
| **大批量同构任务** | 原生 `workflow` 让模型手写任意 JS 脚本,容易失控且模型路由不统一 | **声明式 `orchestrate` 流水线**:`items × stages` 结构化扇出与多阶段流水线,单项失败隔离、支持 JSON Schema 强校验,全部 Worker 强制走便宜的子代理路由 |
|
|
33
|
+
### 1. A powerful Main Agent and low-cost Subagents (independent panel, immediate updates)
|
|
38
34
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
In the dedicated **Dispatch mode panel** below the composer, the main-agent and subagent model routes are fully independent:
|
|
36
|
+
- **Main Agent**: choose your strongest flagship model to focus on clarifying requirements, splitting tasks, correcting course, and accepting final results.
|
|
37
|
+
- > For example, `gpt-astra-6` or `claude-opus-5.5`
|
|
38
|
+
- **Subagent**: choose a slightly less capable but very inexpensive model with high throughput. **Every Worker launched through `delegate` or `orchestrate` must share this low-cost route**
|
|
39
|
+
- > For example, `deepseek-v4.1-flash` or `gpt-luna-6`
|
|
40
|
+
- **Anti-burn protection**: dispatch fails with an error if no subagent model is configured
|
|
44
41
|
|
|
45
|
-
|
|
42
|
+
## In your `prompt` or `AGENTS.md`, you can instruct the main agent in the current workspace to pass `provider` / `model` parameters when dispatching subagents, specifying which model to use for the current `session` \ `workspace`
|
|
46
43
|
|
|
47
|
-
在输入框下方的**「调度模式」专属面板**中,主代理与子代理的模型路由完全解耦:
|
|
48
|
-
- **主代理(Main Agent)**:配置为你最强的旗舰模型(例如 `gpt-astra-6`、`claude-opus-5.5` 等),专门负责需求澄清、任务切分、途中纠偏与最终结果验收。
|
|
49
|
-
- **子代理(Subagent)**:配置为能力稍弱但极其便宜、高吞吐的模型(例如 `deepseek-v4.1-flash`、`gpt-luna-6` 等),**所有通过 `delegate` 和 `orchestrate` 派出的 Worker 强制共用这条便宜路由**(除非用户在当前消息里明确点名要求临时换模型)。
|
|
50
|
-
- **防烧钱保护**:如果未配置子代理模型,派发时会直接报错拦截
|
|
51
44
|
|
|
52
|
-

|
|
53
46
|
|
|
54
|
-
### 2.
|
|
47
|
+
### 2. A hard whitelist gate: the main agent plans and accepts results; subagents execute
|
|
55
48
|
|
|
56
|
-
|
|
57
|
-
-
|
|
49
|
+
Instead of relying on prompts asking the main model to use subagents more often, the plugin installs two guards at DSH's tool-definition outlet (`tools.definitions`) and execution layer (`tools.guard`), using a **whitelist-driven** approach. The definition layer trims the tool table visible to the model in real time, treating global tools and tools in scopes such as `ops_*` equally; the execution layer rejects any calls that slip through. Both layers read the current configuration on every request or call, without creating `tools.restrict` event storms, avoiding tool-visibility churn and prompt-cache invalidation from the official tool-hiding mechanism.
|
|
50
|
+
- **Main Agent stripped of all execution tools**:
|
|
58
51
|
<div align="center">
|
|
59
|
-
|
|
60
|
-
> ### DEFAULT_ALLOWED_TOOLS
|
|
61
|
-
>
|
|
62
|
-
> _`delegate
|
|
63
|
-
>
|
|
64
|
-
> ###
|
|
65
|
-
>
|
|
66
|
-
>_
|
|
67
|
-
>
|
|
68
|
-
> ###
|
|
52
|
+
|
|
53
|
+
> ### DEFAULT_ALLOWED_TOOLS permits only 12 planning, delegation, and read-only session tools by default
|
|
54
|
+
>
|
|
55
|
+
> _`delegate`, `orchestrate`, `send_message`, `interrupt_agent`, `todo_write`, `ask_user_question`, `compress`, and five read-only session log tools._
|
|
56
|
+
>
|
|
57
|
+
> ### All file access, search, and terminal tools, plus any future MCP or third-party plugin tools, are automatically hidden and blocked at execution time
|
|
58
|
+
>
|
|
59
|
+
>_(`read` / `edit` / `write` / `apply_patch`), (`grep` / `glob`), (`bash` / `pwsh`), `subagent` / `workflow`_
|
|
60
|
+
>
|
|
61
|
+
> ### Even nested calls through run_code are blocked. To allow additional tools, check them under Allowed Tools on the right of the panel.
|
|
69
62
|
</div>
|
|
70
63
|
|
|
71
|
-
-
|
|
72
|
-
-
|
|
64
|
+
- **Subagents retain the full toolchain**: dispatched Workers are exempt from the gate and read or write files, run tests, and inspect errors in their own contexts. When finished, they return only a concise conclusion for the main agent to review.
|
|
65
|
+
- **Switch at any time**: turn off Enable dispatch mode to restore host tools without reopening the session. Plugin dispatch tools remain disabled, and gates for a bound inspection turn still take priority.
|
|
66
|
+
|
|
67
|
+
### 3. Periodic background inspection of event logs and correction by the powerful model
|
|
73
68
|
|
|
74
|
-
|
|
69
|
+
Low-cost Subagents can occasionally get stuck on complex shell escaping or errors. The plugin includes a background inspector driven entirely by logs:
|
|
70
|
+
- **Reading the logs makes no model calls**: a background timer directly reads running Workers' session event logs at the configured interval (600 seconds by default), summarizes elapsed time, rounds, new tool calls, and the latest output, then combines them into a notice that wakes the main agent. Reading and summarizing make no LLM requests
|
|
71
|
+
- However, **waking the Main Agent for judgment and steering still consumes Main Agent tokens**: supervision compresses continuous polling into one summary plus one decision; it does not make the entire supervision feature free.
|
|
72
|
+
- **The powerful model makes a quick assessment**: after receiving an inspection summary, the main agent needs only a small number of tokens to decide:
|
|
73
|
+
- **A) Progress is normal**: reply with one line, `巡检:正常`, and end the turn while the subagent continues.
|
|
74
|
+
- **B) Correct course**: call `send_message` to inject corrective instructions directly into the running subagent, specifying the right approach or telling it to skip a blocker.
|
|
75
|
+
- **C) Stop wasted work promptly**: call `interrupt_agent` to interrupt a subagent that has gone off track. If it is later reactivated with `send_message`, supervision automatically resumes and resets its notice count.
|
|
75
76
|
|
|
76
|
-
便宜模型充当 Subagent 时,偶尔会在复杂的 shell 转义或报错上打转。插件内置了纯日志驱动的后台巡检器:
|
|
77
|
-
- **巡检读取本身不调用模型**:后台定时器直接读取运行中 Worker 的会话事件日志,按设定的巡检间隔(默认 600 秒)汇总它的运行时长、轮次、新增工具调用与最后输出,合并成一条通知唤醒主代理。读取与汇总环节不发起任何 LLM 请求
|
|
78
|
-
- 但**唤醒主代理后的判断与纠偏仍会消耗主代理的 token**:巡检的价值在于把「持续轮询」压缩成「一条摘要 + 一次决策」,而不是让整个巡检功能零消耗。
|
|
79
|
-
- **强模型一眼把关**:主代理收到巡检摘要后,只需极少 Token 即可做出决策:
|
|
80
|
-
- **A) 进展正常**:回复一行 `巡检:正常` 结束回合,让子代理继续跑;
|
|
81
|
-
- **B) 途中纠偏**:调用 `send_message` 直接向运行中的子代理注入修正指令(指明正确写法或跳过卡点);
|
|
82
|
-
- **C) 及时止损**:调用 `interrupt_agent` 中断失控的子代理(若后续再用 `send_message` 重新唤醒它,巡检会自动重新接管并重置通知计数)。
|
|
83
77
|
|
|
84
|
-

|
|
85
79
|
|
|
86
|
-
|
|
80
|
+
*Inspection and correction in practice: a low-cost subagent got stuck on shell quotes and backslash escaping. After a scheduled inspection woke the main agent, it supplied the correct syntax directly through `send_message` to get the worker back on track.*
|
|
87
81
|
|
|
88
|
-
### 4.
|
|
82
|
+
### 4. `delegate` and `orchestrate`, built for dispatch mode
|
|
83
|
+
|
|
84
|
+
- **`delegate` (asynchronous tasks on demand / parallel fan-out)**:
|
|
85
|
+
Dispatch self-contained, independent tasks (goal + allowed files + acceptance commands + fallback on failure). Multiple calls in the same turn start multiple Workers in parallel. The plugin injects a Simplified Chinese response instruction into every subagent's prompt and requires it to finish with a final summary in its reply, without calling `send_message` to report to its parent; the closing message is delivered to the main agent automatically.
|
|
86
|
+
**`writeScope` (required, `string[]`)**: declare the files or directories this worker may modify. Supported forms are exact files (`src/index.js`), directories (`dir/` or `dir/**`), and the global root (`*`). Relative paths are normalized lexically against `cwd`, with case-insensitive deduplication on Windows. Omitting the field produces `write-scope-missing`; an empty array or invalid path produces `write-scope-invalid`.
|
|
87
|
+
- **`orchestrate` (declarative batch pipelines)**:
|
|
88
|
+
Process a batch of items (`items`, 1–64) through a fixed set of stages (`stages`, 1–8), with `maxConcurrency` (1–16, default 4) controlling concurrency. Supports single-stage parallel fan-out and multistage **per-item pipelines without a global barrier**: an item enters stage 2 as soon as its stage 1 finishes, without waiting for slower items. Supports strict stage-level JSON Schema validation and per-item failure isolation.
|
|
89
|
+
**`writeScope` (required, `string[]`)**: one top-level declaration applies to the entire batch, which **holds its write scope atomically**. The normalized scope is injected into each stage's prompt as a boundary reminder.
|
|
90
|
+
- **Single-writer exclusion (enforced before dispatch)**: `delegate` holds a lease per subagent; `orchestrate` holds one for the entire batch. Both share a process-wide lease table and check for overlaps across tools. Any overlap raises `write-scope-conflict` **before any subagent starts**, including the conflicting path, lease holder, expiration time, and `agentsStarted: 0`, preventing Workers from overwriting the same file concurrently. Leases are released idempotently on `subagent/end`, `agent/disposed`, in `orchestrate`'s `finally` (including errors and aborts), and when the plugin is unloaded, with a 30-minute TTL as a backstop against leaks.
|
|
89
91
|
|
|
90
|
-
- **`delegate`(按需异步单派 / 并行扇出)**:
|
|
91
|
-
用于派发自包含的独立任务(目标 + 允许修改的文件 + 验收命令 + 失败兜底)。同一回合多次调用即可同时启动多个 Worker 并行施工;插件会为每个子代理统一注入简体中文回复指令,并要求它在收尾时直接输出最终总结、禁止调用 `send_message` 向父代理汇报(收尾消息会自动送达主代理)。
|
|
92
|
-
**`writeScope`(必填,`string[]`)**:声明本次派发允许修改的文件或目录,支持精确文件(`src/index.js`)、目录(`dir/` 或 `dir/**`)与全局根(`*`)。相对路径按 `cwd` 词法归一化,Windows 下大小写不敏感判重;省略报 `write-scope-missing`,空数组 / 非法路径报 `write-scope-invalid`。
|
|
93
|
-
- **`orchestrate`(声明式批量流水线)**:
|
|
94
|
-
用于处理「一组条目(`items`,1–64)× 固定多阶段步骤(`stages`,1–8)」的批量任务,通过 `maxConcurrency`(1–16,默认 4)控制并发。支持单阶段并行扇出与多阶段**逐条目无屏障流水线**(先做完阶段 1 的条目立刻进入阶段 2,不用傻等慢条目),支持阶段级 JSON Schema 强校验与单项失败隔离。
|
|
95
|
-
**`writeScope`(必填,`string[]`)**:整批共用一条顶层声明,按整批**原子持有**写作用域;归一化后的作用域会自动注入每个阶段的 Prompt 作为边界提示。
|
|
96
|
-
- **单写者互斥(派发前拦截)**:`delegate` 按子代理持锁、`orchestrate` 按整批持锁,两者共享同一张进程级租约表并跨工具求交。一旦作用域相交,插件会在**启动任何子代理之前**直接抛出 `write-scope-conflict`(附冲突路径、持有者与到期时间,`agentsStarted: 0`),杜绝多个 Worker 同时覆写同一文件。租约在 `subagent/end`、`agent/disposed`、`orchestrate` 的 `finally`(含异常与 abort)以及插件卸载时幂等释放,另有 30 分钟 TTL 兜底防泄漏。
|
|
97
92
|
|
|
98
93
|
---
|
|
94
|
+
<div align="center">
|
|
95
|
+
|
|
96
|
+
### Why Do You Need This Plugin Alongside Native `subagent` and `Agent Team`?
|
|
97
|
+
</div>
|
|
98
|
+
DSH includes native `subagent` / `workflow` tools, and the official `@deepseek-ai/dsh-experimental-agent-team-profile` (Agent Team) is also available. However, intensive development still exposes three pain points — the problems at the heart of **DSH Orchestrator**'s distinctive design:
|
|
99
|
+
|
|
100
|
+
| Pain point | Native `subagent` / official `Agent Team` | DSH Orchestrator (unique to this plugin) |
|
|
101
|
+
| --- | --- | --- |
|
|
102
|
+
| **The main agent keeps doing the work itself** | **Relies on compliance with soft prompts**: the main agent / Team Lead still has the full set of tools, including `read`, `edit`, and `bash`. After a few turns, it often starts reading files and running commands itself, quickly filling the main context. | **Whitelist-Driven Hard Gate**: the main agent receives only 12 core planning and delegation tools by default (`allowedTools`). All other host file and terminal tools, plus any future MCP or third-party plugin tools, are automatically hidden and blocked at execution time (including nested calls through `run_code`), **enforcing a Main Agent dedicated entirely to planning and acceptance, with Subagents doing all the execution**. |
|
|
103
|
+
| **Low-cost models get stuck or go off track** | **Runtime black box**: after dispatch, you can only wait for completion or timeout, or block and poll with `wait_agent`. | **Periodic background inspection of event logs + dynamic correction by the powerful model**: a background timer reads running Workers' session event logs directly (reading and summarizing make no model calls), summarizing elapsed time, rounds, new tool calls, and the latest output. A lightweight notice wakes the main agent when something looks abnormal or takes too long, so the powerful model can assess it and give targeted corrections. |
|
|
104
|
+
| **Large batches of similar tasks** | Native `workflow` asks the model to write arbitrary JavaScript, which can get out of control and does not enforce consistent model routing. | **Declarative `orchestrate` pipelines**: structured `items × stages` fan-out and multistage pipelines, with per-item failure isolation and strict JSON Schema validation. Subagents share the low-cost route by default. |
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
<div align="center">
|
|
108
|
+
|
|
109
|
+
## Requirements
|
|
110
|
+
|
|
111
|
+
</div>
|
|
99
112
|
|
|
100
|
-
## 环境要求
|
|
101
113
|
|
|
102
|
-
|
|
|
114
|
+
| Item | Requirement |
|
|
103
115
|
| --- | --- |
|
|
104
|
-
|
|
|
105
|
-
| **Node.js** | `>= 22
|
|
106
|
-
|
|
|
107
|
-
|
|
|
116
|
+
| **Host environment** | DeepSeek Harness Desktop / Web GUI |
|
|
117
|
+
| **Node.js** | `>= 22` (bundled with the DSH Desktop runtime) |
|
|
118
|
+
| **Plugin form** | Cordis backend service patch (`cordis.patch.yml`) + Web GUI client extension (`lib/client.js`) |
|
|
119
|
+
| **UI language** | Adapts to Chinese / English (`zh-CN` / `en-US`) |
|
|
108
120
|
|
|
109
|
-
|
|
121
|
+
<div align="center">
|
|
122
|
+
|
|
123
|
+
### DSH host version compatibility
|
|
124
|
+
|
|
125
|
+
</div>
|
|
110
126
|
|
|
111
|
-
插件依赖宿主的子代理接口(`startActivation` 的 spec 形状、重试投递入口、根代理枚举、工具注册表),这些接口在 DSH `0.2.2-rc.2` 发生过一次不兼容变更,因此**插件版本与宿主版本必须成对选择**:
|
|
112
127
|
|
|
113
|
-
|
|
|
128
|
+
| Plugin version | Supported DSH host | Notes |
|
|
114
129
|
| --- | --- | --- |
|
|
115
|
-
| `@sshirkit/dsh-orchestrator >= 0.8.3
|
|
116
|
-
| `dsh-orchestrator 0.8.0 – 0.8.2` | **DSH `<= 0.2.2-rc.1`** |
|
|
117
|
-
| `dsh-orchestrator <= 0.7.3` | `0.8.0`
|
|
130
|
+
| `@sshirkit/dsh-orchestrator >= 0.8.3` (current version: `0.8.8`) | **DSH `>= 0.2.2-rc.2 < 0.2.3-0`** | Verified against `0.2.2-rc.2` / `0.2.2-rc.3`. Since `0.2.2-rc.2`, the host has flattened the subagent spec, removed the `Symbol.for('dsh.subagent.deliverPrompt')` delivery entry point and `agents.roots()`, and added the `wait_agent` tool. It is therefore **incompatible with `0.2.2-rc.1` and earlier**. Note: although the host adds `wait_agent`, the plugin **intentionally keeps its default whitelist at 12 tools and excludes `wait_agent`**. Blocking polling can leave the main agent idling and misjudging timeouts; supervision already replaces polling with one summary plus one decision. If needed, allow it manually in the panel's `allowedTools` list. |
|
|
131
|
+
| `dsh-orchestrator 0.8.0 – 0.8.2` | **DSH `<= 0.2.2-rc.1`** | Tested against `0.2.1-rc.3` and `0.2.2-rc.1`. Since `0.8.0`, the plugin has depended on `@deepseek-ai/dsh-tools`. |
|
|
132
|
+
| `dsh-orchestrator <= 0.7.3` | DSH releases predating plugin `0.8.0` | Early standalone tool-registration architecture, without a dependency on `@deepseek-ai/dsh-tools`. |
|
|
118
133
|
|
|
119
|
-
>
|
|
134
|
+
> Check the host version before upgrading: see About in DSH or read `package.json` in the installation directory. **Plugin `0.8.3+` with a `0.2.2-rc.1` or older host fails outright when dispatching**; an older plugin with a `0.2.2-rc.2+` host is also unusable. If you cannot upgrade the host yet, stay on plugin `v0.8.2`.
|
|
120
135
|
|
|
121
136
|
---
|
|
122
137
|
|
|
123
|
-
|
|
138
|
+
<div align="center">
|
|
139
|
+
|
|
140
|
+
## Installation
|
|
124
141
|
|
|
125
|
-
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
Select Add from GitHub on the DSH plugin page. All three forms below are accepted; paste one into the input field. The first is recommended because it is the least likely to be misinterpreted by the client:
|
|
126
145
|
|
|
127
146
|
```text
|
|
128
147
|
https://github.com/SShiRkiT/dsh-orchestrator
|
|
@@ -131,34 +150,61 @@ SShiRkiT/dsh-orchestrator#main
|
|
|
131
150
|
```
|
|
132
151
|
|
|
133
152
|
```bash
|
|
134
|
-
# CLI
|
|
153
|
+
# Equivalent CLI installation
|
|
135
154
|
dsh plugin --profile desktop add https://github.com/SShiRkiT/dsh-orchestrator
|
|
136
|
-
# npm
|
|
155
|
+
# npm installation (available after publication to npm)
|
|
137
156
|
dsh plugin --profile desktop add @sshirkit/dsh-orchestrator
|
|
138
157
|
```
|
|
139
158
|
|
|
140
|
-
>
|
|
159
|
+
> After installation, **fully quit and reopen DSH** (client plugins are composed at startup and do not support hot updates). When upgrading, **uninstall the old version** from the plugin page before adding this repository again or `@sshirkit/dsh-orchestrator` (available after publication to npm); two installed copies will compete over the same tool declarations.
|
|
141
160
|
|
|
142
161
|
---
|
|
143
162
|
|
|
144
|
-
|
|
163
|
+
<div align="center">
|
|
164
|
+
|
|
165
|
+
## Configuration
|
|
145
166
|
|
|
146
|
-
|
|
167
|
+
</div>
|
|
168
|
+
|
|
169
|
+
All configuration fields are volatile (dynamic configuration), with no DSH restart required. Execution gates reread them on each call, tool surfaces on the next request, and subagent routes on the next dispatch.
|
|
147
170
|
|
|
148
|
-
|
|
|
171
|
+
| Field | Default | Description |
|
|
149
172
|
| --- | --- | --- |
|
|
150
|
-
| `enabled` | `true` |
|
|
151
|
-
| `workerProvider` / `workerModel` | `""` |
|
|
152
|
-
| `workerReasoningEffort` | `""` |
|
|
153
|
-
| `allowedTools` | 12
|
|
154
|
-
| `superviseEnabled` | `true` |
|
|
155
|
-
| `superviseIntervalSeconds` | `600` |
|
|
156
|
-
| `superviseMaxNoticesPerChild` | `3` |
|
|
157
|
-
| `superviseUnlimited` | `false` |
|
|
158
|
-
| `superviseNotifyOnNoProgress` | `false` |
|
|
159
|
-
|
|
160
|
-
|
|
173
|
+
| `enabled` | `true` | Master switch for dispatch mode. Turning it off restores host tools, while `delegate` / `orchestrate` remain disabled and bound inspection Todo/normal-declaration gates still take priority. |
|
|
174
|
+
| `workerProvider` / `workerModel` | `""` | Default subagent model route (required; dispatch fails if unconfigured and never silently inherits the main-agent model). |
|
|
175
|
+
| `workerReasoningEffort` | `""` | Subagent reasoning effort. Leave empty to let the selected model use its own default. |
|
|
176
|
+
| `allowedTools` | 12 built-in tools | Whitelist-driven: the main agent may use only the listed tools; other host, MCP, and plugin tools are automatically hidden and disabled. Check or uncheck tools under Allowed Tools on the right of the panel to allow or disable them; changes apply on the next message. |
|
|
177
|
+
| `superviseEnabled` | `true` | Master switch for background subagent inspection, in the host plugin settings card. |
|
|
178
|
+
| `superviseIntervalSeconds` | `600` | Inspection interval in seconds, from 10 to 86400. Changes take effect immediately while workers are running. |
|
|
179
|
+
| `superviseMaxNoticesPerChild` | `3` | Maximum inspection notices per subagent (0–20). Unless unlimited inspection is enabled, `0` disables inspection. Running subagents remain registered; raising the value above 0 or enabling unlimited inspection restores due-time checks. |
|
|
180
|
+
| `superviseUnlimited` | `false` | Enables unlimited inspections. Ignores the `superviseMaxNoticesPerChild` limit (including `0`) and continues inspecting at each interval until the subagent stops, delivers, or ends. Notice titles omit the denominator (`第 N 次`). |
|
|
181
|
+
| `superviseNotifyOnNoProgress` | `false` | Whether to notify even when the subagent log has no new activity (effectively always enabled when `superviseUnlimited` is on), in the host plugin settings card. |
|
|
182
|
+
| `restoreTodoOnSupervision` | `true` | Silently restores Todo UI state via `todo/write` from an eligible snapshot during supervision, with no model history entry or model token cost. Like `superviseEnabled` / `superviseNotifyOnNoProgress`, this appears in the host plugin settings card, outside the input-bar shortcut popup. |
|
|
183
|
+
|
|
184
|
+
> Note: the main agent's default model is stored in the host's `agent-default-model`, read and written directly by the same Dispatch mode panel, and applies to newly created sessions. Subagent model changes apply to the next delegation.
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
<div align="center">
|
|
188
|
+
|
|
189
|
+
## Contributing & Community
|
|
190
|
+
|
|
191
|
+
</div>
|
|
192
|
+
|
|
193
|
+
The Chinese README is maintained first, and this English version is kept in sync. These resources cover the project design, how to contribute, and where to ask for help.
|
|
194
|
+
|
|
195
|
+
- Project glossary [`CONTEXT.md`](CONTEXT.md)
|
|
196
|
+
- Architecture decision records (ADRs) [`docs/adr/`](docs/adr/)
|
|
197
|
+
- Release notes [`docs/releases/`](docs/releases/)
|
|
198
|
+
- Contribution guide [`.github/CONTRIBUTING.md`](.github/CONTRIBUTING.md)
|
|
199
|
+
- Code of conduct [`.github/CODE_OF_CONDUCT.md`](.github/CODE_OF_CONDUCT.md)
|
|
200
|
+
- Security policy and private vulnerability reporting [`.github/SECURITY.md`](.github/SECURITY.md)
|
|
201
|
+
- Support and help [`.github/SUPPORT.md`](.github/SUPPORT.md)
|
|
202
|
+
- Accessibility statement [`.github/ACCESSIBILITY.md`](.github/ACCESSIBILITY.md)
|
|
203
|
+
|
|
204
|
+
<div align="center">
|
|
161
205
|
|
|
162
206
|
## License
|
|
163
207
|
|
|
208
|
+
</div>
|
|
209
|
+
|
|
164
210
|
[MIT](LICENSE) © 2026 [SShiRkiT](https://github.com/SShiRkiT)
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
*Start from 28th October*
|
|
4
|
+
|
|
5
|
+
<div align="center">
|
|
6
|
+
|
|
7
|
+
# DSH Orchestrator
|
|
8
|
+
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
#### **强模型主脑规划 + 便宜模型统一打工 —— DeepSeek Harness 的「硬隔离调度模式」插件**
|
|
13
|
+
|
|
14
|
+
[](https://github.com/SShiRkiT/dsh-orchestrator)
|
|
15
|
+
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
16
|
+
[](https://github.com/SShiRkiT/dsh-orchestrator)
|
|
17
|
+
[](https://nodejs.org)
|
|
18
|
+
[](package.json)
|
|
19
|
+
[](LICENSE)
|
|
20
|
+
[](https://github.com/SShiRkiT/dsh-orchestrator/stargazers)
|
|
21
|
+
[](https://www.npmjs.com/package/@sshirkit/dsh-orchestrator)
|
|
22
|
+
|
|
23
|
+
**简体中文** | [English](README.md) · [核心差异](#为什么有了原生-subagent-和-agent-team还需要这个插件) · [核心特性](#核心特性) · [安装](#安装) · [配置说明](#配置说明) · [参与贡献](#参与贡献)
|
|
24
|
+
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
<div align="center">
|
|
29
|
+
|
|
30
|
+
## 核心特性
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
### 1. 强模型当 Main Agent,便宜模型当 Subagent(独立面板、即时生效)
|
|
34
|
+
|
|
35
|
+
在输入框下方的**「调度模式」专属面板**中,主代理与子代理的模型路由完全解耦:
|
|
36
|
+
- **主代理(Main Agent)**:配置为你最强的旗舰模型专门负责需求澄清、任务切分、途中纠偏与最终结果验收。
|
|
37
|
+
- > 例如 `gpt-astra-6`、`claude-opus-5.5` 等
|
|
38
|
+
- **子代理(Subagent)**:配置为能力稍弱但极其便宜、高吞吐的模型**所有通过 `delegate` 和 `orchestrate` 派出的 Worker 强制共用这条便宜路由**
|
|
39
|
+
- > 例如 `deepseek-v4.1-flash`、`gpt-luna-6` 等
|
|
40
|
+
- **防烧钱保护**:如果未配置子代理模型,派发时会直接报错拦截
|
|
41
|
+
|
|
42
|
+
## 可以在`prompt` 或 `AGENTS.md`中要求当前工作区域的main agent派发子代理时传输 `provider` / `model` 参数来指定当前`会话` \ `工作区`使用你指定的模型进行
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+

|
|
46
|
+
|
|
47
|
+
### 2. 主代理「规划与验收」、子代理「纯粹 Work」的白名单式硬性闸门
|
|
48
|
+
|
|
49
|
+
不同于靠 Prompt 劝主模型“多用子代理”,本插件在 DSH 的工具声明出口(`tools.definitions`)与执行层(`tools.guard`)安装了双重守卫,且采用**白名单式驱动**:声明层实时裁剪模型可见的工具表(全局工具与 `ops_*` 等 scope 内工具一视同仁),执行层再兜底拒绝任何漏网调用;两层都按请求/按调用实时读取配置,不产生 `tools.restrict` 事件风暴,因此不会触发官方工具遮挡的抖动与 Prompt Cache 失效。
|
|
50
|
+
- **主代理被彻底收缴执行工具**:
|
|
51
|
+
<div align="center">
|
|
52
|
+
|
|
53
|
+
> ### DEFAULT_ALLOWED_TOOLS 默认只放行 12 项规划、委派与会话只读工具
|
|
54
|
+
>
|
|
55
|
+
> _`delegate`、`orchestrate`、`send_message`、`interrupt_agent`、`todo_write`、`ask_user_question`、`compress` 与 5 项只读会话日志工具。_
|
|
56
|
+
>
|
|
57
|
+
> ### 所有文件读写、搜索、终端,以及未来新增的任何 MCP / 第三方插件工具,一律自动隐藏并在执行层强制拦截
|
|
58
|
+
>
|
|
59
|
+
>_(`read` / `edit` / `write` / `apply_patch`)、(`grep` / `glob`)、(`bash` / `pwsh`)、 `subagent` / `workflow`_
|
|
60
|
+
>
|
|
61
|
+
> ### 连 run_code 嵌套偷调也拦。需要额外放行时,在面板右侧 Allowed Tools 勾选即可。
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
- **子代理独享完整工具链**:被派出的 Worker 不受闸门限制,在各自独立的上下文中读写文件、跑测试、看报错,完工后只把干净的结论交回主代理验收。
|
|
65
|
+
- **一键随时切换**:关闭面板上的「启用调度模式」即可恢复宿主工具,无需重开会话;插件派发工具仍禁用,已绑定巡检回合的硬禁仍优先。
|
|
66
|
+
|
|
67
|
+
### 3. 后台事件日志定时巡检与强模型动态纠偏
|
|
68
|
+
|
|
69
|
+
便宜模型充当 Subagent 时,偶尔会在复杂的 shell 转义或报错上打转。插件内置了纯日志驱动的后台巡检器:
|
|
70
|
+
- **巡检读取本身不调用模型**:后台定时器直接读取运行中 Worker 的会话事件日志,按设定的巡检间隔(默认 600 秒)汇总它的运行时长、轮次、新增工具调用与最后输出,合并成一条通知唤醒主代理。读取与汇总环节不发起任何 LLM 请求
|
|
71
|
+
- 但**唤醒主代理后的判断与纠偏仍会消耗主代理的 token**:巡检的价值在于把「持续轮询」压缩成「一条摘要 + 一次决策」,而不是让整个巡检功能零消耗。
|
|
72
|
+
- **强模型一眼把关**:主代理收到巡检摘要后,只需极少 Token 即可做出决策:
|
|
73
|
+
- **A) 进展正常**:回复一行 `巡检:正常` 结束回合,让子代理继续跑;
|
|
74
|
+
- **B) 途中纠偏**:调用 `send_message` 直接向运行中的子代理注入修正指令(指明正确写法或跳过卡点);
|
|
75
|
+
- **C) 及时止损**:调用 `interrupt_agent` 中断失控的子代理(若后续再用 `send_message` 重新唤醒它,巡检会自动重新接管并重置通知计数)。
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+

|
|
79
|
+
|
|
80
|
+
*巡检通知与纠偏实录:便宜的子代理卡在了 shell 引号和反斜杠转义上,巡检机制按间隔唤醒主代理后,主代理通过 `send_message` 直接给出正确写法完成纠偏。*
|
|
81
|
+
|
|
82
|
+
### 4. 专为调度模式定制的 `delegate` 与 `orchestrate`
|
|
83
|
+
|
|
84
|
+
- **`delegate`(按需异步单派 / 并行扇出)**:
|
|
85
|
+
用于派发自包含的独立任务(目标 + 允许修改的文件 + 验收命令 + 失败兜底)。同一回合多次调用即可同时启动多个 Worker 并行施工;插件会为每个子代理统一注入简体中文回复指令,并要求它在收尾时直接输出最终总结、禁止调用 `send_message` 向父代理汇报(收尾消息会自动送达主代理)。
|
|
86
|
+
**`writeScope`(必填,`string[]`)**:声明本次派发允许修改的文件或目录,支持精确文件(`src/index.js`)、目录(`dir/` 或 `dir/**`)与全局根(`*`)。相对路径按 `cwd` 词法归一化,Windows 下大小写不敏感判重;省略报 `write-scope-missing`,空数组 / 非法路径报 `write-scope-invalid`。
|
|
87
|
+
- **`orchestrate`(声明式批量流水线)**:
|
|
88
|
+
用于处理「一组条目(`items`,1–64)× 固定多阶段步骤(`stages`,1–8)」的批量任务,通过 `maxConcurrency`(1–16,默认 4)控制并发。支持单阶段并行扇出与多阶段**逐条目无屏障流水线**(先做完阶段 1 的条目立刻进入阶段 2,不用傻等慢条目),支持阶段级 JSON Schema 强校验与单项失败隔离。
|
|
89
|
+
**`writeScope`(必填,`string[]`)**:整批共用一条顶层声明,按整批**原子持有**写作用域;归一化后的作用域会自动注入每个阶段的 Prompt 作为边界提示。
|
|
90
|
+
- **单写者互斥(派发前拦截)**:`delegate` 按子代理持锁、`orchestrate` 按整批持锁,两者共享同一张进程级租约表并跨工具求交。一旦作用域相交,插件会在**启动任何子代理之前**直接抛出 `write-scope-conflict`(附冲突路径、持有者与到期时间,`agentsStarted: 0`),杜绝多个 Worker 同时覆写同一文件。租约在 `subagent/end`、`agent/disposed`、`orchestrate` 的 `finally`(含异常与 abort)以及插件卸载时幂等释放,另有 30 分钟 TTL 兜底防泄漏。
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
<div align="center">
|
|
95
|
+
|
|
96
|
+
### 为什么有了原生 `subagent` 和 `Agent Team`,还需要这个插件?
|
|
97
|
+
</div>
|
|
98
|
+
DSH 客户端自带了 `subagent` / `workflow`,官方也有 `@deepseek-ai/dsh-experimental-agent-team-profile`(Agent Team),但它们在实际高强度开发中仍有三个痛点——而这正是 **DSH Orchestrator** 独有的设计核心:
|
|
99
|
+
|
|
100
|
+
| 痛点场景 | 原生 `subagent` / 官方 `Agent Team` | DSH Orchestrator(本插件独有) |
|
|
101
|
+
| --- | --- | --- |
|
|
102
|
+
| **主代理总忍不住自己动手** | **靠自觉(软提示词)**:主代理 / Team Lead 手里依然握有 `read`、`edit`、`bash` 等全套工具,聊几轮就经常脱轨亲自去读文件、跑命令,瞬间撑爆主上下文 | **白名单式驱动(Whitelist-Driven Hard Gate)**:主代理默认仅放行 12 项规划与委派核心工具(`allowedTools`),其余一切宿主读写/终端工具及未来新增的 MCP/第三方插件工具一律自动隐藏并在执行层强制拦截(连 `run_code` 嵌套偷调也拦),**逼迫 Main Agent 100% 只做规划与验收,Subagent 100% 只干苦力活** |
|
|
103
|
+
| **便宜模型干活卡死/跑偏** | **运行期黑盒**:派出后只能干等结束或超时,或者靠 `wait_agent` 阻塞轮询 | **后台事件日志定时巡检 + 强模型动态纠偏**:后台定时器直接读取运行中 Worker 的会话事件日志(读取与汇总本身不调用模型),汇总运行时长、轮次、新增工具调用与最后输出;异常或超时时以一条轻量摘要通知唤醒主代理,由强模型判断后精准纠偏 |
|
|
104
|
+
| **大批量同构任务** | 原生 `workflow` 让模型手写任意 JS 脚本,容易失控且模型路由不统一 | **声明式 `orchestrate` 流水线**:`items × stages` 结构化扇出与多阶段流水线,单项失败隔离、支持 JSON Schema 强校验,子代理默认共用低成本路由 |
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
<div align="center">
|
|
108
|
+
|
|
109
|
+
## 环境要求
|
|
110
|
+
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
| 项目 | 要求 |
|
|
115
|
+
| --- | --- |
|
|
116
|
+
| **宿主环境** | DeepSeek Harness Desktop / Web GUI |
|
|
117
|
+
| **Node.js** | `>= 22`(内置于 DSH Desktop 运行时) |
|
|
118
|
+
| **插件形态** | Cordis 后端服务补丁(`cordis.patch.yml`)+ Web GUI 客户端扩展(`lib/client.js`) |
|
|
119
|
+
| **界面语言** | 中 / 英双语自适应(`zh-CN` / `en-US`) |
|
|
120
|
+
|
|
121
|
+
<div align="center">
|
|
122
|
+
|
|
123
|
+
### 与 DSH 宿主的版本兼容性
|
|
124
|
+
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
| 插件版本 | 适配的 DSH 宿主 | 说明 |
|
|
129
|
+
| --- | --- | --- |
|
|
130
|
+
| `@sshirkit/dsh-orchestrator >= 0.8.3`(当前版本 `0.8.8`) | **DSH `>= 0.2.2-rc.2 < 0.2.3-0`** | 已验证 `0.2.2-rc.2` / `0.2.2-rc.3`。宿主自 `0.2.2-rc.2` 起扁平化了 subagent spec、移除了 `Symbol.for('dsh.subagent.deliverPrompt')` 投递入口与 `agents.roots()`,并新增 `wait_agent` 工具;因此**不兼容 `0.2.2-rc.1` 及更早版本**。注意:宿主虽新增了 `wait_agent`,但本插件默认白名单**有意维持 12 项、不予放行 `wait_agent`**——阻塞式轮询等待会让主代理陷入空转与超时误判,巡检机制已用「一条摘要 + 一次决策」替代轮询;确有需要时可在面板 `allowedTools` 中手动勾选放行。 |
|
|
131
|
+
| `dsh-orchestrator 0.8.0 – 0.8.2` | **DSH `<= 0.2.2-rc.1`** | 已实测支持 `0.2.1-rc.3`、`0.2.2-rc.1`。自 `0.8.0` 起引入 `@deepseek-ai/dsh-tools` 依赖。 |
|
|
132
|
+
| `dsh-orchestrator <= 0.7.3` | `0.8.0` 之前的旧版 DSH | 早期独立工具注册架构,未依赖 `@deepseek-ai/dsh-tools`。 |
|
|
133
|
+
|
|
134
|
+
> 升级前请先确认宿主版本:在 DSH 中查看「关于」或读取安装目录下的 `package.json`。**插件 `0.8.3+` 配 `0.2.2-rc.1` 及更早宿主会在派发时直接报错**;反之,旧插件配 `0.2.2-rc.2+` 宿主同样不可用。若暂时无法升级宿主,请停留在插件 `v0.8.2`。
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
<div align="center">
|
|
139
|
+
|
|
140
|
+
## 安装
|
|
141
|
+
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
在 DSH 插件页选择「从 GitHub 添加」,下列三种写法都接受,直接填入输入框即可(推荐第一种,最不容易被客户端误判):
|
|
145
|
+
|
|
146
|
+
```text
|
|
147
|
+
https://github.com/SShiRkiT/dsh-orchestrator
|
|
148
|
+
github:SShiRkiT/dsh-orchestrator#main
|
|
149
|
+
SShiRkiT/dsh-orchestrator#main
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
# CLI 等价安装
|
|
154
|
+
dsh plugin --profile desktop add https://github.com/SShiRkiT/dsh-orchestrator
|
|
155
|
+
# npm 安装(npm 发布后可用)
|
|
156
|
+
dsh plugin --profile desktop add @sshirkit/dsh-orchestrator
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
> 装完后请**完全退出并重新打开 DSH**(客户端插件在启动时组合,不支持热更新)。升级时请先在插件页**卸载旧版**再重新添加本仓库或 `@sshirkit/dsh-orchestrator`(npm 发布后可用),两份同时存在会争抢同一批工具声明。
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
<div align="center">
|
|
164
|
+
|
|
165
|
+
## 配置说明
|
|
166
|
+
|
|
167
|
+
</div>
|
|
168
|
+
|
|
169
|
+
所有配置项均为 volatile(动态热配置),无需重启 DSH:执行门禁每次调用重读,工具面从下一次请求生效,子代理路由从下一次派发生效。
|
|
170
|
+
|
|
171
|
+
| 字段 | 默认值 | 说明 |
|
|
172
|
+
| --- | --- | --- |
|
|
173
|
+
| `enabled` | `true` | 调度模式总开关。关闭时恢复宿主工具,但 `delegate` / `orchestrate` 仍禁用,已绑定巡检回合的 Todo 禁令与正常声明锁仍优先。 |
|
|
174
|
+
| `workerProvider` / `workerModel` | `""` | 子代理默认模型路由(必填,未配置时派发直接报错,绝不静默继承主代理模型)。 |
|
|
175
|
+
| `workerReasoningEffort` | `""` | 子代理思考强度,留空则由所选模型自行决定默认值。 |
|
|
176
|
+
| `allowedTools` | 12 项内置白名单 | 白名单式驱动:主代理仅可使用列表内的工具,其余宿主/MCP/插件工具自动隐藏并禁用;面板右侧 Allowed Tools 可直接勾选放行或取消勾选禁用,下一条消息即刻生效。 |
|
|
177
|
+
| `superviseEnabled` | `true` | 子代理后台巡检总开关;位于宿主插件设置卡片。 |
|
|
178
|
+
| `superviseIntervalSeconds` | `600` | 巡检间隔(秒),范围 10–86400,运行中修改立即生效。 |
|
|
179
|
+
| `superviseMaxNoticesPerChild` | `3` | 每个子代理最多发送几次巡检通知(0–20)。未开无限巡检时,`0` 表示关闭(运行中的子代理仍保留在注册表中,改回 >0 或打开无限巡检后恢复到期判定)。 |
|
|
180
|
+
| `superviseUnlimited` | `false` | 无限次数巡检开关。开启后忽略 `superviseMaxNoticesPerChild` 上限(含 `0`),只要子代理没有停止 / 交付 / 结束,就按间隔持续巡检,通知标题不带分母(`第 N 次`)。 |
|
|
181
|
+
| `superviseNotifyOnNoProgress` | `false` | 子代理日志无新活动时是否仍然发送通知(开启 `superviseUnlimited` 时等效于始终发送);位于宿主插件设置卡片。 |
|
|
182
|
+
| `restoreTodoOnSupervision` | `true` | 巡检时按有效快照静默补写 `todo/write`,仅恢复 UI 状态,不增加模型历史或消耗模型 Token。与 `superviseEnabled` / `superviseNotifyOnNoProgress` 一致位于宿主插件设置卡片,不在输入栏快捷弹层。 |
|
|
183
|
+
|
|
184
|
+
> 注:主代理的默认模型保存在宿主的 `agent-default-model` 中,由同一个「调度模式」面板直接读写,对新创建的会话生效;子代理模型改动从下一次委派起立即生效。
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
<div align="center">
|
|
188
|
+
|
|
189
|
+
## 参与贡献
|
|
190
|
+
|
|
191
|
+
</div>
|
|
192
|
+
|
|
193
|
+
本项目先维护中文版,再同步英文版。以下文档涵盖项目设计、贡献流程和求助渠道。
|
|
194
|
+
|
|
195
|
+
- 项目术语表 [`CONTEXT.md`](CONTEXT.md)
|
|
196
|
+
- 架构决策记录(ADR)[`docs/adr/`](docs/adr/)
|
|
197
|
+
- 版本发布说明 [`docs/releases/`](docs/releases/)
|
|
198
|
+
- 贡献指南 [`.github/CONTRIBUTING.md`](.github/CONTRIBUTING.md)
|
|
199
|
+
- 行为准则 [`.github/CODE_OF_CONDUCT.md`](.github/CODE_OF_CONDUCT.md)
|
|
200
|
+
- 安全策略与漏洞私密报告 [`.github/SECURITY.md`](.github/SECURITY.md)
|
|
201
|
+
- 支持与求助 [`.github/SUPPORT.md`](.github/SUPPORT.md)
|
|
202
|
+
- 无障碍说明 [`.github/ACCESSIBILITY.md`](.github/ACCESSIBILITY.md)
|
|
203
|
+
|
|
204
|
+
<div align="center">
|
|
205
|
+
|
|
206
|
+
## License
|
|
207
|
+
|
|
208
|
+
</div>
|
|
209
|
+
|
|
210
|
+
[MIT](LICENSE) © 2026 [SShiRkiT](https://github.com/SShiRkiT)
|
package/lib/delegate.js
CHANGED
|
@@ -69,7 +69,10 @@ export function createDelegateTool({
|
|
|
69
69
|
'省略该字段或声明为空数组都会被拒绝,插件会在派发前拒绝与其他写者重叠的声明。' +
|
|
70
70
|
'子代理仍在运行时可用 send_message 纠偏,已结束的可用 send_message ' +
|
|
71
71
|
'追加任务(它保留自己的上下文)。长时间运行的子代理会被插件每隔几分钟巡检:收到「【插件巡检…】」' +
|
|
72
|
-
'
|
|
72
|
+
'消息(来自插件,不是用户)时,所列子代理均仍在运行且尚未交付,巡检回合禁止修改 todo_write;' +
|
|
73
|
+
'巡检例外仅指不自动推进主任务与禁止调用 todo_write,巡检回合仍受当前工具白名单(allowedTools)制约;' +
|
|
74
|
+
'需干预时禁止回复「巡检:正常」,请用白名单允许的调研或 send_message 等工具纠偏;' +
|
|
75
|
+
'无需干预时严禁调用任何工具,只回复一行「巡检:正常」并立即结束回合。'
|
|
73
76
|
const descriptionOf = () => (enabled() ? rule() + body : body)
|
|
74
77
|
|
|
75
78
|
// A provisional id lets the lease be registered before the host names the child: the
|