@mmerterden/multi-agent-pipeline 20.29.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.
Files changed (227) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/README.md +50 -5
  3. package/README.tr.md +64 -5
  4. package/docs/architecture.md +3 -3
  5. package/docs/ecosystem.md +5 -5
  6. package/docs/facts.json +9 -9
  7. package/install/_unattended-profile.mjs +61 -0
  8. package/install/catalog-history.json +1 -1
  9. package/install/claude.mjs +19 -3
  10. package/install/codex.mjs +2 -0
  11. package/install/copilot.mjs +13 -0
  12. package/install/index.mjs +10 -1
  13. package/install/templates/claude-hooks.json +12 -1
  14. package/manifest.json +230 -88
  15. package/package.json +3 -1
  16. package/pipeline/commands/multi-agent/analysis/SKILL.md +4 -4
  17. package/pipeline/commands/multi-agent/autopilot-on/SKILL.md +13 -15
  18. package/pipeline/commands/multi-agent/office-off/SKILL.md +27 -0
  19. package/pipeline/commands/multi-agent/office-on/SKILL.md +51 -0
  20. package/pipeline/commands/multi-agent/office-status/SKILL.md +29 -0
  21. package/pipeline/commands/multi-agent/prune-logs/SKILL.md +4 -1
  22. package/pipeline/commands/multi-agent/review/SKILL.md +4 -3
  23. package/pipeline/commands/multi-agent/scenario-audit/SKILL.md +4 -2
  24. package/pipeline/commands/multi-agent/serve/SKILL.md +4 -2
  25. package/pipeline/commands/multi-agent/stack/SKILL.md +15 -8
  26. package/pipeline/commands/multi-agent/steer/SKILL.md +10 -9
  27. package/pipeline/commands/multi-agent/sync/SKILL.md +15 -3
  28. package/pipeline/commands/multi-agent/test-gen/SKILL.md +29 -3
  29. package/pipeline/contract/CHANGELOG.md +108 -0
  30. package/pipeline/contract/README.md +72 -12
  31. package/pipeline/contract/fixtures/error-invalid-request.json +1 -1
  32. package/pipeline/contract/fixtures/error-unauthorized.json +1 -1
  33. package/pipeline/contract/fixtures/error-unsigned.json +1 -1
  34. package/pipeline/contract/fixtures/launch-plan.json +1 -1
  35. package/pipeline/contract/fixtures/runs-awaiting-question.json +6 -1
  36. package/pipeline/contract/fixtures/runs-empty.json +1 -1
  37. package/pipeline/contract/fixtures/runs-failed.json +6 -1
  38. package/pipeline/contract/fixtures/runs-old-schema.json +6 -1
  39. package/pipeline/contract/fixtures/runs-pr-opened-redacted.json +5 -1
  40. package/pipeline/contract/fixtures/runs-pr-opened.json +6 -1
  41. package/pipeline/contract/fixtures/runs-running.json +6 -1
  42. package/pipeline/contract/manifest.json +506 -27
  43. package/pipeline/contract/types/index.d.ts +829 -4
  44. package/pipeline/lib/bg-launch.mjs +106 -0
  45. package/pipeline/lib/code-digest.mjs +49 -0
  46. package/pipeline/lib/credential-resolve.mjs +42 -2
  47. package/pipeline/multi-agent-refs/cross-cli-contract.md +5 -4
  48. package/pipeline/multi-agent-refs/features/office-threat-model.md +109 -0
  49. package/pipeline/multi-agent-refs/features/unattended-security.md +1 -1
  50. package/pipeline/multi-agent-refs/help/en.md +3 -0
  51. package/pipeline/multi-agent-refs/help/tr.md +3 -0
  52. package/pipeline/multi-agent-refs/phases/modes.md +7 -7
  53. package/pipeline/multi-agent-refs/phases/phase-5-report.md +16 -10
  54. package/pipeline/multi-agent-refs/review-standalone-tracker.md +37 -0
  55. package/pipeline/multi-agent-refs/tracker-contract.md +8 -3
  56. package/pipeline/office/NOTICE.md +45 -0
  57. package/pipeline/office/assets/ARCHIVE_BOXES.png +0 -0
  58. package/pipeline/office/assets/BIN.png +0 -0
  59. package/pipeline/office/assets/BOOKSHELF.png +0 -0
  60. package/pipeline/office/assets/CACTUS.png +0 -0
  61. package/pipeline/office/assets/CLOCK.png +0 -0
  62. package/pipeline/office/assets/COFFEE.png +0 -0
  63. package/pipeline/office/assets/COFFEE_MACHINE.png +0 -0
  64. package/pipeline/office/assets/COFFEE_TABLE.png +0 -0
  65. package/pipeline/office/assets/COUNTER_SINK.png +0 -0
  66. package/pipeline/office/assets/CUSHIONED_BENCH.png +0 -0
  67. package/pipeline/office/assets/CUSHIONED_CHAIR_BACK.png +0 -0
  68. package/pipeline/office/assets/CUSHIONED_CHAIR_FRONT.png +0 -0
  69. package/pipeline/office/assets/CUSHIONED_CHAIR_SIDE.png +0 -0
  70. package/pipeline/office/assets/DESK_FRONT.png +0 -0
  71. package/pipeline/office/assets/DESK_SIDE.png +0 -0
  72. package/pipeline/office/assets/DEVICE_STAND.png +0 -0
  73. package/pipeline/office/assets/DOUBLE_BOOKSHELF.png +0 -0
  74. package/pipeline/office/assets/FILING_CABINET.png +0 -0
  75. package/pipeline/office/assets/FRIDGE.png +0 -0
  76. package/pipeline/office/assets/HANGING_PLANT.png +0 -0
  77. package/pipeline/office/assets/LARGE_PAINTING.png +0 -0
  78. package/pipeline/office/assets/LARGE_PLANT.png +0 -0
  79. package/pipeline/office/assets/MAILBOX.png +0 -0
  80. package/pipeline/office/assets/MOP_BUCKET.png +0 -0
  81. package/pipeline/office/assets/PC_BACK.png +0 -0
  82. package/pipeline/office/assets/PC_FRONT_OFF.png +0 -0
  83. package/pipeline/office/assets/PC_FRONT_ON_1.png +0 -0
  84. package/pipeline/office/assets/PC_FRONT_ON_2.png +0 -0
  85. package/pipeline/office/assets/PC_FRONT_ON_3.png +0 -0
  86. package/pipeline/office/assets/PC_SIDE.png +0 -0
  87. package/pipeline/office/assets/PLANT.png +0 -0
  88. package/pipeline/office/assets/PLANT_2.png +0 -0
  89. package/pipeline/office/assets/POT.png +0 -0
  90. package/pipeline/office/assets/PRINTER.png +0 -0
  91. package/pipeline/office/assets/RECEPTION_DESK.png +0 -0
  92. package/pipeline/office/assets/SERVER_RACK.png +0 -0
  93. package/pipeline/office/assets/SERVER_RACK_2.png +0 -0
  94. package/pipeline/office/assets/SMALL_PAINTING.png +0 -0
  95. package/pipeline/office/assets/SMALL_PAINTING_2.png +0 -0
  96. package/pipeline/office/assets/SMALL_TABLE_FRONT.png +0 -0
  97. package/pipeline/office/assets/SMALL_TABLE_SIDE.png +0 -0
  98. package/pipeline/office/assets/SOFA_BACK.png +0 -0
  99. package/pipeline/office/assets/SOFA_FRONT.png +0 -0
  100. package/pipeline/office/assets/SOFA_SIDE.png +0 -0
  101. package/pipeline/office/assets/TABLE_FRONT.png +0 -0
  102. package/pipeline/office/assets/TOILET_STALL.png +0 -0
  103. package/pipeline/office/assets/VENDING.png +0 -0
  104. package/pipeline/office/assets/WASHBASIN.png +0 -0
  105. package/pipeline/office/assets/WATER_COOLER.png +0 -0
  106. package/pipeline/office/assets/WHITEBOARD.png +0 -0
  107. package/pipeline/office/assets/WOODEN_BENCH.png +0 -0
  108. package/pipeline/office/assets/WOODEN_CHAIR_BACK.png +0 -0
  109. package/pipeline/office/assets/WOODEN_CHAIR_FRONT.png +0 -0
  110. package/pipeline/office/assets/WOODEN_CHAIR_SIDE.png +0 -0
  111. package/pipeline/office/assets/char_0.png +0 -0
  112. package/pipeline/office/assets/char_1.png +0 -0
  113. package/pipeline/office/assets/char_2.png +0 -0
  114. package/pipeline/office/assets/char_3.png +0 -0
  115. package/pipeline/office/assets/char_4.png +0 -0
  116. package/pipeline/office/assets/char_5.png +0 -0
  117. package/pipeline/office/assets/floor_0.png +0 -0
  118. package/pipeline/office/assets/floor_1.png +0 -0
  119. package/pipeline/office/assets/floor_2.png +0 -0
  120. package/pipeline/office/assets/floor_3.png +0 -0
  121. package/pipeline/office/assets/floor_4.png +0 -0
  122. package/pipeline/office/assets/floor_5.png +0 -0
  123. package/pipeline/office/assets/floor_6.png +0 -0
  124. package/pipeline/office/assets/floor_7.png +0 -0
  125. package/pipeline/office/assets/floor_8.png +0 -0
  126. package/pipeline/office/assets/wall_0.png +0 -0
  127. package/pipeline/office/index.html +8431 -0
  128. package/pipeline/office/toolkit.json +3 -0
  129. package/pipeline/schemas/activity-chat.schema.json +78 -0
  130. package/pipeline/schemas/activity-roles.json +48 -0
  131. package/pipeline/schemas/activity-roles.schema.json +49 -0
  132. package/pipeline/schemas/activity.schema.json +613 -0
  133. package/pipeline/schemas/agent-state.schema.json +493 -115
  134. package/pipeline/schemas/autopilot-on-request.schema.json +33 -0
  135. package/pipeline/schemas/autopilot-on.schema.json +111 -0
  136. package/pipeline/schemas/contract-error.schema.json +45 -4
  137. package/pipeline/schemas/issue-maturity.schema.json +68 -0
  138. package/pipeline/schemas/job-change.schema.json +72 -0
  139. package/pipeline/schemas/job-request.schema.json +38 -0
  140. package/pipeline/schemas/launch.json +4 -4
  141. package/pipeline/schemas/ledger.schema.json +202 -0
  142. package/pipeline/schemas/office-credentials.schema.json +71 -0
  143. package/pipeline/schemas/office-jobs.json +253 -0
  144. package/pipeline/schemas/office-jobs.schema.json +62 -0
  145. package/pipeline/schemas/office-memory.schema.json +105 -0
  146. package/pipeline/schemas/office-settings-request.schema.json +30 -0
  147. package/pipeline/schemas/office-settings.schema.json +67 -0
  148. package/pipeline/schemas/permissions.schema.json +47 -0
  149. package/pipeline/schemas/phases.json +10 -2
  150. package/pipeline/schemas/phases.schema.json +86 -19
  151. package/pipeline/schemas/prefs.schema.json +19 -0
  152. package/pipeline/schemas/prs.schema.json +78 -0
  153. package/pipeline/schemas/prune-logs-request.schema.json +26 -0
  154. package/pipeline/schemas/prune-logs.schema.json +52 -0
  155. package/pipeline/schemas/repo-change.schema.json +54 -0
  156. package/pipeline/schemas/repo-request.schema.json +29 -0
  157. package/pipeline/schemas/repos.schema.json +49 -1
  158. package/pipeline/schemas/review-verdict-request.schema.json +20 -0
  159. package/pipeline/schemas/review-verdict.schema.json +62 -0
  160. package/pipeline/schemas/routine-delete.schema.json +59 -0
  161. package/pipeline/schemas/routines.schema.json +38 -0
  162. package/pipeline/schemas/run-evidence.schema.json +29 -0
  163. package/pipeline/schemas/run-results.schema.json +218 -0
  164. package/pipeline/schemas/runs-index.schema.json +257 -46
  165. package/pipeline/schemas/service-read.schema.json +58 -0
  166. package/pipeline/schemas/stack-change.schema.json +82 -0
  167. package/pipeline/schemas/stack-request.schema.json +33 -0
  168. package/pipeline/schemas/stack.schema.json +59 -0
  169. package/pipeline/schemas/steer-request.schema.json +25 -0
  170. package/pipeline/schemas/steer.schema.json +59 -0
  171. package/pipeline/schemas/system-status.schema.json +111 -0
  172. package/pipeline/schemas/tool-call-request.schema.json +19 -0
  173. package/pipeline/schemas/tool-call.schema.json +47 -0
  174. package/pipeline/schemas/tools.schema.json +65 -0
  175. package/pipeline/schemas/unattended-profile.json +7 -2
  176. package/pipeline/scripts/_active-run.mjs +2 -1
  177. package/pipeline/scripts/_cost.mjs +66 -1
  178. package/pipeline/scripts/_office-smoke-lib.sh +115 -0
  179. package/pipeline/scripts/_spawn-async.mjs +77 -0
  180. package/pipeline/scripts/_transcript-tail.mjs +274 -0
  181. package/pipeline/scripts/activity-snapshot.mjs +1223 -0
  182. package/pipeline/scripts/autopilot-control.mjs +214 -9
  183. package/pipeline/scripts/autopilot-runner.mjs +7 -5
  184. package/pipeline/scripts/contract-server.mjs +1853 -197
  185. package/pipeline/scripts/cost-analyze.mjs +2 -53
  186. package/pipeline/scripts/cost-table.json +1 -0
  187. package/pipeline/scripts/gen-mode-dispatch.mjs +3 -1
  188. package/pipeline/scripts/job-launch.mjs +477 -0
  189. package/pipeline/scripts/launch-request.mjs +94 -9
  190. package/pipeline/scripts/office-build.mjs +226 -0
  191. package/pipeline/scripts/office-control.mjs +410 -0
  192. package/pipeline/scripts/office-credentials.mjs +106 -0
  193. package/pipeline/scripts/office-ledger.mjs +409 -0
  194. package/pipeline/scripts/office-memory.mjs +200 -0
  195. package/pipeline/scripts/office-prune.mjs +125 -0
  196. package/pipeline/scripts/office-settings.mjs +145 -0
  197. package/pipeline/scripts/phase-tracker.sh +12 -5
  198. package/pipeline/scripts/prune-logs.sh +53 -2
  199. package/pipeline/scripts/routine-registry.mjs +42 -6
  200. package/pipeline/scripts/run-results.mjs +373 -0
  201. package/pipeline/scripts/runs-index.mjs +62 -2
  202. package/pipeline/scripts/service-read.mjs +244 -0
  203. package/pipeline/scripts/stack-toggle.mjs +285 -0
  204. package/pipeline/scripts/steer-run.mjs +97 -0
  205. package/pipeline/scripts/system-status.mjs +196 -0
  206. package/pipeline/scripts/task-mirror.mjs +150 -0
  207. package/pipeline/scripts/task-mirror.sh +20 -0
  208. package/pipeline/scripts/toolkit-tools.mjs +625 -0
  209. package/pipeline/scripts/transcript-index.mjs +4 -1
  210. package/pipeline/scripts/uninstall.mjs +3 -0
  211. package/pipeline/scripts/work-items.mjs +473 -0
  212. package/pipeline/skills/.skill-manifest.json +23 -11
  213. package/pipeline/skills/.skills-index.json +34 -1
  214. package/pipeline/skills/shared/README.md +6 -3
  215. package/pipeline/skills/shared/core/multi-agent-autopilot-on/SKILL.md +13 -15
  216. package/pipeline/skills/shared/core/multi-agent-office-off/SKILL.md +16 -0
  217. package/pipeline/skills/shared/core/multi-agent-office-on/SKILL.md +21 -0
  218. package/pipeline/skills/shared/core/multi-agent-office-status/SKILL.md +17 -0
  219. package/pipeline/skills/shared/core/multi-agent-prune-logs/SKILL.md +4 -1
  220. package/pipeline/skills/shared/core/multi-agent-review/SKILL.md +19 -0
  221. package/pipeline/skills/shared/core/multi-agent-scenario-audit/SKILL.md +4 -2
  222. package/pipeline/skills/shared/core/multi-agent-serve/SKILL.md +4 -2
  223. package/pipeline/skills/shared/core/multi-agent-stack/SKILL.md +14 -6
  224. package/pipeline/skills/shared/core/multi-agent-steer/SKILL.md +10 -9
  225. package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +3 -3
  226. package/pipeline/skills/shared/core/multi-agent-test-gen/SKILL.md +26 -3
  227. package/pipeline/skills/skills-index.md +4 -1
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/run-evidence.schema.json",
4
+ "title": "Run screenshot",
5
+ "description": "What GET /v1/runs/{id}/evidence/{name} returns (`run-results.mjs <id> --evidence <name>`): one screenshot from the run's .pipeline/evidence directory, base64. name is a bare png or jpg file name; one that resolves outside the directory is not found.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["contractVersion", "taskId", "name", "mime", "data"],
9
+ "properties": {
10
+ "contractVersion": {
11
+ "type": "string",
12
+ "pattern": "^1\\.[0-9]+\\.[0-9]+$",
13
+ "x-sensitivity": "none"
14
+ },
15
+ "taskId": {
16
+ "type": "string"
17
+ },
18
+ "name": {
19
+ "type": "string"
20
+ },
21
+ "mime": {
22
+ "enum": ["image/png", "image/jpeg"]
23
+ },
24
+ "data": {
25
+ "type": "string",
26
+ "contentEncoding": "base64"
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,218 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/run-results.schema.json",
4
+ "title": "Run results",
5
+ "description": "What GET /v1/runs/{id}/results returns (`run-results.mjs <id> --json`): what a run produced, read from its own files. diff from agent-state diffRisk or .review-diff.txt; findings from triage-output.json or agent-state review; tests from the test-summary gate and uiTest; evidence the screenshot names under .pipeline/evidence; analysis the documents an analysis run wrote. A part with no source is null. Text is scrubbed and redacted; paths are reduced to file names.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["contractVersion", "taskId", "diff", "findings", "tests", "evidence", "analysis"],
9
+ "properties": {
10
+ "contractVersion": {
11
+ "type": "string",
12
+ "pattern": "^1\\.[0-9]+\\.[0-9]+$",
13
+ "x-sensitivity": "none"
14
+ },
15
+ "taskId": {
16
+ "type": "string"
17
+ },
18
+ "diff": {
19
+ "oneOf": [
20
+ {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "required": ["files", "added", "removed", "maxScore", "signals", "changed", "source"],
24
+ "properties": {
25
+ "files": {
26
+ "type": "integer"
27
+ },
28
+ "added": {
29
+ "type": ["integer", "null"]
30
+ },
31
+ "removed": {
32
+ "type": ["integer", "null"]
33
+ },
34
+ "maxScore": {
35
+ "type": ["number", "null"]
36
+ },
37
+ "signals": {
38
+ "type": "array",
39
+ "items": {
40
+ "type": "string"
41
+ }
42
+ },
43
+ "changed": {
44
+ "type": "array",
45
+ "items": {
46
+ "type": "string"
47
+ }
48
+ },
49
+ "source": {
50
+ "type": "string"
51
+ }
52
+ }
53
+ },
54
+ {
55
+ "type": "null"
56
+ }
57
+ ]
58
+ },
59
+ "findings": {
60
+ "oneOf": [
61
+ {
62
+ "type": "object",
63
+ "additionalProperties": false,
64
+ "required": ["approved", "items", "total", "source"],
65
+ "properties": {
66
+ "approved": {
67
+ "type": ["boolean", "null"]
68
+ },
69
+ "items": {
70
+ "type": "array",
71
+ "items": {
72
+ "type": "object",
73
+ "additionalProperties": false,
74
+ "required": ["severity", "file", "line", "issue", "fix", "reviewer", "verdict"],
75
+ "properties": {
76
+ "severity": {
77
+ "type": "string"
78
+ },
79
+ "file": {
80
+ "type": ["string", "null"]
81
+ },
82
+ "line": {
83
+ "type": ["integer", "null"]
84
+ },
85
+ "issue": {
86
+ "type": "string"
87
+ },
88
+ "fix": {
89
+ "type": ["string", "null"]
90
+ },
91
+ "reviewer": {
92
+ "type": ["string", "null"]
93
+ },
94
+ "verdict": {
95
+ "type": "string"
96
+ }
97
+ }
98
+ }
99
+ },
100
+ "total": {
101
+ "type": "integer"
102
+ },
103
+ "source": {
104
+ "type": "string"
105
+ }
106
+ }
107
+ },
108
+ {
109
+ "type": "null"
110
+ }
111
+ ]
112
+ },
113
+ "tests": {
114
+ "oneOf": [
115
+ {
116
+ "type": "object",
117
+ "additionalProperties": false,
118
+ "required": ["status", "passed", "failed", "skipped", "uiTest", "source"],
119
+ "properties": {
120
+ "status": {
121
+ "type": ["string", "null"]
122
+ },
123
+ "passed": {
124
+ "type": ["integer", "null"]
125
+ },
126
+ "failed": {
127
+ "type": ["integer", "null"]
128
+ },
129
+ "skipped": {
130
+ "type": ["integer", "null"]
131
+ },
132
+ "uiTest": {
133
+ "oneOf": [
134
+ {
135
+ "type": "object",
136
+ "additionalProperties": false,
137
+ "required": ["ran", "status", "notRunReason"],
138
+ "properties": {
139
+ "ran": {
140
+ "type": "boolean"
141
+ },
142
+ "status": {
143
+ "type": ["string", "null"]
144
+ },
145
+ "notRunReason": {
146
+ "type": ["string", "null"]
147
+ }
148
+ }
149
+ },
150
+ {
151
+ "type": "null"
152
+ }
153
+ ]
154
+ },
155
+ "source": {
156
+ "type": "string"
157
+ }
158
+ }
159
+ },
160
+ {
161
+ "type": "null"
162
+ }
163
+ ]
164
+ },
165
+ "evidence": {
166
+ "type": "array",
167
+ "items": {
168
+ "type": "object",
169
+ "additionalProperties": false,
170
+ "required": ["name", "phase"],
171
+ "properties": {
172
+ "name": {
173
+ "type": "string"
174
+ },
175
+ "phase": {
176
+ "enum": ["before", "after", null]
177
+ }
178
+ }
179
+ }
180
+ },
181
+ "analysis": {
182
+ "oneOf": [
183
+ {
184
+ "type": "object",
185
+ "additionalProperties": false,
186
+ "required": ["documents", "confluencePages", "jiraIssueKey"],
187
+ "properties": {
188
+ "documents": {
189
+ "type": "array",
190
+ "items": {
191
+ "type": "object",
192
+ "additionalProperties": false,
193
+ "required": ["name", "text"],
194
+ "properties": {
195
+ "name": {
196
+ "type": "string"
197
+ },
198
+ "text": {
199
+ "type": ["string", "null"]
200
+ }
201
+ }
202
+ }
203
+ },
204
+ "confluencePages": {
205
+ "type": "integer"
206
+ },
207
+ "jiraIssueKey": {
208
+ "type": ["string", "null"]
209
+ }
210
+ }
211
+ },
212
+ {
213
+ "type": "null"
214
+ }
215
+ ]
216
+ }
217
+ }
218
+ }
@@ -17,11 +17,17 @@
17
17
  "x-sensitivity": "local",
18
18
  "description": "Absent under --redact."
19
19
  },
20
- "count": { "type": "integer", "minimum": 0, "x-sensitivity": "none" },
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": { "$ref": "#/$defs/run" }
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": { "type": "string", "x-sensitivity": "none" },
53
- "project": { "type": ["string", "null"], "x-sensitivity": "none" },
54
- "dir": { "type": "string", "x-sensitivity": "local", "description": "The run directory." },
55
- "layout": { "enum": ["nested", "flat"], "x-sensitivity": "none" },
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": { "type": "boolean", "x-sensitivity": "none" },
62
- "kind": { "enum": ["pipeline", "tracker-only", "empty"], "x-sensitivity": "none" },
63
- "stateReadable": { "type": "boolean", "x-sensitivity": "none" },
64
- "status": { "type": ["string", "null"], "x-sensitivity": "none" },
65
- "currentPhase": { "type": ["integer", "null"], "x-sensitivity": "none" },
66
- "branch": { "type": ["string", "null"], "x-sensitivity": "none" },
67
- "baseBranch": { "type": ["string", "null"], "x-sensitivity": "none" },
68
- "startedAt": { "type": ["string", "null"], "x-sensitivity": "none" },
69
- "worktreePath": { "type": ["string", "null"], "x-sensitivity": "local" },
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": { "type": "boolean", "x-sensitivity": "none" },
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": { "type": ["integer", "null"], "x-sensitivity": "none" },
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": [{ "type": "null" }, { "$ref": "#/$defs/question" }]
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": { "$ref": "#/$defs/phase" }
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": { "type": "integer", "minimum": 0 },
109
- "out": { "type": "integer", "minimum": 0 },
110
- "cached": { "type": "integer", "minimum": 0 }
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": { "type": "number", "minimum": 0, "x-sensitivity": "none" },
114
- "unlockedWrites": { "type": "integer", "minimum": 0, "x-sensitivity": "none" },
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": { "type": "string" },
145
- "activeForm": { "type": ["string", "null"] }
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": { "type": "string", "x-sensitivity": "none" },
156
- "stepId": { "type": "string", "x-sensitivity": "none" },
157
- "text": { "type": "string", "x-sensitivity": "none" },
158
- "kind": { "enum": ["single-select", "multi-select"], "x-sensitivity": "none" },
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": { "type": "string" },
168
- "label": { "type": "string" }
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": { "type": "string", "x-sensitivity": "none" },
189
- "name": { "type": "string", "x-sensitivity": "none" },
190
- "status": { "type": "string", "x-sensitivity": "none" },
191
- "model": { "type": ["string", "null"], "x-sensitivity": "none" },
192
- "startedAt": { "type": ["string", "null"], "x-sensitivity": "none" },
193
- "completedAt": { "type": ["string", "null"], "x-sensitivity": "none" },
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": { "type": "string" },
214
- "name": { "type": "string" },
215
- "status": { "type": "string" }
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": { "type": "string" },
236
- "subject": { "type": "string" },
237
- "activeForm": { "type": ["string", "null"] },
238
- "status": { "enum": ["pending", "in_progress", "completed"] }
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
  }