// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. /** * The edge's verdicts, the only values [`VERDICT_HEADER`] carries. */ export type EdgeVerdict = "no-tunnel" | "unknown-sandbox" | "dropped"; /** * Where netd's control link to Node stands. */ export type NodeLink = "starting" | "up" | "restarting"; /** * The share of the last 10 seconds, as a percentage, in which some of the container's tasks stalled waiting for each * resource: cgroup v2's `some avg10` from `cpu.pressure`, `memory.pressure` and `io.pressure`. */ export type Pressure = { cpu: number, memory: number, io: number, }; /** * The sandbox's proof of life, measured by netd and answered by it at [`VITALS_PATH`] whatever state Node is in: * the daemon's own heartbeat rides Node's event loop, so a sandbox busy enough to starve it would otherwise look dead. * It carries nothing of the workspace. */ export type SandboxVitals = { node: NodeLink, /** * How long Node's event loop takes to answer netd, in milliseconds: the round trip of the last ping it * answered, or how long the one outstanding has waited when that is longer. netd pings every 2 s, only once * the previous ping is answered. Null before the first ping, and while Node is not `up`. */ lagMs: number | null, /** * How many times netd restarted Node in the last 10 minutes. */ restarts: number, /** * Seconds since netd, and so the container, started. */ uptimeS: number, /** * The container's pressure stall; null where the cgroup's pressure files cannot be read. */ pressure: Pressure | null, /** * Where the ingress tunnel stands and how often it dropped (2026-10-05: a tunnel that dropped once a minute for * four hours was counted nowhere). Absent from an older netd. */ tunnel?: TunnelVitals, }; /** * What the browser sends on a terminal socket, each a JSON text message. */ export type TerminalClientMessage = { "type": "input", data: string, } | { "type": "resize", cols: number, rows: number, } | { "type": "ping" }; /** * What a terminal socket sends as JSON text; the pane's own bytes travel as binary messages. */ export type TerminalServerMessage = { "type": "grid", cols: number, rows: number, } | { "type": "exit", code: number, reason?: string, } | { "type": "pong" } | { "type": "deflate" }; /** * Where netd's tunnel stands. */ export type TunnelState = "off" | "dialling" | "held" | "elsewhere" | "deleted"; /** * The ingress tunnel as netd holds it: the interactive socket, which every request can ride, and QUIC beside it. */ export type TunnelVitals = { state: TunnelState, /** * How many times a registered interactive socket dropped in the last hour. */ dropsLastHour: number, /** * Where the copy holding this sandbox's tunnel runs, as the edge named it, while `state` is `elsewhere`. */ holder?: string, /** * Whether a QUIC connection is held beside the socket. */ quic: boolean, };