Appearance
Host vs device
The product calls a linked install a Device. Internally the durable records and supervisor surfaces use the term Host (and the older internal term Host Link for the cloud pairing). They are related but not the same concept; conflating them creates real bugs.
Identity table
The repo's CLAUDE.md documents the canonical identity table. The relevant rows for this section:
| Concept | Field | File | When generated |
|---|---|---|---|
| Install identity | installId | <host-home>/credentials/hivecast-install.json | First hivecast install |
| Link identity | hostId | <host-home>/credentials/hivecast-link.json | First hivecast login --device |
| Device label | hostName | <host-home>/credentials/hivecast-link.json | At pairing or via --device-name |
| Device projection key | deviceSlug | <host-home>/credentials/hivecast-link.json | Allocated by system-auth from hostName |
The Host (the supervisor, this domain's subject) always exists for a running install. The Device (a linked Host with hostId + deviceSlug) only exists after a successful pairing ceremony with HiveCast or a sibling Host playing the platform role.
Practical implications
- A standalone local Host runs all five default runtimes (system, host-control, gateway, web, edge) without ever linking a Device. Visit
http://127.0.0.1:3100/apps/edge/. There is no "Device" yet, just a Host. - After
hivecast login --device --cloud <url>,system-authissues ahostId, allocates adeviceSlug, and the Host'shost-controlruntime begins emitting heartbeats. - The heartbeats go in two directions:
- To the local
system.devicesactor via NATS (HostControlActor._registerLocalDeviceHeartbeat,host-control/src/HostControlActor.ts:278-314). - If
cloudUrlis set on the link, also to<cloudUrl>/_auth/host-link/heartbeatover HTTPS (HostControlActor.postCloudDeviceHeartbeat,host-control/src/HostControlActor.ts:463-498).
- To the local
Where Devices live in the bus
system.devices is the inventory/control facade for Devices. It is not the public actor namespace. Actors mount under their own subjects (chat, director, etc.). system.devices.<deviceSlug> is a management projection, not a routing namespace. The repo CLAUDE.md § "Device Link contract" is the authoritative statement.
Forbidden conflations
deviceNameis forbidden in the Device contract (usehostNamefor the human label,deviceSlugfor the management key).- The user-facing word is Device. Never put
installId,hostId,host.json, orconfigNamein product UI copy. hostNamechange does not changedeviceSlug.deviceSlugis stable and address-safe.
When the difference matters
If you are operating a server fleet or a worker cell, the question "how many Hosts?" is the supervisor count — equal to the number of running MatrixHostService processes, one per <host-home>. The question "how many Devices?" is the linked-install count, which is the number of distinct hostId values successfully approved by system-auth. A laptop with two Host homes and two Devices is not a contradiction.