Skip to content

Commit ce737dd

Browse files
committed
Re-vendor the contract and say the Player reloads once.
screen reload no longer mentions a reload grant. The vendored OpenAPI includes the current reload description and the runtime screen-label route.
1 parent e3a3feb commit ce737dd

9 files changed

Lines changed: 94 additions & 37 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ screenrig screen unarchive scr_LOBBY
212212
`screen reload` asks a screen's player to reload once and returns a
213213
`reload_id` and `expires_at` ten minutes later. A web player reloads at its
214214
next page boundary; a native player reconnects, refetches its manifest, and
215-
checks for an update. Only a player that registered reload support acts on it,
216-
and a player ignores a reload within ten minutes of the last one it acted on.
215+
checks for an update. The Player reloads once, and ignores a reload within
216+
ten minutes of the last one it acted on.
217217
It works on active and archived screens and does not change the screen
218218
revision; a screen still waiting to pair answers `resource_conflict`.
219219

‎assets/playlist-write-v2.schema.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$comment": "Generated by screenrig-protocol-gen from api/openapi.yaml; sha256=e23482fb68e67eced6ea15f19b6c55f595349e0687535dc991e953708ab12631. Shape validation for the adslot page union. Run canonical playlist-write-semantics.ts next. At most 16 adslot pages and one ordinary page with no visibility remain server checks.",
2+
"$comment": "Generated by screenrig-protocol-gen from api/openapi.yaml; sha256=0fc1acc2d940c07e1d80d1edd24ca0316d574a33c321d1151bc8e06d1be938ca. Shape validation for the adslot page union. Run canonical playlist-write-semantics.ts next. At most 16 adslot pages and one ordinary page with no visibility remain server checks.",
33
"$defs": {
44
"AdslotPageWrite": {
55
"additionalProperties": false,

‎assets/playlist-write.schema.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$comment": "Generated by screenrig-protocol-gen from api/openapi.yaml; sha256=e23482fb68e67eced6ea15f19b6c55f595349e0687535dc991e953708ab12631. Shape validation only; run canonical playlist-write-semantics.ts next. Reference resolution and DNS remain server checks.",
2+
"$comment": "Generated by screenrig-protocol-gen from api/openapi.yaml; sha256=0fc1acc2d940c07e1d80d1edd24ca0316d574a33c321d1151bc8e06d1be938ca. Shape validation only; run canonical playlist-write-semantics.ts next. Reference resolution and DNS remain server checks.",
33
"$defs": {
44
"CanvasBackground": {
55
"description": "Solid canonical uppercase #RRGGBBAA, or a top-to-bottom linear gradient.",

‎src/cli-commands/guidance.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export function registerGuidance(root: Command): void {
128128
"screen show": "An archived screen shows archive_reason and archived_at when the server reports them: account (an account or dashboard archive), device_reset (the player was reset on the display), or device_unpair (a paired browser unpaired itself). Every archive keeps the display's binding, so screen unarchive re-admits the same key and a display that still holds it resumes with no re-pairing. A display reset on the device may start pairing with a new key; that pairing can appear here as recovery_pending, and screen recover moves this screen to the new key (the screen stays archived until screen unarchive). applications_unsupported means the paired player cannot show application or iframe primitives; its manifest is unchanged and the player skips them.",
129129
"screen archive": "Archiving removes the screen from the default list, releases its screen quota, and darkens the display, but keeps the display's binding: the player stays connected, never re-pairs, and resumes on screen unarchive. Whoever holds the display's key can still connect while it is archived. To retire hardware for good, leave the screen archived or move the screen to new hardware with screen recover, which retires the old key.",
130130
"screen unarchive": "Restores a screen archived for any reason, including one archived because its player was reset on the display (device_reset) or a paired browser unpaired itself (device_unpair). It re-admits the same display key, so a display that still holds it resumes with no re-pairing; the screen must still fit the account's screen quota. A key retired by a confirmed screen recover stays retired.",
131-
"screen reload": "Sends the screen's player one reload request, valid for ten minutes, and returns its reload_id and expires_at. A web player reloads at its next page boundary; a native player reconnects, refetches its manifest, and checks for an update. Only a player that registered reload support acts on it, and a player ignores a reload within ten minutes of the last one it acted on. Works on active and archived screens; a screen still waiting to pair answers resource_conflict. The screen revision does not change. Repeat with the same --idempotency-key to get the original reload_id back instead of sending another.",
131+
"screen reload": "Sends the screen's player one reload request, valid for ten minutes, and returns its reload_id and expires_at. A web player reloads at its next page boundary; a native player reconnects, refetches its manifest, and checks for an update. A player ignores a reload within ten minutes of the last one it acted on. Works on active and archived screens; a screen still waiting to pair answers resource_conflict. The screen revision does not change. Repeat with the same --idempotency-key to get the original reload_id back instead of sending another.",
132132
"screen screenshot": "Requests, waits for, and downloads a screenshot. Default wait is 35000 ms and polling interval is 500 ms. Stdout reports the saved path, never image bytes. Inspect the downloaded image to assess playback.",
133133
"kv get": "Returns bytes as data.value_base64, including JSON values. Decode base64 and parse JSON only when data.content_type indicates JSON. kv list omits values.",
134134
"kv set": "--json-value encodes JSON directly. --file reads a local file or stdin with -; --value-base64 accepts canonical padded base64, including empty bytes. Byte modes default to application/octet-stream; --content-type overrides it. JSON mode also accepts an explicit application/json. Omit --expect-rev to create or overwrite; supply it to reject concurrent changes.",

‎src/cli.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5783,7 +5783,7 @@ test("screen reload posts the reload route with an idempotency key and returns r
57835783
assert.equal(guarded.code, ExitCode.Success, guarded.stdout);
57845784
assert.equal(reloadCalls().at(-1)?.headers?.["if-match"], `"${archivedScreen.revision}"`);
57855785
assert.match(guarded.stdout, /^Reload accepted\nscreen_id: scr_PAIRINGAAAAAAAAAAAAAAAA\nreload_id: \S+\nexpires_at: 2026-08-14T17:10:00\.000Z\n/);
5786-
assert.match(guarded.stdout, /granted reload-v1/);
5786+
assert.match(guarded.stdout, /The Player reloads once/);
57875787

57885788
const stale = await withRuntime(
57895789
["--json", "screen", "reload", "scr_PAIRINGAAAAAAAAAAAAAAAA", "--expect-rev", String(archivedScreen.revision - 1)],

‎src/commands.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4310,7 +4310,7 @@ export const handleScreenReload = commandHandler(async (args, runtime, resolved)
43104310
["reload_id", accepted.reload_id],
43114311
["expires_at", accepted.expires_at],
43124312
]),
4313-
"A Player granted reload-v1 reloads once; a Player without the grant, or one that reloaded in the last ten minutes, ignores it.",
4313+
"The Player reloads once; a Player that reloaded in the last ten minutes ignores it.",
43144314
].join("\n"),
43154315
};
43164316
}, true);

‎vendor/manifest.json‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
"path": "assets/playlist-write.schema.json",
1313
"source": "packages/protocol/schema/playlist-write.schema.json",
1414
"bytes": 25438,
15-
"sha256": "913551056ef0e0123814e84571efc87c98a9cb804f84354cc1842bb68c7d6227"
15+
"sha256": "bff02c544c8840d2baff25dfd57a89c628f64037e4d9861088498504a6106f6e"
1616
},
1717
{
1818
"path": "assets/playlist-write-v2.schema.json",
1919
"source": "packages/protocol/schema/playlist-write-v2.schema.json",
2020
"bytes": 26480,
21-
"sha256": "e75b142235ee0782fabd3af709faff1a69766838d5b3f9d1a292f0eac309391e"
21+
"sha256": "d6d34d9738db10e371a39c04865967131b44c032475b2f2311f3062139216657"
2222
},
2323
{
2424
"path": "src/generated/playlist-write-semantics.ts",
@@ -29,14 +29,14 @@
2929
{
3030
"path": "vendor/protocol/openapi.gen.ts",
3131
"source": "packages/protocol/src/openapi.gen.ts",
32-
"bytes": 72814,
33-
"sha256": "31dcb5275264b3d39a02d838f936efd79b7543c72602b4de0e9a561cb99ecbef"
32+
"bytes": 73078,
33+
"sha256": "1317cef5e245f4b76aa50f86fa9faa5caeb75ed0a6cec2547b478864522b81b7"
3434
},
3535
{
3636
"path": "vendor/openapi.yaml",
3737
"source": "api/openapi.yaml",
38-
"bytes": 474702,
39-
"sha256": "e23482fb68e67eced6ea15f19b6c55f595349e0687535dc991e953708ab12631"
38+
"bytes": 476356,
39+
"sha256": "0fc1acc2d940c07e1d80d1edd24ca0316d574a33c321d1151bc8e06d1be938ca"
4040
},
4141
{
4242
"path": "assets/screenrig.runtime.js",

0 commit comments

Comments
 (0)