@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.
- package/CHANGELOG.md +19 -0
- package/README.md +19 -6
- package/README.tr.md +5 -5
- package/docs/architecture.md +3 -3
- package/docs/ecosystem.md +5 -5
- package/docs/facts.json +7 -7
- package/install/catalog-history.json +1 -1
- package/install/claude.mjs +122 -1
- package/install/codex.mjs +2 -0
- package/install/copilot.mjs +13 -0
- package/install/templates/claude-hooks.json +30 -1
- package/manifest.json +189 -77
- package/package.json +2 -1
- package/pipeline/commands/multi-agent/analysis/SKILL.md +3 -1
- package/pipeline/commands/multi-agent/autopilot-on/SKILL.md +13 -15
- package/pipeline/commands/multi-agent/office-off/SKILL.md +27 -0
- package/pipeline/commands/multi-agent/office-on/SKILL.md +50 -0
- package/pipeline/commands/multi-agent/office-status/SKILL.md +29 -0
- package/pipeline/commands/multi-agent/resume/SKILL.md +2 -1
- package/pipeline/commands/multi-agent/serve/SKILL.md +4 -2
- package/pipeline/commands/multi-agent/stack/SKILL.md +15 -8
- package/pipeline/commands/multi-agent/steer/SKILL.md +10 -9
- package/pipeline/commands/multi-agent/sync/SKILL.md +3 -3
- package/pipeline/contract/CHANGELOG.md +62 -0
- package/pipeline/contract/README.md +52 -6
- package/pipeline/contract/fixtures/error-invalid-request.json +1 -1
- package/pipeline/contract/fixtures/error-unauthorized.json +1 -1
- package/pipeline/contract/fixtures/error-unsigned.json +1 -1
- package/pipeline/contract/manifest.json +367 -22
- package/pipeline/contract/types/index.d.ts +531 -4
- package/pipeline/lib/hook-registration.mjs +252 -0
- package/pipeline/lib/prefs-value.mjs +44 -0
- package/pipeline/lib/run-completion.mjs +148 -0
- package/pipeline/multi-agent-refs/analysis/render.md +4 -4
- package/pipeline/multi-agent-refs/cross-cli-contract.md +5 -4
- package/pipeline/multi-agent-refs/features/doctor.md +11 -0
- package/pipeline/multi-agent-refs/features/office-threat-model.md +91 -0
- package/pipeline/multi-agent-refs/help/en.md +3 -0
- package/pipeline/multi-agent-refs/help/tr.md +3 -0
- package/pipeline/multi-agent-refs/phases/operations.md +17 -0
- package/pipeline/multi-agent-refs/phases/phase-0-init.md +6 -2
- package/pipeline/multi-agent-refs/phases/phase-1-plan.md +2 -2
- package/pipeline/multi-agent-refs/phases/phase-2-dev.md +1 -1
- package/pipeline/multi-agent-refs/phases/phase-3-review.md +2 -2
- package/pipeline/multi-agent-refs/phases/phase-4-commit.md +7 -6
- package/pipeline/multi-agent-refs/phases/phase-5-report.md +5 -4
- package/pipeline/office/NOTICE.md +42 -0
- package/pipeline/office/assets/BIN.png +0 -0
- package/pipeline/office/assets/BOOKSHELF.png +0 -0
- package/pipeline/office/assets/CACTUS.png +0 -0
- package/pipeline/office/assets/CLOCK.png +0 -0
- package/pipeline/office/assets/COFFEE.png +0 -0
- package/pipeline/office/assets/COFFEE_TABLE.png +0 -0
- package/pipeline/office/assets/CUSHIONED_BENCH.png +0 -0
- package/pipeline/office/assets/CUSHIONED_CHAIR_BACK.png +0 -0
- package/pipeline/office/assets/CUSHIONED_CHAIR_FRONT.png +0 -0
- package/pipeline/office/assets/CUSHIONED_CHAIR_SIDE.png +0 -0
- package/pipeline/office/assets/DESK_FRONT.png +0 -0
- package/pipeline/office/assets/DESK_SIDE.png +0 -0
- package/pipeline/office/assets/DOUBLE_BOOKSHELF.png +0 -0
- package/pipeline/office/assets/HANGING_PLANT.png +0 -0
- package/pipeline/office/assets/LARGE_PAINTING.png +0 -0
- package/pipeline/office/assets/LARGE_PLANT.png +0 -0
- package/pipeline/office/assets/PC_BACK.png +0 -0
- package/pipeline/office/assets/PC_FRONT_OFF.png +0 -0
- package/pipeline/office/assets/PC_FRONT_ON_1.png +0 -0
- package/pipeline/office/assets/PC_FRONT_ON_2.png +0 -0
- package/pipeline/office/assets/PC_FRONT_ON_3.png +0 -0
- package/pipeline/office/assets/PC_SIDE.png +0 -0
- package/pipeline/office/assets/PLANT.png +0 -0
- package/pipeline/office/assets/PLANT_2.png +0 -0
- package/pipeline/office/assets/POT.png +0 -0
- package/pipeline/office/assets/SMALL_PAINTING.png +0 -0
- package/pipeline/office/assets/SMALL_PAINTING_2.png +0 -0
- package/pipeline/office/assets/SMALL_TABLE_FRONT.png +0 -0
- package/pipeline/office/assets/SMALL_TABLE_SIDE.png +0 -0
- package/pipeline/office/assets/SOFA_BACK.png +0 -0
- package/pipeline/office/assets/SOFA_FRONT.png +0 -0
- package/pipeline/office/assets/SOFA_SIDE.png +0 -0
- package/pipeline/office/assets/TABLE_FRONT.png +0 -0
- package/pipeline/office/assets/WHITEBOARD.png +0 -0
- package/pipeline/office/assets/WOODEN_BENCH.png +0 -0
- package/pipeline/office/assets/WOODEN_CHAIR_BACK.png +0 -0
- package/pipeline/office/assets/WOODEN_CHAIR_FRONT.png +0 -0
- package/pipeline/office/assets/WOODEN_CHAIR_SIDE.png +0 -0
- package/pipeline/office/assets/char_0.png +0 -0
- package/pipeline/office/assets/char_1.png +0 -0
- package/pipeline/office/assets/char_2.png +0 -0
- package/pipeline/office/assets/char_3.png +0 -0
- package/pipeline/office/assets/char_4.png +0 -0
- package/pipeline/office/assets/char_5.png +0 -0
- package/pipeline/office/assets/floor_0.png +0 -0
- package/pipeline/office/assets/floor_1.png +0 -0
- package/pipeline/office/assets/floor_2.png +0 -0
- package/pipeline/office/assets/floor_3.png +0 -0
- package/pipeline/office/assets/floor_4.png +0 -0
- package/pipeline/office/assets/floor_5.png +0 -0
- package/pipeline/office/assets/floor_6.png +0 -0
- package/pipeline/office/assets/floor_7.png +0 -0
- package/pipeline/office/assets/floor_8.png +0 -0
- package/pipeline/office/assets/wall_0.png +0 -0
- package/pipeline/office/index.html +5319 -0
- package/pipeline/preferences-template.json +7 -0
- package/pipeline/rules/figma-pipeline.md +2 -0
- package/pipeline/schemas/activity-chat.schema.json +78 -0
- package/pipeline/schemas/activity-roles.json +48 -0
- package/pipeline/schemas/activity-roles.schema.json +49 -0
- package/pipeline/schemas/activity.schema.json +429 -0
- package/pipeline/schemas/agent-state.schema.json +20 -5
- package/pipeline/schemas/autopilot-on-request.schema.json +33 -0
- package/pipeline/schemas/autopilot-on.schema.json +111 -0
- package/pipeline/schemas/contract-error.schema.json +33 -3
- package/pipeline/schemas/issue-maturity.schema.json +68 -0
- package/pipeline/schemas/ledger.schema.json +202 -0
- package/pipeline/schemas/permissions.schema.json +47 -0
- package/pipeline/schemas/phases.json +3 -2
- package/pipeline/schemas/phases.schema.json +5 -1
- package/pipeline/schemas/prefs.schema.json +56 -0
- package/pipeline/schemas/prs.schema.json +73 -0
- package/pipeline/schemas/review-verdict-request.schema.json +20 -0
- package/pipeline/schemas/review-verdict.schema.json +62 -0
- package/pipeline/schemas/routine-delete.schema.json +59 -0
- package/pipeline/schemas/routines.schema.json +38 -0
- package/pipeline/schemas/run-evidence.schema.json +29 -0
- package/pipeline/schemas/run-results.schema.json +218 -0
- package/pipeline/schemas/runs-index.schema.json +1 -1
- package/pipeline/schemas/service-read.schema.json +58 -0
- package/pipeline/schemas/stack-change.schema.json +82 -0
- package/pipeline/schemas/stack-request.schema.json +33 -0
- package/pipeline/schemas/stack.schema.json +59 -0
- package/pipeline/schemas/steer-request.schema.json +25 -0
- package/pipeline/schemas/steer.schema.json +59 -0
- package/pipeline/schemas/tool-call-request.schema.json +19 -0
- package/pipeline/schemas/tool-call.schema.json +47 -0
- package/pipeline/schemas/tools.schema.json +60 -0
- package/pipeline/scripts/_active-run.mjs +158 -0
- package/pipeline/scripts/_autopilot-outcomes.mjs +1 -0
- package/pipeline/scripts/_cost.mjs +66 -1
- package/pipeline/scripts/_guard_rules.py +605 -0
- package/pipeline/scripts/_office-smoke-lib.sh +115 -0
- package/pipeline/scripts/_spawn-async.mjs +73 -0
- package/pipeline/scripts/_transcript-tail.mjs +274 -0
- package/pipeline/scripts/activity-snapshot.mjs +1027 -0
- package/pipeline/scripts/agent-guard.py +118 -7
- package/pipeline/scripts/agent-guard.sh +50 -3
- package/pipeline/scripts/argv-secret-scan.mjs +114 -0
- package/pipeline/scripts/autopilot-control.mjs +214 -9
- package/pipeline/scripts/autopilot-runner.mjs +8 -2
- package/pipeline/scripts/confirm-command.mjs +70 -0
- package/pipeline/scripts/contract-server.mjs +1178 -48
- package/pipeline/scripts/cost-analyze.mjs +2 -53
- package/pipeline/scripts/cost-table.json +1 -0
- package/pipeline/scripts/doctor.mjs +54 -0
- package/pipeline/scripts/evidence-gate.mjs +8 -4
- package/pipeline/scripts/gate-ledger.mjs +163 -7
- package/pipeline/scripts/office-build.mjs +89 -0
- package/pipeline/scripts/office-control.mjs +383 -0
- package/pipeline/scripts/office-ledger.mjs +409 -0
- package/pipeline/scripts/plan-coverage-gate.mjs +9 -8
- package/pipeline/scripts/pre-commit-check.sh +12 -0
- package/pipeline/scripts/routine-registry.mjs +42 -6
- package/pipeline/scripts/run-results.mjs +373 -0
- package/pipeline/scripts/run-scope-guard.mjs +188 -0
- package/pipeline/scripts/run-scope-guard.sh +23 -0
- package/pipeline/scripts/run-stop-guard.mjs +246 -0
- package/pipeline/scripts/run-stop-guard.sh +25 -0
- package/pipeline/scripts/service-read.mjs +244 -0
- package/pipeline/scripts/stack-toggle.mjs +285 -0
- package/pipeline/scripts/steer-run.mjs +97 -0
- package/pipeline/scripts/toolkit-tools.mjs +599 -0
- package/pipeline/scripts/uninstall.mjs +4 -0
- package/pipeline/scripts/validate-state.mjs +26 -0
- package/pipeline/scripts/work-items.mjs +304 -0
- package/pipeline/scripts/write-state.mjs +114 -0
- package/pipeline/skills/.skill-manifest.json +19 -7
- package/pipeline/skills/.skills-index.json +34 -1
- package/pipeline/skills/shared/README.md +6 -3
- package/pipeline/skills/shared/core/multi-agent-autopilot-on/SKILL.md +13 -15
- package/pipeline/skills/shared/core/multi-agent-office-off/SKILL.md +16 -0
- package/pipeline/skills/shared/core/multi-agent-office-on/SKILL.md +22 -0
- package/pipeline/skills/shared/core/multi-agent-office-status/SKILL.md +17 -0
- package/pipeline/skills/shared/core/multi-agent-serve/SKILL.md +4 -2
- package/pipeline/skills/shared/core/multi-agent-stack/SKILL.md +14 -6
- package/pipeline/skills/shared/core/multi-agent-steer/SKILL.md +10 -9
- package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +3 -3
- package/pipeline/skills/skills-index.md +4 -1
|
@@ -38,6 +38,10 @@
|
|
|
38
38
|
"type": ["string", "null"],
|
|
39
39
|
"description": "The Claude Code session id this run was launched under, copied by Phase 0 from MULTI_AGENT_SESSION_ID when the launcher set it. Continuous mode sets it to the id it passed as --session-id, and matches this field to find ITS run's state rather than another run in the same repo. Absent or null on an attended run: nothing sets the variable there."
|
|
40
40
|
},
|
|
41
|
+
"hostSessionId": {
|
|
42
|
+
"type": ["string", "null"],
|
|
43
|
+
"description": "The host session that made this run's last phase transition: write-state.mjs copies CLAUDE_CODE_SESSION_ID from its environment when a write creates the state or sets currentPhase, and never otherwise, so a second session editing the state (steer) does not take the run over. run-stop-guard.mjs and run-scope-guard.mjs match it against a hook payload's session_id to find the run a hook call belongs to. Absent on a host that sets no such variable."
|
|
44
|
+
},
|
|
41
45
|
"title": {
|
|
42
46
|
"type": ["string", "null"],
|
|
43
47
|
"description": "The issue title Phase 0 fetched (GitHub title, Jira summary). runs-index.mjs carries it as the run's title; absent when the input was free text or nothing was fetched."
|
|
@@ -275,9 +279,16 @@
|
|
|
275
279
|
}
|
|
276
280
|
},
|
|
277
281
|
"waitingFor": {
|
|
278
|
-
"type": "string",
|
|
279
|
-
"enum": [
|
|
280
|
-
|
|
282
|
+
"type": ["string", "null"],
|
|
283
|
+
"enum": [
|
|
284
|
+
"maturity",
|
|
285
|
+
"user-channels-choice",
|
|
286
|
+
"local-test",
|
|
287
|
+
"attended-reply",
|
|
288
|
+
"question",
|
|
289
|
+
null
|
|
290
|
+
],
|
|
291
|
+
"description": "The step a paused run must RE-ENTER, as opposed to the phase it should continue past. resume reads this first and falls back to currentPhase + 1 when it is absent or null (null is how a wait is cleared through write-state). maturity: Phase 0's maturity step, with the item re-fetched (refs/features/maturity-followup.md). user-channels-choice: Phase 5's channels menu, with the stored channelsInput. local-test: Phase 3's user-test gate. attended-reply: a typed reply asked for in plain text inside currentPhase; resume re-enters currentPhase and asks again. question: the step named by pendingQuestion.stepId, answered by `resume <id> --answer <optionId>`, and never written without that pendingQuestion; open-questions-gate.mjs writes it as the last step of Phase 1 with stepId phase-1/open-questions. write-state clears every value but question when a write advances currentPhase."
|
|
281
292
|
},
|
|
282
293
|
"workspaceSource": {
|
|
283
294
|
"type": "string",
|
|
@@ -497,7 +508,7 @@
|
|
|
497
508
|
"status": {
|
|
498
509
|
"type": "string",
|
|
499
510
|
"enum": ["in_progress", "awaiting_input", "paused", "complete", "failed", "abandoned"],
|
|
500
|
-
"description": "Overall task status. `abandoned` is written through the locked state writer by the autopilot runner, for a run its session launched that ended with neither a PR nor a parked question, and by a kill; `abandonedBy` names the writer. `awaiting_input` is deliberately distinct from both `in_progress` and `paused`: the run is not broken and not resumable by a retry - it is finished with what it can do alone and is holding for a human answer, which is what Phase 5 does by design after the PR is open. Without a word for it, a run whose work had landed read exactly like one that crashed mid-development, and a state file in the wild had already invented `awaiting-user-test-main-checkout` to say it. `paused` stays what it was: stopped deliberately, resumable, nothing expected from anyone."
|
|
511
|
+
"description": "Overall task status. `complete` is earned, not claimed: write-state.mjs refuses a write that moves the run into it unless currentPhase is the mode's last phase and, for a mode that commits, Phase 4 left evidence (commit.sha, pr, publish, projects[].commit, or phases.4 skipped with notes) and gates[] holds a passing plan-coverage verdict (lib/run-completion.mjs); the autopilot runner files a complete state without that evidence as stopped-incomplete. `abandoned` is written through the locked state writer by the autopilot runner, for a run its session launched that ended with neither a PR nor a parked question, and by a kill; `abandonedBy` names the writer. `awaiting_input` is deliberately distinct from both `in_progress` and `paused`: the run is not broken and not resumable by a retry - it is finished with what it can do alone and is holding for a human answer, which is what Phase 5 does by design after the PR is open. Without a word for it, a run whose work had landed read exactly like one that crashed mid-development, and a state file in the wild had already invented `awaiting-user-test-main-checkout` to say it. `paused` stays what it was: stopped deliberately, resumable, nothing expected from anyone."
|
|
501
512
|
},
|
|
502
513
|
"abandonedBy": {
|
|
503
514
|
"type": "string",
|
|
@@ -2059,7 +2070,7 @@
|
|
|
2059
2070
|
},
|
|
2060
2071
|
"gates": {
|
|
2061
2072
|
"type": "array",
|
|
2062
|
-
"description": "Gate ledger, written while the quality gates are active (lib/unattended.mjs gatesActive: MULTI_AGENT_UNATTENDED=1, or state.autopilot true): one entry per verdict, appended by gate-ledger.mjs under the write-state lock. With MULTI_AGENT_UNATTENDED=1 in its environment, pre-commit-check.sh blocks a commit unless the latest entry of every mandatory gate for HEAD is pass or not-applicable.
|
|
2073
|
+
"description": "Gate ledger, written while the quality gates are active (lib/unattended.mjs gatesActive: MULTI_AGENT_UNATTENDED=1, or state.autopilot true): one entry per verdict, appended by gate-ledger.mjs under the write-state lock. With MULTI_AGENT_UNATTENDED=1 in its environment, pre-commit-check.sh blocks a commit unless the latest entry of every mandatory gate for HEAD is pass or not-applicable. A run with neither records only the gates in gate-ledger.mjs ATTENDED_RECORDED, each entry marked attended: true, which the unattended commit check never counts.",
|
|
2063
2074
|
"items": {
|
|
2064
2075
|
"type": "object",
|
|
2065
2076
|
"additionalProperties": false,
|
|
@@ -2082,6 +2093,10 @@
|
|
|
2082
2093
|
"type": ["string", "null"],
|
|
2083
2094
|
"description": "Repository HEAD the gate ran against."
|
|
2084
2095
|
},
|
|
2096
|
+
"attended": {
|
|
2097
|
+
"type": "boolean",
|
|
2098
|
+
"description": "True on an entry written while the quality gates were off (an attended run). lib/run-completion.mjs and the attended commit check read it; gate-ledger.mjs checkCommit ignores it."
|
|
2099
|
+
},
|
|
2085
2100
|
"detail": {
|
|
2086
2101
|
"type": "object",
|
|
2087
2102
|
"additionalProperties": true
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/autopilot-on-request.schema.json",
|
|
4
|
+
"title": "Autopilot on request",
|
|
5
|
+
"description": "The body of POST /v1/autopilot/on. The first request names the selection (repos, by nameWithOwner, each already in the autopilot config) and gets a preview and a confirm token; the second sends only the token and turns the mode on for exactly what was previewed. An empty selection is refused: the mode is never turned on without a repository.",
|
|
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
|
+
"repos": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"minItems": 1,
|
|
18
|
+
"maxItems": 50,
|
|
19
|
+
"items": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "^[A-Za-z0-9._-]{1,100}(/[A-Za-z0-9._-]{1,100})?$"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"configureOnly": {
|
|
25
|
+
"type": "boolean",
|
|
26
|
+
"description": "Save the selection without scheduling anything."
|
|
27
|
+
},
|
|
28
|
+
"confirmToken": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"pattern": "^[A-Za-z0-9_-]{16,128}$"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/autopilot-on.schema.json",
|
|
4
|
+
"title": "Autopilot on",
|
|
5
|
+
"description": "What POST /v1/autopilot/on returns (`autopilot-control.mjs on-preview`, then `on`). Step one: preview {keep, drop, probe, configureOnly} with confirmToken and expiresAt. Step two: enabled and scheduled say whether the schedule was loaded; it is not when configureOnly was asked or a credential probe failed, and probe says which.",
|
|
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": ["keep", "drop", "probe", "configureOnly"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"keep": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"items": {
|
|
23
|
+
"type": "string"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"drop": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"items": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"probe": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"required": ["ready", "problems", "warnings"],
|
|
36
|
+
"properties": {
|
|
37
|
+
"ready": {
|
|
38
|
+
"type": "boolean"
|
|
39
|
+
},
|
|
40
|
+
"problems": {
|
|
41
|
+
"type": "array",
|
|
42
|
+
"items": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"warnings": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"items": {
|
|
49
|
+
"type": "string"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"configureOnly": {
|
|
55
|
+
"type": "boolean"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"confirmToken": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"pattern": "^[A-Za-z0-9_-]{16,128}$"
|
|
62
|
+
},
|
|
63
|
+
"expiresAt": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"format": "date-time"
|
|
66
|
+
},
|
|
67
|
+
"enabled": {
|
|
68
|
+
"type": "boolean"
|
|
69
|
+
},
|
|
70
|
+
"scheduled": {
|
|
71
|
+
"type": "boolean"
|
|
72
|
+
},
|
|
73
|
+
"awake": {
|
|
74
|
+
"type": ["boolean", "null"]
|
|
75
|
+
},
|
|
76
|
+
"repos": {
|
|
77
|
+
"type": "array",
|
|
78
|
+
"items": {
|
|
79
|
+
"type": "string"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"dropped": {
|
|
83
|
+
"type": "array",
|
|
84
|
+
"items": {
|
|
85
|
+
"type": "string"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"probe": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"additionalProperties": false,
|
|
91
|
+
"required": ["ready", "problems", "warnings"],
|
|
92
|
+
"properties": {
|
|
93
|
+
"ready": {
|
|
94
|
+
"type": "boolean"
|
|
95
|
+
},
|
|
96
|
+
"problems": {
|
|
97
|
+
"type": "array",
|
|
98
|
+
"items": {
|
|
99
|
+
"type": "string"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"warnings": {
|
|
103
|
+
"type": "array",
|
|
104
|
+
"items": {
|
|
105
|
+
"type": "string"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -47,13 +47,43 @@
|
|
|
47
47
|
"confirm-mismatch",
|
|
48
48
|
"unattended-profile-missing",
|
|
49
49
|
"workspace-not-trusted",
|
|
50
|
+
"no-selection",
|
|
51
|
+
"repo-not-configured",
|
|
52
|
+
"invalid-config",
|
|
53
|
+
"not-installed",
|
|
54
|
+
"repo-ambiguous",
|
|
55
|
+
"unreadable-settings",
|
|
56
|
+
"not-removable",
|
|
57
|
+
"not-steerable",
|
|
58
|
+
"too-many-streams",
|
|
59
|
+
"no-review",
|
|
60
|
+
"upstream-failed",
|
|
61
|
+
"tool-not-allowed",
|
|
62
|
+
"busy",
|
|
63
|
+
"review-incomplete",
|
|
64
|
+
"host-not-allowed",
|
|
50
65
|
"internal"
|
|
51
66
|
],
|
|
52
67
|
"x-sensitivity": "none"
|
|
53
68
|
},
|
|
54
|
-
"message": {
|
|
55
|
-
|
|
56
|
-
|
|
69
|
+
"message": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"x-sensitivity": "none"
|
|
72
|
+
},
|
|
73
|
+
"errors": {
|
|
74
|
+
"type": "array",
|
|
75
|
+
"items": {
|
|
76
|
+
"type": "string"
|
|
77
|
+
},
|
|
78
|
+
"x-sensitivity": "none"
|
|
79
|
+
},
|
|
80
|
+
"supported": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"items": {
|
|
83
|
+
"type": "integer"
|
|
84
|
+
},
|
|
85
|
+
"x-sensitivity": "none"
|
|
86
|
+
},
|
|
57
87
|
"remedy": {
|
|
58
88
|
"type": "string",
|
|
59
89
|
"x-sensitivity": "none",
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/issue-maturity.schema.json",
|
|
4
|
+
"title": "Issue maturity",
|
|
5
|
+
"description": "What GET /v1/issues/{key}/maturity returns (`work-items.mjs maturity <key>`, from lib/issue-fetcher.sh): the maturity check the pipeline runs before it starts on an issue. key is a Jira key, owner/repo#N or #N. Blockers stop a run; warnings are asked about. Text is redacted.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"contractVersion",
|
|
10
|
+
"key",
|
|
11
|
+
"kind",
|
|
12
|
+
"title",
|
|
13
|
+
"type",
|
|
14
|
+
"status",
|
|
15
|
+
"maturity",
|
|
16
|
+
"description"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"contractVersion": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "^1\\.[0-9]+\\.[0-9]+$",
|
|
22
|
+
"x-sensitivity": "none"
|
|
23
|
+
},
|
|
24
|
+
"key": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"kind": {
|
|
28
|
+
"enum": ["jira", "github", "freetext"]
|
|
29
|
+
},
|
|
30
|
+
"title": {
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
"type": {
|
|
34
|
+
"type": ["string", "null"]
|
|
35
|
+
},
|
|
36
|
+
"status": {
|
|
37
|
+
"type": ["string", "null"]
|
|
38
|
+
},
|
|
39
|
+
"maturity": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"additionalProperties": false,
|
|
42
|
+
"required": ["score", "blockers", "warnings", "summary"],
|
|
43
|
+
"properties": {
|
|
44
|
+
"score": {
|
|
45
|
+
"type": ["number", "null"]
|
|
46
|
+
},
|
|
47
|
+
"blockers": {
|
|
48
|
+
"type": "array",
|
|
49
|
+
"items": {
|
|
50
|
+
"type": "string"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"warnings": {
|
|
54
|
+
"type": "array",
|
|
55
|
+
"items": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"summary": {
|
|
60
|
+
"type": ["string", "null"]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"description": {
|
|
65
|
+
"type": ["string", "null"]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/ledger.schema.json",
|
|
4
|
+
"title": "Office ledger",
|
|
5
|
+
"description": "What GET /v1/ledger returns and `office-ledger.mjs --json` prints: tokens and estimated USD for today, this week (from Monday) and this month, in local time, broken down by run, repository, model and phase. A run's numbers come from its tracker-state.json when the tracker carries tokens, else from the usage records of the transcripts tied to it; a run with neither is not-measured, and its usd and tokens are null, never 0. Sessions no run claims are counted apart as outside the pipeline. Prices come from cost-table.json; a cache write is priced at 1.25 times input. Every amount names its source.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["contractVersion", "generatedAt", "prices", "windows"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"contractVersion": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"pattern": "^1\\.[0-9]+\\.[0-9]+$",
|
|
13
|
+
"x-sensitivity": "none"
|
|
14
|
+
},
|
|
15
|
+
"generatedAt": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"format": "date-time",
|
|
18
|
+
"x-sensitivity": "none"
|
|
19
|
+
},
|
|
20
|
+
"prices": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": ["table", "verifiedAt", "ageDays", "stale", "warning"],
|
|
24
|
+
"x-sensitivity": "none",
|
|
25
|
+
"properties": {
|
|
26
|
+
"table": {
|
|
27
|
+
"const": "cost-table.json"
|
|
28
|
+
},
|
|
29
|
+
"verifiedAt": {
|
|
30
|
+
"type": ["string", "null"]
|
|
31
|
+
},
|
|
32
|
+
"ageDays": {
|
|
33
|
+
"type": ["integer", "null"]
|
|
34
|
+
},
|
|
35
|
+
"stale": {
|
|
36
|
+
"type": "boolean"
|
|
37
|
+
},
|
|
38
|
+
"warning": {
|
|
39
|
+
"type": ["string", "null"]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"windows": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"required": ["today", "week", "month"],
|
|
47
|
+
"x-sensitivity": "none",
|
|
48
|
+
"properties": {
|
|
49
|
+
"today": {
|
|
50
|
+
"$ref": "#/$defs/window"
|
|
51
|
+
},
|
|
52
|
+
"week": {
|
|
53
|
+
"$ref": "#/$defs/window"
|
|
54
|
+
},
|
|
55
|
+
"month": {
|
|
56
|
+
"$ref": "#/$defs/window"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"$defs": {
|
|
62
|
+
"source": {
|
|
63
|
+
"enum": ["tracker-state", "transcript", "mixed", "not-measured"],
|
|
64
|
+
"description": "tracker-state: the pipeline's own ledger; transcript: derived from the host's usage records; mixed: a sum of both kinds; not-measured: nothing could be read, so the numbers are null."
|
|
65
|
+
},
|
|
66
|
+
"tokens": {
|
|
67
|
+
"oneOf": [
|
|
68
|
+
{
|
|
69
|
+
"type": "object",
|
|
70
|
+
"additionalProperties": false,
|
|
71
|
+
"required": ["in", "out", "cacheRead", "cacheWrite"],
|
|
72
|
+
"properties": {
|
|
73
|
+
"in": {
|
|
74
|
+
"type": "integer",
|
|
75
|
+
"minimum": 0
|
|
76
|
+
},
|
|
77
|
+
"out": {
|
|
78
|
+
"type": "integer",
|
|
79
|
+
"minimum": 0
|
|
80
|
+
},
|
|
81
|
+
"cacheRead": {
|
|
82
|
+
"type": "integer",
|
|
83
|
+
"minimum": 0
|
|
84
|
+
},
|
|
85
|
+
"cacheWrite": {
|
|
86
|
+
"type": "integer",
|
|
87
|
+
"minimum": 0
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"type": "null"
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
"amount": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"additionalProperties": false,
|
|
99
|
+
"required": ["tokens", "usd", "source", "unpriced"],
|
|
100
|
+
"properties": {
|
|
101
|
+
"tokens": {
|
|
102
|
+
"$ref": "#/$defs/tokens"
|
|
103
|
+
},
|
|
104
|
+
"usd": {
|
|
105
|
+
"type": ["number", "null"]
|
|
106
|
+
},
|
|
107
|
+
"source": {
|
|
108
|
+
"$ref": "#/$defs/source"
|
|
109
|
+
},
|
|
110
|
+
"unpriced": {
|
|
111
|
+
"type": "integer",
|
|
112
|
+
"minimum": 0,
|
|
113
|
+
"description": "Usage records whose model has no price; their tokens are counted, their cost is not."
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"row": {
|
|
118
|
+
"type": "object",
|
|
119
|
+
"additionalProperties": false,
|
|
120
|
+
"required": ["key", "tokens", "usd", "source", "unpriced"],
|
|
121
|
+
"properties": {
|
|
122
|
+
"key": {
|
|
123
|
+
"type": "string"
|
|
124
|
+
},
|
|
125
|
+
"repo": {
|
|
126
|
+
"type": ["string", "null"],
|
|
127
|
+
"description": "On byRun rows: the run repository."
|
|
128
|
+
},
|
|
129
|
+
"tokens": {
|
|
130
|
+
"$ref": "#/$defs/tokens"
|
|
131
|
+
},
|
|
132
|
+
"usd": {
|
|
133
|
+
"type": ["number", "null"]
|
|
134
|
+
},
|
|
135
|
+
"source": {
|
|
136
|
+
"$ref": "#/$defs/source"
|
|
137
|
+
},
|
|
138
|
+
"unpriced": {
|
|
139
|
+
"type": "integer",
|
|
140
|
+
"minimum": 0
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"window": {
|
|
145
|
+
"type": "object",
|
|
146
|
+
"additionalProperties": false,
|
|
147
|
+
"required": [
|
|
148
|
+
"since",
|
|
149
|
+
"total",
|
|
150
|
+
"outsidePipeline",
|
|
151
|
+
"notMeasured",
|
|
152
|
+
"byRun",
|
|
153
|
+
"byRepo",
|
|
154
|
+
"byModel",
|
|
155
|
+
"byPhase"
|
|
156
|
+
],
|
|
157
|
+
"properties": {
|
|
158
|
+
"since": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"format": "date-time"
|
|
161
|
+
},
|
|
162
|
+
"total": {
|
|
163
|
+
"$ref": "#/$defs/amount"
|
|
164
|
+
},
|
|
165
|
+
"outsidePipeline": {
|
|
166
|
+
"$ref": "#/$defs/amount"
|
|
167
|
+
},
|
|
168
|
+
"notMeasured": {
|
|
169
|
+
"type": "array",
|
|
170
|
+
"items": {
|
|
171
|
+
"type": "string"
|
|
172
|
+
},
|
|
173
|
+
"description": "Task ids of runs active in the window whose cost could not be measured."
|
|
174
|
+
},
|
|
175
|
+
"byRun": {
|
|
176
|
+
"type": "array",
|
|
177
|
+
"items": {
|
|
178
|
+
"$ref": "#/$defs/row"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"byRepo": {
|
|
182
|
+
"type": "array",
|
|
183
|
+
"items": {
|
|
184
|
+
"$ref": "#/$defs/row"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"byModel": {
|
|
188
|
+
"type": "array",
|
|
189
|
+
"items": {
|
|
190
|
+
"$ref": "#/$defs/row"
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"byPhase": {
|
|
194
|
+
"type": "array",
|
|
195
|
+
"items": {
|
|
196
|
+
"$ref": "#/$defs/row"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/permissions.schema.json",
|
|
4
|
+
"title": "Pending permission prompts",
|
|
5
|
+
"description": "What GET /v1/permissions returns: the host permission prompts waiting on the user. available is false while the host records none where another process can read them; requests is then empty and reason says so. When available, each request names its session, the tool and a redacted summary.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["contractVersion", "available", "reason", "requests"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"contractVersion": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"pattern": "^1\\.[0-9]+\\.[0-9]+$",
|
|
13
|
+
"x-sensitivity": "none"
|
|
14
|
+
},
|
|
15
|
+
"available": {
|
|
16
|
+
"type": "boolean"
|
|
17
|
+
},
|
|
18
|
+
"reason": {
|
|
19
|
+
"type": ["string", "null"]
|
|
20
|
+
},
|
|
21
|
+
"requests": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"items": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"additionalProperties": false,
|
|
26
|
+
"required": ["id", "sessionId", "tool", "summary", "at"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"id": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"sessionId": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
},
|
|
34
|
+
"tool": {
|
|
35
|
+
"type": "string"
|
|
36
|
+
},
|
|
37
|
+
"summary": {
|
|
38
|
+
"type": "string"
|
|
39
|
+
},
|
|
40
|
+
"at": {
|
|
41
|
+
"type": "string"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/phases.json",
|
|
4
|
-
"description": "The phase contract, in one place: the phase ids and names, which phases each mode runs, the per-phase token ceilings and the phase numbers other code compares against. gen-mode-dispatch.mjs, render-work-summary.sh, the autopilot runner, runs-index.mjs, usage-report.mjs and gen-facts.mjs read it; smoke-phase-contract.sh holds every copy that cannot read it (the phase docs and prose counts, agent-state.schema.json, token-budget.json, phase-tracker.sh, phase-banner.sh, gc-abandoned.sh) to it. Adding or merging a phase means editing here. Ceilings are measured against the current phase documents, never summed from earlier ones: smoke-token-budget.sh fails a ceiling more than 25% above the measurement.",
|
|
4
|
+
"description": "The phase contract, in one place: the phase ids and names, which phases each mode runs, the per-phase token ceilings and the phase numbers other code compares against. gen-mode-dispatch.mjs, render-work-summary.sh, the autopilot runner, runs-index.mjs, usage-report.mjs and gen-facts.mjs read it; smoke-phase-contract.sh holds every copy that cannot read it (the phase docs and prose counts, agent-state.schema.json, token-budget.json, phase-tracker.sh, phase-banner.sh, gc-abandoned.sh) to it. Adding or merging a phase means editing here. A mode with `commits: false` delivers no commit in its Phase 4 (analysis publishes a document), so lib/run-completion.mjs asks it for no commit evidence before `status: complete`; any other mode commits. Ceilings are measured against the current phase documents, never summed from earlier ones: smoke-token-budget.sh fails a ceiling more than 25% above the measurement.",
|
|
5
5
|
"contractVersion": "2.0.0",
|
|
6
6
|
"phaseSchema": 2,
|
|
7
7
|
"phaseSchemaNote": "The phase vocabulary generation. metrics.jsonl is append-only and v19.0.0 renumbered the phases, so every line written from v19.0.0 on carries this number and a line without the field is generation 1. Aggregators pick their name table from it; without it phase 3 means Dev in old rows and Review in new ones and no reader can tell them apart.",
|
|
@@ -72,7 +72,8 @@
|
|
|
72
72
|
},
|
|
73
73
|
"analysis": {
|
|
74
74
|
"phases": [0, 1, 3, 4, 5],
|
|
75
|
-
"autopilot": false
|
|
75
|
+
"autopilot": false,
|
|
76
|
+
"commits": false
|
|
76
77
|
}
|
|
77
78
|
},
|
|
78
79
|
"thresholds": {
|
|
@@ -50,7 +50,11 @@
|
|
|
50
50
|
"items": { "type": "integer", "minimum": 0 },
|
|
51
51
|
"uniqueItems": true
|
|
52
52
|
},
|
|
53
|
-
"autopilot": { "type": "boolean" }
|
|
53
|
+
"autopilot": { "type": "boolean" },
|
|
54
|
+
"commits": {
|
|
55
|
+
"type": "boolean",
|
|
56
|
+
"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."
|
|
57
|
+
}
|
|
54
58
|
}
|
|
55
59
|
}
|
|
56
60
|
},
|