@mmerterden/multi-agent-pipeline 20.43.0 → 20.44.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 +34 -0
- package/README.md +19 -3
- package/README.tr.md +19 -4
- package/docs/ecosystem.md +7 -7
- package/docs/facts.json +8 -8
- package/docs/features.md +1 -1
- package/manifest.json +58 -48
- package/package.json +1 -1
- package/pipeline/commands/multi-agent/review-priority/SKILL.md +10 -5
- package/pipeline/commands/multi-agent/setup/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/update/SKILL.md +18 -7
- package/pipeline/contract/CHANGELOG.md +43 -3
- package/pipeline/contract/README.md +65 -63
- 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 +41 -4
- package/pipeline/contract/types/index.d.ts +112 -3
- package/pipeline/multi-agent-refs/features/office-remote-protocol.md +4 -2
- package/pipeline/multi-agent-refs/features/office-threat-model.md +3 -1
- package/pipeline/multi-agent-refs/features/usage-reporting.md +48 -7
- package/pipeline/multi-agent-refs/help/en.md +1 -1
- package/pipeline/multi-agent-refs/help/tr.md +1 -1
- package/pipeline/office/index.html +434 -28
- package/pipeline/office/toolkit.json +1 -1
- package/pipeline/rules/outside-the-pipeline.md +1 -1
- package/pipeline/schemas/contract-error.schema.json +2 -1
- package/pipeline/schemas/disk-clean-request.schema.json +66 -0
- package/pipeline/schemas/disk-clean.schema.json +243 -0
- package/pipeline/schemas/office-jobs.json +25 -0
- package/pipeline/schemas/office-jobs.schema.json +19 -0
- package/pipeline/schemas/skill-catalog.schema.json +91 -0
- package/pipeline/schemas/toolkit-path-params.json +23 -1
- package/pipeline/scripts/_contract-core.mjs +1 -1
- package/pipeline/scripts/_contract-routes-catalog.mjs +31 -3
- package/pipeline/scripts/_contract-routes-ops.mjs +11 -1
- package/pipeline/scripts/_stack-routing.mjs +2 -0
- package/pipeline/scripts/contract-server.mjs +4 -0
- package/pipeline/scripts/job-launch.mjs +50 -9
- package/pipeline/scripts/office-disk.mjs +262 -0
- package/pipeline/scripts/skill-catalog.mjs +302 -0
- package/pipeline/scripts/stack-toggle.mjs +104 -41
- package/pipeline/scripts/usage-register.mjs +86 -9
- package/pipeline/skills/.skill-manifest.json +13 -5
- package/pipeline/skills/.skills-index.json +23 -1
- package/pipeline/skills/shared/README.md +5 -3
- package/pipeline/skills/shared/core/multi-agent-review-priority/SKILL.md +3 -2
- package/pipeline/skills/shared/core/multi-agent-setup/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-update/SKILL.md +11 -5
- package/pipeline/skills/shared/external/release-video/SKILL.md +147 -0
- package/pipeline/skills/shared/external/release-video/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/short-video-craft/SKILL.md +177 -0
- package/pipeline/skills/shared/external/short-video-craft/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/short-video-craft/references/generated-defaults.md +24 -0
- package/pipeline/skills/skills-index.md +3 -1
|
@@ -4,14 +4,14 @@ What a client (the macOS toolbox, a web page, a script) needs to read the
|
|
|
4
4
|
pipeline's state and start or answer a run without a terminal conversation.
|
|
5
5
|
Nothing in here is a UI and nothing here runs on its own.
|
|
6
6
|
|
|
7
|
-
| File
|
|
8
|
-
|
|
9
|
-
| `manifest.json`
|
|
10
|
-
| `../schemas/*.schema.json` | The schemas. The kit points at them; it never copies them.
|
|
11
|
-
| `types/index.d.ts`
|
|
12
|
-
| `fixtures/*.json`
|
|
13
|
-
| `frozen/toolbox.json`
|
|
14
|
-
| `CHANGELOG.md`
|
|
7
|
+
| File | What it is |
|
|
8
|
+
| -------------------------- | ----------------------------------------------------------------------------------- |
|
|
9
|
+
| `manifest.json` | Every surface: its CLI invocation, its HTTP route, its schema and version. |
|
|
10
|
+
| `../schemas/*.schema.json` | The schemas. The kit points at them; it never copies them. |
|
|
11
|
+
| `types/index.d.ts` | TypeScript declarations generated from those schemas by `build.mjs`. |
|
|
12
|
+
| `fixtures/*.json` | Real producer output for every state a client renders, generated by `build.mjs`. |
|
|
13
|
+
| `frozen/toolbox.json` | The fields the macOS toolbox decodes today, held by `test/toolbox-compat.test.mjs`. |
|
|
14
|
+
| `CHANGELOG.md` | What changed in the contract, by contract version. |
|
|
15
15
|
|
|
16
16
|
`node pipeline/contract/build.mjs --write` regenerates the types and fixtures;
|
|
17
17
|
`--check` fails on drift. `npm pack` runs `--write` first, so a published kit
|
|
@@ -33,55 +33,57 @@ same bytes (`test/contract-parity.test.mjs`):
|
|
|
33
33
|
or by the client itself. Routes are in `manifest.json`; `?redact=1` is
|
|
34
34
|
`--redact`.
|
|
35
35
|
|
|
36
|
-
| Surface
|
|
37
|
-
|
|
38
|
-
| Runs
|
|
39
|
-
| One run
|
|
40
|
-
| Commands
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
| Launch
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
| Start
|
|
51
|
-
|
|
|
52
|
-
|
|
|
53
|
-
|
|
|
54
|
-
|
|
|
55
|
-
|
|
|
56
|
-
|
|
|
57
|
-
| Autopilot
|
|
58
|
-
| Autopilot
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
|
|
|
83
|
-
|
|
|
84
|
-
|
|
|
36
|
+
| Surface | CLI | HTTP |
|
|
37
|
+
| ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
|
|
38
|
+
| Runs | `runs-index.mjs --json [--group G] [--redact]` | `GET /v1/runs` |
|
|
39
|
+
| One run | `runs-index.mjs --json --task-id ID` | `GET /v1/runs/{id}` |
|
|
40
|
+
| Commands | `commands.mjs --json` | `GET /v1/commands` |
|
|
41
|
+
| Skill catalog: commands, plugin skills, routines (local only) | `skill-catalog.mjs --json [--repo P]` | `GET /v1/skills` |
|
|
42
|
+
| Run questions | `launch-request.mjs questions` | `GET /v1/questions` |
|
|
43
|
+
| Assigned issues | `issues.mjs --json [--source S] [--project K] [--max N]` | `GET /v1/issues` |
|
|
44
|
+
| Worktrees | `worktrees.mjs --json [--measure] [--redact]` | `GET /v1/worktrees` |
|
|
45
|
+
| Launch shape | `launch-request.mjs spec` | `GET /v1/launch-spec` |
|
|
46
|
+
| Launch repositories | `launch-request.mjs repos [--redact] [--all]` | `GET /v1/repos[?all=1]` |
|
|
47
|
+
| Add a launch repository (two steps; the route also requires a git checkout) | `launch-request.mjs register-repo <path>` | `POST /v1/repos` |
|
|
48
|
+
| Remove a registered repository (two steps) | - | `DELETE /v1/repos/{id}` |
|
|
49
|
+
| Office jobs | `job-launch.mjs list` | `GET /v1/jobs` |
|
|
50
|
+
| Start an office job (two steps) | - | `POST /v1/jobs` |
|
|
51
|
+
| Start a run | write the request file, then `launch-request.mjs plan FILE --repo P --session-id U [--channel phone]` | `POST /v1/launch?repo=P` |
|
|
52
|
+
| Answer a question | `answer-question.mjs STATE --question Q --answer IDS` | `POST /v1/runs/{id}/answer` |
|
|
53
|
+
| A run's log | `run-log.mjs ID [--tail N]` (1-2000, default 200) | `GET /v1/runs/{id}/log?tail=N` |
|
|
54
|
+
| Resume a run | `launch-request.mjs resume --task-id ID --repo P --session-id U [--autopilot]` | `POST /v1/runs/{id}/resume` |
|
|
55
|
+
| Kill a run (two steps) | `run-kill.mjs preview ID`, then `run-kill.mjs apply ID` | `POST /v1/runs/{id}/kill` |
|
|
56
|
+
| Garbage-collect (two steps) | `gc-plan.mjs preview [--scope S,...]`, then `gc-plan.mjs apply < items` | `POST /v1/gc` |
|
|
57
|
+
| Autopilot status | `autopilot-control.mjs status` | `GET /v1/autopilot` |
|
|
58
|
+
| Autopilot off | `autopilot-control.mjs off [--now]` | `POST /v1/autopilot/off` |
|
|
59
|
+
| Autopilot on (two steps) | `autopilot-control.mjs on-preview --repo R...`, then `on --repo R... [--configure-only]` | `POST /v1/autopilot/on` |
|
|
60
|
+
| Steer a run (two steps on the server) | `steer-run.mjs STATE --text T` | `POST /v1/runs/{id}/steer` |
|
|
61
|
+
| Agent activity | `activity-snapshot.mjs --json` | `GET /v1/activity`, `GET /v1/activity/stream` (SSE) |
|
|
62
|
+
| An agent's chat | `activity-snapshot.mjs chat SESSION [AGENT] [--before N] [--limit N]` | `GET /v1/agents/{sessionId}/{agentId}/chat` |
|
|
63
|
+
| Cost ledger | `office-ledger.mjs --json` | `GET /v1/ledger` |
|
|
64
|
+
| Machine resources | `system-status.mjs --json` | `GET /v1/system` |
|
|
65
|
+
| Key cabinet (names and verdicts, never values) | `office-credentials.mjs --json [--probe]` | `GET /v1/credentials` |
|
|
66
|
+
| Institutional memory | `office-memory.mjs --json` | `GET /v1/memory` |
|
|
67
|
+
| Server room: sessions, today per model, health lights (local only) | `office-server-room.mjs --json` | `GET /v1/server-room` |
|
|
68
|
+
| Memory archive: decisions, security notes, learnings, graph report (local only) | `office-archive.mjs --json` | `GET /v1/archive` |
|
|
69
|
+
| Prune old run logs (two steps) | `office-prune.mjs preview\|apply N --json` | `POST /v1/prune-logs` |
|
|
70
|
+
| Disk space: measure, then the ticked categories (two steps, local only) | `disk-cleaner.mjs --dry-run\|--apply --json [--only=ids]` | `POST /v1/disk-clean` |
|
|
71
|
+
| Office settings | `office-settings.mjs --json` | `GET /v1/settings` |
|
|
72
|
+
| Change one setting (two steps) | `office-settings.mjs set SETTING VALUE --json` | `POST /v1/settings` |
|
|
73
|
+
| What a run produced | `run-results.mjs ID --json` | `GET /v1/runs/{id}/results` |
|
|
74
|
+
| One screenshot | `run-results.mjs ID --evidence NAME` | `GET /v1/runs/{id}/evidence/{name}` |
|
|
75
|
+
| Post a review verdict (two steps) | `work-items.mjs verdict ID [--post]` | `POST /v1/runs/{id}/review-verdict` |
|
|
76
|
+
| An issue's maturity | `work-items.mjs maturity KEY` | `GET /v1/issues/{key}/maturity` |
|
|
77
|
+
| Open pull requests | `work-items.mjs prs` | `GET /v1/prs` |
|
|
78
|
+
| How far each open pull request reaches in its repository's graph | `work-items.mjs reach` | `GET /v1/prs/reach` |
|
|
79
|
+
| Toolkit MCP tools | `toolkit-tools.mjs list` | `GET /v1/tools` |
|
|
80
|
+
| Call an allowed toolkit tool (read-only, no location argument) | `toolkit-tools.mjs call NAME JSON` | `POST /v1/tools/{name}/call` |
|
|
81
|
+
| A Confluence page, a Crashlytics issue, a Figma frame | `service-read.mjs confluence\|crashlytics\|figma ...` | `GET /v1/services/{confluence,crashlytics,figma}` |
|
|
82
|
+
| Pending host permission prompts | (none can be read yet) | `GET /v1/permissions` |
|
|
83
|
+
| Routines | `routine-registry.mjs list --json` | `GET /v1/routines` |
|
|
84
|
+
| Remove a routine (two steps) | `routine-registry.mjs remove --name N` | `DELETE /v1/routines/{name}` |
|
|
85
|
+
| A repo's stacks | `stack-toggle.mjs status --repo P --json` | `GET /v1/stack?repo=R` |
|
|
86
|
+
| Set a repo's stacks (two steps) | `stack-toggle.mjs set --repo P STACK... --json` | `POST /v1/stack` |
|
|
85
87
|
|
|
86
88
|
Every surface in `manifest.json` carries `remote` (the scope a remote carrier
|
|
87
89
|
would require: `read`, `answer`, `launch`, or `local-only` for anything that
|
|
@@ -198,12 +200,12 @@ with `phone-devices.mjs add` and signs every request; `manifest.json` `phone`
|
|
|
198
200
|
names the headers, the signed fields, the 60 second window and the scopes, and
|
|
199
201
|
`phone-signed-request.schema.json` describes the signed text.
|
|
200
202
|
|
|
201
|
-
| Surface
|
|
202
|
-
|
|
203
|
-
| Runs, redacted
|
|
204
|
-
| One run, redacted
|
|
205
|
-
| Answer a question
|
|
206
|
-
| Queue a launch (off until `phone-devices.mjs launch on`) | `launch` | `POST /v1/phone/launch?repo=P`
|
|
203
|
+
| Surface | Scope | HTTP |
|
|
204
|
+
| -------------------------------------------------------- | -------- | --------------------------------- |
|
|
205
|
+
| Runs, redacted | `read` | `GET /v1/phone/runs` |
|
|
206
|
+
| One run, redacted | `read` | `GET /v1/phone/runs/{id}` |
|
|
207
|
+
| Answer a question | `answer` | `POST /v1/phone/runs/{id}/answer` |
|
|
208
|
+
| Queue a launch (off until `phone-devices.mjs launch on`) | `launch` | `POST /v1/phone/launch?repo=P` |
|
|
207
209
|
|
|
208
210
|
The bearer token does not open these routes and a signature opens no other
|
|
209
211
|
route. Responses are always redacted; `redact=0` is refused. There is no pause,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"contractVersion": "1.
|
|
2
|
+
"contractVersion": "1.12.0",
|
|
3
3
|
"supportedMajors": [1],
|
|
4
4
|
"description": "The pipeline's client contract: every surface a client reads or writes, the CLI invocation and the HTTP route that carry it, and the schema its JSON follows. Schemas are not copied here; schemasDir points at the one tree the producers validate against. Paths in cli are relative to the pipeline directory (installed: ~/.claude).",
|
|
5
5
|
"schemasDir": "../schemas",
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"schemas": [
|
|
55
55
|
"runs-index.schema.json",
|
|
56
56
|
"command-parameters.schema.json",
|
|
57
|
+
"skill-catalog.schema.json",
|
|
57
58
|
"run-questions.schema.json",
|
|
58
59
|
"issues.schema.json",
|
|
59
60
|
"worktrees.schema.json",
|
|
@@ -98,6 +99,8 @@
|
|
|
98
99
|
"office-archive.schema.json",
|
|
99
100
|
"prune-logs.schema.json",
|
|
100
101
|
"prune-logs-request.schema.json",
|
|
102
|
+
"disk-clean.schema.json",
|
|
103
|
+
"disk-clean-request.schema.json",
|
|
101
104
|
"run-results.schema.json",
|
|
102
105
|
"run-evidence.schema.json",
|
|
103
106
|
"issue-maturity.schema.json",
|
|
@@ -148,6 +151,18 @@
|
|
|
148
151
|
"remote": "read",
|
|
149
152
|
"risk": "read"
|
|
150
153
|
},
|
|
154
|
+
{
|
|
155
|
+
"id": "skills",
|
|
156
|
+
"method": "GET",
|
|
157
|
+
"path": "/v1/skills",
|
|
158
|
+
"query": ["repo"],
|
|
159
|
+
"cli": ["node", "scripts/skill-catalog.mjs", "--json", "[--repo <path>]"],
|
|
160
|
+
"schema": "skill-catalog.schema.json",
|
|
161
|
+
"version": "1.0.0",
|
|
162
|
+
"note": "Every /multi-agent command, marketplace plugin skill and saved routine with both frontmatter descriptions. repo is a name from GET /v1/repos or its path, and only decides which plugin skills are enabled. Local only: it names the routines and local-only commands kept on this machine.",
|
|
163
|
+
"remote": "local-only",
|
|
164
|
+
"risk": "read"
|
|
165
|
+
},
|
|
151
166
|
{
|
|
152
167
|
"id": "questions",
|
|
153
168
|
"method": "GET",
|
|
@@ -553,8 +568,8 @@
|
|
|
553
568
|
"query": [],
|
|
554
569
|
"cli": ["node", "scripts/job-launch.mjs", "list"],
|
|
555
570
|
"schema": "office-jobs.schema.json",
|
|
556
|
-
"version": "1.
|
|
557
|
-
"note": "The jobs the office can hand to someone: the command, the role that does it, team or solo, typed parameters and what it writes outside the machine; available is false when the command is not installed here.",
|
|
571
|
+
"version": "1.1.0",
|
|
572
|
+
"note": "The jobs the office can hand to someone: the command, the role that does it, team or solo, typed parameters and what it writes outside the machine; available is false when the command is not installed here. An enum with choices has its values read on this machine (review-priority: the teams whose rule file parses, and per team its presets in valuesFor).",
|
|
558
573
|
"remote": "read",
|
|
559
574
|
"risk": "read"
|
|
560
575
|
},
|
|
@@ -565,7 +580,7 @@
|
|
|
565
580
|
"query": [],
|
|
566
581
|
"body": "job-request.schema.json",
|
|
567
582
|
"schema": "job-change.schema.json",
|
|
568
|
-
"version": "1.
|
|
583
|
+
"version": "1.1.0",
|
|
569
584
|
"note": "Two steps: the preview names the role, repository, exact prompt and what the job writes; the confirmation re-checks that the repository is allowed and starts it with claude --bg under the unattended profile after the workspace trust, agent-guard registration and sandbox checks; claude's own output stays in the server's log. A team job is refused while a run is live in that repository. Never reachable from a phone.",
|
|
570
585
|
"remote": "local-only",
|
|
571
586
|
"risk": "high"
|
|
@@ -640,6 +655,28 @@
|
|
|
640
655
|
"risk": "high",
|
|
641
656
|
"note": "Two steps: the preview lists the task log folders older than 7, 30 or 90 days; the confirmation lists them again, refuses with 409 changed when they differ, and prunes only that list (prune-logs.sh --only-from). The audit trail, metrics and counters are never removed; a folder written in the last minutes and a run that can still be resumed are spared."
|
|
642
657
|
},
|
|
658
|
+
{
|
|
659
|
+
"id": "disk-clean",
|
|
660
|
+
"method": "POST",
|
|
661
|
+
"path": "/v1/disk-clean",
|
|
662
|
+
"query": [],
|
|
663
|
+
"body": "disk-clean-request.schema.json",
|
|
664
|
+
"cli": [
|
|
665
|
+
"node",
|
|
666
|
+
"scripts/disk-cleaner.mjs",
|
|
667
|
+
"--dry-run|--apply",
|
|
668
|
+
"--json",
|
|
669
|
+
"--top=5",
|
|
670
|
+
"[--only=<ids>]",
|
|
671
|
+
"[--trash]",
|
|
672
|
+
"[--transcripts]"
|
|
673
|
+
],
|
|
674
|
+
"schema": "disk-clean.schema.json",
|
|
675
|
+
"version": "1.0.0",
|
|
676
|
+
"remote": "local-only",
|
|
677
|
+
"risk": "high",
|
|
678
|
+
"note": "Three bodies. {} measures (the disk cleaner's dry run with both opt-ins, no token). {categories} previews exactly those categories, each from the cleaner's allow-list, and returns a token bound to them; trash and transcripts also need their own flag as true. {confirmToken} applies the previewed categories and nothing else. An unattended server measures its unattended set and refuses a preview and an apply with 409 unattended-refused. Paths are real paths on this machine."
|
|
679
|
+
},
|
|
643
680
|
{
|
|
644
681
|
"id": "settings",
|
|
645
682
|
"method": "GET",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Generated by pipeline/contract/build.mjs from pipeline/schemas/*.schema.json.
|
|
2
2
|
// Do not edit: change the schema and run `node pipeline/contract/build.mjs --write`.
|
|
3
3
|
|
|
4
|
-
export type ContractVersion = "1.
|
|
5
|
-
export type SurfaceId = "runs" | "run" | "commands" | "questions" | "issues" | "worktrees" | "launch-spec" | "repos" | "repo-add" | "repo-remove" | "launch" | "answer" | "run-log" | "resume" | "kill" | "gc" | "autopilot" | "autopilot-off" | "phone-runs" | "phone-run" | "phone-answer" | "phone-launch" | "autopilot-on" | "steer" | "activity" | "activity-stream" | "agent-chat" | "routines" | "routine-delete" | "jobs" | "job-start" | "stack" | "stack-set" | "ledger" | "system" | "prune-logs" | "settings" | "settings-set" | "credentials" | "memory" | "server-room" | "archive" | "run-results" | "run-evidence" | "review-verdict" | "issue-maturity" | "prs" | "prs-reach" | "tools" | "tool-call" | "service-confluence" | "service-crashlytics" | "service-figma" | "permissions";
|
|
4
|
+
export type ContractVersion = "1.12.0";
|
|
5
|
+
export type SurfaceId = "runs" | "run" | "commands" | "skills" | "questions" | "issues" | "worktrees" | "launch-spec" | "repos" | "repo-add" | "repo-remove" | "launch" | "answer" | "run-log" | "resume" | "kill" | "gc" | "autopilot" | "autopilot-off" | "phone-runs" | "phone-run" | "phone-answer" | "phone-launch" | "autopilot-on" | "steer" | "activity" | "activity-stream" | "agent-chat" | "routines" | "routine-delete" | "jobs" | "job-start" | "stack" | "stack-set" | "ledger" | "system" | "prune-logs" | "disk-clean" | "settings" | "settings-set" | "credentials" | "memory" | "server-room" | "archive" | "run-results" | "run-evidence" | "review-verdict" | "issue-maturity" | "prs" | "prs-reach" | "tools" | "tool-call" | "service-confluence" | "service-crashlytics" | "service-figma" | "permissions";
|
|
6
6
|
|
|
7
7
|
/** What `runs-index.mjs --json` prints: every run under the log root and the unattended log root (one record per task id), grouped per status/SKILL.md 3b. Fields are only ever added - a decoder ignores keys it does not know. `--redact` drops every x-sensitivity local field (and `logsRoot`) and scrubs the free text in the title, `now`, sub-step names, task subjects and the pending question. */
|
|
8
8
|
export interface RunsIndex {
|
|
@@ -162,6 +162,33 @@ export interface CommandParametersParameter {
|
|
|
162
162
|
enum?: Array<string>;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
+
/** What GET /v1/skills returns (`skill-catalog.mjs --json`): every /multi-agent command, marketplace plugin skill and saved routine a person can invoke, with both frontmatter descriptions. enabled is the plugin's state in the chosen repository's .claude/settings.json or its always-on flag, null for a plugin skill when no repository was chosen, and always true for commands and routines. A source that is missing on this machine is a note, not an error. Routine text is scrubbed. */
|
|
166
|
+
export interface SkillCatalog {
|
|
167
|
+
contractVersion: string;
|
|
168
|
+
/** The repository reference the request named, or null. */
|
|
169
|
+
repo: string | null;
|
|
170
|
+
items: Array<{
|
|
171
|
+
/** kind:name for a command or routine, plugin-skill:plugin:name for a plugin skill. */
|
|
172
|
+
id: string;
|
|
173
|
+
name: string;
|
|
174
|
+
/** What a person types: /multi-agent:<name> for a command or routine, <plugin>:<skill> for a plugin skill. */
|
|
175
|
+
invoke: string;
|
|
176
|
+
kind: "command" | "plugin-skill" | "routine";
|
|
177
|
+
/** The plugin name, pipeline for a shipped command, or local for a routine or a local-only command. */
|
|
178
|
+
source: string;
|
|
179
|
+
description: string;
|
|
180
|
+
descriptionTr: string | null;
|
|
181
|
+
enabled: boolean | null;
|
|
182
|
+
alwaysOn: boolean;
|
|
183
|
+
localOnly: boolean;
|
|
184
|
+
}>;
|
|
185
|
+
notes: Array<{
|
|
186
|
+
section: "command" | "plugin-skill" | "routine";
|
|
187
|
+
/** no-tree: no command tree; no-clone: no marketplace clone; no-manifest: the clone has no readable marketplace.json; unreadable: the routine registry could not be read. */
|
|
188
|
+
code: "no-tree" | "no-clone" | "no-manifest" | "unreadable";
|
|
189
|
+
}>;
|
|
190
|
+
}
|
|
191
|
+
|
|
165
192
|
/** Shape of run-questions.json: the Phase 0 pickers of a /multi-agent run as data. Every field is x-sensitivity none - the file ships with the package and describes questions, never a machine's answers. */
|
|
166
193
|
export interface RunQuestions {
|
|
167
194
|
contractVersion: string;
|
|
@@ -577,6 +604,16 @@ export interface OfficeJobs {
|
|
|
577
604
|
name: string;
|
|
578
605
|
kind: "work-item" | "pull-request" | "branch" | "run-id" | "jira-key" | "github-issue" | "enum" | "repo-path";
|
|
579
606
|
values?: Array<string>;
|
|
607
|
+
/** Where GET /v1/jobs reads an enum's values from on this machine; the catalog itself lists none. */
|
|
608
|
+
choices?: "review-priority-teams" | "review-priority-presets";
|
|
609
|
+
/** The parameter whose value narrows this one's choices (valuesFor). */
|
|
610
|
+
dependsOn?: string;
|
|
611
|
+
/** Filled by GET /v1/jobs: the allowed values per value of dependsOn. */
|
|
612
|
+
valuesFor?: {
|
|
613
|
+
[key: string]: Array<string>;
|
|
614
|
+
};
|
|
615
|
+
/** Written before the value in the command line, as in preset=<id>. */
|
|
616
|
+
prefix?: string;
|
|
580
617
|
required: boolean;
|
|
581
618
|
}>;
|
|
582
619
|
writes: "none" | "branch" | "branch-pr" | "pr-comments" | "issue-comment";
|
|
@@ -1278,6 +1315,78 @@ export interface PruneLogsRequest {
|
|
|
1278
1315
|
confirmToken?: string;
|
|
1279
1316
|
}
|
|
1280
1317
|
|
|
1318
|
+
/** What POST /v1/disk-clean returns: the disk cleaner's report per category for a measure, a preview (with a confirm token) or an apply. Paths are real paths on this machine, so the route is local-only. */
|
|
1319
|
+
export interface DiskClean {
|
|
1320
|
+
contractVersion: string;
|
|
1321
|
+
mode: "measure" | "preview" | "applied";
|
|
1322
|
+
/** The server runs unattended: it measures the cleaner's unattended set only and refuses a preview and an apply. */
|
|
1323
|
+
unattended: boolean;
|
|
1324
|
+
disk: {
|
|
1325
|
+
freeBytes: number | null;
|
|
1326
|
+
totalBytes: number | null;
|
|
1327
|
+
/** Free space now plus reclaimableBytes. */
|
|
1328
|
+
expectedFreeBytes: number | null;
|
|
1329
|
+
/** Free space measured after an apply. */
|
|
1330
|
+
afterFreeBytes?: number | null;
|
|
1331
|
+
};
|
|
1332
|
+
/** What an apply of the listed categories would free; a category whose tool is running is measured but left out. */
|
|
1333
|
+
reclaimableBytes: number;
|
|
1334
|
+
categories: Array<{
|
|
1335
|
+
id: "derived-data" | "repo-build" | "xctest-devices" | "xcode-caches" | "archives" | "device-support" | "sim-unavailable" | "sim-caches" | "spm-cache" | "pods-cache" | "gradle-cache" | "js-caches" | "homebrew" | "tmp-builds" | "pipeline-scratch" | "claude-scratch" | "agent-worktrees" | "dev-caches" | "old-logs" | "pipeline-logs" | "ds-store" | "trash" | "transcripts";
|
|
1336
|
+
label: string;
|
|
1337
|
+
items: number;
|
|
1338
|
+
bytes: number;
|
|
1339
|
+
/** The largest items, real paths and sizes. */
|
|
1340
|
+
top: Array<{
|
|
1341
|
+
path: string;
|
|
1342
|
+
bytes: number;
|
|
1343
|
+
}>;
|
|
1344
|
+
more: number;
|
|
1345
|
+
/** How many items were kept, per reason. */
|
|
1346
|
+
kept: {
|
|
1347
|
+
[key: string]: number;
|
|
1348
|
+
};
|
|
1349
|
+
/** Why the category is measured but not applied (its tool is running). */
|
|
1350
|
+
blocked: string | null;
|
|
1351
|
+
note: string | null;
|
|
1352
|
+
/** The cleaner's unattended-safe set. */
|
|
1353
|
+
safe: boolean;
|
|
1354
|
+
/** The request flag this category needs as well as its id. */
|
|
1355
|
+
optIn: "trash" | "transcripts" | null;
|
|
1356
|
+
}>;
|
|
1357
|
+
/** Leftover session processes found; information only, never stopped. */
|
|
1358
|
+
orphans: number;
|
|
1359
|
+
applied?: {
|
|
1360
|
+
removed: number;
|
|
1361
|
+
failed: number;
|
|
1362
|
+
freedBytes: number | null;
|
|
1363
|
+
failures: Array<{
|
|
1364
|
+
category: string;
|
|
1365
|
+
path: string;
|
|
1366
|
+
reason: string;
|
|
1367
|
+
}>;
|
|
1368
|
+
held: Array<{
|
|
1369
|
+
category: string;
|
|
1370
|
+
reason: string;
|
|
1371
|
+
}>;
|
|
1372
|
+
};
|
|
1373
|
+
confirmToken?: string;
|
|
1374
|
+
expiresAt?: string;
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
/** The body of POST /v1/disk-clean. With no other field it measures (the disk cleaner's dry run, no token). With categories it previews exactly those, each one from the cleaner's allow-list, and returns a confirm token; trash and transcripts must also send their own flag as true. Step 2 sends only the confirmToken. */
|
|
1378
|
+
export interface DiskCleanRequest {
|
|
1379
|
+
contractVersion: string;
|
|
1380
|
+
/** The categories to preview, by the disk cleaner's category id (disk-cleaner.mjs --list). */
|
|
1381
|
+
categories?: (Array<"derived-data" | "repo-build" | "xctest-devices" | "xcode-caches" | "archives" | "device-support" | "sim-unavailable" | "sim-caches" | "spm-cache" | "pods-cache" | "gradle-cache" | "js-caches" | "homebrew" | "tmp-builds" | "pipeline-scratch" | "claude-scratch" | "agent-worktrees" | "dev-caches" | "old-logs" | "pipeline-logs" | "ds-store" | "trash" | "transcripts">);
|
|
1382
|
+
/** Required with the trash category: it holds files the user deleted, which cannot be recovered afterwards. */
|
|
1383
|
+
trash?: true;
|
|
1384
|
+
/** Required with the transcripts category: resume and past-session search read them. */
|
|
1385
|
+
transcripts?: true;
|
|
1386
|
+
/** The confirmToken the preview returned. Single use, bound to the route and the previewed categories. */
|
|
1387
|
+
confirmToken?: string;
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1281
1390
|
/** 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. */
|
|
1282
1391
|
export interface RunResults {
|
|
1283
1392
|
contractVersion: string;
|
|
@@ -1497,7 +1606,7 @@ export interface Permissions {
|
|
|
1497
1606
|
/** Every non-2xx body contract-server.mjs sends, on the desktop and the phone routes alike. `error` is a fixed code a client switches on; `message` is for a person and names no path, host or token. `errors` lists schema or rule violations for invalid-body and invalid-request; `supported` lists the majors ?v= accepts for unsupported-version. run-active and not-resumable answer POST /v1/runs/{id}/resume; confirm-expired and confirm-mismatch answer the confirming request of a kill or gc. */
|
|
1498
1607
|
export interface ContractError {
|
|
1499
1608
|
contractVersion: string;
|
|
1500
|
-
error: "unauthorized" | "forbidden-host" | "forbidden-origin" | "not-found" | "method-not-allowed" | "invalid-query" | "unsupported-version" | "unsupported-media-type" | "invalid-body" | "invalid-request" | "no-launch-shape" | "not-waiting" | "wrong-question" | "wrong-arity" | "not-an-option" | "state-moved" | "unsigned" | "unknown-device" | "revoked-device" | "bad-signature" | "stale-request" | "replayed" | "replay-store-full" | "unknown-verb" | "forbidden-scope" | "launch-disabled" | "repo-not-allowed" | "run-active" | "not-resumable" | "confirm-expired" | "confirm-mismatch" | "unattended-profile-missing" | "workspace-not-trusted" | "no-selection" | "repo-not-configured" | "invalid-config" | "not-installed" | "repo-ambiguous" | "unreadable-settings" | "not-removable" | "not-steerable" | "too-many-streams" | "no-review" | "upstream-failed" | "tool-not-allowed" | "busy" | "review-incomplete" | "host-not-allowed" | "internal" | "unknown-job" | "command-not-installed" | "invalid-repo" | "invalid-args" | "room-busy" | "sandbox-unavailable" | "launch-failed" | "guard-missing" | "name-taken" | "already-registered" | "not-registered";
|
|
1609
|
+
error: "unauthorized" | "forbidden-host" | "forbidden-origin" | "not-found" | "method-not-allowed" | "invalid-query" | "unsupported-version" | "unsupported-media-type" | "invalid-body" | "invalid-request" | "no-launch-shape" | "not-waiting" | "wrong-question" | "wrong-arity" | "not-an-option" | "state-moved" | "unsigned" | "unknown-device" | "revoked-device" | "bad-signature" | "stale-request" | "replayed" | "replay-store-full" | "unknown-verb" | "forbidden-scope" | "launch-disabled" | "repo-not-allowed" | "run-active" | "not-resumable" | "confirm-expired" | "confirm-mismatch" | "unattended-profile-missing" | "workspace-not-trusted" | "no-selection" | "repo-not-configured" | "invalid-config" | "not-installed" | "repo-ambiguous" | "unreadable-settings" | "not-removable" | "not-steerable" | "too-many-streams" | "no-review" | "upstream-failed" | "tool-not-allowed" | "busy" | "review-incomplete" | "host-not-allowed" | "internal" | "unknown-job" | "command-not-installed" | "invalid-repo" | "invalid-args" | "room-busy" | "sandbox-unavailable" | "launch-failed" | "guard-missing" | "name-taken" | "already-registered" | "not-registered" | "unattended-refused";
|
|
1501
1610
|
message: string;
|
|
1502
1611
|
errors?: Array<string>;
|
|
1503
1612
|
supported?: Array<number>;
|
|
@@ -155,8 +155,10 @@ Never a body, a header value or a signature.
|
|
|
155
155
|
The phone sees counts and lights, never memory or session content. The routes
|
|
156
156
|
that carry content are tagged `local-only` and have no phone verb:
|
|
157
157
|
`GET /v1/memory`, `GET /v1/archive` (decisions, security notes, learnings and
|
|
158
|
-
the code graph report)
|
|
159
|
-
work, the skills called in the last 30 days, with the health lights)
|
|
158
|
+
the code graph report), `GET /v1/server-room` (session titles and current
|
|
159
|
+
work, the skills called in the last 30 days, with the health lights) and
|
|
160
|
+
`GET /v1/skills` (the skill catalog, which names the saved routines and the
|
|
161
|
+
local-only commands). The phone route family answers
|
|
160
162
|
`unknown-verb` for them, a device signature opens none of the desktop routes,
|
|
161
163
|
and the machine client refuses any target outside `/v1/phone/`
|
|
162
164
|
(`test/office-local-only.test.mjs`, `test/office-remote-client.test.mjs`). A
|
|
@@ -61,13 +61,15 @@ not mitigated here.
|
|
|
61
61
|
| T15 | A service read pointed at another host | A Confluence URL is accepted only on the configured Confluence host, and with no host configured only a page id is accepted (409 `host-not-allowed`), before the client script runs; Crashlytics takes only a Firebase console URL | `office-work.test.mjs` "a Confluence URL on another host is refused before the client runs", "only a page id is accepted" |
|
|
62
62
|
| T16 | Machine paths leaking through errors, or `office-off` signalling a reused pid | Error bodies name no absolute path (the launchd refusal and the unreadable settings message say what failed, not where); `office-off` sends SIGTERM only when the recorded pid's token file still names it, its command is `contract-server.mjs` and its start time matches the token file's | `office-routes.test.mjs` "refused without naming its path", "reported without the plist path"; `smoke-office-control.sh` "off never signals a pid that is not its server" |
|
|
63
63
|
| T17 | A reload code minted for another page, or a stale server outliving an update | `POST /office/reload` and `GET /office/version` need the bearer token and refuse any Origin other than the panel's own (a request with no Origin, a terminal client, is accepted); the reload code is the same 10 second, single-use code `office-on` uses, so a page that already holds the token gains nothing it did not have. A server whose code changed on disk is reported stale and `office-on` replaces it instead of reusing it | `office-repos.test.mjs` "/office/version reports the installed build", "/office/reload mints a one-time code"; `smoke-office-ui.sh` |
|
|
64
|
-
| T18 | The panel starting work nobody asked for, or work wider than asked | `POST /v1/jobs` takes only a job named in `schemas/office-jobs.json`, each parameter checked by its kind (a pull request URL or `repo#N`, a Jira key, a run id the index knows, a branch name, a path that stays inside the repository, an enumerated value; a pipeline run's work item goes through the launch request rules). Two requests: the preview names the role, the repository, the exact prompt and what the job writes outside the machine (a branch and PR for a pipeline run; review and clarify jobs report locally, since agent-guard keeps GitHub writes to the runner), and the token is bound to that payload. At the confirmation the repository must still be allowed, the unattended profile installed, the workspace trusted, agent-guard.sh registered for every tool and the autopilot runner's sandbox check passing; the session runs `claude --bg` with no permission prompts under that profile, without a shell, and claude's own output stays in the server's log, not the page. The unattended profile denies reading the server's token directory, so a session it starts cannot pick up the bearer. A team job is refused while a run is live in the same repository, from the moment its session starts. Tagged `local-only`/`high`: no phone route reaches it. Every start is recorded under `logs/multi-agent/office/jobs/` and in `office-actions.jsonl` | `office-jobs.test.mjs`, `smoke-office-ui.sh` |
|
|
64
|
+
| T18 | The panel starting work nobody asked for, or work wider than asked | `POST /v1/jobs` takes only a job named in `schemas/office-jobs.json`, each parameter checked by its kind (a pull request URL or `repo#N`, a Jira key, a run id the index knows, a branch name, a path that stays inside the repository, an enumerated value; a pipeline run's work item goes through the launch request rules). An enumerated value read from this machine is checked against what it offers there: the review-priority teams whose rule file parses, and only the presets of the team given. Two requests: the preview names the role, the repository, the exact prompt and what the job writes outside the machine (a branch and PR for a pipeline run; review and clarify jobs report locally, since agent-guard keeps GitHub writes to the runner), and the token is bound to that payload. At the confirmation the repository must still be allowed, the unattended profile installed, the workspace trusted, agent-guard.sh registered for every tool and the autopilot runner's sandbox check passing; the session runs `claude --bg` with no permission prompts under that profile, without a shell, and claude's own output stays in the server's log, not the page. The unattended profile denies reading the server's token directory, so a session it starts cannot pick up the bearer. A team job is refused while a run is live in the same repository, from the moment its session starts. Tagged `local-only`/`high`: no phone route reaches it. Every start is recorded under `logs/multi-agent/office/jobs/` and in `office-actions.jsonl` | `office-jobs.test.mjs`, `smoke-office-ui.sh` |
|
|
65
65
|
| T19 | The key cabinet leaking a credential, or the panel becoming a place to enter one | `GET /v1/credentials` runs `lib/credential-inventory.sh`, whose probe reads each credential through the credential store with its output discarded, so no value reaches the server process. The route keeps the logical name, a state and a probe verdict from fixed vocabularies and a capability line cut to 160 characters; anything else in the script's output is dropped. Tagged `local-only`: not even the state goes to a phone. There is no write route: renewing a credential stays in the terminal (`/multi-agent:setup`), so a secret never passes through the browser | `office-routes.test.mjs` "GET /v1/credentials names each credential and its verdict, never a value" |
|
|
66
66
|
| T20 | A learned statement carrying a secret or a machine path to the page | `GET /v1/memory` returns counts, the code graph's age and size, and the five newest learning statements per repository, each passed through the transcript redactor (provider credential rules, paths and addresses) and cut to 120 characters. Repository names are matched against a safe character set before any file is opened. Read only; `local-only` | `office-routes.test.mjs` "GET /v1/memory reports every shelf, redacted" |
|
|
67
67
|
| T21 | Machine details through the resource panel | `GET /v1/system` returns numbers only (cores, load, memory, free disk, process counts, log folder size) and two fixed warnings; no path, process argument, user or host name. The schema allows nothing else. The measurement runs as child processes off the event loop, concurrent requests share one measurement, and the log folder size is reused for a minute. Readable from a phone, since it names nothing | `office-routes.test.mjs` "GET /v1/system returns numbers only: no path, user or host name" |
|
|
68
68
|
| T22 | Old run logs deleted wider than asked, or a live run's log removed | `POST /v1/prune-logs` takes only an age from a fixed set (7, 30 or 90 days) and runs `prune-logs.sh`, the script `/multi-agent:prune-logs` runs: the dry run is the preview; the confirmed step lists the folders again, refuses with `changed` when they differ, and then prunes only the previewed list through `--only-from`, under a token bound to that age and list. The script never touches the audit trail, the metrics corpus or the task counters, refuses a log root that is `/`, the home folder or a git checkout, and spares a folder written in the last minutes and a run that can still be resumed. Tagged `local-only`/`high` | `office-routes.test.mjs` "POST /v1/prune-logs previews, then prunes only on the token" |
|
|
69
69
|
| T23 | Pull request listing exposing a token, or the native task mirror writing into another run | Each GitHub account gh is logged in to is asked with `gh auth token` for that host and login; the token travels in `GH_TOKEN` (and `GH_ENTERPRISE_TOKEN` for an Enterprise Server host) for the child process only, never on a command line, in a response or a log. Bitbucket Server is read over https only (a plain-http host is refused unless it is the loopback), redirects are not followed, and the token, read from the credential store with a deadline, travels in the `Authorization` header only; an unreachable host is a reason on that source, not a failure of the list. `GET /v1/prs/reach` (local-only) asks gh for the changed file paths of at most 20 GitHub pull requests, three at a time, each with its account's token in the environment; it asks nothing for a repository whose name is not `owner/repo` or that has no graph under `~/.claude/knowledge/<repo name>/`. The paths serve only as keys into the local graph: nothing is read from disk by them and none is returned, only counts. The graph is parsed in a child process, so no other route waits behind it. A redacted answer drops URLs and logins, numbering the accounts instead. The task-mirror hook (PostToolUse on TaskCreate and TaskUpdate) writes only into the run whose recorded session is the calling session, skips phase tiles, never prints, and exits 0 on any input it cannot read | `work-items-prs.test.mjs`, `task-mirror.test.mjs`, `pr-reach.test.mjs`, `office-work.test.mjs` "GET /v1/prs/reach says which pull requests have no graph to measure against" |
|
|
70
70
|
| T24 | The panel changing a preference wider than the terminal would, or posting addresses to a phone | `POST /v1/settings` takes one of three settings and one of its two values, previews the change and runs, under a token bound to that setting and value, what `/multi-agent:language`, `/multi-agent:model` or `/multi-agent:route-on`/`route-off` runs; route on passes the saved strategy back so only the switch changes, nothing the panel sends can add rules or a free provider, and two changes never run at once. Tagged `local-only`/`high`. Report links: `channelResults` URLs must be https, travel only in the run record's `channelUrls` (local, dropped from a redacted answer) and are shown as text, never followed | `office-routes.test.mjs` "POST /v1/settings changes a switch only on the token, through its script", `runs-index.test.mjs` |
|
|
71
|
+
| T25 | The skill catalog reading files a request names, or a SKILL.md running as markup | `GET /v1/skills` reads only fixed roots: the command tree, the `local-only` command folders under `~/.claude/commands/multi-agent`, the marketplace clone under `~/.claude/plugins/marketplaces/multi-agent-plugins` and the routine registry. Its one parameter, `repo`, resolves the way `GET /v1/stack` resolves it (a configured or registered repository, nothing else) and only decides which plugin skills are on. A skill folder or SKILL.md whose real path leaves the clone is skipped, and a plugin name outside a safe character set is ignored. Descriptions are file content, so the page sets them as text only. Routine text is scrubbed, and the route is `local-only` because it names the routines and local-only commands kept on this machine | `office-skills.test.mjs`, `skill-catalog.test.mjs`, `smoke-office-ui.sh` "a skill description shows as text, never as markup" |
|
|
72
|
+
| T26 | The disk section deleting more than was ticked, the user's own files, or anything while nobody watches | `POST /v1/disk-clean` runs `disk-cleaner.mjs`, the script `/multi-agent:clean-disk` runs. Measuring is its dry run and mints no token. Only a preview of named categories returns one, and each category must be an id from the cleaner's own allow-list (`CATEGORIES`); nothing else from the request reaches its command line. The token is bound to those categories, and the confirmation sends only the token and applies exactly them with `--only`. The Trash and old transcripts need their id and their own `trash: true` / `transcripts: true`; the page leaves both unticked and shows what deleting them costs. A server started with `MULTI_AGENT_UNATTENDED=1` measures the cleaner's unattended set and refuses a preview and an apply. The cleaner guards every path again before deleting it (no symlink, no personal or credential folder, no git working tree but a merged clean agent worktree, nothing in use) and never stops a process. Real paths are shown, so the route is `local-only`/`high` | `office-disk.test.mjs` |
|
|
71
73
|
|
|
72
74
|
## Residual risks
|
|
73
75
|
|
|
@@ -140,11 +140,24 @@ is named after it, with no identity check, and finding no account later does not
|
|
|
140
140
|
undo it (`decideRegistration`). So the personal account has to be reachable only
|
|
141
141
|
once, at the moment of registration.
|
|
142
142
|
|
|
143
|
+
A pin holds only while its token works. When a token is stored,
|
|
144
|
+
`usage-register.mjs` first asks the server whether it still does (see "The
|
|
145
|
+
stored-token check" below). A token the server rejects counts as no token: the
|
|
146
|
+
machine registers again in the usual order (a proof first, else the stored
|
|
147
|
+
`usageLog.declaredLogin`, else the pinned `registeredAs` as a declared name),
|
|
148
|
+
with no question, and the new token overwrites the old one in its
|
|
149
|
+
credential-store entry. The same declared registration under `registeredAs`
|
|
150
|
+
runs when the pinned machine has no stored token at all.
|
|
151
|
+
|
|
143
152
|
`usage-register.mjs --json` reports `needsPersonalAccount: true` only when the
|
|
144
153
|
machine is not pinned, no account with access was found (no gh account, no
|
|
145
|
-
credential-helper token, no SSH key) and no name was declared.
|
|
146
|
-
|
|
147
|
-
|
|
154
|
+
credential-helper token, no SSH key) and no name was declared. A stored
|
|
155
|
+
`declaredLogin` or a pinned `registeredAs` keeps it false. Setup and update
|
|
156
|
+
ask a question only on `needsPersonalAccount: true`: once, for the person's
|
|
157
|
+
GitHub username (free text; Skip leaves reporting off). A `refusal`
|
|
158
|
+
(`not_collaborator` or `proof_required`) only prints its status line. The site
|
|
159
|
+
answers a declared name the same way whether or not it is a collaborator, so
|
|
160
|
+
typing the name again would change nothing. On an answer they run:
|
|
148
161
|
|
|
149
162
|
```bash
|
|
150
163
|
node "$HOME/.claude/scripts/usage-register.mjs" --login "$GITHUB_LOGIN" --json
|
|
@@ -157,9 +170,14 @@ used as below. When it cannot, which is the usual case on a machine signed in
|
|
|
157
170
|
with a work account only, the name is registered as declared: the server issues
|
|
158
171
|
a token only for a collaborator (the repository owner registers with a proof),
|
|
159
172
|
and marks its row `claimed:<machine>`. Later runs (the Phase 0 backstop) register a declared name
|
|
160
|
-
the same way, without asking again. A name
|
|
161
|
-
`not_collaborator`
|
|
162
|
-
|
|
173
|
+
the same way, without asking again. A declared name the server refuses
|
|
174
|
+
(`not_collaborator`, or `proof_required` for the owner's name) is forgotten,
|
|
175
|
+
and setup and update print the status line without a question; the next setup
|
|
176
|
+
or update asks once more only when it reports `needsPersonalAccount: true`.
|
|
177
|
+
When the refused name was registered under a token the server had rejected,
|
|
178
|
+
the pin (`registeredAs`) is dropped too, so the same run reports
|
|
179
|
+
`needsPersonalAccount: true`, which is then the one question asked. A declared registration is usable as soon as it is issued; there is no
|
|
180
|
+
approval step.
|
|
163
181
|
|
|
164
182
|
A declared name never replaces a proof: it is used only when the machine proves
|
|
165
183
|
no account, and never over a stored token that was issued for a proven login
|
|
@@ -206,13 +224,36 @@ is read or any key is used. Redirects are not followed by any of the calls, so
|
|
|
206
224
|
neither a GitHub token, a signature nor the ingest token can be carried to
|
|
207
225
|
another host.
|
|
208
226
|
|
|
227
|
+
### The stored-token check
|
|
228
|
+
|
|
229
|
+
`POST <register url>/check` with an empty JSON body and the stored ingest token
|
|
230
|
+
in the `x-usage-token` header, read from the credential store into memory and
|
|
231
|
+
never put on an argv, in a log or in the body. It goes only where the login
|
|
232
|
+
proof may go (the trusted-host rule above) and is never sent for an opted-out
|
|
233
|
+
machine, a token in `$MULTI_AGENT_USAGE_TOKEN` or `usageLog.token`, a dry run,
|
|
234
|
+
or a machine with no stored token. The timeout is 4 seconds.
|
|
235
|
+
|
|
236
|
+
| Answer | `tokenCheck` in `--json` | Effect |
|
|
237
|
+
|--------|--------------------------|--------|
|
|
238
|
+
| `200 { ok: true, valid: true, u, claimed }` | `valid` | the token is kept |
|
|
239
|
+
| `200 { ok: true, valid: false }` | `invalid` | treated as no token: register again, replace the stored token |
|
|
240
|
+
| `5xx`, any other status, no verdict, timeout, network failure, redirect | `unknown` | the token is kept (no churn on an outage) |
|
|
241
|
+
| not sent | `skipped` | unchanged behaviour |
|
|
242
|
+
|
|
243
|
+
A rejected token that cannot be replaced (no proof, no known name) leaves the
|
|
244
|
+
reason as `stored token rejected; <why>`, which `--quiet` prints on stderr.
|
|
245
|
+
`--json` also carries `refusal` (`not_collaborator` or `proof_required`) when
|
|
246
|
+
a declared name was refused for that reason.
|
|
247
|
+
|
|
248
|
+
### Register answers
|
|
249
|
+
|
|
209
250
|
| Answer | Status line |
|
|
210
251
|
|--------|-------------|
|
|
211
252
|
| `401` / `403` `login_mismatch` | the login that could not be confirmed (for gh: `gh auth status` must list it) |
|
|
212
253
|
| `401` `ssh_signature_invalid` | the signature did not verify |
|
|
213
254
|
| `401` `ssh_key_not_on_account` | the key is not on that account; add its `.pub` to it |
|
|
214
255
|
| `401` `ssh_key_unsupported` | the key type is not accepted; use an ed25519, rsa or ecdsa-p256 key |
|
|
215
|
-
| `403` `not_collaborator` | the login is not a collaborator; the owner adds it (a declared name is forgotten and
|
|
256
|
+
| `403` `not_collaborator` | the login is not a collaborator; the owner adds it (a declared name is forgotten; setup and update only print this line) |
|
|
216
257
|
| `403` `proof_required` | the declared name is the repository owner's, which registers only with a proof (gh or an SSH key); the name is forgotten |
|
|
217
258
|
| challenge `404` / `405` | the endpoint does not accept an SSH key as proof yet |
|
|
218
259
|
| signing failed | the key needs a passphrase and is not in ssh-agent: `ssh-add <key>` |
|
|
@@ -146,7 +146,7 @@ Plugins & tools (called directly, no wrappers):
|
|
|
146
146
|
|
|
147
147
|
Stack plugins ai-<stack>-toolkit:<skill>, e.g. ai-ios-toolkit:create-component
|
|
148
148
|
Catalog: ai-<stack>-toolkit:help Enable per repo: /multi-agent:stack (common + analyst always on)
|
|
149
|
-
Toolkit MCP multi-agent-toolkit -
|
|
149
|
+
Toolkit MCP multi-agent-toolkit - 233 tools, most for a RUNNING app, no pipeline run needed:
|
|
150
150
|
ios_* / android_* (launch, tap, screenshot, ui tree, logs, crashes,
|
|
151
151
|
locale, dark mode), web_*, design_* (Design Check above), and the
|
|
152
152
|
audits (ios_app_store_audit, ios_testflight_validate, android_apk_audit,
|