From a9c70b734b5eae462dbf6f7df718c4b0797660c9 Mon Sep 17 00:00:00 2001 From: Kurtis Jantzen Date: Thu, 10 Sep 2026 16:30:49 -0700 Subject: [PATCH 1/2] Document playlist preparation, editing, and publishing workflows --- plugins/screenrig/skills/screenrig/SKILL.md | 16 ++-- .../screenrig/references/applications.md | 8 +- .../skills/screenrig/references/commands.md | 43 ++++++----- .../skills/screenrig/references/compose.md | 2 + .../skills/screenrig/references/media.md | 4 +- .../skills/screenrig/references/operations.md | 12 +-- .../skills/screenrig/references/playlists.md | 77 ++++++++++++++++--- skills/screenrig/SKILL.md | 16 ++-- skills/screenrig/references/applications.md | 8 +- skills/screenrig/references/commands.md | 43 ++++++----- skills/screenrig/references/compose.md | 2 + skills/screenrig/references/media.md | 4 +- skills/screenrig/references/operations.md | 12 +-- skills/screenrig/references/playlists.md | 77 ++++++++++++++++--- 14 files changed, 232 insertions(+), 92 deletions(-) diff --git a/plugins/screenrig/skills/screenrig/SKILL.md b/plugins/screenrig/skills/screenrig/SKILL.md index c41356e7..2f6d8429 100644 --- a/plugins/screenrig/skills/screenrig/SKILL.md +++ b/plugins/screenrig/skills/screenrig/SKILL.md @@ -95,13 +95,15 @@ shapes belong in prepared content, not additional native playlist primitives. 1. Prepare and inspect the content at the intended size. Generation stores its returned media ID directly; do not upload it again. -2. Write or update the authored playlist file. Read [playlists](references/playlists.md) - before editing its shape, motion or schedule. Keep at least one page always eligible. -3. Create or update the playlist, then assign it to the resolved screen. Use the - current revision with `--if-match` when changing an existing resource. -4. Read back the assignment, request a screenshot, and inspect relevant playback - and events. Report what was observed and any remaining uncertainty. A command - succeeding alone does not prove physical display. +2. For full-screen images or videos, use `playlist init` to prepare the authored + file from media IDs and screen dimensions. For other layouts, author the file + using [playlists](references/playlists.md). Preview and inspect it. +3. Publish a new playlist with `screen publish SCREEN_ID FILE --expect-rev REV`. + To edit an existing playlist, obtain its file with `playlist show ID --output + FILE`, then use `playlist update` with the returned revision. Updates affect + all assigned screens. See the playlist reference for partial-failure recovery. +4. Request a screenshot and inspect relevant playback and events. Assignment + readback alone does not prove physical display. Report the observed evidence. For screen controls, screenshots, comments, events and feedback, use [operations](references/operations.md). For app uploads, page completion and K/V, diff --git a/plugins/screenrig/skills/screenrig/references/applications.md b/plugins/screenrig/skills/screenrig/references/applications.md index 19cd9f97..1b084c4d 100644 --- a/plugins/screenrig/skills/screenrig/references/applications.md +++ b/plugins/screenrig/skills/screenrig/references/applications.md @@ -36,7 +36,7 @@ revision with `app show`, then publish a new release: ```bash screenrig app show app_EXAMPLE -screenrig app update app_EXAMPLE ./lobby-board --if-match 3 +screenrig app update app_EXAMPLE ./lobby-board --expect-rev 3 ``` `app update` preserves application identity, name, and application K/V. It uses @@ -117,11 +117,11 @@ must carry `controller: true`. Do not set `controller` on a `duration` or ```bash screenrig playlist create ./lobby-board.json screenrig screen list -screenrig screen assign scr_EXAMPLE --playlist-id pl_EXAMPLE --if-match 3 +screenrig screen assign scr_EXAMPLE --playlist-id pl_EXAMPLE --expect-rev 3 ``` Take `--playlist-id` from `data.id` of the `playlist create` result. Take -`--if-match` from the screen's current `revision`, which both `screen list` and +`--expect-rev` from the screen's current `revision`, which both `screen list` and `screen show` return. `revision_conflict` means refetch and retry. Do not invent the revision. @@ -145,7 +145,7 @@ Application K/V is binary-safe. Use exactly one value mode. screenrig kv set --application-id app_EXAMPLE lobby --json-value '{"open":true}' screenrig kv get --application-id app_EXAMPLE lobby screenrig kv list --application-id app_EXAMPLE -screenrig kv delete --application-id app_EXAMPLE lobby --if-match REVISION +screenrig kv delete --application-id app_EXAMPLE lobby --expect-rev REVISION ``` `kv get` returns the stored bytes only as `data.value_base64`, including when diff --git a/plugins/screenrig/skills/screenrig/references/commands.md b/plugins/screenrig/skills/screenrig/references/commands.md index e35a0b50..aa47b37a 100644 --- a/plugins/screenrig/skills/screenrig/references/commands.md +++ b/plugins/screenrig/skills/screenrig/references/commands.md @@ -13,10 +13,10 @@ agent disconnect --yes [--allow-lockout] dashboard [--print-url] app pack [--output FILE] app upload [--name NAME] [--no-wait] [--poll-ms MS] -app update --if-match REVISION [--no-wait] [--poll-ms MS] +app update --expect-rev REVISION [--no-wait] [--poll-ms MS] app list app show -media generate --prompt TEXT [--aspect-ratio RATIO] [--quality low|medium|high] [--tag TAG] +media generate (--prompt TEXT | --prompt-file FILE) [--aspect-ratio RATIO] [--quality low|medium|high] [--tag TAG] [--no-progress] media upload [--content-type TYPE] [--tag TAG] [--no-wait] [--poll-ms MS] [--no-transcode] [--codec h264|hevc] [--max-fps N] @@ -27,38 +27,41 @@ media upload-batch --state FILE [--concurrency N] media show media download [--output FILE] media list [--tag TAG] [--primitive image|video] -media update (--tag TAG | --clear-tag) --if-match REVISION -media delete --if-match REVISION +media update (--tag TAG | --clear-tag) --expect-rev REVISION +media delete --expect-rev REVISION compose catalog compose render [--output DIRECTORY] [--combined] [--target-width PX --target-height PX] [--safe-area] [--open] [--lint-only] compose batch --output DIRECTORY [--only ID] [--target-width PX --target-height PX] [--safe-area] [--lint-only] +playlist init --name NAME --output FILE [--screen ID] + [--target-width PX --target-height PX] [--duration-ms MS] [--fit contain|cover|fill] playlist validate playlist create -playlist update --if-match REVISION +playlist update --expect-rev REVISION playlist export --output DIRECTORY -playlist import [--name NAME] [--update ID --if-match REVISION] -playlist show +playlist import [--name NAME] [--update ID --expect-rev REVISION] +playlist show [--output FILE | --editable] playlist list -playlist delete --if-match REVISION +playlist delete --expect-rev REVISION screen update [--name NAME] [--playlist-id ID] [--timezone ZONE] - --if-match REVISION + --expect-rev REVISION screen list [--state archived] screen show -screen assign --playlist-id ID --if-match REVISION -screen set-timezone --timezone ZONE --if-match REVISION -screen archive --if-match REVISION -screen unarchive --if-match REVISION -screen delete --if-match REVISION -screen rotate-public-id --if-match REVISION +screen publish --expect-rev REVISION +screen assign --playlist-id ID --expect-rev REVISION +screen set-timezone --timezone ZONE --expect-rev REVISION +screen archive --expect-rev REVISION +screen unarchive --expect-rev REVISION +screen delete --expect-rev REVISION +screen rotate-public-id --expect-rev REVISION screen toast --text TEXT [--level info] [--duration-ms MS] screen screenshot [--output FILE] [--timeout MS] [--poll-ms MS] kv get --application-id ID -kv set --application-id ID --json-value JSON [--if-match REVISION] -kv set --application-id ID --file FILE --content-type TYPE [--if-match REVISION] -kv set --application-id ID --value-base64 BASE64 --content-type TYPE [--if-match REVISION] -kv delete --application-id ID --if-match REVISION +kv set --application-id ID --json-value JSON [--expect-rev REVISION] +kv set --application-id ID --file FILE --content-type TYPE [--expect-rev REVISION] +kv set --application-id ID --value-base64 BASE64 --content-type TYPE [--expect-rev REVISION] +kv delete --application-id ID --expect-rev REVISION kv list --application-id ID comment show screen comment show playlist [--page PAGE_ID] @@ -92,3 +95,5 @@ Global flags include `--json`, `--human`, `--api-url URL`, `--config PATH`, On `revision_conflict`, fetch the resource, reapply the intended change, and retry with the returned revision. On an ambiguous transport failure, reuse the same idempotency key. + +`--if-match` remains an alias for `--expect-rev`; do not supply both. diff --git a/plugins/screenrig/skills/screenrig/references/compose.md b/plugins/screenrig/skills/screenrig/references/compose.md index 9e209f13..3b3ceae1 100644 --- a/plugins/screenrig/skills/screenrig/references/compose.md +++ b/plugins/screenrig/skills/screenrig/references/compose.md @@ -329,3 +329,5 @@ cropping. Eight-digit hex is how the page stays transparent and the plate keeps alpha. Layered region PNGs can sit as image primitives at their manifest rects. Inspect with `--combined`; default agent output stays layered. A presentable poster is one generated `image` primitive, not photo plus overlay. + +After uploading finished slide images, pass their media IDs in playback order to `playlist init`, inspect the preview, then use `screen publish`. See [playlists](playlists.md). diff --git a/plugins/screenrig/skills/screenrig/references/media.md b/plugins/screenrig/skills/screenrig/references/media.md index a8af6bfb..0a726d3c 100644 --- a/plugins/screenrig/skills/screenrig/references/media.md +++ b/plugins/screenrig/skills/screenrig/references/media.md @@ -164,7 +164,7 @@ On a build that converts: object. Hyphens are rejected; `ExecIntro2026` is valid and `exec-intro` is not. `media list --tag TAG [--primitive image|video]` filters by that tag and is the reliable filename → id map after upload. - `media update (--tag TAG | --clear-tag) --if-match REVISION` changes + `media update (--tag TAG | --clear-tag) --expect-rev REVISION` changes or clears it. Untagged objects are omitted when `--tag` is present on `media list`. - The conversion runs `ffmpeg` and `ffprobe`. They must be on `PATH`, or their @@ -250,3 +250,5 @@ problem code and status. Run `doctor` for local diagnostics. Use `doctor --repair-config` only to repair an existing credential file whose permissions are too broad. + +For long or exact-copy prompts, use `media generate --prompt-file FILE` (or `-` for stdin) instead of `--prompt`. For full-screen playback of ready media IDs, use `playlist init` and `screen publish`; see [playlists](playlists.md). diff --git a/plugins/screenrig/skills/screenrig/references/operations.md b/plugins/screenrig/skills/screenrig/references/operations.md index b1dff90e..5dcb0e67 100644 --- a/plugins/screenrig/skills/screenrig/references/operations.md +++ b/plugins/screenrig/skills/screenrig/references/operations.md @@ -5,11 +5,11 @@ ```bash screenrig screen list screenrig screen show scr_EXAMPLE -screenrig screen update scr_EXAMPLE --name "Lobby" --playlist-id pl_EXAMPLE --if-match REVISION -screenrig screen assign scr_EXAMPLE --playlist-id pl_EXAMPLE --if-match REVISION -screenrig screen set-timezone scr_EXAMPLE --timezone America/Los_Angeles --if-match REVISION -screenrig screen archive scr_EXAMPLE --if-match REVISION -screenrig screen unarchive scr_EXAMPLE --if-match REVISION +screenrig screen update scr_EXAMPLE --name "Lobby" --playlist-id pl_EXAMPLE --expect-rev REVISION +screenrig screen assign scr_EXAMPLE --playlist-id pl_EXAMPLE --expect-rev REVISION +screenrig screen set-timezone scr_EXAMPLE --timezone America/Los_Angeles --expect-rev REVISION +screenrig screen archive scr_EXAMPLE --expect-rev REVISION +screenrig screen unarchive scr_EXAMPLE --expect-rev REVISION screenrig screen toast scr_EXAMPLE --text "Updated lobby loop" --level info screenrig screen screenshot scr_EXAMPLE --output ./lobby.webp ``` @@ -59,7 +59,7 @@ screenrig comment delete screen scr_EXAMPLE ``` `--json-value` is a JSON object. `--file` reads a JSON object from disk. -Exactly one of those on set. Last write wins; do not send `--if-match`. +Exactly one of those on set. Last write wins; do not send `--expect-rev`. Unset show is `{ "comments": null }`. ## Events diff --git a/plugins/screenrig/skills/screenrig/references/playlists.md b/plugins/screenrig/skills/screenrig/references/playlists.md index 57e9056c..3217086d 100644 --- a/plugins/screenrig/skills/screenrig/references/playlists.md +++ b/plugins/screenrig/skills/screenrig/references/playlists.md @@ -1,5 +1,65 @@ # Playlists, motion, schedules and bundles +## Prepare, publish, and edit playlists + +For ready images and videos, prepare a full-screen playlist in playback order: + +```sh +screenrig playlist init med_POSTER med_VIDEO --name "Lobby loop" --screen scr_LOBBY --output lobby.json +screenrig playlist preview lobby.json --output preview --contact-sheet +screenrig screen publish scr_LOBBY lobby.json --expect-rev 7 +``` + +Inspect the preview before publishing. `playlist init` reads media metadata and +screen observations but makes no remote writes. It creates one page per media ID, +with `contain` fit, a black background, and a 200 ms crossfade. Images last 8000 ms; +videos are muted, do not loop, and advance on completion. Use `--duration-ms` for +image duration and `--fit contain|cover|fill` for content fit. Override the canvas +with both `--target-width` and `--target-height`; these also work without `--screen`. +Unknown or multiple reported surfaces require explicit dimensions. Output files +must not already exist. + +`screen publish ` creates a new playlist, assigns it using the +expected **screen** revision, and reads back the assignment. It does not update an +existing playlist by name. A name collision requires a different name or an +explicit `playlist update`. Its JSON result reports `playlist_id`, +`playlist_revision`, `screen_id`, `screen_revision`, `assignment_verified`, and +`playback_verified`. Assignment verification does not prove playback; request and +inspect a screenshot and relevant playback evidence separately. + +Publishing saves a private local journal automatically. After an ambiguous failure, +repeat the identical command and input with the same config to resume. If playlist +creation succeeded before assignment failed, the error identifies the created +playlist. Do not delete it or start another create to recover. A revision conflict +requires inspecting the screen and reconciling the intended assignment; an already +created playlist can be assigned explicitly with `screen assign`. Publishing never +silently refreshes the expected revision. Unfinished recovery stops after the +24-hour server idempotency window; inspect and reconcile before making more writes. + +To edit an existing playlist: + +```sh +screenrig playlist show pl_EXISTING --output lobby.json +screenrig playlist update pl_EXISTING lobby.json --expect-rev 4 +``` + +`playlist show --output` writes the editable `{name, pages}` document and returns +its path, `playlist_id`, and source `revision` on stdout. Use that returned revision +for the update. It preserves dynamic selectors, schedules, motion, and pinned +application releases, removing server-derived media and timing fields. Comments +remain separate. Plain `playlist show` is an inspection response; `--editable` +without `--output` returns `data.document`, `data.playlist_id`, and `data.revision`. +Updating a playlist affects every screen assigned to it. + +Playlist validate, create, update, preview, and screen publish accept `-` as their +input file to read stdin. JSON envelopes are never written into authored files. +`--expect-rev` is the preferred revision spelling; `--if-match` remains a compatible +alias. Supply only one. The HTTP revision contract is unchanged. + +Generation accepts either `--prompt TEXT` or `--prompt-file FILE`, including +`--prompt-file -` for stdin. The file is the complete prompt, with no trimming; +the existing 4000-character limit applies. Prompts are excluded from diagnostics. + ## Playlist writes Four wire primitives exist: `image`, `video`, `iframe`, and `application`. @@ -18,11 +78,10 @@ and `primitives`. A primitive is flat: `id`, a `primitive` field naming one of the four, that primitive's own fields, then `rect`, `layer`, `content_fit`, optional `enter`, and optional `motion`. There is no nested content object. -Keep the authored playlist JSON as the source of truth. `playlist show` is an -inspection payload, not a guaranteed write document: the server may add -resolved/defaulted fields such as `advance.max_ms` and -`selector.one_at_a_time`. Do not feed a show payload directly to `playlist -create` or `playlist update`; edit and submit the authored file instead. +Keep the authored playlist JSON as the source of truth. To obtain one from an +existing playlist, use `playlist show ID --output FILE`; the returned envelope +includes the source revision. Ordinary `playlist show` remains an inspection +response and must not be submitted as a write document. Image and video primitives require a `selector`. `iframe` and `application` do not take one. Do not put `media_id` on the primitive itself; it belongs @@ -301,7 +360,7 @@ owns it. `{"days": ["fri"], "start": "22:00", "end": "02:00"}` runs Friday 22:00 through Saturday 02:00. ```bash -screenrig screen set-timezone scr_EXAMPLE --timezone America/Los_Angeles --if-match 3 +screenrig screen set-timezone scr_EXAMPLE --timezone America/Los_Angeles --expect-rev 3 ``` `--timezone` is an IANA identifier such as `America/Los_Angeles` or @@ -316,7 +375,7 @@ referenced image or video rendition together. ```bash screenrig playlist export pl_EXAMPLE --output ./lobby-bundle screenrig playlist import ./lobby-bundle -screenrig playlist import ./lobby-bundle --update pl_TARGET --if-match REVISION +screenrig playlist import ./lobby-bundle --update pl_TARGET --expect-rev REVISION ``` The export destination must not exist. The bundle contains @@ -328,8 +387,8 @@ names are unique per account, so importing an account's own export unchanged is refused with 409 `resource_conflict` ("playlist name is already in use"); that problem's `error.next` names the two ways forward. `--name NAME` (1 to 120 characters) imports the bundle as a new playlist under that name; -`--update ID --if-match REVISION` replaces the existing playlist instead. -Updating requires both `--update` and the current `--if-match` revision. +`--update ID --expect-rev REVISION` replaces the existing playlist instead. +Updating requires both `--update` and the current `--expect-rev` revision. ```bash screenrig playlist import ./lobby-bundle --name "Lobby loop (copy)" diff --git a/skills/screenrig/SKILL.md b/skills/screenrig/SKILL.md index c41356e7..2f6d8429 100644 --- a/skills/screenrig/SKILL.md +++ b/skills/screenrig/SKILL.md @@ -95,13 +95,15 @@ shapes belong in prepared content, not additional native playlist primitives. 1. Prepare and inspect the content at the intended size. Generation stores its returned media ID directly; do not upload it again. -2. Write or update the authored playlist file. Read [playlists](references/playlists.md) - before editing its shape, motion or schedule. Keep at least one page always eligible. -3. Create or update the playlist, then assign it to the resolved screen. Use the - current revision with `--if-match` when changing an existing resource. -4. Read back the assignment, request a screenshot, and inspect relevant playback - and events. Report what was observed and any remaining uncertainty. A command - succeeding alone does not prove physical display. +2. For full-screen images or videos, use `playlist init` to prepare the authored + file from media IDs and screen dimensions. For other layouts, author the file + using [playlists](references/playlists.md). Preview and inspect it. +3. Publish a new playlist with `screen publish SCREEN_ID FILE --expect-rev REV`. + To edit an existing playlist, obtain its file with `playlist show ID --output + FILE`, then use `playlist update` with the returned revision. Updates affect + all assigned screens. See the playlist reference for partial-failure recovery. +4. Request a screenshot and inspect relevant playback and events. Assignment + readback alone does not prove physical display. Report the observed evidence. For screen controls, screenshots, comments, events and feedback, use [operations](references/operations.md). For app uploads, page completion and K/V, diff --git a/skills/screenrig/references/applications.md b/skills/screenrig/references/applications.md index 19cd9f97..1b084c4d 100644 --- a/skills/screenrig/references/applications.md +++ b/skills/screenrig/references/applications.md @@ -36,7 +36,7 @@ revision with `app show`, then publish a new release: ```bash screenrig app show app_EXAMPLE -screenrig app update app_EXAMPLE ./lobby-board --if-match 3 +screenrig app update app_EXAMPLE ./lobby-board --expect-rev 3 ``` `app update` preserves application identity, name, and application K/V. It uses @@ -117,11 +117,11 @@ must carry `controller: true`. Do not set `controller` on a `duration` or ```bash screenrig playlist create ./lobby-board.json screenrig screen list -screenrig screen assign scr_EXAMPLE --playlist-id pl_EXAMPLE --if-match 3 +screenrig screen assign scr_EXAMPLE --playlist-id pl_EXAMPLE --expect-rev 3 ``` Take `--playlist-id` from `data.id` of the `playlist create` result. Take -`--if-match` from the screen's current `revision`, which both `screen list` and +`--expect-rev` from the screen's current `revision`, which both `screen list` and `screen show` return. `revision_conflict` means refetch and retry. Do not invent the revision. @@ -145,7 +145,7 @@ Application K/V is binary-safe. Use exactly one value mode. screenrig kv set --application-id app_EXAMPLE lobby --json-value '{"open":true}' screenrig kv get --application-id app_EXAMPLE lobby screenrig kv list --application-id app_EXAMPLE -screenrig kv delete --application-id app_EXAMPLE lobby --if-match REVISION +screenrig kv delete --application-id app_EXAMPLE lobby --expect-rev REVISION ``` `kv get` returns the stored bytes only as `data.value_base64`, including when diff --git a/skills/screenrig/references/commands.md b/skills/screenrig/references/commands.md index e35a0b50..aa47b37a 100644 --- a/skills/screenrig/references/commands.md +++ b/skills/screenrig/references/commands.md @@ -13,10 +13,10 @@ agent disconnect --yes [--allow-lockout] dashboard [--print-url] app pack [--output FILE] app upload [--name NAME] [--no-wait] [--poll-ms MS] -app update --if-match REVISION [--no-wait] [--poll-ms MS] +app update --expect-rev REVISION [--no-wait] [--poll-ms MS] app list app show -media generate --prompt TEXT [--aspect-ratio RATIO] [--quality low|medium|high] [--tag TAG] +media generate (--prompt TEXT | --prompt-file FILE) [--aspect-ratio RATIO] [--quality low|medium|high] [--tag TAG] [--no-progress] media upload [--content-type TYPE] [--tag TAG] [--no-wait] [--poll-ms MS] [--no-transcode] [--codec h264|hevc] [--max-fps N] @@ -27,38 +27,41 @@ media upload-batch --state FILE [--concurrency N] media show media download [--output FILE] media list [--tag TAG] [--primitive image|video] -media update (--tag TAG | --clear-tag) --if-match REVISION -media delete --if-match REVISION +media update (--tag TAG | --clear-tag) --expect-rev REVISION +media delete --expect-rev REVISION compose catalog compose render [--output DIRECTORY] [--combined] [--target-width PX --target-height PX] [--safe-area] [--open] [--lint-only] compose batch --output DIRECTORY [--only ID] [--target-width PX --target-height PX] [--safe-area] [--lint-only] +playlist init --name NAME --output FILE [--screen ID] + [--target-width PX --target-height PX] [--duration-ms MS] [--fit contain|cover|fill] playlist validate playlist create -playlist update --if-match REVISION +playlist update --expect-rev REVISION playlist export --output DIRECTORY -playlist import [--name NAME] [--update ID --if-match REVISION] -playlist show +playlist import [--name NAME] [--update ID --expect-rev REVISION] +playlist show [--output FILE | --editable] playlist list -playlist delete --if-match REVISION +playlist delete --expect-rev REVISION screen update [--name NAME] [--playlist-id ID] [--timezone ZONE] - --if-match REVISION + --expect-rev REVISION screen list [--state archived] screen show -screen assign --playlist-id ID --if-match REVISION -screen set-timezone --timezone ZONE --if-match REVISION -screen archive --if-match REVISION -screen unarchive --if-match REVISION -screen delete --if-match REVISION -screen rotate-public-id --if-match REVISION +screen publish --expect-rev REVISION +screen assign --playlist-id ID --expect-rev REVISION +screen set-timezone --timezone ZONE --expect-rev REVISION +screen archive --expect-rev REVISION +screen unarchive --expect-rev REVISION +screen delete --expect-rev REVISION +screen rotate-public-id --expect-rev REVISION screen toast --text TEXT [--level info] [--duration-ms MS] screen screenshot [--output FILE] [--timeout MS] [--poll-ms MS] kv get --application-id ID -kv set --application-id ID --json-value JSON [--if-match REVISION] -kv set --application-id ID --file FILE --content-type TYPE [--if-match REVISION] -kv set --application-id ID --value-base64 BASE64 --content-type TYPE [--if-match REVISION] -kv delete --application-id ID --if-match REVISION +kv set --application-id ID --json-value JSON [--expect-rev REVISION] +kv set --application-id ID --file FILE --content-type TYPE [--expect-rev REVISION] +kv set --application-id ID --value-base64 BASE64 --content-type TYPE [--expect-rev REVISION] +kv delete --application-id ID --expect-rev REVISION kv list --application-id ID comment show screen comment show playlist [--page PAGE_ID] @@ -92,3 +95,5 @@ Global flags include `--json`, `--human`, `--api-url URL`, `--config PATH`, On `revision_conflict`, fetch the resource, reapply the intended change, and retry with the returned revision. On an ambiguous transport failure, reuse the same idempotency key. + +`--if-match` remains an alias for `--expect-rev`; do not supply both. diff --git a/skills/screenrig/references/compose.md b/skills/screenrig/references/compose.md index 9e209f13..3b3ceae1 100644 --- a/skills/screenrig/references/compose.md +++ b/skills/screenrig/references/compose.md @@ -329,3 +329,5 @@ cropping. Eight-digit hex is how the page stays transparent and the plate keeps alpha. Layered region PNGs can sit as image primitives at their manifest rects. Inspect with `--combined`; default agent output stays layered. A presentable poster is one generated `image` primitive, not photo plus overlay. + +After uploading finished slide images, pass their media IDs in playback order to `playlist init`, inspect the preview, then use `screen publish`. See [playlists](playlists.md). diff --git a/skills/screenrig/references/media.md b/skills/screenrig/references/media.md index a8af6bfb..0a726d3c 100644 --- a/skills/screenrig/references/media.md +++ b/skills/screenrig/references/media.md @@ -164,7 +164,7 @@ On a build that converts: object. Hyphens are rejected; `ExecIntro2026` is valid and `exec-intro` is not. `media list --tag TAG [--primitive image|video]` filters by that tag and is the reliable filename → id map after upload. - `media update (--tag TAG | --clear-tag) --if-match REVISION` changes + `media update (--tag TAG | --clear-tag) --expect-rev REVISION` changes or clears it. Untagged objects are omitted when `--tag` is present on `media list`. - The conversion runs `ffmpeg` and `ffprobe`. They must be on `PATH`, or their @@ -250,3 +250,5 @@ problem code and status. Run `doctor` for local diagnostics. Use `doctor --repair-config` only to repair an existing credential file whose permissions are too broad. + +For long or exact-copy prompts, use `media generate --prompt-file FILE` (or `-` for stdin) instead of `--prompt`. For full-screen playback of ready media IDs, use `playlist init` and `screen publish`; see [playlists](playlists.md). diff --git a/skills/screenrig/references/operations.md b/skills/screenrig/references/operations.md index b1dff90e..5dcb0e67 100644 --- a/skills/screenrig/references/operations.md +++ b/skills/screenrig/references/operations.md @@ -5,11 +5,11 @@ ```bash screenrig screen list screenrig screen show scr_EXAMPLE -screenrig screen update scr_EXAMPLE --name "Lobby" --playlist-id pl_EXAMPLE --if-match REVISION -screenrig screen assign scr_EXAMPLE --playlist-id pl_EXAMPLE --if-match REVISION -screenrig screen set-timezone scr_EXAMPLE --timezone America/Los_Angeles --if-match REVISION -screenrig screen archive scr_EXAMPLE --if-match REVISION -screenrig screen unarchive scr_EXAMPLE --if-match REVISION +screenrig screen update scr_EXAMPLE --name "Lobby" --playlist-id pl_EXAMPLE --expect-rev REVISION +screenrig screen assign scr_EXAMPLE --playlist-id pl_EXAMPLE --expect-rev REVISION +screenrig screen set-timezone scr_EXAMPLE --timezone America/Los_Angeles --expect-rev REVISION +screenrig screen archive scr_EXAMPLE --expect-rev REVISION +screenrig screen unarchive scr_EXAMPLE --expect-rev REVISION screenrig screen toast scr_EXAMPLE --text "Updated lobby loop" --level info screenrig screen screenshot scr_EXAMPLE --output ./lobby.webp ``` @@ -59,7 +59,7 @@ screenrig comment delete screen scr_EXAMPLE ``` `--json-value` is a JSON object. `--file` reads a JSON object from disk. -Exactly one of those on set. Last write wins; do not send `--if-match`. +Exactly one of those on set. Last write wins; do not send `--expect-rev`. Unset show is `{ "comments": null }`. ## Events diff --git a/skills/screenrig/references/playlists.md b/skills/screenrig/references/playlists.md index 57e9056c..3217086d 100644 --- a/skills/screenrig/references/playlists.md +++ b/skills/screenrig/references/playlists.md @@ -1,5 +1,65 @@ # Playlists, motion, schedules and bundles +## Prepare, publish, and edit playlists + +For ready images and videos, prepare a full-screen playlist in playback order: + +```sh +screenrig playlist init med_POSTER med_VIDEO --name "Lobby loop" --screen scr_LOBBY --output lobby.json +screenrig playlist preview lobby.json --output preview --contact-sheet +screenrig screen publish scr_LOBBY lobby.json --expect-rev 7 +``` + +Inspect the preview before publishing. `playlist init` reads media metadata and +screen observations but makes no remote writes. It creates one page per media ID, +with `contain` fit, a black background, and a 200 ms crossfade. Images last 8000 ms; +videos are muted, do not loop, and advance on completion. Use `--duration-ms` for +image duration and `--fit contain|cover|fill` for content fit. Override the canvas +with both `--target-width` and `--target-height`; these also work without `--screen`. +Unknown or multiple reported surfaces require explicit dimensions. Output files +must not already exist. + +`screen publish ` creates a new playlist, assigns it using the +expected **screen** revision, and reads back the assignment. It does not update an +existing playlist by name. A name collision requires a different name or an +explicit `playlist update`. Its JSON result reports `playlist_id`, +`playlist_revision`, `screen_id`, `screen_revision`, `assignment_verified`, and +`playback_verified`. Assignment verification does not prove playback; request and +inspect a screenshot and relevant playback evidence separately. + +Publishing saves a private local journal automatically. After an ambiguous failure, +repeat the identical command and input with the same config to resume. If playlist +creation succeeded before assignment failed, the error identifies the created +playlist. Do not delete it or start another create to recover. A revision conflict +requires inspecting the screen and reconciling the intended assignment; an already +created playlist can be assigned explicitly with `screen assign`. Publishing never +silently refreshes the expected revision. Unfinished recovery stops after the +24-hour server idempotency window; inspect and reconcile before making more writes. + +To edit an existing playlist: + +```sh +screenrig playlist show pl_EXISTING --output lobby.json +screenrig playlist update pl_EXISTING lobby.json --expect-rev 4 +``` + +`playlist show --output` writes the editable `{name, pages}` document and returns +its path, `playlist_id`, and source `revision` on stdout. Use that returned revision +for the update. It preserves dynamic selectors, schedules, motion, and pinned +application releases, removing server-derived media and timing fields. Comments +remain separate. Plain `playlist show` is an inspection response; `--editable` +without `--output` returns `data.document`, `data.playlist_id`, and `data.revision`. +Updating a playlist affects every screen assigned to it. + +Playlist validate, create, update, preview, and screen publish accept `-` as their +input file to read stdin. JSON envelopes are never written into authored files. +`--expect-rev` is the preferred revision spelling; `--if-match` remains a compatible +alias. Supply only one. The HTTP revision contract is unchanged. + +Generation accepts either `--prompt TEXT` or `--prompt-file FILE`, including +`--prompt-file -` for stdin. The file is the complete prompt, with no trimming; +the existing 4000-character limit applies. Prompts are excluded from diagnostics. + ## Playlist writes Four wire primitives exist: `image`, `video`, `iframe`, and `application`. @@ -18,11 +78,10 @@ and `primitives`. A primitive is flat: `id`, a `primitive` field naming one of the four, that primitive's own fields, then `rect`, `layer`, `content_fit`, optional `enter`, and optional `motion`. There is no nested content object. -Keep the authored playlist JSON as the source of truth. `playlist show` is an -inspection payload, not a guaranteed write document: the server may add -resolved/defaulted fields such as `advance.max_ms` and -`selector.one_at_a_time`. Do not feed a show payload directly to `playlist -create` or `playlist update`; edit and submit the authored file instead. +Keep the authored playlist JSON as the source of truth. To obtain one from an +existing playlist, use `playlist show ID --output FILE`; the returned envelope +includes the source revision. Ordinary `playlist show` remains an inspection +response and must not be submitted as a write document. Image and video primitives require a `selector`. `iframe` and `application` do not take one. Do not put `media_id` on the primitive itself; it belongs @@ -301,7 +360,7 @@ owns it. `{"days": ["fri"], "start": "22:00", "end": "02:00"}` runs Friday 22:00 through Saturday 02:00. ```bash -screenrig screen set-timezone scr_EXAMPLE --timezone America/Los_Angeles --if-match 3 +screenrig screen set-timezone scr_EXAMPLE --timezone America/Los_Angeles --expect-rev 3 ``` `--timezone` is an IANA identifier such as `America/Los_Angeles` or @@ -316,7 +375,7 @@ referenced image or video rendition together. ```bash screenrig playlist export pl_EXAMPLE --output ./lobby-bundle screenrig playlist import ./lobby-bundle -screenrig playlist import ./lobby-bundle --update pl_TARGET --if-match REVISION +screenrig playlist import ./lobby-bundle --update pl_TARGET --expect-rev REVISION ``` The export destination must not exist. The bundle contains @@ -328,8 +387,8 @@ names are unique per account, so importing an account's own export unchanged is refused with 409 `resource_conflict` ("playlist name is already in use"); that problem's `error.next` names the two ways forward. `--name NAME` (1 to 120 characters) imports the bundle as a new playlist under that name; -`--update ID --if-match REVISION` replaces the existing playlist instead. -Updating requires both `--update` and the current `--if-match` revision. +`--update ID --expect-rev REVISION` replaces the existing playlist instead. +Updating requires both `--update` and the current `--expect-rev` revision. ```bash screenrig playlist import ./lobby-bundle --name "Lobby loop (copy)" From 080a5aabe2d1d2f9d686588ef7918f69f46732fd Mon Sep 17 00:00:00 2001 From: Kurtis Jantzen Date: Thu, 10 Sep 2026 16:54:52 -0700 Subject: [PATCH 2/2] Refresh bundled CLI and validate preferred revision spelling --- components.lock.json | 4 +- plugins/screenrig/cli/README.md | 102 +++++++++++ plugins/screenrig/cli/dist/argv.d.ts.map | 2 +- plugins/screenrig/cli/dist/argv.js | 2 + plugins/screenrig/cli/dist/argv.js.map | 2 +- .../screenrig/cli/dist/authoring-input.d.ts | 6 + .../cli/dist/authoring-input.d.ts.map | 1 + plugins/screenrig/cli/dist/authoring-input.js | 69 ++++++++ .../screenrig/cli/dist/authoring-input.js.map | 1 + .../cli/dist/cli-commands/agent.d.ts.map | 2 +- .../screenrig/cli/dist/cli-commands/agent.js | 3 +- .../cli/dist/cli-commands/agent.js.map | 2 +- .../screenrig/cli/dist/cli-commands/app.js | 2 +- .../cli/dist/cli-commands/app.js.map | 2 +- plugins/screenrig/cli/dist/cli-commands/kv.js | 4 +- .../screenrig/cli/dist/cli-commands/kv.js.map | 2 +- .../cli/dist/cli-commands/media.d.ts.map | 2 +- .../screenrig/cli/dist/cli-commands/media.js | 13 +- .../cli/dist/cli-commands/media.js.map | 2 +- .../cli/dist/cli-commands/playlist.d.ts.map | 2 +- .../cli/dist/cli-commands/playlist.js | 26 ++- .../cli/dist/cli-commands/playlist.js.map | 2 +- .../cli/dist/cli-commands/screen.d.ts.map | 2 +- .../screenrig/cli/dist/cli-commands/screen.js | 21 ++- .../cli/dist/cli-commands/screen.js.map | 2 +- plugins/screenrig/cli/dist/cli-errors.js | 10 +- plugins/screenrig/cli/dist/cli-errors.js.map | 2 +- plugins/screenrig/cli/dist/client.d.ts | 4 + plugins/screenrig/cli/dist/client.d.ts.map | 2 +- plugins/screenrig/cli/dist/client.js | 13 +- plugins/screenrig/cli/dist/client.js.map | 2 +- plugins/screenrig/cli/dist/command-input.d.ts | 2 + .../screenrig/cli/dist/command-input.d.ts.map | 2 +- plugins/screenrig/cli/dist/command-input.js | 15 ++ .../screenrig/cli/dist/command-input.js.map | 2 +- plugins/screenrig/cli/dist/command-path.js | 2 +- .../screenrig/cli/dist/command-path.js.map | 2 +- .../screenrig/cli/dist/command-tree.d.ts.map | 2 +- plugins/screenrig/cli/dist/command-tree.js | 2 + .../screenrig/cli/dist/command-tree.js.map | 2 +- plugins/screenrig/cli/dist/commands.d.ts | 2 + plugins/screenrig/cli/dist/commands.d.ts.map | 2 +- plugins/screenrig/cli/dist/commands.js | 165 ++++++++++++++---- plugins/screenrig/cli/dist/commands.js.map | 2 +- plugins/screenrig/cli/dist/config.d.ts | 5 + plugins/screenrig/cli/dist/config.d.ts.map | 2 +- plugins/screenrig/cli/dist/config.js.map | 2 +- plugins/screenrig/cli/dist/if-match.js | 2 +- plugins/screenrig/cli/dist/if-match.js.map | 2 +- .../cli/dist/playlist-authoring.d.ts | 17 ++ .../cli/dist/playlist-authoring.d.ts.map | 1 + .../screenrig/cli/dist/playlist-authoring.js | 67 +++++++ .../cli/dist/playlist-authoring.js.map | 1 + plugins/screenrig/cli/dist/playlist-bundle.js | 6 +- .../screenrig/cli/dist/playlist-bundle.js.map | 2 +- plugins/screenrig/cli/dist/program.d.ts.map | 2 +- plugins/screenrig/cli/dist/program.js | 2 + plugins/screenrig/cli/dist/program.js.map | 2 +- plugins/screenrig/cli/dist/runtime.d.ts | 2 + plugins/screenrig/cli/dist/runtime.d.ts.map | 2 +- plugins/screenrig/cli/dist/runtime.js | 2 + plugins/screenrig/cli/dist/runtime.js.map | 2 +- .../screenrig/cli/dist/screen-publish.d.ts | 22 +++ .../cli/dist/screen-publish.d.ts.map | 1 + plugins/screenrig/cli/dist/screen-publish.js | 139 +++++++++++++++ .../screenrig/cli/dist/screen-publish.js.map | 1 + .../screenrig/cli/dist/write-recovery.d.ts | 23 +++ .../cli/dist/write-recovery.d.ts.map | 1 + plugins/screenrig/cli/dist/write-recovery.js | 90 ++++++++++ .../screenrig/cli/dist/write-recovery.js.map | 1 + scripts/validate-plugin.py | 2 +- 71 files changed, 813 insertions(+), 101 deletions(-) create mode 100644 plugins/screenrig/cli/dist/authoring-input.d.ts create mode 100644 plugins/screenrig/cli/dist/authoring-input.d.ts.map create mode 100644 plugins/screenrig/cli/dist/authoring-input.js create mode 100644 plugins/screenrig/cli/dist/authoring-input.js.map create mode 100644 plugins/screenrig/cli/dist/playlist-authoring.d.ts create mode 100644 plugins/screenrig/cli/dist/playlist-authoring.d.ts.map create mode 100644 plugins/screenrig/cli/dist/playlist-authoring.js create mode 100644 plugins/screenrig/cli/dist/playlist-authoring.js.map create mode 100644 plugins/screenrig/cli/dist/screen-publish.d.ts create mode 100644 plugins/screenrig/cli/dist/screen-publish.d.ts.map create mode 100644 plugins/screenrig/cli/dist/screen-publish.js create mode 100644 plugins/screenrig/cli/dist/screen-publish.js.map create mode 100644 plugins/screenrig/cli/dist/write-recovery.d.ts create mode 100644 plugins/screenrig/cli/dist/write-recovery.d.ts.map create mode 100644 plugins/screenrig/cli/dist/write-recovery.js create mode 100644 plugins/screenrig/cli/dist/write-recovery.js.map diff --git a/components.lock.json b/components.lock.json index bc8640c3..6685e99c 100644 --- a/components.lock.json +++ b/components.lock.json @@ -3,10 +3,10 @@ "state": "resolved", "cli": { "repository": "screenrig/cli", - "commit": "d007df89b308e391584e5731c4c53e2fe20bf273", + "commit": "880abf4fbf53af93e30ed59553ba1320db649e9f", "artifact": { "file": "screenrig-cli.tgz", - "sha256": "0f7a7dbd685c34461840e706660ebcee98cddfbc510e86089cca7611e8e5475c" + "sha256": "19c4d7843edce94b35f73fc262ab4e52e6b84fb4266bd32b14e1f287def07c83" } } } diff --git a/plugins/screenrig/cli/README.md b/plugins/screenrig/cli/README.md index 5a5cc1d0..83778504 100644 --- a/plugins/screenrig/cli/README.md +++ b/plugins/screenrig/cli/README.md @@ -77,6 +77,48 @@ accepted fields (`data.id`, `data.release_id`, `data.operation_id`) and ## Configuration +### Nonblocking agent connection + +`screenrig agent connect --no-wait --print-url` starts or resumes a connection, +reads one server status snapshot, and returns a JSON envelope. While approval is +pending, `data.status` is `pending`, `data.approval_url` contains the dashboard +handoff, and `data.next.command` identifies the resume command. `data.next.argv` +supplies its arguments, preserving the selected config and API origin. Open the handoff +for the intended user, then run `screenrig agent connect --no-wait` again. An +approved connection completes credential collection and activation and returns +`data.status: active`. No credential is included in either result. + +Without `--print-url`, the CLI tries to open the browser and includes the handoff +URL in the pending result only if opening fails. `--no-wait` defaults to a +30-second status-read budget; it does not wait for a person to approve. Normal +`agent connect` retains its existing approval wait of up to 24 hours. `--timeout` +overrides either mode's wait budget. Terminal denial, cancellation, and expiry +remain errors. + +### Recovering writes + +Ordinary application uploads/updates, playlist creates/updates/deletes, screen +mutations other than provisioning, media tag updates/deletes, K/V and comment +writes, feedback submissions, and operation cancellation persist an idempotency +key before sending the request. After an ambiguous network failure or server +error, rerun the same command with unchanged input. The CLI reuses the saved key; +it does not automatically send another request within the failed invocation. +`write_recovery_saved` indicates that recovery state was retained. + +The private config stores only request fingerprints, keys, and timestamps, never +request payloads. Fingerprints include the origin, credential, target, request +body, and revision. Changed requests receive different keys. A completed command +clears its pending state; application acceptance followed by a failed processing +wait retains it so retrying does not create another application. Definite +refusals still require reconciliation; revision checks remain in force. + +Automatic replay stops after 23 hours, before the server's 24-hour replay window +ends. Inspect the resource before explicitly supplying a new `--idempotency-key` +for a reconciled write. Explicit keys remain supported. Pending entries are not +silently evicted; resolve outstanding writes if the 256-entry limit is reached. +Enrollment, generation, media uploads/batches, bundle imports, and browser +handoffs retain their existing specialized recovery behavior. + User-private config lives outside the replaceable plugin directory (`$XDG_CONFIG_HOME/screenrig/config.json`, or `%APPDATA%\screenrig\config.json` on Windows). The default service is `https://api.screenrig.ai`. @@ -114,3 +156,63 @@ Development profiles are described in [CONTRIBUTING.md](https://github.com/scree See [`RELEASING.md`](https://github.com/screenrig/cli/blob/main/RELEASING.md) for CalVer stamping and npm publication. Report suspected vulnerabilities through the [security policy](SECURITY.md). + +## Prepare, publish, and edit playlists + +For ready images and videos, prepare a full-screen playlist in playback order: + +```sh +screenrig playlist init med_POSTER med_VIDEO --name "Lobby loop" --screen scr_LOBBY --output lobby.json +screenrig playlist preview lobby.json --output preview --contact-sheet +screenrig screen publish scr_LOBBY lobby.json --expect-rev 7 +``` + +Inspect the preview before publishing. `playlist init` reads media metadata and +screen observations but makes no remote writes. It creates one page per media ID, +with `contain` fit, a black background, and a 200 ms crossfade. Images last 8000 ms; +videos are muted, do not loop, and advance on completion. Use `--duration-ms` for +image duration and `--fit contain|cover|fill` for content fit. Override the canvas +with both `--target-width` and `--target-height`; these also work without `--screen`. +Unknown or multiple reported surfaces require explicit dimensions. Output files +must not already exist. + +`screen publish ` creates a new playlist, assigns it using the +expected **screen** revision, and reads back the assignment. It does not update an +existing playlist by name. A name collision requires a different name or an +explicit `playlist update`. Its JSON result reports `playlist_id`, +`playlist_revision`, `screen_id`, `screen_revision`, `assignment_verified`, and +`playback_verified`. Assignment verification does not prove playback; request and +inspect a screenshot and relevant playback evidence separately. + +Publishing saves a private local journal automatically. After an ambiguous failure, +repeat the identical command and input with the same config to resume. If playlist +creation succeeded before assignment failed, the error identifies the created +playlist. Do not delete it or start another create to recover. A revision conflict +requires inspecting the screen and reconciling the intended assignment; an already +created playlist can be assigned explicitly with `screen assign`. Publishing never +silently refreshes the expected revision. Unfinished recovery stops after the +24-hour server idempotency window; inspect and reconcile before making more writes. + +To edit an existing playlist: + +```sh +screenrig playlist show pl_EXISTING --output lobby.json +screenrig playlist update pl_EXISTING lobby.json --expect-rev 4 +``` + +`playlist show --output` writes the editable `{name, pages}` document and returns +its path, `playlist_id`, and source `revision` on stdout. Use that returned revision +for the update. It preserves dynamic selectors, schedules, motion, and pinned +application releases, removing server-derived media and timing fields. Comments +remain separate. Plain `playlist show` is an inspection response; `--editable` +without `--output` returns `data.document`, `data.playlist_id`, and `data.revision`. +Updating a playlist affects every screen assigned to it. + +Playlist validate, create, update, preview, and screen publish accept `-` as their +input file to read stdin. JSON envelopes are never written into authored files. +`--expect-rev` is the preferred revision spelling; `--if-match` remains a compatible +alias. Supply only one. The HTTP revision contract is unchanged. + +Generation accepts either `--prompt TEXT` or `--prompt-file FILE`, including +`--prompt-file -` for stdin. The file is the complete prompt, with no trimming; +the existing 4000-character limit applies. Prompts are excluded from diagnostics. diff --git a/plugins/screenrig/cli/dist/argv.d.ts.map b/plugins/screenrig/cli/dist/argv.d.ts.map index 106116c6..f2f1ad4d 100644 --- a/plugins/screenrig/cli/dist/argv.d.ts.map +++ b/plugins/screenrig/cli/dist/argv.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"argv.d.ts","sourceRoot":"","sources":["../src/argv.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAE5D,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEvF,qFAAqF;AACrF,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,GAAG;IAAE,IAAI,CAAC,EAAE,YAAY,CAAA;CAAE,CAc9E"} \ No newline at end of file +{"version":3,"file":"argv.d.ts","sourceRoot":"","sources":["../src/argv.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAE5D,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEvF,qFAAqF;AACrF,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,GAAG;IAAE,IAAI,CAAC,EAAE,YAAY,CAAA;CAAE,CAe9E"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/argv.js b/plugins/screenrig/cli/dist/argv.js index ebaea7b3..7a07fa1e 100644 --- a/plugins/screenrig/cli/dist/argv.js +++ b/plugins/screenrig/cli/dist/argv.js @@ -1,9 +1,11 @@ +import { normalizeRevisionArgs } from "./command-input.js"; import { CommanderError } from "commander"; import { commandInput, createCommandTree } from "./command-tree.js"; import { describeHelp } from "./help.js"; export { flagString, flagBool, flagNumber } from "./command-input.js"; /** Inspect the same native command tree without executing an application handler. */ export function parseArgv(argv) { + argv = normalizeRevisionArgs(argv); const tree = createCommandTree(argv); try { tree.root.parse(argv, { from: "user" }); diff --git a/plugins/screenrig/cli/dist/argv.js.map b/plugins/screenrig/cli/dist/argv.js.map index 6a68ac7f..ffa9c6a6 100644 --- a/plugins/screenrig/cli/dist/argv.js.map +++ b/plugins/screenrig/cli/dist/argv.js.map @@ -1 +1 @@ -{"version":3,"file":"argv.js","sourceRoot":"","sources":["../src/argv.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,EAAE,YAAY,EAAqB,MAAM,WAAW,CAAC;AAE5D,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAmB,MAAM,oBAAoB,CAAC;AAEvF,qFAAqF;AACrF,MAAM,UAAU,SAAS,CAAC,IAAc;IACtC,MAAM,IAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACrC,IAAI,CAAC;QACH,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IAC1C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,CAAC,KAAK,YAAY,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAAE,MAAM,KAAK,CAAC;IAC5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OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,CAAC,KAAK,YAAY,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAAE,MAAM,KAAK,CAAC;IAC5G,CAAC;IACD,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3C,IAAI,IAAI,CAAC,gBAAgB,EAAE;QAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;IACvD,IAAI,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC;QACzB,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC3C,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC;IAChH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/authoring-input.d.ts b/plugins/screenrig/cli/dist/authoring-input.d.ts new file mode 100644 index 00000000..d6f17473 --- /dev/null +++ b/plugins/screenrig/cli/dist/authoring-input.d.ts @@ -0,0 +1,6 @@ +import type { CliRuntime } from "./runtime.js"; +export declare function readAuthoringText(file: string, runtime: CliRuntime, maxBytes?: number): Promise; +export declare function readAuthoringJson(file: string, runtime: CliRuntime): Promise; +/** Exclusive creation keeps a prepared document safe from accidental replacement. */ +export declare function writeAuthoringJson(file: string, document: unknown, runtime: CliRuntime): Promise; +//# sourceMappingURL=authoring-input.d.ts.map \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/authoring-input.d.ts.map b/plugins/screenrig/cli/dist/authoring-input.d.ts.map new file mode 100644 index 00000000..7f755620 --- /dev/null +++ b/plugins/screenrig/cli/dist/authoring-input.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"authoring-input.d.ts","sourceRoot":"","sources":["../src/authoring-input.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI/C,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,SAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,CAwBtH;AACD,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,CAGvF;AACD,qFAAqF;AACrF,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAO9G"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/authoring-input.js b/plugins/screenrig/cli/dist/authoring-input.js new file mode 100644 index 00000000..f0a64c6f --- /dev/null +++ b/plugins/screenrig/cli/dist/authoring-input.js @@ -0,0 +1,69 @@ +import { open } from "node:fs/promises"; +import path from "node:path"; +import { usageError } from "./problems.js"; +const MAX_INPUT_BYTES = 8 * 1024 * 1024; +export async function readAuthoringText(file, runtime, maxBytes = MAX_INPUT_BYTES) { + try { + if (file !== "-") { + const handle = await open(path.resolve(runtime.cwd(), file), "r"); + try { + if ((await handle.stat()).size > maxBytes) + throw usageError("Input exceeds its size limit."); + let size = 0; + const chunks = []; + for await (const chunk of handle.createReadStream({ autoClose: false })) { + size += chunk.length; + if (size > maxBytes) + throw usageError("Input exceeds its size limit."); + chunks.push(chunk); + } + return Buffer.concat(chunks).toString("utf8"); + } + finally { + await handle.close(); + } + } + if (!runtime.stdin || runtime.isStdinTty?.()) + throw usageError("Pipe input when using '-'."); + let size = 0; + const chunks = []; + for await (const chunk of runtime.stdin) { + const bytes = Buffer.from(chunk); + size += bytes.length; + if (size > maxBytes) + throw usageError("Input exceeds its size limit."); + chunks.push(bytes); + } + return Buffer.concat(chunks).toString("utf8"); + } + catch { + throw usageError("Cannot read input; provide a readable file or pipe, within the size limit."); + } +} +export async function readAuthoringJson(file, runtime) { + const text = await readAuthoringText(file, runtime); + try { + return JSON.parse(text); + } + catch { + throw usageError("Input is not valid JSON."); + } +} +/** Exclusive creation keeps a prepared document safe from accidental replacement. */ +export async function writeAuthoringJson(file, document, runtime) { + const output = path.resolve(runtime.cwd(), file); + try { + const handle = await open(output, "wx", 0o600); + try { + await handle.writeFile(JSON.stringify(document, null, 2) + "\n"); + } + finally { + await handle.close(); + } + } + catch { + throw usageError("Cannot create output; choose a new file in an existing directory."); + } + return output; +} +//# sourceMappingURL=authoring-input.js.map \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/authoring-input.js.map b/plugins/screenrig/cli/dist/authoring-input.js.map new file mode 100644 index 00000000..463c0591 --- /dev/null +++ b/plugins/screenrig/cli/dist/authoring-input.js.map @@ -0,0 +1 @@ +{"version":3,"file":"authoring-input.js","sourceRoot":"","sources":["../src/authoring-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,eAAe,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AACxC,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,IAAY,EAAE,OAAmB,EAAE,QAAQ,GAAG,eAAe;IACnG,IAAI,CAAC;QACH,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;YACjB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;Y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AM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAChD,CAAC;IAAC,MAAM,CAAC;QAAC,MAAM,UAAU,CAAC,4EAA4E,CAAC,CAAC;IAAC,CAAC;AAC7G,CAAC;AACD,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,IAAY,EAAE,OAAmB;IACvE,MAAM,IAAI,GAAG,MAAM,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACpD,IAAI,CAAC;QAAC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAAC,CAAC;IAAC,MAAM,CAAC;QAAC,MAAM,UAAU,CAAC,0BAA0B,CAAC,CAAC;IAAC,CAAC;AAC1F,CAAC;AACD,qFAAqF;AACrF,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,IAAY,EAAE,QAAiB,EAAE,OAAmB;IAC3F,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC;IACjD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;QAC/C,IAAI,CAAC;YAAC,MAAM,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;QAAC,CAAC;gBAAS,CAAC;YAAC,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QAAC,CAAC;IAC7G,CAAC;IAAC,MAAM,CAAC;QAAC,MAAM,UAAU,CAAC,mEAAmE,CAAC,CAAC;IAAC,CAAC;IAClG,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/agent.d.ts.map b/plugins/screenrig/cli/dist/cli-commands/agent.d.ts.map index e7ecbc60..b9f05627 100644 --- a/plugins/screenrig/cli/dist/cli-commands/agent.d.ts.map +++ b/plugins/screenrig/cli/dist/cli-commands/agent.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/cli-commands/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGzC,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAqBpF"} \ No newline at end of file +{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/cli-commands/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGzC,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAsBpF"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/agent.js b/plugins/screenrig/cli/dist/cli-commands/agent.js index 76e6e866..c927f162 100644 --- a/plugins/screenrig/cli/dist/cli-commands/agent.js +++ b/plugins/screenrig/cli/dist/cli-commands/agent.js @@ -10,7 +10,8 @@ export function registerAgentCommands(root, bind) { addCommandNotes(agent.command("connect").description("Connect this installation with approval") .option("--name ", "Set this agent installation name") .option("--print-url", "Return the browser handoff URL") - .action(bind(handleAgentConnect)), "Approval expires after 24 hours; --timeout defaults to 86400000 ms. Retry agent connect to resume after an interrupted wait."); + .option("--no-wait", "Return pending status instead of waiting for dashboard approval") + .action(bind(handleAgentConnect)), "Approval expires after 24 hours. Default mode waits up to 86400000 ms. --no-wait reads one status snapshot (30000 ms default), returning pending with a resume command or completing an approved connection. --print-url places the handoff URL in the pending result. Retry agent connect to resume after an interrupted wait."); agent.command("status").description("Inspect this agent's connection") .action(bind(handleAgentStatus)); agent.command("disconnect").description("Disconnect this agent") diff --git a/plugins/screenrig/cli/dist/cli-commands/agent.js.map b/plugins/screenrig/cli/dist/cli-commands/agent.js.map index bb66cca4..0db6c288 100644 --- a/plugins/screenrig/cli/dist/cli-commands/agent.js.map +++ b/plugins/screenrig/cli/dist/cli-commands/agent.js.map @@ -1 +1 @@ -{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../src/cli-commands/agent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAEjH,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,UAAU,qBAAqB,CAAC,IAAa,EAAE,IAAyB;IAC5E,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,wCAAwC,CAAC,CAAC;IAE1F,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,8CAA8C,CAAC;SAChF,MAAM,CAAC,mBAAmB,EAAE,+BAA+B,CAAC;SAC5D,MAAM,CAAC,eAAe,EAAE,kCAAkC,CAAC;SAC3D,MAAM,CAAC,kBAAkB,EAAE,oCAAoC,CAAC;SAChE,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAEnC,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,yCAAyC,CAAC;SAC5F,MAAM,CAAC,eAAe,EAAE,kCAAkC,CAAC;SAC3D,MAAM,CAAC,aAAa,EAAE,gCAAgC,CAAC;SACvD,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,EAAE,8HAA8H,CAAC,CAAC;IAErK,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,iCAAiC,CAAC;SACnE,MAAM,CAAC,IAAI,CAAC,iBA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OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,iCAAiC,CAAC;SACnE,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAEnC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,WAAW,CAAC,uBAAuB,CAAC;SAC7D,MAAM,CAAC,OAAO,EAAE,oCAAoC,CAAC;SACrD,MAAM,CAAC,iBAAiB,EAAE,oCAAoC,CAAC;SAC/D,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC;AACzC,CAAC"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/app.js b/plugins/screenrig/cli/dist/cli-commands/app.js index 43b899b3..15f76839 100644 --- a/plugins/screenrig/cli/dist/cli-commands/app.js +++ b/plugins/screenrig/cli/dist/cli-commands/app.js @@ -15,7 +15,7 @@ export function registerAppCommands(root, bind) { app.command("update").description("Update an application") .argument("", "Application identifier") .argument("", "Local directory") - .requiredOption("--if-match ", "Require the current resource revision (required)", revision) + .requiredOption("--expect-rev ", "Require the current resource revision (required)", revision) .option("--no-wait", "Return after acceptance without waiting for processing") .option("--poll-ms ", "Set the operation polling interval", positiveInteger("poll-ms")) .action(bind(handleAppUpdate)); diff --git a/plugins/screenrig/cli/dist/cli-commands/app.js.map b/plugins/screenrig/cli/dist/cli-commands/app.js.map index 905ba97f..8fc95a28 100644 --- a/plugins/screenrig/cli/dist/cli-commands/app.js.map +++ b/plugins/screenrig/cli/dist/cli-commands/app.js.map @@ -1 +1 @@ -{"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/cli-commands/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/G,MAAM,UAAU,mBAAmB,CAAC,IAAa,EAAE,IAAyB;I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AE,wBAAwB,CAAC;SAC1C,QAAQ,CAAC,aAAa,EAAE,iBAAiB,CAAC;SAC1C,cAAc,CAAC,yBAAyB,EAAE,kDAAkD,EAAE,QAAQ,CAAC;SACvG,MAAM,CAAC,WAAW,EAAE,wDAAwD,CAAC;SAC7E,MAAM,CAAC,gBAAgB,EAAE,oCAAoC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;SAC1F,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IAEjC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,mBAAmB,CAAC;SACjD,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IAE/B,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,wBAAwB,CAAC;SACtD,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;SAC1C,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;AACjC,CAAC"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/kv.js b/plugins/screenrig/cli/dist/cli-commands/kv.js index f46a9c39..d57f9f55 100644 --- a/plugins/screenrig/cli/dist/cli-commands/kv.js +++ b/plugins/screenrig/cli/dist/cli-commands/kv.js @@ -14,12 +14,12 @@ export function registerKvCommands(root, bind) { .addOption(new Option("--file ", "Read the value from a file").conflicts(["jsonValue", "valueBase64"])) .addOption(new Option("--value-base64 ", "Supply canonical base64 bytes (may be empty)").conflicts(["jsonValue", "file"])) .addOption(new Option("--content-type ", "Declare the content MIME type").conflicts(["jsonValue"])) - .option("--if-match ", "Require the current resource revision", revision) + .option("--expect-rev ", "Require the current resource revision", revision) .action(bind(handleKvSet)); kv.command("delete").description("Delete an application key") .argument("", "Application key") .requiredOption("--application-id ", "Select the application's K/V namespace (required)") - .requiredOption("--if-match ", "Require the current resource revision (required)", revision) + .requiredOption("--expect-rev ", "Require the current resource revision (required)", revision) .action(bind(handleKvDelete)); kv.command("list").description("List application keys") .requiredOption("--application-id ", "Select the application's K/V namespace (required)") diff --git a/plugins/screenrig/cli/dist/cli-commands/kv.js.map b/plugins/screenrig/cli/dist/cli-commands/kv.js.map index 4221ca91..8bae14b9 100644 --- a/plugins/screenrig/cli/dist/cli-commands/kv.js.map +++ b/plugins/screenrig/cli/dist/cli-commands/kv.js.map @@ -1 +1 @@ -{"version":3,"file":"kv.js","sourceRoot":"","sources":["../../src/cli-commands/kv.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACxF,OAAO,EAAgB,MAAM,EAAE,MAAM,WAAW,CAAC;AAEjD,MAAM,UAAU,kBAAkB,CAAC,IAAa,EAAE,IAAyB;IACzE,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,2CAA2C,CAAC,CAAC;IAEvF,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,yBAAyB,CAAC;SACrD,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;SACpC,cAAc,CAAC,uBAAuB,EAAE,mDAAmD,CAAC;SAC5F,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAE7B,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,eAAe,CAAC;SAC3C,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;SACpC,cAAc,CAAC,uBAAuB,EAAE,mDAAmD,CAAC;SAC5F,SAAS,CAAC,IAAI,MAAM,CAAC,qBAAqB,EAAE,qBAAqB,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC;SACrH,SAAS,CAAC,IAAI,MAAM,CAAC,eAAe,EAAE,4BAA4B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BAAuB,EAAE,mDAAmD,CAAC;SAC5F,cAAc,CAAC,yBAAyB,EAAE,kDAAkD,EAAE,QAAQ,CAAC;SACvG,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;IAEhC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,uBAAuB,CAAC;SACpD,cAAc,CAAC,uBAAuB,EAAE,mDAAmD,CAAC;SAC5F,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;AAChC,CAAC"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/media.d.ts.map b/plugins/screenrig/cli/dist/cli-commands/media.d.ts.map index 20ca1396..ef25a596 100644 --- a/plugins/screenrig/cli/dist/cli-commands/media.d.ts.map +++ b/plugins/screenrig/cli/dist/cli-commands/media.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../src/cli-commands/media.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,WAAW,CAAC;AAIjD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAmEpF"} \ No newline at end of file +{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../src/cli-commands/media.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,WAAW,CAAC;AAIjD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAwEpF"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/media.js b/plugins/screenrig/cli/dist/cli-commands/media.js index c4b98056..e395c63b 100644 --- a/plugins/screenrig/cli/dist/cli-commands/media.js +++ b/plugins/screenrig/cli/dist/cli-commands/media.js @@ -1,3 +1,4 @@ +import { usageError } from "../problems.js"; import { positiveInteger, positiveNumber, revision } from "./options.js"; import { handleMediaGenerate, handleMediaUpload, handleMediaUploadBatch, handleMediaShow, handleMediaDownload, handleMediaList, handleMediaUpdate, handleMediaDelete } from "../commands.js"; import { Option } from "commander"; @@ -6,10 +7,16 @@ import { CREDIT_HELP } from "../help-text.js"; export function registerMediaCommands(root, bind) { const media = root.command("media").description("Generate, upload, and manage images and videos"); addCommandNotes(media.command("generate").description("Generate an image from a prompt") - .requiredOption("--prompt ", "Describe the complete image to generate (required)") + .addOption(new Option("--prompt ", "Describe the complete image to generate").conflicts("promptFile")) + .addOption(new Option("--prompt-file ", "Read the complete prompt from a file or stdin (-)").conflicts("prompt")) .option("--aspect-ratio ", "Choose the generated image aspect ratio") .option("--quality ", "Choose generation quality") .option("--tag ", "Set the media tag") + .option("--no-progress", "Suppress stderr progress") + .hook("preAction", (command) => { + if (command.getOptionValue("prompt") === undefined && command.getOptionValue("promptFile") === undefined) + throw usageError("Provide --prompt TEXT or --prompt-file FILE."); + }) .action(bind(handleMediaGenerate)), CREDIT_HELP); media.command("upload").description("Upload an image or video") .argument("", "Local input file") @@ -56,11 +63,11 @@ export function registerMediaCommands(root, bind) { .argument("", "Media identifier") .addOption(new Option("--tag ", "Set the media tag").conflicts(["clearTag"])) .addOption(new Option("--clear-tag", "Remove the media tag").conflicts(["tag"])) - .requiredOption("--if-match ", "Require the current resource revision (required)", revision) + .requiredOption("--expect-rev ", "Require the current resource revision (required)", revision) .action(bind(handleMediaUpdate)); media.command("delete").description("Delete media") .argument("", "Media identifier") - .requiredOption("--if-match ", "Require the current resource revision (required)", revision) + .requiredOption("--expect-rev ", "Require the current resource revision (required)", revision) .action(bind(handleMediaDelete)); } //# sourceMappingURL=media.js.map \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/media.js.map b/plugins/screenrig/cli/dist/cli-commands/media.js.map index c0985d25..19ee438a 100644 --- a/plugins/screenrig/cli/dist/cli-commands/media.js.map +++ b/plugins/screenrig/cli/dist/cli-commands/media.js.map @@ -1 +1 @@ -{"version":3,"file":"media.js","sourceRoot":"","sources":["../../src/cli-commands/media.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEzE,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,eAAe,EAAE,mBAAmB,EAAE,eAAe,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC7L,OAAO,EAAgB,MAAM,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,UAAU,qBAAqB,CAAC,IAAa,EAAE,IAAyB;IAC5E,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,gDAAgD,CAAC,CAAC;IAElG,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC,iCAAiC,CAAC;SACrF,cAAc,CAAC,iBAAiB,EAAE,oDAAoD,CAAC;SACvF,MAAM,CAAC,wBAAwB,EAAE,yCAAyC,CAAC;SAC3E,MAAM,CAAC,6BAA6B,EAAE,2BAA2B,CAAC;SAClE,MAAM,CAAC,aAAa,EAAE,mBAAmB,CAAC;SAC1C,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;IAEnD,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,0BAA0B,CAAC;SAC5D,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;SACtC,MAAM,CAAC,uBAAuB,EAAE,+BAA+B,CAAC;SAChE,MAAM,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234c5b 100644 --- a/plugins/screenrig/cli/dist/cli-commands/playlist.d.ts.map +++ b/plugins/screenrig/cli/dist/cli-commands/playlist.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"playlist.d.ts","sourceRoot":"","sources":["../../src/cli-commands/playlist.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CA2DvF"} \ No newline at end of file +{"version":3,"file":"playlist.d.ts","sourceRoot":"","sources":["../../src/cli-commands/playlist.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAwEvF"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/playlist.js b/plugins/screenrig/cli/dist/cli-commands/playlist.js index 22eeab0a..f8adbc9e 100644 --- a/plugins/screenrig/cli/dist/cli-commands/playlist.js +++ b/plugins/screenrig/cli/dist/cli-commands/playlist.js @@ -1,10 +1,20 @@ import { usageError } from "../problems.js"; import { nonnegativeInteger, positiveInteger, revision } from "./options.js"; -import { handlePlaylistValidate, handlePlaylistPreview, handlePlaylistTemplates, handlePlaylistCreate, handlePlaylistUpdate, handlePlaylistExport, handlePlaylistImport, handlePlaylistShow, handlePlaylistList, handlePlaylistDelete } from "../commands.js"; +import { handlePlaylistInit, handlePlaylistValidate, handlePlaylistPreview, handlePlaylistTemplates, handlePlaylistCreate, handlePlaylistUpdate, handlePlaylistExport, handlePlaylistImport, handlePlaylistShow, handlePlaylistList, handlePlaylistDelete } from "../commands.js"; import { addCommandNotes } from "./notes.js"; import { LOOK_AT_THE_CONTACT_SHEET } from "../playlist-preview.js"; export function registerPlaylistCommands(root, bind) { const playlist = root.command("playlist").description("Author, validate, preview, and manage playlists"); + playlist.command("init").description("Prepare an editable full-screen playlist from ready media") + .argument("", "Media identifiers in playback order") + .requiredOption("--name ", "Playlist name") + .requiredOption("--output ", "Create an editable playlist file") + .option("--screen ", "Use this screen's reported playback dimensions") + .option("--target-width ", "Override canvas width", positiveInteger("target-width")) + .option("--target-height ", "Override canvas height", positiveInteger("target-height")) + .option("--duration-ms ", "Image page duration (default: 8000)", positiveInteger("duration-ms")) + .option("--fit ", "Content fit: contain (default), cover, or fill") + .action(bind(handlePlaylistInit)); playlist.command("validate").description("Validate a playlist file") .argument("", "Local input file") .option("--lint-only", "Run the command's local validation/lint mode") @@ -24,7 +34,7 @@ export function registerPlaylistCommands(root, bind) { playlist.command("update").description("Update a playlist") .argument("", "Playlist identifier") .argument("", "Local input file") - .requiredOption("--if-match ", "Require the current resource revision (required)", revision) + .requiredOption("--expect-rev ", "Require the current resource revision (required)", revision) .action(bind(handlePlaylistUpdate)); playlist.command("export").description("Export a playlist bundle") .argument("", "Playlist identifier") @@ -34,16 +44,18 @@ export function registerPlaylistCommands(root, bind) { .argument("", "Local directory") .option("--name ", "Set the imported playlist name") .option("--update ", "Update this playlist when importing") - .option("--if-match ", "Require the current resource revision", revision) + .option("--expect-rev ", "Require the current resource revision", revision) .option("--poll-ms ", "Set the operation polling interval", positiveInteger("poll-ms")) .hook("preAction", (command) => { const update = command.getOptionValueSource("update") === "cli"; - const ifMatch = command.getOptionValueSource("ifMatch") === "cli"; + const ifMatch = command.getOptionValueSource("expectRev") === "cli"; if (update !== ifMatch) - throw usageError("playlist import --update and --if-match must be supplied together."); + throw usageError("playlist import --update and --expect-rev must be supplied together."); }) .action(bind(handlePlaylistImport)); - playlist.command("show").description("Inspect a playlist") + playlist.command("show").description("Inspect a playlist or write an editable document") + .option("--output ", "Create an editable playlist file; report its revision on stdout") + .option("--editable", "Return an editable document and revision in the JSON envelope") .alias("get") .argument("", "Playlist identifier") .action(bind(handlePlaylistShow)); @@ -51,7 +63,7 @@ export function registerPlaylistCommands(root, bind) { .action(bind(handlePlaylistList)); playlist.command("delete").description("Delete a playlist") .argument("", "Playlist identifier") - .requiredOption("--if-match ", "Require the current resource revision (required)", revision) + .requiredOption("--expect-rev ", "Require the current resource revision (required)", revision) .action(bind(handlePlaylistDelete)); } //# sourceMappingURL=playlist.js.map \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/playlist.js.map b/plugins/screenrig/cli/dist/cli-commands/playlist.js.map index d45113a7..e6731731 100644 --- a/plugins/screenrig/cli/dist/cli-commands/playlist.js.map +++ b/plugins/screenrig/cli/dist/cli-commands/playlist.js.map @@ -1 +1 @@ -{"version":3,"file":"playlist.js","sourceRoot":"","sources":["../../src/cli-commands/playlist.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7E,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE9P,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,MAAM,UAAU,wBAAwB,CAAC,IAAa,EAAE,IAAyB;IAC/E,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC,iDAAiD,CAAC,CAAC;IAEzG,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC,0BAA0B,CAAC;S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,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAEtC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,kDAAkD,CAAC;SACrF,MAAM,CAAC,iBAAiB,EAAE,iEAAiE,CAAC;SAC5F,MAAM,CAAC,YAAY,EAAE,+DAA+D,CAAC;SACrF,KAAK,CAAC,KAAK,CAAC;SACZ,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC;SACvC,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAEpC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,gBAAgB,CAAC;SACnD,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAEpC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,mBAAmB,CAAC;SACxD,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC;SACvC,cAAc,CAAC,yBAAyB,EAAE,kDAAkD,EAAE,QAAQ,CAAC;SACvG,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC;AACxC,CAAC"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/screen.d.ts.map b/plugins/screenrig/cli/dist/cli-commands/screen.d.ts.map index eb2ae3df..741b0648 100644 --- a/plugins/screenrig/cli/dist/cli-commands/screen.d.ts.map +++ b/plugins/screenrig/cli/dist/cli-commands/screen.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"screen.d.ts","sourceRoot":"","sources":["../../src/cli-commands/screen.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CA0ErF"} \ No newline at end of file +{"version":3,"file":"screen.d.ts","sourceRoot":"","sources":["../../src/cli-commands/screen.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAgFrF"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/screen.js b/plugins/screenrig/cli/dist/cli-commands/screen.js index 63b2818f..925ce5a2 100644 --- a/plugins/screenrig/cli/dist/cli-commands/screen.js +++ b/plugins/screenrig/cli/dist/cli-commands/screen.js @@ -1,7 +1,12 @@ import { positiveInteger, revision, toastDuration } from "./options.js"; -import { handleScreenPair, handleScreenProvision, handleScreenUpdate, handleScreenList, handleScreenShow, handleScreenAssign, handleScreenSetTimezone, handleScreenArchive, handleScreenUnarchive, handleScreenDelete, handleScreenRotatePublicId, handleScreenToast, handleScreenScreenshot } from "../commands.js"; +import { handleScreenPublish, handleScreenPair, handleScreenProvision, handleScreenUpdate, handleScreenList, handleScreenShow, handleScreenAssign, handleScreenSetTimezone, handleScreenArchive, handleScreenUnarchive, handleScreenDelete, handleScreenRotatePublicId, handleScreenToast, handleScreenScreenshot } from "../commands.js"; export function registerScreenCommands(root, bind) { const screen = root.command("screen").description("Pair, configure, and inspect screens"); + screen.command("publish").description("Create a prepared playlist and assign it, with resumable recovery") + .argument("", "Screen identifier") + .argument("", "Prepared playlist file, or - for stdin") + .requiredOption("--expect-rev ", "Expected screen revision", revision) + .action(bind(handleScreenPublish)); screen.command("pair").description("Claim a Player pairing code") .argument("", "Player pairing code") .option("--label