What a paired device gets: a phone or tablet running the pad, or your own companion program (an overlay, a stream widget, a second screen). Comms Array on the PC serves it on the local network, or through the hub's direct connection; every call needs the device's token. This page is the contract; the pad itself is one client of it. An add-on can make a device login for its own companion program with devices.login (docs/addon-api.md).
Live state: GET /api/pad/ws (WebSocket)
Send {"token": "<device token>"} first. Then a state message arrives five times a second:
| Key | What |
|---|---|
t | "state" |
game, engine, player | the game's status, the active game's engine id, the player's in-game name |
metrics, lamps, situation, ... | the engine's pad view (described values) |
party | the top line: {active: {id, name} | null, parties: [{id, name, role, ...}], ask} (switch with POST /api/pad/party). The parties are whole: a party you lead also carries its invite_code and invite_url (so a companion login with party.read sees the invite link) |
party_live | the live party, below; null when there is no active party or the hub isn't connected right now (a dropped connection hides it until it's back) |
device | this device: {id, layout}, the pad it should show in the active game. When the PC picks another (the pads panel), it changes here at once; the pad page switches to it unless the player is editing |
party_live
Not sent to a device login an add-on made (devices.login) unless that add-on has party.read (add-on API 1.1); the same goes for party and switching parties (POST /api/pad/party, 403). Such a login can never answer the identity question (POST /api/pad/identity, 403).
The same login presses only what its add-on may: game actions (POST /api/pad/trigger) need its actions.press, key presses (POST /api/pad/keys, tap and down) its input.keys, dangerous ones also actions.dangerous; otherwise 403 not_permitted with the permission. It reads the game's key bindings (/api/pad/keys lookup and actions, 403 keys.read otherwise; the keys in /api/pad/catalog, blank otherwise) only when its add-on has keys.read, input.keys or actions.press (add-on API 1.7). It is revoked when the add-on is removed or devices.login is unticked; an open live connection is then closed with 4003.
{
"party": {"id": "p1", "name": "Night Shift"},
"name": "Night Shift",
"status": "online",
"playing": 3,
"members": [
{"member_id": "...", "name": "Rook", "role": "member", "presence": "in_game", "game": "starcitizen",
"in_game_name": null, "last_seen_day": "2026-11-28",
"summary": {"game": "live", "player": {"...": "everything Rook shares"}, "vehicle": {"...": "..."},
"show": {"lines": [["ship"], ["place"]], "status": "downed", "ship": "Prospector", "place": "Lorville",
"...": "every finished text"}},
"you": false, "game_name": "Star Citizen", "status": "downed", "badge": null,
"lines": ["Prospector", "Lorville"], "line": "Prospector", "help": true, "for_s": 41}
],
"help": ["the members with help: true, longest first"],
"events": [{"member_id": "m2", "name": "Rook", "game": "starcitizen", "type": "player.downed", "data": {},
"message": "Rook is down", "severity": "alert", "ts": 1800000000.0,
"key": "m2:player.downed:1800000000.0", "you": false, "age_s": 12, "recent": true}]
}
Whole, not trimmed. Each member is their full record as the hub sends it, summary holding everything they share (their own sharing switches decide that, on their PC); every event Comms Array holds goes out with its data. The rest are conveniences on top, never instead.
- Order: who needs help first (longest first), then playing, not playing, offline; the player's own rows after the others in each.
- **
presence:**in_game(playing in this party),not_playing(Comms Array running),offline. - **
status:** for someone playing, whatever their game's engine reports (ok,downed,dead, ...); otherwise the presence.helpis true fordownedanddeadwhile playing;for_sis how long this PC has seen that status. - **
summary.show,lines,line,badge:** the member's game's finished texts;linesjoins each of itsshow.linesinto text,lineis the first. - **
events:** the last 50 the PC holds, newest last.recentmarks the last five minutes;keyis stable: a pad shows each key once (a toast or the alert strip) and ignores it after. - The built-in Party widget (
"type": "party") shows a row per member:whoisall,playingorhelp;fieldsare thesummary.showkeys the player picked (none: the game's own lines). - **
labels:** for each game a member is playing, its names for itsshowtexts ({"starcitizen": {"ship": "Ship", ...}}, from that game'sengine.jsonshow_labels); a key with no name there is named from the key. - The alert strip is the pad's to draw: show it while
helpisn't empty, hide it when it empties.
Hosting the pad (1.6)
A companion program on the player's PC (an overlay over the game, a stream widget) can show the real pad page in a web view of its own, signed in as its device, and drive it. Its add-on gets the address with api.pad_info() (docs/addon-api.md) and a token with api.device_login(name); the program opens
http://127.0.0.1:<port>/pad?local&bare#token=<device token>
?localkeeps the page on this PC's own pad (otherwise a signed-in PC moves it to the secure pad on the hub).?baredrops the pad's own frame while it isn't being edited: no top strip, no page bar, and a see-through page around the widgets. In edit mode it is the normal pad (its bars hold Add widget, Save and the page tabs). For widgets without their own backgrounds too, make the layout Clear (Layout sheet;"clear": truein a saved layout).#token=signs it in and is taken out of the address at once;&edit=1opens it in edit mode.- Phone & tablet control must be on (
pad_info()["on"]). The page is the pad: the same layouts, widgets, add-on widgets and rules as a phone, and the layout this device shows is picked in the pads panel or byPOST /api/pad/device {"layout": name}with its token.
Picking pages: window.CAPad
The host calls these in the page (a web view's "run script"). They are the page's own: add-on widgets run in opaque-origin frames and have no way to them.
| Call | What |
|---|---|
CAPad.pages() | [{id, title, when}], the pages this layout shows now (one per title: the profile version for the current profile key) |
CAPad.current() | {id, title, layout, auto, held, locked, editing} |
CAPad.show(id) | as a tap on that page's tab (a lock moves with it); the situation takes over again when it changes. false while editing or for a page not shown |
CAPad.show(id, {hold: true}) | the page stays until release(), whatever the situation does. In memory only: the saved lock is never touched |
CAPad.release() | ends a hold: the locked page, else the situation's page, else the page shown before the hold. false with no hold |
CAPad.edit() | edit mode, if the player lets devices edit layouts; editing ends a hold |
Events on window: capad:ready (the pad is drawn; detail is current()), capad:page (every change of page, layout, hold, lock or editing; detail is current()), capad:unpaired (the login was revoked). The first page can come before your listener is attached: read CAPad.current() when you start listening.
Page ids stay once a layout is saved. A built-in layout's ids change each time Comms Array starts, so a host that remembers pages saves its own layout. A layout holds 32 pages (profile versions count) and 240 KB.
The pads panel (on the PC)
The panel lists the paired devices and the pad each one shows, and picks a pad per device and per game:
GET /api/remote(the PC's panel API, local and token-checked):devices: [{id, name, kind, created, last_seen, layout, connected}](connected: an open live connection right now) andlayout_names(the pads to pick from).POST /api/remote/device{id, layout}: show that pad on that device in the active game. An open pad picks it up from its live state (device.layout) within a fifth of a second.