colonizer
install
docs Outposts

#Outposts: contributed compute

First slice of #141 (closed with this slice). It draws the control/execution seam and ships the local side of it. Remote outposts — other machines joining the mesh and hosting colonies — are PLANNED, not present. The design gate for them, and for a hosted Colonizer, was #298, closed with the hosted contract (hosted.md); the outpost protocol and enrollment it names are a follow-up with no tracking issue yet (#929).

Terms follow vision.md: the Mothership is the Colonizer app on your machine, a Colony is one session (a microVM plus worktree plus agent), and the Mesh is the private network linking every colony to the mothership.

#Control plane vs execution plane

The control plane decides; the execution plane runs. Only the execution plane ever touches a hypervisor.

Control plane (stays on the mothership)Execution plane (runs on a node)
Queue: which tasks launch, in what orderboot / remove: start and stop colony microVMs
Credentials: GitHub token, provider keys, gateway tokensrunning: which colonies are up
Git: worktrees, branches, the publish steppull: fetch colony images into the node cache
Publish: untrusted colony output becomes a pull requestagentd: events, PTY, and shutdown inside each colony
Mesh control: headscale, which nodes may joinThe node's own tailscaled mesh endpoint

The seam between them is the ExecutionBackend trait (crates/colonizer/src/execution.rs). Its methods mirror the sandbox module's boot, remove, running, and pull signatures with msb folded into the backend (plus node_id/capabilities added for placement), so the local backend delegates with zero adaptation. The colony launch path goes through it: boot (crates/colonizer/src/boot.rs) pulls the image and boots the microVM, teardown (crates/colonizer/src/lifecycle.rs) removes it, and the liveness checks ask it what is running — all against the local backend, with no behavior change. A remote outpost is a second backend behind the same trait.

#Trust

The trust boundaries in architecture.md do not move: secrets stay on the mothership, colony output stays untrusted until publish sanitizes it and a human reviews the pull request. An outpost extends the mothership's reach, so it inherits the mothership's obligations:

#Node identity and auth (PLANNED)

Each outpost joins the mesh under its own node name and presents a bearer token on every control call, the same shape as agentd's per-session token inside the mesh today: random, stored 0600 on both ends, compared in constant time, revocable by deleting it on the mothership. Enrollment is an explicit operator act — run a command on the outpost, approve it on the mothership — never automatic discovery. The exact handshake is unwritten; this paragraph is the whole of the sketch.

#Placement (stub)

Local-first: the mothership runs its own colonies before asking anyone else. When there is anywhere else to ask, nodes advertise Capabilities (kvm, plus labels such as gpu), and the scheduler matches colonies to nodes that qualify. The labels exist in the trait today, but nothing reads them: fleet placement (crates/colonizer/src/placement.rs, below) picks a member from its platform, KVM verdict and free slots, and a colony still runs on the member that launched it.

#Status

Four things built since this slice point the same way. None of them runs a colony on another machine.

#Non-goals for this slice