diff --git a/CLAUDE.md b/CLAUDE.md index 9b19fc0..d0d029c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -12,6 +12,21 @@ MCP has two components: Services have one or more components (containers). Container naming: `-`. +## v2 Development (Multi-Node) + +MCP v2 extends the single-node agent model to a multi-node fleet with a central master process. See the root repo's `docs/phase-e-plan.md` and `docs/architecture-v2.md` for the full design. + +**Current state:** +- **svc** is operational as an edge node (manages mc-proxy routing only, no containers) +- **rift** runs the agent with full container management +- **orion** is provisioned but offline for maintenance + +**Key v2 concepts (in development):** +- **mcp-master** — central orchestrator on rift. Accepts CLI commands, dispatches to agents, maintains node registry, coordinates edge routing. +- **Agent self-registration** — agents register with the master on startup (name, role, address, arch). No static node config required after bootstrap. +- **Tier-based placement** — `tier = "core"` runs on the master node, `tier = "worker"` (default) is auto-placed on a worker with capacity, `node = ""` overrides for pinned services. +- **Edge routing** — `public = true` on routes declares intent; the master assigns the route to an edge node (currently svc). + ## Build Commands ```bash @@ -33,7 +48,7 @@ Run a single test: `go test ./internal/registry/ -run TestComponentCRUD` - `cmd/mcp/` — CLI entry point - `cmd/mcp-agent/` — Agent entry point -- `internal/agent/` — Agent core (deploy, lifecycle, sync, adopt, status, files) +- `internal/agent/` — Agent core (deploy, lifecycle, sync, adopt, status, files, edge_rpc, dns, proxy, certs) - `internal/runtime/` — Container runtime abstraction (podman) - `internal/registry/` — SQLite registry (services, components, events) - `internal/monitor/` — Monitoring subsystem (watch loop, alerting)