{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://protocol.versevdi.invalid/schemas/control-v1.schema.json", "title": "VerseVDI Phase 3A control contract", "type": "object", "additionalProperties": false, "$defs": { "FieldViolation": { "type": "object", "additionalProperties": false, "required": ["field", "code"], "properties": { "field": {"type": "string", "minLength": 1, "maxLength": 128}, "code": {"type": "string", "minLength": 1, "maxLength": 64} } }, "ErrorEnvelope": { "type": "object", "additionalProperties": false, "required": ["status", "error", "code", "message", "resolution", "request_id", "violations"], "properties": { "status": {"type": "boolean"}, "error": {"type": "string", "minLength": 1, "maxLength": 512}, "code": {"type": "string", "minLength": 1, "maxLength": 128}, "message": {"type": "string", "minLength": 1, "maxLength": 512}, "resolution": {"type": "string", "minLength": 1, "maxLength": 128}, "request_id": {"type": "string", "minLength": 1, "maxLength": 128}, "violations": {"type": "array", "maxItems": 16, "items": {"$ref": "#/$defs/FieldViolation"}} } }, "PageInfo": { "type": "object", "additionalProperties": false, "required": ["limit", "next_cursor"], "properties": { "limit": {"type": "integer", "minimum": 1, "maximum": 100}, "next_cursor": {"type": "string", "maxLength": 512} } }, "ResourceLink": { "type": "object", "additionalProperties": false, "required": ["type", "id", "version"], "properties": { "type": {"type": "string", "minLength": 1, "maxLength": 64}, "id": {"type": "string", "minLength": 1, "maxLength": 128}, "version": {"type": "integer", "minimum": 1} } }, "Resource": { "type": "object", "additionalProperties": false, "required": ["id", "kind", "name", "state", "version", "links"], "properties": { "id": {"type": "string", "minLength": 1, "maxLength": 128}, "kind": {"type": "string", "minLength": 1, "maxLength": 64}, "name": {"type": "string", "minLength": 1, "maxLength": 256}, "state": {"type": "string", "minLength": 1, "maxLength": 64}, "assignment_state": {"type": "string", "maxLength": 64}, "version": {"type": "integer", "minimum": 1}, "links": {"type": "array", "maxItems": 16, "items": {"$ref": "#/$defs/ResourceLink"}} } }, "AssignedDesktop": { "type": "object", "additionalProperties": false, "required": ["assignment_id", "pool_id", "name", "availability", "quality_limits"], "properties": { "assignment_id": {"type": "string", "minLength": 1, "maxLength": 128}, "pool_id": {"type": "string", "minLength": 1, "maxLength": 128}, "name": {"type": "string", "minLength": 1, "maxLength": 256}, "availability": {"type": "string", "minLength": 1, "maxLength": 64}, "quality_limits": {"$ref": "#/$defs/SessionQualityLimits"} } }, "EntitledPool": { "type": "object", "additionalProperties": false, "required": ["pool_id", "name", "assignment_state", "quality_limits"], "properties": { "pool_id": {"type": "string", "minLength": 1, "maxLength": 128}, "name": {"type": "string", "minLength": 1, "maxLength": 256}, "assignment_state": {"type": "string", "minLength": 1, "maxLength": 64}, "quality_limits": {"$ref": "#/$defs/SessionQualityLimits"} } }, "ResourceList": { "type": "object", "additionalProperties": false, "required": ["assigned_desktops", "entitled_pools", "page"], "properties": { "assigned_desktops": {"type": "array", "maxItems": 100, "items": {"$ref": "#/$defs/AssignedDesktop"}}, "entitled_pools": {"type": "array", "maxItems": 100, "items": {"$ref": "#/$defs/EntitledPool"}}, "page": {"$ref": "#/$defs/PageInfo"} } }, "DeviceRegistrationRequest": { "type": "object", "additionalProperties": false, "required": ["name", "platform", "device_subject", "algorithm", "public_key"], "properties": { "name": {"type": "string", "minLength": 1, "maxLength": 128}, "platform": {"type": "string", "minLength": 1, "maxLength": 64}, "device_subject": {"type": "string", "minLength": 1, "maxLength": 256}, "algorithm": {"type": "string", "const": "ed25519"}, "public_key": {"type": "string", "minLength": 1, "maxLength": 256} } }, "DeviceChallenge": { "type": "object", "additionalProperties": false, "required": ["device_id", "server_id", "principal_id", "challenge", "expires_at", "algorithm", "signature_format"], "properties": { "device_id": {"type": "string", "minLength": 1, "maxLength": 128}, "server_id": {"type": "string", "minLength": 1, "maxLength": 128}, "principal_id": {"type": "string", "minLength": 1, "maxLength": 128}, "challenge": {"type": "string", "minLength": 1, "maxLength": 256}, "expires_at": {"type": "string", "format": "date-time", "maxLength": 64}, "algorithm": {"type": "string", "const": "ed25519"}, "signature_format": {"type": "string", "const": "ed25519-domain-separated-v1"} } }, "DeviceProofRequest": { "type": "object", "additionalProperties": false, "required": ["challenge", "signature"], "properties": { "challenge": {"type": "string", "minLength": 1, "maxLength": 256}, "signature": {"type": "string", "minLength": 1, "maxLength": 256} } }, "LoginRequest": { "type": "object", "additionalProperties": false, "required": ["username", "password"], "properties": { "provider": {"type": "string", "enum": ["ldap", "local"]}, "username": {"type": "string", "minLength": 1, "maxLength": 256}, "password": {"type": "string", "minLength": 1, "maxLength": 1024} } }, "ReauthRequest": { "type": "object", "additionalProperties": false, "required": ["password", "purpose"], "properties": { "password": {"type": "string", "minLength": 1, "maxLength": 1024}, "purpose": {"type": "string", "enum": ["identity_change", "key_change", "backup_enable", "external_database_tls_disabled", "assignment_change"]} } }, "ReauthGrant": { "type": "object", "additionalProperties": false, "required": ["token", "purpose", "expires_at"], "properties": { "token": {"type": "string", "minLength": 1, "maxLength": 256}, "purpose": {"type": "string", "minLength": 1, "maxLength": 64}, "expires_at": {"type": "string", "format": "date-time", "maxLength": 64} } }, "RefreshRequest": { "type": "object", "additionalProperties": false, "required": ["family_id", "refresh_token"], "properties": { "family_id": {"type": "string", "minLength": 1, "maxLength": 128}, "refresh_token": {"type": "string", "minLength": 1, "maxLength": 256} } }, "NativeCredential": { "type": "object", "additionalProperties": false, "required": ["family_id", "access_token", "refresh_token", "expires_at"], "properties": { "device_id": {"type": "string", "maxLength": 128}, "family_id": {"type": "string", "minLength": 1, "maxLength": 128}, "access_token": {"type": "string", "minLength": 1, "maxLength": 256}, "refresh_token": {"type": "string", "minLength": 1, "maxLength": 256}, "expires_at": {"type": "string", "format": "date-time", "maxLength": 64}, "refresh_expires_at": {"type": "string", "format": "date-time", "maxLength": 64} } }, "NativeSessionIdentity": { "type": "object", "additionalProperties": false, "required": ["client_device_id", "device_key_id"], "properties": { "client_device_id": {"type": "string", "minLength": 1, "maxLength": 128}, "device_key_id": {"type": "string", "minLength": 1, "maxLength": 128} } }, "BrowserAuthenticatedSession": { "type": "object", "additionalProperties": false, "required": ["username", "provider", "roles", "role"], "properties": { "username": {"type": "string", "minLength": 1, "maxLength": 256}, "provider": {"type": "string", "minLength": 1, "maxLength": 64}, "roles": {"type": "array", "maxItems": 16, "items": {"type": "string", "minLength": 1, "maxLength": 64, "x-max-bytes": 64}}, "role": {"type": "string", "enum": ["user", "admin"]} } }, "NativeAuthenticatedSession": { "type": "object", "additionalProperties": false, "required": ["username", "provider", "roles", "role", "native_identity"], "properties": { "username": {"type": "string", "minLength": 1, "maxLength": 256}, "provider": {"type": "string", "minLength": 1, "maxLength": 64}, "roles": {"type": "array", "maxItems": 16, "items": {"type": "string", "minLength": 1, "maxLength": 64, "x-max-bytes": 64}}, "role": {"type": "string", "enum": ["user", "admin"]}, "native_identity": {"$ref": "#/$defs/NativeSessionIdentity"} } }, "NativeTunnelCredential": { "type": "object", "additionalProperties": false, "required": ["client_device_id", "device_key_id", "certificate_chain_pem", "trust_bundle_pem", "expires_at"], "properties": { "client_device_id": {"type": "string", "minLength": 1, "maxLength": 128}, "device_key_id": {"type": "string", "minLength": 1, "maxLength": 128}, "certificate_chain_pem": {"type": "string", "minLength": 1, "maxLength": 65536}, "trust_bundle_pem": {"type": "string", "minLength": 1, "maxLength": 65536}, "expires_at": {"type": "string", "format": "date-time", "maxLength": 64} } }, "DisplayMode": { "type": "object", "additionalProperties": false, "required": ["resolution_width", "resolution_height", "fps"], "properties": { "resolution_width": {"type": "integer", "minimum": 320, "maximum": 16384}, "resolution_height": {"type": "integer", "minimum": 200, "maximum": 8640}, "fps": {"type": "integer", "minimum": 1, "maximum": 240} } }, "VideoProfile": { "type": "object", "additionalProperties": false, "required": ["codec", "bit_depth", "chroma_subsampling", "color_space", "transfer_function"], "properties": { "codec": {"type": "string", "enum": ["h264", "hevc", "av1"]}, "bit_depth": {"type": "integer", "minimum": 8, "maximum": 8}, "chroma_subsampling": {"type": "string", "const": "4:2:0"}, "color_space": {"type": "string", "const": "bt709-limited"}, "transfer_function": {"type": "string", "const": "sdr"} } }, "AudioProfile": { "type": "object", "additionalProperties": false, "required": ["codec", "sample_rate_hz", "channels", "channel_layout", "packet_duration_ms"], "properties": { "codec": {"type": "string", "const": "opus"}, "sample_rate_hz": {"type": "integer", "minimum": 48000, "maximum": 48000}, "channels": {"type": "integer", "minimum": 2, "maximum": 2}, "channel_layout": {"type": "string", "const": "stereo"}, "packet_duration_ms": {"type": "integer", "minimum": 5, "maximum": 5} } }, "BitratePreference": { "type": "object", "additionalProperties": false, "required": ["mode"], "properties": { "mode": {"type": "string", "enum": ["auto", "explicit"]}, "target_kbps": {"type": "integer", "minimum": 100, "maximum": 1000000, "x-optional-pointer": true} } }, "SessionQualityLimits": { "type": "object", "x-max-bytes": 16384, "additionalProperties": false, "required": ["policy_version_id", "policy_display_limit", "selectable_display_maximum", "display_limit_override", "bitrate_minimum_kbps", "bitrate_target_kbps", "bitrate_maximum_kbps"], "properties": { "policy_version_id": {"type": "string", "minLength": 1, "maxLength": 128}, "policy_display_limit": {"$ref": "#/$defs/DisplayMode"}, "selectable_display_maximum": {"$ref": "#/$defs/DisplayMode"}, "display_limit_override": {"type": "boolean"}, "bitrate_minimum_kbps": {"type": "integer", "minimum": 100, "maximum": 1000000}, "bitrate_target_kbps": {"type": "integer", "minimum": 100, "maximum": 1000000}, "bitrate_maximum_kbps": {"type": "integer", "minimum": 100, "maximum": 1000000} } }, "SessionAdjustment": { "type": "object", "additionalProperties": false, "required": ["display_reason", "bitrate_reason"], "properties": { "display_reason": {"type": "string", "enum": ["none", "policy_clamp", "direct_entitlement_override"]}, "bitrate_reason": {"type": "string", "enum": ["none", "policy_default", "session_ceiling_clamp", "aggregate_capacity_clamp"]} } }, "SelectedSessionDescriptor": { "type": "object", "additionalProperties": false, "required": ["video_profile", "audio_profile", "display_mode", "bitrate_target_kbps", "bitrate_maximum_kbps", "adjustment", "media_timestamp_basis"], "properties": { "video_profile": {"$ref": "#/$defs/VideoProfile"}, "audio_profile": {"$ref": "#/$defs/AudioProfile"}, "display_mode": {"$ref": "#/$defs/DisplayMode"}, "bitrate_target_kbps": {"type": "integer", "minimum": 100, "maximum": 1000000}, "bitrate_maximum_kbps": {"type": "integer", "minimum": 100, "maximum": 1000000}, "adjustment": {"$ref": "#/$defs/SessionAdjustment"}, "media_timestamp_basis": {"type": "string", "const": "gateway-send-wall-clock-ms"} } }, "SessionRequest": { "type": "object", "additionalProperties": false, "required": ["client_device_id", "device_key_id", "pool_id", "idempotency_key", "video_profiles", "bitrate_preference"], "properties": { "client_device_id": {"type": "string", "minLength": 1, "maxLength": 128}, "device_key_id": {"type": "string", "minLength": 1, "maxLength": 128}, "pool_id": {"type": "string", "minLength": 1, "maxLength": 128}, "idempotency_key": {"type": "string", "minLength": 1, "maxLength": 256}, "video_profiles": {"type": "array", "minItems": 1, "maxItems": 12, "uniqueItems": true, "items": {"$ref": "#/$defs/VideoProfile"}}, "bitrate_preference": {"$ref": "#/$defs/BitratePreference"}, "requested_display_mode": {"$ref": "#/$defs/DisplayMode"} } }, "ReconnectRequest": { "type": "object", "additionalProperties": false, "required": ["client_device_id", "device_key_id", "expected_version", "display_relaunch_confirmed"], "properties": { "client_device_id": {"type": "string", "minLength": 1, "maxLength": 128}, "device_key_id": {"type": "string", "minLength": 1, "maxLength": 128}, "expected_version": {"type": "integer", "minimum": 1}, "display_relaunch_confirmed": {"type": "boolean"} } }, "BrokerSession": { "type": "object", "additionalProperties": false, "required": ["id", "principal_id", "pool_id", "state", "policy_snapshot", "cleanup_state", "idempotency_key", "correlation_id", "requested_at", "version", "requested_video_profiles", "requested_bitrate_preference"], "properties": { "id": {"type": "string", "minLength": 1, "maxLength": 128}, "principal_id": {"type": "string", "minLength": 1, "maxLength": 128}, "pool_id": {"type": "string", "minLength": 1, "maxLength": 128}, "assignment_id": {"type": "string", "maxLength": 128}, "state": {"type": "string", "minLength": 1, "maxLength": 64}, "policy_snapshot": {"$ref": "#/$defs/AllocationPolicy"}, "reconnect_deadline": {"type": "string", "format": "date-time", "maxLength": 64}, "outcome": {"type": "string", "maxLength": 64}, "failure_code": {"type": "string", "maxLength": 128}, "cleanup_state": {"type": "string", "minLength": 1, "maxLength": 64}, "idempotency_key": {"type": "string", "minLength": 1, "maxLength": 256}, "correlation_id": {"type": "string", "minLength": 1, "maxLength": 128}, "requested_at": {"type": "string", "format": "date-time", "maxLength": 64}, "ended_at": {"type": "string", "format": "date-time", "maxLength": 64}, "version": {"type": "integer", "minimum": 1}, "requested_display_mode": {"$ref": "#/$defs/DisplayMode"}, "effective_display_mode": {"$ref": "#/$defs/DisplayMode"}, "requested_video_profiles": {"type": "array", "minItems": 1, "maxItems": 12, "uniqueItems": true, "items": {"$ref": "#/$defs/VideoProfile"}}, "requested_bitrate_preference": {"$ref": "#/$defs/BitratePreference"}, "selected_descriptor": {"$ref": "#/$defs/SelectedSessionDescriptor"} } }, "AllocationPolicy": { "type": "object", "additionalProperties": false, "required": ["minimum_kbps", "target_kbps", "maximum_kbps", "tier", "audience", "protocol", "protocol_version", "grant_ttl_seconds", "reservation_lease_seconds"], "properties": { "minimum_kbps": {"type": "integer", "minimum": 1, "maximum": 100000000}, "target_kbps": {"type": "integer", "minimum": 1, "maximum": 100000000}, "maximum_kbps": {"type": "integer", "minimum": 1, "maximum": 100000000}, "tier": {"type": "string", "enum": ["standard", "priority", "premium"]}, "audience": {"type": "string", "minLength": 1, "maxLength": 256}, "protocol": {"type": "string", "minLength": 1, "maxLength": 64}, "protocol_version": {"type": "integer", "minimum": 1, "maximum": 100}, "grant_ttl_seconds": {"type": "integer", "minimum": 5, "maximum": 300}, "reservation_lease_seconds": {"type": "integer", "minimum": 5, "maximum": 3600} } }, "ConnectionManifest": { "type": "object", "additionalProperties": false, "required": ["version", "purpose", "session_id", "reconnect_sequence", "gateway", "tunnel", "profile", "grant", "correlation_id", "selected_descriptor"], "properties": { "version": {"type": "string", "const": "1"}, "purpose": {"type": "string", "enum": ["launch", "reconnect"]}, "session_id": {"type": "string", "minLength": 1, "maxLength": 128}, "reconnect_sequence": {"type": "integer", "minimum": 0}, "gateway": {"$ref": "#/$defs/ManifestGateway"}, "tunnel": {"$ref": "#/$defs/ManifestTunnel"}, "profile": {"$ref": "#/$defs/ManifestProfile"}, "grant": {"$ref": "#/$defs/GrantReference"}, "correlation_id": {"type": "string", "minLength": 1, "maxLength": 128}, "selected_descriptor": {"$ref": "#/$defs/SelectedSessionDescriptor"} } }, "ManifestGateway": { "type": "object", "additionalProperties": false, "required": ["id", "addresses", "public_identity"], "properties": { "id": {"type": "string", "minLength": 1, "maxLength": 128}, "addresses": {"type": "array", "minItems": 1, "maxItems": 4, "items": {"type": "string", "minLength": 1, "maxLength": 256}}, "public_identity": { "type": "string", "minLength": 1, "maxLength": 256, "description": "Exact TLS server name; distinct from dial addresses, gateway UUIDs, certificate fingerprints, and provider identities." } } }, "ManifestTunnel": { "type": "object", "additionalProperties": false, "required": ["versions", "features"], "properties": { "versions": {"type": "array", "minItems": 1, "maxItems": 4, "items": {"type": "string", "minLength": 1, "maxLength": 64}}, "features": {"type": "array", "maxItems": 32, "items": {"type": "string", "minLength": 1, "maxLength": 64}} } }, "ManifestProfile": { "type": "object", "additionalProperties": false, "required": ["id", "bounds"], "properties": { "id": {"type": "string", "minLength": 1, "maxLength": 128}, "bounds": {"$ref": "#/$defs/ManifestBounds"}, "display_mode": {"$ref": "#/$defs/DisplayMode"} } }, "ManifestBounds": { "type": "object", "additionalProperties": false, "required": ["minimum_kbps", "target_kbps", "maximum_kbps"], "properties": { "minimum_kbps": {"type": "integer", "minimum": 1, "maximum": 100000000}, "target_kbps": {"type": "integer", "minimum": 1, "maximum": 100000000}, "maximum_kbps": {"type": "integer", "minimum": 1, "maximum": 100000000} } }, "GrantReference": { "type": "object", "additionalProperties": false, "required": ["opaque_value", "expires_at", "audience"], "properties": { "opaque_value": {"type": "string", "minLength": 43, "maxLength": 256}, "expires_at": {"type": "string", "format": "date-time", "maxLength": 64}, "audience": {"type": "string", "minLength": 1, "maxLength": 128} } }, "EventResume": { "type": "object", "additionalProperties": false, "required": ["cursor", "last_sequence"], "properties": { "cursor": {"type": "string", "maxLength": 512}, "last_sequence": {"type": "integer", "minimum": 0} } }, "EventEnvelope": { "type": "object", "additionalProperties": false, "required": ["event_id", "sequence", "type", "version", "resource", "occurred_at", "correlation_id", "payload"], "properties": { "event_id": {"type": "string", "minLength": 1, "maxLength": 128}, "sequence": {"type": "integer", "minimum": 1}, "type": {"type": "string", "minLength": 1, "maxLength": 128}, "version": {"type": "integer", "minimum": 1}, "resource": {"$ref": "#/$defs/ResourceLink"}, "occurred_at": {"type": "string", "format": "date-time", "maxLength": 64}, "correlation_id": {"type": "string", "minLength": 1, "maxLength": 128}, "payload": {"type": "object", "x-max-bytes": 16384} } }, "ClipboardText": { "type": "object", "additionalProperties": false, "required": ["text", "encoding"], "properties": { "text": {"type": "string", "maxLength": 65536}, "encoding": {"type": "string", "const": "utf-8"} } }, "ClipboardPolicy": { "type": "object", "additionalProperties": false, "required": ["client_to_provider_enabled", "provider_to_client_enabled", "max_text_bytes", "max_updates_per_minute"], "properties": { "client_to_provider_enabled": {"type": "boolean"}, "provider_to_client_enabled": {"type": "boolean"}, "max_text_bytes": {"type": "integer", "minimum": 1, "maximum": 65536}, "max_updates_per_minute": {"type": "integer", "minimum": 1, "maximum": 120} } }, "GatewayClipboardText": { "type": "object", "additionalProperties": false, "required": ["direction", "text", "encoding", "loop_token"], "properties": { "direction": {"type": "string", "enum": ["client_to_provider", "provider_to_client"]}, "text": {"type": "string", "maxLength": 65536, "x-max-bytes": 65536}, "encoding": {"type": "string", "const": "utf-8"}, "loop_token": {"type": "string", "format": "base64url", "minLength": 16, "maxLength": 128} } }, "VersionNegotiation": { "type": "object", "additionalProperties": false, "required": ["supported_versions", "features"], "properties": { "supported_versions": {"type": "array", "minItems": 1, "maxItems": 3, "items": {"type": "string", "maxLength": 16}}, "features": {"type": "array", "maxItems": 64, "items": {"type": "string", "maxLength": 64}} } }, "CapabilityProfile": { "type": "object", "additionalProperties": false, "required": ["transport", "framing", "media", "source_rate_control", "video_profiles", "audio_profiles"], "properties": { "transport": {"type": "string", "minLength": 1, "maxLength": 64}, "framing": {"type": "string", "enum": ["datagram-v1", "datagram-v2"]}, "media": {"type": "string", "minLength": 1, "maxLength": 64}, "source_rate_control": {"type": "string", "minLength": 1, "maxLength": 64}, "video_profiles": {"type": "array", "minItems": 1, "maxItems": 12, "uniqueItems": true, "items": {"$ref": "#/$defs/VideoProfile"}}, "audio_profiles": {"type": "array", "minItems": 1, "maxItems": 1, "uniqueItems": true, "items": {"$ref": "#/$defs/AudioProfile"}} } }, "GatewayRegistration": { "type": "object", "additionalProperties": false, "required": ["version", "gateway_id", "instance_identity", "certificate_identity", "public_identity", "address", "provider_identity", "protocol_min_version", "protocol_max_version", "connection_capacity", "bandwidth_capacity_kbps", "features", "capabilities"], "properties": { "version": {"type": "string", "const": "1"}, "gateway_id": {"type": "string", "minLength": 1, "maxLength": 128}, "instance_identity": {"type": "string", "minLength": 1, "maxLength": 512}, "certificate_identity": {"type": "string", "minLength": 1, "maxLength": 512}, "public_identity": {"type": "string", "minLength": 1, "maxLength": 256}, "address": {"type": "string", "minLength": 1, "maxLength": 256}, "provider_identity": {"type": "string", "minLength": 1, "maxLength": 256}, "protocol_min_version": {"type": "integer", "minimum": 1, "maximum": 100}, "protocol_max_version": {"type": "integer", "minimum": 1, "maximum": 100}, "connection_capacity": {"type": "integer", "minimum": 1, "maximum": 1000000}, "bandwidth_capacity_kbps": {"type": "integer", "minimum": 1, "maximum": 1000000000}, "features": {"type": "array", "maxItems": 64, "items": {"type": "string", "minLength": 1, "maxLength": 64}}, "capabilities": {"$ref": "#/$defs/CapabilityProfile"} } }, "GatewayTelemetry": { "type": "object", "additionalProperties": false, "required": ["admitted_sessions", "admission_rejects", "reconnects", "drain_transitions", "media_drops", "media_packets", "media_bytes", "queue_delay_micros", "processing_delay_micros", "processing_samples", "pacing_delay_micros", "provider_errors", "input_rejected", "control_rtt_micros", "control_jitter_micros", "control_loss_ppm", "pending_reliable", "provider_state"], "properties": { "admitted_sessions": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}, "admission_rejects": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}, "reconnects": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}, "drain_transitions": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}, "media_drops": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}, "media_packets": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}, "media_bytes": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}, "queue_delay_micros": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}, "processing_delay_micros": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}, "processing_samples": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}, "pacing_delay_micros": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}, "provider_errors": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}, "input_rejected": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}, "control_rtt_micros": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}, "control_jitter_micros": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}, "control_loss_ppm": {"type": "integer", "minimum": 0, "maximum": 1000000}, "pending_reliable": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807}, "provider_state": {"type": "string", "enum": ["unknown", "starting", "ready", "disconnected", "terminating", "terminated", "cleanup_pending", "failed"]} } }, "GatewayHeartbeat": { "type": "object", "additionalProperties": false, "required": ["version", "gateway_id", "sequence", "observed_at", "active_connections", "egress_kbps", "state", "telemetry"], "properties": { "version": {"type": "string", "const": "1"}, "gateway_id": {"type": "string", "minLength": 1, "maxLength": 128}, "sequence": {"type": "integer", "minimum": 1}, "observed_at": {"type": "string", "format": "date-time", "maxLength": 64}, "active_connections": {"type": "integer", "minimum": 0, "maximum": 1000000}, "egress_kbps": {"type": "integer", "minimum": 0, "maximum": 1000000000}, "state": {"type": "string", "enum": ["ready", "draining", "offline"]}, "telemetry": {"$ref": "#/$defs/GatewayTelemetry"} } }, "GatewayDrain": { "type": "object", "additionalProperties": false, "required": ["version", "gateway_id", "sequence", "reason", "deadline"], "properties": { "version": {"type": "string", "const": "1"}, "gateway_id": {"type": "string", "minLength": 1, "maxLength": 128}, "sequence": {"type": "integer", "minimum": 1}, "reason": {"type": "string", "minLength": 1, "maxLength": 256}, "deadline": {"type": "string", "format": "date-time", "maxLength": 64} } }, "TunnelAdmissionRequest": { "type": "object", "additionalProperties": false, "required": ["version", "session_id", "gateway_id", "audience", "grant", "reconnect_sequence", "client_nonce", "device_signature", "capabilities"], "properties": { "version": {"type": "string", "const": "1"}, "session_id": {"type": "string", "minLength": 1, "maxLength": 128}, "gateway_id": {"type": "string", "minLength": 1, "maxLength": 128}, "audience": {"type": "string", "minLength": 1, "maxLength": 256}, "grant": {"type": "string", "minLength": 43, "maxLength": 256}, "reconnect_sequence": {"type": "integer", "minimum": 0}, "client_nonce": {"type": "string", "minLength": 16, "maxLength": 128}, "device_signature": {"type": "string", "minLength": 86, "maxLength": 86}, "capabilities": {"$ref": "#/$defs/CapabilityProfile"} } }, "SessionAuthority": { "type": "object", "additionalProperties": false, "required": ["version", "session_id", "gateway_id", "audience", "reconnect_sequence", "expires_at", "capabilities", "provider_profile", "provider_identity", "selected_descriptor"], "properties": { "version": {"type": "string", "const": "1"}, "session_id": {"type": "string", "minLength": 1, "maxLength": 128}, "gateway_id": {"type": "string", "minLength": 1, "maxLength": 128}, "audience": {"type": "string", "minLength": 1, "maxLength": 256}, "reconnect_sequence": {"type": "integer", "minimum": 0}, "expires_at": {"type": "string", "format": "date-time", "maxLength": 64}, "capabilities": {"$ref": "#/$defs/CapabilityProfile"}, "provider_profile": {"type": "string", "enum": ["apollo"]}, "provider_identity": {"type": "string", "minLength": 1, "maxLength": 256}, "selected_descriptor": {"$ref": "#/$defs/SelectedSessionDescriptor"} } }, "ClientSessionAuthority": { "type": "object", "additionalProperties": false, "required": ["version", "session_id", "gateway_id", "audience", "reconnect_sequence", "expires_at", "capabilities", "selected_descriptor"], "properties": { "version": {"type": "string", "const": "1"}, "session_id": {"type": "string", "minLength": 1, "maxLength": 128}, "gateway_id": {"type": "string", "minLength": 1, "maxLength": 128}, "audience": {"type": "string", "minLength": 1, "maxLength": 256}, "reconnect_sequence": {"type": "integer", "minimum": 0}, "expires_at": {"type": "string", "format": "date-time", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$", "maxLength": 64}, "capabilities": {"$ref": "#/$defs/CapabilityProfile"}, "selected_descriptor": {"$ref": "#/$defs/SelectedSessionDescriptor"} } }, "ProviderStreamPolicy": { "type": "object", "additionalProperties": false, "required": ["video_profile", "audio_profile", "display_mode", "bitrate_target_kbps", "bitrate_maximum_kbps"], "properties": { "video_profile": {"$ref": "#/$defs/VideoProfile"}, "audio_profile": {"$ref": "#/$defs/AudioProfile"}, "display_mode": {"$ref": "#/$defs/DisplayMode"}, "bitrate_target_kbps": {"type": "integer", "minimum": 100, "maximum": 1000000}, "bitrate_maximum_kbps": {"type": "integer", "minimum": 100, "maximum": 1000000} } }, "DisplayLimitOverrideRequest": { "type": "object", "x-max-bytes": 16384, "additionalProperties": false, "required": ["allow_display_limit_override", "expected_version"], "properties": { "allow_display_limit_override": {"type": "boolean"}, "expected_version": {"type": "integer", "minimum": 1} } }, "QualityChangeRequest": { "type": "object", "x-max-bytes": 16384, "additionalProperties": false, "required": ["bitrate_preference", "expected_session_version", "expected_policy_version"], "properties": { "bitrate_preference": {"$ref": "#/$defs/BitratePreference"}, "expected_session_version": {"type": "integer", "minimum": 1}, "expected_policy_version": {"type": "string", "minLength": 1, "maxLength": 128} } }, "QualityChangeOperation": { "type": "object", "x-max-bytes": 16384, "additionalProperties": false, "required": ["operation_id", "session_id", "revision", "state", "requested_bitrate_preference", "effective_bitrate_kbps", "governing_policy_version", "session_version", "created_at", "deadline_at", "updated_at"], "properties": { "operation_id": {"type": "string", "format": "uuid", "pattern": "^(?!00000000-0000-0000-0000-000000000000$)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", "minLength": 36, "maxLength": 36}, "session_id": {"type": "string", "minLength": 1, "maxLength": 128}, "revision": {"type": "integer", "minimum": 1}, "state": {"type": "string", "enum": ["pending", "applying", "applied", "failed", "timed_out"]}, "requested_bitrate_preference": {"$ref": "#/$defs/BitratePreference"}, "effective_bitrate_kbps": {"type": "integer", "minimum": 100, "maximum": 1000000}, "governing_policy_version": {"type": "string", "minLength": 1, "maxLength": 128}, "session_version": {"type": "integer", "minimum": 1}, "created_at": {"type": "string", "format": "date-time", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{0,8}[1-9])?Z$", "maxLength": 64}, "deadline_at": {"type": "string", "format": "date-time", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{0,8}[1-9])?Z$", "maxLength": 64}, "updated_at": {"type": "string", "format": "date-time", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{0,8}[1-9])?Z$", "maxLength": 64}, "failure_code": {"type": "string", "minLength": 1, "maxLength": 128} } }, "StopOperation": { "type": "object", "x-max-bytes": 16384, "additionalProperties": false, "required": ["operation_id", "session_id", "state", "session_version", "created_at", "deadline_at", "updated_at"], "properties": { "operation_id": {"type": "string", "format": "uuid", "pattern": "^(?!00000000-0000-0000-0000-000000000000$)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", "minLength": 36, "maxLength": 36}, "session_id": {"type": "string", "minLength": 1, "maxLength": 128}, "state": {"type": "string", "enum": ["pending", "attempting", "applied", "failed", "termination_unconfirmed"]}, "session_version": {"type": "integer", "minimum": 1}, "created_at": {"type": "string", "format": "date-time", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{0,8}[1-9])?Z$", "maxLength": 64}, "deadline_at": {"type": "string", "format": "date-time", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{0,8}[1-9])?Z$", "maxLength": 64}, "updated_at": {"type": "string", "format": "date-time", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{0,8}[1-9])?Z$", "maxLength": 64}, "failure_code": {"type": "string", "minLength": 1, "maxLength": 128} } }, "GatewayQualityWorkRequest": { "type": "object", "additionalProperties": false, "x-max-bytes": 16384, "required": ["version", "session_id", "gateway_id", "reconnect_sequence", "acquisition"], "properties": { "version": {"type": "string", "const": "1"}, "session_id": {"type": "string", "minLength": 1, "maxLength": 128}, "gateway_id": {"type": "string", "minLength": 1, "maxLength": 128}, "reconnect_sequence": {"type": "integer", "minimum": 0}, "acquisition": {"type": "string", "enum": ["poll", "prompt", "observation"]}, "operation_id": {"type": "string", "format": "uuid", "pattern": "^(?!00000000-0000-0000-0000-000000000000$)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", "minLength": 36, "maxLength": 36}, "revision": {"type": "integer", "minimum": 1, "x-optional-pointer": true}, "lease_generation": {"type": "integer", "minimum": 1, "x-optional-pointer": true}, "current_applied_revision": {"type": "integer", "minimum": 0, "x-optional-pointer": true} } }, "GatewayQualityWork": { "type": "object", "additionalProperties": false, "x-max-bytes": 16384, "required": ["version", "session_id", "gateway_id", "reconnect_sequence", "operation_id", "revision", "lease_generation", "lease_expires_at", "selected_descriptor"], "properties": { "version": {"type": "string", "const": "1"}, "session_id": {"type": "string", "minLength": 1, "maxLength": 128}, "gateway_id": {"type": "string", "minLength": 1, "maxLength": 128}, "reconnect_sequence": {"type": "integer", "minimum": 0}, "operation_id": {"type": "string", "format": "uuid", "pattern": "^(?!00000000-0000-0000-0000-000000000000$)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", "minLength": 36, "maxLength": 36}, "revision": {"type": "integer", "minimum": 1}, "lease_generation": {"type": "integer", "minimum": 1}, "lease_expires_at": {"type": "string", "format": "date-time", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{0,8}[1-9])?Z$", "maxLength": 64}, "selected_descriptor": {"$ref": "#/$defs/SelectedSessionDescriptor"}, "current_applied_revision": {"type": "integer", "minimum": 0, "x-optional-pointer": true} } }, "GatewayQualityAck": { "type": "object", "additionalProperties": false, "x-max-bytes": 16384, "description": "Outcome invariants: applied requires current_applied_revision equal to revision; proven_prior requires current_applied_revision strictly less than revision; unknown forbids current_applied_revision and makes no applied-revision assertion.", "required": ["version", "session_id", "gateway_id", "reconnect_sequence", "operation_id", "revision", "lease_generation", "outcome"], "oneOf": [ {"properties": {"outcome": {"const": "applied"}}, "required": ["current_applied_revision"]}, {"properties": {"outcome": {"const": "proven_prior"}}, "required": ["current_applied_revision"]}, {"properties": {"outcome": {"const": "unknown"}}, "not": {"required": ["current_applied_revision"]}} ], "properties": { "version": {"type": "string", "const": "1"}, "session_id": {"type": "string", "minLength": 1, "maxLength": 128}, "gateway_id": {"type": "string", "minLength": 1, "maxLength": 128}, "reconnect_sequence": {"type": "integer", "minimum": 0}, "operation_id": {"type": "string", "format": "uuid", "pattern": "^(?!00000000-0000-0000-0000-000000000000$)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", "minLength": 36, "maxLength": 36}, "revision": {"type": "integer", "minimum": 1}, "lease_generation": {"type": "integer", "minimum": 1}, "outcome": {"type": "string", "enum": ["applied", "proven_prior", "unknown"]}, "current_applied_revision": {"type": "integer", "minimum": 0, "x-optional-pointer": true}, "failure_code": {"type": "string", "minLength": 1, "maxLength": 128} } }, "GatewayStopWorkRequest": { "type": "object", "additionalProperties": false, "x-max-bytes": 16384, "required": ["version", "session_id", "gateway_id", "reconnect_sequence", "acquisition"], "properties": { "version": {"type": "string", "const": "1"}, "session_id": {"type": "string", "minLength": 1, "maxLength": 128}, "gateway_id": {"type": "string", "minLength": 1, "maxLength": 128}, "reconnect_sequence": {"type": "integer", "minimum": 0}, "acquisition": {"type": "string", "enum": ["poll", "prompt"]}, "operation_id": {"type": "string", "format": "uuid", "pattern": "^(?!00000000-0000-0000-0000-000000000000$)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", "minLength": 36, "maxLength": 36} } }, "GatewayStopWork": { "type": "object", "additionalProperties": false, "x-max-bytes": 16384, "required": ["version", "session_id", "gateway_id", "reconnect_sequence", "operation_id", "attempt"], "properties": { "version": {"type": "string", "const": "1"}, "session_id": {"type": "string", "minLength": 1, "maxLength": 128}, "gateway_id": {"type": "string", "minLength": 1, "maxLength": 128}, "reconnect_sequence": {"type": "integer", "minimum": 0}, "operation_id": {"type": "string", "format": "uuid", "pattern": "^(?!00000000-0000-0000-0000-000000000000$)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", "minLength": 36, "maxLength": 36}, "attempt": {"type": "integer", "minimum": 1, "maximum": 1} } }, "GatewayStopAck": { "type": "object", "additionalProperties": false, "x-max-bytes": 16384, "required": ["version", "session_id", "gateway_id", "reconnect_sequence", "operation_id", "outcome"], "properties": { "version": {"type": "string", "const": "1"}, "session_id": {"type": "string", "minLength": 1, "maxLength": 128}, "gateway_id": {"type": "string", "minLength": 1, "maxLength": 128}, "reconnect_sequence": {"type": "integer", "minimum": 0}, "operation_id": {"type": "string", "format": "uuid", "pattern": "^(?!00000000-0000-0000-0000-000000000000$)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", "minLength": 36, "maxLength": 36}, "outcome": {"type": "string", "enum": ["applied", "failed", "termination_unconfirmed"]}, "failure_code": {"type": "string", "minLength": 1, "maxLength": 128} } }, "ProviderSessionWork": { "type": "object", "additionalProperties": false, "required": ["version", "session_id", "gateway_id", "reconnect_sequence", "expires_at", "provider_profile", "provider_identity", "policy_version_id", "stream_policy", "application_id", "client_id", "management_host", "management_port", "stream_host", "stream_port", "client_certificate_pem", "client_private_key_pem", "server_certificate_pem", "clipboard_policy", "provider_application_termination_allowed"], "properties": { "version": {"type": "string", "const": "1"}, "session_id": {"type": "string", "minLength": 1, "maxLength": 128}, "gateway_id": {"type": "string", "minLength": 1, "maxLength": 128}, "reconnect_sequence": {"type": "integer", "minimum": 0}, "expires_at": {"type": "string", "format": "date-time", "maxLength": 64}, "provider_profile": {"type": "string", "const": "apollo"}, "provider_identity": {"type": "string", "minLength": 1, "maxLength": 256}, "policy_version_id": {"type": "string", "minLength": 1, "maxLength": 128}, "stream_policy": {"$ref": "#/$defs/ProviderStreamPolicy"}, "application_id": {"type": "string", "minLength": 1, "maxLength": 128}, "client_id": {"type": "string", "minLength": 1, "maxLength": 128}, "management_host": {"type": "string", "minLength": 1, "maxLength": 256}, "management_port": {"type": "integer", "minimum": 1, "maximum": 65535}, "stream_host": {"type": "string", "minLength": 1, "maxLength": 256}, "stream_port": {"type": "integer", "minimum": 1, "maximum": 65535}, "client_certificate_pem": {"type": "string", "minLength": 1, "maxLength": 32768}, "client_private_key_pem": {"type": "string", "minLength": 1, "maxLength": 32768}, "server_certificate_pem": {"type": "string", "minLength": 1, "maxLength": 32768}, "clipboard_policy": {"$ref": "#/$defs/ClipboardPolicy"}, "provider_application_termination_allowed": {"type": "boolean"} } }, "ChannelFrame": { "type": "object", "additionalProperties": false, "required": ["version", "flow_id", "sequence", "flags", "fragment_index", "fragment_count", "timestamp_ms", "payload"], "properties": { "version": {"type": "string", "const": "1"}, "flow_id": {"type": "string", "minLength": 1, "maxLength": 64}, "sequence": {"type": "integer", "minimum": 0}, "flags": {"type": "integer", "minimum": 0, "maximum": 255}, "fragment_index": {"type": "integer", "minimum": 0, "maximum": 15}, "fragment_count": {"type": "integer", "minimum": 1, "maximum": 16}, "timestamp_ms": {"type": "integer", "minimum": 0}, "payload": {"type": "string", "maxLength": 87384, "x-max-bytes": 65536} } }, "ProviderState": { "type": "object", "additionalProperties": false, "required": ["version", "session_id", "state", "cleanup_pending", "channels"], "properties": { "version": {"type": "string", "const": "1"}, "session_id": {"type": "string", "minLength": 1, "maxLength": 128}, "state": {"type": "string", "enum": ["starting", "ready", "disconnected", "terminating", "terminated", "cleanup_pending", "failed"]}, "cleanup_pending": {"type": "boolean"}, "channels": {"type": "array", "maxItems": 8, "items": {"type": "string", "minLength": 1, "maxLength": 64}} } }, "GatewayClipboardAudit": { "type": "object", "additionalProperties": false, "required": ["version", "session_id", "direction", "outcome", "text_bytes", "reason"], "properties": { "version": {"type": "string", "const": "1"}, "session_id": {"type": "string", "minLength": 1, "maxLength": 128}, "direction": {"type": "string", "enum": ["client_to_provider", "provider_to_client"]}, "outcome": {"type": "string", "enum": ["forwarded", "suppressed", "rejected"]}, "text_bytes": {"type": "integer", "minimum": 0, "maximum": 65536}, "reason": {"type": "string", "enum": ["forwarded", "loop", "policy", "rate", "provider", "malformed"]} } }, "StableError": { "type": "object", "additionalProperties": false, "required": ["version", "code", "message", "retryable"], "properties": { "version": {"type": "string", "const": "1"}, "code": {"type": "string", "minLength": 1, "maxLength": 128}, "message": {"type": "string", "minLength": 1, "maxLength": 512}, "retryable": {"type": "boolean"} } } } }