pi-vers is the Vers extension layer used by Reef-managed agent VMs.
punkin-pi is the harness. pi-vers is loaded into that harness to provide Vers-specific capabilities: VM create/restore, SSH-backed remote tool execution, lieutenant RPC startup, swarm worker startup, and related golden-image/runtime helpers.
vers-fleetsbootstraps the root Reef VM onlyreefowns the runtime control planepi-versprovides the Vers-facing extensions Reef-managed agents usepunkin-piw/routeris the harness used on root and child agent VMs
That means pi-vers should remain the home for Vers-related extension behavior such as:
- Vers API interactions
- shell-auth and API-key handling
- SSH transport into VMs
- remote
pi/punkinagent startup - lieutenant RPC transport
- swarm worker runtime/orchestration
- shared runtime helpers used by Reef and child agents
Reef loads and consumes these capabilities. It should not duplicate them.
At runtime, Reef relies on pi-vers extensions for:
- creating/restoring child agent VMs from the golden image
- starting remote lieutenant agents over RPC
- starting worker agents over RPC
- setting/persisting child runtime env like:
VERS_VM_IDVERS_INFRA_URLPI_VERS_HOMESERVICES_DIR- child role metadata
The package currently exports these Punkin/Pi extensions:
vers-vmvers-vm-copyvers-lieutenantvers-swarmbackground-processplan-mode
It also ships shared core utilities used by the MCP server and related callers.
Child VMs restored from the golden image are expected to have:
punkin-piw/routerpisymlinked topunkin- local
pi-vers - Reef client extension installed separately
- persisted env that points back to the root Reef
- no local child Reef server
pi-vers startup helpers now persist VERS_VM_ID after restore, before agent startup, so self-aware child tools work both in the immediate session and in later shells.
Swarm worker runtime still lives here today.
That includes:
- restoring worker VMs from the golden image
- syncing child runtime context when needed
- starting workers in RPC mode
- lieutenant/worker back-and-forth during task execution
There is an open product question about whether swarm orchestration should eventually move into Reef. For now, the runtime implementation remains in pi-vers.
The current system still needs compatibility with legacy Pi packages that import:
@mariozechner/pi-tui@mariozechner/pi-coding-agent@mariozechner/pi-ai@mariozechner/pi-agent-core
Reef golden-image creation now installs VM-local alias links for these so restored child VMs can load older packages under punkin.
The package name in package.json is still @hdresearch/pi-v for compatibility, even though the repo and current architecture refer to this project as pi-vers.
npm install
npm run buildpi-versis an extension repo, not the harness and not the root control plane.- Root-only concerns like global registry, global vm-tree, global commits, and lieutenant lifecycle ownership belong in Reef.
- Child-agent communication paths should remain compatible with lieutenant
<->worker back-and-forth even as Reef control-plane boundaries get tighter.