@mmerterden/multi-agent-pipeline 24.1.1 → 24.3.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 +40 -0
- package/README.md +6 -5
- package/README.tr.md +6 -5
- package/docs/architecture.md +3 -3
- package/docs/ecosystem.md +5 -5
- package/docs/facts.json +4 -4
- package/install/_common.mjs +65 -0
- package/install/_plugin-skills.mjs +76 -18
- package/install/claude.mjs +7 -0
- package/install/codex.mjs +15 -1
- package/install/copilot.mjs +7 -0
- package/manifest.json +48 -43
- package/package.json +1 -1
- package/pipeline/commands/multi-agent/sync/SKILL.md +3 -3
- package/pipeline/commands/multi-agent/version/SKILL.md +67 -0
- package/pipeline/contract/CHANGELOG.md +10 -0
- package/pipeline/contract/fixtures/error-invalid-request.json +1 -1
- package/pipeline/contract/fixtures/error-unauthorized.json +1 -1
- package/pipeline/contract/manifest.json +4 -3
- package/pipeline/contract/types/index.d.ts +7 -5
- package/pipeline/lib/toolkit-install.mjs +147 -0
- package/pipeline/lib/usage-names.generated.mjs +2 -0
- package/pipeline/multi-agent-refs/cross-cli-contract.md +4 -4
- package/pipeline/multi-agent-refs/help/en.md +2 -1
- package/pipeline/multi-agent-refs/help/tr.md +2 -1
- package/pipeline/office/index.html +2 -2
- package/pipeline/schemas/disk-clean-request.schema.json +8 -2
- package/pipeline/schemas/disk-clean.schema.json +3 -2
- package/pipeline/schemas/hosts.json +7 -0
- package/pipeline/schemas/hosts.schema.json +17 -0
- package/pipeline/schemas/office-jobs.json +8 -0
- package/pipeline/schemas/version-report.schema.json +256 -0
- package/pipeline/scripts/_contract-core.mjs +1 -1
- package/pipeline/scripts/disk-cleaner.mjs +232 -5
- package/pipeline/scripts/feedback-send.mjs +7 -11
- package/pipeline/scripts/health-report.mjs +30 -53
- package/pipeline/scripts/version-report.mjs +868 -0
- package/pipeline/skills/.skill-manifest.json +8 -4
- package/pipeline/skills/.skills-index.json +12 -1
- package/pipeline/skills/shared/README.md +4 -3
- package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +3 -3
- package/pipeline/skills/shared/core/multi-agent-version/SKILL.md +27 -0
- package/pipeline/skills/shared/external/disk-cleaner/SKILL.md +2 -1
- package/pipeline/skills/shared/external/disk-cleaner/scripts/disk-cleaner.mjs +232 -5
- package/pipeline/skills/skills-index.md +2 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-11-
|
|
4
|
-
"skillCount":
|
|
3
|
+
"generatedAt": "2026-11-18T15:59:36Z",
|
|
4
|
+
"skillCount": 259,
|
|
5
5
|
"entries": [
|
|
6
6
|
{
|
|
7
7
|
"path": "shared/core/apple-archive-compliance/SKILL.md",
|
|
@@ -297,7 +297,7 @@
|
|
|
297
297
|
},
|
|
298
298
|
{
|
|
299
299
|
"path": "shared/core/multi-agent-sync/SKILL.md",
|
|
300
|
-
"sha256": "
|
|
300
|
+
"sha256": "6570ced5ff433cbfb69fbf49caef289e5e094b5b4490a80a1dedcd42cfda9b7e"
|
|
301
301
|
},
|
|
302
302
|
{
|
|
303
303
|
"path": "shared/core/multi-agent-test-accessibility/SKILL.md",
|
|
@@ -335,6 +335,10 @@
|
|
|
335
335
|
"path": "shared/core/multi-agent-update/SKILL.md",
|
|
336
336
|
"sha256": "c95fbf2809933077937f93b149fe9add571a9b372f26fdee4514302c840cf42b"
|
|
337
337
|
},
|
|
338
|
+
{
|
|
339
|
+
"path": "shared/core/multi-agent-version/SKILL.md",
|
|
340
|
+
"sha256": "ed792a0426bbb48e7f9c26f65e6f17d78b75d0749a947837aa83deb6aac48b43"
|
|
341
|
+
},
|
|
338
342
|
{
|
|
339
343
|
"path": "shared/core/multi-agent/SKILL.md",
|
|
340
344
|
"sha256": "9cd4c70f6e1aa6833522287918523e82d4245577e117f8509af51070848d897a"
|
|
@@ -537,7 +541,7 @@
|
|
|
537
541
|
},
|
|
538
542
|
{
|
|
539
543
|
"path": "shared/external/disk-cleaner/SKILL.md",
|
|
540
|
-
"sha256": "
|
|
544
|
+
"sha256": "12648e6ababa644ab65fcbea5d4163e86e9eb7fba593e4e365e09304ad30e13d"
|
|
541
545
|
},
|
|
542
546
|
{
|
|
543
547
|
"path": "shared/external/docker-expert/SKILL.md",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"skillCount":
|
|
3
|
+
"skillCount": 259,
|
|
4
4
|
"entries": [
|
|
5
5
|
{
|
|
6
6
|
"name": "accessibility-compliance-accessibility-audit",
|
|
@@ -2004,6 +2004,17 @@
|
|
|
2004
2004
|
"triggerPaths": [],
|
|
2005
2005
|
"relativePath": "shared/core/multi-agent-update/SKILL.md"
|
|
2006
2006
|
},
|
|
2007
|
+
{
|
|
2008
|
+
"name": "multi-agent-version",
|
|
2009
|
+
"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.",
|
|
2010
|
+
"platform": null,
|
|
2011
|
+
"group": "core",
|
|
2012
|
+
"plugin": null,
|
|
2013
|
+
"invokeAs": "multi-agent-version",
|
|
2014
|
+
"triggerKeywords": [],
|
|
2015
|
+
"triggerPaths": [],
|
|
2016
|
+
"relativePath": "shared/core/multi-agent-version/SKILL.md"
|
|
2017
|
+
},
|
|
2007
2018
|
{
|
|
2008
2019
|
"name": "musickit-audio",
|
|
2009
2020
|
"description": "MusicKit and MediaPlayer on iOS: Apple Music authorization, catalog search, subscription checks and offers, ApplicationMusicPlayer playback controls and queues, Now Playing info, remote commands. Use when adding Apple Music playback or Now Playing controls.",
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Single source of truth for skills delivered to both Claude Code (`~/.claude/skills/`) and Copilot CLI (`~/.copilot/skills/`) by the installer.
|
|
4
4
|
|
|
5
|
-
**Total:**
|
|
5
|
+
**Total:** 259 skills (85 core + 174 external). Auto-generated by `scripts/gen-skills-index.mjs` - do not edit by hand.
|
|
6
6
|
|
|
7
7
|
## Directory layout
|
|
8
8
|
|
|
9
|
-
- **`core/`** -
|
|
9
|
+
- **`core/`** - 85 `multi-agent*` orchestration skills that are pipeline-critical. Edits here are core-code changes.
|
|
10
10
|
- **`external/`** - 174 iOS / Android / generic skills that ship into the stack plugins.
|
|
11
11
|
- Install destinations (ADR-0009): Claude Code gets NO local copy of `external/` - it loads those skills from the `multi-agent-plugins` marketplace, namespaced (`ai-<stack>-toolkit:<name>`); only the two compliance catalogs from `core/` land in `~/.claude/skills/`. Copilot CLI and Codex CLI receive a flat copy filtered to the enabled stacks. `external/` remains the single authoring source that `build-stack-plugins.mjs` publishes from.
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ Source layout is logical grouping only - skill discovery at runtime is unchang
|
|
|
14
14
|
|
|
15
15
|
## Categories
|
|
16
16
|
|
|
17
|
-
- [Pipeline Orchestration](#pipeline-orchestration) -
|
|
17
|
+
- [Pipeline Orchestration](#pipeline-orchestration) - 85
|
|
18
18
|
- [iOS / Apple Ecosystem](#ios-apple-ecosystem) - 95
|
|
19
19
|
- [Android / Kotlin](#android-kotlin) - 16
|
|
20
20
|
- [Web](#web) - 10
|
|
@@ -109,6 +109,7 @@ Source layout is logical grouping only - skill discovery at runtime is unchang
|
|
|
109
109
|
| [`multi-agent-testflight-validation`](./core/multi-agent-testflight-validation/) | `core` | iOS-pinned alias of store-ready: same three gates on an iOS build, one implementation. Validates a TestFlight / App Store package, never upl |
|
|
110
110
|
| [`multi-agent-uninstall`](./core/multi-agent-uninstall/) | `core` | Uninstall the pipeline from Claude Code + Copilot CLI. Keychain access tokens are always left untouched; --all-data also clears pipeline set |
|
|
111
111
|
| [`multi-agent-update`](./core/multi-agent-update/) | `core` | Update the pipeline to the latest published npm release: registry check, npm pack, install, migrate. Use when the installed pipeline is behi |
|
|
112
|
+
| [`multi-agent-version`](./core/multi-agent-version/) | `core` | 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 |
|
|
112
113
|
|
|
113
114
|
## iOS / Apple Ecosystem
|
|
114
115
|
|
|
@@ -52,7 +52,7 @@ Run every step automatically:
|
|
|
52
52
|
```
|
|
53
53
|
Step 0: DOCTOR doctor.mjs - exit 2 or 4 stops the sync
|
|
54
54
|
Step 1.5: DETECT Compare timestamps, find stale targets
|
|
55
|
-
Step 2: COPILOT Claude Code -> Copilot CLI (instructions +
|
|
55
|
+
Step 2: COPILOT Claude Code -> Copilot CLI (instructions + 82 sub-command skills)
|
|
56
56
|
Step 2b: CODEX Claude Code -> Codex CLI (router skill + specs as refs + agent TOML)
|
|
57
57
|
Step 3: REPO Claude Code -> pipeline repo (genericized, personal data scrub, bash -n on all sh)
|
|
58
58
|
Step 3c: PLUGINS shared/external -> multi-agent-plugins marketplace (rebuild, bump, push)
|
|
@@ -139,7 +139,7 @@ Claude <-> Copilot axis only; Codex takes Step 2b (`cross-cli-contract.md` 2.6).
|
|
|
139
139
|
|
|
140
140
|
`~/.claude/commands/multi-agent/{cmd}/SKILL.md` <-> `~/.copilot/skills/multi-agent-{cmd}/SKILL.md`.
|
|
141
141
|
|
|
142
|
-
**
|
|
142
|
+
**82 commands are synced** (canonical inventory - must match `cross-cli-contract.md` section 1; drift = contract violation):
|
|
143
143
|
|
|
144
144
|
```
|
|
145
145
|
address-review, analysis, analysis-jira, analysis-resolve, autopilot-off, autopilot-on,
|
|
@@ -150,7 +150,7 @@ manual-test, office-off, office-on, office-status, pair, postmortem, prune-logs,
|
|
|
150
150
|
routines, routines-browse, routines-delete, routines-import, routines-share, routines-update,
|
|
151
151
|
save, scaffold, scan, scenario-audit, search, security-review, serve, setup, stack, status, steer, store-ready, sync, test,
|
|
152
152
|
test-accessibility, test-dark-mode, test-dynamic-type, test-gen, test-screenshots,
|
|
153
|
-
testflight-validation, uninstall, update
|
|
153
|
+
testflight-validation, uninstall, update, version
|
|
154
154
|
```
|
|
155
155
|
|
|
156
156
|
**NOT synced**: `$HOME/.claude/multi-agent-refs/*` - lazy-load references, Claude Code specific
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: multi-agent-version
|
|
3
|
+
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."
|
|
4
|
+
user-invocable: true
|
|
5
|
+
metadata:
|
|
6
|
+
language: en
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# multi-agent-version
|
|
10
|
+
|
|
11
|
+
1. `node "$HOME/.copilot/scripts/version-report.mjs"`
|
|
12
|
+
2. Print the report as it comes - it is already in `outputLanguage` - and answer
|
|
13
|
+
the question that was asked. Never restate the table in prose.
|
|
14
|
+
|
|
15
|
+
The three parts ship separately, so "up to date" has three answers: pipeline
|
|
16
|
+
and MCP toolkit from npm, plugins from the marketplace repository.
|
|
17
|
+
|
|
18
|
+
`Released` is the release date of the version in use and is comparable across
|
|
19
|
+
rows; `Installed here` is when it landed on this machine. `current`
|
|
20
|
+
requires a registry read in the same run, so offline every npm part is
|
|
21
|
+
`unknown` with its reason. Only `behind` and `below-floor` need action, and the
|
|
22
|
+
report prints the update pointer itself. `Notes:` carries drift between local
|
|
23
|
+
parts: a host on another version, a missing version marker, a toolkit older than
|
|
24
|
+
the one this release was built against, an enabled plugin that is not installed,
|
|
25
|
+
a pinned server registration.
|
|
26
|
+
|
|
27
|
+
Reads only. The upgrade is `/multi-agent-update`.
|
|
@@ -65,10 +65,11 @@ non-zero count means the report is incomplete, not that the disk is clean.
|
|
|
65
65
|
| `held.aged` is above 0 and the user wants that space too | Add `--include-recent` after asking. Items in use and session scratch touched within `--scratch-hours`, which may belong to another open session, stay held at any age. |
|
|
66
66
|
| The user asked to empty the Trash | Add `--trash`. Only on that explicit request. |
|
|
67
67
|
| The user asked to delete old transcripts | Add `--transcripts` (older than `--transcript-days`, default 90). Past transcripts are searched for history, so this is opt-in and never the current session. |
|
|
68
|
+
| The user asked to delete test run output | Add `--test-artifacts` (older than `--artifact-days`, default 7), and name what will go before applying it: the result bundles, the recordings and screenshots, and the report files, counted and sized per root. A recording can be the only evidence of a failure anybody still has, so the confirmation is per run and never carried over from a previous one. A harness that keeps its results outside a repository is added with `--artifact-root` or `DISK_CLEANER_ARTIFACT_ROOTS`. |
|
|
68
69
|
| The user asked to stop hanging sessions | Show the report's `orphans` list as information. The script never stops a process; stopping one is the user's own step. Live sessions are never listed. |
|
|
69
70
|
|
|
70
71
|
Narrow a run with `--only=a,b` or `--skip=a,b`. Ages: `--log-days`
|
|
71
|
-
(default 30), `--archive-days` (90), `--scratch-hours` (48),
|
|
72
|
+
(default 30), `--archive-days` (90), `--artifact-days` (7), `--scratch-hours` (48),
|
|
72
73
|
`--build-hours` (12, for in-repo `.build` and DerivedData and XCTest
|
|
73
74
|
clones), `--orphan-minutes` (30), `--runtime-days` (30, for simulator
|
|
74
75
|
runtimes; the newest runtime per platform and one backing a booted device
|
|
@@ -42,11 +42,14 @@
|
|
|
42
42
|
*
|
|
43
43
|
* Usage:
|
|
44
44
|
* disk-cleaner.mjs [--dry-run] [--apply] [--only=a,b] [--skip=a,b]
|
|
45
|
-
* [--trash] [--transcripts] [--
|
|
45
|
+
* [--trash] [--transcripts] [--test-artifacts] [--unattended]
|
|
46
|
+
* [--include-recent]
|
|
46
47
|
* [--log-days=N] [--archive-days=N] [--transcript-days=N]
|
|
48
|
+
* [--artifact-days=N]
|
|
47
49
|
* [--scratch-hours=N] [--build-hours=N] [--orphan-minutes=N]
|
|
48
50
|
* [--runtime-days=N] [--depth=N] [--exclude=PATH]...
|
|
49
|
-
* [--root=DIR]... [--tmp-root=DIR]... [--
|
|
51
|
+
* [--root=DIR]... [--tmp-root=DIR]... [--artifact-root=DIR]...
|
|
52
|
+
* [--home=DIR]
|
|
50
53
|
* [--report=FILE] [--json] [--list] [--top=N]
|
|
51
54
|
*
|
|
52
55
|
* --root and --depth (defaults: the git repos under the usual dev folders,
|
|
@@ -54,6 +57,11 @@
|
|
|
54
57
|
* DISK_CLEANER_DEPTH; --exclude from DISK_CLEANER_EXCLUDE (colon-separated).
|
|
55
58
|
* An excluded path, and any candidate that holds it, is kept.
|
|
56
59
|
*
|
|
60
|
+
* --artifact-root, also DISK_CLEANER_ARTIFACT_ROOTS (colon-separated), adds a
|
|
61
|
+
* tree to search for test run output beside the dev roots. It is where a
|
|
62
|
+
* harness that keeps its results outside a repository is named, so no product's
|
|
63
|
+
* paths live in this file.
|
|
64
|
+
*
|
|
57
65
|
* Every category in the JSON report carries `top` (its largest items, real
|
|
58
66
|
* paths and sizes, 5 unless --top says otherwise), `more` (how many items
|
|
59
67
|
* `top` leaves out) and `kept` (how many items were kept, per reason). The
|
|
@@ -70,12 +78,15 @@
|
|
|
70
78
|
|
|
71
79
|
import { spawnSync } from "node:child_process";
|
|
72
80
|
import {
|
|
81
|
+
closeSync,
|
|
73
82
|
existsSync,
|
|
74
83
|
lstatSync,
|
|
75
84
|
mkdirSync,
|
|
85
|
+
openSync,
|
|
76
86
|
readdirSync,
|
|
77
87
|
realpathSync,
|
|
78
88
|
readFileSync,
|
|
89
|
+
readSync,
|
|
79
90
|
rmSync,
|
|
80
91
|
statfsSync,
|
|
81
92
|
writeFileSync,
|
|
@@ -312,12 +323,14 @@ export function makeContext(o = {}) {
|
|
|
312
323
|
now: o.now ?? Date.now(),
|
|
313
324
|
tmpRoots,
|
|
314
325
|
devRoots: o.devRoots || defaultDevRoots(home),
|
|
326
|
+
artifactRoots: (o.artifactRoots || []).filter(Boolean).map((r) => nativeReal(r) || r),
|
|
315
327
|
scriptsDir: o.scriptsDir || defaultScriptsDir(home),
|
|
316
328
|
sessionId: o.sessionId ?? process.env.CLAUDE_CODE_SESSION_ID ?? "",
|
|
317
329
|
days: {
|
|
318
330
|
logs: o.logDays ?? 30,
|
|
319
331
|
archives: o.archiveDays ?? 90,
|
|
320
332
|
transcripts: o.transcriptDays ?? 90,
|
|
333
|
+
artifacts: o.artifactDays ?? 7,
|
|
321
334
|
},
|
|
322
335
|
includeRecent: Boolean(o.includeRecent),
|
|
323
336
|
scratchHours: o.scratchHours ?? 48,
|
|
@@ -328,6 +341,7 @@ export function makeContext(o = {}) {
|
|
|
328
341
|
maxDepth: o.maxDepth ?? MAX_WALK_DEPTH,
|
|
329
342
|
excludes: (o.excludes || []).filter(Boolean).map((p) => nativeReal(p) || p),
|
|
330
343
|
denied: new Set(),
|
|
344
|
+
trackedCache: new Map(),
|
|
331
345
|
run: o.run || realRun,
|
|
332
346
|
du: o.du || duBytes,
|
|
333
347
|
ps: () => (psCache ??= (o.ps || realPs)()),
|
|
@@ -669,6 +683,54 @@ const BUILD_SHAPE = {
|
|
|
669
683
|
};
|
|
670
684
|
BUILD_SHAPE[".DerivedData"] = BUILD_SHAPE.DerivedData;
|
|
671
685
|
|
|
686
|
+
// Build output under a name nobody can enumerate.
|
|
687
|
+
//
|
|
688
|
+
// Matching on the folder's NAME finds the default layouts and nothing else. A
|
|
689
|
+
// tool that points `-derivedDataPath` somewhere of its own choosing - a test
|
|
690
|
+
// harness giving each lane its own copy, a CI script, a wrapper that keeps one
|
|
691
|
+
// per scheme - writes the same tree under a name this file has never heard of.
|
|
692
|
+
// Measured on one machine: four such copies beside a repository's worktrees
|
|
693
|
+
// held 104 GB, the walk descended through all of it looking for a folder called
|
|
694
|
+
// DerivedData, and the report came back with 11 GB.
|
|
695
|
+
//
|
|
696
|
+
// So the shape decides, not the name. Both tools write a signature no source
|
|
697
|
+
// tree carries: Xcode writes `Build` beside its `.noindex` caches, SwiftPM a
|
|
698
|
+
// `build.db` beside its manifest and checkouts. `Build` or `build.db` is tested
|
|
699
|
+
// first, one stat, and the rest only when that hits - so an ordinary directory
|
|
700
|
+
// costs a single extra stat.
|
|
701
|
+
const SHAPE_SIGNATURES = Object.freeze([
|
|
702
|
+
{
|
|
703
|
+
kind: "DerivedData",
|
|
704
|
+
lead: "Build",
|
|
705
|
+
others: ["Index.noindex", "ModuleCache.noindex", "SourcePackages", "Logs", "info.plist"],
|
|
706
|
+
least: 2,
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
kind: ".build",
|
|
710
|
+
lead: "build.db",
|
|
711
|
+
others: ["manifest.db", "checkouts", "artifacts", "repositories", "index-build"],
|
|
712
|
+
least: 1,
|
|
713
|
+
},
|
|
714
|
+
]);
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* What a directory is, read from what it holds rather than what it is called.
|
|
718
|
+
*
|
|
719
|
+
* @param {string} dir
|
|
720
|
+
* @returns {"DerivedData"|".build"|null}
|
|
721
|
+
*/
|
|
722
|
+
function shapeOf(dir) {
|
|
723
|
+
for (const sig of SHAPE_SIGNATURES) {
|
|
724
|
+
if (!existsSync(join(dir, sig.lead))) continue;
|
|
725
|
+
let found = 0;
|
|
726
|
+
for (const n of sig.others) {
|
|
727
|
+
if (existsSync(join(dir, n))) found++;
|
|
728
|
+
if (found >= sig.least) return sig.kind;
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
return null;
|
|
732
|
+
}
|
|
733
|
+
|
|
672
734
|
function repoBuildCandidates(ctx, out) {
|
|
673
735
|
const maxAge = ctx.repoBuildHours * HOUR_MS;
|
|
674
736
|
const visit = (root, dir, depth) => {
|
|
@@ -684,9 +746,14 @@ function repoBuildCandidates(ctx, out) {
|
|
|
684
746
|
if (!e.isDirectory() || e.isSymbolicLink()) continue;
|
|
685
747
|
const p = join(dir, e.name);
|
|
686
748
|
if (devPruned(ctx, p, e.name)) continue;
|
|
687
|
-
|
|
749
|
+
// A folder with a build tool's NAME is a candidate when it also holds what
|
|
750
|
+
// that tool writes; one that does not is somebody's own directory, and the
|
|
751
|
+
// report says it was kept. A folder with any OTHER name is a candidate only
|
|
752
|
+
// when its shape says so, and then there is nothing to report about it.
|
|
753
|
+
const named = Boolean(BUILD_SHAPE[e.name]);
|
|
754
|
+
const shape = named ? BUILD_SHAPE[e.name] : BUILD_SHAPE[shapeOf(p) ?? ""];
|
|
688
755
|
if (shape) {
|
|
689
|
-
if (!shape.some((n) => existsSync(join(p, n)))) {
|
|
756
|
+
if (named && !shape.some((n) => existsSync(join(p, n)))) {
|
|
690
757
|
out.skipped.push({ path: p, reason: "does not look like build output" });
|
|
691
758
|
} else if (inUse(ctx, realOrNull(p) || p)) {
|
|
692
759
|
hold(out, p, "in use by a running process", "live");
|
|
@@ -784,6 +851,146 @@ function claudeScratchCandidates(ctx, out) {
|
|
|
784
851
|
}
|
|
785
852
|
}
|
|
786
853
|
|
|
854
|
+
// What a test run leaves behind, found by shape.
|
|
855
|
+
//
|
|
856
|
+
// A run writes three kinds of output and all three are regenerable by running
|
|
857
|
+
// it again: the result bundle, the recordings and screenshots taken while it
|
|
858
|
+
// ran, and the report files. They are also the biggest thing on a machine that
|
|
859
|
+
// runs a suite every night, and nothing deleted them.
|
|
860
|
+
//
|
|
861
|
+
// The shape is the only safe way to find them. Naming the directories one
|
|
862
|
+
// harness happens to use would tie this file to that harness, and this
|
|
863
|
+
// repository carries no product's paths - an extra root belongs in preferences
|
|
864
|
+
// (DISK_CLEANER_ARTIFACT_ROOTS, --artifact-root), not here. So a run is
|
|
865
|
+
// recognised by what every harness writes: a result bundle, or a report file
|
|
866
|
+
// shaped like a test report. Media and report files count only inside such a
|
|
867
|
+
// directory, so a recording somebody saved among their own files is never a
|
|
868
|
+
// candidate.
|
|
869
|
+
//
|
|
870
|
+
// Opt-in, never unattended: a recording can be the only evidence of a failure
|
|
871
|
+
// anybody still has.
|
|
872
|
+
const RESULT_BUNDLE = /\.xcresult$/i;
|
|
873
|
+
const RUN_MEDIA = /\.(?:mp4|mov|m4v|png|jpe?g|heic)$/i;
|
|
874
|
+
const RUN_REPORT = /\.(?:html?|json|xml|junit|txt|log)$/i;
|
|
875
|
+
const JUNIT_HEAD = /<testsuites?[\s>]/i;
|
|
876
|
+
|
|
877
|
+
/**
|
|
878
|
+
* The names git tracks in one directory, cached per directory.
|
|
879
|
+
*
|
|
880
|
+
* A run's output is not in version control; a test fixture is. Without this the
|
|
881
|
+
* shape rules read a committed `TEST-*.xml` as a run's report and offer to
|
|
882
|
+
* delete the repository's own fixtures - found on the first real run, against
|
|
883
|
+
* this repository's test tree.
|
|
884
|
+
*
|
|
885
|
+
* `ls-files` is asked once per directory and only for that directory, so a
|
|
886
|
+
* directory of run output, which is normally ignored, costs one call that
|
|
887
|
+
* returns nothing.
|
|
888
|
+
*
|
|
889
|
+
* @returns {Set<string>} basenames; empty when the directory is not in a repository
|
|
890
|
+
*/
|
|
891
|
+
function trackedNames(dir, ctx) {
|
|
892
|
+
const cached = ctx.trackedCache.get(dir);
|
|
893
|
+
if (cached) return cached;
|
|
894
|
+
const names = new Set();
|
|
895
|
+
const r = ctx.run("git", ["-C", dir, "ls-files", "-z", "--", "."], { timeout: 20_000 });
|
|
896
|
+
if (r.status === 0 && r.stdout) {
|
|
897
|
+
for (const rel of r.stdout.split("\0")) {
|
|
898
|
+
if (!rel) continue;
|
|
899
|
+
// `.` is this directory, so a path with a separator names something below
|
|
900
|
+
// it - and the first segment is what sits here.
|
|
901
|
+
names.add(rel.split("/")[0]);
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
ctx.trackedCache.set(dir, names);
|
|
905
|
+
return names;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
/** Does this directory hold a test run's output? */
|
|
909
|
+
function holdsRunOutput(dir, ctx) {
|
|
910
|
+
let names;
|
|
911
|
+
try {
|
|
912
|
+
names = listDir(dir, ctx).map((p) => basename(p));
|
|
913
|
+
} catch {
|
|
914
|
+
return false;
|
|
915
|
+
}
|
|
916
|
+
if (names.some((n) => RESULT_BUNDLE.test(n))) return true;
|
|
917
|
+
for (const n of names) {
|
|
918
|
+
if (!/\.xml$/i.test(n)) continue;
|
|
919
|
+
try {
|
|
920
|
+
// The head of the file, not the whole of it: a junit file can be large and
|
|
921
|
+
// the element that identifies it is the first one.
|
|
922
|
+
const fd = openSync(join(dir, n), "r");
|
|
923
|
+
try {
|
|
924
|
+
const buf = Buffer.alloc(512);
|
|
925
|
+
const read = readSync(fd, buf, 0, 512, 0);
|
|
926
|
+
if (JUNIT_HEAD.test(buf.subarray(0, read).toString("utf8"))) return true;
|
|
927
|
+
} finally {
|
|
928
|
+
closeSync(fd);
|
|
929
|
+
}
|
|
930
|
+
} catch {
|
|
931
|
+
/* unreadable; it decides nothing */
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
return false;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
function testArtifactCandidates(ctx, out) {
|
|
938
|
+
const maxAge = ctx.days.artifacts * DAY_MS;
|
|
939
|
+
const roots = [...ctx.devRoots, ...ctx.artifactRoots];
|
|
940
|
+
const seen = new Set();
|
|
941
|
+
for (const root of roots) {
|
|
942
|
+
if (seen.has(root) || !rootUsable(root, ctx, out)) continue;
|
|
943
|
+
seen.add(root);
|
|
944
|
+
const visit = (dir, depth) => {
|
|
945
|
+
if (depth > ctx.maxDepth) return;
|
|
946
|
+
let entries;
|
|
947
|
+
try {
|
|
948
|
+
entries = readdirSync(dir, { withFileTypes: true });
|
|
949
|
+
} catch (e) {
|
|
950
|
+
noteDenied(ctx, dir, e);
|
|
951
|
+
return;
|
|
952
|
+
}
|
|
953
|
+
// A result bundle is a directory. Take it whole and do not walk into it.
|
|
954
|
+
for (const e of entries) {
|
|
955
|
+
if (e.isSymbolicLink()) continue;
|
|
956
|
+
const path = join(dir, e.name);
|
|
957
|
+
if (e.isDirectory() && RESULT_BUNDLE.test(e.name)) {
|
|
958
|
+
take(path);
|
|
959
|
+
continue;
|
|
960
|
+
}
|
|
961
|
+
if (e.isDirectory()) {
|
|
962
|
+
if (WALK_SKIP.has(e.name) || devPruned(ctx, path, e.name)) continue;
|
|
963
|
+
if (e.name === ".git" || e.name === "node_modules" || e.name === "Pods") continue;
|
|
964
|
+
visit(path, depth + 1);
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
// Media and reports, only where a run's output is.
|
|
968
|
+
if (!holdsRunOutput(dir, ctx)) return;
|
|
969
|
+
for (const e of entries) {
|
|
970
|
+
if (!e.isFile() || e.isSymbolicLink()) continue;
|
|
971
|
+
if (!RUN_MEDIA.test(e.name) && !RUN_REPORT.test(e.name)) continue;
|
|
972
|
+
take(join(dir, e.name));
|
|
973
|
+
}
|
|
974
|
+
};
|
|
975
|
+
const take = (path) => {
|
|
976
|
+
if (trackedNames(dirname(path), ctx).has(basename(path))) {
|
|
977
|
+
out.skipped.push({ path, reason: "tracked by git" });
|
|
978
|
+
return;
|
|
979
|
+
}
|
|
980
|
+
if (!olderThan(path, maxAge, ctx)) {
|
|
981
|
+
hold(out, path, "touched recently", "age");
|
|
982
|
+
return;
|
|
983
|
+
}
|
|
984
|
+
if (inUse(ctx, realOrNull(path) || path)) {
|
|
985
|
+
hold(out, path, "in use by a running process", "live");
|
|
986
|
+
return;
|
|
987
|
+
}
|
|
988
|
+
addPath(out, ctx, path, [root]);
|
|
989
|
+
};
|
|
990
|
+
visit(root, 0);
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
|
|
787
994
|
function transcriptCandidates(ctx, out) {
|
|
788
995
|
const maxAge = ctx.days.transcripts * DAY_MS;
|
|
789
996
|
const roots = [H(ctx, ".claude", "projects"), H(ctx, ".codex", "sessions")];
|
|
@@ -1240,6 +1447,14 @@ export const CATEGORIES = [
|
|
|
1240
1447
|
optIn: "trash",
|
|
1241
1448
|
discover: (ctx, out) => childrenOf(ctx, out, [H(ctx, ".Trash")]),
|
|
1242
1449
|
},
|
|
1450
|
+
{
|
|
1451
|
+
id: "test-artifacts",
|
|
1452
|
+
label:
|
|
1453
|
+
"test run output under the dev and artifact roots, older than the artifact age: result bundles, recordings, screenshots and report files",
|
|
1454
|
+
unattended: false,
|
|
1455
|
+
optIn: "test-artifacts",
|
|
1456
|
+
discover: testArtifactCandidates,
|
|
1457
|
+
},
|
|
1243
1458
|
{
|
|
1244
1459
|
id: "transcripts",
|
|
1245
1460
|
label: "Claude Code and Codex session transcripts older than the transcript age",
|
|
@@ -1427,7 +1642,7 @@ export function applyPlan(ctx, planned) {
|
|
|
1427
1642
|
// ---------------------------------------------------------------- CLI
|
|
1428
1643
|
|
|
1429
1644
|
function parseCli(argv) {
|
|
1430
|
-
const o = { only: [], skip: [], tmpRoots: [], devRoots: [], excludes: [] };
|
|
1645
|
+
const o = { only: [], skip: [], tmpRoots: [], devRoots: [], artifactRoots: [], excludes: [] };
|
|
1431
1646
|
const num = (k, v) => {
|
|
1432
1647
|
if (!/^\d+$/.test(v)) throw new Error(`${k} needs a whole number, got "${v}"`);
|
|
1433
1648
|
return Number(v);
|
|
@@ -1445,6 +1660,7 @@ function parseCli(argv) {
|
|
|
1445
1660
|
break;
|
|
1446
1661
|
case "--trash":
|
|
1447
1662
|
case "--transcripts":
|
|
1663
|
+
case "--test-artifacts":
|
|
1448
1664
|
case "--unattended":
|
|
1449
1665
|
case "--json":
|
|
1450
1666
|
case "--list":
|
|
@@ -1457,6 +1673,13 @@ function parseCli(argv) {
|
|
|
1457
1673
|
if (!v) throw new Error("--exclude needs a path");
|
|
1458
1674
|
o.excludes.push(v);
|
|
1459
1675
|
break;
|
|
1676
|
+
case "--artifact-root":
|
|
1677
|
+
if (!v) throw new Error("--artifact-root needs a path");
|
|
1678
|
+
o.artifactRoots.push(v);
|
|
1679
|
+
break;
|
|
1680
|
+
case "--artifact-days":
|
|
1681
|
+
o.artifactDays = num(k, v);
|
|
1682
|
+
break;
|
|
1460
1683
|
case "--depth":
|
|
1461
1684
|
o.depth = num(k, v);
|
|
1462
1685
|
break;
|
|
@@ -1670,6 +1893,9 @@ export function main(argv, env = process.env) {
|
|
|
1670
1893
|
home: o.home,
|
|
1671
1894
|
tmpRoots: o.tmpRoots.length ? o.tmpRoots : undefined,
|
|
1672
1895
|
devRoots: o.devRoots.length ? o.devRoots : env.DISK_CLEANER_ROOTS?.split(":").filter(Boolean),
|
|
1896
|
+
artifactRoots: o.artifactRoots.length
|
|
1897
|
+
? o.artifactRoots
|
|
1898
|
+
: (env.DISK_CLEANER_ARTIFACT_ROOTS?.split(":").filter(Boolean) ?? []),
|
|
1673
1899
|
logDays: o.logDays,
|
|
1674
1900
|
archiveDays: o.archiveDays,
|
|
1675
1901
|
transcriptDays: o.transcriptDays,
|
|
@@ -1690,6 +1916,7 @@ export function main(argv, env = process.env) {
|
|
|
1690
1916
|
unattended,
|
|
1691
1917
|
trash: unattended ? false : o.trash,
|
|
1692
1918
|
transcripts: unattended ? false : o.transcripts,
|
|
1919
|
+
"test-artifacts": unattended ? false : o["test-artifacts"],
|
|
1693
1920
|
};
|
|
1694
1921
|
const before = diskStatus(ctx.home);
|
|
1695
1922
|
const planned = plan(ctx, sel);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
> Auto-generated by `pipeline/scripts/build-skills-index.mjs` - do not hand-edit.
|
|
4
4
|
> Regenerate with `node pipeline/scripts/build-skills-index.mjs`.
|
|
5
5
|
|
|
6
|
-
**
|
|
6
|
+
**259 skills** across 2 groups.
|
|
7
7
|
|
|
8
8
|
| Group | Name | Platform | Description |
|
|
9
9
|
|-------|------|----------|-------------|
|
|
@@ -189,6 +189,7 @@
|
|
|
189
189
|
| core | `multi-agent-testflight-validation` | - | iOS-pinned alias of store-ready: same three gates on an iOS build, one implementation. Validates a TestFlight / App Store package, never upl |
|
|
190
190
|
| core | `multi-agent-uninstall` | - | Uninstall the pipeline from Claude Code + Copilot CLI. Keychain access tokens are always left untouched; --all-data also clears pipeline set |
|
|
191
191
|
| core | `multi-agent-update` | - | Update the pipeline to the latest published npm release: registry check, npm pack, install, migrate. Use when the installed pipeline is behi |
|
|
192
|
+
| core | `multi-agent-version` | - | 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 |
|
|
192
193
|
| external | `musickit-audio` | - | MusicKit and MediaPlayer on iOS: Apple Music authorization, catalog search, subscription checks and offers, ApplicationMusicPlayer playback |
|
|
193
194
|
| external | `natural-language` | - | NaturalLanguage and Translation frameworks: tokenizing, language identification, part-of-speech tagging, named entities, sentiment, word and |
|
|
194
195
|
| external | `nextjs-routing` | - | Next.js 15+ App Router: Server/Client Components, Server Actions, data fetching, layouts, middleware, ISR/SSG/SSR, and routing patterns. Use |
|