Skip to content

Commit 36f109f

Browse files
committed
feat(skill): guide agents through local previews and card workflows
Bundle CLI bb531a1 with local Chromium card/page previews, expiry flags and guarded screen revert. Explain conditional pages, applied-data/loop receipts, effective timezone, colour overrides and bullet newlines. Repository: 111 files, 3,301,499 to 3,327,790 bytes; plugin: 53 files, 2,118,918 to 2,140,925 bytes; budgets pass.
1 parent b43e25e commit 36f109f

6 files changed

Lines changed: 326 additions & 170 deletions

File tree

‎components.lock.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"state": "resolved",
44
"cli": {
55
"repository": "screenrig/cli",
6-
"commit": "01c9c82c5739b9584b479dab55ceb15b064642ea",
6+
"commit": "bb531a167d8d124e620b87bfffd4c139f2ba54df",
77
"artifact": {
88
"file": "screenrig-cli.tgz",
9-
"sha256": "458511933eb38397f7e41fc980a8abdfdc07e91dfafcbfb3d79232406d555c61"
9+
"sha256": "80b2dd810d07e638b3bef54eb2219c73fdf0b67ea5bc5f3279f1a8c3c0e720d8"
1010
}
1111
}
1212
}

‎plugins/screenrig/cli/dist/bin.js‎

Lines changed: 188 additions & 162 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ facts are already supplied, operate without another confirmation question.
7070
refuses a non-empty existing `--output` with exit 2 / `usage_error` and leaves
7171
it untouched: choose a new path or pass `--overwrite`. Before publishing,
7272
check that init exited 0 and that `data.release_ids` and `data.media_ids`
73-
match what you intended.
73+
match what you intended. Run `screenrig playlist preview playlist.json --output preview --contact-sheet`,
74+
open the contact sheet and inspect the pages before `screen publish`.
7475
5. To check a specific page, run
7576
`screenrig screen play-page SCREEN_ID --page-id PAGE_ID` first. Request
7677
`screenrig screen screenshot SCREEN_ID` and inspect that returned
@@ -566,7 +567,17 @@ Run `cards list --category CATEGORY` (`time`, `public`, `messages`, `media`,
566567
`food`, `weather`) and `cards show ID` to choose a type, read its tier and
567568
layouts, and pick a schema-listed theme. Run `card create --type ID --file
568569
params.json`, put the returned `crd_` ID in a card item on a playlist page, and
569-
set dynamic properties with `card data put crd_ID --file data.json`. A
570+
set dynamic properties with `card data put crd_ID --file data.json`.
571+
Render a card locally with `card preview crd_ID --output card.png`; for an
572+
unpublished design use `card preview TYPE --params params.json --data data.json
573+
--output card.png`. Open and inspect the PNG. Then render the whole playlist
574+
with `playlist preview FILE --output preview --contact-sheet` and inspect the
575+
contact sheet, including cards over their background images. These commands
576+
use installed Chromium or Chrome locally (`SCREENRIG_BROWSER` selects its
577+
executable) and the verified published card renderer. `--now ISO --timezone
578+
ZONE` makes time-dependent designs repeatable. Check `data.placeholders` and
579+
resolve or explicitly account for every item whose pixels were not rendered.
580+
A
570581
`fullscreen` card takes `layout: "full"` only; the other layouts, anchors and
571582
page limits are in [cards and feeds](references/playlists.md#built-in-cards-and-feeds).
572583
For weather, rates and other third-party data use screenRIG's cached feeds,
@@ -597,7 +608,8 @@ Canvas video stays muted, so the soundtrack is the only sound on the screen.
597608
holds 24 hours by default so an app that rotates internally and keeps state
598609
is not restarted; `--duration-ms` overrides it, and an application page under
599610
60 seconds returns an `application_page_short` warning. Follow
600-
`data.preview.argv`, inspect the result, then use `data.publish.argv`. For layouts, read
611+
`data.preview.argv`, open and inspect its local contact sheet, then use `data.publish.argv`.
612+
This applies to card-only playlists as well as media pages. For layouts, read
601613
[playlists](references/playlists.md).
602614
3. Publish a new playlist with `screen publish SCREEN_ID FILE`. It assigns the
603615
playlist and waits, up to two minutes by default, until the Player shows it.

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

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -947,3 +947,56 @@ one-at-a-time or complete-pass playback; a bounded runtime sequence using
947947
`batch_size` with `one_at_a_time: false` requires removing that field or
948948
choosing explicit IDs before export. This prevents silently losing a runtime
949949
batch cursor in a static bundle.
950+
951+
## Local card previews, data conditions and receipts
952+
953+
Use `card preview TYPE --params params.json --data data.json --output card.png`
954+
for one card, or `card preview crd_CARD --output card.png` for a saved instance.
955+
Then run `playlist preview FILE --output preview --contact-sheet` for its full
956+
page context. Open and inspect the image files before publishing. The CLI runs
957+
an installed Chromium or Chrome locally; `SCREENRIG_BROWSER` selects its
958+
executable. It fetches the verified published renderer and fonts and reuses its
959+
cache. `--now 2026-10-20T18:00:00Z --timezone America/Vancouver` freezes card
960+
clocks. `data.rendered_cards` names rendered card versions; `data.placeholders`
961+
names content that was represented by a box. Application interaction and live
962+
streams still need Player verification.
963+
964+
Optional `backgroundColor` and `textColor` card params accept `#RRGGBB` or
965+
`#RRGGBBAA` (CSS alpha order). `backgroundColor: "#382719CC"` makes a translucent
966+
warm scrim; `#E86A17` makes a solid orange ground. `background: "none"` takes
967+
precedence. `textColor` sets main and secondary text, while `accent` continues
968+
to colour eyebrows/highlights. Unset properties preserve the theme. Text-card
969+
bodies keep newlines and put inline bullet separators on separate lines.
970+
971+
`card data put crd_CARD --file data.json --ttl 2h` expires that edition two
972+
hours after acceptance; `--expires-at ISO` supplies an absolute deadline. Use
973+
one option at a time. A replacement without either removes expiry. Expired
974+
data stays inspectable through the agent read but blanks on an updated Player,
975+
including offline caches. Repeating an identical idempotent write preserves
976+
its original deadline.
977+
978+
A page can use `"visibility":{"enabled":true,"data":{"key":"crd_CARD",
979+
"path":"/enabled","equals":true}}`. `key` names card data; `path` is an optional
980+
JSON Pointer. Without `equals`, the document or field must exist (a present
981+
null counts); with it, the scalar must equal the supplied value. Missing and
982+
expired data never match. Keep one ordinary page without visibility as a
983+
permanent fallback. Date/time bounds can be combined with the data condition.
984+
Players advertise `page.conditions`; other Players receive conditional pages
985+
disabled. A screen's `effective_timezone` and `timezone_source` show the
986+
configured zone, device fallback, or unknown. An explicit UTC zone stays UTC.
987+
988+
Watch project events `screen.card_data_applied` for a rendered edition
989+
(`manifest_revision`, `page_id`, `primitive_id`, `data_key`, `data_revision`)
990+
and `screen.playlist_loop_completed` for the first uninterrupted eligible loop
991+
of a manifest. These are Player receipts, separate from write acceptance.
992+
Screenshot-ready events continue to identify completed captures.
993+
994+
Use `screen changes scr_SCREEN` to list up to 50 issued composition changes
995+
retained for 30 days. `screen revert scr_SCREEN --change-id man_CHANGE
996+
--expect-rev REV` restores that change's preceding composition on that screen
997+
by creating a separate playlist. Other screens and source playlists stay as
998+
they are. Live card data stays current, with its expiry. A newer publish,
999+
assignment, takeover, expired history or unavailable dependency refuses the
1000+
revert. Exact retries return the same accepted assignment. Check the returned
1001+
screen's `manifest_upgrade` or its activation event before claiming the Player
1002+
has applied it.

‎skills/screenrig/SKILL.md‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ facts are already supplied, operate without another confirmation question.
7070
refuses a non-empty existing `--output` with exit 2 / `usage_error` and leaves
7171
it untouched: choose a new path or pass `--overwrite`. Before publishing,
7272
check that init exited 0 and that `data.release_ids` and `data.media_ids`
73-
match what you intended.
73+
match what you intended. Run `screenrig playlist preview playlist.json --output preview --contact-sheet`,
74+
open the contact sheet and inspect the pages before `screen publish`.
7475
5. To check a specific page, run
7576
`screenrig screen play-page SCREEN_ID --page-id PAGE_ID` first. Request
7677
`screenrig screen screenshot SCREEN_ID` and inspect that returned
@@ -566,7 +567,17 @@ Run `cards list --category CATEGORY` (`time`, `public`, `messages`, `media`,
566567
`food`, `weather`) and `cards show ID` to choose a type, read its tier and
567568
layouts, and pick a schema-listed theme. Run `card create --type ID --file
568569
params.json`, put the returned `crd_` ID in a card item on a playlist page, and
569-
set dynamic properties with `card data put crd_ID --file data.json`. A
570+
set dynamic properties with `card data put crd_ID --file data.json`.
571+
Render a card locally with `card preview crd_ID --output card.png`; for an
572+
unpublished design use `card preview TYPE --params params.json --data data.json
573+
--output card.png`. Open and inspect the PNG. Then render the whole playlist
574+
with `playlist preview FILE --output preview --contact-sheet` and inspect the
575+
contact sheet, including cards over their background images. These commands
576+
use installed Chromium or Chrome locally (`SCREENRIG_BROWSER` selects its
577+
executable) and the verified published card renderer. `--now ISO --timezone
578+
ZONE` makes time-dependent designs repeatable. Check `data.placeholders` and
579+
resolve or explicitly account for every item whose pixels were not rendered.
580+
A
570581
`fullscreen` card takes `layout: "full"` only; the other layouts, anchors and
571582
page limits are in [cards and feeds](references/playlists.md#built-in-cards-and-feeds).
572583
For weather, rates and other third-party data use screenRIG's cached feeds,
@@ -597,7 +608,8 @@ Canvas video stays muted, so the soundtrack is the only sound on the screen.
597608
holds 24 hours by default so an app that rotates internally and keeps state
598609
is not restarted; `--duration-ms` overrides it, and an application page under
599610
60 seconds returns an `application_page_short` warning. Follow
600-
`data.preview.argv`, inspect the result, then use `data.publish.argv`. For layouts, read
611+
`data.preview.argv`, open and inspect its local contact sheet, then use `data.publish.argv`.
612+
This applies to card-only playlists as well as media pages. For layouts, read
601613
[playlists](references/playlists.md).
602614
3. Publish a new playlist with `screen publish SCREEN_ID FILE`. It assigns the
603615
playlist and waits, up to two minutes by default, until the Player shows it.

‎skills/screenrig/references/playlists.md‎

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -947,3 +947,56 @@ one-at-a-time or complete-pass playback; a bounded runtime sequence using
947947
`batch_size` with `one_at_a_time: false` requires removing that field or
948948
choosing explicit IDs before export. This prevents silently losing a runtime
949949
batch cursor in a static bundle.
950+
951+
## Local card previews, data conditions and receipts
952+
953+
Use `card preview TYPE --params params.json --data data.json --output card.png`
954+
for one card, or `card preview crd_CARD --output card.png` for a saved instance.
955+
Then run `playlist preview FILE --output preview --contact-sheet` for its full
956+
page context. Open and inspect the image files before publishing. The CLI runs
957+
an installed Chromium or Chrome locally; `SCREENRIG_BROWSER` selects its
958+
executable. It fetches the verified published renderer and fonts and reuses its
959+
cache. `--now 2026-10-20T18:00:00Z --timezone America/Vancouver` freezes card
960+
clocks. `data.rendered_cards` names rendered card versions; `data.placeholders`
961+
names content that was represented by a box. Application interaction and live
962+
streams still need Player verification.
963+
964+
Optional `backgroundColor` and `textColor` card params accept `#RRGGBB` or
965+
`#RRGGBBAA` (CSS alpha order). `backgroundColor: "#382719CC"` makes a translucent
966+
warm scrim; `#E86A17` makes a solid orange ground. `background: "none"` takes
967+
precedence. `textColor` sets main and secondary text, while `accent` continues
968+
to colour eyebrows/highlights. Unset properties preserve the theme. Text-card
969+
bodies keep newlines and put inline bullet separators on separate lines.
970+
971+
`card data put crd_CARD --file data.json --ttl 2h` expires that edition two
972+
hours after acceptance; `--expires-at ISO` supplies an absolute deadline. Use
973+
one option at a time. A replacement without either removes expiry. Expired
974+
data stays inspectable through the agent read but blanks on an updated Player,
975+
including offline caches. Repeating an identical idempotent write preserves
976+
its original deadline.
977+
978+
A page can use `"visibility":{"enabled":true,"data":{"key":"crd_CARD",
979+
"path":"/enabled","equals":true}}`. `key` names card data; `path` is an optional
980+
JSON Pointer. Without `equals`, the document or field must exist (a present
981+
null counts); with it, the scalar must equal the supplied value. Missing and
982+
expired data never match. Keep one ordinary page without visibility as a
983+
permanent fallback. Date/time bounds can be combined with the data condition.
984+
Players advertise `page.conditions`; other Players receive conditional pages
985+
disabled. A screen's `effective_timezone` and `timezone_source` show the
986+
configured zone, device fallback, or unknown. An explicit UTC zone stays UTC.
987+
988+
Watch project events `screen.card_data_applied` for a rendered edition
989+
(`manifest_revision`, `page_id`, `primitive_id`, `data_key`, `data_revision`)
990+
and `screen.playlist_loop_completed` for the first uninterrupted eligible loop
991+
of a manifest. These are Player receipts, separate from write acceptance.
992+
Screenshot-ready events continue to identify completed captures.
993+
994+
Use `screen changes scr_SCREEN` to list up to 50 issued composition changes
995+
retained for 30 days. `screen revert scr_SCREEN --change-id man_CHANGE
996+
--expect-rev REV` restores that change's preceding composition on that screen
997+
by creating a separate playlist. Other screens and source playlists stay as
998+
they are. Live card data stays current, with its expiry. A newer publish,
999+
assignment, takeover, expired history or unavailable dependency refuses the
1000+
revert. Exact retries return the same accepted assignment. Check the returned
1001+
screen's `manifest_upgrade` or its activation event before claiming the Player
1002+
has applied it.

0 commit comments

Comments
 (0)