@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
@@ -7,16 +7,38 @@
7
7
  "additionalProperties": false,
8
8
  "required": ["contractVersion", "phaseSchema", "phases", "totalMaxTokens", "modes", "thresholds"],
9
9
  "properties": {
10
- "$schema": { "type": "string" },
11
- "$id": { "type": "string" },
12
- "description": { "type": "string" },
13
- "contractVersion": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
14
- "phaseSchema": { "type": "integer", "minimum": 1 },
15
- "phaseSchemaNote": { "type": "string" },
10
+ "$schema": {
11
+ "type": "string"
12
+ },
13
+ "$id": {
14
+ "type": "string"
15
+ },
16
+ "description": {
17
+ "type": "string"
18
+ },
19
+ "contractVersion": {
20
+ "type": "string",
21
+ "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
22
+ },
23
+ "phaseSchema": {
24
+ "type": "integer",
25
+ "minimum": 1
26
+ },
27
+ "phaseSchemaNote": {
28
+ "type": "string"
29
+ },
16
30
  "legacyPhaseNames": {
17
31
  "type": "object",
18
- "properties": { "note": { "type": "string" } },
19
- "patternProperties": { "^[0-9]+$": { "type": "string" } },
32
+ "properties": {
33
+ "note": {
34
+ "type": "string"
35
+ }
36
+ },
37
+ "patternProperties": {
38
+ "^[0-9]+$": {
39
+ "type": "string"
40
+ }
41
+ },
20
42
  "additionalProperties": false
21
43
  },
22
44
  "phases": {
@@ -27,15 +49,36 @@
27
49
  "additionalProperties": false,
28
50
  "required": ["id", "name", "doc", "maxTokens"],
29
51
  "properties": {
30
- "id": { "type": "integer", "minimum": 0 },
31
- "name": { "type": "string", "minLength": 1 },
32
- "doc": { "type": "string", "pattern": "^phase-[0-9]+-[a-z-]+\\.md$" },
33
- "maxTokens": { "type": "integer", "minimum": 1 },
34
- "was": { "type": "array", "items": { "type": "integer", "minimum": 0 } }
52
+ "id": {
53
+ "type": "integer",
54
+ "minimum": 0
55
+ },
56
+ "name": {
57
+ "type": "string",
58
+ "minLength": 1
59
+ },
60
+ "doc": {
61
+ "type": "string",
62
+ "pattern": "^phase-[0-9]+-[a-z-]+\\.md$"
63
+ },
64
+ "maxTokens": {
65
+ "type": "integer",
66
+ "minimum": 1
67
+ },
68
+ "was": {
69
+ "type": "array",
70
+ "items": {
71
+ "type": "integer",
72
+ "minimum": 0
73
+ }
74
+ }
35
75
  }
36
76
  }
37
77
  },
38
- "totalMaxTokens": { "type": "integer", "minimum": 1 },
78
+ "totalMaxTokens": {
79
+ "type": "integer",
80
+ "minimum": 1
81
+ },
39
82
  "modes": {
40
83
  "type": "object",
41
84
  "minProperties": 1,
@@ -47,13 +90,29 @@
47
90
  "phases": {
48
91
  "type": "array",
49
92
  "minItems": 1,
50
- "items": { "type": "integer", "minimum": 0 },
93
+ "items": {
94
+ "type": "integer",
95
+ "minimum": 0
96
+ },
51
97
  "uniqueItems": true
52
98
  },
53
- "autopilot": { "type": "boolean" },
99
+ "autopilot": {
100
+ "type": "boolean"
101
+ },
54
102
  "commits": {
55
103
  "type": "boolean",
56
104
  "description": "false when the mode delivers no commit in its Phase 4; lib/run-completion.mjs then asks for no commit evidence before status complete. Absent means the mode commits."
105
+ },
106
+ "names": {
107
+ "type": "object",
108
+ "additionalProperties": false,
109
+ "patternProperties": {
110
+ "^[0-9]$": {
111
+ "type": "string",
112
+ "pattern": "^[A-Z][A-Za-z]{1,20}$"
113
+ }
114
+ },
115
+ "description": "The mode's own phase names by id, where they differ from the canonical ones (the analysis pipeline's Intake .. Report). Absent means the canonical names."
57
116
  }
58
117
  }
59
118
  }
@@ -63,9 +122,17 @@
63
122
  "additionalProperties": false,
64
123
  "required": ["waitingFromPhase", "mcpAllowedThroughPhase"],
65
124
  "properties": {
66
- "waitingFromPhase": { "type": "integer", "minimum": 0 },
67
- "mcpAllowedThroughPhase": { "type": "integer", "minimum": 0 },
68
- "note": { "type": "string" }
125
+ "waitingFromPhase": {
126
+ "type": "integer",
127
+ "minimum": 0
128
+ },
129
+ "mcpAllowedThroughPhase": {
130
+ "type": "integer",
131
+ "minimum": 0
132
+ },
133
+ "note": {
134
+ "type": "string"
135
+ }
69
136
  }
70
137
  }
71
138
  }
@@ -309,6 +309,25 @@
309
309
  "maxItems": 10
310
310
  }
311
311
  },
312
+ "office": {
313
+ "type": "object",
314
+ "description": "The office panel (/multi-agent:office-on). page overrides the installed panel page; toolkitVersion pins an @latest toolkit registration for the panel's tool calls; remote is read only to report that a separately installed remote layer is present, and no remote code ships with the pipeline.",
315
+ "additionalProperties": false,
316
+ "properties": {
317
+ "page": {
318
+ "type": "string",
319
+ "description": "Absolute path of an HTML page GET /office serves instead of the installed one."
320
+ },
321
+ "toolkitVersion": {
322
+ "type": "string",
323
+ "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z.-]+)?$"
324
+ },
325
+ "remote": {
326
+ "type": "object",
327
+ "description": "Configuration owned by a separately installed remote layer; the pipeline only checks that it exists."
328
+ }
329
+ }
330
+ },
312
331
  "routines": {
313
332
  "type": "array",
314
333
  "description": "v2.4.0+. User-defined routines saved via /multi-agent:save. Each entry indexes a local-only /multi-agent:<name> command dir under ~/.claude/commands/multi-agent/. Never synced (personal). Managed by routine-registry.mjs.",
@@ -0,0 +1,78 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/prs.schema.json",
4
+ "title": "Pull requests",
5
+ "description": "What GET /v1/prs returns (`work-items.mjs prs`): open pull requests where you are asked to review or are the author. sources says per host whether it was read; Bitbucket listing is not implemented and says so rather than showing an empty list. url is dropped under redact.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["contractVersion", "items", "sources"],
9
+ "properties": {
10
+ "contractVersion": {
11
+ "type": "string",
12
+ "pattern": "^1\\.[0-9]+\\.[0-9]+$",
13
+ "x-sensitivity": "none"
14
+ },
15
+ "items": {
16
+ "type": "array",
17
+ "items": {
18
+ "type": "object",
19
+ "additionalProperties": false,
20
+ "required": ["source", "repo", "number", "title", "url", "author", "updatedAt", "role"],
21
+ "properties": {
22
+ "source": {
23
+ "enum": ["github", "bitbucket"]
24
+ },
25
+ "account": {
26
+ "type": ["string", "null"],
27
+ "x-sensitivity": "local",
28
+ "description": "The GitHub login the pull request was listed under, when gh is logged in to more than one account (personal and corporate). Null for Bitbucket."
29
+ },
30
+ "repo": {
31
+ "type": "string"
32
+ },
33
+ "number": {
34
+ "type": "integer"
35
+ },
36
+ "title": {
37
+ "type": "string"
38
+ },
39
+ "url": {
40
+ "type": ["string", "null"],
41
+ "x-sensitivity": "local"
42
+ },
43
+ "author": {
44
+ "type": ["string", "null"]
45
+ },
46
+ "updatedAt": {
47
+ "type": ["string", "null"]
48
+ },
49
+ "role": {
50
+ "enum": ["reviewer", "author"]
51
+ }
52
+ }
53
+ }
54
+ },
55
+ "sources": {
56
+ "type": "array",
57
+ "items": {
58
+ "type": "object",
59
+ "additionalProperties": false,
60
+ "required": ["source", "ok", "count"],
61
+ "properties": {
62
+ "source": {
63
+ "type": "string"
64
+ },
65
+ "ok": {
66
+ "type": "boolean"
67
+ },
68
+ "count": {
69
+ "type": "integer"
70
+ },
71
+ "reason": {
72
+ "type": "string"
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
78
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/prune-logs-request.schema.json",
4
+ "title": "Prune logs request",
5
+ "description": "The body of POST /v1/prune-logs. Step 1 names the age in days (7, 30 or 90); step 2 sends only the confirmToken step 1 returned.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["contractVersion"],
9
+ "properties": {
10
+ "contractVersion": {
11
+ "type": "string",
12
+ "pattern": "^1\\.[0-9]+\\.[0-9]+$",
13
+ "x-sensitivity": "none"
14
+ },
15
+ "olderThanDays": {
16
+ "enum": [7, 30, 90],
17
+ "x-sensitivity": "none"
18
+ },
19
+ "confirmToken": {
20
+ "type": "string",
21
+ "pattern": "^[A-Za-z0-9_-]{16,128}$",
22
+ "x-sensitivity": "none",
23
+ "description": "The confirmToken the preview returned. Single use, bound to the route."
24
+ }
25
+ }
26
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/prune-logs.schema.json",
4
+ "title": "Prune old run logs",
5
+ "description": "What POST /v1/prune-logs returns. The preview (body {olderThanDays}) is prune-logs.sh's dry run for that age with a confirm token; the confirmation (body {confirmToken}) runs it again with the same age and --yes. The audit trail, the metrics corpus and task counters are never removed, and a folder written in the last minutes is spared.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["contractVersion", "olderThanDays", "applied", "count", "freedMb", "folders"],
9
+ "properties": {
10
+ "contractVersion": {
11
+ "type": "string",
12
+ "pattern": "^1\\.[0-9]+\\.[0-9]+$",
13
+ "x-sensitivity": "none"
14
+ },
15
+ "olderThanDays": {
16
+ "enum": [7, 30, 90],
17
+ "x-sensitivity": "none"
18
+ },
19
+ "applied": {
20
+ "type": "boolean",
21
+ "x-sensitivity": "none"
22
+ },
23
+ "count": {
24
+ "type": "integer",
25
+ "minimum": 0,
26
+ "x-sensitivity": "none"
27
+ },
28
+ "freedMb": {
29
+ "type": "number",
30
+ "minimum": 0,
31
+ "x-sensitivity": "none"
32
+ },
33
+ "folders": {
34
+ "type": "array",
35
+ "maxItems": 200,
36
+ "items": {
37
+ "type": "string"
38
+ },
39
+ "x-sensitivity": "local",
40
+ "description": "project/task folders, at most 200 listed."
41
+ },
42
+ "confirmToken": {
43
+ "type": "string",
44
+ "x-sensitivity": "local"
45
+ },
46
+ "expiresAt": {
47
+ "type": "string",
48
+ "format": "date-time",
49
+ "x-sensitivity": "none"
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/repo-change.schema.json",
4
+ "title": "Repository registration change",
5
+ "description": "What POST /v1/repos and DELETE /v1/repos/{id} return. Without a token: preview (the repository's name) with confirmToken and expiresAt. With it: registered or removed, by name. Paths never leave the server here.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["contractVersion"],
9
+ "properties": {
10
+ "contractVersion": {
11
+ "type": "string",
12
+ "pattern": "^1\\.[0-9]+\\.[0-9]+$",
13
+ "x-sensitivity": "none"
14
+ },
15
+ "preview": {
16
+ "type": "object",
17
+ "additionalProperties": false,
18
+ "required": ["name"],
19
+ "properties": {
20
+ "name": {
21
+ "type": "string"
22
+ }
23
+ }
24
+ },
25
+ "confirmToken": {
26
+ "type": "string",
27
+ "pattern": "^[A-Za-z0-9_-]{16,128}$"
28
+ },
29
+ "expiresAt": {
30
+ "type": "string",
31
+ "format": "date-time"
32
+ },
33
+ "registered": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "required": ["name"],
37
+ "properties": {
38
+ "name": {
39
+ "type": "string"
40
+ }
41
+ }
42
+ },
43
+ "removed": {
44
+ "type": "object",
45
+ "additionalProperties": false,
46
+ "required": ["name"],
47
+ "properties": {
48
+ "name": {
49
+ "type": "string"
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
@@ -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/repo-request.schema.json",
4
+ "title": "Repository registration request",
5
+ "description": "The body of POST /v1/repos. The first request names suggestion (an id from GET /v1/repos?all=1) or path (an absolute path to a git checkout); the second sends only confirmToken.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["contractVersion"],
9
+ "properties": {
10
+ "contractVersion": {
11
+ "type": "string",
12
+ "pattern": "^1\\.[0-9]+\\.[0-9]+$",
13
+ "x-sensitivity": "none"
14
+ },
15
+ "suggestion": {
16
+ "type": "string",
17
+ "pattern": "^[0-9a-f]{16}$"
18
+ },
19
+ "path": {
20
+ "type": "string",
21
+ "maxLength": 4096,
22
+ "x-sensitivity": "local"
23
+ },
24
+ "confirmToken": {
25
+ "type": "string",
26
+ "pattern": "^[A-Za-z0-9_-]{16,128}$"
27
+ }
28
+ }
29
+ }
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/repos.schema.json",
4
4
  "title": "Launch repositories",
5
- "description": "What GET /v1/repos returns and `launch-request.mjs repos` prints: the repositories POST /v1/launch?repo= accepts, by real path. source autopilot is a configured autopilot repo (config.json repos[], named by nameWithOwner); registered is one added with `launch-request.mjs register-repo` (launch-repos.json, named by its directory). path is dropped under redact.",
5
+ "description": "What GET /v1/repos returns and `launch-request.mjs repos` prints: the repositories POST /v1/launch?repo= accepts, by real path. source autopilot is a configured autopilot repo (config.json repos[], named by nameWithOwner); registered is one added with `launch-request.mjs register-repo` (launch-repos.json, named by its directory). path is dropped under redact. With --all (?all=1): suggested lists checkouts earlier runs worked in that launch does not accept yet, and missing lists registered entries that are no longer a directory; each carries an id that POST /v1/repos and DELETE /v1/repos/{id} take.",
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
8
  "required": ["contractVersion", "repos"],
@@ -34,6 +34,54 @@
34
34
  }
35
35
  }
36
36
  }
37
+ },
38
+ "suggested": {
39
+ "type": "array",
40
+ "x-sensitivity": "none",
41
+ "items": {
42
+ "type": "object",
43
+ "additionalProperties": false,
44
+ "required": ["id", "name"],
45
+ "properties": {
46
+ "id": {
47
+ "type": "string",
48
+ "pattern": "^[0-9a-f]{16}$",
49
+ "x-sensitivity": "none"
50
+ },
51
+ "path": {
52
+ "type": "string",
53
+ "x-sensitivity": "local"
54
+ },
55
+ "name": {
56
+ "type": "string",
57
+ "x-sensitivity": "none"
58
+ }
59
+ }
60
+ }
61
+ },
62
+ "missing": {
63
+ "type": "array",
64
+ "x-sensitivity": "none",
65
+ "items": {
66
+ "type": "object",
67
+ "additionalProperties": false,
68
+ "required": ["id", "name"],
69
+ "properties": {
70
+ "id": {
71
+ "type": "string",
72
+ "pattern": "^[0-9a-f]{16}$",
73
+ "x-sensitivity": "none"
74
+ },
75
+ "path": {
76
+ "type": "string",
77
+ "x-sensitivity": "local"
78
+ },
79
+ "name": {
80
+ "type": "string",
81
+ "x-sensitivity": "none"
82
+ }
83
+ }
84
+ }
37
85
  }
38
86
  }
39
87
  }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/review-verdict-request.schema.json",
4
+ "title": "Review verdict request",
5
+ "description": "The body of POST /v1/runs/{id}/review-verdict: empty for the preview, confirmToken to post. The verdict is never chosen by the request; it follows from the review's recorded findings.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["contractVersion"],
9
+ "properties": {
10
+ "contractVersion": {
11
+ "type": "string",
12
+ "pattern": "^1\\.[0-9]+\\.[0-9]+$",
13
+ "x-sensitivity": "none"
14
+ },
15
+ "confirmToken": {
16
+ "type": "string",
17
+ "pattern": "^[A-Za-z0-9_-]{16,128}$"
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/review-verdict.schema.json",
4
+ "title": "Review verdict",
5
+ "description": "What POST /v1/runs/{id}/review-verdict returns (`work-items.mjs verdict <id> [--post]`). Only a finished review whose every finding is triaged (accepted, rejected or deferred) is previewed (409 review-incomplete otherwise). The preview carries findingsDigest, the hash of the findings it was made from, and the decision lib/post-pr-review.sh would post (approve with no accepted blocking or important finding, else needs-work), a confirmToken bound to that decision and digest, and expiresAt; a confirmation after either changed is 409 confirm-mismatch; the confirmation runs post-pr-review.sh, which posts the comments and the verdict with the user's own credential, and says posted.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "contractVersion",
10
+ "taskId",
11
+ "provider",
12
+ "prNumber",
13
+ "decision",
14
+ "acceptedBlocking",
15
+ "acceptedImportant",
16
+ "findings",
17
+ "findingsDigest"
18
+ ],
19
+ "properties": {
20
+ "contractVersion": {
21
+ "type": "string",
22
+ "pattern": "^1\\.[0-9]+\\.[0-9]+$",
23
+ "x-sensitivity": "none"
24
+ },
25
+ "taskId": {
26
+ "type": "string"
27
+ },
28
+ "provider": {
29
+ "enum": ["github", "bitbucket-server", null]
30
+ },
31
+ "prNumber": {
32
+ "type": ["integer", "null"]
33
+ },
34
+ "decision": {
35
+ "enum": ["approve", "needs-work"]
36
+ },
37
+ "acceptedBlocking": {
38
+ "type": "integer"
39
+ },
40
+ "acceptedImportant": {
41
+ "type": "integer"
42
+ },
43
+ "findings": {
44
+ "type": "integer"
45
+ },
46
+ "posted": {
47
+ "type": "boolean"
48
+ },
49
+ "confirmToken": {
50
+ "type": "string",
51
+ "pattern": "^[A-Za-z0-9_-]{16,128}$"
52
+ },
53
+ "expiresAt": {
54
+ "type": "string",
55
+ "format": "date-time"
56
+ },
57
+ "findingsDigest": {
58
+ "type": "string",
59
+ "pattern": "^[0-9a-f]{64}$"
60
+ }
61
+ }
62
+ }
@@ -0,0 +1,59 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/routine-delete.schema.json",
4
+ "title": "Routine removal",
5
+ "description": "What DELETE /v1/routines/{name} returns. Without ?confirm: preview (the routine) with confirmToken and expiresAt. With it: removed, from `routine-registry.mjs remove`. A shipped command is never removed.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["contractVersion"],
9
+ "properties": {
10
+ "contractVersion": {
11
+ "type": "string",
12
+ "pattern": "^1\\.[0-9]+\\.[0-9]+$",
13
+ "x-sensitivity": "none"
14
+ },
15
+ "preview": {
16
+ "type": "object",
17
+ "additionalProperties": false,
18
+ "required": ["name", "description", "createdAt", "source"],
19
+ "properties": {
20
+ "name": {
21
+ "type": "string"
22
+ },
23
+ "description": {
24
+ "type": "string"
25
+ },
26
+ "createdAt": {
27
+ "type": ["string", "null"]
28
+ },
29
+ "source": {
30
+ "type": ["string", "null"]
31
+ }
32
+ }
33
+ },
34
+ "confirmToken": {
35
+ "type": "string",
36
+ "pattern": "^[A-Za-z0-9_-]{16,128}$"
37
+ },
38
+ "expiresAt": {
39
+ "type": "string",
40
+ "format": "date-time"
41
+ },
42
+ "removed": {
43
+ "type": "object",
44
+ "additionalProperties": false,
45
+ "required": ["name", "removedDir", "removedEntry"],
46
+ "properties": {
47
+ "name": {
48
+ "type": "string"
49
+ },
50
+ "removedDir": {
51
+ "type": "boolean"
52
+ },
53
+ "removedEntry": {
54
+ "type": "boolean"
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/routines.schema.json",
4
+ "title": "Routines",
5
+ "description": "What GET /v1/routines returns (`routine-registry.mjs list --json`): the routines saved with /multi-agent:save. Description and source are scrubbed.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["contractVersion", "routines"],
9
+ "properties": {
10
+ "contractVersion": {
11
+ "type": "string",
12
+ "pattern": "^1\\.[0-9]+\\.[0-9]+$",
13
+ "x-sensitivity": "none"
14
+ },
15
+ "routines": {
16
+ "type": "array",
17
+ "items": {
18
+ "type": "object",
19
+ "additionalProperties": false,
20
+ "required": ["name", "description", "createdAt", "source"],
21
+ "properties": {
22
+ "name": {
23
+ "type": "string"
24
+ },
25
+ "description": {
26
+ "type": "string"
27
+ },
28
+ "createdAt": {
29
+ "type": ["string", "null"]
30
+ },
31
+ "source": {
32
+ "type": ["string", "null"]
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }