dsh-subagent-control 1.0.4 → 1.0.5
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/CHANGELOG.md +8 -0
- package/README.md +10 -0
- package/components/budget/index.js +5 -2
- package/components/budget/locale/en.json +1 -1
- package/components/budget/locale/zh.json +1 -1
- package/components/drain/index.js +5 -5
- package/components/drain/locale/en.json +1 -1
- package/components/drain/locale/zh.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.5
|
|
4
|
+
|
|
5
|
+
- The `subagent_budget` tool says "not running" instead of "inactive", and its line now lists how
|
|
6
|
+
many subagents sit on each level (`levels 1:3 2:1`).
|
|
7
|
+
- The `drain_subagents` description no longer claims a released child can never be woken again.
|
|
8
|
+
Drain drops the activation and gives the run back; the session stays continuable, so a later
|
|
9
|
+
message cold-resumes it.
|
|
10
|
+
|
|
3
11
|
## 1.0.4
|
|
4
12
|
|
|
5
13
|
- The single optional `extras` row is split into four independent components, each with its own
|
package/README.md
CHANGED
|
@@ -100,6 +100,14 @@ A separate companion bundle, [`dsh-team-limits`](https://github.com/SpaceRelay/d
|
|
|
100
100
|
raises the Agent Team limits (members, tasks, message bytes). It is a separate install on
|
|
101
101
|
purpose: it overrides the shipped `agent-team` row, and that should never happen implicitly.
|
|
102
102
|
|
|
103
|
+
A second companion bundle, [`dsh-human-wait`](https://github.com/SpaceRelay/dsh-subagent-control/tree/main/human-wait),
|
|
104
|
+
stops the PTC `run_code` deadline from counting the time you spend answering a question, reviewing
|
|
105
|
+
a plan or approving a request. PTC mode wraps the whole program — nested tool and approval waits
|
|
106
|
+
included — in one 120 s wall clock, so a slow answer used to surface as
|
|
107
|
+
`Error: code run failed (timeout): execution deadline reached (120000ms)`. With the bundle
|
|
108
|
+
installed that wait no longer burns the budget (default cap 24 h, `-1` = unlimited) while a plain
|
|
109
|
+
runaway program is still stopped at the normal budget.
|
|
110
|
+
|
|
103
111
|
### License
|
|
104
112
|
|
|
105
113
|
MIT — see [LICENSE](./LICENSE). Issues and source live at
|
|
@@ -194,6 +202,8 @@ plugin_manager install_bundle target "dsh-subagent-control@1.0.0"
|
|
|
194
202
|
|
|
195
203
|
另有一个独立的同伴包 [`dsh-team-limits`](https://github.com/SpaceRelay/dsh-subagent-control/tree/main/team-limits),用来提高 Agent Team 的成员数、任务数与消息字节上限。**它刻意做成单独安装**:它覆盖的是宿主自带的 `agent-team` 行,这种事不该偷偷发生。
|
|
196
204
|
|
|
205
|
+
还有一个独立的同伴包 [`dsh-human-wait`](https://github.com/SpaceRelay/dsh-subagent-control/tree/main/human-wait),用来让 PTC 模式 `run_code` 的执行预算在「等你回答提问 / 审议计划 / 审批」期间暂停。PTC 会把整个程序——**包括嵌套的工具调用与审批等待**——包在一个 120 秒墙钟里,所以回答慢一点就会看到 `Error: code run failed (timeout): execution deadline reached (120000ms)`;装上之后这段等待不再计入预算(默认上限 24 小时,`-1` 表示不限),而普通的死循环程序仍会在原预算处被终止。**同样刻意做成单独安装**:它拦截的是宿主 `ptc-runtime` 的执行预算。
|
|
206
|
+
|
|
197
207
|
### 许可
|
|
198
208
|
|
|
199
209
|
MIT,见 [LICENSE](./LICENSE)。源码与问题反馈:
|
|
@@ -40,7 +40,7 @@ export function apply(ctx) {
|
|
|
40
40
|
name: 'subagent_budget',
|
|
41
41
|
description:
|
|
42
42
|
'Report the delegation budget this agent is working with: the configured depth limit, ' +
|
|
43
|
-
'how deep the agents below it already go, and how many are running. ' +
|
|
43
|
+
'how deep the agents below it already go, how many sit on each level, and how many are running. ' +
|
|
44
44
|
'Read-only; it never starts, stops or messages anything.',
|
|
45
45
|
parameters: { type: 'object', additionalProperties: false, properties: {} },
|
|
46
46
|
output: {
|
|
@@ -48,8 +48,11 @@ export function apply(ctx) {
|
|
|
48
48
|
render: (_args, budget) => {
|
|
49
49
|
const parts = []
|
|
50
50
|
if (budget.maxDepth !== undefined) parts.push(`depth limit ${budget.maxDepth}`)
|
|
51
|
-
parts.push(`${budget.running} running`, `${budget.inactive}
|
|
51
|
+
parts.push(`${budget.running} running`, `${budget.inactive} not running`)
|
|
52
52
|
if (budget.deepest !== undefined) parts.push(`deepest ${budget.deepest}`)
|
|
53
|
+
if (budget.levels !== undefined && budget.levels.length > 0) {
|
|
54
|
+
parts.push(`levels ${budget.levels.map((level) => `${level.depth}:${level.count}`).join(' ')}`)
|
|
55
|
+
}
|
|
53
56
|
return [{ type: 'text', text: parts.join(', ') }]
|
|
54
57
|
},
|
|
55
58
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "Delegation budget",
|
|
4
|
-
"description": "Read-only
|
|
4
|
+
"description": "Read-only view of the delegation budget: depth limit, deepest level, agents per level, and running versus not-running counts."
|
|
5
5
|
}
|
|
6
6
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Drain: stop and release direct children, freeing their run.
|
|
3
3
|
*
|
|
4
4
|
* interrupt_subagent only ends the current turn and keeps the activation, so a
|
|
5
|
-
* stopped subagent stays
|
|
6
|
-
*
|
|
5
|
+
* stopped subagent stays resident. Drain drops the activation and gives the run
|
|
6
|
+
* back; the session itself stays continuable, so a later message cold-resumes it.
|
|
7
7
|
*/
|
|
8
8
|
import { requireAgent } from '../shared.js'
|
|
9
9
|
|
|
@@ -24,9 +24,9 @@ export function apply(ctx) {
|
|
|
24
24
|
ctx.tools.register({
|
|
25
25
|
name: 'drain_subagents',
|
|
26
26
|
description:
|
|
27
|
-
'Stop
|
|
28
|
-
'
|
|
29
|
-
'
|
|
27
|
+
'Stop subagents you started without waiting for them to finish and free the run ' +
|
|
28
|
+
'they occupy. Direct children only; a later message still wakes a released child. ' +
|
|
29
|
+
'Use interrupt_subagent when you only want to stop the current work.',
|
|
30
30
|
parameters: {
|
|
31
31
|
type: 'object',
|
|
32
32
|
additionalProperties: false,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "Release subagents",
|
|
4
|
-
"description": "Stop
|
|
4
|
+
"description": "Stop direct children without waiting for them to finish and free the run they occupy; a later message can still wake them."
|
|
5
5
|
}
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-subagent-control",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Three tools — list_subagents, send_subagent_message, interrupt_subagent — that let any agent, including a team member, list, steer and stop the subagents it started.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|