@mmerterden/multi-agent-pipeline 24.1.0 → 24.2.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 (34) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +9 -8
  3. package/README.tr.md +9 -8
  4. package/docs/architecture.md +4 -4
  5. package/docs/ecosystem.md +6 -6
  6. package/docs/facts.json +5 -5
  7. package/docs/features.md +1 -1
  8. package/manifest.json +37 -32
  9. package/package.json +1 -1
  10. package/pipeline/commands/multi-agent/sync/SKILL.md +3 -3
  11. package/pipeline/commands/multi-agent/version/SKILL.md +67 -0
  12. package/pipeline/lib/toolkit-install.mjs +147 -0
  13. package/pipeline/lib/usage-names.generated.mjs +2 -0
  14. package/pipeline/multi-agent-refs/cross-cli-contract.md +4 -4
  15. package/pipeline/multi-agent-refs/features/local-model.md +2 -2
  16. package/pipeline/multi-agent-refs/features/model-fallback.md +1 -1
  17. package/pipeline/multi-agent-refs/help/en.md +2 -1
  18. package/pipeline/multi-agent-refs/help/tr.md +2 -1
  19. package/pipeline/multi-agent-refs/phases/phase-3-review.md +1 -1
  20. package/pipeline/multi-agent-refs/review/panel.md +1 -1
  21. package/pipeline/multi-agent-refs/sync/overview.md +1 -1
  22. package/pipeline/office/index.html +2 -2
  23. package/pipeline/schemas/hosts.json +1 -1
  24. package/pipeline/schemas/office-jobs.json +8 -0
  25. package/pipeline/schemas/version-report.schema.json +256 -0
  26. package/pipeline/scripts/feedback-send.mjs +7 -11
  27. package/pipeline/scripts/health-report.mjs +30 -53
  28. package/pipeline/scripts/version-report.mjs +868 -0
  29. package/pipeline/skills/.skill-manifest.json +7 -3
  30. package/pipeline/skills/.skills-index.json +12 -1
  31. package/pipeline/skills/shared/README.md +4 -3
  32. package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +3 -3
  33. package/pipeline/skills/shared/core/multi-agent-version/SKILL.md +27 -0
  34. package/pipeline/skills/skills-index.md +2 -1
@@ -0,0 +1,67 @@
1
+ ---
2
+ description: "Which version of the pipeline, the MCP toolkit and the plugins this machine runs, with each one's dates. Use when asked what is installed or what is out of date."
3
+ description-tr: "Bu makinedeki pipeline, MCP toolkit ve plugin sürümlerini, tarihleriyle birlikte raporlar."
4
+ argument-hint: "(no arguments)"
5
+ parameters: []
6
+ gui: button
7
+ destructive: false
8
+ confirm: none
9
+ allowed-tools: Bash
10
+ ---
11
+
12
+ # multi-agent version - what this machine runs, in all three parts
13
+
14
+ ```bash
15
+ node "$HOME/.claude/scripts/version-report.mjs"
16
+ ```
17
+
18
+ The report is already written in `outputLanguage`: print it as it comes, then
19
+ add nothing but an answer to what the user actually asked. Never restate the
20
+ table in prose.
21
+
22
+ ## Why three parts and not one
23
+
24
+ The ecosystem ships from three places and they move independently: the
25
+ pipeline and the MCP toolkit as npm packages, the plugins as a marketplace
26
+ repository. A user who asks "am I up to date" has three answers, and the part
27
+ that is behind is usually not the part they were thinking of.
28
+
29
+ ## The two dates, which are not the same question
30
+
31
+ | Column | What it is |
32
+ |---|---|
33
+ | `Released` | the release date of the version in use, as its registry or its clone records it. Comparable across rows, so the "newest release in use" line is computed from these |
34
+ | `Installed here` | when it landed on this machine |
35
+
36
+ A part read without the registry has no release date, and the headline then
37
+ names what it could not include rather than quietly comparing fewer parts.
38
+
39
+ ## Reading the State column
40
+
41
+ `current` requires a successful registry read in the same run: offline, every
42
+ npm part is `unknown` with the reason, never `current`. `behind` and
43
+ `below-floor` are the two that need action, and only then does the report print
44
+ the update pointer. `ahead` means a local build newer than the registry, which
45
+ is normal on a maintainer's machine.
46
+
47
+ `Notes:` carries what is wrong between local parts rather than against upstream:
48
+ a host on a different version, a tree with no version marker, a toolkit older
49
+ than the one this release was built against, a plugin enabled here but not
50
+ installed, a server registered at a pinned version (which `update` cannot move).
51
+
52
+ ## Flags, when asked for
53
+
54
+ ```bash
55
+ node "$HOME/.claude/scripts/version-report.mjs" --json # machine-side document
56
+ node "$HOME/.claude/scripts/version-report.mjs" --offline # no network read at all
57
+ node "$HOME/.claude/scripts/version-report.mjs" --timeout-ms 8000
58
+ ```
59
+
60
+ Reads only; it never updates anything. The upgrade is `/multi-agent:update`,
61
+ which moves the pipeline and refreshes the plugin catalog in one pass.
62
+
63
+ ## Related
64
+
65
+ - `/multi-agent:update` - perform the upgrade this report points at
66
+ - `/multi-agent:doctor` - whether the install is healthy, not which version it is
67
+ - `/multi-agent:health` - the running picture: services, toolkit, disk, errors
@@ -0,0 +1,147 @@
1
+ /**
2
+ * toolkit-install.mjs - which copy of the companion MCP server a host would
3
+ * run, and what it was asked for.
4
+ *
5
+ * The server ships as an npm package and is registered as a command line, so
6
+ * "the installed version" is not a single file to read: a registration naming a
7
+ * script points at a checkout, and an `npx` registration points at whatever npm
8
+ * cached for the spec, which can be several versions side by side. Both the
9
+ * health report and the version report need the same answer, so the lookup
10
+ * lives here rather than in either of them.
11
+ *
12
+ * Reads only what it needs from a host's configuration: the server entry's
13
+ * `command` and `args`. A registration's `env` and headers can carry
14
+ * credentials and are never read, so no value from them can reach a report.
15
+ *
16
+ * Zero runtime dependencies (ADR-0004).
17
+ *
18
+ * @module pipeline/lib/toolkit-install
19
+ */
20
+
21
+ import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
22
+ import { join } from "node:path";
23
+
24
+ import { MCP_SERVER_ID } from "./mcp-rename.mjs";
25
+
26
+ /** The npm package the server ships as. */
27
+ export const TOOLKIT_PACKAGE = "@mmerterden/multi-agent-mcp";
28
+
29
+ const VERSION = /^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]{1,40})?$/;
30
+
31
+ function readJson(path) {
32
+ try {
33
+ return JSON.parse(readFileSync(path, "utf8"));
34
+ } catch {
35
+ return null;
36
+ }
37
+ }
38
+
39
+ /**
40
+ * The server's entry in the host's own configuration, null when unregistered.
41
+ * Both files are read because a user-scope registration lands in `.claude.json`
42
+ * while a project-scope one lands under `projects`.
43
+ *
44
+ * @param {string} home
45
+ * @returns {{command?: string, args?: string[]}|null}
46
+ */
47
+ export function mcpRegistration(home) {
48
+ for (const file of [join(home, ".claude.json"), join(home, ".claude", "settings.json")]) {
49
+ const json = readJson(file);
50
+ if (!json) continue;
51
+ const pools = [
52
+ json.mcpServers,
53
+ ...Object.values(json.projects ?? {}).map((p) => p?.mcpServers),
54
+ ];
55
+ for (const pool of pools) {
56
+ for (const [name, cfg] of Object.entries(pool ?? {})) {
57
+ if (name === MCP_SERVER_ID && cfg && typeof cfg === "object") {
58
+ return { command: cfg.command, args: Array.isArray(cfg.args) ? cfg.args : [] };
59
+ }
60
+ }
61
+ }
62
+ }
63
+ return null;
64
+ }
65
+
66
+ /**
67
+ * The package spec a registration asks for (`<package>@latest`, `<package>@4.2.0`),
68
+ * null when it names no package - a registration pointing at a script does not.
69
+ *
70
+ * @param {{command?: string, args?: string[]}|null} reg
71
+ * @returns {string|null}
72
+ */
73
+ export function registrationSpec(reg) {
74
+ const words = [reg?.command, ...(reg?.args ?? [])].filter((a) => typeof a === "string");
75
+ return words.find((a) => a === TOOLKIT_PACKAGE || a.startsWith(`${TOOLKIT_PACKAGE}@`)) ?? null;
76
+ }
77
+
78
+ /** Is the spec pinned to one version, rather than a tag like `@latest`? */
79
+ export function specIsPinned(spec) {
80
+ const at = spec ? spec.slice(TOOLKIT_PACKAGE.length + 1) : "";
81
+ return VERSION.test(at);
82
+ }
83
+
84
+ /** The directory a registration names directly, null when it names no script. */
85
+ export function registrationDir(reg, home) {
86
+ const script = (reg?.args ?? []).find((a) => typeof a === "string" && /\.(m?js)$/.test(a));
87
+ if (!script) return null;
88
+ const dir = script.startsWith("/") ? script : join(home, script);
89
+ const parent = dir.slice(0, dir.lastIndexOf("/"));
90
+ return existsSync(join(parent, "package.json")) ? parent : null;
91
+ }
92
+
93
+ /**
94
+ * Every copy of the server npm cached, newest first.
95
+ *
96
+ * `installedAt` is the copy's own mtime, which is when npm wrote it here, and
97
+ * `spec` is what that cache entry was created for - the two together are what
98
+ * tells one `@latest` copy from an older pinned one.
99
+ *
100
+ * @param {string} home
101
+ * @returns {Array<{dir: string, version: string|null, installedAt: number, spec: string|null}>}
102
+ */
103
+ export function npxCopies(home) {
104
+ const cache = join(home, ".npm", "_npx");
105
+ let names;
106
+ try {
107
+ names = readdirSync(cache);
108
+ } catch {
109
+ return [];
110
+ }
111
+ const found = [];
112
+ for (const n of names) {
113
+ const dir = join(cache, n, "node_modules", ...TOOLKIT_PACKAGE.split("/"));
114
+ const pkg = readJson(join(dir, "package.json"));
115
+ if (pkg?.name !== TOOLKIT_PACKAGE) continue;
116
+ let installedAt;
117
+ try {
118
+ installedAt = statSync(join(dir, "package.json")).mtimeMs;
119
+ } catch {
120
+ continue;
121
+ }
122
+ const asked = readJson(join(cache, n, "package.json"))?._npx?.packages;
123
+ found.push({
124
+ dir,
125
+ version: typeof pkg.version === "string" && VERSION.test(pkg.version) ? pkg.version : null,
126
+ installedAt,
127
+ spec: (Array.isArray(asked) ? asked : []).find((p) => typeof p === "string") ?? null,
128
+ });
129
+ }
130
+ return found.sort((a, b) => b.installedAt - a.installedAt);
131
+ }
132
+
133
+ /** The newest cached copy's directory, null when npm cached none. */
134
+ export function newestNpxCopy(home) {
135
+ return npxCopies(home)[0]?.dir ?? null;
136
+ }
137
+
138
+ /** Is this directory a checkout of the server package? */
139
+ export function isToolkitDir(dir) {
140
+ return readJson(join(dir, "package.json"))?.name === TOOLKIT_PACKAGE;
141
+ }
142
+
143
+ /** The package version a directory declares, null when unreadable or malformed. */
144
+ export function toolkitVersionAt(dir) {
145
+ const v = readJson(join(dir, "package.json"))?.version;
146
+ return typeof v === "string" && VERSION.test(v) ? v : null;
147
+ }
@@ -89,6 +89,7 @@ export const SHIPPED_COMMANDS = Object.freeze([
89
89
  "testflight-validation",
90
90
  "uninstall",
91
91
  "update",
92
+ "version",
92
93
  ]);
93
94
 
94
95
  /** The skills the package ships (core and external). */
@@ -275,6 +276,7 @@ export const SHIPPED_SKILLS = Object.freeze([
275
276
  "multi-agent-testflight-validation",
276
277
  "multi-agent-uninstall",
277
278
  "multi-agent-update",
279
+ "multi-agent-version",
278
280
  "musickit-audio",
279
281
  "natural-language",
280
282
  "nextjs-routing",
@@ -1,7 +1,7 @@
1
1
  # Cross-CLI Contract (Claude Code · Copilot CLI · Codex CLI)
2
2
 
3
3
  <!-- toc -->
4
- - [1. Command Inventory (81 commands)](#1-command-inventory-81-commands)
4
+ - [1. Command Inventory (82 commands)](#1-command-inventory-82-commands)
5
5
  - [2. Canonical Placeholder Vocabulary](#2-canonical-placeholder-vocabulary)
6
6
  - [2.6 Intentional structural divergence - two entry files over one set of refs](#26-intentional-structural-divergence---two-entry-files-over-one-set-of-refs)
7
7
  - [2.7 One switch, three different meanings: `fable-on` / `fable-off`](#27-one-switch-three-different-meanings-fable-on-fable-off)
@@ -20,7 +20,7 @@
20
20
 
21
21
  ---
22
22
 
23
- ## 1. Command Inventory (81 commands)
23
+ ## 1. Command Inventory (82 commands)
24
24
 
25
25
  ```
26
26
  address-review, analysis, analysis-jira, analysis-resolve, autopilot-off,
@@ -36,7 +36,7 @@ route-status, routines, routines-browse, routines-delete, routines-import,
36
36
  routines-share, routines-update, save, scaffold, scan, scenario-audit, search,
37
37
  security-review, serve, setup, stack, status, steer, store-ready, sync, test, test-accessibility,
38
38
  test-dark-mode, test-dynamic-type, test-gen, test-screenshots, testflight-validation,
39
- uninstall, update
39
+ uninstall, update, version
40
40
  ```
41
41
 
42
42
  Categories:
@@ -47,7 +47,7 @@ Categories:
47
47
  - **Tail path** (the pipeline tail over work already on a branch, no run behind it): `resume`
48
48
  - **Ops commands** (one-shot, no worktree): `status`, `log`, `kill`, `steer`, `purge`, `uninstall`, `resume`, `review`, `review-jira`, `review-issue`, `review-priority`, `address-review`, `analysis`, `analysis-resolve`, `research`, `scaffold`, `complaint-analysis`, `bug-bash`, `test-gen`, `build-optimize`, `channels`, `scan`, `search`, `diff-explain`, `garbage-collect`, `graph`, `health`, `postmortem`, `prune-logs`, `prune-prompts`, `clean-disk`, `serve`, `office-on`, `office-off`, `office-status`
49
49
  - **Local audits** (worktree only to build; no commit, push, PR or channels): `design-check`, `testflight-validation`, `ios-coding-standard`. `testflight-validation` additionally never invokes `altool --upload-app` - a validation run must not be able to ship a build by accident.
50
- - **Meta-ops**: `setup`, `sync`, `update`, `help`, `refactor`, `test`, `stack`, `manual-test`, `language`
50
+ - **Meta-ops**: `setup`, `sync`, `update`, `version`, `help`, `refactor`, `test`, `stack`, `manual-test`, `language`
51
51
  - **Routines** (user-defined routine registry; the routines they create are local-only and never synced): `save`, `routines`, `forget`; sharing them with site members: `routines-share`, `routines-browse`, `routines-import`, `routines-update`, `routines-delete`
52
52
 
53
53
  > **Inventory drift is a contract violation.** Adding a slash command under `pipeline/commands/multi-agent/` without updating this list + its counterpart Copilot dir (`pipeline/skills/shared/core/multi-agent-<cmd>/`) is a merge blocker. `smoke-commands-skills-parity.sh` enforces command ↔ skill directory parity; `smoke-cross-cli-behavior.sh` enforces behavior parity. This doc is the authoritative command list - bump the count + table together.
@@ -1,4 +1,4 @@
1
- # Local model host
1
+ # Local LLM host
2
2
 
3
3
  A fourth install target: the Codex CLI engine pointed at a model served from
4
4
  this machine, in a tree of its own. `npx @mmerterden/multi-agent-pipeline
@@ -59,7 +59,7 @@ inherit the session's. That is the one answer that cannot be wrong.
59
59
 
60
60
  ## What the run looks like
61
61
 
62
- | | Local model host |
62
+ | | Local LLM host |
63
63
  |---|---|
64
64
  | Rungs | all four collapse to the one model; no reasoning effort |
65
65
  | Review panel | one reviewer, triage on the same model |
@@ -222,7 +222,7 @@ How a dispatch hands a child its model differs per host, and the registry
222
222
  | Claude Code | export `CLAUDE_CODE_SUBAGENT_MODEL` | - | - | no stated ceiling | `.claude/agents/*.md` |
223
223
  | Copilot CLI | pass `--model` | - | - | no stated ceiling | `.copilot/agents/*.md` |
224
224
  | Codex CLI | `model` on the spawn call | `reasoning_effort` | `fork_turns: none` | 3 | `.codex/agents/*.toml` |
225
- | Local model | `model` on the spawn call | - | `fork_turns: none` | 1 | `.codex-local/agents/*.toml` |
225
+ | Local LLM | `model` on the spawn call | - | `fork_turns: none` | 1 | `.codex-local/agents/*.toml` |
226
226
  <!-- /hosts -->
227
227
 
228
228
  `$HOME/.claude/lib/model-dispatch.sh` turns `prefs.global.modelRouting` into a
@@ -2,7 +2,7 @@
2
2
 
3
3
  <!-- facts: commandCount="commands" toolCount="tools, most for a RUNNING app" -->
4
4
  ```
5
- Multi-Agent Pipeline - 81 commands, grouped by what you want to do
5
+ Multi-Agent Pipeline - 82 commands, grouped by what you want to do
6
6
 
7
7
  Start here:
8
8
 
@@ -161,6 +161,7 @@ Routines
161
161
  Maintenance
162
162
 
163
163
  /multi-agent:update Install the latest release and run migrations
164
+ /multi-agent:version Pipeline, MCP toolkit and plugin versions, with their dates
164
165
  /multi-agent:sync Sync Claude Code, Copilot CLI, pipeline, website, toolkit
165
166
  /multi-agent:doctor Would a run work here? The exit code is the verdict
166
167
  /multi-agent:health One look at services, install, cost, disk, errors
@@ -2,7 +2,7 @@
2
2
 
3
3
  <!-- facts: commandCount="komut" toolCount="araç, çoğu" -->
4
4
  ```
5
- Multi-Agent Pipeline - 81 komut, ne yapmak istediğine göre gruplu
5
+ Multi-Agent Pipeline - 82 komut, ne yapmak istediğine göre gruplu
6
6
 
7
7
  Buradan başla:
8
8
 
@@ -159,6 +159,7 @@ Rutinler
159
159
  Bakım
160
160
 
161
161
  /multi-agent:update Son sürümü kur, migration'ları çalıştır
162
+ /multi-agent:version Pipeline, MCP toolkit ve plugin sürümleri, tarihleriyle
162
163
  /multi-agent:sync Claude Code, Copilot CLI, pipeline, site, toolkit eşitle
163
164
  /multi-agent:doctor Burada koşu çalışır mı? Kararı çıkış kodu verir
164
165
  /multi-agent:health Servis, kurulum, maliyet, disk ve hatalara tek bakış
@@ -245,7 +245,7 @@ Launch Agent instances **in parallel** using the shared `code-reviewer` subagent
245
245
 
246
246
  The Codex CLI column is a per-slot override of the persona tier map in `features/model-fallback.md` ("Codex CLI"); the two differ on purpose and the panel is the one a review uses.
247
247
 
248
- Reviewer count per host: **Claude Code 3, Copilot CLI 3, Codex CLI 3** - **2** on Claude Code with the fable rung off, per `$HOME/.claude/multi-agent-refs/features/model-fallback.md`.
248
+ Reviewer count per host: **Claude Code 3, Copilot CLI 3, Codex CLI 3, local model 1** - **2** on Claude Code with the fable rung off, per `$HOME/.claude/multi-agent-refs/features/model-fallback.md`.
249
249
 
250
250
  #### Codex CLI - two constraints that fail silently
251
251
 
@@ -27,7 +27,7 @@ them and not on Claude Code, where Opus fills it.
27
27
  - Agent 3: `gpt-5.6` @ `medium` -> general quality
28
28
  - Triage: `gpt-5.6` @ `max`
29
29
 
30
- **Local model** (1 in parallel, one vendor):
30
+ **Local LLM** (1 in parallel, one vendor):
31
31
  - Agent 1: `local` -> security + architecture
32
32
  - Triage: `local`
33
33
  <!-- /hosts -->
@@ -11,7 +11,7 @@ publishes.
11
11
  | 1 | Claude Code (source of truth) | `~/.claude/commands/multi-agent/` + `~/.claude/multi-agent-refs/` + `~/.claude/agents/` + `~/.claude/scripts/` + `~/.claude/lib/` | source |
12
12
  | 2 | Copilot CLI | `~/.copilot/copilot-instructions.md` + `~/.copilot/skills/` + `~/.copilot/multi-agent-refs/` | <- from Claude (path-rewritten) |
13
13
  | 2b | Codex CLI | `~/.codex/AGENTS.md` + `~/.codex/skills/multi-agent/` + `~/.codex/multi-agent-refs/` + `~/.codex/agents/*.toml` | <- from Claude (path-rewritten) |
14
- | 2c | Local model | `~/.codex-local/AGENTS.md` + `~/.codex-local/skills/multi-agent/` + `~/.codex-local/multi-agent-refs/` + `~/.codex-local/agents/*.toml` | <- from Claude (path-rewritten), only when the tree exists |
14
+ | 2c | Local LLM | `~/.codex-local/AGENTS.md` + `~/.codex-local/skills/multi-agent/` + `~/.codex-local/multi-agent-refs/` + `~/.codex-local/agents/*.toml` | <- from Claude (path-rewritten), only when the tree exists |
15
15
  | 3 | multi-agent-pipeline repo | `~/multi-agent-pipeline/pipeline/` | <- from Claude (genericized) |
16
16
  | 4 | Website | `{owner}/{website-host}` | <- version + features |
17
17
  | 5 | multi-agent MCP server | resolved from `prefs.global.devToolkit` or the `mcpServers` registration | own repo: gate, commit, publish |