@mmerterden/multi-agent-pipeline 20.28.0 → 20.30.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 (186) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +19 -6
  3. package/README.tr.md +5 -5
  4. package/docs/architecture.md +3 -3
  5. package/docs/ecosystem.md +5 -5
  6. package/docs/facts.json +7 -7
  7. package/install/catalog-history.json +1 -1
  8. package/install/claude.mjs +122 -1
  9. package/install/codex.mjs +2 -0
  10. package/install/copilot.mjs +13 -0
  11. package/install/templates/claude-hooks.json +30 -1
  12. package/manifest.json +189 -77
  13. package/package.json +2 -1
  14. package/pipeline/commands/multi-agent/analysis/SKILL.md +3 -1
  15. package/pipeline/commands/multi-agent/autopilot-on/SKILL.md +13 -15
  16. package/pipeline/commands/multi-agent/office-off/SKILL.md +27 -0
  17. package/pipeline/commands/multi-agent/office-on/SKILL.md +50 -0
  18. package/pipeline/commands/multi-agent/office-status/SKILL.md +29 -0
  19. package/pipeline/commands/multi-agent/resume/SKILL.md +2 -1
  20. package/pipeline/commands/multi-agent/serve/SKILL.md +4 -2
  21. package/pipeline/commands/multi-agent/stack/SKILL.md +15 -8
  22. package/pipeline/commands/multi-agent/steer/SKILL.md +10 -9
  23. package/pipeline/commands/multi-agent/sync/SKILL.md +3 -3
  24. package/pipeline/contract/CHANGELOG.md +62 -0
  25. package/pipeline/contract/README.md +52 -6
  26. package/pipeline/contract/fixtures/error-invalid-request.json +1 -1
  27. package/pipeline/contract/fixtures/error-unauthorized.json +1 -1
  28. package/pipeline/contract/fixtures/error-unsigned.json +1 -1
  29. package/pipeline/contract/manifest.json +367 -22
  30. package/pipeline/contract/types/index.d.ts +531 -4
  31. package/pipeline/lib/hook-registration.mjs +252 -0
  32. package/pipeline/lib/prefs-value.mjs +44 -0
  33. package/pipeline/lib/run-completion.mjs +148 -0
  34. package/pipeline/multi-agent-refs/analysis/render.md +4 -4
  35. package/pipeline/multi-agent-refs/cross-cli-contract.md +5 -4
  36. package/pipeline/multi-agent-refs/features/doctor.md +11 -0
  37. package/pipeline/multi-agent-refs/features/office-threat-model.md +91 -0
  38. package/pipeline/multi-agent-refs/help/en.md +3 -0
  39. package/pipeline/multi-agent-refs/help/tr.md +3 -0
  40. package/pipeline/multi-agent-refs/phases/operations.md +17 -0
  41. package/pipeline/multi-agent-refs/phases/phase-0-init.md +6 -2
  42. package/pipeline/multi-agent-refs/phases/phase-1-plan.md +2 -2
  43. package/pipeline/multi-agent-refs/phases/phase-2-dev.md +1 -1
  44. package/pipeline/multi-agent-refs/phases/phase-3-review.md +2 -2
  45. package/pipeline/multi-agent-refs/phases/phase-4-commit.md +7 -6
  46. package/pipeline/multi-agent-refs/phases/phase-5-report.md +5 -4
  47. package/pipeline/office/NOTICE.md +42 -0
  48. package/pipeline/office/assets/BIN.png +0 -0
  49. package/pipeline/office/assets/BOOKSHELF.png +0 -0
  50. package/pipeline/office/assets/CACTUS.png +0 -0
  51. package/pipeline/office/assets/CLOCK.png +0 -0
  52. package/pipeline/office/assets/COFFEE.png +0 -0
  53. package/pipeline/office/assets/COFFEE_TABLE.png +0 -0
  54. package/pipeline/office/assets/CUSHIONED_BENCH.png +0 -0
  55. package/pipeline/office/assets/CUSHIONED_CHAIR_BACK.png +0 -0
  56. package/pipeline/office/assets/CUSHIONED_CHAIR_FRONT.png +0 -0
  57. package/pipeline/office/assets/CUSHIONED_CHAIR_SIDE.png +0 -0
  58. package/pipeline/office/assets/DESK_FRONT.png +0 -0
  59. package/pipeline/office/assets/DESK_SIDE.png +0 -0
  60. package/pipeline/office/assets/DOUBLE_BOOKSHELF.png +0 -0
  61. package/pipeline/office/assets/HANGING_PLANT.png +0 -0
  62. package/pipeline/office/assets/LARGE_PAINTING.png +0 -0
  63. package/pipeline/office/assets/LARGE_PLANT.png +0 -0
  64. package/pipeline/office/assets/PC_BACK.png +0 -0
  65. package/pipeline/office/assets/PC_FRONT_OFF.png +0 -0
  66. package/pipeline/office/assets/PC_FRONT_ON_1.png +0 -0
  67. package/pipeline/office/assets/PC_FRONT_ON_2.png +0 -0
  68. package/pipeline/office/assets/PC_FRONT_ON_3.png +0 -0
  69. package/pipeline/office/assets/PC_SIDE.png +0 -0
  70. package/pipeline/office/assets/PLANT.png +0 -0
  71. package/pipeline/office/assets/PLANT_2.png +0 -0
  72. package/pipeline/office/assets/POT.png +0 -0
  73. package/pipeline/office/assets/SMALL_PAINTING.png +0 -0
  74. package/pipeline/office/assets/SMALL_PAINTING_2.png +0 -0
  75. package/pipeline/office/assets/SMALL_TABLE_FRONT.png +0 -0
  76. package/pipeline/office/assets/SMALL_TABLE_SIDE.png +0 -0
  77. package/pipeline/office/assets/SOFA_BACK.png +0 -0
  78. package/pipeline/office/assets/SOFA_FRONT.png +0 -0
  79. package/pipeline/office/assets/SOFA_SIDE.png +0 -0
  80. package/pipeline/office/assets/TABLE_FRONT.png +0 -0
  81. package/pipeline/office/assets/WHITEBOARD.png +0 -0
  82. package/pipeline/office/assets/WOODEN_BENCH.png +0 -0
  83. package/pipeline/office/assets/WOODEN_CHAIR_BACK.png +0 -0
  84. package/pipeline/office/assets/WOODEN_CHAIR_FRONT.png +0 -0
  85. package/pipeline/office/assets/WOODEN_CHAIR_SIDE.png +0 -0
  86. package/pipeline/office/assets/char_0.png +0 -0
  87. package/pipeline/office/assets/char_1.png +0 -0
  88. package/pipeline/office/assets/char_2.png +0 -0
  89. package/pipeline/office/assets/char_3.png +0 -0
  90. package/pipeline/office/assets/char_4.png +0 -0
  91. package/pipeline/office/assets/char_5.png +0 -0
  92. package/pipeline/office/assets/floor_0.png +0 -0
  93. package/pipeline/office/assets/floor_1.png +0 -0
  94. package/pipeline/office/assets/floor_2.png +0 -0
  95. package/pipeline/office/assets/floor_3.png +0 -0
  96. package/pipeline/office/assets/floor_4.png +0 -0
  97. package/pipeline/office/assets/floor_5.png +0 -0
  98. package/pipeline/office/assets/floor_6.png +0 -0
  99. package/pipeline/office/assets/floor_7.png +0 -0
  100. package/pipeline/office/assets/floor_8.png +0 -0
  101. package/pipeline/office/assets/wall_0.png +0 -0
  102. package/pipeline/office/index.html +5319 -0
  103. package/pipeline/preferences-template.json +7 -0
  104. package/pipeline/rules/figma-pipeline.md +2 -0
  105. package/pipeline/schemas/activity-chat.schema.json +78 -0
  106. package/pipeline/schemas/activity-roles.json +48 -0
  107. package/pipeline/schemas/activity-roles.schema.json +49 -0
  108. package/pipeline/schemas/activity.schema.json +429 -0
  109. package/pipeline/schemas/agent-state.schema.json +20 -5
  110. package/pipeline/schemas/autopilot-on-request.schema.json +33 -0
  111. package/pipeline/schemas/autopilot-on.schema.json +111 -0
  112. package/pipeline/schemas/contract-error.schema.json +33 -3
  113. package/pipeline/schemas/issue-maturity.schema.json +68 -0
  114. package/pipeline/schemas/ledger.schema.json +202 -0
  115. package/pipeline/schemas/permissions.schema.json +47 -0
  116. package/pipeline/schemas/phases.json +3 -2
  117. package/pipeline/schemas/phases.schema.json +5 -1
  118. package/pipeline/schemas/prefs.schema.json +56 -0
  119. package/pipeline/schemas/prs.schema.json +73 -0
  120. package/pipeline/schemas/review-verdict-request.schema.json +20 -0
  121. package/pipeline/schemas/review-verdict.schema.json +62 -0
  122. package/pipeline/schemas/routine-delete.schema.json +59 -0
  123. package/pipeline/schemas/routines.schema.json +38 -0
  124. package/pipeline/schemas/run-evidence.schema.json +29 -0
  125. package/pipeline/schemas/run-results.schema.json +218 -0
  126. package/pipeline/schemas/runs-index.schema.json +1 -1
  127. package/pipeline/schemas/service-read.schema.json +58 -0
  128. package/pipeline/schemas/stack-change.schema.json +82 -0
  129. package/pipeline/schemas/stack-request.schema.json +33 -0
  130. package/pipeline/schemas/stack.schema.json +59 -0
  131. package/pipeline/schemas/steer-request.schema.json +25 -0
  132. package/pipeline/schemas/steer.schema.json +59 -0
  133. package/pipeline/schemas/tool-call-request.schema.json +19 -0
  134. package/pipeline/schemas/tool-call.schema.json +47 -0
  135. package/pipeline/schemas/tools.schema.json +60 -0
  136. package/pipeline/scripts/_active-run.mjs +158 -0
  137. package/pipeline/scripts/_autopilot-outcomes.mjs +1 -0
  138. package/pipeline/scripts/_cost.mjs +66 -1
  139. package/pipeline/scripts/_guard_rules.py +605 -0
  140. package/pipeline/scripts/_office-smoke-lib.sh +115 -0
  141. package/pipeline/scripts/_spawn-async.mjs +73 -0
  142. package/pipeline/scripts/_transcript-tail.mjs +274 -0
  143. package/pipeline/scripts/activity-snapshot.mjs +1027 -0
  144. package/pipeline/scripts/agent-guard.py +118 -7
  145. package/pipeline/scripts/agent-guard.sh +50 -3
  146. package/pipeline/scripts/argv-secret-scan.mjs +114 -0
  147. package/pipeline/scripts/autopilot-control.mjs +214 -9
  148. package/pipeline/scripts/autopilot-runner.mjs +8 -2
  149. package/pipeline/scripts/confirm-command.mjs +70 -0
  150. package/pipeline/scripts/contract-server.mjs +1178 -48
  151. package/pipeline/scripts/cost-analyze.mjs +2 -53
  152. package/pipeline/scripts/cost-table.json +1 -0
  153. package/pipeline/scripts/doctor.mjs +54 -0
  154. package/pipeline/scripts/evidence-gate.mjs +8 -4
  155. package/pipeline/scripts/gate-ledger.mjs +163 -7
  156. package/pipeline/scripts/office-build.mjs +89 -0
  157. package/pipeline/scripts/office-control.mjs +383 -0
  158. package/pipeline/scripts/office-ledger.mjs +409 -0
  159. package/pipeline/scripts/plan-coverage-gate.mjs +9 -8
  160. package/pipeline/scripts/pre-commit-check.sh +12 -0
  161. package/pipeline/scripts/routine-registry.mjs +42 -6
  162. package/pipeline/scripts/run-results.mjs +373 -0
  163. package/pipeline/scripts/run-scope-guard.mjs +188 -0
  164. package/pipeline/scripts/run-scope-guard.sh +23 -0
  165. package/pipeline/scripts/run-stop-guard.mjs +246 -0
  166. package/pipeline/scripts/run-stop-guard.sh +25 -0
  167. package/pipeline/scripts/service-read.mjs +244 -0
  168. package/pipeline/scripts/stack-toggle.mjs +285 -0
  169. package/pipeline/scripts/steer-run.mjs +97 -0
  170. package/pipeline/scripts/toolkit-tools.mjs +599 -0
  171. package/pipeline/scripts/uninstall.mjs +4 -0
  172. package/pipeline/scripts/validate-state.mjs +26 -0
  173. package/pipeline/scripts/work-items.mjs +304 -0
  174. package/pipeline/scripts/write-state.mjs +114 -0
  175. package/pipeline/skills/.skill-manifest.json +19 -7
  176. package/pipeline/skills/.skills-index.json +34 -1
  177. package/pipeline/skills/shared/README.md +6 -3
  178. package/pipeline/skills/shared/core/multi-agent-autopilot-on/SKILL.md +13 -15
  179. package/pipeline/skills/shared/core/multi-agent-office-off/SKILL.md +16 -0
  180. package/pipeline/skills/shared/core/multi-agent-office-on/SKILL.md +22 -0
  181. package/pipeline/skills/shared/core/multi-agent-office-status/SKILL.md +17 -0
  182. package/pipeline/skills/shared/core/multi-agent-serve/SKILL.md +4 -2
  183. package/pipeline/skills/shared/core/multi-agent-stack/SKILL.md +14 -6
  184. package/pipeline/skills/shared/core/multi-agent-steer/SKILL.md +10 -9
  185. package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +3 -3
  186. package/pipeline/skills/skills-index.md +4 -1
@@ -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.",
@@ -1872,6 +1891,43 @@
1872
1891
  "enabled": false
1873
1892
  }
1874
1893
  },
1894
+ "stopGuard": {
1895
+ "type": "object",
1896
+ "additionalProperties": false,
1897
+ "description": "run-stop-guard.sh, the Claude Code Stop hook that holds the session driving a pipeline run from ending its turn mid-phase with no halt or wait recorded. Read first on every Stop; false lets every stop through. Removing the hook from settings.json works too, and install does not add it back.",
1898
+ "properties": {
1899
+ "enabled": {
1900
+ "type": "boolean",
1901
+ "default": true,
1902
+ "description": "true = the hook judges a stop as documented. false = it never blocks."
1903
+ }
1904
+ },
1905
+ "default": {
1906
+ "enabled": true
1907
+ }
1908
+ },
1909
+ "readOnlyRepos": {
1910
+ "type": "array",
1911
+ "items": { "type": "string", "minLength": 1 },
1912
+ "default": [],
1913
+ "description": "Absolute paths (a leading ~ is expanded) of checkouts kept as read-only references: agent-guard.sh refuses an Edit, Write or NotebookEdit whose target is inside one, and a git commit, push, merge, cherry-pick, revert, am, rebase or tag that runs in one (after any cd or git -C on the line). Attended and unattended alike. Empty means no repository is protected this way."
1914
+ },
1915
+ "attendedCommitGate": {
1916
+ "type": "object",
1917
+ "additionalProperties": false,
1918
+ "description": "What pre-commit-check.sh does with an attended `git commit` inside a pipeline run whose gate ledger holds no passing build and test verdict (evidence-gate/build, evidence-gate/test) for HEAD. evidence-gate.mjs records both in an attended run, marked attended. Read by gate-ledger.mjs `evidence`; a commit outside a run, or in a mode that commits nothing, is never checked. Unattended commits are held to the full ledger regardless of this setting.",
1919
+ "properties": {
1920
+ "mode": {
1921
+ "type": "string",
1922
+ "enum": ["off", "warn", "block"],
1923
+ "default": "warn",
1924
+ "description": "warn = say so on stderr and let the commit through. block = refuse the commit (exit 2) until the evidence is recorded. off = no check."
1925
+ }
1926
+ },
1927
+ "default": {
1928
+ "mode": "warn"
1929
+ }
1930
+ },
1875
1931
  "mutationProbe": {
1876
1932
  "type": "object",
1877
1933
  "additionalProperties": false,
@@ -0,0 +1,73 @@
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
+ "repo": {
26
+ "type": "string"
27
+ },
28
+ "number": {
29
+ "type": "integer"
30
+ },
31
+ "title": {
32
+ "type": "string"
33
+ },
34
+ "url": {
35
+ "type": ["string", "null"],
36
+ "x-sensitivity": "local"
37
+ },
38
+ "author": {
39
+ "type": ["string", "null"]
40
+ },
41
+ "updatedAt": {
42
+ "type": ["string", "null"]
43
+ },
44
+ "role": {
45
+ "enum": ["reviewer", "author"]
46
+ }
47
+ }
48
+ }
49
+ },
50
+ "sources": {
51
+ "type": "array",
52
+ "items": {
53
+ "type": "object",
54
+ "additionalProperties": false,
55
+ "required": ["source", "ok", "count"],
56
+ "properties": {
57
+ "source": {
58
+ "type": "string"
59
+ },
60
+ "ok": {
61
+ "type": "boolean"
62
+ },
63
+ "count": {
64
+ "type": "integer"
65
+ },
66
+ "reason": {
67
+ "type": "string"
68
+ }
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
@@ -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
+ }
@@ -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
+ }
@@ -87,7 +87,7 @@
87
87
  "waitingFor": {
88
88
  "type": ["string", "null"],
89
89
  "x-sensitivity": "none",
90
- "description": "The step a paused run re-enters (agent-state waitingFor): maturity, user-channels-choice or question. Added in 1.1.0."
90
+ "description": "The step a paused run re-enters (agent-state waitingFor): maturity, user-channels-choice, local-test, attended-reply or question; null or absent when the run is not waiting. Added in 1.1.0."
91
91
  },
92
92
  "pendingQuestion": {
93
93
  "x-sensitivity": "none",
@@ -0,0 +1,58 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/service-read.schema.json",
4
+ "title": "Service read",
5
+ "description": "What GET /v1/services/confluence, /crashlytics and /figma return (`service-read.mjs`): one Confluence page, one Crashlytics issue or one Figma frame render, through the pipeline's own clients. Text is redacted; a frame comes back as base64 PNG.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["contractVersion", "service"],
9
+ "properties": {
10
+ "contractVersion": {
11
+ "type": "string",
12
+ "pattern": "^1\\.[0-9]+\\.[0-9]+$",
13
+ "x-sensitivity": "none"
14
+ },
15
+ "service": {
16
+ "enum": ["confluence", "crashlytics", "figma"]
17
+ },
18
+ "pageId": {
19
+ "type": ["string", "null"]
20
+ },
21
+ "title": {
22
+ "type": "string"
23
+ },
24
+ "body": {
25
+ "type": "string"
26
+ },
27
+ "apiContracts": {
28
+ "type": "integer"
29
+ },
30
+ "type": {
31
+ "type": ["string", "null"]
32
+ },
33
+ "occurrences": {
34
+ "type": ["number", "null"]
35
+ },
36
+ "impactedUsers": {
37
+ "type": ["number", "null"]
38
+ },
39
+ "stackTrace": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "string"
43
+ }
44
+ },
45
+ "fileKey": {
46
+ "type": "string"
47
+ },
48
+ "nodeId": {
49
+ "type": "string"
50
+ },
51
+ "mime": {
52
+ "const": "image/png"
53
+ },
54
+ "data": {
55
+ "type": "string"
56
+ }
57
+ }
58
+ }