Agent Control Protocol upgrade
/titan/agent/controlPublic Titan area path of GET /control (served as api.hexelstudio.com/v1/titan/agent/control, /v1 stripped at the edge); a device proof signs this path. Upgrades to a WebSocket with subprotocol titan.acp.v1 (ACP v1, chosen when offered) or titan.acp.v0 (ACP v0) on the Gateway control listener (:8063, HTTP/1.1). Authentication runs before the handshake checks: the runtime token (and device proof over GET, the received path, and an empty body) is verified first, and any failure, including unavailable local state, is 401. A client that does not offer the subprotocol is upgraded and then closed with 1008 subprotocol. After 101 the client sends attach first; x-websocket gives the closed frame schemas. The channel signals only and never authorizes an action.
Headers
Bearer <token>. Runtime identity token from the identity exchange. Through the public edge, device-bound callers (titand) and workloads of the deployment's attached customer Kubernetes clusters are served. A device-bound caller's requests also carry a Titan-Device-Proof over the path below /v1 (or below the cell prefix), i.e. the /titan/agent/... path; an attached cluster's carry none.
Required for a titan_device_key binding: proof over GET, the received path, and an empty body.
Must contain the token Upgrade.
Must contain the token websocket.
WebSocket version 13.
One of: "13"
Base64 of 16 random bytes.
Must offer titan.acp.v1 or titan.acp.v0. v1 adds the lifecycle signals and the versioned config frames; the server sends them only on a v1 connection.
If present, its host must equal the request host.
Errors
- 101Switched to the control protocol.
- 400Sec-WebSocket-Version is not 13 (the response then carries Sec-WebSocket-Version: 13) or Sec-WebSocket-Key is missing, repeated, or not 16 base64 bytes.
- 401Authentication failed or local state is unavailable; the body is "unauthorized" and a newline.
- 403The Origin host is not the request host.
- 426Not an HTTP/1.1 WebSocket upgrade (Connection or Upgrade missing); the response carries Connection: Upgrade and Upgrade: websocket.