Skip to content

Commit ced9470

Browse files
gershamclaude
andcommitted
Skill: playlist init output guard, verify release_ids/media_ids, application hold
The skill and references now tell the operating agent that playlist init refuses a non-empty existing --output with exit 2 / usage_error and leaves it untouched (new path or --overwrite), to check that init exited 0 and that data.release_ids and data.media_ids match the intended inputs before screen publish, and that application pages hold 24 hours by default with an application_page_short warning under 60 seconds. Docs-only regeneration (build-plugin.py --docs-only); the bundled CLI and provenance are unchanged. Budget (validate-plugin.py --budget): repository 110 files, 3,255,053 bytes -> 110 files, 3,257,719 bytes; plugins/screenrig 52 files, 2,086,817 bytes -> 52 files, 2,088,150 bytes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 3fb2775 commit ced9470

6 files changed

Lines changed: 50 additions & 22 deletions

File tree

‎plugins/screenrig/skills/screenrig/SKILL.md‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ facts are already supplied, operate without another confirmation question.
6666
3. Read `observation.surfaces[]` for size and orientation; prepare the requested
6767
content ([content path](#signage-branch-choose-the-content-path)).
6868
4. `screenrig playlist init SOURCES... --screen-id SCREEN_ID --name NAME --output playlist.json`,
69-
then `screenrig screen publish SCREEN_ID playlist.json`.
69+
then `screenrig screen publish SCREEN_ID playlist.json`. `playlist init`
70+
refuses a non-empty existing `--output` with exit 2 / `usage_error` and leaves
71+
it untouched: choose a new path or pass `--overwrite`. Before publishing,
72+
check that init exited 0 and that `data.release_ids` and `data.media_ids`
73+
match what you intended.
7074
5. Request `screenrig screen screenshot SCREEN_ID` and inspect that returned
7175
Player image before saying the content is showing. A local preview is a
7276
design check. Ask the user to look at the display too.
@@ -575,8 +579,11 @@ Canvas video stays muted, so the soundtrack is the only sound on the screen.
575579
IDs, pinned application releases, or HTTPS URLs and `--screen-id`. Local files
576580
upload during preparation, several at a time, and it returns once every file
577581
is uploaded and processed. If it is interrupted, rerun the identical command:
578-
finished uploads return their existing media IDs. Follow `data.preview.argv`,
579-
inspect the result, then use `data.publish.argv`. For layouts, read
582+
finished uploads return their existing media IDs. A pinned application page
583+
holds 24 hours by default so an app that rotates internally and keeps state
584+
is not restarted; `--duration-ms` overrides it, and an application page under
585+
60 seconds returns an `application_page_short` warning. Follow
586+
`data.preview.argv`, inspect the result, then use `data.publish.argv`. For layouts, read
580587
[playlists](references/playlists.md).
581588
3. Publish a new playlist with `screen publish SCREEN_ID FILE`. It assigns the
582589
playlist and waits, up to two minutes by default, until the Player shows it.

‎plugins/screenrig/skills/screenrig/references/applications.md‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ name leaves the revision unchanged.
101101

102102
### 2. Write the application primitive
103103

104-
For a timed full-screen application page, pass its `rel_` ID to `playlist init`;
104+
For a full-screen application page, pass its `rel_` ID to `playlist init`;
105105
see [preparation](playlists.md#prepare-publish-and-edit-playlists). That default has
106-
no controller privileges. For application-controlled advancement, author this
106+
no controller privileges and holds the page for 24 hours. For application-controlled advancement, author this
107107
page fragment instead:
108108

109109
```json
@@ -137,10 +137,12 @@ page fragment instead:
137137
### 3. Choose how the page advances
138138

139139
Use `duration` when the app never signals that it is finished, and omit
140-
`controller` from its primitive:
140+
`controller` from its primitive. An app that rotates internally and keeps state
141+
needs a long hold, since every advance restarts it; `playlist init` writes
142+
`86400000` (24 hours) and warns below 60 seconds:
141143

142144
```json
143-
{ "mode": "duration", "after_ms": 15000 }
145+
{ "mode": "duration", "after_ms": 86400000 }
144146
```
145147

146148
Use `application` when the app calls `window.screenrig.nextPage()`:

‎plugins/screenrig/skills/screenrig/references/playlists.md‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,15 @@ instead of uploading again. There is nothing to reconcile by hand.
134134

135135
Each input becomes one full-screen page with a black background and a 200 ms
136136
crossfade. Images and videos use `--fit contain|cover|fill` (default `contain`).
137-
Videos are muted, do not loop, and advance on completion. Other pages use
137+
Videos are muted, do not loop, and advance on completion. Image and iframe pages use
138138
`--duration-ms` (default 8000). Applications and iframes use `fill`; application
139-
releases are pinned with timed advancement and no controller privileges. Edit the
140-
document for application-controlled advancement. The static preview represents
139+
releases are pinned with timed advancement and no controller privileges, and hold
140+
86400000 ms (24 hours, the longest `after_ms`) unless `--duration-ms` is given, so
141+
an app that rotates internally and keeps state is not restarted by the page timer.
142+
An explicit `--duration-ms` applies to every non-video page, and an application page
143+
under 60 seconds returns an `application_page_short` warning from `playlist init`,
144+
`validate`, `preview` and `screen publish`. Edit the document for
145+
application-controlled advancement. The static preview represents
141146
applications and iframes with placeholders; verify release readiness, embedding,
142147
and actual playback through the server and intended Player.
143148

@@ -149,7 +154,7 @@ Inspect the preview before publishing. Add `--expect-rev` explicitly to guard ag
149154

150155
To override the canvas, supply both `--target-width` and `--target-height`. These
151156
also work without a screen, in which case no publish arguments are returned.
152-
Unknown or multiple reported surfaces require explicit dimensions. Output files are exclusive by default; use `--overwrite` to replace an existing authoring file atomically. An empty file does not count as existing. Parent directories are created automatically. URL and release-ID inputs with explicit dimensions work without login.
157+
Unknown or multiple reported surfaces require explicit dimensions. Output files are exclusive by default: a non-empty existing `--output` fails with `usage_error` (exit 2) and stays untouched, so choose a new path or use `--overwrite` to replace it atomically. An empty file does not count as existing. Confirm init exited 0 and that `data.release_ids` and `data.media_ids` match the intended inputs before `screen publish`. Parent directories are created automatically. URL and release-ID inputs with explicit dimensions work without login.
153158

154159
`screen publish <screen-id> <file>` creates a new playlist, assigns it with an optional **screen** revision guard, reads back the assignment, and waits for the Player to show it. It does not update an
155160
existing playlist by name. Display names may repeat; use the playlist ID for an explicit `playlist update`.

‎skills/screenrig/SKILL.md‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ facts are already supplied, operate without another confirmation question.
6666
3. Read `observation.surfaces[]` for size and orientation; prepare the requested
6767
content ([content path](#signage-branch-choose-the-content-path)).
6868
4. `screenrig playlist init SOURCES... --screen-id SCREEN_ID --name NAME --output playlist.json`,
69-
then `screenrig screen publish SCREEN_ID playlist.json`.
69+
then `screenrig screen publish SCREEN_ID playlist.json`. `playlist init`
70+
refuses a non-empty existing `--output` with exit 2 / `usage_error` and leaves
71+
it untouched: choose a new path or pass `--overwrite`. Before publishing,
72+
check that init exited 0 and that `data.release_ids` and `data.media_ids`
73+
match what you intended.
7074
5. Request `screenrig screen screenshot SCREEN_ID` and inspect that returned
7175
Player image before saying the content is showing. A local preview is a
7276
design check. Ask the user to look at the display too.
@@ -575,8 +579,11 @@ Canvas video stays muted, so the soundtrack is the only sound on the screen.
575579
IDs, pinned application releases, or HTTPS URLs and `--screen-id`. Local files
576580
upload during preparation, several at a time, and it returns once every file
577581
is uploaded and processed. If it is interrupted, rerun the identical command:
578-
finished uploads return their existing media IDs. Follow `data.preview.argv`,
579-
inspect the result, then use `data.publish.argv`. For layouts, read
582+
finished uploads return their existing media IDs. A pinned application page
583+
holds 24 hours by default so an app that rotates internally and keeps state
584+
is not restarted; `--duration-ms` overrides it, and an application page under
585+
60 seconds returns an `application_page_short` warning. Follow
586+
`data.preview.argv`, inspect the result, then use `data.publish.argv`. For layouts, read
580587
[playlists](references/playlists.md).
581588
3. Publish a new playlist with `screen publish SCREEN_ID FILE`. It assigns the
582589
playlist and waits, up to two minutes by default, until the Player shows it.

‎skills/screenrig/references/applications.md‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ name leaves the revision unchanged.
101101

102102
### 2. Write the application primitive
103103

104-
For a timed full-screen application page, pass its `rel_` ID to `playlist init`;
104+
For a full-screen application page, pass its `rel_` ID to `playlist init`;
105105
see [preparation](playlists.md#prepare-publish-and-edit-playlists). That default has
106-
no controller privileges. For application-controlled advancement, author this
106+
no controller privileges and holds the page for 24 hours. For application-controlled advancement, author this
107107
page fragment instead:
108108

109109
```json
@@ -137,10 +137,12 @@ page fragment instead:
137137
### 3. Choose how the page advances
138138

139139
Use `duration` when the app never signals that it is finished, and omit
140-
`controller` from its primitive:
140+
`controller` from its primitive. An app that rotates internally and keeps state
141+
needs a long hold, since every advance restarts it; `playlist init` writes
142+
`86400000` (24 hours) and warns below 60 seconds:
141143

142144
```json
143-
{ "mode": "duration", "after_ms": 15000 }
145+
{ "mode": "duration", "after_ms": 86400000 }
144146
```
145147

146148
Use `application` when the app calls `window.screenrig.nextPage()`:

‎skills/screenrig/references/playlists.md‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,15 @@ instead of uploading again. There is nothing to reconcile by hand.
134134

135135
Each input becomes one full-screen page with a black background and a 200 ms
136136
crossfade. Images and videos use `--fit contain|cover|fill` (default `contain`).
137-
Videos are muted, do not loop, and advance on completion. Other pages use
137+
Videos are muted, do not loop, and advance on completion. Image and iframe pages use
138138
`--duration-ms` (default 8000). Applications and iframes use `fill`; application
139-
releases are pinned with timed advancement and no controller privileges. Edit the
140-
document for application-controlled advancement. The static preview represents
139+
releases are pinned with timed advancement and no controller privileges, and hold
140+
86400000 ms (24 hours, the longest `after_ms`) unless `--duration-ms` is given, so
141+
an app that rotates internally and keeps state is not restarted by the page timer.
142+
An explicit `--duration-ms` applies to every non-video page, and an application page
143+
under 60 seconds returns an `application_page_short` warning from `playlist init`,
144+
`validate`, `preview` and `screen publish`. Edit the document for
145+
application-controlled advancement. The static preview represents
141146
applications and iframes with placeholders; verify release readiness, embedding,
142147
and actual playback through the server and intended Player.
143148

@@ -149,7 +154,7 @@ Inspect the preview before publishing. Add `--expect-rev` explicitly to guard ag
149154

150155
To override the canvas, supply both `--target-width` and `--target-height`. These
151156
also work without a screen, in which case no publish arguments are returned.
152-
Unknown or multiple reported surfaces require explicit dimensions. Output files are exclusive by default; use `--overwrite` to replace an existing authoring file atomically. An empty file does not count as existing. Parent directories are created automatically. URL and release-ID inputs with explicit dimensions work without login.
157+
Unknown or multiple reported surfaces require explicit dimensions. Output files are exclusive by default: a non-empty existing `--output` fails with `usage_error` (exit 2) and stays untouched, so choose a new path or use `--overwrite` to replace it atomically. An empty file does not count as existing. Confirm init exited 0 and that `data.release_ids` and `data.media_ids` match the intended inputs before `screen publish`. Parent directories are created automatically. URL and release-ID inputs with explicit dimensions work without login.
153158

154159
`screen publish <screen-id> <file>` creates a new playlist, assigns it with an optional **screen** revision guard, reads back the assignment, and waits for the Player to show it. It does not update an
155160
existing playlist by name. Display names may repeat; use the playlist ID for an explicit `playlist update`.

0 commit comments

Comments
 (0)