Deployment
A deployment is the daemon, Postgres, the setuid helper and, optionally, a capability service and chatd beside it.
The simplest shape is cmd/blueclaw as an ordinary process. A stronger shape runs it inside a virtual machine guest under cmd/blueclaw-supervisor, which boots the guest under Cloud Hypervisor or vfkit, mounts the workspace, proxies host and guest HTTP over vsock, and restores the workspace image. Cloud Hypervisor disks are attached as image_type=raw with PCI left on, and the delivery directory is served over virtio-fs.
| Binary | Purpose |
|---|---|
cmd/blueclaw | the daemon |
cmd/blueclaw-posix-helper | setuid identity switch, POSIX state sync, filesystem operations |
cmd/blueclaw-cli | terminal client and enrollment |
cmd/blueclaw-supervisor | boots and watches the guest |
cmd/blueclaw-guest-healthd, cmd/blueclaw-vsock-http-proxy | guest health and host-to-guest transport |
cmd/blueclaw-backup, cmd/blueclaw-restore | workspace and database snapshot bundles |
cmd/blueclaw-lab | development VM lifecycle and scenario runner |
Which revision is running
blueclaw --version prints it and GET /admin/api/harness carries it. The value comes from -ldflags, because blueclaw is often built as a submodule whose .git points outside the tree:
go build -ldflags "-X github.com/yeomyeonggeori/blueclaw/internal/buildrevision.injected=$(git rev-parse HEAD)" ./cmd/blueclawA build without it reports unknown, and a deploy check should refuse that.
Restarting safely
A running process keeps the configuration it started with. Before replacing the binary, call POST /admin/api/runtime/prepare-shutdown so runs in flight are interrupted and resumed once afterwards, or POST /admin/api/quiesce to stop taking new work. /admin/api/backup/prepare and /complete bracket a snapshot.