# fleet/ — fleet manager + self-healing torrent mesh

Design spec: ../.project/history/20260608_fleet-manager-mesh-design.md

**Status:** the single-fleet core (stage 1 + stage 3) is **implemented in the
governor** — `../governor/src/fleet/` — not here:

- registry ingest (`~/.config/tv-anarchy/fleet.json` array form authoritative,
  `devices.json` fallback)
- deterministic duty assignment (broadcast / f2f_relay / public_swarm_face)
  with the spec invariants
- custody floor-check (`custodians_of`, rolling baton, re-pin planning)
- zombie reaper (healthy | stalled | dead; mesh-first recovery planning)
- peer-source model with both private-tracker policy gates + `peers_for`

CLI: `portable-net-tv fleet status|duties|custody|reaper [--apply]|peers <q>`
(see ../docs/operations.md). Tests: `bun test` in `../governor`.

Since added (2026-06-09, parallel agent team — also in `../governor/src/fleet/`):

- re-pin **actuation** (`fleet repin --apply` — rsync holder→target, recorded
  holdings) + research feed into the `mcp` torrent search (`actuate.ts`)
- periodic orchestrator tick for launchd (`fleet daemon`, `daemon.ts`)
- HTTP `peers_for`/registry/custody/reaper service (`fleet serve`, `serve.ts`) —
  the broadcast-host service, runnable on any node until a real one exists
- capacity probes: ssh df + EWMA uptime score (`fleet probe`, `probe.ts`),
  feeding custody disk-eligibility

This directory remains the placeholder for the parts that are still design-only
and/or blocked on infrastructure outside this repo:

- the fleet WireGuard fabric (plane 1 — blocked on the `10.9.0.4` question)
- an actual public-IP broadcast/seedbox node to host `fleet serve`
- friend-mesh / F2F relay (stage 4), private-tracker sources (stage 5),
  Discord planes, multi-identity

Build order and the up-to-date status table live in ../docs/roadmap.md.
