@groundnuty/macf 0.2.38 → 0.2.39

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 (50) hide show
  1. package/dist/.build-info.json +2 -2
  2. package/dist/cli/claude-sh.d.ts.map +1 -1
  3. package/dist/cli/claude-sh.js +13 -0
  4. package/dist/cli/claude-sh.js.map +1 -1
  5. package/dist/cli/commands/fleet-doctor-inject.d.ts +52 -0
  6. package/dist/cli/commands/fleet-doctor-inject.d.ts.map +1 -0
  7. package/dist/cli/commands/fleet-doctor-inject.js +100 -0
  8. package/dist/cli/commands/fleet-doctor-inject.js.map +1 -0
  9. package/dist/cli/commands/fleet-doctor.d.ts +236 -0
  10. package/dist/cli/commands/fleet-doctor.d.ts.map +1 -0
  11. package/dist/cli/commands/fleet-doctor.js +481 -0
  12. package/dist/cli/commands/fleet-doctor.js.map +1 -0
  13. package/dist/cli/commands/fleet.d.ts +83 -0
  14. package/dist/cli/commands/fleet.d.ts.map +1 -0
  15. package/dist/cli/commands/fleet.js +225 -0
  16. package/dist/cli/commands/fleet.js.map +1 -0
  17. package/dist/cli/commands/init.d.ts.map +1 -1
  18. package/dist/cli/commands/init.js +8 -0
  19. package/dist/cli/commands/init.js.map +1 -1
  20. package/dist/cli/commands/migrate.d.ts +1 -0
  21. package/dist/cli/commands/migrate.d.ts.map +1 -1
  22. package/dist/cli/commands/registry-prune.d.ts +43 -6
  23. package/dist/cli/commands/registry-prune.d.ts.map +1 -1
  24. package/dist/cli/commands/registry-prune.js +53 -14
  25. package/dist/cli/commands/registry-prune.js.map +1 -1
  26. package/dist/cli/commands/restart-self.d.ts +111 -0
  27. package/dist/cli/commands/restart-self.d.ts.map +1 -0
  28. package/dist/cli/commands/restart-self.js +312 -0
  29. package/dist/cli/commands/restart-self.js.map +1 -0
  30. package/dist/cli/commands/routing-doctor-gh.d.ts +29 -0
  31. package/dist/cli/commands/routing-doctor-gh.d.ts.map +1 -0
  32. package/dist/cli/commands/routing-doctor-gh.js +103 -0
  33. package/dist/cli/commands/routing-doctor-gh.js.map +1 -0
  34. package/dist/cli/commands/routing-doctor.d.ts +183 -0
  35. package/dist/cli/commands/routing-doctor.d.ts.map +1 -0
  36. package/dist/cli/commands/routing-doctor.js +504 -0
  37. package/dist/cli/commands/routing-doctor.js.map +1 -0
  38. package/dist/cli/commands/update.d.ts.map +1 -1
  39. package/dist/cli/commands/update.js +9 -0
  40. package/dist/cli/commands/update.js.map +1 -1
  41. package/dist/cli/host-prelude.d.ts +50 -0
  42. package/dist/cli/host-prelude.d.ts.map +1 -0
  43. package/dist/cli/host-prelude.js +256 -0
  44. package/dist/cli/host-prelude.js.map +1 -0
  45. package/dist/cli/index.js +89 -0
  46. package/dist/cli/index.js.map +1 -1
  47. package/package.json +2 -2
  48. package/plugin/rules/coordination.md +10 -0
  49. package/plugin/rules/silent-fallback-hazards.md +19 -4
  50. package/scripts/emit-turn-receipt.sh +44 -4
@@ -0,0 +1,50 @@
1
+ /** The toolchain re-source backend the prelude emits. */
2
+ export type ToolchainBackend = 'devbox' | 'brew' | 'none';
3
+ /**
4
+ * Injected probe so `detectToolchainBackend` is unit-testable without
5
+ * touching the real filesystem / PATH.
6
+ *
7
+ * which(cmd) — resolve a command on PATH → its absolute path, or null
8
+ * exists(path) — does this absolute path exist (as a file)?
9
+ */
10
+ export interface ToolchainProbe {
11
+ readonly which: (cmd: string) => string | null;
12
+ readonly exists: (path: string) => boolean;
13
+ }
14
+ /** Result of toolchain detection: the backend + the absolute binary path. */
15
+ export interface ToolchainDetection {
16
+ readonly backend: ToolchainBackend;
17
+ /** Absolute path to the devbox / brew binary; null for the `none` backend. */
18
+ readonly path: string | null;
19
+ }
20
+ /**
21
+ * Detect the host toolchain backend + resolve the absolute binary path.
22
+ *
23
+ * Priority: devbox > brew > none.
24
+ *
25
+ * - devbox is resolvable on PATH → `{ backend: 'devbox', path }`.
26
+ * - else a brew binary exists at a known location (or on PATH) →
27
+ * `{ backend: 'brew', path }`.
28
+ * - else `{ backend: 'none', path: null }`.
29
+ *
30
+ * Pure given the injected `probe`. The real-FS probe is built by
31
+ * `writeHostPrelude` when no explicit detection is passed.
32
+ */
33
+ export declare function detectToolchainBackend(probe: ToolchainProbe): ToolchainDetection;
34
+ /**
35
+ * Build the `host-prelude.sh` content for a detection result. PURE — no I/O.
36
+ *
37
+ * Emits the dynamic re-source for devbox / brew (absolute, shell-quoted
38
+ * binary path; re-evaluated on every launch), or a no-op-with-guidance for
39
+ * `none`. A devbox/brew backend with a missing path defensively degrades to
40
+ * the no-op form rather than emit a broken `eval "$( shellenv)"`.
41
+ */
42
+ export declare function generateHostPrelude(detection: ToolchainDetection): string;
43
+ /**
44
+ * Write `.claude/.macf/host-prelude.sh` (mode 0644 — it is sourced, not
45
+ * executed). Detects the toolchain backend via the real-FS probe by default;
46
+ * `detection` is injectable for tests / explicit control. Creates
47
+ * `.claude/.macf/` with mkdir -p semantics. Returns the absolute path written.
48
+ */
49
+ export declare function writeHostPrelude(workspaceDir: string, detection?: ToolchainDetection): string;
50
+ //# sourceMappingURL=host-prelude.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host-prelude.d.ts","sourceRoot":"","sources":["../../src/cli/host-prelude.ts"],"names":[],"mappings":"AAoCA,yDAAyD;AACzD,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1D;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IAC/C,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;CAC5C;AAED,6EAA6E;AAC7E,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;IACnC,8EAA8E;IAC9E,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAcD;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,cAAc,GAAG,kBAAkB,CAqBhF;AAoDD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,kBAAkB,GAAG,MAAM,CA6DzE;AAiDD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,MAAM,EACpB,SAAS,CAAC,EAAE,kBAAkB,GAC7B,MAAM,CAQR"}
@@ -0,0 +1,256 @@
1
+ /**
2
+ * Host-toolchain bootstrap generator (DR-031 piece 4 — portable bootstrap).
3
+ *
4
+ * `claude.sh` today *inherits* the operator's login-shell toolchain (the
5
+ * brew / devbox PATH). cron, a detached restart-self relauncher (DR-031
6
+ * piece 3), and container entrypoints run with a MINIMAL env and do NOT
7
+ * inherit it — so `claude` / `jq` / `node` / `tmux` aren't found. The fix:
8
+ * the launch must **re-establish** its toolchain, not inherit it.
9
+ *
10
+ * Mechanism: a generated `.claude/.macf/host-prelude.sh` that `claude.sh`
11
+ * sources **FIRST** (before the `env.*` loop, the tmux self-wrap, and
12
+ * `exec claude`). The toolchain backend is detected at `macf init` /
13
+ * `macf update` time (this code runs in Node on the host, in the operator's
14
+ * full env), and the file emits a **DYNAMIC re-source** (e.g.
15
+ * `eval "$(/abs/brew shellenv)"`) — NOT a frozen PATH snapshot, so it can't
16
+ * go stale (DR-031 §"Portable bootstrap"). The same file path is consumed by
17
+ * restart-self's relauncher; keep it at exactly
18
+ * `.claude/.macf/host-prelude.sh`.
19
+ *
20
+ * Backends, in priority order:
21
+ * 1. devbox — this repo's mandatory toolchain. `eval "$(devbox global
22
+ * shellenv)"` recomputes the global Devbox (nix-profile) environment.
23
+ * Canonical idiom per jetify-com/devbox docs ("add to ~/.bashrc or
24
+ * ~/.zshrc: eval \"$(devbox global shellenv)\"").
25
+ * 2. brew — linuxbrew / macOS. `eval "$(<abs-brew> shellenv)"`.
26
+ * 3. none — a no-op prelude (managed header + guidance pointing the
27
+ * operator at the `env.local.<name>` extension convention).
28
+ *
29
+ * macf-managed: regenerated (re-detected) on every `macf update`. Operator
30
+ * host-specifics that auto-detection misses belong in a
31
+ * `.claude/.macf/env.local.<name>` file (sourced after the canonical env.*
32
+ * files), NOT here — this file is overwritten on every update.
33
+ */
34
+ import { accessSync, constants, mkdirSync, statSync, writeFileSync } from 'node:fs';
35
+ import { delimiter, join, resolve } from 'node:path';
36
+ /**
37
+ * Known absolute brew install locations, checked in order. A minimal-env
38
+ * launch context (cron / container) won't have brew on PATH, so the
39
+ * detection probes these absolute locations first, then falls back to a
40
+ * PATH lookup.
41
+ */
42
+ const BREW_KNOWN_LOCATIONS = [
43
+ '/home/linuxbrew/.linuxbrew/bin/brew', // linuxbrew (default)
44
+ '/opt/homebrew/bin/brew', // macOS Apple-silicon
45
+ '/usr/local/bin/brew', // macOS Intel / older
46
+ ];
47
+ /**
48
+ * Detect the host toolchain backend + resolve the absolute binary path.
49
+ *
50
+ * Priority: devbox > brew > none.
51
+ *
52
+ * - devbox is resolvable on PATH → `{ backend: 'devbox', path }`.
53
+ * - else a brew binary exists at a known location (or on PATH) →
54
+ * `{ backend: 'brew', path }`.
55
+ * - else `{ backend: 'none', path: null }`.
56
+ *
57
+ * Pure given the injected `probe`. The real-FS probe is built by
58
+ * `writeHostPrelude` when no explicit detection is passed.
59
+ */
60
+ export function detectToolchainBackend(probe) {
61
+ // Priority 1: devbox (this repo's mandatory toolchain).
62
+ const devbox = probe.which('devbox');
63
+ if (devbox !== null && devbox !== '') {
64
+ return { backend: 'devbox', path: devbox };
65
+ }
66
+ // Priority 2: brew. Known absolute locations first (the minimal-env launch
67
+ // context the prelude targets has no PATH to find brew on), then PATH.
68
+ for (const loc of BREW_KNOWN_LOCATIONS) {
69
+ if (probe.exists(loc)) {
70
+ return { backend: 'brew', path: loc };
71
+ }
72
+ }
73
+ const brewOnPath = probe.which('brew');
74
+ if (brewOnPath !== null && brewOnPath !== '') {
75
+ return { backend: 'brew', path: brewOnPath };
76
+ }
77
+ // Priority 3: none.
78
+ return { backend: 'none', path: null };
79
+ }
80
+ /**
81
+ * POSIX single-quote a string for safe embedding in the `eval "$(... )"`
82
+ * command substitution. Wraps in single quotes and escapes any embedded
83
+ * single quote via the canonical `'\''` sequence, so a brew/devbox path
84
+ * containing spaces (or, rarely, quotes) doesn't break the substitution.
85
+ */
86
+ function shellSingleQuote(s) {
87
+ return `'${s.replace(/'/g, `'\\''`)}'`;
88
+ }
89
+ const SCHEMA_VERSION_LINE = '# schema_version: 1';
90
+ /**
91
+ * Managed-file header for host-prelude.sh. Mirrors the warn-on-hand-edit
92
+ * framing of the sibling `.claude/.macf/` managed files (see
93
+ * `env-files.ts`), adapted for the prelude's "re-detected on every update"
94
+ * contract + its sourced-FIRST role.
95
+ */
96
+ function managedHeaderLines() {
97
+ return [
98
+ '# This file is managed by `macf`. Do not edit directly — it is',
99
+ '# overwritten (re-detected) on the next `macf update`. The template',
100
+ '# lives at groundnuty/macf:src/cli/host-prelude.ts (`generateHostPrelude`).',
101
+ '# To change it, file an issue or PR against that file, then run',
102
+ '# `macf update` here.',
103
+ '#',
104
+ '# This file is SOURCED (not executed) by claude.sh — FIRST, before the',
105
+ '# .claude/.macf/env.* loop, the tmux self-wrap, and `exec claude` — so the',
106
+ '# host toolchain (claude / jq / node / tmux) is on PATH even when the',
107
+ '# launch context has a MINIMAL env that did not inherit the operator',
108
+ '# login-shell PATH: cron, a detached restart-self relauncher (DR-031',
109
+ "# piece 3), or a container entrypoint. The same path is consumed by",
110
+ "# restart-self's relauncher — keep it at exactly",
111
+ '# .claude/.macf/host-prelude.sh.',
112
+ ];
113
+ }
114
+ /**
115
+ * Shared guidance comment: where operator host-specifics belong (NOT here,
116
+ * since this file is regenerated on every `macf update`).
117
+ */
118
+ const ENV_LOCAL_GUIDANCE = [
119
+ '#',
120
+ '# Host-specifics that auto-detection misses do NOT belong here (this file',
121
+ '# is regenerated on every `macf update`). Put them in a',
122
+ '# `.claude/.macf/env.local.<name>` file — it sources AFTER the canonical',
123
+ '# env.* files (the env.local.* / env.zz.* extension convention claude.sh',
124
+ '# documents).',
125
+ ];
126
+ /**
127
+ * Build the `host-prelude.sh` content for a detection result. PURE — no I/O.
128
+ *
129
+ * Emits the dynamic re-source for devbox / brew (absolute, shell-quoted
130
+ * binary path; re-evaluated on every launch), or a no-op-with-guidance for
131
+ * `none`. A devbox/brew backend with a missing path defensively degrades to
132
+ * the no-op form rather than emit a broken `eval "$( shellenv)"`.
133
+ */
134
+ export function generateHostPrelude(detection) {
135
+ const header = [...managedHeaderLines(), SCHEMA_VERSION_LINE, ''];
136
+ const hasPath = detection.path !== null && detection.path !== '';
137
+ const backend = (detection.backend === 'devbox' || detection.backend === 'brew') && !hasPath
138
+ ? 'none'
139
+ : detection.backend;
140
+ switch (backend) {
141
+ case 'devbox': {
142
+ const quoted = shellSingleQuote(detection.path);
143
+ const body = [
144
+ '# Generator: generateHostPrelude (host-prelude.ts) — backend: devbox',
145
+ '#',
146
+ '# Dynamic re-source (re-evaluated on EVERY launch), NOT a frozen PATH',
147
+ '# snapshot — so the toolchain can never go stale. `devbox global',
148
+ '# shellenv` recomputes the global Devbox environment (its nix profile)',
149
+ '# and prints the export lines; eval applies them to this shell. The',
150
+ '# absolute path to the devbox binary was detected at `macf init` /',
151
+ '# `macf update` time, because a minimal-env launch context has no PATH',
152
+ '# to find it on. Canonical idiom per jetify-com/devbox docs.',
153
+ ...ENV_LOCAL_GUIDANCE,
154
+ `eval "$(${quoted} global shellenv)"`,
155
+ ];
156
+ return assemble(header, body);
157
+ }
158
+ case 'brew': {
159
+ const quoted = shellSingleQuote(detection.path);
160
+ const body = [
161
+ '# Generator: generateHostPrelude (host-prelude.ts) — backend: brew',
162
+ '#',
163
+ '# Dynamic re-source (re-evaluated on EVERY launch), NOT a frozen PATH',
164
+ '# snapshot — so the toolchain can never go stale. `brew shellenv`',
165
+ '# prints the export lines that put the Homebrew prefix on PATH; eval',
166
+ '# applies them. The absolute path to the brew binary was detected at',
167
+ '# `macf init` / `macf update` time, because a minimal-env launch',
168
+ '# context has no PATH to find it on.',
169
+ ...ENV_LOCAL_GUIDANCE,
170
+ `eval "$(${quoted} shellenv)"`,
171
+ ];
172
+ return assemble(header, body);
173
+ }
174
+ case 'none': {
175
+ const body = [
176
+ '# Generator: generateHostPrelude (host-prelude.ts) — backend: none',
177
+ '#',
178
+ '# No devbox or brew toolchain was found at `macf init` / `macf update`',
179
+ '# time, so this prelude is intentionally a NO-OP: claude.sh sources it',
180
+ '# but nothing re-establishes a toolchain. If a minimal-env launch (cron,',
181
+ "# the restart-self relauncher, or a container entrypoint) can't find",
182
+ '# `claude` / `jq` / `node`, add the toolchain setup to a',
183
+ '# `.claude/.macf/env.local.<name>` file (sourced AFTER the canonical',
184
+ '# env.* files — the env.local.* / env.zz.* extension convention claude.sh',
185
+ '# documents). Do NOT add it here: `macf update` re-detects + regenerates',
186
+ '# this managed file on every run, so hand-edits are lost.',
187
+ ':', // bash no-op so the sourced file always has a runnable body
188
+ ];
189
+ return assemble(header, body);
190
+ }
191
+ }
192
+ }
193
+ /**
194
+ * Join header + body lines with a trailing newline. The schema_version line
195
+ * lives in `header` (right after the comment block), matching the env-files
196
+ * `assemble` shape.
197
+ */
198
+ function assemble(header, body) {
199
+ return [...header, ...body, ''].join('\n');
200
+ }
201
+ /**
202
+ * Real-filesystem probe used when `writeHostPrelude` is called without an
203
+ * explicit detection. `which` scans `$PATH`; `exists` stats the path.
204
+ */
205
+ function realProbe() {
206
+ return {
207
+ which: whichOnPath,
208
+ exists: (p) => {
209
+ try {
210
+ return statSync(p).isFile();
211
+ }
212
+ catch {
213
+ return false;
214
+ }
215
+ },
216
+ };
217
+ }
218
+ /**
219
+ * Resolve a command to its absolute path by scanning `$PATH` (dependency-free
220
+ * `which`). Returns the first PATH entry that holds an executable file of
221
+ * that name, or null. Skips empty PATH segments.
222
+ */
223
+ function whichOnPath(cmd) {
224
+ const pathEnv = process.env['PATH'] ?? '';
225
+ for (const dir of pathEnv.split(delimiter)) {
226
+ if (dir === '')
227
+ continue;
228
+ const candidate = join(dir, cmd);
229
+ try {
230
+ if (!statSync(candidate).isFile())
231
+ continue;
232
+ accessSync(candidate, constants.X_OK);
233
+ return candidate;
234
+ }
235
+ catch {
236
+ // missing or not executable — keep scanning.
237
+ }
238
+ }
239
+ return null;
240
+ }
241
+ /**
242
+ * Write `.claude/.macf/host-prelude.sh` (mode 0644 — it is sourced, not
243
+ * executed). Detects the toolchain backend via the real-FS probe by default;
244
+ * `detection` is injectable for tests / explicit control. Creates
245
+ * `.claude/.macf/` with mkdir -p semantics. Returns the absolute path written.
246
+ */
247
+ export function writeHostPrelude(workspaceDir, detection) {
248
+ const absDir = resolve(workspaceDir);
249
+ const envDir = join(absDir, '.claude', '.macf');
250
+ mkdirSync(envDir, { recursive: true });
251
+ const path = join(envDir, 'host-prelude.sh');
252
+ const resolved = detection ?? detectToolchainBackend(realProbe());
253
+ writeFileSync(path, generateHostPrelude(resolved), { mode: 0o644 });
254
+ return path;
255
+ }
256
+ //# sourceMappingURL=host-prelude.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host-prelude.js","sourceRoot":"","sources":["../../src/cli/host-prelude.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACpF,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwBrD;;;;;GAKG;AACH,MAAM,oBAAoB,GAAsB;IAC9C,qCAAqC,EAAE,sBAAsB;IAC7D,wBAAwB,EAAE,sBAAsB;IAChD,qBAAqB,EAAE,sBAAsB;CAC9C,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAqB;IAC1D,wDAAwD;IACx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E,GAAG,CAAC,CAAC;QACjC,IAAI,CAAC;YACH,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE;gBAAE,SAAS;YAC5C,UAAU,CAAC,SAAS,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;YACtC,OAAO,SAAS,CAAC;QACnB,CAAC;QAAC,MAAM,CAAC;YACP,6CAA6C;QAC/C,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAC9B,YAAoB,EACpB,SAA8B;IAE9B,MAAM,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACrC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAChD,SAAS,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACvC,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IAC7C,MAAM,QAAQ,GAAG,SAAS,IAAI,sBAAsB,CAAC,SAAS,EAAE,CAAC,CAAC;IAClE,aAAa,CAAC,IAAI,EAAE,mBAAmB,CAAC,QAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACpE,OAAO,IAAI,CAAC;AACd,CAAC"}
package/dist/cli/index.js CHANGED
@@ -10,7 +10,11 @@ import { update } from './commands/update.js';
10
10
  import { showStatus } from './commands/status.js';
11
11
  import { listPeers } from './commands/peers.js';
12
12
  import { runPs } from './commands/ps.js';
13
+ import { runFleetStatus } from './commands/fleet.js';
14
+ import { runFleetDoctor } from './commands/fleet-doctor.js';
15
+ import { runRoutingDoctor } from './commands/routing-doctor.js';
13
16
  import { runRegistryPrune } from './commands/registry-prune.js';
17
+ import { runRestartSelfCommand } from './commands/restart-self.js';
14
18
  import { certsInit, certsRecover, certsRotate, issueRoutingClient } from './commands/certs.js';
15
19
  import { repoInit } from './commands/repo-init.js';
16
20
  import { rulesRefresh } from './commands/rules-refresh.js';
@@ -226,6 +230,68 @@ program
226
230
  .action(() => {
227
231
  process.exitCode = runPs();
228
232
  });
233
+ const fleet = program
234
+ .command('fleet')
235
+ .description('Fleet roster + interconnect-health (DR-030)');
236
+ fleet
237
+ .command('status')
238
+ .description('Roster + LIVE health for every registered agent: NAME / HOST:PORT / ' +
239
+ 'online-offline (mTLS /health) / uptime + the present self-report fields ' +
240
+ '(instance_id, cert_expiry warn<30d/crit<7d, and idle/busy state + otel ' +
241
+ 'reachability when the agent reports them). Reachable + self-reports only — ' +
242
+ 'no inject/delivery probes (those are later DR-030 increments).')
243
+ .option('--json', 'Emit the structured roster as JSON for automation', false)
244
+ .option('--dir <path>', 'Project directory (defaults to auto-discovery from cwd)')
245
+ .action(async (opts) => {
246
+ const code = await runFleetStatus(resolveProjectDir(opts.dir), { json: opts.json });
247
+ process.exitCode = code;
248
+ });
249
+ fleet
250
+ .command('doctor')
251
+ .description('Mesh-interconnect test per registered agent. DEFAULT (non-invasive): ' +
252
+ 'REACHABLE (mTLS /health answers) + ACCEPTED (diagnostic mTLS /notify ACK — ' +
253
+ '200 + ack + correlation-token echo) — proves protocol-reaches-server ONLY. ' +
254
+ 'With --inject (INVASIVE): also PROCESSED — routes a REAL marker-bearing /notify ' +
255
+ 'to each reachable agent, WAKING it, then matches the echoed run_id off ' +
256
+ '/health.last_processed to prove the full deliver→process chain. --inject is the ' +
257
+ 'IDLE-agent fallback (prefer passive last_processed for a busy agent); a timeout ' +
258
+ 'is UNCONFIRMED (possibly busy), NOT a gap. Exits non-zero when DEGRADED ' +
259
+ '(Reachable+Accepted; PROCESSED does not affect the verdict).')
260
+ .option('--json', 'Emit the structured per-agent result as JSON (DR-031 watchdog contract)', false)
261
+ .option('--inject', 'INVASIVE Processed-now delivery-proof: routes a real probe + wakes each reachable agent', false)
262
+ .option('--inject-timeout <sec>', 'Per-agent poll budget for --inject, in seconds (default 24)', (v) => parseInt(v, 10))
263
+ .option('--dir <path>', 'Project directory (defaults to auto-discovery from cwd)')
264
+ .action(async (opts) => {
265
+ const code = await runFleetDoctor(resolveProjectDir(opts.dir), {
266
+ json: opts.json,
267
+ inject: opts.inject,
268
+ injectTimeoutSec: opts.injectTimeout,
269
+ });
270
+ process.exitCode = code;
271
+ });
272
+ const routing = program
273
+ .command('routing')
274
+ .description('Routing-infra (GitHub delivery plane) interconnect-health (DR-030)');
275
+ routing
276
+ .command('doctor')
277
+ .description('Routing-infra interconnect check (DR-030 phase-2): STATIC GitHub-plane checks ' +
278
+ 'that the delivery plane is wired right — (1) CALLER-PIN consistency across the ' +
279
+ 'App install-set, (2) the #538 split: ROUTABLE (MACF_AGENT_<LABEL> registry key) ' +
280
+ '+ SELF-SKIP (agent-config app_name == bot-login, #566), (3) registration ' +
281
+ 'FRESHNESS (registry instance_id == live /health), (4) MACF_CA_CERT present + ' +
282
+ 'parses (#563), (5) tmux_session <project>@<agent> convention. These prove the ' +
283
+ 'PLUMBING, NOT end-to-end delivery (that is --e2e, a later increment). Exits ' +
284
+ 'non-zero when DEGRADED.')
285
+ .option('--json', 'Emit the structured per-check result as JSON (DR-031 watchdog contract)', false)
286
+ .option('--expected-pin <pin>', 'Expected macf-actions caller-pin (else the modal pin across the fleet)')
287
+ .option('--dir <path>', 'Project directory (defaults to auto-discovery from cwd)')
288
+ .action(async (opts) => {
289
+ const code = await runRoutingDoctor(resolveProjectDir(opts.dir), {
290
+ json: opts.json,
291
+ expectedPin: opts.expectedPin,
292
+ });
293
+ process.exitCode = code;
294
+ });
229
295
  const registry = program
230
296
  .command('registry')
231
297
  .description('Registry maintenance');
@@ -239,6 +305,29 @@ registry
239
305
  const code = await runRegistryPrune(resolveProjectDir(opts.dir), { yes: opts.yes });
240
306
  process.exitCode = code;
241
307
  });
308
+ program
309
+ .command('restart-self')
310
+ .description('DR-031 piece 3 (be-replaceable): prepare the workspace + spawn a DETACHED ' +
311
+ 'relauncher that OUTLIVES this session, so a watchdog (or the agent) can ' +
312
+ 'trigger a clean restart without losing work. DRY-RUN BY DEFAULT — emits the ' +
313
+ 'plan (marked-stash, RESUME-note, relauncher cmd, session to kill) and does ' +
314
+ 'NOTHING without --confirm. With --confirm: marked-stash any uncommitted ' +
315
+ 'tracked changes -> RESUME-note -> spawn detached relauncher -> kill the ' +
316
+ 'current tmux session (the restart trigger).')
317
+ .option('--reason <fault|upgrade|manual>', 'Restart driver (fault/upgrade/manual)', 'manual')
318
+ .option('--confirm', 'Actually act (otherwise dry-run)', false)
319
+ .option('--dry-run', 'Force dry-run even with --confirm (the safer wins)', false)
320
+ .option('--json', 'Emit the structured plan/result as JSON', false)
321
+ .option('--dir <path>', 'Project directory (defaults to auto-discovery from cwd)')
322
+ .action(async (opts) => {
323
+ const code = await runRestartSelfCommand(resolveProjectDir(opts.dir), {
324
+ reason: opts.reason,
325
+ confirm: opts.confirm,
326
+ dryRun: opts.dryRun,
327
+ json: opts.json,
328
+ });
329
+ process.exitCode = code;
330
+ });
242
331
  const certs = program
243
332
  .command('certs')
244
333
  .description('Certificate management');
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AACA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAA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AAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groundnuty/macf",
3
- "version": "0.2.38",
3
+ "version": "0.2.39",
4
4
  "description": "Multi-Agent Coordination Framework CLI — coordinate Claude Code agents via GitHub. Installs as `macf` binary; use `macf init` to set up an agent workspace, `macf update` to refresh rules + version pins.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -35,7 +35,7 @@
35
35
  "test:watch": "vitest"
36
36
  },
37
37
  "dependencies": {
38
- "@groundnuty/macf-core": "0.2.38",
38
+ "@groundnuty/macf-core": "0.2.39",
39
39
  "commander": "^14.0.3",
40
40
  "reflect-metadata": "^0.2.2",
41
41
  "zod": "^4.0.0"
@@ -136,6 +136,16 @@ The rules here are topology-agnostic: they work whether the project uses a scien
136
136
 
137
137
  **Verified motivation:** three operator-surfaced stalls where a peer's review request sat idle (42 min in one case; ~2.5 h in another) because the reviewer went idle without sweeping — the ping had arrived during a long single-threaded task and was never picked back up. In each case the peer's PR was blocked the entire time on a formal approval that never came.
138
138
 
139
+ **(c) Sweep your GATES against GitHub state — don't wait for a ping that may never come.** §5(a)/(b) cover the REVIEWER's inbound obligation (review requests addressed to you). The symmetric gap they don't cover: when YOUR next action is gated on a review/approval landing on **someone else's PR** — you are the *gate-owner*, not the PR author and not the requested reviewer — `route-by-pr-review-state` notifies only the **PR author**, NOT you. A review that clears your gate fires **no signal to you**, and your gate silently reads "pending" (this is `silent-fallback-hazards.md` Instance 13: reviewer ≠ next-actor, which is the *common* case once a fleet collaborates freely). Before recording a gate as satisfied OR as still-blocked, assert its artifact directly:
140
+
141
+ # Does the approval my next step is gated on actually exist?
142
+ gh pr view <N> --repo <owner>/<repo> --json reviews \
143
+ --jq '[.reviews[] | select(.author.login=="<gate-reviewer>" and .state=="APPROVED")] | length'
144
+
145
+ This is the result-invariant (Pattern A) at the **gate boundary** — clear the gate from GitHub state, never from "did I get pinged." It generalizes §5(b)'s reviewer-sweep from the *requested-reviewer* side to the *gate-owner* side. A reviewer **SHOULD** also @mention a known gate-owner in the review body (`route-by-mention` carries it) as a courtesy — but that depends on the reviewer remembering, so the gate-owner's own sweep is the load-bearing defense, not the courtesy.
146
+
147
+ **Verified motivation:** `groundnuty/macf` PR #574 (2026-06-26) — code-agent's approval was the framework-feasibility gate devops's impl work depended on; `route-by-pr-review-state` notified the PR author (science) only, devops received no signal, and its gate read "code's review still pending" though the APPROVED review existed. Resolved only by a manual relay + an operator-prompted direct channel push. A one-line gate-sweep would have cleared it immediately.
148
+
139
149
  ---
140
150
 
141
151
  ## When You're Stuck — Escalation
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **Workspaces without full `macf init`** (e.g. `groundnuty/macf` itself, or any Claude Code workspace operated by a bot that isn't a MACF-registered agent) can still get this canonical rule via `macf rules refresh --dir <workspace>`. Same copy, no App credentials or registry required.
6
6
 
7
- This rule names the CLASS so agents recognize the shape on first encounter rather than re-discovering each instance from scratch. Eleven active instances are documented below as worked examples spanning different architectural layers (identity, parsing, TUI binding, observability routing, config substitution, multi-agent coordination protocol, metric-instrumentation lifecycle, observability-endpoint routing, release-pipeline-partial-publish, third-party-action retry-exhaustion, credential-refresh temporal-binding). (Instance 10 — a legacy substrate-routing receipt-gap — was retired 2026-06-07; its number is kept, not reused.) Ten of eleven active instances have structural defenses applied or in flight — the pattern of defense generalizes alongside the pattern of hazard.
7
+ This rule names the CLASS so agents recognize the shape on first encounter rather than re-discovering each instance from scratch. Twelve active instances are documented below as worked examples spanning different architectural layers (identity, parsing, TUI binding, observability routing, config substitution, multi-agent coordination protocol, metric-instrumentation lifecycle, observability-endpoint routing, release-pipeline-partial-publish, third-party-action retry-exhaustion, credential-refresh temporal-binding, multi-agent review-gate routing). (Instance 10 — a legacy substrate-routing receipt-gap — was retired 2026-06-07; its number is kept, not reused.) Eleven of twelve active instances have structural defenses applied or in flight — the pattern of defense generalizes alongside the pattern of hazard.
8
8
 
9
9
  Instance 9 is annotated as **sister-shape** (failure correctly surfaced + partial side-effect breaks retry idempotency) — listed here for cross-reference convenience but warrants a sibling canonical rule (`partial-side-effect-hazards.md`) if more instances surface. The two classes share "multi-step pipeline where consumer assumes atomicity" but the failure surface differs: silent-fallback hides at the API boundary; partial-side-effect surfaces loudly but persists semi-state.
10
10
 
@@ -219,6 +219,20 @@ Two adjacent sub-failures: **(a)** `export X=$(helper)` masks a fail-loud helper
219
219
 
220
220
  ---
221
221
 
222
+ ### Instance 13 — PR-review-state routing strands interested third-party gate-owners (reviewer ≠ next-actor)
223
+
224
+ **Surface:** `route-by-pr-review-state` (macf-actions v3.3.0+) — fires on `pull_request_review.submitted` (state in {approved, changes_requested}) and notifies the **PR author's** channel-server.
225
+
226
+ **Failure shape:** the review is submitted + routed successfully (API success: webhook fires, author notified, HTTP 200). But in a multi-agent fleet the party who needs to know a review landed is frequently NOT the author — it is a **third agent whose own work is gated on that review** (build-gate owner, downstream implementer, coordinator). `route-by-pr-review-state` has no path to that third party; the blocked agent receives nothing and its gate **silently reads "pending"** though the review exists — invisible until the gate stalls and a human notices. `route-by-mention` CAN reach a third party IF the reviewer @mentions them in the review body, but the body is naturally addressed to the author, so the convention is forgotten: the capability exists, the discipline doesn't.
227
+
228
+ **Recurrence:** First confirmed — `groundnuty/macf` PR #574 (2026-06-26). `macf-devops-agent` APPROVED `17:07:10Z`, then was gated for its impl work on `macf-code-agent`'s framework-feasibility approval; code-agent APPROVED 31 s later (`17:07:41Z`); `route-by-pr-review-state` notified the author (`macf-science-agent`) only, and code's review body @mentioned only science, never devops (auditor-re-verified against the `/pulls/574/reviews` API + bodies + thread). The downstream consequence (devops's gate read "pending"; resolved by a manual relay + an operator-prompted direct channel push) is code-agent's reported channel trace, not GitHub-re-verifiable — the GitHub-observable structure above fully supports the mechanism regardless. **Scales worse with fleet size:** in a 2-agent author↔reviewer loop the author IS the next actor; in an N-agent fleet where a review unblocks a *different* agent, "reviewer ≠ next-actor" is the common case — which is why this surfaced exactly as the fleet began collaborating more freely.
229
+
230
+ **Defense status:** Pattern A (result-invariant at the gate boundary) is load-bearing — a gate-owner clears its gate by **asserting the artifact exists on GitHub** (does an APPROVED review exist on the PR my gate depends on?), never by waiting for a ping. Codified as the `coordination.md §Communication 5(c)` gate-sweep refinement (cheap, immediate, no code change) — it generalizes the existing §5(b) reviewer-sweep from the *requested-reviewer* side to the *gate-owner* side. Deeper structural retirement (cf. Instances 3/6): extend `route-by-pr-review-state` to also route to review-body @mentions — a macf-actions follow-up (filed as `groundnuty/macf-actions#57`). Reviewer-@mentions-the-gate-owner is a complementary courtesy folded into §5(c) as a SHOULD, not load-bearing (it depends on the reviewer remembering).
231
+
232
+ **Pattern:** A (gate-side result-invariant assert) + structural route-extension.
233
+
234
+ ---
235
+
222
236
  ## How to recognize the class on first encounter
223
237
 
224
238
  When investigating a "the operation completed but the outcome is wrong" incident, suspect silent-fallback if ANY of:
@@ -360,7 +374,7 @@ Silent-fallback hazards are **architectural**, not implementation bugs. They eme
360
374
 
361
375
  For coordination-system safety analysis: this is a class of hazards multi-agent systems must explicitly defend against. Each new instance teaches the same lesson; the class-name is what makes the lesson transferable across agents.
362
376
 
363
- ### Defense-pattern emergence (9-of-10 active instances have structural defense applied or shipped)
377
+ ### Defense-pattern emergence (11-of-12 active instances have structural defense applied or shipped)
364
378
 
365
379
  | Instance | Surface | Structural defense | Pattern |
366
380
  |---|---|---|---|
@@ -375,8 +389,9 @@ For coordination-system safety analysis: this is a class of hazards multi-agent
375
389
  | 9 — Sigstore TLOG orphans on failed npm publish (sister-class) | npm publish + sigstore attestation pipeline | Three-defense composite: bump-version recovery (DR-022 Amendment L) + pre-flight registry-collision check (Pattern D analog, macf#380) + TLOG-state observability (devops-toolkit#74+#77 Grafana dashboard live) | Pattern D analog (pre-flight precheck) + recovery-procedure-codification |
376
390
  | 11 — Third-party retry-wrapping action exits 0 on retry-exhaustion | Consumer-CI connect/auth via third-party action (tailnet, OTLP, cloud-auth, registry-login) | SHIPPED — "Verify <resource> is up" step immediately after the connect asserts the connection's result-invariant (e.g. `tailscale status` `BackendState == "Running"`) + fails LOUD; never trusts the action's exit code about its own retry exhaustion (macf#461) | Pattern A (post-connect result-invariant assert) + Pattern D flavor (precheck-before-downstream) |
377
391
  | 12 — PreToolUse credential-guard validates ambient token, blind to inline reassignment | gh-token PreToolUse hook + inline `export GH_TOKEN=$(...) && gh` (refresh-chain or file-cache) | DOC shipped (de-footgun `gh-token-refresh.md` + atomic-validated cache) + STRUCTURAL in flight (Pattern A result-invariant PostToolUse whoami post-check, macf#489) | Pattern A (result-invariant post-check — a wrong-temporal-level precondition can't see the inline clobber) |
392
+ | 13 — PR-review-state routing strands third-party gate-owners (reviewer ≠ next-actor) | `route-by-pr-review-state` notifies the PR author only; a review that clears a *third* agent's gate fires no signal to that agent | Codified — `coordination.md §Communication 5(c)` gate-sweep (assert the APPROVED review exists on GitHub, don't wait for a ping); generalizes the §5(b) reviewer-sweep to the gate-owner side. Structural retirement (route review-state to body-@mentions) is a macf-actions follow-up | Pattern A (gate-side result-invariant assert) + structural route-extension |
378
393
 
379
- Ten of eleven active instances have structural defense applied, shipped, or in flight. Defense patterns (A, B, C, D, E) generalize across instances — they're reusable defense templates, not case-specific fixes. **Pattern A (result-invariant assertion at the boundary) bears the most weight** — it's the structural defense for instances 4, 7, 8, 11, AND 12 (5 of 11), each at a different architectural boundary (logs pipeline, metric counter, observability endpoint, third-party-action connect-verify, credential-refresh temporal-binding). Instance 8's five-surface defense topology (consumer canonical + cluster-side compat port-map + concrete Pattern A impl) demonstrates that structural defense at the observability-pipeline-class can compose across architectural layers — the canonical-distribution layer + the cluster-infrastructure layer + the assertion-script layer all reinforce each other rather than substituting for each other. Instance 9 demonstrates that the Pattern D template generalizes from workflow-secrets-prechecks to release-pipeline-prechecks AND that recovery-procedure-codification (DR-022 Amendment L's bump-version-not-tag-retry) is its own defense category — distinct from detection-pre-merge defenses (Patterns A/B/D) and discrimination-at-receiver defenses (Pattern E).
394
+ Eleven of twelve active instances have structural defense applied, shipped, or in flight. Defense patterns (A, B, C, D, E) generalize across instances — they're reusable defense templates, not case-specific fixes. **Pattern A (result-invariant assertion at the boundary) bears the most weight** — it's the structural defense for instances 4, 7, 8, 11, 12, AND 13 (6 of 12), each at a different architectural boundary (logs pipeline, metric counter, observability endpoint, third-party-action connect-verify, credential-refresh temporal-binding, multi-agent review-gate boundary). Instance 8's five-surface defense topology (consumer canonical + cluster-side compat port-map + concrete Pattern A impl) demonstrates that structural defense at the observability-pipeline-class can compose across architectural layers — the canonical-distribution layer + the cluster-infrastructure layer + the assertion-script layer all reinforce each other rather than substituting for each other. Instance 9 demonstrates that the Pattern D template generalizes from workflow-secrets-prechecks to release-pipeline-prechecks AND that recovery-procedure-codification (DR-022 Amendment L's bump-version-not-tag-retry) is its own defense category — distinct from detection-pre-merge defenses (Patterns A/B/D) and discrimination-at-receiver defenses (Pattern E).
380
395
 
381
396
  The breadth of layers spanned by 5 different defense patterns (identity, parsing, TUI binding, observability routing, config substitution, multi-agent coordination protocol, metric-instrumentation lifecycle, observability-endpoint routing, release-pipeline-partial-publish, third-party-action retry-exhaustion, credential-refresh temporal-binding) is independent evidence that the hazard CLASS is real. If silent-fallback was a single-instance accident, no defense pattern would emerge. **Pattern A's recurrence across 3 different observability boundaries (logs / metrics / endpoint) is the strongest signal that result-invariant assertion is the load-bearing structural-defense template for the entire observability-pipeline-class** of silent fallback.
382
397
 
@@ -392,7 +407,7 @@ Add when ALL of the following hold:
392
407
 
393
408
  The class-name is what makes the lesson transferable, not multi-agent witness. A single-agent-confirmed instance with a concrete trace + identified defense pattern is sufficient for canonicalization (instances 4, 5, 7, 8 are all single-agent-confirmed). Cross-agent triangulation strengthens the framing but isn't a precondition.
394
409
 
395
- Add as a new numbered section (the next number is **13** — numbering is append-only; retired instances keep their slot, see Instance 10) with the same fields: Surface / Failure shape / Recurrence / Defense status. Increment the intro paragraph's active-instance count + the Defense-pattern emergence header's `N-of-M active instances` count too.
410
+ Add as a new numbered section (the next number is **14** — numbering is append-only; retired instances keep their slot, see Instance 10) with the same fields: Surface / Failure shape / Recurrence / Defense status. Increment the intro paragraph's active-instance count + the Defense-pattern emergence header's `N-of-M active instances` count too.
396
411
 
397
412
  ---
398
413