pi-cohort 5.0.0 → 5.0.1
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
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.0.1] - 2026-08-06
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- subagent tool schema dieted from 23.2KB to <=18KB serialized (description
|
|
8
|
+
trimming only; all accepted input shapes unchanged, guarded by a baseline
|
|
9
|
+
shape fixture). `config` field reference moved to the pi-cohort skill's
|
|
10
|
+
`reference/config-fields.md`. Schema size-budget test added.
|
|
11
|
+
|
|
3
12
|
## [5.0.0] - 2026-08-06
|
|
4
13
|
|
|
5
14
|
### Changed
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-cohort",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "Delegate Pi work to focused child agents: code review, scouting, implementation, parallel audits, saved chains, and background jobs.",
|
|
5
5
|
"author": "Jacek Juraszek",
|
|
6
6
|
"license": "MIT",
|
|
@@ -503,6 +503,8 @@ If intercom messages do not show up, run `subagent({ action: "doctor" })` or `/c
|
|
|
503
503
|
|
|
504
504
|
The `subagent(...)` tool also supports management actions.
|
|
505
505
|
|
|
506
|
+
Full config field reference: `reference/config-fields.md` (sibling of this file).
|
|
507
|
+
|
|
506
508
|
### List available agents and chains
|
|
507
509
|
|
|
508
510
|
```typescript
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# subagent `config` field reference
|
|
2
|
+
|
|
3
|
+
Fields accepted by `subagent({ action: "create" | "update", config: {...} })`.
|
|
4
|
+
`config` may be an object or a JSON string. Presence of `steps` makes it a chain.
|
|
5
|
+
Scope: this is the management create/update path (`parseStepList`), which accepts exactly the step fields below and requires `outputSchema` to be a file path; file-authored `.chain.md` chains support additional step fields (parallel, expand, collect, concurrency, failFast, worktree, acceptance, inline outputSchema) - see SKILL.md chain authoring.
|
|
6
|
+
|
|
7
|
+
## Agent config
|
|
8
|
+
|
|
9
|
+
| Field | Type | Meaning | Default |
|
|
10
|
+
|---|---|---|---|
|
|
11
|
+
| `name` | string | Required (create). Letters, numbers, spaces, hyphens. | - |
|
|
12
|
+
| `description` | string | Required (create). | - |
|
|
13
|
+
| `package` | string | Optional namespace; runtime name becomes `package.name`. | none |
|
|
14
|
+
| `scope` | `"user"` \| `"project"` | Where the definition file lands. | `"user"` |
|
|
15
|
+
| `systemPrompt` | string \| false | Persona body; false or "" clears. | `""` |
|
|
16
|
+
| `systemPromptMode` | `"append"` \| `"replace"` | How systemPrompt combines with the base prompt. | per-agent default |
|
|
17
|
+
| `model` | string \| false | Model override; false/"" clears. | inherit |
|
|
18
|
+
| `fallbackModels` | string (csv) \| string[] \| false | Models tried in order on failure; false/"" clears. | none |
|
|
19
|
+
| `tools` | string (csv) \| false | Tool allowlist; false/"" clears. MCP-direct tools rejected. | all |
|
|
20
|
+
| `skills` | string (csv) \| false | Skills injected into the agent; false/"" clears. | none |
|
|
21
|
+
| `extensions` | string (csv) \| "" \| false | Extension list; "" means empty list, false clears. | inherit |
|
|
22
|
+
| `thinking` | string \| false | Thinking level; false/"" clears. | inherit |
|
|
23
|
+
| `inheritProjectContext` | boolean | Inject project AGENTS.md context. | per-agent default |
|
|
24
|
+
| `inheritSkills` | boolean | Inherit parent-visible skills. | per-agent default |
|
|
25
|
+
| `defaultContext` | `"fresh"` \| `"fork"` \| false | Default context mode; false/"" clears. | `"fresh"` |
|
|
26
|
+
| `output` | string \| false | Default output filename; false/"" clears. | none |
|
|
27
|
+
| `reads` | string (csv) \| false | Default files read before running; false/"" clears. | none |
|
|
28
|
+
| `progress` | boolean | Default progress.md tracking. | off |
|
|
29
|
+
| `maxSubagentDepth` | integer >= 0 \| false | Nested subagent depth cap; false/"" clears. | inherit |
|
|
30
|
+
| `completionGuard` | boolean | Enable completion guard for this agent. | inherit |
|
|
31
|
+
|
|
32
|
+
## Chain config
|
|
33
|
+
|
|
34
|
+
Top-level: `name`, `description`, `package`, `scope` as above, plus required `steps` (non-empty array).
|
|
35
|
+
|
|
36
|
+
Per step:
|
|
37
|
+
|
|
38
|
+
| Field | Type | Meaning |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| `agent` | string | Required, non-empty. |
|
|
41
|
+
| `task` | string | Task template; defaults to `""`. |
|
|
42
|
+
| `phase` | string | Phase/group label. |
|
|
43
|
+
| `label` | string | User-facing label. |
|
|
44
|
+
| `as` | string | Identifier for `{outputs.name}` in later steps. |
|
|
45
|
+
| `outputSchema` | string | Schema FILE PATH (saved chains take a path, not an inline object). |
|
|
46
|
+
| `output` | string \| false | Output file path, or false to disable. |
|
|
47
|
+
| `outputMode` | `"inline"` \| `"file-only"` | Output return mode. |
|
|
48
|
+
| `reads` | string[] \| false | Files to read before the step. |
|
|
49
|
+
| `model` | string | Model override. |
|
|
50
|
+
| `skills` | string[] \| false | Skills to inject (NOTE: plural `skills` here, unlike the execution-time `skill` param). |
|
|
51
|
+
| `progress` | boolean | progress.md tracking. |
|
package/src/extension/schemas.ts
CHANGED
|
@@ -5,13 +5,23 @@
|
|
|
5
5
|
import { Type } from "typebox";
|
|
6
6
|
import { SUBAGENT_ACTIONS } from "../shared/types.ts";
|
|
7
7
|
|
|
8
|
+
// Descriptor-preserving clone: typebox 1.3.11 metadata ("~kind", "~unsafe",
|
|
9
|
+
// "~optional") lives in NON-ENUMERABLE string-keyed properties. Object spread
|
|
10
|
+
// would drop them, and Type.Optional on a plain clone would re-add "~optional"
|
|
11
|
+
// as an enumerable key, leaking "~optional":true into the serialized JSON.
|
|
12
|
+
const brief = <T extends object>(schema: T, description: string): T =>
|
|
13
|
+
Object.defineProperties(
|
|
14
|
+
Object.defineProperties(Object.create(null), Object.getOwnPropertyDescriptors(schema)),
|
|
15
|
+
{ description: { value: description, enumerable: true, writable: true, configurable: true } },
|
|
16
|
+
) as T;
|
|
17
|
+
|
|
8
18
|
const SkillOverride = Type.Unsafe({
|
|
9
19
|
anyOf: [
|
|
10
20
|
{ type: "array", items: { type: "string" } },
|
|
11
21
|
{ type: "boolean" },
|
|
12
22
|
{ type: "string" },
|
|
13
23
|
],
|
|
14
|
-
description: "
|
|
24
|
+
description: "CSV/array/boolean (false disables, true default).",
|
|
15
25
|
});
|
|
16
26
|
|
|
17
27
|
const OutputOverride = Type.Unsafe({
|
|
@@ -24,7 +34,7 @@ const OutputOverride = Type.Unsafe({
|
|
|
24
34
|
|
|
25
35
|
const OutputModeOverride = Type.String({
|
|
26
36
|
enum: ["inline", "file-only"],
|
|
27
|
-
description: "
|
|
37
|
+
description: "inline (default) or file-only (needs output path).",
|
|
28
38
|
});
|
|
29
39
|
|
|
30
40
|
const ReadsOverride = Type.Unsafe({
|
|
@@ -38,7 +48,7 @@ const ReadsOverride = Type.Unsafe({
|
|
|
38
48
|
const JsonSchemaObject = Type.Unsafe({
|
|
39
49
|
type: "object",
|
|
40
50
|
additionalProperties: true,
|
|
41
|
-
description: "
|
|
51
|
+
description: "Structured output; non-object rejected.",
|
|
42
52
|
});
|
|
43
53
|
|
|
44
54
|
const AcceptanceEvidenceKind = Type.String({
|
|
@@ -108,108 +118,108 @@ const AcceptanceOverride = Type.Unsafe({
|
|
|
108
118
|
additionalProperties: false,
|
|
109
119
|
},
|
|
110
120
|
],
|
|
111
|
-
description: "
|
|
121
|
+
description: "Acceptance: auto if omitted; verified needs cmds.",
|
|
112
122
|
});
|
|
113
123
|
|
|
114
124
|
const TaskItem = Type.Object({
|
|
115
125
|
agent: Type.String(),
|
|
116
126
|
task: Type.String(),
|
|
117
127
|
cwd: Type.Optional(Type.String()),
|
|
118
|
-
count: Type.Optional(Type.Integer({ minimum: 1, description: "Repeat
|
|
119
|
-
output: Type.Optional(OutputOverride),
|
|
120
|
-
outputMode: Type.Optional(OutputModeOverride),
|
|
128
|
+
count: Type.Optional(Type.Integer({ minimum: 1, description: "Repeat N times (same settings)." })),
|
|
129
|
+
output: Type.Optional(brief(OutputOverride, "Output file path, or false.")),
|
|
130
|
+
outputMode: Type.Optional(brief(OutputModeOverride, "Default: inline.")),
|
|
121
131
|
reads: Type.Optional(ReadsOverride),
|
|
122
|
-
progress: Type.Optional(Type.Boolean({ description: "
|
|
123
|
-
model: Type.Optional(Type.String(
|
|
124
|
-
skill: Type.Optional(SkillOverride),
|
|
125
|
-
acceptance: Type.Optional(AcceptanceOverride),
|
|
132
|
+
progress: Type.Optional(Type.Boolean({ description: "true enables progress.md tracking; omit or false disables." })),
|
|
133
|
+
model: Type.Optional(Type.String()),
|
|
134
|
+
skill: Type.Optional(brief(SkillOverride, "Skill override.")),
|
|
135
|
+
acceptance: Type.Optional(brief(AcceptanceOverride, "Acceptance override.")),
|
|
126
136
|
});
|
|
127
137
|
|
|
128
138
|
// Parallel task item (within a parallel step)
|
|
129
139
|
const ParallelTaskSchema = Type.Object({
|
|
130
140
|
agent: Type.String(),
|
|
131
|
-
task: Type.Optional(Type.String({ description: "
|
|
132
|
-
phase: Type.Optional(Type.String(
|
|
133
|
-
label: Type.Optional(Type.String(
|
|
134
|
-
as: Type.Optional(Type.String({ description: "
|
|
135
|
-
outputSchema: Type.Optional(JsonSchemaObject),
|
|
141
|
+
task: Type.Optional(Type.String({ description: "{task},{previous},{chain_dir} template; defaults to {previous}." })),
|
|
142
|
+
phase: Type.Optional(Type.String()),
|
|
143
|
+
label: Type.Optional(Type.String()),
|
|
144
|
+
as: Type.Optional(Type.String({ description: "Identifier for {outputs.name}." })),
|
|
145
|
+
outputSchema: Type.Optional(brief(JsonSchemaObject, "Output JSON Schema.")),
|
|
136
146
|
cwd: Type.Optional(Type.String()),
|
|
137
|
-
count: Type.Optional(Type.Integer({ minimum: 1, description: "Repeat
|
|
138
|
-
output: Type.Optional(OutputOverride),
|
|
139
|
-
outputMode: Type.Optional(OutputModeOverride),
|
|
140
|
-
reads: Type.Optional(ReadsOverride),
|
|
141
|
-
progress: Type.Optional(Type.Boolean({ description: "Enable progress.md tracking
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
acceptance: Type.Optional(AcceptanceOverride),
|
|
147
|
+
count: Type.Optional(Type.Integer({ minimum: 1, description: "Repeat N times." })),
|
|
148
|
+
output: Type.Optional(brief(OutputOverride, "Output file path, or false.")),
|
|
149
|
+
outputMode: Type.Optional(brief(OutputModeOverride, "Default: inline.")),
|
|
150
|
+
reads: Type.Optional(brief(ReadsOverride, "Reads first, or false.")),
|
|
151
|
+
progress: Type.Optional(Type.Boolean({ description: "Enable progress.md tracking." })),
|
|
152
|
+
model: Type.Optional(Type.String()),
|
|
153
|
+
skill: Type.Optional(brief(SkillOverride, "Skill override.")),
|
|
154
|
+
acceptance: Type.Optional(brief(AcceptanceOverride, "Acceptance override.")),
|
|
145
155
|
});
|
|
146
156
|
|
|
147
157
|
const DynamicExpandSchema = Type.Object({
|
|
148
158
|
from: Type.Object({
|
|
149
|
-
output: Type.String({ description: "
|
|
150
|
-
path: Type.String({ description: "JSON Pointer into
|
|
159
|
+
output: Type.String({ description: "Named prior output." }),
|
|
160
|
+
path: Type.String({ description: "JSON Pointer into it." }),
|
|
151
161
|
}, { additionalProperties: false }),
|
|
152
|
-
item: Type.Optional(Type.String({ description: "
|
|
153
|
-
key: Type.Optional(Type.String({ description: "
|
|
154
|
-
maxItems: Type.Optional(Type.Integer({ minimum: 0, description: "Required
|
|
155
|
-
onEmpty: Type.Optional(Type.String({ enum: ["skip", "fail"], description: "
|
|
162
|
+
item: Type.Optional(Type.String({ description: "Defaults to item." })),
|
|
163
|
+
key: Type.Optional(Type.String({ description: "Pointer per item; stable child id." })),
|
|
164
|
+
maxItems: Type.Optional(Type.Integer({ minimum: 0, description: "Required unless chain.dynamicFanout.maxItems is configured." })),
|
|
165
|
+
onEmpty: Type.Optional(Type.String({ enum: ["skip", "fail"], description: "Defaults to skip." })),
|
|
156
166
|
}, { additionalProperties: false });
|
|
157
167
|
|
|
158
168
|
const DynamicParallelTemplateSchema = Type.Object({
|
|
159
169
|
agent: Type.String(),
|
|
160
|
-
task: Type.Optional(Type.String({ description: "
|
|
161
|
-
phase: Type.Optional(Type.String(
|
|
162
|
-
label: Type.Optional(Type.String({ description: "
|
|
163
|
-
outputSchema: Type.Optional(JsonSchemaObject),
|
|
170
|
+
task: Type.Optional(Type.String({ description: "{item},{item.path},{task},{previous},{chain_dir},{outputs.name} template." })),
|
|
171
|
+
phase: Type.Optional(Type.String()),
|
|
172
|
+
label: Type.Optional(Type.String({ description: "Label; item templates supported." })),
|
|
173
|
+
outputSchema: Type.Optional(brief(JsonSchemaObject, "Output JSON Schema.")),
|
|
164
174
|
cwd: Type.Optional(Type.String()),
|
|
165
|
-
output: Type.Optional(OutputOverride),
|
|
166
|
-
outputMode: Type.Optional(OutputModeOverride),
|
|
167
|
-
reads: Type.Optional(ReadsOverride),
|
|
168
|
-
progress: Type.Optional(Type.Boolean({ description: "Enable progress.md tracking
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
acceptance: Type.Optional(AcceptanceOverride),
|
|
175
|
+
output: Type.Optional(brief(OutputOverride, "Output file path, or false.")),
|
|
176
|
+
outputMode: Type.Optional(brief(OutputModeOverride, "Default: inline.")),
|
|
177
|
+
reads: Type.Optional(brief(ReadsOverride, "Reads first, or false.")),
|
|
178
|
+
progress: Type.Optional(Type.Boolean({ description: "Enable progress.md tracking." })),
|
|
179
|
+
model: Type.Optional(Type.String()),
|
|
180
|
+
skill: Type.Optional(brief(SkillOverride, "Skill override.")),
|
|
181
|
+
acceptance: Type.Optional(brief(AcceptanceOverride, "Acceptance override.")),
|
|
172
182
|
}, { additionalProperties: false });
|
|
173
183
|
|
|
174
184
|
const DynamicCollectSchema = Type.Object({
|
|
175
|
-
as: Type.String({ description: "
|
|
176
|
-
outputSchema: Type.Optional(JsonSchemaObject),
|
|
185
|
+
as: Type.String({ description: "Collected result array name." }),
|
|
186
|
+
outputSchema: Type.Optional(brief(JsonSchemaObject, "Output JSON Schema.")),
|
|
177
187
|
}, { additionalProperties: false });
|
|
178
188
|
|
|
179
189
|
// Flattened so chain steps do not need an object-shape anyOf/oneOf union.
|
|
180
190
|
const ChainItem = Type.Object({
|
|
181
|
-
agent: Type.Optional(Type.String(
|
|
191
|
+
agent: Type.Optional(Type.String()),
|
|
182
192
|
task: Type.Optional(Type.String({
|
|
183
|
-
description: "
|
|
193
|
+
description: "{task},{previous},{chain_dir},{outputs.name}; required first else '{previous}'."
|
|
184
194
|
})),
|
|
185
|
-
phase: Type.Optional(Type.String({ description: "
|
|
186
|
-
label: Type.Optional(Type.String({ description: "
|
|
187
|
-
as: Type.Optional(Type.String({ description: "
|
|
195
|
+
phase: Type.Optional(Type.String({ description: "Phase/group label (status/graph)." })),
|
|
196
|
+
label: Type.Optional(Type.String({ description: "Chain step label." })),
|
|
197
|
+
as: Type.Optional(Type.String({ description: "Id for {outputs.name} in later steps." })),
|
|
188
198
|
outputSchema: Type.Optional(JsonSchemaObject),
|
|
189
199
|
cwd: Type.Optional(Type.String()),
|
|
190
|
-
output: Type.Optional(OutputOverride),
|
|
191
|
-
outputMode: Type.Optional(OutputModeOverride),
|
|
192
|
-
reads: Type.Optional(ReadsOverride),
|
|
200
|
+
output: Type.Optional(brief(OutputOverride, "Output file path, or false.")),
|
|
201
|
+
outputMode: Type.Optional(brief(OutputModeOverride, "Default: inline.")),
|
|
202
|
+
reads: Type.Optional(brief(ReadsOverride, "Reads first, or false.")),
|
|
193
203
|
progress: Type.Optional(Type.Boolean({ description: "Enable progress.md tracking in {chain_dir}" })),
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
acceptance: Type.Optional(AcceptanceOverride),
|
|
204
|
+
model: Type.Optional(Type.String()),
|
|
205
|
+
skill: Type.Optional(brief(SkillOverride, "Skill override.")),
|
|
206
|
+
acceptance: Type.Optional(brief(AcceptanceOverride, "Acceptance override.")),
|
|
197
207
|
parallel: Type.Optional(Type.Unsafe({
|
|
198
208
|
anyOf: [
|
|
199
|
-
Type.Array(ParallelTaskSchema, { minItems: 1
|
|
209
|
+
Type.Array(ParallelTaskSchema, { minItems: 1 }),
|
|
200
210
|
DynamicParallelTemplateSchema,
|
|
201
211
|
],
|
|
202
|
-
description: "Static
|
|
212
|
+
description: "Static array, or dynamic fanout template (expand/collect).",
|
|
203
213
|
})),
|
|
204
214
|
expand: Type.Optional(DynamicExpandSchema),
|
|
205
215
|
collect: Type.Optional(DynamicCollectSchema),
|
|
206
216
|
concurrency: Type.Optional(Type.Number({ description: "Max concurrent tasks (default: 4)" })),
|
|
207
217
|
failFast: Type.Optional(Type.Boolean({ description: "Stop on first failure (default: false)" })),
|
|
208
218
|
worktree: Type.Optional(Type.Boolean({
|
|
209
|
-
description: "
|
|
219
|
+
description: "Isolated worktree per task."
|
|
210
220
|
})),
|
|
211
221
|
}, {
|
|
212
|
-
description: "
|
|
222
|
+
description: "{agent,task?} seq; {parallel:[..]} concurrent; {expand,parallel,collect} fanout.",
|
|
213
223
|
additionalProperties: false,
|
|
214
224
|
allOf: [
|
|
215
225
|
{ if: { required: ["expand"] }, then: { required: ["parallel", "collect"], properties: { parallel: { type: "object" } } } },
|
|
@@ -219,44 +229,44 @@ const ChainItem = Type.Object({
|
|
|
219
229
|
});
|
|
220
230
|
|
|
221
231
|
const ControlOverrides = Type.Object({
|
|
222
|
-
enabled: Type.Optional(Type.Boolean({ description: "
|
|
223
|
-
needsAttentionAfterMs: Type.Optional(Type.Integer({ minimum: 1, description: "No-
|
|
224
|
-
activeNoticeAfterMs: Type.Optional(Type.Integer({ minimum: 1, description: "
|
|
225
|
-
inFlightSilenceCeilingMs: Type.Optional(Type.Integer({ minimum: 1, description: "
|
|
226
|
-
inFlightSilenceKillMs: Type.Optional(Type.Integer({ minimum: 1, description: "
|
|
227
|
-
activeNoticeAfterTurns: Type.Optional(Type.Integer({ minimum: 1, description: "
|
|
228
|
-
activeNoticeAfterTokens: Type.Optional(Type.Integer({ minimum: 1, description: "
|
|
229
|
-
failedToolAttemptsBeforeAttention: Type.Optional(Type.Integer({ minimum: 1, description: "
|
|
232
|
+
enabled: Type.Optional(Type.Boolean({ description: "Toggle attention tracking." })),
|
|
233
|
+
needsAttentionAfterMs: Type.Optional(Type.Integer({ minimum: 1, description: "No-activity window before needs_attention." })),
|
|
234
|
+
activeNoticeAfterMs: Type.Optional(Type.Integer({ minimum: 1, description: "Elapsed-ms notice threshold (default: 240000)." })),
|
|
235
|
+
inFlightSilenceCeilingMs: Type.Optional(Type.Integer({ minimum: 1, description: "Silent ms before escalation (default: 600000)." })),
|
|
236
|
+
inFlightSilenceKillMs: Type.Optional(Type.Integer({ minimum: 1, description: "SIGTERM child (default: 1800000, clamped above needs_attention)." })),
|
|
237
|
+
activeNoticeAfterTurns: Type.Optional(Type.Integer({ minimum: 1, description: "Notice by assistant turns (off by default)." })),
|
|
238
|
+
activeNoticeAfterTokens: Type.Optional(Type.Integer({ minimum: 1, description: "Notice by total tokens (off by default)." })),
|
|
239
|
+
failedToolAttemptsBeforeAttention: Type.Optional(Type.Integer({ minimum: 1, description: "Mutating-tool failures before needs_attention (default: 3)." })),
|
|
230
240
|
notifyOn: Type.Optional(Type.Array(Type.String({ enum: ["active_long_running", "needs_attention"] }), {
|
|
231
|
-
description: "
|
|
241
|
+
description: "To parent (default: active_long_running, needs_attention).",
|
|
232
242
|
})),
|
|
233
243
|
notifyChannels: Type.Optional(Type.Array(Type.String({ enum: ["event", "async", "intercom"] }), {
|
|
234
|
-
description: "
|
|
244
|
+
description: "Default: event, async, intercom.",
|
|
235
245
|
})),
|
|
236
246
|
});
|
|
237
247
|
|
|
238
248
|
export const SubagentParams = Type.Object({
|
|
239
|
-
agent: Type.Optional(Type.String({ description: "
|
|
240
|
-
task: Type.Optional(Type.String({ description: "Task (SINGLE mode
|
|
249
|
+
agent: Type.Optional(Type.String({ description: "SINGLE mode agent, or management target." })),
|
|
250
|
+
task: Type.Optional(Type.String({ description: "Task (SINGLE mode; optional if self-contained)." })),
|
|
241
251
|
// Management action (when present, tool operates in management mode)
|
|
242
252
|
action: Type.Optional(Type.String({
|
|
243
253
|
enum: [...SUBAGENT_ACTIONS],
|
|
244
254
|
description: "Management/control action. Omit for execution mode."
|
|
245
255
|
})),
|
|
246
256
|
id: Type.Optional(Type.String({
|
|
247
|
-
description: "Run id
|
|
257
|
+
description: "Run id/prefix for status/interrupt/resume."
|
|
248
258
|
})),
|
|
249
259
|
runId: Type.Optional(Type.String({
|
|
250
|
-
description: "
|
|
260
|
+
description: "Run ID (interrupt/resume); defaults to latest. Prefer id."
|
|
251
261
|
})),
|
|
252
262
|
dir: Type.Optional(Type.String({
|
|
253
|
-
description: "Async run
|
|
263
|
+
description: "Async run dir for status/resume."
|
|
254
264
|
})),
|
|
255
|
-
index: Type.Optional(Type.Integer({ minimum: 0, description: "Zero-based
|
|
256
|
-
message: Type.Optional(Type.String({ description: "Follow-up message for
|
|
265
|
+
index: Type.Optional(Type.Integer({ minimum: 0, description: "Zero-based index for per-child actions." })),
|
|
266
|
+
message: Type.Optional(Type.String({ description: "Follow-up message for resume." })),
|
|
257
267
|
// Chain identifier for management (can't reuse 'chain' — that's the execution array)
|
|
258
268
|
chainName: Type.Optional(Type.String({
|
|
259
|
-
description: "Chain name
|
|
269
|
+
description: "Chain name."
|
|
260
270
|
})),
|
|
261
271
|
// Agent/chain configuration for create/update (nested to avoid conflicts with execution fields)
|
|
262
272
|
config: Type.Optional(Type.Unsafe({
|
|
@@ -264,32 +274,30 @@ export const SubagentParams = Type.Object({
|
|
|
264
274
|
{ type: "object", additionalProperties: true },
|
|
265
275
|
{ type: "string" },
|
|
266
276
|
],
|
|
267
|
-
description: "
|
|
277
|
+
description: "Create/update config; fields: pi-cohort skill reference/config-fields.md; string=JSON."
|
|
268
278
|
})),
|
|
269
|
-
tasks: Type.Optional(Type.Array(TaskItem, { description: "PARALLEL mode: [{agent, task,
|
|
270
|
-
concurrency: Type.Optional(Type.Integer({ minimum: 1, description: "
|
|
279
|
+
tasks: Type.Optional(Type.Array(TaskItem, { description: "PARALLEL mode tasks: [{agent, task, ...}]." })),
|
|
280
|
+
concurrency: Type.Optional(Type.Integer({ minimum: 1, description: "Default: config.parallel.concurrency or 4." })),
|
|
271
281
|
worktree: Type.Optional(Type.Boolean({
|
|
272
|
-
description: "
|
|
273
|
-
"Prevents filesystem conflicts. Requires clean git state. " +
|
|
274
|
-
"Per-worktree diffs included in output."
|
|
282
|
+
description: "Isolated worktree per task; clean git; diffs in output."
|
|
275
283
|
})),
|
|
276
|
-
chain: Type.Optional(Type.Array(ChainItem, { description: "CHAIN
|
|
284
|
+
chain: Type.Optional(Type.Array(ChainItem, { description: "CHAIN: sequential; step response becomes {previous}." })),
|
|
277
285
|
context: Type.Optional(Type.String({
|
|
278
286
|
enum: ["fresh", "fork"],
|
|
279
|
-
description: "
|
|
287
|
+
description: "fresh (default) or fork; defaultContext:fork forces whole invocation.",
|
|
280
288
|
})),
|
|
281
|
-
chainDir: Type.Optional(Type.String({ description: "
|
|
282
|
-
async: Type.Optional(Type.Boolean({ description: "
|
|
283
|
-
agentScope: Type.Optional(Type.String({ description: "
|
|
289
|
+
chainDir: Type.Optional(Type.String({ description: "Default temp <tmpdir>/, 24h clean." })),
|
|
290
|
+
async: Type.Optional(Type.Boolean({ description: "Background run (default: false, or per config)." })),
|
|
291
|
+
agentScope: Type.Optional(Type.String({ description: "user/project/both (default both, project wins)." })),
|
|
284
292
|
cwd: Type.Optional(Type.String()),
|
|
285
|
-
artifacts: Type.Optional(Type.Boolean({ description: "
|
|
286
|
-
includeProgress: Type.Optional(Type.Boolean({ description: "
|
|
287
|
-
share: Type.Optional(Type.Boolean({ description: "Upload session to GitHub Gist
|
|
293
|
+
artifacts: Type.Optional(Type.Boolean({ description: "(default: true)." })),
|
|
294
|
+
includeProgress: Type.Optional(Type.Boolean({ description: "(default: false)." })),
|
|
295
|
+
share: Type.Optional(Type.Boolean({ description: "Upload session to GitHub Gist (default: false)." })),
|
|
288
296
|
sessionDir: Type.Optional(
|
|
289
|
-
Type.String({ description: "
|
|
297
|
+
Type.String({ description: "Default temp; enables sessions even if share=false." }),
|
|
290
298
|
),
|
|
291
299
|
// Clarification TUI
|
|
292
|
-
clarify: Type.Optional(Type.Boolean({ description: "
|
|
300
|
+
clarify: Type.Optional(Type.Boolean({ description: "Preview/edit TUI; omitted/false runs directly; true=foreground (if supported); parallel-step chains skip it." })),
|
|
293
301
|
control: Type.Optional(ControlOverrides),
|
|
294
302
|
// Solo agent overrides
|
|
295
303
|
output: Type.Optional(Type.Unsafe({
|
|
@@ -297,10 +305,10 @@ export const SubagentParams = Type.Object({
|
|
|
297
305
|
{ type: "string" },
|
|
298
306
|
{ type: "boolean" },
|
|
299
307
|
],
|
|
300
|
-
description: "Omit or
|
|
308
|
+
description: "Omit or false disables; true=agent-configured filename; string=path (rel. cwd).",
|
|
301
309
|
})),
|
|
302
310
|
outputMode: Type.Optional(OutputModeOverride),
|
|
303
311
|
skill: Type.Optional(SkillOverride),
|
|
304
|
-
model: Type.Optional(Type.String({ description: "
|
|
312
|
+
model: Type.Optional(Type.String({ description: "Model override, e.g. 'anthropic/claude-sonnet-4'." })),
|
|
305
313
|
acceptance: Type.Optional(AcceptanceOverride),
|
|
306
314
|
});
|