@mmerterden/multi-agent-pipeline 20.30.0 → 20.33.0
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 +80 -0
- package/README.md +45 -0
- package/README.tr.md +59 -0
- package/docs/facts.json +3 -3
- package/install/_unattended-profile.mjs +61 -0
- package/install/catalog-history.json +1 -1
- package/install/claude.mjs +9 -2
- package/install/index.mjs +10 -1
- package/install/templates/claude-hooks.json +12 -1
- package/manifest.json +123 -82
- package/package.json +2 -1
- package/pipeline/commands/multi-agent/analysis/SKILL.md +4 -4
- package/pipeline/commands/multi-agent/office-on/SKILL.md +8 -7
- package/pipeline/commands/multi-agent/office-status/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/prune-logs/SKILL.md +4 -1
- package/pipeline/commands/multi-agent/review/SKILL.md +4 -3
- package/pipeline/commands/multi-agent/scenario-audit/SKILL.md +4 -2
- package/pipeline/commands/multi-agent/sync/SKILL.md +12 -0
- package/pipeline/commands/multi-agent/test-gen/SKILL.md +29 -3
- package/pipeline/contract/CHANGELOG.md +46 -0
- package/pipeline/contract/README.md +22 -8
- package/pipeline/contract/fixtures/error-invalid-request.json +1 -1
- package/pipeline/contract/fixtures/error-unauthorized.json +1 -1
- package/pipeline/contract/fixtures/error-unsigned.json +1 -1
- package/pipeline/contract/fixtures/launch-plan.json +1 -1
- package/pipeline/contract/fixtures/runs-awaiting-question.json +6 -1
- package/pipeline/contract/fixtures/runs-empty.json +1 -1
- package/pipeline/contract/fixtures/runs-failed.json +6 -1
- package/pipeline/contract/fixtures/runs-old-schema.json +6 -1
- package/pipeline/contract/fixtures/runs-pr-opened-redacted.json +5 -1
- package/pipeline/contract/fixtures/runs-pr-opened.json +6 -1
- package/pipeline/contract/fixtures/runs-running.json +6 -1
- package/pipeline/contract/manifest.json +153 -19
- package/pipeline/contract/types/index.d.ts +304 -6
- package/pipeline/lib/bg-launch.mjs +106 -0
- package/pipeline/lib/code-digest.mjs +49 -0
- package/pipeline/lib/credential-resolve.mjs +42 -2
- package/pipeline/multi-agent-refs/features/office-threat-model.md +24 -6
- package/pipeline/multi-agent-refs/features/unattended-security.md +1 -1
- package/pipeline/multi-agent-refs/help/en.md +2 -2
- package/pipeline/multi-agent-refs/help/tr.md +2 -2
- package/pipeline/multi-agent-refs/phases/modes.md +7 -7
- package/pipeline/multi-agent-refs/phases/phase-5-report.md +16 -10
- package/pipeline/multi-agent-refs/review-standalone-tracker.md +37 -0
- package/pipeline/multi-agent-refs/tracker-contract.md +8 -3
- package/pipeline/office/NOTICE.md +4 -1
- package/pipeline/office/assets/ARCHIVE_BOXES.png +0 -0
- package/pipeline/office/assets/COFFEE_MACHINE.png +0 -0
- package/pipeline/office/assets/COUNTER_SINK.png +0 -0
- package/pipeline/office/assets/DEVICE_STAND.png +0 -0
- package/pipeline/office/assets/FILING_CABINET.png +0 -0
- package/pipeline/office/assets/FRIDGE.png +0 -0
- package/pipeline/office/assets/MAILBOX.png +0 -0
- package/pipeline/office/assets/MOP_BUCKET.png +0 -0
- package/pipeline/office/assets/PRINTER.png +0 -0
- package/pipeline/office/assets/RECEPTION_DESK.png +0 -0
- package/pipeline/office/assets/SERVER_RACK.png +0 -0
- package/pipeline/office/assets/SERVER_RACK_2.png +0 -0
- package/pipeline/office/assets/TOILET_STALL.png +0 -0
- package/pipeline/office/assets/VENDING.png +0 -0
- package/pipeline/office/assets/WASHBASIN.png +0 -0
- package/pipeline/office/assets/WATER_COOLER.png +0 -0
- package/pipeline/office/index.html +3996 -884
- package/pipeline/office/toolkit.json +3 -0
- package/pipeline/schemas/activity.schema.json +188 -4
- package/pipeline/schemas/agent-state.schema.json +493 -115
- package/pipeline/schemas/contract-error.schema.json +12 -1
- package/pipeline/schemas/job-change.schema.json +72 -0
- package/pipeline/schemas/job-request.schema.json +38 -0
- package/pipeline/schemas/launch.json +4 -4
- package/pipeline/schemas/office-credentials.schema.json +71 -0
- package/pipeline/schemas/office-jobs.json +253 -0
- package/pipeline/schemas/office-jobs.schema.json +62 -0
- package/pipeline/schemas/office-memory.schema.json +105 -0
- package/pipeline/schemas/office-settings-request.schema.json +30 -0
- package/pipeline/schemas/office-settings.schema.json +67 -0
- package/pipeline/schemas/phases.json +10 -2
- package/pipeline/schemas/phases.schema.json +86 -19
- package/pipeline/schemas/prs.schema.json +5 -0
- package/pipeline/schemas/prune-logs-request.schema.json +26 -0
- package/pipeline/schemas/prune-logs.schema.json +52 -0
- package/pipeline/schemas/repo-change.schema.json +54 -0
- package/pipeline/schemas/repo-request.schema.json +29 -0
- package/pipeline/schemas/repos.schema.json +49 -1
- package/pipeline/schemas/runs-index.schema.json +257 -46
- package/pipeline/schemas/system-status.schema.json +111 -0
- package/pipeline/schemas/tools.schema.json +5 -0
- package/pipeline/schemas/unattended-profile.json +7 -2
- package/pipeline/scripts/_active-run.mjs +2 -1
- package/pipeline/scripts/_spawn-async.mjs +9 -5
- package/pipeline/scripts/activity-snapshot.mjs +219 -23
- package/pipeline/scripts/autopilot-runner.mjs +7 -5
- package/pipeline/scripts/contract-server.mjs +551 -25
- package/pipeline/scripts/gen-mode-dispatch.mjs +3 -1
- package/pipeline/scripts/job-launch.mjs +477 -0
- package/pipeline/scripts/launch-request.mjs +94 -9
- package/pipeline/scripts/office-build.mjs +148 -11
- package/pipeline/scripts/office-control.mjs +34 -7
- package/pipeline/scripts/office-credentials.mjs +106 -0
- package/pipeline/scripts/office-memory.mjs +200 -0
- package/pipeline/scripts/office-prune.mjs +125 -0
- package/pipeline/scripts/office-settings.mjs +145 -0
- package/pipeline/scripts/phase-tracker.sh +12 -5
- package/pipeline/scripts/prune-logs.sh +53 -2
- package/pipeline/scripts/runs-index.mjs +62 -2
- package/pipeline/scripts/system-status.mjs +196 -0
- package/pipeline/scripts/task-mirror.mjs +150 -0
- package/pipeline/scripts/task-mirror.sh +20 -0
- package/pipeline/scripts/toolkit-tools.mjs +33 -7
- package/pipeline/scripts/transcript-index.mjs +4 -1
- package/pipeline/scripts/work-items.mjs +191 -22
- package/pipeline/skills/.skill-manifest.json +6 -6
- package/pipeline/skills/.skills-index.json +1 -1
- package/pipeline/skills/shared/README.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-office-on/SKILL.md +3 -4
- package/pipeline/skills/shared/core/multi-agent-prune-logs/SKILL.md +4 -1
- package/pipeline/skills/shared/core/multi-agent-review/SKILL.md +19 -0
- package/pipeline/skills/shared/core/multi-agent-scenario-audit/SKILL.md +4 -2
- package/pipeline/skills/shared/core/multi-agent-test-gen/SKILL.md +26 -3
- package/pipeline/skills/skills-index.md +1 -1
|
@@ -17,11 +17,17 @@
|
|
|
17
17
|
"x-sensitivity": "local",
|
|
18
18
|
"description": "Absent under --redact."
|
|
19
19
|
},
|
|
20
|
-
"count": {
|
|
20
|
+
"count": {
|
|
21
|
+
"type": "integer",
|
|
22
|
+
"minimum": 0,
|
|
23
|
+
"x-sensitivity": "none"
|
|
24
|
+
},
|
|
21
25
|
"runs": {
|
|
22
26
|
"type": "array",
|
|
23
27
|
"x-sensitivity": "none",
|
|
24
|
-
"items": {
|
|
28
|
+
"items": {
|
|
29
|
+
"$ref": "#/$defs/run"
|
|
30
|
+
}
|
|
25
31
|
}
|
|
26
32
|
},
|
|
27
33
|
"$defs": {
|
|
@@ -49,36 +55,82 @@
|
|
|
49
55
|
"unlockedWrites"
|
|
50
56
|
],
|
|
51
57
|
"properties": {
|
|
52
|
-
"taskId": {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
58
|
+
"taskId": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"x-sensitivity": "none"
|
|
61
|
+
},
|
|
62
|
+
"project": {
|
|
63
|
+
"type": ["string", "null"],
|
|
64
|
+
"x-sensitivity": "none"
|
|
65
|
+
},
|
|
66
|
+
"dir": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"x-sensitivity": "local",
|
|
69
|
+
"description": "The run directory."
|
|
70
|
+
},
|
|
71
|
+
"layout": {
|
|
72
|
+
"enum": ["nested", "flat"],
|
|
73
|
+
"x-sensitivity": "none"
|
|
74
|
+
},
|
|
56
75
|
"duplicateOf": {
|
|
57
76
|
"type": ["string", "null"],
|
|
58
77
|
"x-sensitivity": "local",
|
|
59
78
|
"description": "The other layout's directory for the same task id, when both exist."
|
|
60
79
|
},
|
|
61
|
-
"salvaged": {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"
|
|
80
|
+
"salvaged": {
|
|
81
|
+
"type": "boolean",
|
|
82
|
+
"x-sensitivity": "none"
|
|
83
|
+
},
|
|
84
|
+
"kind": {
|
|
85
|
+
"enum": ["pipeline", "tracker-only", "empty"],
|
|
86
|
+
"x-sensitivity": "none"
|
|
87
|
+
},
|
|
88
|
+
"stateReadable": {
|
|
89
|
+
"type": "boolean",
|
|
90
|
+
"x-sensitivity": "none"
|
|
91
|
+
},
|
|
92
|
+
"status": {
|
|
93
|
+
"type": ["string", "null"],
|
|
94
|
+
"x-sensitivity": "none"
|
|
95
|
+
},
|
|
96
|
+
"currentPhase": {
|
|
97
|
+
"type": ["integer", "null"],
|
|
98
|
+
"x-sensitivity": "none"
|
|
99
|
+
},
|
|
100
|
+
"branch": {
|
|
101
|
+
"type": ["string", "null"],
|
|
102
|
+
"x-sensitivity": "none"
|
|
103
|
+
},
|
|
104
|
+
"baseBranch": {
|
|
105
|
+
"type": ["string", "null"],
|
|
106
|
+
"x-sensitivity": "none"
|
|
107
|
+
},
|
|
108
|
+
"startedAt": {
|
|
109
|
+
"type": ["string", "null"],
|
|
110
|
+
"x-sensitivity": "none"
|
|
111
|
+
},
|
|
112
|
+
"worktreePath": {
|
|
113
|
+
"type": ["string", "null"],
|
|
114
|
+
"x-sensitivity": "local"
|
|
115
|
+
},
|
|
70
116
|
"prUrl": {
|
|
71
117
|
"type": ["string", "null"],
|
|
72
118
|
"x-sensitivity": "local",
|
|
73
119
|
"description": "Carries the host, so it stays on this machine."
|
|
74
120
|
},
|
|
75
|
-
"autopilot": {
|
|
121
|
+
"autopilot": {
|
|
122
|
+
"type": "boolean",
|
|
123
|
+
"x-sensitivity": "none"
|
|
124
|
+
},
|
|
76
125
|
"schemaVersion": {
|
|
77
126
|
"type": ["string", "null"],
|
|
78
127
|
"x-sensitivity": "none",
|
|
79
128
|
"description": "The run's agent-state schemaVersion. Always a string; a number in a hand-edited state is printed as its string."
|
|
80
129
|
},
|
|
81
|
-
"rev": {
|
|
130
|
+
"rev": {
|
|
131
|
+
"type": ["integer", "null"],
|
|
132
|
+
"x-sensitivity": "none"
|
|
133
|
+
},
|
|
82
134
|
"sessionId": {
|
|
83
135
|
"type": ["string", "null"],
|
|
84
136
|
"x-sensitivity": "none",
|
|
@@ -92,26 +144,60 @@
|
|
|
92
144
|
"pendingQuestion": {
|
|
93
145
|
"x-sensitivity": "none",
|
|
94
146
|
"description": "The question the run stopped on, present only with waitingFor question. Answer it with one of options[].id through `answer-question.mjs` or POST /v1/runs/{id}/answer. text and labels are scrubbed under --redact. Added in 1.1.0.",
|
|
95
|
-
"oneOf": [
|
|
147
|
+
"oneOf": [
|
|
148
|
+
{
|
|
149
|
+
"type": "null"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"$ref": "#/$defs/question"
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
"group": {
|
|
157
|
+
"enum": ["waiting", "stopped", "question", "unknown"],
|
|
158
|
+
"x-sensitivity": "none"
|
|
96
159
|
},
|
|
97
|
-
"group": { "enum": ["waiting", "stopped", "question", "unknown"], "x-sensitivity": "none" },
|
|
98
160
|
"phases": {
|
|
99
161
|
"type": "array",
|
|
100
162
|
"x-sensitivity": "none",
|
|
101
|
-
"items": {
|
|
163
|
+
"items": {
|
|
164
|
+
"$ref": "#/$defs/phase"
|
|
165
|
+
}
|
|
102
166
|
},
|
|
103
167
|
"tokens": {
|
|
104
168
|
"type": "object",
|
|
105
169
|
"required": ["in", "out", "cached"],
|
|
106
170
|
"x-sensitivity": "none",
|
|
107
171
|
"properties": {
|
|
108
|
-
"in": {
|
|
109
|
-
|
|
110
|
-
|
|
172
|
+
"in": {
|
|
173
|
+
"type": "integer",
|
|
174
|
+
"minimum": 0
|
|
175
|
+
},
|
|
176
|
+
"out": {
|
|
177
|
+
"type": "integer",
|
|
178
|
+
"minimum": 0
|
|
179
|
+
},
|
|
180
|
+
"cached": {
|
|
181
|
+
"type": "integer",
|
|
182
|
+
"minimum": 0
|
|
183
|
+
}
|
|
111
184
|
}
|
|
112
185
|
},
|
|
113
|
-
"estUsd": {
|
|
114
|
-
|
|
186
|
+
"estUsd": {
|
|
187
|
+
"type": "number",
|
|
188
|
+
"minimum": 0,
|
|
189
|
+
"x-sensitivity": "none"
|
|
190
|
+
},
|
|
191
|
+
"unlockedWrites": {
|
|
192
|
+
"type": "integer",
|
|
193
|
+
"minimum": 0,
|
|
194
|
+
"x-sensitivity": "none"
|
|
195
|
+
},
|
|
196
|
+
"mode": {
|
|
197
|
+
"type": ["string", "null"],
|
|
198
|
+
"x-sensitivity": "none",
|
|
199
|
+
"description": "agent-state.json mode as the run recorded it (analysis, test-gen, review...), so a reader can name the command; null when none was recorded."
|
|
200
|
+
},
|
|
115
201
|
"runType": {
|
|
116
202
|
"enum": ["analysis", "development", "autopilot"],
|
|
117
203
|
"x-sensitivity": "none",
|
|
@@ -141,8 +227,85 @@
|
|
|
141
227
|
"x-sensitivity": "none",
|
|
142
228
|
"description": "The first in_progress task of the phase in progress, or null. Scrubbed under --redact. Added in 1.2.0.",
|
|
143
229
|
"properties": {
|
|
144
|
-
"subject": {
|
|
145
|
-
|
|
230
|
+
"subject": {
|
|
231
|
+
"type": "string"
|
|
232
|
+
},
|
|
233
|
+
"activeForm": {
|
|
234
|
+
"type": ["string", "null"]
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"source": {
|
|
239
|
+
"type": ["object", "null"],
|
|
240
|
+
"additionalProperties": false,
|
|
241
|
+
"required": ["kind", "jira", "issue"],
|
|
242
|
+
"x-sensitivity": "none",
|
|
243
|
+
"description": "Where the work came from: a Jira key, a GitHub issue (owner/repo#N) or free text; a GitHub issue that got a Jira has both. Null when the run recorded neither. Added in 1.3.0.",
|
|
244
|
+
"properties": {
|
|
245
|
+
"kind": {
|
|
246
|
+
"enum": ["jira", "github", "text"]
|
|
247
|
+
},
|
|
248
|
+
"jira": {
|
|
249
|
+
"type": ["string", "null"],
|
|
250
|
+
"pattern": "^[A-Z][A-Z0-9_]{0,30}-[0-9]{1,9}$"
|
|
251
|
+
},
|
|
252
|
+
"issue": {
|
|
253
|
+
"type": ["string", "null"],
|
|
254
|
+
"pattern": "^[A-Za-z0-9_.-]{1,100}/[A-Za-z0-9_.-]{1,100}#[0-9]{1,9}$"
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"prNumber": {
|
|
259
|
+
"type": ["integer", "null"],
|
|
260
|
+
"minimum": 1,
|
|
261
|
+
"x-sensitivity": "none",
|
|
262
|
+
"description": "The pull request's number, from the state or its URL; the URL itself is prUrl (local). Added in 1.3.0."
|
|
263
|
+
},
|
|
264
|
+
"channels": {
|
|
265
|
+
"type": "array",
|
|
266
|
+
"maxItems": 5,
|
|
267
|
+
"items": {
|
|
268
|
+
"type": "object",
|
|
269
|
+
"additionalProperties": false,
|
|
270
|
+
"required": ["channel", "status"],
|
|
271
|
+
"properties": {
|
|
272
|
+
"channel": {
|
|
273
|
+
"enum": ["pr", "jira", "confluence", "wiki", "issue"]
|
|
274
|
+
},
|
|
275
|
+
"status": {
|
|
276
|
+
"enum": ["posted", "skipped", "failed"]
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"x-sensitivity": "none",
|
|
281
|
+
"description": "Where Phase 5 sent the report, per adapter (state.channelResults); empty before then. Added in 1.3.0."
|
|
282
|
+
},
|
|
283
|
+
"channelUrls": {
|
|
284
|
+
"type": "object",
|
|
285
|
+
"additionalProperties": false,
|
|
286
|
+
"x-sensitivity": "local",
|
|
287
|
+
"description": "The address each adapter posted to, https only; dropped from a redacted answer. Added in 1.3.0.",
|
|
288
|
+
"properties": {
|
|
289
|
+
"pr": {
|
|
290
|
+
"type": "string",
|
|
291
|
+
"pattern": "^https://"
|
|
292
|
+
},
|
|
293
|
+
"jira": {
|
|
294
|
+
"type": "string",
|
|
295
|
+
"pattern": "^https://"
|
|
296
|
+
},
|
|
297
|
+
"confluence": {
|
|
298
|
+
"type": "string",
|
|
299
|
+
"pattern": "^https://"
|
|
300
|
+
},
|
|
301
|
+
"wiki": {
|
|
302
|
+
"type": "string",
|
|
303
|
+
"pattern": "^https://"
|
|
304
|
+
},
|
|
305
|
+
"issue": {
|
|
306
|
+
"type": "string",
|
|
307
|
+
"pattern": "^https://"
|
|
308
|
+
}
|
|
146
309
|
}
|
|
147
310
|
}
|
|
148
311
|
}
|
|
@@ -152,10 +315,22 @@
|
|
|
152
315
|
"additionalProperties": false,
|
|
153
316
|
"required": ["id", "stepId", "text", "kind", "options"],
|
|
154
317
|
"properties": {
|
|
155
|
-
"id": {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
318
|
+
"id": {
|
|
319
|
+
"type": "string",
|
|
320
|
+
"x-sensitivity": "none"
|
|
321
|
+
},
|
|
322
|
+
"stepId": {
|
|
323
|
+
"type": "string",
|
|
324
|
+
"x-sensitivity": "none"
|
|
325
|
+
},
|
|
326
|
+
"text": {
|
|
327
|
+
"type": "string",
|
|
328
|
+
"x-sensitivity": "none"
|
|
329
|
+
},
|
|
330
|
+
"kind": {
|
|
331
|
+
"enum": ["single-select", "multi-select"],
|
|
332
|
+
"x-sensitivity": "none"
|
|
333
|
+
},
|
|
159
334
|
"options": {
|
|
160
335
|
"type": "array",
|
|
161
336
|
"x-sensitivity": "none",
|
|
@@ -164,8 +339,12 @@
|
|
|
164
339
|
"additionalProperties": false,
|
|
165
340
|
"required": ["id", "label"],
|
|
166
341
|
"properties": {
|
|
167
|
-
"id": {
|
|
168
|
-
|
|
342
|
+
"id": {
|
|
343
|
+
"type": "string"
|
|
344
|
+
},
|
|
345
|
+
"label": {
|
|
346
|
+
"type": "string"
|
|
347
|
+
}
|
|
169
348
|
}
|
|
170
349
|
}
|
|
171
350
|
}
|
|
@@ -185,12 +364,30 @@
|
|
|
185
364
|
"subList"
|
|
186
365
|
],
|
|
187
366
|
"properties": {
|
|
188
|
-
"id": {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
"
|
|
193
|
-
|
|
367
|
+
"id": {
|
|
368
|
+
"type": "string",
|
|
369
|
+
"x-sensitivity": "none"
|
|
370
|
+
},
|
|
371
|
+
"name": {
|
|
372
|
+
"type": "string",
|
|
373
|
+
"x-sensitivity": "none"
|
|
374
|
+
},
|
|
375
|
+
"status": {
|
|
376
|
+
"type": "string",
|
|
377
|
+
"x-sensitivity": "none"
|
|
378
|
+
},
|
|
379
|
+
"model": {
|
|
380
|
+
"type": ["string", "null"],
|
|
381
|
+
"x-sensitivity": "none"
|
|
382
|
+
},
|
|
383
|
+
"startedAt": {
|
|
384
|
+
"type": ["string", "null"],
|
|
385
|
+
"x-sensitivity": "none"
|
|
386
|
+
},
|
|
387
|
+
"completedAt": {
|
|
388
|
+
"type": ["string", "null"],
|
|
389
|
+
"x-sensitivity": "none"
|
|
390
|
+
},
|
|
194
391
|
"now": {
|
|
195
392
|
"type": ["string", "null"],
|
|
196
393
|
"x-sensitivity": "none",
|
|
@@ -210,9 +407,15 @@
|
|
|
210
407
|
"additionalProperties": false,
|
|
211
408
|
"required": ["id", "name", "status"],
|
|
212
409
|
"properties": {
|
|
213
|
-
"id": {
|
|
214
|
-
|
|
215
|
-
|
|
410
|
+
"id": {
|
|
411
|
+
"type": "string"
|
|
412
|
+
},
|
|
413
|
+
"name": {
|
|
414
|
+
"type": "string"
|
|
415
|
+
},
|
|
416
|
+
"status": {
|
|
417
|
+
"type": "string"
|
|
418
|
+
}
|
|
216
419
|
}
|
|
217
420
|
}
|
|
218
421
|
},
|
|
@@ -232,10 +435,18 @@
|
|
|
232
435
|
"additionalProperties": false,
|
|
233
436
|
"required": ["id", "subject", "activeForm", "status"],
|
|
234
437
|
"properties": {
|
|
235
|
-
"id": {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
"
|
|
438
|
+
"id": {
|
|
439
|
+
"type": "string"
|
|
440
|
+
},
|
|
441
|
+
"subject": {
|
|
442
|
+
"type": "string"
|
|
443
|
+
},
|
|
444
|
+
"activeForm": {
|
|
445
|
+
"type": ["string", "null"]
|
|
446
|
+
},
|
|
447
|
+
"status": {
|
|
448
|
+
"enum": ["pending", "in_progress", "completed"]
|
|
449
|
+
}
|
|
239
450
|
}
|
|
240
451
|
}
|
|
241
452
|
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/system-status.schema.json",
|
|
4
|
+
"title": "System status",
|
|
5
|
+
"description": "What GET /v1/system returns and `system-status.mjs --json` prints: CPU load, memory, free disk and what the pipeline itself uses. Numbers only: no path, process argument, user name or host name. A value that could not be measured is null, never 0.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["contractVersion", "generatedAt", "cpu", "memory", "disk", "pipeline", "warnings"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"contractVersion": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"pattern": "^1\\.[0-9]+\\.[0-9]+$",
|
|
13
|
+
"x-sensitivity": "none"
|
|
14
|
+
},
|
|
15
|
+
"generatedAt": { "type": "string", "format": "date-time", "x-sensitivity": "none" },
|
|
16
|
+
"cpu": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"required": ["cores", "usage", "load"],
|
|
20
|
+
"x-sensitivity": "none",
|
|
21
|
+
"properties": {
|
|
22
|
+
"cores": { "type": "integer", "minimum": 0 },
|
|
23
|
+
"usage": {
|
|
24
|
+
"type": ["number", "null"],
|
|
25
|
+
"minimum": 0,
|
|
26
|
+
"maximum": 1,
|
|
27
|
+
"description": "Busy share of all cores over a short sampling window."
|
|
28
|
+
},
|
|
29
|
+
"load": {
|
|
30
|
+
"type": "array",
|
|
31
|
+
"minItems": 3,
|
|
32
|
+
"maxItems": 3,
|
|
33
|
+
"items": { "type": "number", "minimum": 0 },
|
|
34
|
+
"description": "Load average over 1, 5 and 15 minutes."
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"memory": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"required": ["totalMb", "usedMb"],
|
|
42
|
+
"x-sensitivity": "none",
|
|
43
|
+
"properties": {
|
|
44
|
+
"totalMb": { "type": "integer", "minimum": 0 },
|
|
45
|
+
"usedMb": {
|
|
46
|
+
"type": "integer",
|
|
47
|
+
"minimum": 0,
|
|
48
|
+
"description": "Total minus what the OS reports free; on macOS that counts the file cache as used."
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"disk": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"additionalProperties": false,
|
|
55
|
+
"required": ["home", "logs"],
|
|
56
|
+
"x-sensitivity": "none",
|
|
57
|
+
"properties": {
|
|
58
|
+
"home": { "$ref": "#/$defs/disk" },
|
|
59
|
+
"logs": {
|
|
60
|
+
"oneOf": [{ "$ref": "#/$defs/disk" }],
|
|
61
|
+
"description": "The disk the run logs live on, when it is not the home disk; null when it is the same disk."
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"pipeline": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"additionalProperties": false,
|
|
68
|
+
"required": ["sessions", "toolkit", "rssMb", "logsMb"],
|
|
69
|
+
"x-sensitivity": "none",
|
|
70
|
+
"properties": {
|
|
71
|
+
"sessions": {
|
|
72
|
+
"type": ["integer", "null"],
|
|
73
|
+
"minimum": 0,
|
|
74
|
+
"description": "Claude Code processes running."
|
|
75
|
+
},
|
|
76
|
+
"toolkit": {
|
|
77
|
+
"type": ["integer", "null"],
|
|
78
|
+
"minimum": 0,
|
|
79
|
+
"description": "multi-agent-toolkit server processes running."
|
|
80
|
+
},
|
|
81
|
+
"rssMb": {
|
|
82
|
+
"type": ["integer", "null"],
|
|
83
|
+
"minimum": 0,
|
|
84
|
+
"description": "Their resident memory together."
|
|
85
|
+
},
|
|
86
|
+
"logsMb": {
|
|
87
|
+
"type": ["integer", "null"],
|
|
88
|
+
"minimum": 0,
|
|
89
|
+
"description": "Size of the run log folder; null when it could not be measured in time."
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"warnings": {
|
|
94
|
+
"type": "array",
|
|
95
|
+
"items": { "enum": ["disk-low", "cpu-busy"] },
|
|
96
|
+
"x-sensitivity": "none",
|
|
97
|
+
"description": "disk-low: under 10 percent of the home disk is free. cpu-busy: the 5-minute load is above the core count."
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"$defs": {
|
|
101
|
+
"disk": {
|
|
102
|
+
"type": ["object", "null"],
|
|
103
|
+
"additionalProperties": false,
|
|
104
|
+
"required": ["totalMb", "freeMb"],
|
|
105
|
+
"properties": {
|
|
106
|
+
"totalMb": { "type": "integer", "minimum": 0 },
|
|
107
|
+
"freeMb": { "type": "integer", "minimum": 0 }
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -55,6 +55,11 @@
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
+
},
|
|
59
|
+
"version": {
|
|
60
|
+
"type": ["string", "null"],
|
|
61
|
+
"description": "The exact toolkit version the panel starts: the registration's own when it names one, else the version the install recorded from the release.",
|
|
62
|
+
"x-sensitivity": "none"
|
|
58
63
|
}
|
|
59
64
|
}
|
|
60
65
|
}
|
|
@@ -107,6 +107,10 @@
|
|
|
107
107
|
["Read(~/.netrc)", "plaintext host credentials"],
|
|
108
108
|
["Read(~/.git-credentials)", "plaintext git credentials"],
|
|
109
109
|
["Read(~/.docker/config.json)", "registry credentials"],
|
|
110
|
+
[
|
|
111
|
+
"Read(~/.claude/logs/multi-agent/contract-server/**)",
|
|
112
|
+
"the local contract server's bearer token, which can start sessions"
|
|
113
|
+
],
|
|
110
114
|
[
|
|
111
115
|
"Edit(~/.claude/**)",
|
|
112
116
|
"the installed pipeline, its settings, this profile and the runner's files; a run writes its logs and its PR request under the unattended run directory instead"
|
|
@@ -148,7 +152,7 @@
|
|
|
148
152
|
],
|
|
149
153
|
[
|
|
150
154
|
"MCP_TOOLKIT_INDEX_DENY",
|
|
151
|
-
"~/.ssh,~/.aws,~/.gnupg,~/Library/Keychains",
|
|
155
|
+
"~/.ssh,~/.aws,~/.gnupg,~/Library/Keychains,~/.claude/logs/multi-agent/contract-server,~/.claude/logs/multi-agent/office",
|
|
152
156
|
"context_index never indexes, and context_get never returns, credential directories"
|
|
153
157
|
]
|
|
154
158
|
],
|
|
@@ -211,7 +215,8 @@
|
|
|
211
215
|
"~/Library/Keychains",
|
|
212
216
|
"~/.netrc",
|
|
213
217
|
"~/.git-credentials",
|
|
214
|
-
"~/.docker/config.json"
|
|
218
|
+
"~/.docker/config.json",
|
|
219
|
+
"~/.claude/logs/multi-agent/contract-server"
|
|
215
220
|
]
|
|
216
221
|
},
|
|
217
222
|
"network": {
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
* that carries a different `hostSessionId` is another session's run and
|
|
17
17
|
* never matches this way.
|
|
18
18
|
*
|
|
19
|
-
* Nothing here decides anything; callers (run-stop-guard, run-scope-guard
|
|
19
|
+
* Nothing here decides anything; callers (run-stop-guard, run-scope-guard,
|
|
20
|
+
* task-mirror)
|
|
20
21
|
* apply their own rule to the run this returns. Zero runtime dependencies.
|
|
21
22
|
*
|
|
22
23
|
* @module pipeline/scripts/_active-run
|
|
@@ -16,18 +16,20 @@ import { clearTimeout, setTimeout } from "node:timers";
|
|
|
16
16
|
/**
|
|
17
17
|
* @param {string} cmd
|
|
18
18
|
* @param {string[]} args
|
|
19
|
-
* @param {{env?: object, timeoutMs?: number, maxBytes?: number}} [opts]
|
|
19
|
+
* @param {{env?: object, timeoutMs?: number, maxBytes?: number, withStderr?: boolean}} [opts]
|
|
20
|
+
* withStderr: collect stderr into `stdout` too, for tools that print their
|
|
21
|
+
* answer there.
|
|
20
22
|
* @returns {Promise<{status: number|null, stdout: string, timedOut: boolean, truncated: boolean, error: string|null}>}
|
|
21
23
|
*/
|
|
22
24
|
export function spawnAsync(
|
|
23
25
|
cmd,
|
|
24
26
|
args,
|
|
25
|
-
{ env = process.env, timeoutMs = 60_000, maxBytes = 32 * 1024 * 1024 } = {},
|
|
27
|
+
{ env = process.env, timeoutMs = 60_000, maxBytes = 32 * 1024 * 1024, withStderr = false } = {},
|
|
26
28
|
) {
|
|
27
29
|
return new Promise((resolve) => {
|
|
28
30
|
let child;
|
|
29
31
|
try {
|
|
30
|
-
child = spawn(cmd, args, { env, stdio: ["ignore", "pipe", "ignore"] });
|
|
32
|
+
child = spawn(cmd, args, { env, stdio: ["ignore", "pipe", withStderr ? "pipe" : "ignore"] });
|
|
31
33
|
} catch (e) {
|
|
32
34
|
resolve({
|
|
33
35
|
status: null,
|
|
@@ -47,7 +49,7 @@ export function spawnAsync(
|
|
|
47
49
|
timedOut = true;
|
|
48
50
|
child.kill("SIGKILL");
|
|
49
51
|
}, timeoutMs);
|
|
50
|
-
|
|
52
|
+
const collect = (d) => {
|
|
51
53
|
size += d.length;
|
|
52
54
|
if (size > maxBytes) {
|
|
53
55
|
truncated = true;
|
|
@@ -55,7 +57,9 @@ export function spawnAsync(
|
|
|
55
57
|
return;
|
|
56
58
|
}
|
|
57
59
|
chunks.push(d);
|
|
58
|
-
}
|
|
60
|
+
};
|
|
61
|
+
child.stdout.on("data", collect);
|
|
62
|
+
if (withStderr) child.stderr.on("data", collect);
|
|
59
63
|
child.on("error", (e) => {
|
|
60
64
|
error = e.code ?? e.message;
|
|
61
65
|
});
|