647 lines
32 KiB
JSON
647 lines
32 KiB
JSON
{
|
|
"$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"],
|
|
"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}
|
|
}
|
|
},
|
|
"EntitledPool": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["pool_id", "name", "assignment_state"],
|
|
"properties": {
|
|
"pool_id": {"type": "string", "minLength": 1, "maxLength": 128},
|
|
"name": {"type": "string", "minLength": 1, "maxLength": 256},
|
|
"assignment_state": {"type": "string", "minLength": 1, "maxLength": 64}
|
|
}
|
|
},
|
|
"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}
|
|
}
|
|
},
|
|
"SessionRequest": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["client_device_id", "device_key_id", "pool_id", "idempotency_key"],
|
|
"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},
|
|
"requested_display_mode": {"$ref": "#/$defs/DisplayMode"}
|
|
}
|
|
},
|
|
"ReconnectRequest": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["client_device_id", "device_key_id", "expected_version"],
|
|
"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}
|
|
}
|
|
},
|
|
"BrokerSession": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["id", "principal_id", "pool_id", "state", "policy_snapshot", "cleanup_state", "idempotency_key", "correlation_id", "requested_at", "version"],
|
|
"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"}
|
|
}
|
|
},
|
|
"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"],
|
|
"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}
|
|
}
|
|
},
|
|
"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", "audio", "source_rate_control", "client_decode"],
|
|
"properties": {
|
|
"transport": {"type": "string", "minLength": 1, "maxLength": 64},
|
|
"framing": {"type": "string", "enum": ["datagram-v1", "datagram-v2"]},
|
|
"media": {"type": "string", "minLength": 1, "maxLength": 64},
|
|
"audio": {"type": "string", "minLength": 1, "maxLength": 64},
|
|
"source_rate_control": {"type": "string", "minLength": 1, "maxLength": 64},
|
|
"client_decode": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"maxItems": 2,
|
|
"uniqueItems": true,
|
|
"items": {"type": "string", "enum": ["h264-opus", "hevc-opus"]}
|
|
}
|
|
}
|
|
},
|
|
"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"],
|
|
"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}
|
|
}
|
|
},
|
|
"ProviderStreamPolicy": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["resolution_width", "resolution_height", "fps", "codec", "bitrate_kbps", "audio_enabled"],
|
|
"properties": {
|
|
"resolution_width": {"type": "integer", "minimum": 320, "maximum": 16384},
|
|
"resolution_height": {"type": "integer", "minimum": 200, "maximum": 8640},
|
|
"fps": {"type": "integer", "minimum": 1, "maximum": 240},
|
|
"codec": {"type": "string", "enum": ["H264", "HEVC", "AV1"]},
|
|
"bitrate_kbps": {"type": "integer", "minimum": 100, "maximum": 1000000},
|
|
"audio_enabled": {"type": "boolean"}
|
|
}
|
|
},
|
|
"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"}
|
|
}
|
|
}
|
|
}
|
|
}
|