Compare commits
27
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3ea2f35c6 | ||
|
|
6e18bc9ee6 | ||
|
|
8eacc4fda9 | ||
|
|
4693102b3c | ||
|
|
afbcea62f9 | ||
|
|
b6a4f773e4 | ||
|
|
afcd5d99db | ||
|
|
79d9e49497 | ||
|
|
408d4f9cc3 | ||
|
|
346bf5fe4d | ||
|
|
7c89ef5bf5 | ||
|
|
c554cac00d | ||
|
|
d1d00d6472 | ||
|
|
03e14a9ae3 | ||
|
|
995f63a27f | ||
|
|
30bb1a2fa3 | ||
|
|
021ecf425f | ||
|
|
ec15279b42 | ||
|
|
37c041e13e | ||
|
|
2e92fae27f | ||
|
|
534bb1031b | ||
|
|
e58f1c7c48 | ||
|
|
d26f8b60f8 | ||
|
|
59741761ce | ||
|
|
ebfe07376d | ||
|
|
0ea21cd3f2 | ||
|
|
36f6edffca |
@@ -20,8 +20,8 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||||
- uses: actions/setup-go@v7
|
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
|
||||||
with:
|
with:
|
||||||
go-version: "1.26.5"
|
go-version: "1.26.5"
|
||||||
cache: true
|
cache: true
|
||||||
@@ -44,7 +44,7 @@ jobs:
|
|||||||
runs-on: macos-26
|
runs-on: macos-26
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||||
- name: Assert pinned toolchain
|
- name: Assert pinned toolchain
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
+1
-1
@@ -21,10 +21,10 @@
|
|||||||
# Go workspace file
|
# Go workspace file
|
||||||
go.work
|
go.work
|
||||||
go.work.sum
|
go.work.sum
|
||||||
|
/.build
|
||||||
|
|
||||||
# env file
|
# env file
|
||||||
.env
|
.env
|
||||||
|
|
||||||
# IDE files
|
# IDE files
|
||||||
/.idea
|
/.idea
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.PHONY: verify generate proto-lint proto-breaking source-verify scope-verify conformance frame-verify go-test binding-compile strict-contracts clean-generated
|
.PHONY: verify generate proto-lint proto-breaking source-verify scope-verify ci-verify conformance frame-verify go-test binding-compile strict-contracts clean-generated
|
||||||
|
|
||||||
PYTHON ?= python3
|
PYTHON ?= python3
|
||||||
PROTOC ?= protoc
|
PROTOC ?= protoc
|
||||||
@@ -20,14 +20,19 @@ source-verify:
|
|||||||
$(PYTHON) -B tools/fixture_digest.py
|
$(PYTHON) -B tools/fixture_digest.py
|
||||||
|
|
||||||
scope-verify:
|
scope-verify:
|
||||||
|
$(PYTHON) -B tools/test_check_scope.py
|
||||||
$(PYTHON) -B tools/check_scope.py
|
$(PYTHON) -B tools/check_scope.py
|
||||||
|
|
||||||
|
ci-verify:
|
||||||
|
$(PYTHON) -B tools/check_ci_actions.py
|
||||||
|
|
||||||
go-test:
|
go-test:
|
||||||
go test ./gen/go/... ./tests/go
|
go test ./gen/go/... ./tests/go
|
||||||
|
|
||||||
binding-compile:
|
binding-compile:
|
||||||
rustc --crate-type lib gen/rust/protocol.rs -o /tmp/versevdi-protocol-generated.rlib
|
rustc --crate-type lib gen/rust/protocol.rs -o /tmp/versevdi-protocol-generated.rlib
|
||||||
swiftc -typecheck gen/swift/Protocol.swift
|
swiftc -typecheck gen/swift/Protocol.swift
|
||||||
|
swift build
|
||||||
|
|
||||||
strict-contracts:
|
strict-contracts:
|
||||||
$(PYTHON) -B tools/test_generated_contracts.py
|
$(PYTHON) -B tools/test_generated_contracts.py
|
||||||
@@ -39,8 +44,9 @@ conformance:
|
|||||||
|
|
||||||
frame-verify:
|
frame-verify:
|
||||||
$(PYTHON) tools/validate_frames.py
|
$(PYTHON) tools/validate_frames.py
|
||||||
|
$(PYTHON) tools/validate_gateway_envelopes.py
|
||||||
|
|
||||||
clean-generated:
|
clean-generated:
|
||||||
$(PYTHON) tools/generate.py --check
|
$(PYTHON) tools/generate.py --check
|
||||||
|
|
||||||
verify: generate proto-lint proto-breaking source-verify scope-verify go-test binding-compile strict-contracts conformance frame-verify clean-generated
|
verify: generate proto-lint proto-breaking source-verify scope-verify ci-verify go-test binding-compile strict-contracts conformance frame-verify clean-generated
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
// swift-tools-version: 6.0
|
||||||
|
import PackageDescription
|
||||||
|
|
||||||
|
let package = Package(
|
||||||
|
name: "VerseVDIProtocol",
|
||||||
|
platforms: [.macOS(.v14)],
|
||||||
|
products: [
|
||||||
|
.library(name: "VerseVDIProtocol", targets: ["VerseVDIProtocol"]),
|
||||||
|
],
|
||||||
|
targets: [
|
||||||
|
.target(name: "VerseVDIProtocol", path: "gen/swift", sources: ["Protocol.swift"]),
|
||||||
|
]
|
||||||
|
)
|
||||||
+4
-4
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
"protocol": "versevdi-control",
|
"protocol": "versevdi-control",
|
||||||
"current": "1",
|
"current": "2",
|
||||||
"n_minus_1": "0",
|
"n_minus_1": "1",
|
||||||
"n_minus_2": "-1",
|
"n_minus_2": "0",
|
||||||
"unsupported": ["-2", "2"],
|
"unsupported": ["-1", "3"],
|
||||||
"feature_registry": "registries/features.json",
|
"feature_registry": "registries/features.json",
|
||||||
"datagram_registry": "registries/datagrams.json"
|
"datagram_registry": "registries/datagrams.json"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,31 @@
|
|||||||
id version kind input expected
|
id version kind input expected
|
||||||
version-current 1 version 1 valid
|
version-current 2 version 2 valid
|
||||||
version-n-minus-1 0 version 0 valid
|
version-n-minus-1 1 version 1 valid
|
||||||
version-n-minus-2 -1 version -1 valid
|
version-n-minus-2 0 version 0 valid
|
||||||
version-unsupported 2 version 2 invalid:unsupported_version
|
version-unsupported 3 version 3 invalid:unsupported_version
|
||||||
page-valid 1 page limit=20;cursor=opaque valid
|
page-valid 1 page limit=20;cursor=opaque valid
|
||||||
page-limit-high 1 page limit=101 invalid:invalid_limit
|
page-limit-high 1 page limit=101 invalid:invalid_limit
|
||||||
manifest-valid 1 manifest version=1;gateway_id=g-1;grant=opaque-one-time-grant-value-with-at-least-43-bytes;audience=versevdi-gateway;purpose=launch;protocol=verse-gateway-v1;expires_at=2099-01-01T00:00:00Z valid
|
manifest-valid 1 manifest version=1;gateway_id=g-1;public_identity=gateway.control.test;grant=opaque-one-time-grant-value-with-at-least-43-bytes;audience=versevdi-gateway;purpose=launch;protocol=verse-gateway-v1;expires_at=2099-01-01T00:00:00Z valid
|
||||||
manifest-provider-field 1 manifest gateway_id=g-1;grant=g-1;audience=versevdi-gateway;purpose=launch;provider_url=https://provider.invalid invalid:forbidden_field
|
manifest-missing-public-identity 1 manifest version=1;gateway_id=g-1;grant=opaque-one-time-grant-value-with-at-least-43-bytes;audience=versevdi-gateway;purpose=launch;protocol=verse-gateway-v1;expires_at=2099-01-01T00:00:00Z invalid:invalid_manifest
|
||||||
|
manifest-provider-field 1 manifest gateway_id=g-1;public_identity=gateway.control.test;grant=g-1;audience=versevdi-gateway;purpose=launch;provider_url=https://provider.invalid invalid:forbidden_field
|
||||||
clipboard-text-valid 1 clipboard encoding=utf-8;text=hello%20world valid
|
clipboard-text-valid 1 clipboard encoding=utf-8;text=hello%20world valid
|
||||||
clipboard-file 1 clipboard encoding=octet-stream;file=/tmp/a invalid:unsupported_clipboard
|
clipboard-file 1 clipboard encoding=octet-stream;file=/tmp/a invalid:unsupported_clipboard
|
||||||
|
session-request-policy-free 2 session_request client_device_id=device-1;device_key_id=key-1;pool_id=pool-1;idempotency_key=request-1 valid
|
||||||
|
session-request-wire-v1-shape 1 session_request client_device_id=device-1;device_key_id=key-1;pool_id=pool-1;idempotency_key=request-1;policy_snapshot=client-owned invalid:unsupported_version
|
||||||
|
session-request-client-policy 2 session_request client_device_id=device-1;device_key_id=key-1;pool_id=pool-1;idempotency_key=request-1;policy_snapshot=client-owned invalid:forbidden_field
|
||||||
|
authenticated-browser-session 2 browser_authenticated_session username=alice;provider=local;roles=user;role=user valid
|
||||||
|
authenticated-browser-native-identity 2 browser_authenticated_session username=alice;provider=local;roles=user;role=user;client_device_id=device-1;device_key_id=key-1 invalid:forbidden_field
|
||||||
|
authenticated-browser-empty-role 2 browser_authenticated_session username=alice;provider=local;roles=;role=user invalid:invalid_session
|
||||||
|
authenticated-browser-long-role 2 browser_authenticated_session username=alice;provider=local;roles=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;role=user invalid:invalid_session
|
||||||
|
authenticated-browser-role-64-utf8-bytes 2 browser_authenticated_session username=alice;provider=local;roles=éééééééééééééééééééééééééééééééé;role=user valid
|
||||||
|
authenticated-browser-role-66-utf8-bytes 2 browser_authenticated_session username=alice;provider=local;roles=ééééééééééééééééééééééééééééééééé;role=user invalid:invalid_session
|
||||||
|
authenticated-native-session 2 native_authenticated_session username=alice;provider=local;roles=user;role=user;client_device_id=device-1;device_key_id=key-1 valid
|
||||||
|
authenticated-native-missing-identity 2 native_authenticated_session username=alice;provider=local;roles=user;role=user invalid:required
|
||||||
|
authenticated-partial-native-session 2 native_authenticated_session username=alice;provider=local;roles=user;role=user;client_device_id=device-1 invalid:required
|
||||||
|
authenticated-native-empty-role 2 native_authenticated_session username=alice;provider=local;roles=;role=user;client_device_id=device-1;device_key_id=key-1 invalid:invalid_session
|
||||||
|
authenticated-native-long-role 2 native_authenticated_session username=alice;provider=local;roles=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;role=user;client_device_id=device-1;device_key_id=key-1 invalid:invalid_session
|
||||||
|
authenticated-native-role-64-utf8-bytes 2 native_authenticated_session username=alice;provider=local;roles=éééééééééééééééééééééééééééééééé;role=user;client_device_id=device-1;device_key_id=key-1 valid
|
||||||
|
authenticated-native-role-66-utf8-bytes 2 native_authenticated_session username=alice;provider=local;roles=ééééééééééééééééééééééééééééééééé;role=user;client_device_id=device-1;device_key_id=key-1 invalid:invalid_session
|
||||||
|
native-tunnel-credential 2 native_tunnel_credential client_device_id=device-1;device_key_id=key-1;certificate_chain_pem=certificate;trust_bundle_pem=trust;expires_at=2099-01-01T00:00:00Z valid
|
||||||
|
native-tunnel-credential-offset-time 2 native_tunnel_credential client_device_id=device-1;device_key_id=key-1;certificate_chain_pem=certificate;trust_bundle_pem=trust;expires_at=2099-01-01T00:00:00+00:00 invalid:invalid_credential
|
||||||
|
native-tunnel-credential-noncanonical-fraction 2 native_tunnel_credential client_device_id=device-1;device_key_id=key-1;certificate_chain_pem=certificate;trust_bundle_pem=trust;expires_at=2099-01-01T00:00:00.100Z invalid:invalid_credential
|
||||||
|
|||||||
|
@@ -1,7 +1,7 @@
|
|||||||
id version kind input expected
|
id version kind input expected
|
||||||
valid-empty-control 1 datagram hex=564401010000000000000000000000000000010000 valid
|
valid-empty-control 1 datagram hex=564401010000000000000000000000000000010000 valid
|
||||||
invalid-short 1 datagram hex=564401 invalid:truncated
|
invalid-short 1 datagram hex=564401 invalid:truncated
|
||||||
invalid-version 1 datagram hex=564402010000000000000000000000000000010000 invalid:unsupported_version
|
invalid-version 1 datagram hex=564403010000000000000000000000000000010000 invalid:unsupported_version
|
||||||
invalid-channel 1 datagram hex=564401990000000000000000000000000000010000 invalid:unknown_channel
|
invalid-channel 1 datagram hex=564401990000000000000000000000000000010000 invalid:unknown_channel
|
||||||
invalid-length 1 datagram hex=564401010000000000000000000000000000010001 invalid:length_mismatch
|
invalid-length 1 datagram hex=564401010000000000000000000000000000010001 invalid:length_mismatch
|
||||||
valid-video-empty 1 datagram hex=5644010a0000000000000000000000000000010000 valid
|
valid-video-empty 1 datagram hex=5644010a0000000000000000000000000000010000 valid
|
||||||
|
|||||||
|
@@ -0,0 +1,10 @@
|
|||||||
|
id version kind input expected
|
||||||
|
v2-valid-video-single 2 datagram hex=5644020a00000000010000000000000002000000010003010203 valid
|
||||||
|
v2-valid-video-last-fragment 2 datagram hex=5644020a00000000010000000000000002037a037b0000 valid
|
||||||
|
v2-invalid-short 2 datagram hex=564402 invalid:truncated
|
||||||
|
v2-invalid-version 2 datagram hex=5644030a00000000010000000000000002000000010000 invalid:unsupported_version
|
||||||
|
v2-invalid-channel 2 datagram hex=5644020d00000000010000000000000002000000010000 invalid:unknown_channel
|
||||||
|
v2-invalid-fragment-zero 2 datagram hex=5644020a00000000010000000000000002000000000000 invalid:fragment
|
||||||
|
v2-invalid-fragment-index 2 datagram hex=5644020a00000000010000000000000002000100010000 invalid:fragment
|
||||||
|
v2-invalid-fragment-count-limit 2 datagram hex=5644020a000000000100000000000000020000037c0000 invalid:fragment_limit
|
||||||
|
v2-invalid-length 2 datagram hex=5644020a00000000010000000000000002000000010001 invalid:length_mismatch
|
||||||
|
@@ -0,0 +1,2 @@
|
|||||||
|
id version kind input expected
|
||||||
|
device-proof-canonical 1 device_proof_transcript server_id=00112233445566778899aabbccddeeff;principal_id=102132435465768798a9bacbdcedfe0f;device_id=ffeeddccbbaa99887766554433221100;challenge=000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f;expiry_unix_ms=1700000000123 76657273657664692d6465766963652d70726f6f662d763100112233445566778899aabbccddeeff102132435465768798a9bacbdcedfe0fffeeddccbbaa99887766554433221100000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f0000018bcfe5687b
|
||||||
|
@@ -0,0 +1,6 @@
|
|||||||
|
id version kind input expected
|
||||||
|
valid-forwarded 1 gateway_clipboard_audit direction=client_to_provider;outcome=forwarded;text_bytes=1024;reason=forwarded valid
|
||||||
|
valid-suppressed 1 gateway_clipboard_audit direction=provider_to_client;outcome=suppressed;text_bytes=12;reason=loop valid
|
||||||
|
audit-invalid-direction 1 gateway_clipboard_audit direction=bidirectional;outcome=forwarded;text_bytes=1;reason=forwarded invalid:clipboard_audit
|
||||||
|
invalid-bytes 1 gateway_clipboard_audit direction=client_to_provider;outcome=rejected;text_bytes=65537;reason=policy invalid:clipboard_audit
|
||||||
|
invalid-content 1 gateway_clipboard_audit direction=client_to_provider;outcome=rejected;text_bytes=1;reason=rate;text=forbidden invalid:forbidden
|
||||||
|
@@ -0,0 +1,12 @@
|
|||||||
|
id version kind input expected
|
||||||
|
valid-client-to-provider 1 gateway_clipboard direction=client_to_provider;text=hello;encoding=utf-8;loop_token=abcdefghijklmnop valid
|
||||||
|
valid-provider-to-client 1 gateway_clipboard direction=provider_to_client;text=host%20text;encoding=utf-8;loop_token=qrstuvwxyzABCDEF valid
|
||||||
|
valid-token-alphabet 1 gateway_clipboard direction=client_to_provider;text=hello;encoding=utf-8;loop_token=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_ valid
|
||||||
|
valid-token-max 1 gateway_clipboard direction=client_to_provider;text=hello;encoding=utf-8;loop_token=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_ valid
|
||||||
|
invalid-direction 1 gateway_clipboard direction=bidirectional;text=hello;encoding=utf-8;loop_token=abcdefghijklmnop invalid:clipboard
|
||||||
|
invalid-token 1 gateway_clipboard direction=client_to_provider;text=hello;encoding=utf-8;loop_token=short invalid:clipboard
|
||||||
|
invalid-token-15 1 gateway_clipboard direction=client_to_provider;text=hello;encoding=utf-8;loop_token=abcdefghijklmno invalid:clipboard
|
||||||
|
invalid-token-129 1 gateway_clipboard direction=client_to_provider;text=hello;encoding=utf-8;loop_token=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_A invalid:clipboard
|
||||||
|
invalid-token-character 1 gateway_clipboard direction=client_to_provider;text=hello;encoding=utf-8;loop_token=!!!!!!!!!!!!!!!! invalid:clipboard
|
||||||
|
invalid-token-trailing-bits 1 gateway_clipboard direction=client_to_provider;text=hello;encoding=utf-8;loop_token=AAAAAAAAAAAAAAAAAB invalid:clipboard
|
||||||
|
invalid-file 1 gateway_clipboard direction=client_to_provider;text=hello;encoding=utf-8;loop_token=abcdefghijklmnop;file=file.txt invalid:forbidden
|
||||||
|
@@ -0,0 +1,41 @@
|
|||||||
|
id version kind input expected
|
||||||
|
valid-keyboard-press 1 gateway_input hex=5647493101040102001e valid
|
||||||
|
valid-keyboard-release 1 gateway_input hex=5647493101040000001e valid
|
||||||
|
valid-mouse-button 1 gateway_input hex=564749310203010100 valid
|
||||||
|
valid-mouse-release 1 gateway_input hex=564749310203000100 valid
|
||||||
|
valid-relative-mouse 1 gateway_input hex=564749310304fffe0003 valid
|
||||||
|
valid-utf8-scalar 1 gateway_input hex=564749310403e29883 valid
|
||||||
|
valid-controller 1 gateway_input hex=5647493105110200030004ffff00010002000300040005 valid
|
||||||
|
valid-controller-release 1 gateway_input hex=5647493105110200000000000000000000000000000000 valid
|
||||||
|
valid-absolute-mouse 1 gateway_input hex=56474931060804d202370a0005a0 valid
|
||||||
|
valid-scroll 1 gateway_input hex=564749310704ff880078 valid
|
||||||
|
valid-controller-arrival 1 gateway_input hex=564749310808020003010000001f valid
|
||||||
|
valid-idr 1 gateway_feedback hex=5647463100010000 valid
|
||||||
|
valid-fec 1 gateway_feedback hex=56474631000200150000002a000500030002000a000200080002140001 valid
|
||||||
|
valid-terminal-receipt 1 gateway_feedback hex=5647463100030000 valid
|
||||||
|
valid-quality-prompt 1 gateway_feedback hex=564746310004001812345678123456781234567812345678000000000000002a valid
|
||||||
|
valid-stop-prompt 1 gateway_feedback hex=564746310005001012345678123456781234567812345678 valid
|
||||||
|
valid-termination 1 gateway_feedback hex=564746310110000400000001 valid
|
||||||
|
valid-rumble 1 gateway_feedback hex=56474631011100050112345678 valid
|
||||||
|
valid-hdr 1 gateway_feedback hex=564746310112000101 valid
|
||||||
|
invalid-input-magic 1 gateway_input hex=494e503101040102001e invalid:magic
|
||||||
|
invalid-input-kind 1 gateway_input hex=564749317f00 invalid:kind
|
||||||
|
invalid-input-reserved 1 gateway_input hex=564749310203010101 invalid:reserved
|
||||||
|
invalid-input-utf8 1 gateway_input hex=564749310402c328 invalid:utf8
|
||||||
|
invalid-input-length 1 gateway_input hex=564749310104010200 invalid:length
|
||||||
|
invalid-absolute-zero-viewport 1 gateway_input hex=56474931060800000000000005a0 invalid:field
|
||||||
|
invalid-absolute-x-out-of-range 1 gateway_input hex=5647493106080a0000000a0005a0 invalid:field
|
||||||
|
invalid-absolute-y-out-of-range 1 gateway_input hex=564749310608000005a00a0005a0 invalid:field
|
||||||
|
invalid-absolute-length 1 gateway_input hex=56474931060700000000010001 invalid:length
|
||||||
|
invalid-scroll-length 1 gateway_input hex=5647493107020000 invalid:length
|
||||||
|
invalid-feedback-direction 1 gateway_feedback hex=5647463101020000 invalid:direction
|
||||||
|
invalid-terminal-receipt-direction 1 gateway_feedback hex=5647463101030000 invalid:direction
|
||||||
|
invalid-terminal-receipt-body 1 gateway_feedback hex=5647463100030001ff invalid:length
|
||||||
|
invalid-terminal-receipt-truncated 1 gateway_feedback hex=56474631000300 invalid:truncated
|
||||||
|
invalid-terminal-receipt-length 1 gateway_feedback hex=5647463100030001 invalid:length
|
||||||
|
invalid-feedback-type 1 gateway_feedback hex=5647463100060000 invalid:type
|
||||||
|
invalid-quality-prompt-trailing 1 gateway_feedback hex=564746310004001912345678123456781234567812345678000000000000002a00 invalid:length
|
||||||
|
invalid-quality-prompt-zero-uuid 1 gateway_feedback hex=564746310004001800000000000000000000000000000000000000000000002a invalid:field
|
||||||
|
invalid-stop-prompt-zero-uuid 1 gateway_feedback hex=564746310005001000000000000000000000000000000000 invalid:field
|
||||||
|
invalid-controller-arrival-family 1 gateway_input hex=564749310808020003040000001f invalid:field
|
||||||
|
invalid-feedback-length 1 gateway_feedback hex=5647463101100003000000 invalid:length
|
||||||
|
@@ -1,6 +1,9 @@
|
|||||||
id version kind input expected
|
id version kind input expected
|
||||||
tunnel-current 1 tunnel offered=1;feature=control.v1 valid
|
tunnel-current 2 tunnel offered=2;feature=control.v2 valid
|
||||||
tunnel-n-minus-1 0 tunnel offered=0;feature=control.v1 valid
|
tunnel-n-minus-1 1 tunnel offered=1;feature=control.v1 valid
|
||||||
tunnel-n-minus-2 -1 tunnel offered=-1;feature=control.v1 valid
|
tunnel-n-minus-2 0 tunnel offered=0;feature=control.v1 valid
|
||||||
tunnel-unsupported 1 tunnel offered=2;feature=control.v1 invalid:unsupported_version
|
tunnel-display-request 2 tunnel offered=2;feature=display.request.v1 valid
|
||||||
tunnel-no-control 1 tunnel offered=1;feature=media.video invalid:unsupported_feature
|
tunnel-absolute-input 2 tunnel offered=2;feature=input.absolute.v1 valid
|
||||||
|
tunnel-scroll-input 2 tunnel offered=2;feature=input.scroll.v1 valid
|
||||||
|
tunnel-unsupported 2 tunnel offered=3;feature=control.v2 invalid:unsupported_version
|
||||||
|
tunnel-no-control 2 tunnel offered=2;feature=media.video invalid:unsupported_feature
|
||||||
|
|||||||
|
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"username": "alice",
|
||||||
|
"provider": "local",
|
||||||
|
"roles": ["user"],
|
||||||
|
"role": "user",
|
||||||
|
"native_identity": {
|
||||||
|
"client_device_id": "device-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"mode":"auto","target_kbps":1000}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"username": "alice",
|
||||||
|
"provider": "local",
|
||||||
|
"roles": ["user"],
|
||||||
|
"role": "user",
|
||||||
|
"native_identity": {
|
||||||
|
"client_device_id": "device-1",
|
||||||
|
"device_key_id": "key-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"transport":"quic-tls13","framing":"datagram-v2","media":"encoded","audio":"encoded","source_rate_control":"server","client_decode":["h264-opus"]}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":"1","session_id":"session-1","gateway_id":"gateway-1","reconnect_sequence":2,"operation_id":"12345678-1234-1234-1234-123456789abc","revision":7,"lease_generation":3,"outcome":"applied","current_applied_revision":6}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":"1","session_id":"session-1","gateway_id":"gateway-1","reconnect_sequence":2,"operation_id":"12345678-1234-1234-1234-123456789ABC","revision":7,"lease_generation":3,"outcome":"unknown"}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":"1","session_id":"session-1","gateway_id":"gateway-1","reconnect_sequence":2,"operation_id":"00000000-0000-0000-0000-000000000000","revision":7,"lease_generation":3,"outcome":"unknown"}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":"1","session_id":"session-1","gateway_id":"gateway-1","reconnect_sequence":2,"acquisition":"poll","operation_id":"12345678-1234-1234-1234-123456789abc","revision":7}
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
"gateway": {
|
"gateway": {
|
||||||
"id": "gateway-1",
|
"id": "gateway-1",
|
||||||
"addresses": ["gateway.control.test:443"],
|
"addresses": ["gateway.control.test:443"],
|
||||||
"public_identity": "gateway-1"
|
"public_identity": "gateway.control.test"
|
||||||
},
|
},
|
||||||
"tunnel": {
|
"tunnel": {
|
||||||
"versions": ["verse-gateway-v1/1"],
|
"versions": ["verse-gateway-v1/1"],
|
||||||
@@ -26,5 +26,14 @@
|
|||||||
"audience": "versevdi-gateway"
|
"audience": "versevdi-gateway"
|
||||||
},
|
},
|
||||||
"correlation_id": "correlation-1",
|
"correlation_id": "correlation-1",
|
||||||
"provider_url": "https://provider.invalid"
|
"provider_url": "https://provider.invalid",
|
||||||
|
"selected_descriptor": {
|
||||||
|
"video_profile": {"codec": "h264", "bit_depth": 8, "chroma_subsampling": "4:2:0", "color_space": "bt709-limited", "transfer_function": "sdr"},
|
||||||
|
"audio_profile": {"codec": "opus", "sample_rate_hz": 48000, "channels": 2, "channel_layout": "stereo", "packet_duration_ms": 5},
|
||||||
|
"display_mode": {"resolution_width": 1920, "resolution_height": 1080, "fps": 60},
|
||||||
|
"bitrate_target_kbps": 20000,
|
||||||
|
"bitrate_maximum_kbps": 40000,
|
||||||
|
"adjustment": {"display_reason": "none", "bitrate_reason": "none"},
|
||||||
|
"media_timestamp_basis": "gateway-send-wall-clock-ms"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"username": "alice",
|
||||||
|
"provider": "local",
|
||||||
|
"roles": ["user"],
|
||||||
|
"role": "user"
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"resolution_width":1920,"resolution_height":1080,"fps":60,"codec":"H264","bitrate_kbps":20000,"audio_enabled":true}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"operation_id":"12345678-1234-1234-1234-123456789abc","session_id":"session-1","revision":7,"state":"pending","requested_bitrate_preference":{"mode":"auto"},"effective_bitrate_kbps":20000,"governing_policy_version":"policy-1","session_version":2,"created_at":"2099-01-01T00:00:00.100Z","deadline_at":"2099-01-01T00:00:30Z","updated_at":"2099-01-01T00:00:00Z"}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"operation_id":"12345678-1234-1234-1234-123456789abc","session_id":"session-1","revision":7,"state":"pending","requested_bitrate_preference":{"mode":"auto"},"effective_bitrate_kbps":20000,"governing_policy_version":"policy-1","session_version":2,"created_at":"2099-01-01T00:00:00+00:00","deadline_at":"2099-01-01T00:00:30Z","updated_at":"2099-01-01T00:00:00Z"}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"video_profile":{"codec":"h264","bit_depth":8,"chroma_subsampling":"4:2:0","color_space":"bt709-limited","transfer_function":"sdr"},"audio_profile":{"codec":"opus","sample_rate_hz":48000,"channels":2,"channel_layout":"stereo","packet_duration_ms":5},"display_mode":{"resolution_width":1920,"resolution_height":1080,"fps":60},"bitrate_target_kbps":20000,"bitrate_maximum_kbps":40000,"adjustment":{"display_reason":"none","bitrate_reason":"none"},"media_timestamp_basis":"gateway-send-wall-clock-ms","provider_identity":"forbidden"}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"client_device_id": "device-1",
|
||||||
|
"device_key_id": "key-1",
|
||||||
|
"pool_id": "pool-1",
|
||||||
|
"idempotency_key": "request-1",
|
||||||
|
"policy_snapshot": {}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"client_device_id":"device-1","device_key_id":"key-1","pool_id":"pool-1","idempotency_key":"request-1"}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"codec":"vp9","bit_depth":8,"chroma_subsampling":"4:2:0","color_space":"bt709-limited","transfer_function":"sdr"}
|
||||||
+35
-1
@@ -3,8 +3,42 @@
|
|||||||
"files": [
|
"files": [
|
||||||
"fixtures/conformance/control-v1.tsv",
|
"fixtures/conformance/control-v1.tsv",
|
||||||
"fixtures/conformance/datagram-v1.tsv",
|
"fixtures/conformance/datagram-v1.tsv",
|
||||||
|
"fixtures/conformance/datagram-v2.tsv",
|
||||||
|
"fixtures/conformance/device-proof-v1.tsv",
|
||||||
"fixtures/conformance/events-v1.tsv",
|
"fixtures/conformance/events-v1.tsv",
|
||||||
|
"fixtures/conformance/gateway-clipboard-audit-v1.tsv",
|
||||||
|
"fixtures/conformance/gateway-clipboard-v1.tsv",
|
||||||
|
"fixtures/conformance/gateway-input-feedback-v1.tsv",
|
||||||
"fixtures/conformance/tunnel-v1.tsv"
|
"fixtures/conformance/tunnel-v1.tsv"
|
||||||
],
|
],
|
||||||
"corpus_sha256": "0874d39dd14c0107e602ea8909f8d53673f964c67dc9fd5fcadb8641e6ebf592"
|
"corpus_sha256": "10751a9192961aeb8ddcf3bbf720b026b07f92c871c813c301660dd3de930186",
|
||||||
|
"json_files": [
|
||||||
|
"fixtures/invalid/authenticated-session-partial-native-identity.json",
|
||||||
|
"fixtures/invalid/bitrate-preference-auto-target.json",
|
||||||
|
"fixtures/invalid/browser-session-native-identity.json",
|
||||||
|
"fixtures/invalid/capability-rc5-opaque.json",
|
||||||
|
"fixtures/invalid/gateway-quality-ack-contradictory.json",
|
||||||
|
"fixtures/invalid/gateway-quality-ack-uppercase-uuid.json",
|
||||||
|
"fixtures/invalid/gateway-quality-ack-zero-uuid.json",
|
||||||
|
"fixtures/invalid/gateway-quality-poll-coordinates.json",
|
||||||
|
"fixtures/invalid/manifest-provider-field.json",
|
||||||
|
"fixtures/invalid/native-session-missing-identity.json",
|
||||||
|
"fixtures/invalid/provider-stream-policy-rc5.json",
|
||||||
|
"fixtures/invalid/quality-operation-noncanonical-fraction.json",
|
||||||
|
"fixtures/invalid/quality-operation-offset-time.json",
|
||||||
|
"fixtures/invalid/selected-session-descriptor-provider-field.json",
|
||||||
|
"fixtures/invalid/session-request-policy-snapshot.json",
|
||||||
|
"fixtures/invalid/session-request-rc5.json",
|
||||||
|
"fixtures/invalid/video-profile-unknown.json",
|
||||||
|
"fixtures/valid/authenticated-browser-session.json",
|
||||||
|
"fixtures/valid/authenticated-native-session.json",
|
||||||
|
"fixtures/valid/gateway-quality-ack-applied.json",
|
||||||
|
"fixtures/valid/gateway-quality-poll.json",
|
||||||
|
"fixtures/valid/manifest.json",
|
||||||
|
"fixtures/valid/native-tunnel-credential.json",
|
||||||
|
"fixtures/valid/selected-session-descriptor.json",
|
||||||
|
"fixtures/valid/session-quality-limits.json",
|
||||||
|
"fixtures/valid/session-request.json"
|
||||||
|
],
|
||||||
|
"json_corpus_sha256": "08dea278526a523d21ea4ca6270ba1e33d44dc0d701681917d7ffc6fb13053d7"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"username": "alice",
|
||||||
|
"provider": "local",
|
||||||
|
"roles": ["user"],
|
||||||
|
"role": "user"
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"username": "alice",
|
||||||
|
"provider": "local",
|
||||||
|
"roles": ["user"],
|
||||||
|
"role": "user",
|
||||||
|
"native_identity": {
|
||||||
|
"client_device_id": "device-1",
|
||||||
|
"device_key_id": "key-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":"1","session_id":"session-1","gateway_id":"gateway-1","reconnect_sequence":2,"operation_id":"12345678-1234-1234-1234-123456789abc","revision":7,"lease_generation":3,"outcome":"applied","current_applied_revision":7}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":"1","session_id":"session-1","gateway_id":"gateway-1","reconnect_sequence":2,"acquisition":"poll"}
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
"gateway": {
|
"gateway": {
|
||||||
"id": "gateway-1",
|
"id": "gateway-1",
|
||||||
"addresses": ["gateway.control.test:443"],
|
"addresses": ["gateway.control.test:443"],
|
||||||
"public_identity": "gateway-1"
|
"public_identity": "gateway.control.test"
|
||||||
},
|
},
|
||||||
"tunnel": {
|
"tunnel": {
|
||||||
"versions": ["verse-gateway-v1/1"],
|
"versions": ["verse-gateway-v1/1"],
|
||||||
@@ -25,5 +25,14 @@
|
|||||||
"expires_at": "2099-01-01T00:00:00Z",
|
"expires_at": "2099-01-01T00:00:00Z",
|
||||||
"audience": "versevdi-gateway"
|
"audience": "versevdi-gateway"
|
||||||
},
|
},
|
||||||
"correlation_id": "correlation-1"
|
"correlation_id": "correlation-1",
|
||||||
|
"selected_descriptor": {
|
||||||
|
"video_profile": {"codec": "h264", "bit_depth": 8, "chroma_subsampling": "4:2:0", "color_space": "bt709-limited", "transfer_function": "sdr"},
|
||||||
|
"audio_profile": {"codec": "opus", "sample_rate_hz": 48000, "channels": 2, "channel_layout": "stereo", "packet_duration_ms": 5},
|
||||||
|
"display_mode": {"resolution_width": 1920, "resolution_height": 1080, "fps": 60},
|
||||||
|
"bitrate_target_kbps": 20000,
|
||||||
|
"bitrate_maximum_kbps": 40000,
|
||||||
|
"adjustment": {"display_reason": "none", "bitrate_reason": "none"},
|
||||||
|
"media_timestamp_basis": "gateway-send-wall-clock-ms"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"client_device_id": "device-1",
|
||||||
|
"device_key_id": "key-1",
|
||||||
|
"certificate_chain_pem": "-----BEGIN CERTIFICATE-----\nfixture\n-----END CERTIFICATE-----",
|
||||||
|
"trust_bundle_pem": "-----BEGIN CERTIFICATE-----\nfixture-ca\n-----END CERTIFICATE-----",
|
||||||
|
"expires_at": "2099-01-01T00:00:00Z"
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"video_profile": {"codec": "hevc", "bit_depth": 8, "chroma_subsampling": "4:2:0", "color_space": "bt709-limited", "transfer_function": "sdr"},
|
||||||
|
"audio_profile": {"codec": "opus", "sample_rate_hz": 48000, "channels": 2, "channel_layout": "stereo", "packet_duration_ms": 5},
|
||||||
|
"display_mode": {"resolution_width": 2560, "resolution_height": 1440, "fps": 120},
|
||||||
|
"bitrate_target_kbps": 40000,
|
||||||
|
"bitrate_maximum_kbps": 50000,
|
||||||
|
"adjustment": {"display_reason": "none", "bitrate_reason": "policy_default"},
|
||||||
|
"media_timestamp_basis": "gateway-send-wall-clock-ms"
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"policy_version_id": "policy-1",
|
||||||
|
"policy_display_limit": {"resolution_width": 3840, "resolution_height": 2160, "fps": 120},
|
||||||
|
"selectable_display_maximum": {"resolution_width": 3840, "resolution_height": 2160, "fps": 120},
|
||||||
|
"display_limit_override": false,
|
||||||
|
"bitrate_minimum_kbps": 1000,
|
||||||
|
"bitrate_target_kbps": 20000,
|
||||||
|
"bitrate_maximum_kbps": 50000
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"client_device_id": "device-1",
|
||||||
|
"device_key_id": "key-1",
|
||||||
|
"pool_id": "pool-1",
|
||||||
|
"idempotency_key": "request-1",
|
||||||
|
"video_profiles": [
|
||||||
|
{"codec": "h264", "bit_depth": 8, "chroma_subsampling": "4:2:0", "color_space": "bt709-limited", "transfer_function": "sdr"}
|
||||||
|
],
|
||||||
|
"bitrate_preference": {"mode": "auto"}
|
||||||
|
}
|
||||||
@@ -29,4 +29,11 @@ Registered channels are `control.ack.v1`, `control.cancel.v1`, `clipboard.text.v
|
|||||||
application flow IDs 10, 11, and 12 and a path-MTU-safe payload limit of 1,179 bytes;
|
application flow IDs 10, 11, and 12 and a path-MTU-safe payload limit of 1,179 bytes;
|
||||||
larger encoded units use at most 16 validated fragments. Clipboard payloads are UTF-8
|
larger encoded units use at most 16 validated fragments. Clipboard payloads are UTF-8
|
||||||
JSON text contracts and remain subject to the 65,536-byte text limit and explicit
|
JSON text contracts and remain subject to the 65,536-byte text limit and explicit
|
||||||
authorization.
|
Server-owned direction, rate, and loop-token policy as defined in
|
||||||
|
`gateway-clipboard-v1.md`.
|
||||||
|
|
||||||
|
Within an active Phase 3C gateway session, `input.sequenced.v1` and the
|
||||||
|
bidirectional reliable `control.ack.v1` payloads additionally use the exact
|
||||||
|
provider-neutral grammars in [gateway-input-feedback-v1.md](gateway-input-feedback-v1.md).
|
||||||
|
Those grammars do not alter this datagram header or make provider traffic visible to
|
||||||
|
the Verse client.
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
# VerseVDI complete media datagram v2
|
||||||
|
|
||||||
|
Datagram v2 carries one complete encoded video or audio unit under one sequence.
|
||||||
|
It is negotiated explicitly as `datagram-v2`; v1 bytes are never reinterpreted.
|
||||||
|
The gateway relays encoded bytes without codec processing or provider exposure.
|
||||||
|
|
||||||
|
All multi-byte integers are unsigned big-endian. The fixed header is 23 bytes:
|
||||||
|
|
||||||
|
| Offset | Size | Field | Rule |
|
||||||
|
|---:|---:|---|---|
|
||||||
|
| 0 | 2 | magic | ASCII `VD` (`0x56 0x44`) |
|
||||||
|
| 2 | 1 | version | `2` only |
|
||||||
|
| 3 | 1 | channel | `media.video.v1` (10) or `media.audio.v1` (11) |
|
||||||
|
| 4 | 1 | flags | zero; unknown bits reject |
|
||||||
|
| 5 | 4 | sequence | session-local wrapping complete-unit sequence |
|
||||||
|
| 9 | 8 | timestamp_ms | sender timestamp, bounded by transport skew policy |
|
||||||
|
| 17 | 2 | fragment_index | zero-based |
|
||||||
|
| 19 | 2 | fragment_count | 1 through 891; index less than count |
|
||||||
|
| 21 | 2 | payload_length | exact payload byte count, at most 1,177 |
|
||||||
|
|
||||||
|
Each QUIC datagram is at most 1,200 bytes. One complete unit is at most
|
||||||
|
1,048,576 encoded bytes and 891 fragments. A sender rejects a larger unit
|
||||||
|
before fragmentation.
|
||||||
|
|
||||||
|
A receiver retains at most four incomplete media units and only received
|
||||||
|
fragment bytes. Fragments for one unit must agree on channel, sequence,
|
||||||
|
timestamp, flags, and count. Exact duplicates are ignored; conflicting
|
||||||
|
duplicates reject that unit. Bounded reorder is accepted. An incomplete unit
|
||||||
|
expires after 250 milliseconds, and accepting a fifth incomplete unit evicts
|
||||||
|
the oldest. Reassembly checks the 1,048,576-byte ceiling before appending and
|
||||||
|
emits only after every fragment is present.
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# Gateway clipboard text v1
|
||||||
|
|
||||||
|
`clipboard.text.v1` is a reliable, authenticated gateway-only `ChannelFrame`
|
||||||
|
flow. Its UTF-8 JSON payload is a `GatewayClipboardText` object:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{"direction":"client_to_provider","text":"text","encoding":"utf-8","loop_token":"base64url-token"}
|
||||||
|
```
|
||||||
|
|
||||||
|
`direction` is exact: the client may send only `client_to_provider`, and the
|
||||||
|
gateway may send only `provider_to_client`. The text contains no file name,
|
||||||
|
URL, binary value, or client-folder field and is at most the Server-owned
|
||||||
|
`clipboard_policy.max_text_bytes` value. `loop_token` is a 16--128 character
|
||||||
|
canonical unpadded ASCII base64url token generated by the originating endpoint. An endpoint MUST retain
|
||||||
|
recent token/value pairs only for the bounded policy window and MUST suppress a
|
||||||
|
matching reflected value; a mismatched, malformed, expired, or replayed token
|
||||||
|
is rejected without clipboard mutation.
|
||||||
|
|
||||||
|
The gateway receives the policy only in authenticated session work. A disabled
|
||||||
|
direction, a rate above `max_updates_per_minute`, invalid UTF-8, an oversized
|
||||||
|
payload, or an unknown field fails closed. Clipboard bytes are never emitted to
|
||||||
|
provider-state, audit, telemetry, or error payloads.
|
||||||
|
|
||||||
|
For every successfully delivered, loop-suppressed, or policy/rate/provider/malformed
|
||||||
|
rejection, the gateway sends an mTLS control-plane `GatewayClipboardAudit` record. It contains
|
||||||
|
only the session identifier, direction, bounded text-byte count, outcome, and a
|
||||||
|
fixed reason code; it contains neither text nor loop token. The Server persists it
|
||||||
|
against the broker session using the authenticated gateway identity.
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
# Gateway input and feedback v1
|
||||||
|
|
||||||
|
This grammar is carried only in an authenticated Phase 3C gateway session. It
|
||||||
|
is deliberately provider-neutral: it never carries provider routes,
|
||||||
|
certificates, credentials, opaque provider packets, clipboard bytes, files, or
|
||||||
|
client-folder data. It does not change the v1 datagram header or any existing
|
||||||
|
kind encoding; the new kinds require explicit feature negotiation and a new
|
||||||
|
immutable Protocol release candidate.
|
||||||
|
|
||||||
|
## `input.sequenced.v1` payload (`VGI1`)
|
||||||
|
|
||||||
|
All multibyte fields are big-endian and unsigned unless a field is explicitly
|
||||||
|
marked signed. The payload has exactly six bytes of header followed by the
|
||||||
|
declared body:
|
||||||
|
|
||||||
|
| Offset | Size | Field | Rule |
|
||||||
|
|---:|---:|---|---|
|
||||||
|
| 0 | 4 | magic | ASCII `VGI1` |
|
||||||
|
| 4 | 1 | kind | one of the kinds below |
|
||||||
|
| 5 | 1 | payload length | exact body byte count |
|
||||||
|
| 6 | N | body | exact kind-specific body |
|
||||||
|
|
||||||
|
The decoder rejects an unknown kind, non-exact length, nonzero reserved byte,
|
||||||
|
unsupported controller index, malformed UTF-8, a non-scalar UTF-8 value, or a
|
||||||
|
payload larger than the channel limit before provider translation. A false
|
||||||
|
keyboard or mouse state and a zeroed controller state are explicit releases;
|
||||||
|
they are retained by the gateway and replayed as individual provider releases
|
||||||
|
during cleanup.
|
||||||
|
|
||||||
|
| Kind | Name | Exact body |
|
||||||
|
|---:|---|---|
|
||||||
|
| `0x01` | keyboard | `state` (`0` release, `1` press), `modifiers` (one byte), nonzero `scancode` (u16). |
|
||||||
|
| `0x02` | mouse button | `state` (`0` release, `1` press), `button` (`1` through `5`), reserved `0`. |
|
||||||
|
| `0x03` | relative mouse | `delta_x` (i16), `delta_y` (i16). |
|
||||||
|
| `0x04` | UTF-8 scalar | exactly one valid UTF-8 Unicode scalar, one through four bytes. |
|
||||||
|
| `0x05` | controller state | `controller` (0 through 15), `active_mask` (u16), `button_flags` (u16), `left_trigger` (u8), `right_trigger` (u8), `left_x` (i16), `left_y` (i16), `right_x` (i16), `right_y` (i16), `extra_button_flags` (u16). A zero `active_mask` and zero state is release. |
|
||||||
|
| `0x06` | absolute mouse | `x` (u16), `y` (u16), `viewport_width` (u16), `viewport_height` (u16). Viewport dimensions must be nonzero and each coordinate must be strictly smaller than its corresponding dimension. |
|
||||||
|
| `0x07` | high-resolution scroll | `vertical_delta` (i16), `horizontal_delta` (i16). Positive and negative values preserve the client scroll direction without provider-specific scaling. |
|
||||||
|
| `0x08` | controller arrival | `controller` (u8, 0 through 15), `active_mask` (u16), `family` (u8: `0` unknown, `1` xbox, `2` playstation, `3` nintendo), `supported_button_flags` (u32). It must precede controller state for that controller. |
|
||||||
|
|
||||||
|
Keyboard, mouse button, UTF-8, controller, absolute mouse, and scroll messages
|
||||||
|
are delivered over the gateway's reliable ordered input flow. Relative and
|
||||||
|
absolute mouse movement and scroll are state changes, not pressed-state
|
||||||
|
entries. Kinds `0x06` and `0x07` are accepted only when the session advertises
|
||||||
|
`input.absolute.v1` and `input.scroll.v1`, respectively. The gateway maps the
|
||||||
|
validated values to the provider's separate input messages; it does not forward
|
||||||
|
this envelope to the provider.
|
||||||
|
|
||||||
|
## Reliable control payload (`VGF1`)
|
||||||
|
|
||||||
|
`control.ack.v1` remains the existing authenticated bidirectional reliable
|
||||||
|
control flow. Within an active gateway session, its provider-feedback payload
|
||||||
|
is the following exact envelope:
|
||||||
|
|
||||||
|
| Offset | Size | Field | Rule |
|
||||||
|
|---:|---:|---|---|
|
||||||
|
| 0 | 4 | magic | ASCII `VGF1` |
|
||||||
|
| 4 | 1 | direction | `0` client-to-gateway; `1` gateway-to-client |
|
||||||
|
| 5 | 1 | type | valid only for the stated direction |
|
||||||
|
| 6 | 2 | payload length | exact payload byte count |
|
||||||
|
| 8 | N | payload | exact type-specific body |
|
||||||
|
|
||||||
|
The client-to-gateway types are `0x01` IDR request (empty), `0x02` FEC
|
||||||
|
status, `0x03` terminal receipt (empty), `0x04` quality-work prompt, and
|
||||||
|
`0x05` Stop-work prompt. The quality prompt is exactly `operation_id` (16
|
||||||
|
canonical UUID bytes) followed by `revision` (nonzero u64). The Stop prompt is
|
||||||
|
exactly `operation_id` (16 canonical UUID bytes). Prompts never authorize or
|
||||||
|
complete work; the gateway acquires the matching durable mTLS work item.
|
||||||
|
FEC status contains
|
||||||
|
`frame_index` (u32), `highest_received_sequence` (u16),
|
||||||
|
`next_contiguous_sequence` (u16), `missing_before_highest` (u16),
|
||||||
|
`total_data_packets` (u16), `total_parity_packets` (u16),
|
||||||
|
`received_data_packets` (u16), `received_parity_packets` (u16),
|
||||||
|
`fec_percentage` (u8), `multi_fec_block_index` (u8), and
|
||||||
|
`multi_fec_block_count` (u8). The gateway maps this fixed 21-byte structure to
|
||||||
|
the provider's unsequenced ENet FEC delivery; it does not put it on the reliable
|
||||||
|
provider input path.
|
||||||
|
|
||||||
|
The terminal receipt is valid only from client to gateway with an exact
|
||||||
|
zero-byte payload. Session-state authorization remains a gateway responsibility;
|
||||||
|
the Protocol grammar defines only its fixed wire shape.
|
||||||
|
|
||||||
|
The gateway-to-client types are `0x10` host termination (`exit_code` u32),
|
||||||
|
`0x11` rumble (`controller` u8, `low_frequency` u16,
|
||||||
|
`high_frequency` u16), and `0x12` HDR mode (`enabled` exactly `0` or `1`). The
|
||||||
|
gateway derives these from authenticated provider control messages, normalizes
|
||||||
|
their bounded fields, and rejects all unrecognized provider feedback. The HDR
|
||||||
|
envelope intentionally carries only the negotiated mode; provider-specific HDR
|
||||||
|
metadata remains behind the gateway boundary.
|
||||||
|
|
||||||
|
Apollo's pinned `src/stream.cpp` source defines separate termination, rumble,
|
||||||
|
and HDR control structures, while Moonlight common-C's `ControlStream.c` and
|
||||||
|
`InputStream.c` separate reliable input/control from UDP media. This Verse
|
||||||
|
grammar is a new normalized contract; it does not copy either implementation or
|
||||||
|
expose its wire format.
|
||||||
@@ -1,15 +1,16 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
"version": "1",
|
"version": "1",
|
||||||
|
"framing_profiles": ["datagram-v1", "datagram-v2"],
|
||||||
"header_bytes": 21,
|
"header_bytes": 21,
|
||||||
"maximum_frame_bytes": 65536,
|
"maximum_frame_bytes": 65536,
|
||||||
"channels": [
|
"channels": [
|
||||||
{"id": 1, "name": "control.ack.v1", "direction": "bidirectional", "max_payload_bytes": 1024},
|
{"id": 1, "name": "control.ack.v1", "direction": "bidirectional", "max_payload_bytes": 1024, "payload_profile": "gateway-feedback-v1"},
|
||||||
{"id": 2, "name": "control.cancel.v1", "direction": "client-to-server", "max_payload_bytes": 2048},
|
{"id": 2, "name": "control.cancel.v1", "direction": "client-to-server", "max_payload_bytes": 2048},
|
||||||
{"id": 3, "name": "clipboard.text.v1", "direction": "bidirectional", "max_payload_bytes": 65515},
|
{"id": 3, "name": "clipboard.text.v1", "direction": "bidirectional", "max_payload_bytes": 65515},
|
||||||
{"id": 10, "name": "media.video.v1", "direction": "server-to-client", "max_payload_bytes": 1179},
|
{"id": 10, "name": "media.video.v1", "direction": "server-to-client", "max_payload_bytes": 1179},
|
||||||
{"id": 11, "name": "media.audio.v1", "direction": "server-to-client", "max_payload_bytes": 1179},
|
{"id": 11, "name": "media.audio.v1", "direction": "server-to-client", "max_payload_bytes": 1179},
|
||||||
{"id": 12, "name": "input.sequenced.v1", "direction": "client-to-server", "max_payload_bytes": 1179}
|
{"id": 12, "name": "input.sequenced.v1", "direction": "client-to-server", "max_payload_bytes": 1179, "payload_profile": "gateway-input-v1"}
|
||||||
],
|
],
|
||||||
"reserved_rejected": ["provider", "vm", "file-transfer", "clipboard.binary"]
|
"reserved_rejected": ["provider", "vm", "file-transfer", "clipboard.binary"]
|
||||||
}
|
}
|
||||||
|
|||||||
+3729
-44
File diff suppressed because it is too large
Load Diff
+7
-7
@@ -1,18 +1,18 @@
|
|||||||
{
|
{
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
"current": "1",
|
"current": "2",
|
||||||
"datagram_registry": "registries/datagrams.json",
|
"datagram_registry": "registries/datagrams.json",
|
||||||
"feature_registry": "registries/features.json",
|
"feature_registry": "registries/features.json",
|
||||||
"n_minus_1": "0",
|
"n_minus_1": "1",
|
||||||
"n_minus_2": "-1",
|
"n_minus_2": "0",
|
||||||
"protocol": "versevdi-control",
|
"protocol": "versevdi-control",
|
||||||
"unsupported": [
|
"unsupported": [
|
||||||
"-2",
|
"-1",
|
||||||
"2"
|
"3"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"generator_sha256": "e9c6ee1541585fcb00dcc5e94a5a6d93dbe3a719a5c545f31e5eda268f2638ab",
|
"generator_sha256": "c5756780f59a82d8f56762e52f58e22a4d6aca6648157f45e5bad6559b9deeec",
|
||||||
"protocol_version": "1.0.0",
|
"protocol_version": "1.0.0",
|
||||||
"schema_sha256": "c075c6fc472ce858337c3ad6c4b2f4dcfa88446d5471afb46c2f6931cbcf1b1d"
|
"schema_sha256": "b9e72838b2ae02b3a47e7e2dfa03620b8580f2c98668e6eaf551ea8fb642d297"
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
+1277
-45
File diff suppressed because it is too large
Load Diff
+1768
-124
File diff suppressed because it is too large
Load Diff
+224
-19
@@ -2,7 +2,7 @@ openapi: 3.1.0
|
|||||||
info:
|
info:
|
||||||
title: VerseVDI control contract
|
title: VerseVDI control contract
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
description: Bounded Phase 3A control-plane wire contract; no provider or media endpoints.
|
description: Bounded control-plane wire contract. The current SessionRequest shape is control wire version 2; no provider or media endpoints.
|
||||||
servers:
|
servers:
|
||||||
- url: /
|
- url: /
|
||||||
tags:
|
tags:
|
||||||
@@ -10,6 +10,8 @@ tags:
|
|||||||
- name: resources
|
- name: resources
|
||||||
- name: broker
|
- name: broker
|
||||||
- name: events
|
- name: events
|
||||||
|
- name: session-quality
|
||||||
|
- name: gateway
|
||||||
paths:
|
paths:
|
||||||
/api/v1/auth/login:
|
/api/v1/auth/login:
|
||||||
post:
|
post:
|
||||||
@@ -23,18 +25,11 @@ paths:
|
|||||||
$ref: ../schemas/control-v1.schema.json#/$defs/LoginRequest
|
$ref: ../schemas/control-v1.schema.json#/$defs/LoginRequest
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Browser session established through secure cookies.
|
description: Browser session established through secure cookies; native identity is structurally forbidden.
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: ../schemas/control-v1.schema.json#/$defs/BrowserAuthenticatedSession
|
||||||
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, maxLength: 64}}
|
|
||||||
role: {type: string, enum: [user, admin]}
|
|
||||||
'400': {$ref: '#/components/responses/InvalidRequest'}
|
'400': {$ref: '#/components/responses/InvalidRequest'}
|
||||||
'401': {$ref: '#/components/responses/Unauthorized'}
|
'401': {$ref: '#/components/responses/Unauthorized'}
|
||||||
'503': {$ref: '#/components/responses/Unavailable'}
|
'503': {$ref: '#/components/responses/Unavailable'}
|
||||||
@@ -66,18 +61,32 @@ paths:
|
|||||||
- nativeBearer: []
|
- nativeBearer: []
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Authenticated subject summary.
|
description: Route-context-specific authenticated subject summary. Browser responses forbid native identity; native bearer responses require it.
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
oneOf:
|
||||||
additionalProperties: false
|
- $ref: ../schemas/control-v1.schema.json#/$defs/BrowserAuthenticatedSession
|
||||||
required: [username, provider, roles, role]
|
- $ref: ../schemas/control-v1.schema.json#/$defs/NativeAuthenticatedSession
|
||||||
properties:
|
'401': {$ref: '#/components/responses/Unauthorized'}
|
||||||
username: {type: string, minLength: 1, maxLength: 256}
|
/api/v1/auth/tunnel-credentials:
|
||||||
provider: {type: string, minLength: 1, maxLength: 64}
|
post:
|
||||||
roles: {type: array, maxItems: 16, items: {type: string, maxLength: 64}}
|
tags: [authentication]
|
||||||
role: {type: string, enum: [user, admin]}
|
operationId: issueNativeTunnelCredential
|
||||||
|
security:
|
||||||
|
- nativeBearer: []
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Short-lived native tunnel credential. The response must not be stored.
|
||||||
|
headers:
|
||||||
|
Cache-Control:
|
||||||
|
description: Prevent storage of the credential response.
|
||||||
|
required: true
|
||||||
|
schema: {type: string, const: no-store}
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: ../schemas/control-v1.schema.json#/$defs/NativeTunnelCredential
|
||||||
'401': {$ref: '#/components/responses/Unauthorized'}
|
'401': {$ref: '#/components/responses/Unauthorized'}
|
||||||
/api/v1/auth/reauth:
|
/api/v1/auth/reauth:
|
||||||
post:
|
post:
|
||||||
@@ -85,6 +94,8 @@ paths:
|
|||||||
operationId: issueReauthenticationGrant
|
operationId: issueReauthenticationGrant
|
||||||
security:
|
security:
|
||||||
- browserSession: []
|
- browserSession: []
|
||||||
|
browserCsrfCookie: []
|
||||||
|
browserCsrfHeader: []
|
||||||
requestBody:
|
requestBody:
|
||||||
required: true
|
required: true
|
||||||
content:
|
content:
|
||||||
@@ -106,6 +117,8 @@ paths:
|
|||||||
operationId: logoutSession
|
operationId: logoutSession
|
||||||
security:
|
security:
|
||||||
- browserSession: []
|
- browserSession: []
|
||||||
|
browserCsrfCookie: []
|
||||||
|
browserCsrfHeader: []
|
||||||
- nativeBearer: []
|
- nativeBearer: []
|
||||||
responses:
|
responses:
|
||||||
'204': {description: Session revoked and browser cookies cleared.}
|
'204': {description: Session revoked and browser cookies cleared.}
|
||||||
@@ -116,6 +129,8 @@ paths:
|
|||||||
operationId: registerDevice
|
operationId: registerDevice
|
||||||
security:
|
security:
|
||||||
- browserSession: []
|
- browserSession: []
|
||||||
|
browserCsrfCookie: []
|
||||||
|
browserCsrfHeader: []
|
||||||
requestBody:
|
requestBody:
|
||||||
required: true
|
required: true
|
||||||
content:
|
content:
|
||||||
@@ -137,6 +152,8 @@ paths:
|
|||||||
operationId: proveDevice
|
operationId: proveDevice
|
||||||
security:
|
security:
|
||||||
- browserSession: []
|
- browserSession: []
|
||||||
|
browserCsrfCookie: []
|
||||||
|
browserCsrfHeader: []
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/DeviceID'
|
- $ref: '#/components/parameters/DeviceID'
|
||||||
requestBody:
|
requestBody:
|
||||||
@@ -160,6 +177,8 @@ paths:
|
|||||||
operationId: revokeDevice
|
operationId: revokeDevice
|
||||||
security:
|
security:
|
||||||
- browserSession: []
|
- browserSession: []
|
||||||
|
browserCsrfCookie: []
|
||||||
|
browserCsrfHeader: []
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/DeviceID'
|
- $ref: '#/components/parameters/DeviceID'
|
||||||
responses:
|
responses:
|
||||||
@@ -189,8 +208,11 @@ paths:
|
|||||||
post:
|
post:
|
||||||
tags: [broker]
|
tags: [broker]
|
||||||
operationId: requestBrokerSession
|
operationId: requestBrokerSession
|
||||||
|
description: Control wire version 2 endpoint. Legacy version-1 SessionRequest payloads containing client-supplied policy_snapshot are rejected.
|
||||||
security:
|
security:
|
||||||
- browserSession: []
|
- browserSession: []
|
||||||
|
browserCsrfCookie: []
|
||||||
|
browserCsrfHeader: []
|
||||||
- nativeBearer: []
|
- nativeBearer: []
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/IdempotencyKey'
|
- $ref: '#/components/parameters/IdempotencyKey'
|
||||||
@@ -241,6 +263,8 @@ paths:
|
|||||||
operationId: allocateBrokerSession
|
operationId: allocateBrokerSession
|
||||||
security:
|
security:
|
||||||
- browserSession: []
|
- browserSession: []
|
||||||
|
browserCsrfCookie: []
|
||||||
|
browserCsrfHeader: []
|
||||||
- nativeBearer: []
|
- nativeBearer: []
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/SessionID'
|
- $ref: '#/components/parameters/SessionID'
|
||||||
@@ -266,6 +290,8 @@ paths:
|
|||||||
operationId: reconnectBrokerSession
|
operationId: reconnectBrokerSession
|
||||||
security:
|
security:
|
||||||
- browserSession: []
|
- browserSession: []
|
||||||
|
browserCsrfCookie: []
|
||||||
|
browserCsrfHeader: []
|
||||||
- nativeBearer: []
|
- nativeBearer: []
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/SessionID'
|
- $ref: '#/components/parameters/SessionID'
|
||||||
@@ -292,6 +318,8 @@ paths:
|
|||||||
operationId: cancelBrokerSession
|
operationId: cancelBrokerSession
|
||||||
security:
|
security:
|
||||||
- browserSession: []
|
- browserSession: []
|
||||||
|
browserCsrfCookie: []
|
||||||
|
browserCsrfHeader: []
|
||||||
- nativeBearer: []
|
- nativeBearer: []
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/SessionID'
|
- $ref: '#/components/parameters/SessionID'
|
||||||
@@ -300,6 +328,151 @@ paths:
|
|||||||
'401': {$ref: '#/components/responses/Unauthorized'}
|
'401': {$ref: '#/components/responses/Unauthorized'}
|
||||||
'404': {$ref: '#/components/responses/NotFound'}
|
'404': {$ref: '#/components/responses/NotFound'}
|
||||||
'409': {$ref: '#/components/responses/Conflict'}
|
'409': {$ref: '#/components/responses/Conflict'}
|
||||||
|
/api/v1/session-quality-limits:
|
||||||
|
get:
|
||||||
|
tags: [session-quality]
|
||||||
|
operationId: getSessionQualityLimits
|
||||||
|
security: [{nativeBearer: []}]
|
||||||
|
responses:
|
||||||
|
'200': {description: 'Current global native session quality limits. Maximum JSON body: 16384 bytes.', content: {application/json: {schema: {$ref: ../schemas/control-v1.schema.json#/$defs/SessionQualityLimits}}}}
|
||||||
|
'401': {$ref: '#/components/responses/Unauthorized'}
|
||||||
|
/api/v1/session-quality-limits/assignments/{assignment_id}:
|
||||||
|
get:
|
||||||
|
tags: [session-quality]
|
||||||
|
operationId: getAssignmentSessionQualityLimits
|
||||||
|
security: [{nativeBearer: []}]
|
||||||
|
parameters: [{$ref: '#/components/parameters/AssignmentID'}]
|
||||||
|
responses:
|
||||||
|
'200': {description: 'Current assignment-specific native session quality limits. Maximum JSON body: 16384 bytes.', content: {application/json: {schema: {$ref: ../schemas/control-v1.schema.json#/$defs/SessionQualityLimits}}}}
|
||||||
|
'401': {$ref: '#/components/responses/Unauthorized'}
|
||||||
|
'404': {$ref: '#/components/responses/NotFound'}
|
||||||
|
/api/v1/session-quality-limits/pools/{pool_id}:
|
||||||
|
get:
|
||||||
|
tags: [session-quality]
|
||||||
|
operationId: getPoolSessionQualityLimits
|
||||||
|
security: [{nativeBearer: []}]
|
||||||
|
parameters: [{$ref: '#/components/parameters/PoolID'}]
|
||||||
|
responses:
|
||||||
|
'200': {description: 'Current pool-specific native session quality limits. Maximum JSON body: 16384 bytes.', content: {application/json: {schema: {$ref: ../schemas/control-v1.schema.json#/$defs/SessionQualityLimits}}}}
|
||||||
|
'401': {$ref: '#/components/responses/Unauthorized'}
|
||||||
|
'404': {$ref: '#/components/responses/NotFound'}
|
||||||
|
/api/v1/admin/entitlements/{entitlement_id}/display-limit-override:
|
||||||
|
patch:
|
||||||
|
tags: [session-quality]
|
||||||
|
operationId: updateEntitlementDisplayLimitOverride
|
||||||
|
security:
|
||||||
|
- browserSession: []
|
||||||
|
browserCsrfCookie: []
|
||||||
|
browserCsrfHeader: []
|
||||||
|
parameters: [{$ref: '#/components/parameters/EntitlementID'}]
|
||||||
|
requestBody: {required: true, description: 'Maximum JSON body: 16384 bytes.', content: {application/json: {schema: {$ref: ../schemas/control-v1.schema.json#/$defs/DisplayLimitOverrideRequest}}}}
|
||||||
|
responses:
|
||||||
|
'204': {description: Direct entitlement display override updated.}
|
||||||
|
'400': {$ref: '#/components/responses/InvalidRequest'}
|
||||||
|
'401': {$ref: '#/components/responses/Unauthorized'}
|
||||||
|
'403': {$ref: '#/components/responses/Forbidden'}
|
||||||
|
'404': {$ref: '#/components/responses/NotFound'}
|
||||||
|
'409': {$ref: '#/components/responses/Conflict'}
|
||||||
|
/api/v1/broker/sessions/{session_id}/quality-changes:
|
||||||
|
post:
|
||||||
|
tags: [session-quality]
|
||||||
|
operationId: createSessionQualityChange
|
||||||
|
description: The owning principal and active device/key MUST match the subject-scoped broker session. Maximum JSON body: 16384 bytes.
|
||||||
|
security: [{nativeBearer: []}]
|
||||||
|
parameters: [{$ref: '#/components/parameters/SessionID'}, {$ref: '#/components/parameters/IdempotencyKey'}]
|
||||||
|
requestBody: {required: true, description: 'Maximum JSON body: 16384 bytes.', content: {application/json: {schema: {$ref: ../schemas/control-v1.schema.json#/$defs/QualityChangeRequest}}}}
|
||||||
|
responses:
|
||||||
|
'201': {description: 'Durable quality change created. Maximum JSON body: 16384 bytes.', content: {application/json: {schema: {$ref: ../schemas/control-v1.schema.json#/$defs/QualityChangeOperation}}}}
|
||||||
|
'200': {description: 'Existing idempotent quality change returned. Maximum JSON body: 16384 bytes.', content: {application/json: {schema: {$ref: ../schemas/control-v1.schema.json#/$defs/QualityChangeOperation}}}}
|
||||||
|
'400': {$ref: '#/components/responses/InvalidRequest'}
|
||||||
|
'401': {$ref: '#/components/responses/Unauthorized'}
|
||||||
|
'404': {$ref: '#/components/responses/NotFound'}
|
||||||
|
'409': {$ref: '#/components/responses/Conflict'}
|
||||||
|
/api/v1/broker/sessions/{session_id}/quality-changes/{operation_id}:
|
||||||
|
get:
|
||||||
|
tags: [session-quality]
|
||||||
|
operationId: getSessionQualityChange
|
||||||
|
description: The owning principal and active device/key MUST match the subject-scoped broker session and operation. Maximum JSON body: 16384 bytes.
|
||||||
|
security: [{nativeBearer: []}]
|
||||||
|
parameters: [{$ref: '#/components/parameters/SessionID'}, {$ref: '#/components/parameters/OperationID'}]
|
||||||
|
responses:
|
||||||
|
'200': {description: 'Durable quality change state. Maximum JSON body: 16384 bytes.', content: {application/json: {schema: {$ref: ../schemas/control-v1.schema.json#/$defs/QualityChangeOperation}}}}
|
||||||
|
'401': {$ref: '#/components/responses/Unauthorized'}
|
||||||
|
'404': {$ref: '#/components/responses/NotFound'}
|
||||||
|
/api/v1/broker/sessions/{session_id}/stop-operations:
|
||||||
|
post:
|
||||||
|
tags: [session-quality]
|
||||||
|
operationId: createSessionStopOperation
|
||||||
|
description: The owning principal and active device/key MUST match the subject-scoped broker session. Maximum JSON body: 16384 bytes.
|
||||||
|
security: [{nativeBearer: []}]
|
||||||
|
parameters: [{$ref: '#/components/parameters/SessionID'}, {$ref: '#/components/parameters/IdempotencyKey'}]
|
||||||
|
responses:
|
||||||
|
'201': {description: 'Durable Stop operation created. Maximum JSON body: 16384 bytes.', content: {application/json: {schema: {$ref: ../schemas/control-v1.schema.json#/$defs/StopOperation}}}}
|
||||||
|
'200': {description: 'Existing idempotent Stop operation returned. Maximum JSON body: 16384 bytes.', content: {application/json: {schema: {$ref: ../schemas/control-v1.schema.json#/$defs/StopOperation}}}}
|
||||||
|
'401': {$ref: '#/components/responses/Unauthorized'}
|
||||||
|
'404': {$ref: '#/components/responses/NotFound'}
|
||||||
|
'409': {$ref: '#/components/responses/Conflict'}
|
||||||
|
/api/v1/broker/sessions/{session_id}/stop-operations/{operation_id}:
|
||||||
|
get:
|
||||||
|
tags: [session-quality]
|
||||||
|
operationId: getSessionStopOperation
|
||||||
|
description: The owning principal and active device/key MUST match the subject-scoped broker session and operation. Maximum JSON body: 16384 bytes.
|
||||||
|
security: [{nativeBearer: []}]
|
||||||
|
parameters: [{$ref: '#/components/parameters/SessionID'}, {$ref: '#/components/parameters/OperationID'}]
|
||||||
|
responses:
|
||||||
|
'200': {description: 'Durable Stop operation state. Maximum JSON body: 16384 bytes.', content: {application/json: {schema: {$ref: ../schemas/control-v1.schema.json#/$defs/StopOperation}}}}
|
||||||
|
'401': {$ref: '#/components/responses/Unauthorized'}
|
||||||
|
'404': {$ref: '#/components/responses/NotFound'}
|
||||||
|
/api/v1/gateway/quality-work:
|
||||||
|
post:
|
||||||
|
tags: [gateway]
|
||||||
|
operationId: acquireGatewayQualityWork
|
||||||
|
description: The authenticated gateway mTLS certificate identity MUST match `gateway_id`; Server authority MUST match the session, gateway, reconnect sequence, and supplied operation/revision/lease generation coordinates. A `poll` acquisition omits unknown operation coordinates and discovers pending session work after a lost prompt; `prompt` and `observation` coordinates MUST match exactly. Maximum JSON body: 16384 bytes.
|
||||||
|
security: [{gatewayMutualTLS: []}]
|
||||||
|
requestBody: {required: true, description: 'Maximum JSON body: 16384 bytes.', content: {application/json: {schema: {$ref: ../schemas/control-v1.schema.json#/$defs/GatewayQualityWorkRequest}}}}
|
||||||
|
responses:
|
||||||
|
'200': {description: 'Leased quality work or reconciliation observation. Maximum JSON body: 16384 bytes.', content: {application/json: {schema: {$ref: ../schemas/control-v1.schema.json#/$defs/GatewayQualityWork}}}}
|
||||||
|
'204': {description: No matching work is available.}
|
||||||
|
'400': {$ref: '#/components/responses/InvalidRequest'}
|
||||||
|
'401': {$ref: '#/components/responses/Unauthorized'}
|
||||||
|
'409': {$ref: '#/components/responses/Conflict'}
|
||||||
|
/api/v1/gateway/quality-ack:
|
||||||
|
post:
|
||||||
|
tags: [gateway]
|
||||||
|
operationId: acknowledgeGatewayQualityWork
|
||||||
|
description: The authenticated gateway mTLS certificate identity MUST match `gateway_id`; Server authority MUST exactly match the session, gateway, reconnect sequence, operation, revision, and monotonic lease generation tuple. Stale lease generations MUST be rejected. `applied` requires `current_applied_revision == revision`; `proven_prior` requires `current_applied_revision < revision`; `unknown` forbids `current_applied_revision` and makes no applied-revision assertion. Maximum JSON body: 16384 bytes.
|
||||||
|
security: [{gatewayMutualTLS: []}]
|
||||||
|
requestBody: {required: true, description: 'Maximum JSON body: 16384 bytes.', content: {application/json: {schema: {$ref: ../schemas/control-v1.schema.json#/$defs/GatewayQualityAck}}}}
|
||||||
|
responses:
|
||||||
|
'204': {description: Quality acknowledgement committed idempotently.}
|
||||||
|
'400': {$ref: '#/components/responses/InvalidRequest'}
|
||||||
|
'401': {$ref: '#/components/responses/Unauthorized'}
|
||||||
|
'409': {$ref: '#/components/responses/Conflict'}
|
||||||
|
/api/v1/gateway/stop-work:
|
||||||
|
post:
|
||||||
|
tags: [gateway]
|
||||||
|
operationId: acquireGatewayStopWork
|
||||||
|
description: The authenticated gateway mTLS certificate identity MUST match `gateway_id`; Server authority MUST match the session, gateway, reconnect sequence, and any supplied operation coordinate. A `poll` acquisition omits the unknown operation ID and discovers pending session work after a lost prompt; a `prompt` coordinate MUST match exactly. Maximum JSON body: 16384 bytes.
|
||||||
|
security: [{gatewayMutualTLS: []}]
|
||||||
|
requestBody: {required: true, description: 'Maximum JSON body: 16384 bytes.', content: {application/json: {schema: {$ref: ../schemas/control-v1.schema.json#/$defs/GatewayStopWorkRequest}}}}
|
||||||
|
responses:
|
||||||
|
'200': {description: 'One-way non-reissued Stop work claim. Maximum JSON body: 16384 bytes.', content: {application/json: {schema: {$ref: ../schemas/control-v1.schema.json#/$defs/GatewayStopWork}}}}
|
||||||
|
'204': {description: No matching Stop work is available.}
|
||||||
|
'400': {$ref: '#/components/responses/InvalidRequest'}
|
||||||
|
'401': {$ref: '#/components/responses/Unauthorized'}
|
||||||
|
'409': {$ref: '#/components/responses/Conflict'}
|
||||||
|
/api/v1/gateway/stop-ack:
|
||||||
|
post:
|
||||||
|
tags: [gateway]
|
||||||
|
operationId: acknowledgeGatewayStopWork
|
||||||
|
description: The authenticated gateway mTLS certificate identity MUST match `gateway_id`; Server authority MUST exactly match the session, gateway, reconnect sequence, and operation tuple. Maximum JSON body: 16384 bytes.
|
||||||
|
security: [{gatewayMutualTLS: []}]
|
||||||
|
requestBody: {required: true, description: 'Maximum JSON body: 16384 bytes.', content: {application/json: {schema: {$ref: ../schemas/control-v1.schema.json#/$defs/GatewayStopAck}}}}
|
||||||
|
responses:
|
||||||
|
'204': {description: Stop acknowledgement committed idempotently.}
|
||||||
|
'400': {$ref: '#/components/responses/InvalidRequest'}
|
||||||
|
'401': {$ref: '#/components/responses/Unauthorized'}
|
||||||
|
'409': {$ref: '#/components/responses/Conflict'}
|
||||||
/api/v1/events:
|
/api/v1/events:
|
||||||
get:
|
get:
|
||||||
tags: [events]
|
tags: [events]
|
||||||
@@ -345,10 +518,22 @@ components:
|
|||||||
type: apiKey
|
type: apiKey
|
||||||
in: cookie
|
in: cookie
|
||||||
name: versevdi_session
|
name: versevdi_session
|
||||||
|
browserCsrfCookie:
|
||||||
|
type: apiKey
|
||||||
|
in: cookie
|
||||||
|
name: versevdi_csrf
|
||||||
|
description: Must be identical to X-CSRF-Token and is checked against Server session state.
|
||||||
|
browserCsrfHeader:
|
||||||
|
type: apiKey
|
||||||
|
in: header
|
||||||
|
name: X-CSRF-Token
|
||||||
|
description: Must be identical to the versevdi_csrf cookie and is checked against Server session state.
|
||||||
nativeBearer:
|
nativeBearer:
|
||||||
type: http
|
type: http
|
||||||
scheme: bearer
|
scheme: bearer
|
||||||
bearerFormat: opaque
|
bearerFormat: opaque
|
||||||
|
gatewayMutualTLS:
|
||||||
|
type: mutualTLS
|
||||||
parameters:
|
parameters:
|
||||||
DeviceID:
|
DeviceID:
|
||||||
name: device_id
|
name: device_id
|
||||||
@@ -360,6 +545,26 @@ components:
|
|||||||
in: path
|
in: path
|
||||||
required: true
|
required: true
|
||||||
schema: {type: string, minLength: 1, maxLength: 128}
|
schema: {type: string, minLength: 1, maxLength: 128}
|
||||||
|
AssignmentID:
|
||||||
|
name: assignment_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema: {type: string, minLength: 1, maxLength: 128}
|
||||||
|
PoolID:
|
||||||
|
name: pool_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema: {type: string, minLength: 1, maxLength: 128}
|
||||||
|
EntitlementID:
|
||||||
|
name: entitlement_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema: {type: string, minLength: 1, maxLength: 128}
|
||||||
|
OperationID:
|
||||||
|
name: operation_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema: {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}$'}
|
||||||
Limit:
|
Limit:
|
||||||
name: limit
|
name: limit
|
||||||
in: query
|
in: query
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
schema: spec-driven
|
||||||
|
created: 2026-07-29
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
## Context
|
||||||
|
|
||||||
|
The registered `input.sequenced.v1` flow has a payload bound but no typed
|
||||||
|
payload grammar. RC5 also has no provider-to-client envelope for host
|
||||||
|
termination, rumble, or HDR feedback. The Data Plane must translate these
|
||||||
|
states to the provider without exposing Apollo packet formats or credentials.
|
||||||
|
|
||||||
|
## Goals / Non-Goals
|
||||||
|
|
||||||
|
**Goals:**
|
||||||
|
|
||||||
|
- Define fixed, bounded, endian-explicit gateway payloads for keyboard, mouse,
|
||||||
|
UTF-8 text, and controller state.
|
||||||
|
- Define a reliable control envelope for provider feedback and termination.
|
||||||
|
- Define an explicit release operation for every pressed key/button/controller.
|
||||||
|
- Keep provider packet encodings and endpoint details internal to the Data Plane.
|
||||||
|
|
||||||
|
**Non-Goals:**
|
||||||
|
|
||||||
|
- Touch, pen, motion, file transfer, binary clipboard, or provider-specific
|
||||||
|
packets.
|
||||||
|
- Changing RC5, moving an existing tag, or making the Connection Server parse
|
||||||
|
streaming input.
|
||||||
|
|
||||||
|
## Decisions
|
||||||
|
|
||||||
|
- Define a new binary payload grammar beneath the existing registered flows.
|
||||||
|
This avoids changing the authenticated tunnel header while removing the
|
||||||
|
untyped `device`/opaque-payload ambiguity. JSON was rejected because input is
|
||||||
|
latency-sensitive and fixed binary bounds are simpler to validate before
|
||||||
|
allocation.
|
||||||
|
- Input events use explicit event kinds and fixed payload lengths except UTF-8
|
||||||
|
text, which is limited to one valid Unicode scalar value. This permits exact
|
||||||
|
provider translation and deterministic cleanup.
|
||||||
|
- Provider feedback and termination use the existing bidirectional reliable
|
||||||
|
control channel with a distinct magic, direction, type, and length. A new
|
||||||
|
channel was rejected because the existing channel is already authenticated,
|
||||||
|
reliable, and versioned.
|
||||||
|
- Protocol contents and fixtures are finalized before a new immutable release
|
||||||
|
candidate is created. RC5 remains an unchanged dependency for current
|
||||||
|
consumers until they explicitly adopt the new revision.
|
||||||
|
|
||||||
|
## Risks / Trade-offs
|
||||||
|
|
||||||
|
- [New client adoption is required] -> retain RC5 unchanged and publish an
|
||||||
|
explicit capability/version mismatch before any provider allocation.
|
||||||
|
- [Provider feedback can be high rate] -> allow only termination, rumble, and
|
||||||
|
HDR payload types with fixed maximum sizes; other types reject.
|
||||||
|
- [Pressed-state loss during disconnect] -> gateway records accepted presses
|
||||||
|
and emits typed releases during cleanup before provider disconnect.
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
## Why
|
||||||
|
|
||||||
|
The RC5 tunnel register identifies a bounded sequenced-input flow but does not
|
||||||
|
define typed input state or provider-to-client feedback. The native Apollo
|
||||||
|
adapter cannot safely translate keyboard, mouse, UTF-8, controller, termination,
|
||||||
|
rumble, or HDR state from an untyped payload.
|
||||||
|
|
||||||
|
## What Changes
|
||||||
|
|
||||||
|
- Define a typed, versioned gateway input envelope for keyboard, mouse, UTF-8,
|
||||||
|
and controller state.
|
||||||
|
- Define bounded provider-feedback and provider-termination envelopes on the
|
||||||
|
existing reliable control direction.
|
||||||
|
- Define a separate typed clipboard envelope and Server-owned per-session
|
||||||
|
direction, size, and rate policy so the gateway can prevent reflected loops
|
||||||
|
without exposing provider management material.
|
||||||
|
- Define release semantics so gateway cleanup can emit real provider key/button
|
||||||
|
releases without a synthetic provider command.
|
||||||
|
- Preserve RC5 unchanged; this change requires a new immutable Protocol version
|
||||||
|
after its fixtures and consumers are final.
|
||||||
|
|
||||||
|
## Capabilities
|
||||||
|
|
||||||
|
### New Capabilities
|
||||||
|
|
||||||
|
- `gateway-input-feedback`: Typed Phase 3C gateway input, provider feedback,
|
||||||
|
termination, and release envelopes.
|
||||||
|
|
||||||
|
### Modified Capabilities
|
||||||
|
|
||||||
|
- None.
|
||||||
|
|
||||||
|
## Impact
|
||||||
|
|
||||||
|
- Protocol control and datagram registries, schemas, fixtures, and generated
|
||||||
|
Go/Rust/Swift bindings.
|
||||||
|
- Data Plane gateway input/clipboard translation and host-feedback forwarding.
|
||||||
|
- Connection Server mints only immutable clipboard policy in authenticated
|
||||||
|
provider work; it neither receives clipboard bytes nor inspects provider
|
||||||
|
packet payloads.
|
||||||
+79
@@ -0,0 +1,79 @@
|
|||||||
|
## ADDED Requirements
|
||||||
|
|
||||||
|
### Requirement: Typed sequenced input envelope
|
||||||
|
The `input.sequenced.v1` payload SHALL begin with ASCII `VGI1`, a one-byte
|
||||||
|
event kind, and one-byte payload length. It SHALL contain exactly one bounded
|
||||||
|
keyboard, mouse-button, relative-mouse, UTF-8 scalar, or controller-state
|
||||||
|
event. False keyboard/mouse state and zeroed controller state are explicit
|
||||||
|
releases. Multibyte integer fields SHALL be big-endian. Unknown kinds,
|
||||||
|
length mismatches, malformed UTF-8, unsupported controller indices, and
|
||||||
|
reserved fields SHALL be rejected before provider translation.
|
||||||
|
|
||||||
|
#### Scenario: Keyboard state change
|
||||||
|
- **WHEN** a client sends a valid keyboard press or release envelope
|
||||||
|
- **THEN** the gateway forwards the corresponding typed provider input on its
|
||||||
|
reliable keyboard channel and records the pressed state for cleanup.
|
||||||
|
|
||||||
|
#### Scenario: Invalid input envelope
|
||||||
|
- **WHEN** a client sends an envelope with an unknown event kind, invalid
|
||||||
|
length, malformed UTF-8 scalar, or nonzero reserved field
|
||||||
|
- **THEN** the gateway rejects it without sending provider input or changing
|
||||||
|
pressed state.
|
||||||
|
|
||||||
|
### Requirement: Explicit input release
|
||||||
|
The typed input envelope SHALL represent release of each keyboard key,
|
||||||
|
mouse button, and controller state. Gateway cleanup SHALL send a typed release
|
||||||
|
for every accepted pressed state before provider disconnect; it SHALL NOT use
|
||||||
|
an implementation-specific release-all provider command.
|
||||||
|
|
||||||
|
#### Scenario: Tunnel cleanup with pressed input
|
||||||
|
- **WHEN** a tunnel closes after accepted pressed keyboard, mouse, or
|
||||||
|
controller input
|
||||||
|
- **THEN** the gateway emits the corresponding individual provider release
|
||||||
|
packets reliably before starting provider disconnect.
|
||||||
|
|
||||||
|
### Requirement: Bounded provider feedback control envelope
|
||||||
|
The registered bidirectional reliable `control.ack.v1` flow SHALL define an ASCII `VGF1` envelope
|
||||||
|
with a direction byte, type byte, big-endian payload length, and exact payload
|
||||||
|
bytes. Only host termination, rumble, and HDR feedback SHALL be valid from the
|
||||||
|
gateway to the client; only IDR and FEC/loss feedback SHALL be valid from the
|
||||||
|
client to the gateway. The envelope SHALL contain no provider address,
|
||||||
|
certificate, credential, or opaque provider packet.
|
||||||
|
|
||||||
|
#### Scenario: Host termination forwarding
|
||||||
|
- **WHEN** the Apollo adapter receives an authenticated host termination
|
||||||
|
packet
|
||||||
|
- **THEN** the gateway forwards a bounded `VGF1` termination envelope over
|
||||||
|
reliable Verse control and reports the provider state separately.
|
||||||
|
|
||||||
|
#### Scenario: Unauthorized or malformed feedback
|
||||||
|
- **WHEN** feedback is disabled by policy, has an invalid direction/type/length,
|
||||||
|
or contains a forbidden provider field
|
||||||
|
- **THEN** the gateway rejects it without forwarding or provider mutation.
|
||||||
|
|
||||||
|
### Requirement: Policy-bound text clipboard envelope
|
||||||
|
The reliable `clipboard.text.v1` flow SHALL carry only a typed UTF-8 text
|
||||||
|
envelope with exact direction and a 16--128 character canonical unpadded ASCII
|
||||||
|
base64url loop token. The Server SHALL mint
|
||||||
|
the enabled directions, maximum text bytes, and maximum updates per minute in
|
||||||
|
authenticated provider work. The gateway SHALL reject disabled direction,
|
||||||
|
unknown fields, files, file URLs, client folders, binary data, malformed UTF-8,
|
||||||
|
oversized values, rates above policy, and reflected/replayed loop tokens. It
|
||||||
|
SHALL not put clipboard content, provider routes, or credentials in telemetry,
|
||||||
|
audit, state, or errors.
|
||||||
|
|
||||||
|
#### Scenario: Clipboard audit metadata
|
||||||
|
- **WHEN** the gateway successfully delivers, suppresses, or rejects a clipboard update
|
||||||
|
- **THEN** it sends an authenticated Server audit record with only direction,
|
||||||
|
bounded byte count, outcome, and a fixed reason; it never includes text or
|
||||||
|
the loop token.
|
||||||
|
|
||||||
|
#### Scenario: Clipboard delivery failure
|
||||||
|
- **WHEN** provider-to-client control delivery fails
|
||||||
|
- **THEN** the gateway does not report the update as forwarded.
|
||||||
|
|
||||||
|
#### Scenario: Reflected clipboard value
|
||||||
|
- **WHEN** a client-originated text value returns from the provider with the
|
||||||
|
matching retained token/value pair
|
||||||
|
- **THEN** the gateway suppresses the reflected update without a second
|
||||||
|
provider mutation or client delivery.
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
## 1. Contract and fixtures
|
||||||
|
|
||||||
|
- [x] 1.1 Define the exact typed input and provider-feedback binary layouts in
|
||||||
|
the canonical frame documentation and registries.
|
||||||
|
- [x] 1.2 Add positive and negative fixed-byte conformance fixtures for every
|
||||||
|
input, release, feedback, termination, reserved, and malformed case.
|
||||||
|
- [x] 1.3 Update only source Protocol artifacts, regenerate bindings and the
|
||||||
|
manifest, and prove no generated drift.
|
||||||
|
- [x] 1.4 Define policy-bound clipboard direction/rate/loop-token envelopes and
|
||||||
|
positive/negative deterministic conformance fixtures without adding provider
|
||||||
|
fields to a client-facing frame.
|
||||||
|
|
||||||
|
## 2. Consumer qualification
|
||||||
|
|
||||||
|
- [x] 2.1 Run Protocol validation and the Go, Rust, and Swift conformance
|
||||||
|
consumers against the new fixtures.
|
||||||
|
- [x] 2.2 Advance the Data Plane to the final immutable Protocol revision and
|
||||||
|
translate only the typed envelopes to provider control packets.
|
||||||
|
- [x] 2.3 Add deterministic host-feedback forwarding and input-release tests
|
||||||
|
without provider endpoint or credential disclosure.
|
||||||
|
- [x] 2.4 Advance the Data Plane and Connection Server to the final clipboard
|
||||||
|
contract and prove disabled direction, malformed/oversized text, rate, loop,
|
||||||
|
and file/binary rejection against the authenticated provider path.
|
||||||
|
|
||||||
|
## 3. Freeze
|
||||||
|
|
||||||
|
- [x] 3.1 Reconcile the canonical specification, OpenSpec tasks, source
|
||||||
|
provenance, and consumer fixture digest before creating a new immutable
|
||||||
|
Protocol release candidate.
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
schema: spec-driven
|
||||||
|
created: 2026-07-30
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
## Context
|
||||||
|
|
||||||
|
RC8's canonical requirement names a terminal receipt, but its frame grammar, fixed fixture, and all Protocol validators reject the exact receipt accepted by Data Plane. The existing VGF1 envelope and generated conformance machinery already cover the required boundary.
|
||||||
|
|
||||||
|
## Goals / Non-Goals
|
||||||
|
|
||||||
|
**Goals:**
|
||||||
|
|
||||||
|
- Make one fixed empty client-direction type `0x03` receipt valid in every Protocol validator.
|
||||||
|
- Preserve all existing VGF1 direction, type, size, and payload validation.
|
||||||
|
- Make independent clients able to construct the receipt from Protocol-owned evidence.
|
||||||
|
|
||||||
|
**Non-Goals:**
|
||||||
|
|
||||||
|
- No new envelope, feedback framework, transport, or acknowledgement protocol.
|
||||||
|
- No change to gateway-to-client termination, rumble, HDR, client IDR, or FEC payloads.
|
||||||
|
|
||||||
|
## Decisions
|
||||||
|
|
||||||
|
- Extend the existing VGF1 grammar and fixed TSV corpus; generated and native validators remain consumers of that single contract.
|
||||||
|
- Reserve type `0x03` only for client direction with a zero-length payload. Direction and exact-length checks remain prior trust-boundary requirements.
|
||||||
|
- Publish the verified change as a new immutable version; RC8 remains unchanged.
|
||||||
|
|
||||||
|
## Risks / Trade-offs
|
||||||
|
|
||||||
|
- [A validator diverges from the fixed corpus] → Require normalized cross-language conformance in `make verify`.
|
||||||
|
- [Receipt handling is accepted outside terminal state] → Keep state authorization in Data Plane; Protocol validates only the wire shape.
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
## Why
|
||||||
|
|
||||||
|
The canonical terminal-receipt requirement contradicts the fixed VGF1 grammar and every generated validator, so RC8 cannot provide an executable cross-language contract for gateway-owned terminal closure.
|
||||||
|
|
||||||
|
## What Changes
|
||||||
|
|
||||||
|
- Define client-direction VGF1 type `0x03` as an empty terminal receipt in the existing frame grammar.
|
||||||
|
- Add fixed conformance vectors for valid receipt handling and invalid direction, body, truncation, length, and unknown-type cases.
|
||||||
|
- Generate consistent Go, Rust, Swift, and Python validation behavior from the Protocol source.
|
||||||
|
|
||||||
|
## Capabilities
|
||||||
|
|
||||||
|
### New Capabilities
|
||||||
|
|
||||||
|
None.
|
||||||
|
|
||||||
|
### Modified Capabilities
|
||||||
|
|
||||||
|
- `gateway-input-feedback`: Make the already-required terminal receipt executable and cross-language conformant without weakening other VGF1 validation.
|
||||||
|
|
||||||
|
## Impact
|
||||||
|
|
||||||
|
Protocol frame documentation, conformance fixtures, generators, generated bindings, native validator tools, and immutable Protocol consumers. RC8 remains unchanged and a new immutable Protocol version is required.
|
||||||
+27
@@ -0,0 +1,27 @@
|
|||||||
|
## MODIFIED Requirements
|
||||||
|
|
||||||
|
### Requirement: Bounded provider feedback control envelope
|
||||||
|
The registered bidirectional reliable `control.ack.v1` flow SHALL define an ASCII `VGF1` envelope
|
||||||
|
with a direction byte, type byte, big-endian payload length, and exact payload
|
||||||
|
bytes. Only host termination, rumble, and HDR feedback SHALL be valid from the
|
||||||
|
gateway to the client. Only IDR, FEC/loss feedback, and client-direction type
|
||||||
|
`0x03` with an empty payload as terminal receipt SHALL be valid from the client
|
||||||
|
to the gateway. The fixed conformance corpus and every generated or native
|
||||||
|
Protocol validator SHALL accept that exact receipt and reject unknown types,
|
||||||
|
wrong direction, nonempty receipt bodies, truncation, and length mismatch. The
|
||||||
|
terminal receipt SHALL be valid only while the same session awaits receipt of
|
||||||
|
its one terminal event and MUST NOT be forwarded to the provider. The envelope
|
||||||
|
SHALL contain no provider address, certificate, credential, or opaque provider
|
||||||
|
packet.
|
||||||
|
|
||||||
|
#### Scenario: Host termination forwarding
|
||||||
|
- **WHEN** the Apollo adapter receives an authenticated host termination packet
|
||||||
|
- **THEN** the gateway forwards a bounded `VGF1` termination envelope over reliable Verse control and reports the provider state separately
|
||||||
|
|
||||||
|
#### Scenario: Terminal event receipt
|
||||||
|
- **WHEN** a client receives the reliable typed terminal event
|
||||||
|
- **THEN** it sends the fixed empty client-direction type `0x03` receipt and the gateway owns bounded tunnel closure without forwarding the receipt to the provider
|
||||||
|
|
||||||
|
#### Scenario: Unauthorized or malformed feedback
|
||||||
|
- **WHEN** feedback is disabled by policy, has an invalid direction/type/length, contains a forbidden provider field, or sends a terminal receipt outside the awaiting-terminal state
|
||||||
|
- **THEN** the gateway rejects it without forwarding or provider mutation
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
## 1. Red Conformance
|
||||||
|
|
||||||
|
- [x] 1.1 Add fixed valid and invalid terminal-receipt vectors and prove Python, Go, Rust, and Swift reject the required valid vector
|
||||||
|
- [x] 1.2 Add a Data Plane independent-client regression that consumes the Protocol fixed vector rather than the production encoder
|
||||||
|
|
||||||
|
## 2. Contract Repair
|
||||||
|
|
||||||
|
- [x] 2.1 Update the VGF1 grammar and Protocol validator sources for the exact empty client-direction type `0x03` receipt
|
||||||
|
- [x] 2.2 Regenerate bindings normally and prove deterministic generation has no drift
|
||||||
|
- [x] 2.3 Run complete Protocol verification and strict OpenSpec validation
|
||||||
|
|
||||||
|
## 3. Immutable Release
|
||||||
|
|
||||||
|
- [x] 3.1 Verify the next version is unused locally and remotely, publish one immutable annotated tag, and verify its object and peeled commit
|
||||||
|
- [x] 3.2 Resolve the version from separate empty caches and pin exact fetched checksums in Data Plane and Connection Server
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
schema: spec-driven
|
||||||
|
created: 2026-07-30
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
## Context
|
||||||
|
|
||||||
|
QUIC stream writes complete before peer receipt. The previous gateway avoided losing its last control frame by waiting for client-owned connection closure; immediate gateway closure reproduced event loss. `control.ack.v1` is already reliable and bidirectional, so no new flow is needed.
|
||||||
|
|
||||||
|
## Goals / Non-Goals
|
||||||
|
|
||||||
|
**Goals:**
|
||||||
|
|
||||||
|
- Represent peer receipt of the one terminal control event.
|
||||||
|
- Keep the message bounded, direction-specific, and independent of provider data.
|
||||||
|
|
||||||
|
**Non-Goals:**
|
||||||
|
|
||||||
|
- General acknowledgements, retries, lifecycle state, or provider transport semantics.
|
||||||
|
- Changes to JSON schemas or generated bindings.
|
||||||
|
|
||||||
|
## Decisions
|
||||||
|
|
||||||
|
- Assign client-direction `VGF1` type `0x03` with an empty payload to terminal receipt.
|
||||||
|
- Permit it only after a terminal event; the Data Plane enforces session state and deadline.
|
||||||
|
- Preserve all existing message bytes and meanings.
|
||||||
|
|
||||||
|
## Risks / Trade-offs
|
||||||
|
|
||||||
|
- [Older clients do not send the receipt] → The gateway closes at its bounded receipt deadline; compatibility does not transfer tunnel ownership back to the client.
|
||||||
|
- [A stale receipt is replayed] → The gateway rejects receipts outside the single awaiting-terminal state.
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
## Why
|
||||||
|
|
||||||
|
A public independent QUIC regression proved that closing the gateway connection immediately after writing the reliable terminal event can discard that event, while waiting for the client to close leaves session ownership with the client. The registered bidirectional control flow needs one bounded receipt semantic so the gateway can close only after observed delivery or a fixed receipt deadline.
|
||||||
|
|
||||||
|
## What Changes
|
||||||
|
|
||||||
|
- Add a client-to-gateway terminal receipt to the existing bounded `VGF1` envelope on `control.ack.v1`.
|
||||||
|
- Keep the receipt payload empty and valid only while one terminal event is awaiting receipt.
|
||||||
|
- Preserve the existing IDR, FEC, termination, rumble, and HDR meanings.
|
||||||
|
|
||||||
|
## Capabilities
|
||||||
|
|
||||||
|
### New Capabilities
|
||||||
|
|
||||||
|
None.
|
||||||
|
|
||||||
|
### Modified Capabilities
|
||||||
|
|
||||||
|
- `gateway-input-feedback`: Permit the narrowly scoped terminal receipt in the existing reliable control envelope.
|
||||||
|
|
||||||
|
## Impact
|
||||||
|
|
||||||
|
This changes the immutable Protocol semantics consumed by the GPLv3 Data Plane and independent Verse clients. It adds no schema field, dependency, provider address, credential, generic acknowledgement framework, or provider-facing message.
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
## MODIFIED Requirements
|
||||||
|
|
||||||
|
### Requirement: Bounded provider feedback control envelope
|
||||||
|
The registered bidirectional reliable `control.ack.v1` flow SHALL define an ASCII `VGF1` envelope
|
||||||
|
with a direction byte, type byte, big-endian payload length, and exact payload
|
||||||
|
bytes. Only host termination, rumble, and HDR feedback SHALL be valid from the
|
||||||
|
gateway to the client. Only IDR, FEC/loss feedback, and an empty terminal receipt
|
||||||
|
SHALL be valid from the client to the gateway. The terminal receipt SHALL be
|
||||||
|
valid only while the same session awaits receipt of its one terminal event and
|
||||||
|
MUST NOT be forwarded to the provider. The envelope SHALL contain no provider
|
||||||
|
address, certificate, credential, or opaque provider packet.
|
||||||
|
|
||||||
|
#### Scenario: Host termination forwarding
|
||||||
|
- **WHEN** the Apollo adapter receives an authenticated host termination packet
|
||||||
|
- **THEN** the gateway forwards a bounded `VGF1` termination envelope over reliable Verse control and reports the provider state separately
|
||||||
|
|
||||||
|
#### Scenario: Terminal event receipt
|
||||||
|
- **WHEN** a client receives the reliable typed terminal event
|
||||||
|
- **THEN** it sends the empty terminal receipt and the gateway owns bounded tunnel closure without forwarding the receipt to the provider
|
||||||
|
|
||||||
|
#### Scenario: Unauthorized or malformed feedback
|
||||||
|
- **WHEN** feedback is disabled by policy, has an invalid direction/type/length, contains a forbidden provider field, or sends a terminal receipt outside the awaiting-terminal state
|
||||||
|
- **THEN** the gateway rejects it without forwarding or provider mutation
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
## 1. Contract
|
||||||
|
|
||||||
|
- [x] 1.1 Define the empty client-direction terminal receipt on `control.ack.v1`
|
||||||
|
- [x] 1.2 Run complete Protocol verification and deterministic generation checks
|
||||||
|
|
||||||
|
## 2. Immutable release
|
||||||
|
|
||||||
|
- [x] 2.1 Publish one new never-reused immutable Protocol version after final contract verification
|
||||||
|
- [x] 2.2 Resolve the version from separate empty consumer caches and record exact checksums
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
schema: spec-driven
|
||||||
|
created: 2026-07-29
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
## Context
|
||||||
|
|
||||||
|
The Data Plane already collects process-wide atomic counters and gauges. Only active connections and egress Kbps cross the authenticated heartbeat boundary.
|
||||||
|
|
||||||
|
## Goals / Non-Goals
|
||||||
|
|
||||||
|
**Goals:**
|
||||||
|
|
||||||
|
- Carry the existing low-cardinality observations with explicit units.
|
||||||
|
- Bound every numeric field and enumerate provider state.
|
||||||
|
- Keep registration capacity distinct from measured traffic.
|
||||||
|
|
||||||
|
**Non-Goals:**
|
||||||
|
|
||||||
|
- Add session, route, endpoint, credential, label, or payload fields.
|
||||||
|
- Define a new telemetry transport.
|
||||||
|
- Publish a Protocol version.
|
||||||
|
|
||||||
|
## Decisions
|
||||||
|
|
||||||
|
- Nest the values in required `GatewayTelemetry` so heartbeat telemetry is one strict atomic contract.
|
||||||
|
- Use cumulative counters and microsecond delay totals plus one processing sample per complete provider media unit; consumers can derive rates/averages without losing raw observations.
|
||||||
|
- Define queue delay as residence in the bounded provider queue, processing as active recovery/framing/QUIC work excluding queue and scheduler waits, and pacing as scheduler wait only.
|
||||||
|
- Derive measured egress from transmitted-byte deltas over monotonic elapsed time; configured capacity remains registration data.
|
||||||
|
- Keep loss as parts per million and provider state as a bounded enum.
|
||||||
|
|
||||||
|
## Risks / Trade-offs
|
||||||
|
|
||||||
|
- [Cumulative counters approach signed integer limits] → Bound at signed 64-bit and saturate consumer conversions.
|
||||||
|
- [New required object breaks RC6] → Test locally and publish only under separate immutable-version authorization.
|
||||||
|
|
||||||
|
## Migration Plan
|
||||||
|
|
||||||
|
Regenerate all bindings locally, update both consumers through the temporary workspace, and stop at the immutable publication boundary.
|
||||||
|
|
||||||
|
## Open Questions
|
||||||
|
|
||||||
|
None.
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
## Why
|
||||||
|
|
||||||
|
Gateway heartbeat currently carries active sessions and one egress rate but cannot transport the required observed process and provider-path telemetry.
|
||||||
|
|
||||||
|
## What Changes
|
||||||
|
|
||||||
|
- Add one required bounded low-cardinality telemetry object to authenticated gateway heartbeat.
|
||||||
|
- Cover counters, delay totals/samples, control RTT/loss/jitter, pending reliability, reconnects, and provider state.
|
||||||
|
- Keep configured capacity exclusively in registration and measured egress in heartbeat.
|
||||||
|
|
||||||
|
## Capabilities
|
||||||
|
|
||||||
|
### New Capabilities
|
||||||
|
|
||||||
|
- `gateway-heartbeat-telemetry`: Authenticated heartbeats carry bounded observed gateway telemetry without routes, sessions, credentials, or payload data.
|
||||||
|
|
||||||
|
### Modified Capabilities
|
||||||
|
|
||||||
|
None.
|
||||||
|
|
||||||
|
## Impact
|
||||||
|
|
||||||
|
The control-v1 schema, generated Go/Rust/Swift bindings, conformance checks, and both unpublished consumers require coordinated local updates. RC6 remains unchanged.
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
## ADDED Requirements
|
||||||
|
|
||||||
|
### Requirement: Heartbeat carries observed gateway telemetry
|
||||||
|
Every authenticated `GatewayHeartbeat` SHALL carry the bounded process-level counters, delay totals and samples, control RTT/loss/jitter, pending reliable work, reconnect count, and provider state defined by `GatewayTelemetry`.
|
||||||
|
|
||||||
|
#### Scenario: Valid telemetry heartbeat
|
||||||
|
- **WHEN** a gateway reports its current observed snapshot
|
||||||
|
- **THEN** Go, Rust, and Swift bindings accept the same bounded low-cardinality values and units
|
||||||
|
|
||||||
|
### Requirement: Heartbeat telemetry excludes sensitive dimensions
|
||||||
|
Heartbeat telemetry MUST reject unknown fields and MUST NOT include session, route, endpoint, credential, label, or payload values.
|
||||||
|
|
||||||
|
#### Scenario: Secret or high-cardinality field is attempted
|
||||||
|
- **WHEN** a heartbeat contains an unregistered session, route, endpoint, credential, or payload field
|
||||||
|
- **THEN** strict contract validation rejects it before authenticated transport
|
||||||
|
|
||||||
|
### Requirement: Delay and egress observations have one canonical meaning
|
||||||
|
Queue delay SHALL measure provider-queue residence, processing delay SHALL measure active gateway recovery/framing/QUIC work excluding queue and pacing, and pacing delay SHALL measure scheduler waiting only. Processing samples SHALL count complete provider media units rather than Verse fragments. Measured egress SHALL derive from transmitted-byte deltas over monotonic elapsed time and MUST NOT be copied from configured capacity.
|
||||||
|
|
||||||
|
#### Scenario: One provider unit becomes multiple Verse frames
|
||||||
|
- **WHEN** one complete provider unit waits in the queue, traverses gateway processing, waits for pacing, and fragments into multiple Verse frames
|
||||||
|
- **THEN** each delay total includes only its defined interval and the heartbeat advances processing samples exactly once
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
## 1. Contract
|
||||||
|
|
||||||
|
- [x] 1.1 Add bounded GatewayTelemetry to every heartbeat
|
||||||
|
- [x] 1.2 Add Go, Rust, and Swift strict conformance checks
|
||||||
|
- [x] 1.3 Regenerate bindings and prove deterministic output
|
||||||
|
- [x] 1.4 Specify queue, processing, pacing, sample, and measured-egress semantics
|
||||||
|
|
||||||
|
## 2. Consumer Boundary
|
||||||
|
|
||||||
|
- [x] 2.1 Verify local Data Plane and Server consumers through a temporary workspace
|
||||||
|
- [x] 2.2 Publish one new never-reused immutable Protocol version under separate authorization
|
||||||
|
- [x] 2.3 Resolve from empty caches and pin exact checksums in both consumers
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
schema: spec-driven
|
||||||
|
created: 2026-07-29
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
## Context
|
||||||
|
|
||||||
|
The Server resolves an immutable stream-policy version, but RC6 provider work carries only its identifier. The Data Plane consequently cannot distinguish the authorized settings from local defaults.
|
||||||
|
|
||||||
|
## Goals / Non-Goals
|
||||||
|
|
||||||
|
**Goals:**
|
||||||
|
|
||||||
|
- Carry only the effective launch settings required by the provider boundary.
|
||||||
|
- Express client decode support as an ordered set of existing registered profiles.
|
||||||
|
- Generate the same ordered registered-profile intersection for every consumer.
|
||||||
|
- Generate identical validation from the canonical schema for all bindings.
|
||||||
|
- Preserve the policy-version identifier for audit correlation.
|
||||||
|
|
||||||
|
**Non-Goals:**
|
||||||
|
|
||||||
|
- Publish or mutate RC6.
|
||||||
|
- Add a provider-specific token grammar or generic capability framework.
|
||||||
|
- Expose provider work or policy internals to Verse clients.
|
||||||
|
|
||||||
|
## Decisions
|
||||||
|
|
||||||
|
- Use one required nested `ProviderStreamPolicy` value in `ProviderSessionWork`; this keeps the policy settings atomic and avoids repeating validation.
|
||||||
|
- Carry the Server-selected target bitrate rather than all policy bounds because Apollo ANNOUNCE consumes one configured bitrate.
|
||||||
|
- Permit canonical `H264`, `HEVC`, and `AV1` values in the contract. A provider implementation must reject values it cannot honor rather than silently downgrade them.
|
||||||
|
- Carry `audio_enabled` even though the current Apollo path cannot truthfully disable audio; the Data Plane must fail closed for that combination.
|
||||||
|
- Change `client_decode` from one opaque string to a non-empty ordered unique array of registered profile identifiers. Preference belongs to the first peer's order.
|
||||||
|
- Generate `IntersectCapabilityProfiles` from the canonical schema so Protocol, Server, and Data Plane do not maintain separate interpretations.
|
||||||
|
|
||||||
|
## Risks / Trade-offs
|
||||||
|
|
||||||
|
- [New required field breaks RC6 consumers] → Publish only under a separately authorized new immutable version and pin both consumers after empty-cache resolution.
|
||||||
|
- [Provider capabilities differ] → Validate the effective policy against the selected provider before readiness.
|
||||||
|
- [Peers advertise no common registered profile] → Reject admission instead of inventing a combined token or silently downgrading.
|
||||||
|
|
||||||
|
## Migration Plan
|
||||||
|
|
||||||
|
Regenerate and verify bindings locally, update both consumers through a temporary workspace only, then stop at the publication boundary. RC6 remains unchanged.
|
||||||
|
|
||||||
|
## Open Questions
|
||||||
|
|
||||||
|
None.
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
## Why
|
||||||
|
|
||||||
|
Provider work identifies an immutable stream-policy version but omits the effective settings, allowing a gateway to launch Apollo with unrelated hard-coded media parameters.
|
||||||
|
|
||||||
|
## What Changes
|
||||||
|
|
||||||
|
- Add the effective resolution, frame rate, codec, selected bitrate, and audio policy to authenticated provider work.
|
||||||
|
- Represent decode support as an ordered set of registered profiles and generate one canonical intersection operation for consumers.
|
||||||
|
- Require generated Go, Rust, and Swift bindings to validate the same bounded stream-policy contract.
|
||||||
|
- Keep the new contract unpublished until a new immutable Protocol version is separately authorized.
|
||||||
|
|
||||||
|
## Capabilities
|
||||||
|
|
||||||
|
### New Capabilities
|
||||||
|
|
||||||
|
- `provider-stream-policy`: Authenticated provider work carries the exact effective stream policy consumed by the provider launch, and registered peers negotiate that policy through the shared ordered profile intersection.
|
||||||
|
|
||||||
|
### Modified Capabilities
|
||||||
|
|
||||||
|
None.
|
||||||
|
|
||||||
|
## Impact
|
||||||
|
|
||||||
|
The control-v1 schema, generated bindings, conformance fixtures, and downstream Server and Data Plane consumers require coordinated local updates. RC6 remains immutable and unchanged.
|
||||||
+33
@@ -0,0 +1,33 @@
|
|||||||
|
## ADDED Requirements
|
||||||
|
|
||||||
|
### Requirement: Provider work carries the effective stream policy
|
||||||
|
Authenticated `ProviderSessionWork` SHALL carry the immutable policy version and its effective resolution, frame rate, codec, target bitrate, and audio-enabled decision.
|
||||||
|
|
||||||
|
#### Scenario: Gateway receives an effective policy
|
||||||
|
- **WHEN** the Server issues provider work for an admitted session
|
||||||
|
- **THEN** the work identifies the policy version and includes the effective bounded stream-policy values
|
||||||
|
|
||||||
|
### Requirement: Stream-policy bindings share one strict contract
|
||||||
|
Generated Go, Rust, and Swift bindings MUST reject missing, unknown, out-of-range, or unsupported stream-policy wire values according to the canonical schema.
|
||||||
|
|
||||||
|
#### Scenario: Invalid policy is rejected consistently
|
||||||
|
- **WHEN** provider work contains an unknown codec or a value outside the canonical bounds
|
||||||
|
- **THEN** every generated binding rejects the work before it can reach provider setup
|
||||||
|
|
||||||
|
### Requirement: Decode capabilities use registered ordered profiles
|
||||||
|
`CapabilityProfile.client_decode` SHALL be a non-empty ordered unique set containing only registered `h264-opus` and `hevc-opus` profile identifiers. It MUST NOT encode multiple capabilities in an opaque private token.
|
||||||
|
|
||||||
|
#### Scenario: Independent peer advertises one registered profile
|
||||||
|
- **WHEN** an independent peer advertises one registered decode profile
|
||||||
|
- **THEN** canonical validation accepts that profile without requiring a combined private token
|
||||||
|
|
||||||
|
### Requirement: Consumers share one ordered registered-profile intersection
|
||||||
|
Generated Protocol behavior SHALL select common registered profiles in the first peer's preference order. Provider consumers SHALL separately reject the resulting intersection when it cannot honor the immutable stream policy.
|
||||||
|
|
||||||
|
#### Scenario: Policy-compatible profile overlaps
|
||||||
|
- **WHEN** the gateway advertises HEVC then H.264 and the client advertises only H.264
|
||||||
|
- **THEN** the shared intersection selects `h264-opus`
|
||||||
|
|
||||||
|
#### Scenario: No policy-compatible profile overlaps
|
||||||
|
- **WHEN** peers have no registered common profile
|
||||||
|
- **THEN** the shared intersection rejects admission without inventing a private combined token
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
## 1. Contract
|
||||||
|
|
||||||
|
- [x] 1.1 Add bounded effective stream policy to ProviderSessionWork
|
||||||
|
- [x] 1.2 Add Go, Rust, and Swift conformance coverage
|
||||||
|
- [x] 1.3 Regenerate bindings and prove deterministic output
|
||||||
|
- [x] 1.4 Replace the opaque decode token with an ordered unique set of registered profiles
|
||||||
|
- [x] 1.5 Generate and cross-check canonical ordered registered-profile intersection behavior
|
||||||
|
|
||||||
|
## 2. Consumer Boundary
|
||||||
|
|
||||||
|
- [x] 2.1 Verify local Server and Data Plane consumers through a temporary workspace
|
||||||
|
- [x] 2.2 Publish one new never-reused immutable Protocol version under separate authorization
|
||||||
|
- [x] 2.3 Resolve from empty caches and pin exact checksums in both consumers
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
schema: spec-driven
|
||||||
|
created: 2026-07-30
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
## Context
|
||||||
|
|
||||||
|
RC9 datagram-v1 uses one-byte fragment fields and caps a media unit at 16 path-MTU fragments. The reviewed Apollo assembler can recover an encoded frame up to 1,028,152 bytes, so the replacement contract must carry at least that size while rejecting proportional allocation from untrusted header claims.
|
||||||
|
|
||||||
|
## Goals / Non-Goals
|
||||||
|
|
||||||
|
**Goals:**
|
||||||
|
|
||||||
|
- Preserve datagram-v1 byte-for-byte and add explicitly negotiated datagram-v2.
|
||||||
|
- Keep each QUIC datagram at 1,200 bytes or less.
|
||||||
|
- Bound one complete encoded unit to 1 MiB, at most 891 fragments, four incomplete units, and a 250 ms reassembly lifetime.
|
||||||
|
- Define duplicate, reorder, timeout, and malformed behavior for every validator.
|
||||||
|
|
||||||
|
**Non-Goals:**
|
||||||
|
|
||||||
|
- Provider packet exposure, codec parsing, decode/transcode, retransmission, or a generic transport framework.
|
||||||
|
|
||||||
|
## Decisions
|
||||||
|
|
||||||
|
- Datagram-v2 widens fragment index and count to unsigned 16-bit network-order fields, making a 23-byte header and 1,177-byte media payload. This is the smallest header change that covers the reviewed provider maximum without unrelated sequences.
|
||||||
|
- Sequence identifies one complete unit. All fragments must agree on channel, sequence, timestamp, count, and flags.
|
||||||
|
- Reassembly stores only received fragment bytes, rejects conflicting duplicates, permits exact duplicates and bounded reorder, evicts oldest state above four units, and expires state after 250 ms.
|
||||||
|
- Capability validation registers `datagram-v1` and `datagram-v2`; exact profile equality keeps downgrade behavior fail closed.
|
||||||
|
|
||||||
|
## Risks / Trade-offs
|
||||||
|
|
||||||
|
- [More fragments increase per-frame overhead] → retain the 1,200-byte PMTU envelope and the 1 MiB frame ceiling.
|
||||||
|
- [Four concurrent 1 MiB units can consume bounded memory] → allocate only received bytes and evict/expire incomplete state.
|
||||||
|
- [RC9 peers cannot validate datagram-v2] → require a new immutable Protocol release and exact consumer pins; never mutate RC9.
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
## Why
|
||||||
|
|
||||||
|
The RC9 datagram contract limits one encoded media unit to 18,864 bytes, below the bounded complete frames required by the reviewed Apollo adapter and the fixed Phase 3C profiles. A new immutable Protocol release must define complete-frame transport and reassembly bounds before consumers can relay realistic encoded frames without mutation.
|
||||||
|
|
||||||
|
## What Changes
|
||||||
|
|
||||||
|
- Add a versioned PMTU-safe media datagram header with wider fragment fields.
|
||||||
|
- Bound complete encoded frames, fragments, reassembly state, duplicates, reorder, timeout, and allocation.
|
||||||
|
- Preserve RC9 datagram-v1 unchanged and require explicit negotiation of the new framing profile.
|
||||||
|
- Add fixed Python, Go, Rust, and Swift conformance vectors for valid and malformed framing.
|
||||||
|
|
||||||
|
## Capabilities
|
||||||
|
|
||||||
|
### New Capabilities
|
||||||
|
|
||||||
|
- `gateway-media-framing`: Versioned complete encoded-frame fragmentation and bounded reassembly contract.
|
||||||
|
|
||||||
|
### Modified Capabilities
|
||||||
|
|
||||||
|
None.
|
||||||
|
|
||||||
|
## Impact
|
||||||
|
|
||||||
|
Protocol framing documentation, registries, capability schema, fixed conformance fixtures, validators, generated Go/Rust/Swift bindings, and immutable consumer versioning. Requirements: SYS-002, SYS-003, P3C-006, P3C-007, P3C-008, P3C-030, P3C-038, VER-001, VER-002, VER-028.
|
||||||
+34
@@ -0,0 +1,34 @@
|
|||||||
|
## ADDED Requirements
|
||||||
|
|
||||||
|
### Requirement: Versioned complete encoded-frame datagrams
|
||||||
|
The Protocol SHALL register `datagram-v2` with a 23-byte network-order header containing magic, version, channel, flags, sequence, timestamp, unsigned 16-bit fragment index, unsigned 16-bit fragment count, and unsigned 16-bit payload length. Media datagrams MUST remain at most 1,200 bytes with at most 1,177 payload bytes, and one sequence MUST represent exactly one complete encoded unit of at most 1,048,576 bytes and 891 fragments.
|
||||||
|
|
||||||
|
#### Scenario: Bounded large encoded frame
|
||||||
|
- **WHEN** an encoded media frame is larger than the datagram-v1 18,864-byte limit but no larger than 1,048,576 bytes
|
||||||
|
- **THEN** datagram-v2 carries it under one sequence in at most 891 independently bounded fragments
|
||||||
|
|
||||||
|
#### Scenario: Oversized encoded frame
|
||||||
|
- **WHEN** a sender attempts more than 1,048,576 complete bytes or 891 fragments
|
||||||
|
- **THEN** framing rejects the unit before sending or allocating proportional state
|
||||||
|
|
||||||
|
### Requirement: Bounded complete-frame reassembly
|
||||||
|
Datagram-v2 reassembly SHALL retain at most four incomplete media units and only the bytes actually received, permit bounded fragment reorder and exact duplicate fragments, reject conflicting duplicates or inconsistent metadata, expire incomplete state after 250 milliseconds, and emit a payload only after every fragment is present exactly once.
|
||||||
|
|
||||||
|
#### Scenario: Reordered frame completes
|
||||||
|
- **WHEN** every valid fragment for one unit arrives out of order within the reassembly bounds
|
||||||
|
- **THEN** the receiver emits exactly one byte-identical complete encoded frame with its original boundary
|
||||||
|
|
||||||
|
#### Scenario: Malformed or stale reassembly
|
||||||
|
- **WHEN** fragments conflict, metadata changes, an index or count is invalid, state exceeds four incomplete units, or a unit exceeds its timeout
|
||||||
|
- **THEN** the receiver rejects or evicts that incomplete unit without proportional allocation or payload emission
|
||||||
|
|
||||||
|
### Requirement: Explicit framing negotiation
|
||||||
|
`CapabilityProfile.framing` SHALL accept only registered `datagram-v1` or `datagram-v2` values. A peer MUST use datagram-v2 only after exact capability intersection and MUST NOT reinterpret datagram-v1 bytes as datagram-v2.
|
||||||
|
|
||||||
|
#### Scenario: Independent datagram-v2 peers overlap
|
||||||
|
- **WHEN** both peers advertise the registered datagram-v2 framing profile
|
||||||
|
- **THEN** generated Go, Rust, and Swift validation and fixed conformance accept the profile
|
||||||
|
|
||||||
|
#### Scenario: Unknown or downgraded framing
|
||||||
|
- **WHEN** a peer advertises an unknown framing value or the peers advertise different versions
|
||||||
|
- **THEN** capability validation or intersection rejects the session before media forwarding
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
## 1. Red conformance
|
||||||
|
|
||||||
|
- [x] 1.1 Add fixed datagram-v2 and capability vectors that fail current Python, Go, Rust, and Swift validators
|
||||||
|
- [x] 1.2 Prove unknown version, malformed length, invalid fragment, and oversized complete-unit cases remain rejected
|
||||||
|
|
||||||
|
## 2. Contract implementation
|
||||||
|
|
||||||
|
- [x] 2.1 Add the versioned datagram-v2 frame grammar and registered framing values
|
||||||
|
- [x] 2.2 Update generator/native validators and regenerate Go, Rust, and Swift bindings normally
|
||||||
|
|
||||||
|
## 3. Verification
|
||||||
|
|
||||||
|
- [x] 3.1 Run focused cross-language conformance and strict OpenSpec validation
|
||||||
|
- [x] 3.2 Run complete `make verify` and prove a second generation has no drift
|
||||||
|
|
||||||
|
## 4. Immutable boundary
|
||||||
|
|
||||||
|
- [x] 4.1 Publish one new never-reused immutable Protocol version, resolve it
|
||||||
|
from separate empty consumer caches, and pin the fetched checksums in both
|
||||||
|
consumers
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
schema: spec-driven
|
||||||
|
created: 2026-08-10
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
## Context
|
||||||
|
|
||||||
|
The JSON control schema is the generated-binding authority for broker requests
|
||||||
|
and manifests, while VGI1 is the provider-neutral input payload. Both contracts
|
||||||
|
are strict: old decoders reject unknown response fields and old gateways reject
|
||||||
|
unknown VGI kinds. Phase 3D therefore needs optional fields plus explicit
|
||||||
|
feature negotiation rather than a wire-version or protobuf change.
|
||||||
|
|
||||||
|
## Goals / Non-Goals
|
||||||
|
|
||||||
|
**Goals:**
|
||||||
|
|
||||||
|
- Preserve legacy JSON shapes when display negotiation is absent.
|
||||||
|
- Generate optional referenced objects correctly in Go, Rust, and Swift.
|
||||||
|
- Define exact, bounded, cross-language absolute-pointer and scroll bytes.
|
||||||
|
|
||||||
|
**Non-Goals:**
|
||||||
|
|
||||||
|
- Server clamp policy, database persistence, or provider translation.
|
||||||
|
- Live display renegotiation, provider packet exposure, or protobuf changes.
|
||||||
|
|
||||||
|
## Decisions
|
||||||
|
|
||||||
|
- Keep control wire version 1 and gate additions with exact feature IDs. This
|
||||||
|
avoids changing every legacy request while allowing strict clients to demand
|
||||||
|
the accepted display field.
|
||||||
|
- Use one reusable `DisplayMode` with the existing provider-policy dimension
|
||||||
|
bounds. Optional referenced objects become Go pointers so `omitempty` is real;
|
||||||
|
Rust and Swift retain their existing optional generation.
|
||||||
|
- Encode absolute pointer as four big-endian u16 values and scroll as two
|
||||||
|
big-endian i16 values in VGI1. Viewport coordinates are self-contained and
|
||||||
|
provider-neutral; provider scaling stays outside Protocol.
|
||||||
|
- Leave protobuf unchanged because the observed broker and VGI consumers use
|
||||||
|
JSON and fixed byte frames, not generated protobuf messages.
|
||||||
|
|
||||||
|
## Risks / Trade-offs
|
||||||
|
|
||||||
|
- [Old strict consumers reject new response fields] → emit them only after
|
||||||
|
`display.request.v1` negotiation.
|
||||||
|
- [New VGI kinds reach an old or unadvertised gateway] → reject before provider
|
||||||
|
translation unless the matching input feature is active.
|
||||||
|
- [Generated Go optional values serialize as zero objects] → require pointers,
|
||||||
|
omission tests, and clean second generation.
|
||||||
|
|
||||||
|
## Migration Plan
|
||||||
|
|
||||||
|
Freeze a new never-reused Protocol RC after full verification. Server and Data
|
||||||
|
Plane then pin that exact tag together. Legacy sessions omit all new fields and
|
||||||
|
continue using existing input kinds.
|
||||||
|
|
||||||
|
## Open Questions
|
||||||
|
|
||||||
|
None at the Protocol boundary; policy clamp and Apollo translation remain
|
||||||
|
consumer-owned work.
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
## Why
|
||||||
|
|
||||||
|
The Phase 3D native client must request a bounded display mode and send
|
||||||
|
provider-neutral absolute-pointer and high-resolution scroll input. The current
|
||||||
|
wire contract exposes only policy-selected stream dimensions and rejects both
|
||||||
|
new input kinds.
|
||||||
|
|
||||||
|
## What Changes
|
||||||
|
|
||||||
|
- Add one bounded `DisplayMode` object and optional display fields to session
|
||||||
|
request/session/manifest contracts while keeping control wire version 1.
|
||||||
|
- Register `display.request.v1`, `input.absolute.v1`, and `input.scroll.v1` so
|
||||||
|
every new behavior is explicitly negotiated.
|
||||||
|
- Extend VGI1 with exact absolute-pointer and signed scroll bodies while
|
||||||
|
preserving all existing kind encodings.
|
||||||
|
- Require a new immutable Protocol release candidate after deterministic
|
||||||
|
Go/Rust/Swift generation and conformance pass; existing tags remain unchanged.
|
||||||
|
|
||||||
|
## Capabilities
|
||||||
|
|
||||||
|
### New Capabilities
|
||||||
|
|
||||||
|
- `session-display-mode`: Optional feature-gated requested and effective display
|
||||||
|
mode disclosure for native session creation and manifests.
|
||||||
|
|
||||||
|
### Modified Capabilities
|
||||||
|
|
||||||
|
- `gateway-input-feedback`: Add negotiated provider-neutral absolute-pointer and
|
||||||
|
high-resolution scroll kinds to the existing sequenced input grammar.
|
||||||
|
|
||||||
|
## Impact
|
||||||
|
|
||||||
|
- JSON Schema, feature registry, VGI frame documentation, fixed conformance
|
||||||
|
fixtures, generated Go/Rust/Swift bindings, and strict validators.
|
||||||
|
- Connection Server session persistence/allocation and Data Plane input
|
||||||
|
translation after consumers pin the immutable Protocol candidate.
|
||||||
|
- Protobuf remains unchanged because no observed consumer uses it for these
|
||||||
|
JSON control or VGI payload paths.
|
||||||
+33
@@ -0,0 +1,33 @@
|
|||||||
|
## MODIFIED Requirements
|
||||||
|
|
||||||
|
### Requirement: Typed sequenced input envelope
|
||||||
|
The `input.sequenced.v1` payload SHALL begin with ASCII `VGI1`, a one-byte
|
||||||
|
event kind, and one-byte payload length. It SHALL contain exactly one bounded
|
||||||
|
keyboard, mouse-button, relative-mouse, UTF-8 scalar, controller-state,
|
||||||
|
absolute-mouse, or high-resolution-scroll event. Absolute mouse kind `0x06`
|
||||||
|
SHALL contain big-endian u16 x, y, viewport width, and viewport height, reject
|
||||||
|
zero viewports and coordinates outside the viewport, and require negotiated
|
||||||
|
`input.absolute.v1`. Scroll kind `0x07` SHALL contain big-endian signed i16
|
||||||
|
vertical and horizontal deltas and require negotiated `input.scroll.v1`. False
|
||||||
|
keyboard/mouse state and zeroed controller state are explicit releases.
|
||||||
|
Unknown or unadvertised kinds, length mismatches, malformed UTF-8, unsupported
|
||||||
|
controller indices, and reserved fields SHALL be rejected before provider
|
||||||
|
translation.
|
||||||
|
|
||||||
|
#### Scenario: Keyboard state change
|
||||||
|
- **WHEN** a client sends a valid keyboard press or release envelope
|
||||||
|
- **THEN** the gateway forwards the corresponding typed provider input on its
|
||||||
|
reliable keyboard channel and records the pressed state for cleanup.
|
||||||
|
|
||||||
|
#### Scenario: Absolute pointer and scroll
|
||||||
|
- **WHEN** an advertised client sends an in-viewport absolute coordinate or
|
||||||
|
signed scroll delta with the exact body length
|
||||||
|
- **THEN** the gateway accepts the provider-neutral event without adding it to
|
||||||
|
pressed-state cleanup.
|
||||||
|
|
||||||
|
#### Scenario: Invalid input envelope
|
||||||
|
- **WHEN** a client sends an unknown or unadvertised kind, invalid length,
|
||||||
|
malformed UTF-8 scalar, zero viewport, out-of-range coordinate, or nonzero
|
||||||
|
reserved field
|
||||||
|
- **THEN** the gateway rejects it without sending provider input or changing
|
||||||
|
pressed state.
|
||||||
+35
@@ -0,0 +1,35 @@
|
|||||||
|
## ADDED Requirements
|
||||||
|
|
||||||
|
### Requirement: Bounded display mode contract
|
||||||
|
The Protocol SHALL define `DisplayMode` with required integer
|
||||||
|
`resolution_width` from 320 through 16384, `resolution_height` from 200 through
|
||||||
|
8640, and `fps` from 1 through 240, rejecting missing, unknown, or out-of-range
|
||||||
|
fields.
|
||||||
|
|
||||||
|
#### Scenario: Valid display mode
|
||||||
|
- **WHEN** a client encodes a 2560 by 1440 display mode at 120 FPS
|
||||||
|
- **THEN** generated Go, Rust, and Swift bindings accept the same exact values.
|
||||||
|
|
||||||
|
#### Scenario: Invalid display mode
|
||||||
|
- **WHEN** any dimension or FPS is outside its bound or an unknown field exists
|
||||||
|
- **THEN** strict Protocol validation rejects the object.
|
||||||
|
|
||||||
|
### Requirement: Feature-gated optional display disclosure
|
||||||
|
`SessionRequest.requested_display_mode`,
|
||||||
|
`BrokerSession.requested_display_mode`,
|
||||||
|
`BrokerSession.effective_display_mode`, and `ManifestProfile.display_mode`
|
||||||
|
SHALL be optional references to `DisplayMode`. Go bindings SHALL use pointers
|
||||||
|
with JSON omission and Rust/Swift bindings SHALL use optionals. A client MUST
|
||||||
|
send the request only after `display.request.v1` negotiation, and a
|
||||||
|
display-aware manifest MUST contain the accepted mode. Legacy requests SHALL
|
||||||
|
produce legacy response shapes without these fields.
|
||||||
|
|
||||||
|
#### Scenario: Legacy request remains unchanged
|
||||||
|
- **WHEN** a client omits `requested_display_mode`
|
||||||
|
- **THEN** encoding omits the field and compatible Server responses omit all
|
||||||
|
display-mode fields.
|
||||||
|
|
||||||
|
#### Scenario: Display-aware request discloses acceptance
|
||||||
|
- **WHEN** a negotiated client sends a valid requested mode
|
||||||
|
- **THEN** session responses preserve the requested mode and the allocated
|
||||||
|
manifest includes the Server-accepted mode.
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
## 1. Contract sources
|
||||||
|
|
||||||
|
- [x] 1.1 Add failing Go omission/bounds tests and fixed absolute/scroll vectors.
|
||||||
|
- [x] 1.2 Add the bounded display schema, optional generated references, and feature registrations.
|
||||||
|
- [x] 1.3 Extend the VGI frame grammar and Python/Go/Rust/Swift classifiers without changing existing kinds.
|
||||||
|
|
||||||
|
## 2. Deterministic verification
|
||||||
|
|
||||||
|
- [x] 2.1 Regenerate Go/Rust/Swift bindings and pass focused Go, frame, source, binding, and strict-contract checks.
|
||||||
|
- [x] 2.2 Run the complete Protocol verifier with isolated compiler caches.
|
||||||
|
- [x] 2.3 Regenerate a second time, confirm zero drift, and inspect the exact source/generated diff.
|
||||||
|
|
||||||
|
## 3. Freeze
|
||||||
|
|
||||||
|
- [x] 3.1 Commit the verified source and generated bindings as one unsigned capability-sized change.
|
||||||
|
- [x] 3.2 Verify the next Phase 3D Protocol RC name is unused locally and remotely, then create one local immutable candidate tag without publishing it.
|
||||||
|
- [x] 3.3 Reconcile and archive this OpenSpec change after the immutable candidate is frozen.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
schema: spec-driven
|
||||||
|
created: 2026-08-12
|
||||||
|
goal: Split client-facing session authority from the provider-bearing
|
||||||
|
Server-to-gateway authority for the coordinated RC4 hard cut.
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
## Context
|
||||||
|
|
||||||
|
RC3 uses one provider-bearing `SessionAuthority` for both the authenticated Server-to-gateway control plane and the gateway-to-client acknowledgement. Provider profile and identity are valid inputs to gateway provider work and release, but they are forbidden at the client boundary. Existing strict RC3 clients require those fields, so changing the client shape is intentionally incompatible.
|
||||||
|
|
||||||
|
## Goals / Non-Goals
|
||||||
|
|
||||||
|
**Goals:**
|
||||||
|
|
||||||
|
- Make provider disclosure structurally impossible in the client-facing authority type.
|
||||||
|
- Preserve the provider-bound Server-to-gateway admission, work, release, and cleanup contract.
|
||||||
|
- Produce strict, matching JSON Schema, Protobuf, Go, Rust, and Swift contracts.
|
||||||
|
|
||||||
|
**Non-Goals:**
|
||||||
|
|
||||||
|
- Supporting mixed RC3/RC4 gateway and client pairings.
|
||||||
|
- Changing `SessionAuthority`, `ProviderSessionWork`, `VERSION`, or global compatibility history.
|
||||||
|
- Adding response negotiation, optional provider fields, or permissive decoding.
|
||||||
|
|
||||||
|
## Decisions
|
||||||
|
|
||||||
|
1. Add `ClientSessionAuthority` with exactly `version`, `session_id`, `gateway_id`, `audience`, `reconnect_sequence`, `expires_at`, and `capabilities`. Reusing the common validation bounds keeps the new acknowledgement session-bound without representing provider data.
|
||||||
|
2. Keep the existing provider-bearing `SessionAuthority` unchanged for Server-to-gateway operations. Deleting its provider fields would broaden the security-sensitive change into Server admission and provider-work validation.
|
||||||
|
3. Treat RC4 as a coordinated hard cut. A dual decoder would still accept the forbidden RC3 shape and is unnecessary for an unreleased candidate.
|
||||||
|
4. Use the existing generator unchanged. The JSON Schema definition is sufficient to generate strict Go, Rust, and Swift types; the matching Protobuf message uses fields 1 through 7.
|
||||||
|
|
||||||
|
## Risks / Trade-offs
|
||||||
|
|
||||||
|
- [RC3 and RC4 clients are not wire-compatible] → Pin and qualify Server, gateway, and client as one exact RC4 set; retain RC3 as an immutable rollback set.
|
||||||
|
- [A future gateway could serialize the wrong authority type] → Consumer gateway tests must capture the raw acknowledgement and require `ClientSessionAuthority` with no provider-bearing keys.
|
||||||
|
- [Strict decoding rejects future additive fields] → Version a future client authority explicitly instead of weakening this v1 decoder.
|
||||||
|
|
||||||
|
## Migration Plan
|
||||||
|
|
||||||
|
1. Publish the verified immutable Protocol RC4 tag.
|
||||||
|
2. Repin Data, Server, and macOS to the exact RC4 commit.
|
||||||
|
3. Change gateway egress and client decoders together, then qualify the exact all-RC4 set.
|
||||||
|
4. Roll back only as the complete immutable RC3 set; do not retag or mix candidates.
|
||||||
|
|
||||||
|
## Open Questions
|
||||||
|
|
||||||
|
None for this pre-release hard cut. Evidence of deployed RC3 coexistence would require a separate negotiated-version design and blocks this migration model.
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
## Why
|
||||||
|
|
||||||
|
The gateway currently serializes the provider-bearing Server-to-gateway `SessionAuthority` to clients, crossing provider identity into a client trust boundary that forbids it. RC4 must make that boundary structural before the pre-release client set is qualified.
|
||||||
|
|
||||||
|
## What Changes
|
||||||
|
|
||||||
|
- Add a strict provider-free `ClientSessionAuthority` with the seven session, gateway, audience, reconnect, expiry, and capability fields shared with `SessionAuthority`.
|
||||||
|
- Keep `SessionAuthority` and `ProviderSessionWork` unchanged for the authenticated Server-to-gateway control plane.
|
||||||
|
- **BREAKING** Replace the gateway-to-client RC3 response shape with `ClientSessionAuthority` as a coordinated RC4 hard cut; no mixed RC3/RC4 compatibility is claimed.
|
||||||
|
|
||||||
|
## Capabilities
|
||||||
|
|
||||||
|
### New Capabilities
|
||||||
|
|
||||||
|
- `gateway-transport-and-admission`: Defines the distinct client-facing authority and its provider-free gateway admission boundary.
|
||||||
|
|
||||||
|
### Modified Capabilities
|
||||||
|
|
||||||
|
None.
|
||||||
|
|
||||||
|
## Impact
|
||||||
|
|
||||||
|
Protocol JSON Schema, tunnel Protobuf, generated Go/Rust/Swift bindings, and consumer Protocol pins advance together to `v1.0.0-phase3d-macos-rc.4`. `VERSION`, global compatibility history, and the Server-to-gateway provider authority remain unchanged.
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
## ADDED Requirements
|
||||||
|
|
||||||
|
### Requirement: Client-facing authority is provider-free
|
||||||
|
The gateway-to-client acknowledgement SHALL use `ClientSessionAuthority` version `"1"` containing exactly `version`, `session_id`, `gateway_id`, `audience`, `reconnect_sequence`, `expires_at`, and `capabilities`. The contract SHALL reject missing required fields, unknown fields including provider identities and routes, invalid or noncanonical expiry timestamps, and trailing JSON values.
|
||||||
|
|
||||||
|
#### Scenario: Gateway acknowledges an admitted client
|
||||||
|
- **WHEN** provider work succeeds and gateway and client capabilities intersect
|
||||||
|
- **THEN** the gateway returns a valid `ClientSessionAuthority` containing the selected capabilities and no provider-bearing field
|
||||||
|
|
||||||
|
#### Scenario: Client receives provider-bearing authority
|
||||||
|
- **WHEN** a client authority payload contains `provider_profile`, `provider_identity`, a provider route, or any unknown key
|
||||||
|
- **THEN** the strict client authority decoder rejects the payload
|
||||||
|
|
||||||
|
#### Scenario: Client receives incomplete or malformed authority
|
||||||
|
- **WHEN** a client authority omits any required binding, has an invalid expiry, or is followed by another JSON value
|
||||||
|
- **THEN** the strict client authority decoder rejects the payload
|
||||||
|
|
||||||
|
### Requirement: Server-to-gateway authority remains provider-bound
|
||||||
|
The authenticated Server-to-gateway control plane SHALL continue to use the existing provider-bearing `SessionAuthority` for admission, provider work, release, and cleanup. `SessionAuthority` and `ProviderSessionWork` fields and semantics MUST remain unchanged by this change.
|
||||||
|
|
||||||
|
#### Scenario: Gateway performs provider work
|
||||||
|
- **WHEN** the Server admits a gateway session and the gateway requests provider work
|
||||||
|
- **THEN** the original provider-bearing `SessionAuthority` continues to bind provider work and subsequent release or cleanup
|
||||||
|
|
||||||
|
### Requirement: RC4 is a coordinated hard cut
|
||||||
|
The RC4 gateway and client SHALL use `ClientSessionAuthority`; mixed RC3/RC4 gateway-client compatibility SHALL NOT be claimed. RC4 SHALL NOT add optional provider fields, a dual decoder, or response negotiation for RC3.
|
||||||
|
|
||||||
|
#### Scenario: RC4 candidate is qualified
|
||||||
|
- **WHEN** the Protocol RC4 tag is pinned by Server, gateway, and client
|
||||||
|
- **THEN** qualification uses only that exact coordinated set
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
## 1. Contract and regressions
|
||||||
|
|
||||||
|
- [x] 1.1 Add RED-first Go, Swift, Rust, and Protobuf regressions for the strict provider-free authority.
|
||||||
|
- [x] 1.2 Add the exact seven-field JSON Schema and Protobuf `ClientSessionAuthority` without changing existing authority contracts.
|
||||||
|
- [x] 1.3 Regenerate Go, Rust, Swift, Protobuf, and manifest outputs using repository tooling.
|
||||||
|
|
||||||
|
## 2. Verification
|
||||||
|
|
||||||
|
- [x] 2.1 Pass focused Go and generated-contract regressions.
|
||||||
|
- [x] 2.2 Pass strict OpenSpec validation, full `make verify`, second-generation cleanliness, and diff checks.
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# gateway-heartbeat-telemetry Specification
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
Define the bounded, low-cardinality gateway observations carried by authenticated heartbeats and their canonical units and exclusions.
|
||||||
|
## Requirements
|
||||||
|
### Requirement: Heartbeat carries observed gateway telemetry
|
||||||
|
Every authenticated `GatewayHeartbeat` SHALL carry the bounded process-level counters, delay totals and samples, control RTT/loss/jitter, pending reliable work, reconnect count, and provider state defined by `GatewayTelemetry`.
|
||||||
|
|
||||||
|
#### Scenario: Valid telemetry heartbeat
|
||||||
|
- **WHEN** a gateway reports its current observed snapshot
|
||||||
|
- **THEN** Go, Rust, and Swift bindings accept the same bounded low-cardinality values and units
|
||||||
|
|
||||||
|
### Requirement: Heartbeat telemetry excludes sensitive dimensions
|
||||||
|
Heartbeat telemetry MUST reject unknown fields and MUST NOT include session, route, endpoint, credential, label, or payload values.
|
||||||
|
|
||||||
|
#### Scenario: Secret or high-cardinality field is attempted
|
||||||
|
- **WHEN** a heartbeat contains an unregistered session, route, endpoint, credential, or payload field
|
||||||
|
- **THEN** strict contract validation rejects it before authenticated transport
|
||||||
|
|
||||||
|
### Requirement: Delay and egress observations have one canonical meaning
|
||||||
|
Queue delay SHALL measure provider-queue residence, processing delay SHALL measure active gateway recovery/framing/QUIC work excluding queue and pacing, and pacing delay SHALL measure scheduler waiting only. Processing samples SHALL count complete provider media units rather than Verse fragments. Measured egress SHALL derive from transmitted-byte deltas over monotonic elapsed time and MUST NOT be copied from configured capacity.
|
||||||
|
|
||||||
|
#### Scenario: One provider unit becomes multiple Verse frames
|
||||||
|
- **WHEN** one complete provider unit waits in the queue, traverses gateway processing, waits for pacing, and fragments into multiple Verse frames
|
||||||
|
- **THEN** each delay total includes only its defined interval and the heartbeat advances processing samples exactly once
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
# gateway-input-feedback Specification
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
Define the provider-neutral typed input, feedback, and text-clipboard envelopes
|
||||||
|
used across the authenticated Verse gateway boundary.
|
||||||
|
## Requirements
|
||||||
|
### Requirement: Typed sequenced input envelope
|
||||||
|
The `input.sequenced.v1` payload SHALL begin with ASCII `VGI1`, a one-byte
|
||||||
|
event kind, and one-byte payload length. It SHALL contain exactly one bounded
|
||||||
|
keyboard, mouse-button, relative-mouse, UTF-8 scalar, controller-state,
|
||||||
|
absolute-mouse, or high-resolution-scroll event. Absolute mouse kind `0x06`
|
||||||
|
SHALL contain big-endian u16 x, y, viewport width, and viewport height, reject
|
||||||
|
zero viewports and coordinates outside the viewport, and require negotiated
|
||||||
|
`input.absolute.v1`. Scroll kind `0x07` SHALL contain big-endian signed i16
|
||||||
|
vertical and horizontal deltas and require negotiated `input.scroll.v1`. False
|
||||||
|
keyboard/mouse state and zeroed controller state are explicit releases.
|
||||||
|
Unknown or unadvertised kinds, length mismatches, malformed UTF-8, unsupported
|
||||||
|
controller indices, and reserved fields SHALL be rejected before provider
|
||||||
|
translation.
|
||||||
|
|
||||||
|
#### Scenario: Keyboard state change
|
||||||
|
- **WHEN** a client sends a valid keyboard press or release envelope
|
||||||
|
- **THEN** the gateway forwards the corresponding typed provider input on its
|
||||||
|
reliable keyboard channel and records the pressed state for cleanup.
|
||||||
|
|
||||||
|
#### Scenario: Absolute pointer and scroll
|
||||||
|
- **WHEN** an advertised client sends an in-viewport absolute coordinate or
|
||||||
|
signed scroll delta with the exact body length
|
||||||
|
- **THEN** the gateway accepts the provider-neutral event without adding it to
|
||||||
|
pressed-state cleanup.
|
||||||
|
|
||||||
|
#### Scenario: Invalid input envelope
|
||||||
|
- **WHEN** a client sends an unknown or unadvertised kind, invalid length,
|
||||||
|
malformed UTF-8 scalar, zero viewport, out-of-range coordinate, or nonzero
|
||||||
|
reserved field
|
||||||
|
- **THEN** the gateway rejects it without sending provider input or changing
|
||||||
|
pressed state.
|
||||||
|
|
||||||
|
### Requirement: Explicit input release
|
||||||
|
The typed input envelope SHALL represent release of each keyboard key,
|
||||||
|
mouse button, and controller state. Gateway cleanup SHALL send a typed release
|
||||||
|
for every accepted pressed state before provider disconnect; it SHALL NOT use
|
||||||
|
an implementation-specific release-all provider command.
|
||||||
|
|
||||||
|
#### Scenario: Tunnel cleanup with pressed input
|
||||||
|
- **WHEN** a tunnel closes after accepted pressed keyboard, mouse, or
|
||||||
|
controller input
|
||||||
|
- **THEN** the gateway emits the corresponding individual provider release
|
||||||
|
packets reliably before starting provider disconnect.
|
||||||
|
|
||||||
|
### Requirement: Bounded provider feedback control envelope
|
||||||
|
The registered bidirectional reliable `control.ack.v1` flow SHALL define an ASCII `VGF1` envelope
|
||||||
|
with a direction byte, type byte, big-endian payload length, and exact payload
|
||||||
|
bytes. Only host termination, rumble, and HDR feedback SHALL be valid from the
|
||||||
|
gateway to the client. Only IDR, FEC/loss feedback, and client-direction type
|
||||||
|
`0x03` with an empty payload as terminal receipt SHALL be valid from the client
|
||||||
|
to the gateway. The fixed conformance corpus and every generated or native
|
||||||
|
Protocol validator SHALL accept that exact receipt and reject unknown types,
|
||||||
|
wrong direction, nonempty receipt bodies, truncation, and length mismatch. The
|
||||||
|
terminal receipt SHALL be valid only while the same session awaits receipt of
|
||||||
|
its one terminal event and MUST NOT be forwarded to the provider. The envelope
|
||||||
|
SHALL contain no provider address, certificate, credential, or opaque provider
|
||||||
|
packet.
|
||||||
|
|
||||||
|
#### Scenario: Host termination forwarding
|
||||||
|
- **WHEN** the Apollo adapter receives an authenticated host termination packet
|
||||||
|
- **THEN** the gateway forwards a bounded `VGF1` termination envelope over reliable Verse control and reports the provider state separately
|
||||||
|
|
||||||
|
#### Scenario: Terminal event receipt
|
||||||
|
- **WHEN** a client receives the reliable typed terminal event
|
||||||
|
- **THEN** it sends the fixed empty client-direction type `0x03` receipt and the gateway owns bounded tunnel closure without forwarding the receipt to the provider
|
||||||
|
|
||||||
|
#### Scenario: Unauthorized or malformed feedback
|
||||||
|
- **WHEN** feedback is disabled by policy, has an invalid direction/type/length, contains a forbidden provider field, or sends a terminal receipt outside the awaiting-terminal state
|
||||||
|
- **THEN** the gateway rejects it without forwarding or provider mutation
|
||||||
|
|
||||||
|
### Requirement: Policy-bound text clipboard envelope
|
||||||
|
The reliable `clipboard.text.v1` flow SHALL carry only a typed UTF-8 text
|
||||||
|
envelope with exact direction and a 16--128 character canonical unpadded ASCII
|
||||||
|
base64url loop token. The Server SHALL mint
|
||||||
|
the enabled directions, maximum text bytes, and maximum updates per minute in
|
||||||
|
authenticated provider work. The gateway SHALL reject disabled direction,
|
||||||
|
unknown fields, files, file URLs, client folders, binary data, malformed UTF-8,
|
||||||
|
oversized values, rates above policy, and reflected/replayed loop tokens. It
|
||||||
|
SHALL not put clipboard content, provider routes, or credentials in telemetry,
|
||||||
|
audit, state, or errors.
|
||||||
|
|
||||||
|
#### Scenario: Clipboard audit metadata
|
||||||
|
- **WHEN** the gateway successfully delivers, suppresses, or rejects a clipboard update
|
||||||
|
- **THEN** it sends an authenticated Server audit record with only direction,
|
||||||
|
bounded byte count, outcome, and a fixed reason; it never includes text or
|
||||||
|
the loop token.
|
||||||
|
|
||||||
|
#### Scenario: Clipboard delivery failure
|
||||||
|
- **WHEN** provider-to-client control delivery fails
|
||||||
|
- **THEN** the gateway does not report the update as forwarded.
|
||||||
|
|
||||||
|
#### Scenario: Reflected clipboard value
|
||||||
|
- **WHEN** a client-originated text value returns from the provider with the
|
||||||
|
matching retained token/value pair
|
||||||
|
- **THEN** the gateway suppresses the reflected update without a second
|
||||||
|
provider mutation or client delivery.
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
# gateway-media-framing Specification
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
Define the versioned datagram framing, bounded reassembly, and explicit negotiation required to carry complete encoded media units.
|
||||||
|
## Requirements
|
||||||
|
### Requirement: Versioned complete encoded-frame datagrams
|
||||||
|
The Protocol SHALL register `datagram-v2` with a 23-byte network-order header containing magic, version, channel, flags, sequence, timestamp, unsigned 16-bit fragment index, unsigned 16-bit fragment count, and unsigned 16-bit payload length. Media datagrams MUST remain at most 1,200 bytes with at most 1,177 payload bytes, and one sequence MUST represent exactly one complete encoded unit of at most 1,048,576 bytes and 891 fragments.
|
||||||
|
|
||||||
|
#### Scenario: Bounded large encoded frame
|
||||||
|
- **WHEN** an encoded media frame is larger than the datagram-v1 18,864-byte limit but no larger than 1,048,576 bytes
|
||||||
|
- **THEN** datagram-v2 carries it under one sequence in at most 891 independently bounded fragments
|
||||||
|
|
||||||
|
#### Scenario: Oversized encoded frame
|
||||||
|
- **WHEN** a sender attempts more than 1,048,576 complete bytes or 891 fragments
|
||||||
|
- **THEN** framing rejects the unit before sending or allocating proportional state
|
||||||
|
|
||||||
|
### Requirement: Bounded complete-frame reassembly
|
||||||
|
Datagram-v2 reassembly SHALL retain at most four incomplete media units and only the bytes actually received, permit bounded fragment reorder and exact duplicate fragments, reject conflicting duplicates or inconsistent metadata, expire incomplete state after 250 milliseconds, and emit a payload only after every fragment is present exactly once.
|
||||||
|
|
||||||
|
#### Scenario: Reordered frame completes
|
||||||
|
- **WHEN** every valid fragment for one unit arrives out of order within the reassembly bounds
|
||||||
|
- **THEN** the receiver emits exactly one byte-identical complete encoded frame with its original boundary
|
||||||
|
|
||||||
|
#### Scenario: Malformed or stale reassembly
|
||||||
|
- **WHEN** fragments conflict, metadata changes, an index or count is invalid, state exceeds four incomplete units, or a unit exceeds its timeout
|
||||||
|
- **THEN** the receiver rejects or evicts that incomplete unit without proportional allocation or payload emission
|
||||||
|
|
||||||
|
### Requirement: Explicit framing negotiation
|
||||||
|
`CapabilityProfile.framing` SHALL accept only registered `datagram-v1` or `datagram-v2` values. A peer MUST use datagram-v2 only after exact capability intersection and MUST NOT reinterpret datagram-v1 bytes as datagram-v2.
|
||||||
|
|
||||||
|
#### Scenario: Independent datagram-v2 peers overlap
|
||||||
|
- **WHEN** both peers advertise the registered datagram-v2 framing profile
|
||||||
|
- **THEN** generated Go, Rust, and Swift validation and fixed conformance accept the profile
|
||||||
|
|
||||||
|
#### Scenario: Unknown or downgraded framing
|
||||||
|
- **WHEN** a peer advertises an unknown framing value or the peers advertise different versions
|
||||||
|
- **THEN** capability validation or intersection rejects the session before media forwarding
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
# native-session-tunnel-credentials Specification
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
Define server-owned native session identity and short-lived tunnel credential disclosure without accepting client-owned policy.
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
### Requirement: Client-owned allocation policy is removed by a coordinated wire-version cutover
|
||||||
|
Control wire version `2` SHALL be current, wire version `1` SHALL be n-1, wire version `0` SHALL be n-2, and `control.v2` SHALL identify the current control feature. The wire-version-2 `SessionRequest` MUST reject `policy_snapshot`; `BrokerSession` SHALL retain the Server-owned policy snapshot disclosure. This removal is intentionally incompatible with the wire-version-1 request shape and SHALL require coordinated Protocol, Server, Data Plane, and client pin updates. Declaring wire version `1` as n-1 does not permit a wire-version-1 request body to be decoded as wire version `2`.
|
||||||
|
|
||||||
|
#### Scenario: Client attempts to supply policy
|
||||||
|
- **WHEN** a session request contains `policy_snapshot`
|
||||||
|
- **THEN** strict Protocol decoding rejects the unknown field
|
||||||
|
|
||||||
|
#### Scenario: A legacy client presents a wire-version-1 request shape
|
||||||
|
- **WHEN** a client uses the removed client-owned policy field or does not negotiate `control.v2`
|
||||||
|
- **THEN** the wire-version-2 broker request path rejects the request instead of silently interpreting it as compatible
|
||||||
|
|
||||||
|
### Requirement: Authentication response shapes are route-specific
|
||||||
|
Browser login and browser session responses SHALL use `BrowserAuthenticatedSession`, which forbids `native_identity`. Native bearer session responses SHALL use `NativeAuthenticatedSession`, which requires a `NativeSessionIdentity` containing both `client_device_id` and `device_key_id`. Both response types SHALL require every `roles` item to contain 1 through 64 UTF-8 bytes.
|
||||||
|
|
||||||
|
#### Scenario: Native identity is incomplete
|
||||||
|
- **WHEN** a native session response omits either identity field
|
||||||
|
- **THEN** strict Protocol decoding rejects the nested object
|
||||||
|
|
||||||
|
#### Scenario: Browser response leaks native identity
|
||||||
|
- **WHEN** a browser login or browser session response contains `native_identity`
|
||||||
|
- **THEN** strict Protocol decoding rejects the response
|
||||||
|
|
||||||
|
#### Scenario: Authentication response has a malformed role
|
||||||
|
- **WHEN** any `roles` item is empty or exceeds 64 UTF-8 bytes
|
||||||
|
- **THEN** every generated binding rejects the response
|
||||||
|
|
||||||
|
### Requirement: Native tunnel credentials are non-cacheable
|
||||||
|
`POST /api/v1/auth/tunnel-credentials` SHALL accept only native bearer authentication, no request body, and return a bounded `NativeTunnelCredential` with `Cache-Control: no-store`. `NativeTunnelCredential.expires_at` SHALL be canonical RFC 3339 UTC in every generated binding: an uppercase `T`, a `Z` suffix, and either no fractional seconds or a 1-through-9-digit non-zero-terminated fractional component.
|
||||||
|
|
||||||
|
#### Scenario: Native client requests tunnel credentials
|
||||||
|
- **WHEN** an authenticated native client calls the endpoint
|
||||||
|
- **THEN** the response identifies the client device and key, supplies certificate and trust PEM, gives an expiry, and cannot be stored
|
||||||
|
|
||||||
|
#### Scenario: Native tunnel credential uses a noncanonical expiry
|
||||||
|
- **WHEN** `expires_at` uses a numeric offset or a noncanonical fractional representation
|
||||||
|
- **THEN** every generated binding rejects the credential
|
||||||
|
|
||||||
|
### Requirement: Swift bindings support the macOS client deployment floor
|
||||||
|
The generated Swift package SHALL declare macOS 14 as its minimum supported macOS platform.
|
||||||
|
|
||||||
|
#### Scenario: Native client consumes the Swift package
|
||||||
|
- **WHEN** the package manifest is resolved for the Phase 3D macOS client
|
||||||
|
- **THEN** its platform declaration permits macOS 14 and later
|
||||||
|
|
||||||
|
### Requirement: Manifest public identity is the TLS server name
|
||||||
|
`ConnectionManifest.gateway.public_identity` SHALL be the exact TLS server name and SHALL remain distinct from dial addresses, gateway UUIDs, certificate fingerprints, and provider identities.
|
||||||
|
|
||||||
|
#### Scenario: Client connects to a gateway address
|
||||||
|
- **WHEN** a client dials any advertised gateway address
|
||||||
|
- **THEN** it verifies TLS against `gateway.public_identity`
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
# provider-stream-policy Specification
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
Define immutable provider stream-policy fields and the registered ordered decode-profile intersection shared by all generated bindings.
|
||||||
|
## Requirements
|
||||||
|
### Requirement: Provider work carries the effective stream policy
|
||||||
|
Authenticated `ProviderSessionWork` SHALL carry the immutable policy version and its effective resolution, frame rate, codec, target bitrate, and audio-enabled decision.
|
||||||
|
|
||||||
|
#### Scenario: Gateway receives an effective policy
|
||||||
|
- **WHEN** the Server issues provider work for an admitted session
|
||||||
|
- **THEN** the work identifies the policy version and includes the effective bounded stream-policy values
|
||||||
|
|
||||||
|
### Requirement: Stream-policy bindings share one strict contract
|
||||||
|
Generated Go, Rust, and Swift bindings MUST reject missing, unknown, out-of-range, or unsupported stream-policy wire values according to the canonical schema.
|
||||||
|
|
||||||
|
#### Scenario: Invalid policy is rejected consistently
|
||||||
|
- **WHEN** provider work contains an unknown codec or a value outside the canonical bounds
|
||||||
|
- **THEN** every generated binding rejects the work before it can reach provider setup
|
||||||
|
|
||||||
|
### Requirement: Decode capabilities use registered ordered profiles
|
||||||
|
`CapabilityProfile.client_decode` SHALL be a non-empty ordered unique set containing only registered `h264-opus` and `hevc-opus` profile identifiers. It MUST NOT encode multiple capabilities in an opaque private token.
|
||||||
|
|
||||||
|
#### Scenario: Independent peer advertises one registered profile
|
||||||
|
- **WHEN** an independent peer advertises one registered decode profile
|
||||||
|
- **THEN** canonical validation accepts that profile without requiring a combined private token
|
||||||
|
|
||||||
|
### Requirement: Consumers share one ordered registered-profile intersection
|
||||||
|
Generated Protocol behavior SHALL select common registered profiles in the first peer's preference order. Provider consumers SHALL separately reject the resulting intersection when it cannot honor the immutable stream policy.
|
||||||
|
|
||||||
|
#### Scenario: Policy-compatible profile overlaps
|
||||||
|
- **WHEN** the gateway advertises HEVC then H.264 and the client advertises only H.264
|
||||||
|
- **THEN** the shared intersection selects `h264-opus`
|
||||||
|
|
||||||
|
#### Scenario: No policy-compatible profile overlaps
|
||||||
|
- **WHEN** peers have no registered common profile
|
||||||
|
- **THEN** the shared intersection rejects admission without inventing a private combined token
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
# session-display-mode Specification
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
TBD - created by archiving change phase-3d-client-display-input. Update Purpose after archive.
|
||||||
|
## Requirements
|
||||||
|
### Requirement: Bounded display mode contract
|
||||||
|
The Protocol SHALL define `DisplayMode` with required integer
|
||||||
|
`resolution_width` from 320 through 16384, `resolution_height` from 200 through
|
||||||
|
8640, and `fps` from 1 through 240, rejecting missing, unknown, or out-of-range
|
||||||
|
fields.
|
||||||
|
|
||||||
|
#### Scenario: Valid display mode
|
||||||
|
- **WHEN** a client encodes a 2560 by 1440 display mode at 120 FPS
|
||||||
|
- **THEN** generated Go, Rust, and Swift bindings accept the same exact values.
|
||||||
|
|
||||||
|
#### Scenario: Invalid display mode
|
||||||
|
- **WHEN** any dimension or FPS is outside its bound or an unknown field exists
|
||||||
|
- **THEN** strict Protocol validation rejects the object.
|
||||||
|
|
||||||
|
### Requirement: Feature-gated optional display disclosure
|
||||||
|
`SessionRequest.requested_display_mode`,
|
||||||
|
`BrokerSession.requested_display_mode`,
|
||||||
|
`BrokerSession.effective_display_mode`, and `ManifestProfile.display_mode`
|
||||||
|
SHALL be optional references to `DisplayMode`. Go bindings SHALL use pointers
|
||||||
|
with JSON omission and Rust/Swift bindings SHALL use optionals. A client MUST
|
||||||
|
send the request only after `display.request.v1` negotiation, and a
|
||||||
|
display-aware manifest MUST contain the accepted mode. Legacy requests SHALL
|
||||||
|
produce legacy response shapes without these fields.
|
||||||
|
|
||||||
|
#### Scenario: Legacy request remains unchanged
|
||||||
|
- **WHEN** a client omits `requested_display_mode`
|
||||||
|
- **THEN** encoding omits the field and compatible Server responses omit all
|
||||||
|
display-mode fields.
|
||||||
|
|
||||||
|
#### Scenario: Display-aware request discloses acceptance
|
||||||
|
- **WHEN** a negotiated client sends a valid requested mode
|
||||||
|
- **THEN** session responses preserve the requested mode and the allocated
|
||||||
|
manifest includes the Server-accepted mode.
|
||||||
@@ -32,3 +32,10 @@ message ClipboardText {
|
|||||||
string text = 1;
|
string text = 1;
|
||||||
string encoding = 2;
|
string encoding = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message GatewayClipboardText {
|
||||||
|
string direction = 1;
|
||||||
|
string text = 2;
|
||||||
|
string encoding = 3;
|
||||||
|
string loop_token = 4;
|
||||||
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user