From 7ba5ebc2ff33e1c8ecc92b4930ea3f1214dac74f Mon Sep 17 00:00:00 2001 From: Kurtis Jantzen Date: Fri, 11 Sep 2026 14:09:17 -0700 Subject: [PATCH 1/2] Align operating skill and bundled CLI with playlist preparation workflows --- .claude-plugin/marketplace.json | 2 +- components.lock.json | 4 +- plugins/screenrig/.claude-plugin/plugin.json | 2 +- plugins/screenrig/.codex-plugin/plugin.json | 2 +- plugins/screenrig/cli/README.md | 184 ++++++++++-- .../cli/assets/playlist-write.schema.json | 125 +++++++- .../screenrig/cli/dist/adapters/protocol.d.ts | 41 ++- .../cli/dist/adapters/protocol.d.ts.map | 2 +- .../cli/dist/adapters/protocol.js.map | 2 +- plugins/screenrig/cli/dist/argv.js | 2 +- plugins/screenrig/cli/dist/argv.js.map | 2 +- .../cli/dist/cli-commands/agent.d.ts.map | 2 +- .../screenrig/cli/dist/cli-commands/agent.js | 5 +- .../cli/dist/cli-commands/agent.js.map | 2 +- .../cli/dist/cli-commands/aliases.d.ts | 6 + .../cli/dist/cli-commands/aliases.d.ts.map | 1 + .../cli/dist/cli-commands/aliases.js | 21 ++ .../cli/dist/cli-commands/aliases.js.map | 1 + .../cli/dist/cli-commands/comment.d.ts.map | 2 +- .../cli/dist/cli-commands/comment.js | 6 + .../cli/dist/cli-commands/comment.js.map | 2 +- .../cli/dist/cli-commands/compose.d.ts.map | 2 +- .../cli/dist/cli-commands/compose.js | 14 +- .../cli/dist/cli-commands/compose.js.map | 2 +- .../cli/dist/cli-commands/feedback.d.ts.map | 2 +- .../cli/dist/cli-commands/feedback.js | 5 +- .../cli/dist/cli-commands/feedback.js.map | 2 +- .../cli/dist/cli-commands/guidance.d.ts | 4 + .../cli/dist/cli-commands/guidance.d.ts.map | 1 + .../cli/dist/cli-commands/guidance.js | 97 ++++++ .../cli/dist/cli-commands/guidance.js.map | 1 + .../cli/dist/cli-commands/index.d.ts.map | 2 +- .../screenrig/cli/dist/cli-commands/index.js | 4 + .../cli/dist/cli-commands/index.js.map | 2 +- .../cli/dist/cli-commands/kv.d.ts.map | 2 +- plugins/screenrig/cli/dist/cli-commands/kv.js | 12 +- .../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 | 25 +- .../cli/dist/cli-commands/media.js.map | 2 +- .../cli/dist/cli-commands/notes.d.ts | 9 + .../cli/dist/cli-commands/notes.d.ts.map | 2 +- .../screenrig/cli/dist/cli-commands/notes.js | 39 +++ .../cli/dist/cli-commands/notes.js.map | 2 +- .../cli/dist/cli-commands/operations.js | 2 +- .../cli/dist/cli-commands/operations.js.map | 2 +- .../cli/dist/cli-commands/playlist.d.ts | 2 +- .../cli/dist/cli-commands/playlist.d.ts.map | 2 +- .../cli/dist/cli-commands/playlist.js | 55 ++-- .../cli/dist/cli-commands/playlist.js.map | 2 +- .../cli/dist/cli-commands/recovery.d.ts | 4 + .../cli/dist/cli-commands/recovery.d.ts.map | 1 + .../cli/dist/cli-commands/recovery.js | 32 ++ .../cli/dist/cli-commands/recovery.js.map | 1 + .../cli/dist/cli-commands/screen.d.ts | 2 +- .../cli/dist/cli-commands/screen.d.ts.map | 2 +- .../screenrig/cli/dist/cli-commands/screen.js | 23 +- .../cli/dist/cli-commands/screen.js.map | 2 +- .../screenrig/cli/dist/cli-errors.d.ts.map | 2 +- plugins/screenrig/cli/dist/cli-errors.js | 9 + plugins/screenrig/cli/dist/cli-errors.js.map | 2 +- .../screenrig/cli/dist/command-path.d.ts.map | 2 +- plugins/screenrig/cli/dist/command-path.js | 8 +- .../screenrig/cli/dist/command-path.js.map | 2 +- plugins/screenrig/cli/dist/command-tree.d.ts | 1 + .../screenrig/cli/dist/command-tree.d.ts.map | 2 +- plugins/screenrig/cli/dist/command-tree.js | 14 +- .../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 | 276 ++++++++++++++++-- plugins/screenrig/cli/dist/commands.js.map | 2 +- plugins/screenrig/cli/dist/compose/catalog.js | 2 +- .../screenrig/cli/dist/compose/catalog.js.map | 2 +- plugins/screenrig/cli/dist/compose/types.d.ts | 2 +- .../screenrig/cli/dist/compose/types.d.ts.map | 2 +- plugins/screenrig/cli/dist/compose/types.js | 2 +- .../screenrig/cli/dist/compose/types.js.map | 2 +- plugins/screenrig/cli/dist/config.d.ts | 3 +- plugins/screenrig/cli/dist/config.d.ts.map | 2 +- plugins/screenrig/cli/dist/envelope.d.ts | 8 + plugins/screenrig/cli/dist/envelope.d.ts.map | 2 +- plugins/screenrig/cli/dist/envelope.js.map | 2 +- .../playlist-write-semantics.d.ts.map | 2 +- .../generated/playlist-write-semantics.js | 32 +- .../generated/playlist-write-semantics.js.map | 2 +- plugins/screenrig/cli/dist/help.d.ts | 34 ++- plugins/screenrig/cli/dist/help.d.ts.map | 2 +- plugins/screenrig/cli/dist/help.js | 30 +- plugins/screenrig/cli/dist/help.js.map | 2 +- .../cli/dist/playlist-authoring.d.ts | 9 + .../cli/dist/playlist-authoring.d.ts.map | 2 +- .../screenrig/cli/dist/playlist-authoring.js | 17 +- .../cli/dist/playlist-authoring.js.map | 2 +- .../screenrig/cli/dist/playlist-preview.js | 7 +- .../cli/dist/playlist-preview.js.map | 2 +- .../screenrig/cli/dist/playlist-release.d.ts | 40 +++ .../cli/dist/playlist-release.d.ts.map | 1 + .../screenrig/cli/dist/playlist-release.js | 66 +++++ .../cli/dist/playlist-release.js.map | 1 + plugins/screenrig/cli/dist/program.js | 2 +- plugins/screenrig/cli/dist/program.js.map | 2 +- .../cli/dist/screen-publish.d.ts.map | 2 +- plugins/screenrig/cli/dist/screen-publish.js | 25 +- .../screenrig/cli/dist/screen-publish.js.map | 2 +- .../screenrig/cli/dist/write-recovery.d.ts | 14 +- .../cli/dist/write-recovery.d.ts.map | 2 +- plugins/screenrig/cli/dist/write-recovery.js | 60 +++- .../screenrig/cli/dist/write-recovery.js.map | 2 +- plugins/screenrig/cli/package.json | 5 +- plugins/screenrig/skills/screenrig/SKILL.md | 19 +- .../screenrig/references/applications.md | 20 +- .../skills/screenrig/references/commands.md | 68 ++++- .../skills/screenrig/references/compose.md | 2 +- .../skills/screenrig/references/media.md | 2 +- .../skills/screenrig/references/playlists.md | 76 ++++- scripts/test-skill-commands.py | 6 +- skills/screenrig/SKILL.md | 19 +- skills/screenrig/references/applications.md | 20 +- skills/screenrig/references/commands.md | 68 ++++- skills/screenrig/references/compose.md | 2 +- skills/screenrig/references/media.md | 2 +- skills/screenrig/references/playlists.md | 76 ++++- 123 files changed, 1595 insertions(+), 290 deletions(-) create mode 100644 plugins/screenrig/cli/dist/cli-commands/aliases.d.ts create mode 100644 plugins/screenrig/cli/dist/cli-commands/aliases.d.ts.map create mode 100644 plugins/screenrig/cli/dist/cli-commands/aliases.js create mode 100644 plugins/screenrig/cli/dist/cli-commands/aliases.js.map create mode 100644 plugins/screenrig/cli/dist/cli-commands/guidance.d.ts create mode 100644 plugins/screenrig/cli/dist/cli-commands/guidance.d.ts.map create mode 100644 plugins/screenrig/cli/dist/cli-commands/guidance.js create mode 100644 plugins/screenrig/cli/dist/cli-commands/guidance.js.map create mode 100644 plugins/screenrig/cli/dist/cli-commands/recovery.d.ts create mode 100644 plugins/screenrig/cli/dist/cli-commands/recovery.d.ts.map create mode 100644 plugins/screenrig/cli/dist/cli-commands/recovery.js create mode 100644 plugins/screenrig/cli/dist/cli-commands/recovery.js.map create mode 100644 plugins/screenrig/cli/dist/playlist-release.d.ts create mode 100644 plugins/screenrig/cli/dist/playlist-release.d.ts.map create mode 100644 plugins/screenrig/cli/dist/playlist-release.js create mode 100644 plugins/screenrig/cli/dist/playlist-release.js.map diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 38d2cc93..0bf901a1 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "screenrig", "source": "./plugins/screenrig", "description": "Operate ScreenRig screens, media, and playlists with the bundled CLI.", - "version": "26.09.10", + "version": "26.09.0-dev", "author": { "name": "ScreenRig" }, diff --git a/components.lock.json b/components.lock.json index 6685e99c..d375f74a 100644 --- a/components.lock.json +++ b/components.lock.json @@ -3,10 +3,10 @@ "state": "resolved", "cli": { "repository": "screenrig/cli", - "commit": "880abf4fbf53af93e30ed59553ba1320db649e9f", + "commit": "dc5f8b40058d469986b2aac6fb83d95a1fcd2a4f", "artifact": { "file": "screenrig-cli.tgz", - "sha256": "19c4d7843edce94b35f73fc262ab4e52e6b84fb4266bd32b14e1f287def07c83" + "sha256": "06ebb02c05f333e584424b076fc28c677bafa9b69aeb9582d285c28b7fe0d224" } } } diff --git a/plugins/screenrig/.claude-plugin/plugin.json b/plugins/screenrig/.claude-plugin/plugin.json index 5f410fbe..0dddd539 100644 --- a/plugins/screenrig/.claude-plugin/plugin.json +++ b/plugins/screenrig/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "screenrig", - "version": "26.09.10", + "version": "26.09.0-dev", "description": "Operate ScreenRig screens, media, playlists, and applications with the bundled CLI.", "author": { "name": "ScreenRig" diff --git a/plugins/screenrig/.codex-plugin/plugin.json b/plugins/screenrig/.codex-plugin/plugin.json index c6f52644..799f3c53 100644 --- a/plugins/screenrig/.codex-plugin/plugin.json +++ b/plugins/screenrig/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "screenrig", - "version": "26.09.10", + "version": "26.09.0-dev", "description": "Operate ScreenRig screens, media, playlists, and applications with the bundled CLI.", "author": { "name": "ScreenRig" diff --git a/plugins/screenrig/cli/README.md b/plugins/screenrig/cli/README.md index 83778504..205d2614 100644 --- a/plugins/screenrig/cli/README.md +++ b/plugins/screenrig/cli/README.md @@ -21,7 +21,7 @@ screenrig version ``` Node.js 20.11 or newer is required. `media upload` additionally requires ffmpeg -and ffprobe; the other commands do not. Run `screenrig doctor` to inspect +and ffprobe, as do batch uploads and playlist preparation from local media files. Run `screenrig doctor` to inspect the optional media toolchain before an upload. This global package is the official developer-shell distribution. It is not the @@ -45,9 +45,12 @@ The customer surface is content (`app`, `media`, `compose`), playlists, and scre Discover commands progressively with `screenrig --help`, `screenrig screen --help`, and `screenrig screen assign --help`. Deeper groups work the same way: `screenrig comment show --help`. `screenrig help screen assign` is equivalent. -Add `--json` for structured child command paths, invocation syntax, and option types; +Use `screenrig help --all` for the complete command inventory, or +`screenrig help --all screen` for one group's descendants. Normal help lists +immediate children. Add `--json` for structured command paths, positional arguments, +option choices and defaults, relationships, and examples; help runs without configuration or authentication. Command-specific options follow -that command, for example `screenrig screen update ID --name Lobby --if-match 1`. +that command, for example `screenrig screen update ID --name Lobby --expect-rev 1`. Global options such as `--json` may appear before or after the command. Use `--name=VALUE` for a value starting with a dash, and `--` before option-like file names. Duplicate options are rejected. @@ -59,6 +62,65 @@ Choose by what the page is: - Slide-deck-like experiences: local unbilled `compose render`. - Live video, iframe, or webapp: write playlist primitives. +## Command vocabulary + +Use these canonical spellings in new invocations and examples: + +| Concept | Spelling | Compatibility | +| --- | --- | --- | +| Inspect one resource | `show` (including `operations show`) | `operations get` and `playlist get` remain aliases | +| Read/write a K/V value | `kv get` / `kv set` | Values retain their byte-oriented semantics | +| Display name | `--name` | Screen pair/provision retain `--label` | +| Select a screen | `--screen-id` | Playlist init retains `--screen` | +| Select an application namespace | `--app-id` | K/V retains `--application-id` | +| Select a playlist or release | `--playlist-id` / `--release-id` | IDs stay explicit | +| Guard a revision | `--expect-rev` | `--if-match` remains an alias | +| Read a collection | `list` | `events` and `operations` retain established plural group names | + +The application command group is `app`; use “application” in explanatory prose. +Keep the established `comment ACTION screen|playlist ID` grammar. `--page` and +`--primitive` identify objects within a playlist, rather than account resources. +Use `--after` for an event cursor (`--cursor` remains an alias). `--output` selects +an output path; each command states whether it expects a file or directory. +Durations use milliseconds as stated by `--duration-ms`, `--poll-ms`, and `--timeout`. + +Legacy option spellings share the same value and validation as their canonical +option; supplying both is an error. JSON help exposes compatibility spellings in +`options[].aliases`. Response fields and backend contracts are unchanged. +Option `relationships` describe `exactlyOne`, `atLeastOne`, and `together` groups; +`requires` means the first option requires every remaining option. These same +rules validate invocations before configuration or network access. + +## Screen host and recovery + +Native players report the shell and hardware they run on. `screen show` prints +that as a `Host` block (platform, host version, model, manufacturer, firmware, +serial, DUID, MAC, capabilities, and when it was last updated); absent fields +are omitted, and `screen list` adds a `PLATFORM` column when any screen reports +one. In JSON mode the fields pass through as `host` and `host_updated_at`. The +host is a hint that names a device. It is never a credential and never +authorizes anything; only the player's key does. + +When a display loses its stored identity (for example after a factory reset) +and starts pairing again while reporting identifiers that match exactly one of +your screens, the server records an offer on that screen. `screen show` and +`screen list` show it as `recovery_pending` with its deadline. Nothing changes +until you confirm: + +```bash +screenrig screen show scr_LOBBY +screenrig screen recover scr_LOBBY +``` + +`screen recover` reconnects the display to the existing screen: the label, +playlist, timezone, schedules, and history stay; the display's new key replaces +the previous one, which retires after a fifteen-minute grace window. Recovery +never happens without this confirmation and never crosses accounts. If you do +not confirm, the pairing code still works as a new screen. The command exits +nonzero with `recovery_not_offered` when nothing is pending, +`recovery_expired` when the display's pairing session lapsed, and +`recovery_ambiguous` when the identifiers are attached to more than one screen. + ## Application command results `app upload` and `app update` return the same JSON data paths with or without @@ -69,7 +131,7 @@ for the current revision before an update. `data.operation` contains the observed completed operation when waiting. With `--no-wait` it is `null`: upload acceptance does not establish operation state -or release readiness. Use `operations get ` or +or release readiness. Use `operations show ` or `operations wait ` to observe processing. The envelope's `operation_id` identifies that same operation in either mode. Existing flat accepted fields (`data.id`, `data.release_id`, `data.operation_id`) and @@ -79,21 +141,30 @@ accepted fields (`data.id`, `data.release_id`, `data.operation_id`) and ### Nonblocking agent connection -`screenrig agent connect --no-wait --print-url` starts or resumes a connection, +`screenrig agent connect --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 +pending, `data.status` is `pending`, `data.request_submitted` is `true`, +`data.connection_complete` is `false`, `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 +for the intended user, then run `screenrig agent connect` again. An approved connection completes credential collection and activation and returns -`data.status: active`. No credential is included in either result. +`data.status: active` and `data.connection_complete: true`. 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. +URL in the pending result only if opening fails. The default (also `--no-wait`) +reads a status snapshot for at most one second. If none arrives, the request +remains resumable and `data.status_checked` is `false`; this does not assert +that the server still awaits approval. A received pending snapshot sets it to +`true`. Success with pending status means submission succeeded, not connection +completion. + +Use `agent connect --wait` to wait for approval for up to 30 seconds, or +`agent connect --wait --timeout 10000` for an explicit budget in milliseconds +(1–86400000). Reaching the wait budget returns a resumable pending result. +Without `--wait`, `--timeout` can shorten but never extend the one-second +snapshot budget. Approval requests expire after 24 hours. Terminal denial, +cancellation, and expiry remain errors. ### Recovering writes @@ -105,8 +176,8 @@ 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 +The private config stores request fingerprints, keys, timestamps, and the command +group/action, 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 @@ -116,6 +187,16 @@ 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. +Use `screenrig recovery list` and `screenrig recovery show ID` to inspect local +pending writes. Results contain opaque recovery IDs, creation and replay-expiry +times, replay status, and command names where available. Older entries have no +command metadata. Request contents and retry keys are never returned. + +After checking the remote outcome, run `screenrig recovery reconcile ID` to remove +that entry's local retry protection. This does not retry, cancel, or undo the remote +write; a subsequent invocation can make a new write. IDs identify a particular saved +entry, so an old ID cannot remove a replacement entry. These commands work locally +with the selected `--config`, including when credentials are no longer usable. Enrollment, generation, media uploads/batches, bundle imports, and browser handoffs retain their existing specialized recovery behavior. @@ -162,17 +243,46 @@ Report suspected vulnerabilities through the [security policy](SECURITY.md). 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 init med_POSTER med_VIDEO --name "Lobby loop" --screen-id 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`. +Inspect the document and preview before publishing. `playlist init` accepts ordered +local image/video files, ready `med_` IDs, pinned `rel_` application releases, and +HTTPS iframe URLs, including mixed inputs: + +```sh +screenrig playlist init ./poster.png med_VIDEO rel_APP https://example.com --name Lobby --screen-id scr_LOBBY --output lobby.json +``` + +Files use the normal media upload/transcode path and wait for readiness; ffmpeg +and ffprobe are required unless `--no-transcode` is used. Preparation uploads +files but does not create a remote playlist or assign a screen. Existing media +must be ready. Release availability and iframe embedding support still need +preview/server and Player verification. Preparation does not fetch iframe URLs. +Each file occurrence has a distinct upload key derived from the invocation's +idempotency key and its input position. For retryable preparation, supply +`--idempotency-key` from the first attempt and reuse it with identical inputs in +the same order, within the server's replay window. Declarations and commits then +reuse their respective per-file keys. Without an explicit key, a new invocation +gets new upload keys. If preparation fails after an upload, that media remains in +the account; inspect `media list` and reuse its ID instead of uploading it again. + +The canonical document contains one full-screen page per input, a black background, +and a 200 ms crossfade. Images use `--fit contain|cover|fill` (default `contain`); +videos are muted, do not loop, and advance on completion. Other pages advance after +`--duration-ms` (default 8000). Applications and iframes use `fill`; applications +are pinned to the supplied release and use timed advancement, without controller +privileges. Edit the document for application-controlled advancement. + +With `--screen-id`, the result includes `screen_id`, `screen_revision`, and a +`publish.argv` array containing the output path and observed revision. It also +returns `preview.argv`. These arrays preserve the selected config/API and paths +with spaces; execute preview, inspect it, then use the publish arguments. A later +screen change still produces a revision conflict. Target metadata stays outside +the playlist file. Override canvas dimensions with both `--target-width` and +`--target-height`; these also work without `--screen-id` (no publish arguments). Unknown or multiple reported surfaces require explicit dimensions. Output files must not already exist. @@ -189,7 +299,11 @@ repeat the identical command and input with the same config to resume. If playli 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 +created playlist can be assigned explicitly with `screen assign`. Assignment-conflict +guidance includes an inspection command and a separate assignment template with +``. Replace that placeholder only after inspecting the screen and +deciding the assignment is still intended. Structured argument arrays preserve the +selected configuration and API origin without requiring shell parsing. Publishing never silently refreshes the expected revision. Unfinished recovery stops after the 24-hour server idempotency window; inspect and reconcile before making more writes. @@ -208,6 +322,30 @@ 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. +After `app update` succeeds, take `data.application.release_id` and preview a +replacement of one explicitly identified application primitive: + +```sh +screenrig playlist replace-release pl_EXISTING --page board-page --primitive board --release-id rel_NEW +``` + +Review `data.previous_release_id`, `data.release_id`, and `data.affected_screens` +(including archived assignments). Then use the returned `data.revision` and +`data.impact` to apply that exact replacement: + +```sh +screenrig playlist replace-release pl_EXISTING --page board-page --primitive board --release-id rel_NEW --apply --expect-rev 4 --expect-impact TOKEN_FROM_PREVIEW +``` + +The CLI preserves the other primitives and playlist settings. Every screen +assigned to this shared playlist receives the new pin; archived screens retain +it for later use. A changed replacement, playlist revision, or observed screen +impact requires a fresh preview and review. Screen assignments can change after +the snapshot; the server atomically checks only the playlist revision. Release +availability and ownership are validated by the server on apply. After writing, +verify screen manifest revisions and playback. Existing pins stay unchanged +until the replacement is applied. + 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 diff --git a/plugins/screenrig/cli/assets/playlist-write.schema.json b/plugins/screenrig/cli/assets/playlist-write.schema.json index 24d3eec7..519878cf 100644 --- a/plugins/screenrig/cli/assets/playlist-write.schema.json +++ b/plugins/screenrig/cli/assets/playlist-write.schema.json @@ -1,5 +1,5 @@ { - "$comment": "Generated by screenrig-protocol-gen from api/openapi.yaml; sha256=442ef347a74607015f8a67c0efedd2630226c41b8b1db555ff1a55b3c46dbb02. Shape validation only; run canonical playlist-write-semantics.ts next. Reference resolution and DNS remain server checks.", + "$comment": "Generated by screenrig-protocol-gen from api/openapi.yaml; sha256=db0176925a42a59e8c7d3391ce655d5a6efbf878c4abcb971a746565d8a341ec. Shape validation only; run canonical playlist-write-semantics.ts next. Reference resolution and DNS remain server checks.", "$defs": { "CanvasBackground": { "description": "Solid canonical uppercase #RRGGBBAA, or a top-to-bottom linear gradient.", @@ -17,6 +17,28 @@ "pattern": "^#[0-9A-F]{8}$", "type": "string" }, + "HLSStreamSource": { + "additionalProperties": false, + "properties": { + "protocol": { + "enum": [ + "hls" + ], + "type": "string" + }, + "url": { + "format": "uri", + "maxLength": 2048, + "pattern": "^https://", + "type": "string" + } + }, + "required": [ + "protocol", + "url" + ], + "type": "object" + }, "LinearGradientBackground": { "additionalProperties": false, "description": "Top-to-bottom linear gradient. There is no angle field. stops has 2 through 8 entries, strictly increasing at in [0, 1], first at=0, last at=1.", @@ -574,6 +596,9 @@ }, { "$ref": "#/$defs/PlaylistIframePrimitiveWrite" + }, + { + "$ref": "#/$defs/PlaylistStreamPrimitiveWrite" } ] }, @@ -603,6 +628,68 @@ ], "type": "object" }, + "PlaylistStreamPrimitiveWrite": { + "additionalProperties": false, + "properties": { + "content_fit": { + "enum": [ + "contain", + "cover", + "fill" + ], + "type": "string" + }, + "enter": { + "$ref": "#/$defs/PrimitiveEnter" + }, + "fallback_media_id": { + "pattern": "^med_", + "type": "string" + }, + "id": { + "type": "string" + }, + "layer": { + "maximum": 1024, + "minimum": 0, + "type": "integer" + }, + "motion": { + "$ref": "#/$defs/PrimitiveMotion" + }, + "muted": { + "default": true, + "type": "boolean" + }, + "primitive": { + "enum": [ + "stream" + ], + "type": "string" + }, + "rect": { + "$ref": "#/$defs/PlaylistRect" + }, + "sources": { + "items": { + "$ref": "#/$defs/StreamSource" + }, + "maxItems": 2, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "id", + "primitive", + "sources", + "fallback_media_id", + "rect", + "layer", + "content_fit" + ], + "type": "object" + }, "PlaylistTransition": { "additionalProperties": false, "description": "Page transition. type and duration_ms are both required; OpenAPI does not default them. Swipe authoring examples use duration_ms 600; that value is not a schema default.", @@ -886,6 +973,42 @@ "speed" ], "type": "object" + }, + "StreamSource": { + "oneOf": [ + { + "$ref": "#/$defs/HLSStreamSource" + }, + { + "$ref": "#/$defs/UDPStreamSource" + } + ] + }, + "UDPStreamSource": { + "additionalProperties": false, + "properties": { + "group": { + "description": "IPv4 ASM group within 239.0.0.0/8. Raw MPEG-TS over UDP, not RTP.", + "type": "string" + }, + "port": { + "maximum": 65535, + "minimum": 1, + "type": "integer" + }, + "protocol": { + "enum": [ + "udp-mpegts" + ], + "type": "string" + } + }, + "required": [ + "protocol", + "group", + "port" + ], + "type": "object" } }, "$id": "https://screenrig.ai/schemas/playlist-write/v1", diff --git a/plugins/screenrig/cli/dist/adapters/protocol.d.ts b/plugins/screenrig/cli/dist/adapters/protocol.d.ts index ade1f8be..1c77fd45 100644 --- a/plugins/screenrig/cli/dist/adapters/protocol.d.ts +++ b/plugins/screenrig/cli/dist/adapters/protocol.d.ts @@ -235,9 +235,45 @@ export interface PageFailure { code: string; page_id: string; } +/** + * Optional hardware identifiers a player reported. duid and serial are the + * only two the recovery hint consults. A failed read on the player omits the + * field. Never authorization. + */ +export interface HostDevice { + duid?: string; + serial?: string; + mac?: string; + model?: string; + firmware?: string; + manufacturer?: string; +} +/** + * The shell and hardware a player runs on, as the player reported it. A hint + * that names a device; never a credential. Read-only on the account API and + * returned only to the owning account. + */ +export interface HostContext { + platform: "tizen" | "android" | "windows" | "qt" | "apple" | "chromeos" | "browser"; + host_version?: string; + device?: HostDevice; + capabilities?: string[]; +} +/** + * Present while a native pairing session that presented this screen's + * hardware identity waits for the owning account to confirm with + * `screen recover`. Carries only the pairing session's deadline. + */ +export interface ScreenRecoveryPending { + expires_at: string; +} export interface Screen { content_access_generation: number; created_at: string; + /** Player-reported host hint. Absent until a native player sends one. */ + host?: HostContext; + /** Instant the stored host hint was last replaced. Account cannot write it. */ + host_updated_at?: string; id: string; label: string; /** @@ -266,6 +302,8 @@ export interface Screen { */ comments?: Record; public_id: string; + /** Read-only recovery offer awaiting confirmation. Absent once confirmed, lapsed, or claimed as a new screen. */ + recovery_pending?: ScreenRecoveryPending; revision: number; state: "pairing_pending" | "active" | "archived"; /** @@ -279,7 +317,8 @@ export interface Screen { * The screen patch body. Every member is optional and the server requires at * least one, which is why each command builds only the members it was asked * for rather than sending undefined placeholders. Observation, online, - * last_online_at, last_ip, and comments are not patchable fields. + * last_online_at, last_ip, comments, host, host_updated_at, and + * recovery_pending are not patchable fields. */ export interface ScreenPatch { name?: string; diff --git a/plugins/screenrig/cli/dist/adapters/protocol.d.ts.map b/plugins/screenrig/cli/dist/adapters/protocol.d.ts.map index 09417bdf..094f3c82 100644 --- a/plugins/screenrig/cli/dist/adapters/protocol.d.ts.map +++ b/plugins/screenrig/cli/dist/adapters/protocol.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/adapters/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEzF,MAAM,WAAW,OAAO;IACtB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,KAAK,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,QAAQ,GAAG,WAAW,GAAG,SAAS,CAAC;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC;IACb,gBAAgB,EAAE,KAAK,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,KAAK;IACpB,UAAU,EAAE,MAA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AAC;CACrB;AAED,MAAM,WAAW,OAAQ,SAAQ,UAAU;IACzC,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,SAAS,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,eAAe,CAAC;CAC3B;AAED,mEAAmE;AACnE,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,kBAAkB,EAAE,CAAC;CAC7B;AAED,eAAO,MAAM,0BAA0B,4BAA4B,CAAC"} \ No newline at end of file +{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/adapters/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEzF,MAAM,WAAW,OAAO;IACtB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,KAAK,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB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AE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,SAAU,SAAQ,UAAU;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,OAAQ,SAAQ,UAAU;IACzC,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,SAAS,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,eAAe,CAAC;CAC3B;AAED,mEAAmE;AACnE,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,kBAAkB,EAAE,CAAC;CAC7B;AAED,eAAO,MAAM,0BAA0B,4BAA4B,CAAC"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/adapters/protocol.js.map b/plugins/screenrig/cli/dist/adapters/protocol.js.map index db351c2e..56648be6 100644 --- a/plugins/screenrig/cli/dist/adapters/protocol.js.map +++ b/plugins/screenrig/cli/dist/adapters/protocol.js.map @@ -1 +1 @@ -{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/adapters/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAqNH,MAAM,CAAC,MAAM,sBAAsB,GAAkB;IACnD,yBAAyB,EAAE,GAAG,GAAG,IAAI,GAAG,IAAI;IAC5C,0BAA0B,EAAE,GAAG,GAAG,IAAI,GAAG,IAAI;IAC7C,sBAAsB,EAAE,IAAI;IAC5B,sBAAsB,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI;IACxC,sBAAsB,EAAE,EAAE;IAC1B,sBAAsB,EAAE,GAAG;CAC5B,CAAC;AAEF,MAAM,UAAU,sBAAsB,CAAC,YAA0B;IAC/D,OAAO;QACL,yBAAyB,EAAE,YAAY,CAAC,4BAA4B;QACpE,0BAA0B,EAAE,YAAY,CAAC,0BAA0B;QACnE,sBAAsB,EAAE,YAAY,CAAC,sBAAsB;QAC3D,sBAAsB,EAAE,YAAY,CAAC,sBAAsB;QAC3D,sBAAsB,EAAE,YAAY,CAAC,sBAAsB;QAC3D,sBAAsB,EAAE,YAAY,CAAC,sBAAsB;KAC5D,CAAC;AACJ,CAAC;AAyUD,MAAM,CAAC,MAAM,0BAA0B,GAAG,yBAAyB,CAAC"} \ No newline at end of file +{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/adapters/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAqNH,MAAM,CAAC,MAAM,sBAAsB,GAAkB;IACnD,yBAAyB,EAAE,GAAG,GAAG,IAAI,GAAG,IAAI;IAC5C,0BAA0B,EAAE,GAAG,GAAG,IAAI,GAAG,IAAI;IAC7C,sBAAsB,EAAE,IAAI;IAC5B,sBAAsB,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI;IACxC,sBAAsB,EAAE,EAAE;IAC1B,sBAAsB,EAAE,GAAG;CAC5B,CAAC;AAEF,MAAM,UAAU,sBAAsB,CAAC,YAA0B;IAC/D,OAAO;QACL,yBAAyB,EAAE,YAAY,CAAC,4BAA4B;QACpE,0BAA0B,EAAE,YAAY,CAAC,0BAA0B;QACnE,sBAAsB,EAAE,YAAY,CAAC,sBAAsB;QAC3D,sBAAsB,EAAE,YAAY,CAAC,sBAAsB;QAC3D,sBAAsB,EAAE,YAAY,CAAC,sBAAsB;QAC3D,sBAAsB,EAAE,YAAY,CAAC,sBAAsB;KAC5D,CAAC;AACJ,CAAC;AAmXD,MAAM,CAAC,MAAM,0BAA0B,GAAG,yBAAyB,CAAC"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/argv.js b/plugins/screenrig/cli/dist/argv.js index 7a07fa1e..ba6b7692 100644 --- a/plugins/screenrig/cli/dist/argv.js +++ b/plugins/screenrig/cli/dist/argv.js @@ -18,7 +18,7 @@ export function parseArgv(argv) { if (tree.versionRequested()) args.flags.version = true; if (tree.helpRequested()) { - const help = describeHelp(tree.selected()); + const help = describeHelp(tree.selected(), tree.inventoryRequested()); return { command: help.path.slice(0, 2), positionals: help.path, flags: { ...args.flags, help: true }, help }; } return args; diff --git a/plugins/screenrig/cli/dist/argv.js.map b/plugins/screenrig/cli/dist/argv.js.map index ffa9c6a6..17039788 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,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,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,IAAI,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;IACnC,MAAM,IAAI,GA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627..a1cbb850 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,CAsBpF"} \ 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,CAuBpF"} \ 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 c927f162..1fb0b9a0 100644 --- a/plugins/screenrig/cli/dist/cli-commands/agent.js +++ b/plugins/screenrig/cli/dist/cli-commands/agent.js @@ -10,8 +10,9 @@ 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") - .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."); + .option("--wait", "Wait for dashboard approval (30000 ms default; bounded by --timeout)") + .option("--no-wait", "Read a status snapshot for at most 1000 ms (default)") + .action(bind(handleAgentConnect)), "Approval expires after 24 hours. By default, read one status snapshot for at most 1000 ms and return pending with a resume command, or complete an approved connection. --wait opts into a 30000 ms approval wait; --timeout bounds that wait (1–86400000 ms). Without --wait, --timeout can shorten but never extend the snapshot budget. Pending means the request was submitted, not that approval or activation completed. --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 0db6c288..3e37f8f2 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,MAA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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,QAAQ,EAAE,sEAAsE,CAAC;SACxF,MAAM,CAAC,WAAW,EAAE,sDAAsD,CAAC;SAC3E,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,EAAE,mhBAAmhB,CAAC,CAAC;IAE1jB,KAAK,CAAC,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/aliases.d.ts b/plugins/screenrig/cli/dist/cli-commands/aliases.d.ts new file mode 100644 index 00000000..daf99ea9 --- /dev/null +++ b/plugins/screenrig/cli/dist/cli-commands/aliases.d.ts @@ -0,0 +1,6 @@ +import { type Command, Option } from "commander"; +/** Both spellings share one Commander value and validation; handlers keep their contract. */ +export declare function addValueAlias(command: Command, canonical: string, legacy: string, description: string, required?: boolean): void; +export declare function handlerOptionName(option: Option): string; +export declare function optionAliases(option: Option): string[]; +//# sourceMappingURL=aliases.d.ts.map \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/aliases.d.ts.map b/plugins/screenrig/cli/dist/cli-commands/aliases.d.ts.map new file mode 100644 index 00000000..0018f3ba --- /dev/null +++ b/plugins/screenrig/cli/dist/cli-commands/aliases.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"aliases.d.ts","sourceRoot":"","sources":["../../src/cli-commands/aliases.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAKjD,6FAA6F;AAC7F,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,UAAQ,GAAG,IAAI,CAU9H;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAExD;AACD,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAsC"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/aliases.js b/plugins/screenrig/cli/dist/cli-commands/aliases.js new file mode 100644 index 00000000..18a31d2b --- /dev/null +++ b/plugins/screenrig/cli/dist/cli-commands/aliases.js @@ -0,0 +1,21 @@ +import { Option } from "commander"; +const handlers = new WeakMap(); +const aliases = new WeakMap(); +/** Both spellings share one Commander value and validation; handlers keep their contract. */ +export function addValueAlias(command, canonical, legacy, description, required = false) { + const placeholder = canonical === "--name" ? "NAME" : "ID"; + const option = new Option(`${canonical} <${placeholder}>`, `${description} (${legacy} alias)`); + if (required) + option.makeOptionMandatory(); + const alias = new Option(`${legacy} <${placeholder}>`, `Alias for ${canonical}`).hideHelp(); + alias.attributeName = () => option.attributeName(); + handlers.set(option, legacy.slice(2)); + handlers.set(alias, legacy.slice(2)); + aliases.set(option, [legacy]); + command.addOption(option).addOption(alias); +} +export function handlerOptionName(option) { + return handlers.get(option) ?? (option.long === "--expect-rev" ? "if-match" : option.long.slice(2)); +} +export function optionAliases(option) { return aliases.get(option) ?? []; } +//# sourceMappingURL=aliases.js.map \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/aliases.js.map b/plugins/screenrig/cli/dist/cli-commands/aliases.js.map new file mode 100644 index 00000000..cd99e994 --- /dev/null +++ b/plugins/screenrig/cli/dist/cli-commands/aliases.js.map @@ -0,0 +1 @@ +{"version":3,"file":"aliases.js","sourceRoot":"","sources":["../../src/cli-commands/aliases.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,MAAM,EAAE,MAAM,WAAW,CAAC;AAEjD,MAAM,QAAQ,GAAG,IAAI,OAAO,EAAkB,CAAC;AAC/C,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD,6FAA6F;AAC7F,MAAM,UAAU,aAAa,CAAC,OAAgB,EAAE,SAAiB,EAAE,MAAc,EAAE,WAAmB,EAAE,QAAQ,GAAG,KAAK;IACtH,MAAM,WAAW,GAAG,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IAC3D,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,GAAG,SAAS,KAAK,WAAW,GAAG,EAAE,GAAG,WAAW,KAAK,MAAM,SAAS,CAAC,CAAC;IAC/F,IAAI,QAAQ;QAAE,MAAM,CAAC,mBAAmB,EAAE,CAAC;IAC3C,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,GAAG,MAAM,KAAK,WAAW,GAAG,EAAE,aAAa,SAAS,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC5F,KAAK,CAAC,aAAa,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC;IACnD,QAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACrC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9B,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,MAAc;IAC9C,OAAO,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,IAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACvG,CAAC;AACD,MAAM,UAAU,aAAa,CAAC,MAAc,IAAc,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/comment.d.ts.map b/plugins/screenrig/cli/dist/cli-commands/comment.d.ts.map index 5546dedb..1590614d 100644 --- a/plugins/screenrig/cli/dist/cli-commands/comment.d.ts.map +++ b/plugins/screenrig/cli/dist/cli-commands/comment.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../src/cli-commands/comment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,WAAW,CAAC;AAEjD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAuCtF"} \ No newline at end of file +{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../src/cli-commands/comment.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,WAAW,CAAC;AAEjD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAyCtF"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/comment.js b/plugins/screenrig/cli/dist/cli-commands/comment.js index 1a058991..cfc561a4 100644 --- a/plugins/screenrig/cli/dist/cli-commands/comment.js +++ b/plugins/screenrig/cli/dist/cli-commands/comment.js @@ -1,3 +1,4 @@ +import { requireOptionGroup } from "./notes.js"; import { handleCommentShowScreen, handleCommentShowPlaylist, handleCommentSetScreen, handleCommentSetPlaylist, handleCommentDeleteScreen, handleCommentDeletePlaylist } from "../commands.js"; import { Option } from "commander"; export function registerCommentCommands(root, bind) { @@ -30,5 +31,10 @@ export function registerCommentCommands(root, bind) { .argument("", "Screen or playlist identifier") .option("--page ", "Select playlist page comments") .action(bind(handleCommentDeletePlaylist)); + for (const command of commentSet.commands) + requireOptionGroup(command, "exactlyOne", ["--json-value", "--file"]); + for (const action of comment.commands) + for (const command of action.commands) + command.registeredArguments[0].description = command.name() === "screen" ? "Screen identifier" : "Playlist identifier"; } //# sourceMappingURL=comment.js.map \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/comment.js.map b/plugins/screenrig/cli/dist/cli-commands/comment.js.map index b3cc915c..ad087488 100644 --- a/plugins/screenrig/cli/dist/cli-commands/comment.js.map +++ b/plugins/screenrig/cli/dist/cli-commands/comment.js.map @@ -1 +1 @@ -{"version":3,"file":"comment.js","sourceRoot":"","sources":["../../src/cli-commands/comment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAC9L,OAAO,EAAgB,MAAM,EAAE,MAAM,WAAW,CAAC;AAEjD,MAAM,UAAU,uBAAuB,CAAC,IAAa,EAAE,IAAyB;IAC9E,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,8CAA8C,CAAC,CAAC;IAEpG,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CA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M,CAAC,eAAe,EAAE,4BAA4B,CAAC,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;SAC7F,MAAM,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC;IAE1C,MAAM,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,oCAAoC,CAAC,CAAC;IAElG,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,wBAAwB,CAAC;SAClE,QAAQ,CAAC,MAAM,EAAE,+BAA+B,CAAC;SACjD,MAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC,CAAC;IAE3C,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC,0BAA0B,CAAC;SACtE,QAAQ,CAAC,MAAM,EAAE,+BAA+B,CAAC;SACjD,MAAM,CAAC,kBAAkB,EAAE,+BAA+B,CAAC;SAC3D,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC,CAAC;IAC7C,KAAK,MAAM,OAAO,IAAI,UAAU,CAAC,QAAQ;QAAE,kBAAkB,CAAC,OAAO,EAAE,YAAY,EAAE,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC;IACjH,KAAK,MAAM,MAAM,IAAI,OAAO,CAAC,QAAQ;QAAE,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,QAAQ;YAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAE,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,qBAAqB,CAAC;AACxM,CAAC"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/compose.d.ts.map b/plugins/screenrig/cli/dist/cli-commands/compose.d.ts.map index 410bd53b..e78ed770 100644 --- a/plugins/screenrig/cli/dist/cli-commands/compose.d.ts.map +++ b/plugins/screenrig/cli/dist/cli-commands/compose.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/cli-commands/compose.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CA4BtF"} \ No newline at end of file +{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/cli-commands/compose.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CA6BtF"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/compose.js b/plugins/screenrig/cli/dist/cli-commands/compose.js index 2c428258..b5d7e976 100644 --- a/plugins/screenrig/cli/dist/cli-commands/compose.js +++ b/plugins/screenrig/cli/dist/cli-commands/compose.js @@ -1,7 +1,6 @@ -import { usageError } from "../problems.js"; import { positiveInteger } from "./options.js"; import { handleComposeCatalog, handleComposeBatch, handleComposeRender } from "../commands.js"; -import { addCommandNotes } from "./notes.js"; +import { addCommandNotes, requireOptionGroup } from "./notes.js"; import { LOOK_AT_THE_CONTACT_SHEET } from "../playlist-preview.js"; export function registerComposeCommands(root, bind) { const compose = root.command("compose").description("Render and inspect local page compositions"); @@ -15,7 +14,6 @@ export function registerComposeCommands(root, bind) { .option("--target-height ", "Set the physical content height", positiveInteger("target-height")) .option("--safe-area", "Apply the display safe area") .option("--lint-only", "Run the command's local validation/lint mode") - .hook("preAction", requireTargetDimensions) .action(bind(handleComposeBatch)), `Render 1 to 2000 pages. ${LOOK_AT_THE_CONTACT_SHEET}`); addCommandNotes(compose.command("render").description("Render a composition locally") .argument("", "Local input file") @@ -26,13 +24,9 @@ export function registerComposeCommands(root, bind) { .option("--safe-area", "Apply the display safe area") .option("--open", "Open the result in its viewer") .option("--lint-only", "Run the command's local validation/lint mode") - .hook("preAction", requireTargetDimensions) .action(bind(handleComposeRender)), LOOK_AT_THE_CONTACT_SHEET); -} -function requireTargetDimensions(command) { - const width = command.getOptionValueSource("targetWidth") === "cli"; - const height = command.getOptionValueSource("targetHeight") === "cli"; - if (width !== height) - throw usageError("Provide both --target-width and --target-height."); + for (const command of compose.commands.filter((command) => ["batch", "render"].includes(command.name()))) { + requireOptionGroup(command, "together", ["--target-width", "--target-height"]); + } } //# sourceMappingURL=compose.js.map \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/compose.js.map b/plugins/screenrig/cli/dist/cli-commands/compose.js.map index 1c6ad727..f3129087 100644 --- a/plugins/screenrig/cli/dist/cli-commands/compose.js.map +++ b/plugins/screenrig/cli/dist/cli-commands/compose.js.map @@ -1 +1 @@ -{"version":3,"file":"compose.js","sourceRoot":"","sources":["../../src/cli-commands/compose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE/F,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,MAAM,UAAU,uBAAuB,CAAC,IAAa,EAAE,IAAyB;IAC9E,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,4CAA4C,CAAC,CAAC;IAElG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,WAAW,CAA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No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/feedback.d.ts.map b/plugins/screenrig/cli/dist/cli-commands/feedback.d.ts.map index 85eb3129..3fe3f6ab 100644 --- a/plugins/screenrig/cli/dist/cli-commands/feedback.d.ts.map +++ b/plugins/screenrig/cli/dist/cli-commands/feedback.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"feedback.d.ts","sourceRoot":"","sources":["../../src/cli-commands/feedback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,WAAW,CAAC;AAEjD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAsBvF"} \ No newline at end of file +{"version":3,"file":"feedback.d.ts","sourceRoot":"","sources":["../../src/cli-commands/feedback.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,WAAW,CAAC;AAEjD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAuBvF"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/feedback.js b/plugins/screenrig/cli/dist/cli-commands/feedback.js index 6d54882a..df950716 100644 --- a/plugins/screenrig/cli/dist/cli-commands/feedback.js +++ b/plugins/screenrig/cli/dist/cli-commands/feedback.js @@ -1,3 +1,4 @@ +import { requireOptionGroup } from "./notes.js"; import { handleFeedbackBug, handleFeedbackFeature, handleFeedbackList } from "../commands.js"; import { Option } from "commander"; export function registerFeedbackCommands(root, bind) { @@ -17,7 +18,9 @@ export function registerFeedbackCommands(root, bind) { .option("--no-context", "Omit diagnostic context") .action(bind(handleFeedbackFeature)); feedback.command("list").description("List submitted feedback") - .option("--kind ", "Filter feedback by kind") + .addOption(new Option("--kind ", "Filter feedback by kind").choices(["bug", "feature"])) .action(bind(handleFeedbackList)); + for (const command of feedback.commands.filter(command => command.name() !== "list")) + requireOptionGroup(command, "exactlyOne", ["--body", "--body-file"]); } //# sourceMappingURL=feedback.js.map \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/feedback.js.map b/plugins/screenrig/cli/dist/cli-commands/feedback.js.map index 835a258e..eeb813d4 100644 --- a/plugins/screenrig/cli/dist/cli-commands/feedback.js.map +++ b/plugins/screenrig/cli/dist/cli-commands/feedback.js.map @@ -1 +1 @@ -{"version":3,"file":"feedback.js","sourceRoot":"","sources":["../../src/cli-commands/feedback.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC9F,OAAO,EAAgB,MAAM,EAAE,MAAM,WAAW,CAAC;AAEjD,MAAM,UAAU,wBAAwB,CAAC,IAAa,EAAE,IAAyB;IAC/E,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC,kCAAkC,CAAC,CAAC;IAE1F,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,qBAAqB,CAAC;SACvD,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC;SACrC,SAAS,CAAC,IAAI,MAAM,CAAC,eAAe,EAAE,yBAAyB,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;SACzF,SAAS,CAAC,IAAI,MAAM,CAAC,oBAAoB,EAAE,mCAAmC,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;SACpG,MAAM,CAAC,0BAA0B,EAAE,+BAA+B,CAAC;SACnE,MAAM,CAAC,cAAc,EAAE,yBAAyB,CAAC;SACjD,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAEnC,QAAQ,CAAC,O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,CAAC;QAAE,kBAAkB,CAAC,OAAO,EAAE,YAAY,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;AAC7J,CAAC"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/guidance.d.ts b/plugins/screenrig/cli/dist/cli-commands/guidance.d.ts new file mode 100644 index 00000000..f0ff02c2 --- /dev/null +++ b/plugins/screenrig/cli/dist/cli-commands/guidance.d.ts @@ -0,0 +1,4 @@ +import type { Command } from "commander"; +/** Help-only workflow guidance. Syntax and validation belong to the native commands. */ +export declare function registerGuidance(root: Command): void; +//# sourceMappingURL=guidance.d.ts.map \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/guidance.d.ts.map b/plugins/screenrig/cli/dist/cli-commands/guidance.d.ts.map new file mode 100644 index 00000000..81315ed5 --- /dev/null +++ b/plugins/screenrig/cli/dist/cli-commands/guidance.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"guidance.d.ts","sourceRoot":"","sources":["../../src/cli-commands/guidance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,wFAAwF;AACxF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAuFpD"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/guidance.js b/plugins/screenrig/cli/dist/cli-commands/guidance.js new file mode 100644 index 00000000..ca7ca671 --- /dev/null +++ b/plugins/screenrig/cli/dist/cli-commands/guidance.js @@ -0,0 +1,97 @@ +import { findCommand } from "../command-path.js"; +import { addCommandExamples, addCommandNotes, commandExamples } from "./notes.js"; +/** Help-only workflow guidance. Syntax and validation belong to the native commands. */ +export function registerGuidance(root) { + const examples = { + "account show": [""], + "agent enroll": ["--email operator@example.com --name Lobby-agent"], + "agent connect": ["--print-url", "--wait --timeout 10000"], + "agent status": [""], + "agent disconnect": ["--yes"], + "dashboard": [""], + "app pack": ["./lobby-app --output lobby-app.tar.gz"], + "app upload": ['./lobby-app --name "Lobby app"'], + "app update": ["app_APP ./lobby-app --expect-rev 3"], + "app list": [""], "app show": ["app_APP"], + "media upload": ["./poster.png --tag Lobby"], + "media upload-batch": ["uploads.json --state uploads-state.json"], + "media show": ["med_MEDIA"], "media download": ["med_MEDIA --output poster.webp"], + "media list": ["--tag Lobby --primitive image"], + "media update": ["med_MEDIA --tag Lobby --expect-rev 2"], + "media delete": ["med_MEDIA --expect-rev 2"], + "compose catalog": [""], "compose render": ["slide.json --output rendered"], + "compose batch": ["slides.json --output rendered"], + "playlist validate": ["lobby.json"], "playlist preview": ["lobby.json --output preview --contact-sheet"], + "playlist templates": [""], "playlist create": ["lobby.json"], + "playlist update": ["pl_PLAYLIST lobby.json --expect-rev 4"], + "playlist export": ["pl_PLAYLIST --output lobby-bundle"], + "playlist import": ['lobby-bundle --name "Lobby copy"', "lobby-bundle --update pl_PLAYLIST --expect-rev 4"], + "playlist list": [""], "playlist delete": ["pl_PLAYLIST --expect-rev 4"], + "screen publish": ["scr_SCREEN lobby.json --expect-rev 7"], + "screen pair": ['234567 --name "Lobby screen"'], + "screen provision": ['--open --name "Lobby screen"'], + "screen update": ['scr_SCREEN --name "Lobby screen" --expect-rev 7'], + "screen list": ["", "--state archived"], "screen show": ["scr_SCREEN"], + "screen assign": ["scr_SCREEN --playlist-id pl_PLAYLIST --expect-rev 7"], + "screen set-timezone": ["scr_SCREEN --timezone America/Los_Angeles --expect-rev 7"], + "screen archive": ["scr_SCREEN --expect-rev 7"], "screen unarchive": ["scr_SCREEN --expect-rev 8"], + "screen delete": ["scr_SCREEN --expect-rev 8"], "screen rotate-public-id": ["scr_SCREEN --expect-rev 7"], + "screen toast": ['scr_SCREEN --text "Welcome" --duration-ms 5000'], + "screen screenshot": ["scr_SCREEN --output screenshot.webp"], + "browser setup": ["--code SETUP_CODE --open"], + "kv get": ["greeting --app-id app_APP"], + "kv set": ['greeting --app-id app_APP --json-value \'{"message":"Welcome"}\'', "greeting --app-id app_APP --file greeting.txt --content-type text/plain"], + "kv list": ["--app-id app_APP"], "kv delete": ["greeting --app-id app_APP --expect-rev 2"], + "comment show screen": ["scr_SCREEN"], "comment show playlist": ["pl_PLAYLIST --page page_1"], + "comment set screen": ["scr_SCREEN --file comments.json"], + "comment set playlist": ["pl_PLAYLIST --page page_1 --file comments.json"], + "comment delete screen": ["scr_SCREEN"], "comment delete playlist": ["pl_PLAYLIST --page page_1"], + "operations show": ["op_OPERATION"], "operations wait": ["op_OPERATION --timeout 120000"], + "operations cancel": ["op_OPERATION"], + "events list": ["--limit 20"], "events follow": ["--timeout 30000"], + "playback list": ["--screen-id scr_SCREEN"], + "feedback bug": ['"Preview failed" --body-file report.md'], + "feedback feature": ['"New workflow" --body-file request.md'], "feedback list": ["--kind bug"], + "doctor": [""], "version": [""], "recovery list": [""], + "recovery show": ["RECOVERY_ID"], "recovery reconcile": ["RECOVERY_ID"], + }; + for (const [path, suffixes] of Object.entries(examples)) { + const command = findCommand(root, path.split(" ")); + if (!command) + throw new Error(`Unknown example command ${path}`); + if (!commandExamples(command).length) + addCommandExamples(command, ...suffixes.map(suffix => `screenrig ${path}${suffix ? ` ${suffix}` : ""}`)); + } + const notes = { + "agent enroll": "For a new account, supply the user's contact email with --email. Existing accounts use agent connect. An already enrolled installation can reuse its saved enrollment.", + "app pack": "Local and unauthenticated. Pack an already-built static directory with a root index.html. app upload packs the directory itself; packing first is optional.", + "app upload": "Creates a new application and its first immutable release. Packs the built directory and waits for processing by default (120000 ms, polling every 1000 ms). With --no-wait, use operations wait on the returned operation_id before using the release.", + "app update": "Creates a new immutable release for the same application and preserves its K/V. Existing playlists remain pinned to their previous release. Use playlist replace-release to preview and apply an explicit replacement. Wait defaults: 120000 ms, polling every 1000 ms.", + "media upload": "Transcodes by default and requires ffmpeg and ffprobe. --no-transcode uploads accepted bytes unchanged. Waits for processing by default (120000 ms, polling every 1000 ms). For multiple files use media upload-batch with a manifest and state file.", + "media upload-batch": "Reuse the manifest and state file to resume. Default concurrency is 4 (range 1–8). Transcodes by default; ffmpeg and ffprobe are required unless --no-transcode is used. Upload polling defaults to 1000 ms.", + "playlist validate": "Local schema and semantic validation; no authentication required. --lint-only is accepted for compatibility: this command always validates locally. Authorization and readiness still require server checks.", + "playlist create": "Creates a new remote playlist without assigning screens. Supply a canonical {name, pages} document, not an inspection envelope. Names are unique per account. Use playlist init to prepare a document or screen publish to create and assign it.", + "playlist update": "Replaces the authored document and affects every assigned screen. First use playlist show ID --output FILE; edit that document and supply the returned playlist revision. Output files must not already exist.", + "playlist show": "Plain show is an inspection response. --editable returns data.document and revision; --output writes the editable document to a new file and reports the revision on stdout. When both are supplied, --output takes precedence.", + "playlist export": "The output directory must not exist. Exports referenced images and videos; application primitives cannot be exported. Dynamic selectors are snapshotted to explicit media IDs.", + "playlist import": "Creates a new playlist by default. For a copy in the same account, choose a different --name. Updating an existing playlist requires --update and --expect-rev together and affects all its assigned screens.", + "screen publish": "Creates a new playlist and assigns it; does not update an existing playlist by name. Use the screen revision from screen show or playlist init --screen-id. Inspect the prepared document and preview first. Repeat identical input to resume an ambiguous failure. After a revision conflict inspect the screen and follow the returned recovery instructions. Assignment readback does not prove playback; request and inspect screen screenshot separately.", + "screen assign": "Assigns an existing playlist. Obtain the expected screen revision from screen show. Scheduled playlists require the screen timezone. Use screen update to set timezone and assignment together.", + "screen screenshot": "Requests, waits for, and downloads a screenshot. Default wait is 35000 ms and polling interval is 500 ms. Stdout reports the saved path, never image bytes. Inspect the downloaded image to assess playback.", + "kv get": "Returns bytes as data.value_base64, including JSON values. Decode base64 and parse JSON only when data.content_type indicates JSON. kv list omits values.", + "kv set": "--json-value encodes JSON directly. --file reads a local file (not stdin); --value-base64 accepts canonical padded base64, including empty bytes. These two byte modes require --content-type. Supply --expect-rev when updating an existing key.", + "comment set": "Replaces comments with a JSON value from --json-value or a local --file (not stdin). Last write wins; comments do not take --expect-rev or bump the resource revision.", + "operations wait": "Wait defaults to 120000 ms, polling every 1000 ms. --timeout sets the wait budget. Use the operation_id returned by an accepted asynchronous command.", + "events follow": "Writes NDJSON: one JSON envelope per event on stdout. --after resumes from a cursor; --cursor is a compatibility alias. --timeout is in milliseconds; zero or omitted leaves the stream unbounded.", + }; + for (const [path, note] of Object.entries(notes)) { + const command = findCommand(root, path.split(" ")); + if (!command) + throw new Error(`Unknown guidance command ${path}`); + addCommandNotes(command, note); + if (path === "comment set") + for (const child of command.commands) + addCommandNotes(child, note); + } +} +//# sourceMappingURL=guidance.js.map \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/guidance.js.map b/plugins/screenrig/cli/dist/cli-commands/guidance.js.map new file mode 100644 index 00000000..c54f5267 --- /dev/null +++ b/plugins/screenrig/cli/dist/cli-commands/guidance.js.map @@ -0,0 +1 @@ +{"version":3,"file":"guidance.js","sourceRoot":"","sources":["../../src/cli-commands/guidance.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElF,wFAAwF;AACxF,MAAM,UAAU,gBAAgB,CAAC,IAAa;IAC5C,MAAM,QAAQ,GAA6B;QACzC,cAAc,EAAE,CAAC,EAAE,CAAC;QACpB,cAAc,EAAE,CAAC,iDAAiD,CAAC;QACnE,eAAe,EAAE,CAAC,aAAa,EAAE,wBAAwB,CAAC;QAC1D,cAAc,EAAE,CAAC,EAAE,CAAC;QACpB,kBAAkB,EAAE,CAAC,OAAO,CAAC;QAC7B,WAAW,EAAE,CAAC,EAAE,CAAC;QACjB,UAAU,EAAE,CAAC,uCAAuC,CAAC;QACrD,YAAY,EAAE,CAAC,gCAAgC,CAAC;QAChD,YAAY,EAAE,CAAC,oCAAoC,CAAC;QACpD,UAAU,EAAE,CAAC,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,SAAS,CAAC;QACzC,cAAc,EAAE,CAAC,0BAA0B,CAA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CAAC,4BAA4B,IAAI,EAAE,CAAC,CAAC;QAClE,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAC/B,IAAI,IAAI,KAAK,aAAa;YAAE,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,QAAQ;gBAAE,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACjG,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/index.d.ts.map b/plugins/screenrig/cli/dist/cli-commands/index.d.ts.map index ba0ed058..b62a3ee6 100644 --- a/plugins/screenrig/cli/dist/cli-commands/index.d.ts.map +++ b/plugins/screenrig/cli/dist/cli-commands/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli-commands/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBzC,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAmB/E"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli-commands/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoBzC,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAqB/E"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/index.js b/plugins/screenrig/cli/dist/cli-commands/index.js index 77dbe4ba..4cb8c54f 100644 --- a/plugins/screenrig/cli/dist/cli-commands/index.js +++ b/plugins/screenrig/cli/dist/cli-commands/index.js @@ -1,3 +1,4 @@ +import { registerGuidance } from "./guidance.js"; import { registerGlobalOptions } from "./globals.js"; import { registerAccountCommands } from "./account.js"; import { registerAgentCommands } from "./agent.js"; @@ -16,6 +17,7 @@ import { registerPlaybackCommands } from "./playback.js"; import { registerFeedbackCommands } from "./feedback.js"; import { registerDoctorCommands } from "./doctor.js"; import { registerVersionCommands } from "./version.js"; +import { registerRecoveryCommands } from "./recovery.js"; export function registerCommands(root, bind) { registerGlobalOptions(root); registerAccountCommands(root, bind); @@ -35,5 +37,7 @@ export function registerCommands(root, bind) { registerFeedbackCommands(root, bind); registerDoctorCommands(root, bind); registerVersionCommands(root, bind); + registerRecoveryCommands(root, bind); + registerGuidance(root); } //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/index.js.map b/plugins/screenrig/cli/dist/cli-commands/index.js.map index a33b3b1a..db72ef1b 100644 --- a/plugins/screenrig/cli/dist/cli-commands/index.js.map +++ b/plugins/screenrig/cli/dist/cli-commands/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli-commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAGrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAA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,EAAE,IAAyB;IACvE,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAC5B,uBAAuB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,qBAAqB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAClC,yBAAyB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACtC,mBAAmB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAChC,qBAAqB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAClC,uBAAuB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,wBAAwB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACrC,sBAAsB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACnC,uBAAuB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,kBAAkB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/B,uBAAuB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,0BAA0B,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACvC,sBAAsB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACnC,wBAAwB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACrC,wBAAwB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACrC,sBAAsB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACnC,uBAAuB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,wBAAwB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACrC,gBAAgB,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/kv.d.ts.map b/plugins/screenrig/cli/dist/cli-commands/kv.d.ts.map index 8d30ee52..4c44adf8 100644 --- a/plugins/screenrig/cli/dist/cli-commands/kv.d.ts.map +++ b/plugins/screenrig/cli/dist/cli-commands/kv.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"kv.d.ts","sourceRoot":"","sources":["../../src/cli-commands/kv.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,WAAW,CAAC;AAEjD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CA2BjF"} \ No newline at end of file +{"version":3,"file":"kv.d.ts","sourceRoot":"","sources":["../../src/cli-commands/kv.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,WAAW,CAAC;AAEjD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CA4BjF"} \ 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 d57f9f55..b148315f 100644 --- a/plugins/screenrig/cli/dist/cli-commands/kv.js +++ b/plugins/screenrig/cli/dist/cli-commands/kv.js @@ -1,3 +1,5 @@ +import { addValueAlias } from "./aliases.js"; +import { requireOptionGroup } from "./notes.js"; import { revision } from "./options.js"; import { handleKvGet, handleKvSet, handleKvDelete, handleKvList } from "../commands.js"; import { Option } from "commander"; @@ -5,11 +7,9 @@ export function registerKvCommands(root, bind) { const kv = root.command("kv").description("Read and write application key-value data"); kv.command("get").description("Read an application key") .argument("", "Application key") - .requiredOption("--application-id ", "Select the application's K/V namespace (required)") .action(bind(handleKvGet)); kv.command("set").description("Write a value") .argument("", "Application key") - .requiredOption("--application-id ", "Select the application's K/V namespace (required)") .addOption(new Option("--json-value ", "Supply a JSON value").conflicts(["file", "valueBase64", "contentType"])) .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"])) @@ -18,11 +18,15 @@ export function registerKvCommands(root, bind) { .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("--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)") .action(bind(handleKvList)); + for (const command of kv.commands) + addValueAlias(command, "--app-id", "--application-id", "Select the application's K/V namespace", true); + const set = kv.commands.find(command => command.name() === "set"); + requireOptionGroup(set, "exactlyOne", ["--json-value", "--file", "--value-base64"]); + requireOptionGroup(set, "requires", ["--file", "--content-type"]); + requireOptionGroup(set, "requires", ["--value-base64", "--content-type"]); } //# sourceMappingURL=kv.js.map \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/kv.js.map b/plugins/screenrig/cli/dist/cli-commands/kv.js.map index 8bae14b9..5c7d3326 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,iBA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E,gBAAgB,CAAC,CAAC,CAAC;AAC5E,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 ef25a596..caf5a140 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":"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 +{"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,CA2EpF"} \ 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 e395c63b..f55c08cd 100644 --- a/plugins/screenrig/cli/dist/cli-commands/media.js +++ b/plugins/screenrig/cli/dist/cli-commands/media.js @@ -1,23 +1,21 @@ -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"; -import { addCommandNotes } from "./notes.js"; +import { addCommandNotes, addCommandExamples, requireOptionGroup } from "./notes.js"; 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") .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") + .addOption(new Option("--aspect-ratio ", "Choose the generated image aspect ratio").choices(["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3"]).default("16:9")) + .addOption(new Option("--quality ", "Choose generation quality").choices(["low", "medium", "high"]).default("medium")) .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); + const generate = media.commands.find((command) => command.name() === "generate"); + requireOptionGroup(generate, "exactlyOne", ["--prompt", "--prompt-file"]); + addCommandExamples(generate, 'screenrig media generate --prompt "A full-screen welcome sign"', 'screenrig media generate --prompt-file prompt.txt --aspect-ratio 9:16'); media.command("upload").description("Upload an image or video") .argument("", "Local input file") .option("--content-type ", "Declare the content MIME type") @@ -25,12 +23,12 @@ export function registerMediaCommands(root, bind) { .option("--no-wait", "Return after acceptance without waiting for processing") .option("--poll-ms ", "Set the operation polling interval", positiveInteger("poll-ms")) .addOption(new Option("--no-transcode", "Upload accepted source bytes unchanged").conflicts(["codec", "maxFps", "maxEdge", "webpQuality", "preset", "audio"])) - .addOption(new Option("--codec ", "Choose the video codec (default: h264)").conflicts(["transcode"])) + .addOption(new Option("--codec ", "Choose the video codec").choices(["h264", "hevc"]).default("h264").conflicts(["transcode"])) .addOption(new Option("--max-fps ", "Limit video frames per second").argParser(positiveNumber("max-fps")).conflicts(["transcode"])) .addOption(new Option("--max-edge ", "Limit the longest video edge").argParser(positiveInteger("max-edge")).conflicts(["transcode"])) .addOption(new Option("--webp-quality <1-100>", "Set WebP quality").argParser(positiveInteger("webp-quality")).conflicts(["transcode"])) .option("--no-progress", "Suppress stderr progress") - .addOption(new Option("--preset ", "Use signage-1080p30 or signage-4k30").conflicts(["transcode"])) + .addOption(new Option("--preset ", "Choose a transcoding preset").choices(["signage-1080p30", "signage-4k30"]).conflicts(["transcode"])) .addOption(new Option("--no-audio", "Remove the audio track when transcoding").conflicts(["transcode"])) .action(bind(handleMediaUpload)); media.command("upload-batch").description("Upload a manifest with resumable state") @@ -41,11 +39,11 @@ export function registerMediaCommands(root, bind) { .option("--tag ", "Set the media tag") .option("--no-progress", "Suppress stderr progress") .option("--poll-ms ", "Set the operation polling interval", positiveInteger("poll-ms")) - .addOption(new Option("--codec ", "Choose the video codec (default: h264)").conflicts(["transcode"])) + .addOption(new Option("--codec ", "Choose the video codec").choices(["h264", "hevc"]).default("h264").conflicts(["transcode"])) .addOption(new Option("--max-fps ", "Limit video frames per second").argParser(positiveNumber("max-fps")).conflicts(["transcode"])) .addOption(new Option("--max-edge ", "Limit the longest video edge").argParser(positiveInteger("max-edge")).conflicts(["transcode"])) .addOption(new Option("--webp-quality <1-100>", "Set WebP quality").argParser(positiveInteger("webp-quality")).conflicts(["transcode"])) - .addOption(new Option("--preset ", "Use signage-1080p30 or signage-4k30").conflicts(["transcode"])) + .addOption(new Option("--preset ", "Choose a transcoding preset").choices(["signage-1080p30", "signage-4k30"]).conflicts(["transcode"])) .addOption(new Option("--no-audio", "Remove the audio track when transcoding").conflicts(["transcode"])) .action(bind(handleMediaUploadBatch)); media.command("show").description("Inspect media") @@ -57,7 +55,7 @@ export function registerMediaCommands(root, bind) { .action(bind(handleMediaDownload)); media.command("list").description("List media") .option("--tag ", "Filter media by tag") - .option("--primitive ", "Filter by media primitive") + .addOption(new Option("--primitive ", "Filter by media primitive").choices(["image", "video"])) .action(bind(handleMediaList)); media.command("update").description("Update a media tag") .argument("", "Media identifier") @@ -69,5 +67,6 @@ export function registerMediaCommands(root, bind) { .argument("", "Media identifier") .requiredOption("--expect-rev ", "Require the current resource revision (required)", revision) .action(bind(handleMediaDelete)); + requireOptionGroup(media.commands.find(command => command.name() === "update"), "exactlyOne", ["--tag", "--clear-tag"]); } //# 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 19ee438a..5ac8290a 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,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,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,SAAS,CAAC,IAAI,MAAM,CAAC,iBAAiB,EAAE,yCAAyC,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,CAA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AAC;SACpC,cAAc,CAAC,yBAAyB,EAAE,kDAAkD,EAAE,QAAQ,CAAC;SACvG,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;IACnC,kBAAkB,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,QAAQ,CAAE,EAAE,YAAY,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC;AAC3H,CAAC"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/notes.d.ts b/plugins/screenrig/cli/dist/cli-commands/notes.d.ts index 8f3bee5a..81344b14 100644 --- a/plugins/screenrig/cli/dist/cli-commands/notes.d.ts +++ b/plugins/screenrig/cli/dist/cli-commands/notes.d.ts @@ -2,4 +2,13 @@ import type { Command } from "commander"; /** Attach native help text and retain the same note for structured discovery. */ export declare function addCommandNotes(command: Command, note: string): void; export declare function commandNotes(command: Command): string[]; +export interface OptionRelationship { + kind: "exactlyOne" | "together" | "atLeastOne" | "requires"; + options: string[]; +} +/** One definition drives both preflight validation and discovery. */ +export declare function requireOptionGroup(command: Command, kind: OptionRelationship["kind"], names: string[]): void; +export declare function commandRelationships(command: Command): OptionRelationship[]; +export declare function addCommandExamples(command: Command, ...commands: string[]): void; +export declare function commandExamples(command: Command): string[]; //# sourceMappingURL=notes.d.ts.map \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/notes.d.ts.map b/plugins/screenrig/cli/dist/cli-commands/notes.d.ts.map index 4490e2c6..3a737af0 100644 --- a/plugins/screenrig/cli/dist/cli-commands/notes.d.ts.map +++ b/plugins/screenrig/cli/dist/cli-commands/notes.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"notes.d.ts","sourceRoot":"","sources":["../../src/cli-commands/notes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,iFAAiF;AACjF,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAGpE;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,EAAE,CAEvD"} \ No newline at end of file +{"version":3,"file":"notes.d.ts","sourceRoot":"","sources":["../../src/cli-commands/notes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,iFAAiF;AACjF,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAGpE;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,EAAE,CAEvD;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,YAAY,GAAG,UAAU,GAAG,YAAY,GAAG,UAAU,CAAC;IAC5D,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAID,qEAAqE;AACrE,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,kBAAkB,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAsB5G;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,kBAAkB,EAAE,CAE3E;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAGhF;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,EAAE,CAE1D"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/notes.js b/plugins/screenrig/cli/dist/cli-commands/notes.js index 02341156..801f8d4a 100644 --- a/plugins/screenrig/cli/dist/cli-commands/notes.js +++ b/plugins/screenrig/cli/dist/cli-commands/notes.js @@ -1,3 +1,4 @@ +import { usageError } from "../problems.js"; const notes = new WeakMap(); /** Attach native help text and retain the same note for structured discovery. */ export function addCommandNotes(command, note) { @@ -7,4 +8,42 @@ export function addCommandNotes(command, note) { export function commandNotes(command) { return [...(notes.get(command) ?? [])]; } +const relationships = new WeakMap(); +const examples = new WeakMap(); +/** One definition drives both preflight validation and discovery. */ +export function requireOptionGroup(command, kind, names) { + const options = names.map((name) => { + const option = command.options.find((candidate) => candidate.long === name); + if (!option) + throw new Error(`Unknown option ${name}`); + return option; + }); + relationships.set(command, [...(relationships.get(command) ?? []), { kind, options: names }]); + const message = kind === "exactlyOne" + ? `Provide exactly one of ${names.join(" or ")}.` + : kind === "atLeastOne" ? `Provide at least one of ${names.join(" or ")}.` + : kind === "requires" ? `${names[0]} requires ${names.slice(1).join(" and ")}.` + : `Provide ${names.join(" and ")} together.`; + addCommandNotes(command, message); + command.hook("preAction", () => { + const count = options.filter((option) => command.getOptionValueSource(option.attributeName()) === "cli").length; + const supplied = (index) => command.getOptionValueSource(options[index].attributeName()) === "cli"; + const invalid = kind === "exactlyOne" ? count !== 1 + : kind === "atLeastOne" ? count === 0 + : kind === "requires" ? supplied(0) && options.slice(1).some((_, index) => !supplied(index + 1)) + : count !== 0 && count !== options.length; + if (invalid) + throw usageError(message); + }); +} +export function commandRelationships(command) { + return relationships.get(command) ?? []; +} +export function addCommandExamples(command, ...commands) { + examples.set(command, [...(examples.get(command) ?? []), ...commands]); + command.addHelpText("after", `\nExamples:\n${commands.map((example) => ` ${example}`).join("\n")}`); +} +export function commandExamples(command) { + return examples.get(command) ?? []; +} //# sourceMappingURL=notes.js.map \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/notes.js.map b/plugins/screenrig/cli/dist/cli-commands/notes.js.map index 34367bae..7a36050d 100644 --- a/plugins/screenrig/cli/dist/cli-commands/notes.js.map +++ b/plugins/screenrig/cli/dist/cli-commands/notes.js.map @@ -1 +1 @@ -{"version":3,"file":"notes.js","sourceRoot":"","sources":["../../src/cli-commands/notes.ts"],"names":[],"mappings":"AAEA,MAAM,KAA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CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvG,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,OAAgB;IAC9C,OAAO,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/operations.js b/plugins/screenrig/cli/dist/cli-commands/operations.js index e80ed804..c2686ef3 100644 --- a/plugins/screenrig/cli/dist/cli-commands/operations.js +++ b/plugins/screenrig/cli/dist/cli-commands/operations.js @@ -2,7 +2,7 @@ import { positiveInteger } from "./options.js"; import { handleOperationsGet, handleOperationsWait, handleOperationsCancel } from "../commands.js"; export function registerOperationsCommands(root, bind) { const operations = root.command("operations").description("Inspect, wait for, or cancel operations"); - operations.command("get").description("Inspect an operation") + operations.command("show").alias("get").description("Inspect an operation") .argument("", "Operation identifier") .action(bind(handleOperationsGet)); operations.command("wait").description("Wait for an operation to finish") diff --git a/plugins/screenrig/cli/dist/cli-commands/operations.js.map b/plugins/screenrig/cli/dist/cli-commands/operations.js.map index a3ed20a6..8b7cc695 100644 --- a/plugins/screenrig/cli/dist/cli-commands/operations.js.map +++ b/plugins/screenrig/cli/dist/cli-commands/operations.js.map @@ -1 +1 @@ -{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../src/cli-commands/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAGnG,MAAM,UAAU,0BAA0B,CAAC,IAAa,EAAE,IAAyB;IACjF,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,WAAW,CAAC,yCAAyC,CAAC,CAAC;IAErG,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,sBAAsB,CAAC;SAC1D,QAAQ,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C,MAAM,CAAC,gBAAgB,EAAE,oCAAoC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;SAC1F,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAEtC,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,qBAAqB,CAAC;SAC5D,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAC;SACxC,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC;AAC1C,CAAC"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/playlist.d.ts b/plugins/screenrig/cli/dist/cli-commands/playlist.d.ts index 9c048ae7..c92cac8b 100644 --- a/plugins/screenrig/cli/dist/cli-commands/playlist.d.ts +++ b/plugins/screenrig/cli/dist/cli-commands/playlist.d.ts @@ -1,4 +1,4 @@ import type { CommandActionBinder } from "./types.js"; -import type { Command } from "commander"; +import { type Command } from "commander"; export declare function registerPlaylistCommands(root: Command, bind: CommandActionBinder): void; //# sourceMappingURL=playlist.d.ts.map \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/playlist.d.ts.map b/plugins/screenrig/cli/dist/cli-commands/playlist.d.ts.map index 77234c5b..2e2f14a9 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,CAwEvF"} \ 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,EAAE,KAAK,OAAO,EAAU,MAAM,WAAW,CAAC;AAIjD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CA2FvF"} \ 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 f8adbc9e..bd79745b 100644 --- a/plugins/screenrig/cli/dist/cli-commands/playlist.js +++ b/plugins/screenrig/cli/dist/cli-commands/playlist.js @@ -1,26 +1,33 @@ -import { usageError } from "../problems.js"; +import { addValueAlias } from "./aliases.js"; import { nonnegativeInteger, positiveInteger, revision } from "./options.js"; -import { handlePlaylistInit, handlePlaylistValidate, handlePlaylistPreview, handlePlaylistTemplates, handlePlaylistCreate, handlePlaylistUpdate, handlePlaylistExport, handlePlaylistImport, handlePlaylistShow, handlePlaylistList, handlePlaylistDelete } from "../commands.js"; -import { addCommandNotes } from "./notes.js"; +import { handlePlaylistReplaceRelease, handlePlaylistInit, handlePlaylistValidate, handlePlaylistPreview, handlePlaylistTemplates, handlePlaylistCreate, handlePlaylistUpdate, handlePlaylistExport, handlePlaylistImport, handlePlaylistShow, handlePlaylistList, handlePlaylistDelete } from "../commands.js"; +import { Option } from "commander"; +import { addCommandNotes, addCommandExamples, requireOptionGroup } 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") + const init = playlist.command("init").description("Prepare an editable playlist from files, ready media, application releases, or HTTPS URLs") + .argument("", "Local image/video files, med_ IDs, rel_ IDs, or HTTPS URLs 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") + .addOption(new Option("--duration-ms ", "Non-video page duration").argParser(positiveInteger("duration-ms")).default(8000)) + .addOption(new Option("--fit ", "Content fit").choices(["contain", "cover", "fill"]).default("contain")) + .option("--no-transcode", "Upload accepted file bytes unchanged") + .option("--no-progress", "Suppress upload progress on stderr") + .option("--poll-ms ", "Upload polling interval", positiveInteger("poll-ms")) .action(bind(handlePlaylistInit)); + addValueAlias(init, "--screen-id", "--screen", "Use this screen’s identity, revision, and reported dimensions"); + requireOptionGroup(init, "together", ["--target-width", "--target-height"]); + addCommandNotes(init, "Provide --screen-id for target identity, revision, and reported dimensions, or both target dimensions. Files upload and wait for readiness. Release IDs are pinned; preview/server validation checks availability. Inspect the document and preview before publishing."); + addCommandExamples(init, 'screenrig playlist init med_IMAGE --name Lobby --screen-id scr_SCREEN --output lobby.json', 'screenrig playlist init med_IMAGE med_VIDEO --name Lobby --target-width 1920 --target-height 1080 --output lobby.json'); playlist.command("validate").description("Validate a playlist file") - .argument("", "Local input file") + .argument("", "Playlist JSON file, or - for stdin") .option("--lint-only", "Run the command's local validation/lint mode") .action(bind(handlePlaylistValidate)); addCommandNotes(playlist.command("preview").description("Render playlist previews and a contact sheet") - .argument("", "Playlist file or playlist identifier") + .argument("", "Playlist JSON file, playlist identifier, or - for stdin") .requiredOption("--output ", "Write preview files to this directory (required)") .option("--frame-ms ", "Select the preview frame time", nonnegativeInteger("frame-ms")) .option("--contact-sheet", "Include a contact sheet") @@ -29,36 +36,44 @@ export function registerPlaylistCommands(root, bind) { playlist.command("templates").description("Browse playlist templates") .action(bind(handlePlaylistTemplates)); playlist.command("create").description("Create a playlist from a file") - .argument("", "Local input file") + .argument("", "Playlist JSON file, or - for stdin") .action(bind(handlePlaylistCreate)); playlist.command("update").description("Update a playlist") .argument("", "Playlist identifier") - .argument("", "Local input file") + .argument("", "Playlist JSON file, or - for stdin") .requiredOption("--expect-rev ", "Require the current resource revision (required)", revision) .action(bind(handlePlaylistUpdate)); + const replaceRelease = playlist.command("replace-release").description("Preview or apply one application release replacement and its shared-screen impact") + .argument("", "Playlist identifier") + .requiredOption("--page ", "Exact page identifier") + .requiredOption("--primitive ", "Exact application primitive identifier within the page") + .requiredOption("--release-id ", "New immutable release identifier") + .option("--apply", "Apply the reviewed replacement") + .option("--expect-rev ", "Playlist revision from the preview", revision) + .option("--expect-impact ", "Impact token from the preview") + .action(bind(handlePlaylistReplaceRelease)); + requireOptionGroup(replaceRelease, "together", ["--apply", "--expect-rev", "--expect-impact"]); + addCommandNotes(replaceRelease, "Defaults to a read-only preview including active and archived assigned screens. Apply requires the preview revision and impact token. Changed impact requires a fresh review. Screen assignments are a snapshot; only playlist revision is checked atomically. Server validates release availability and ownership on apply."); + addCommandExamples(replaceRelease, 'screenrig playlist replace-release pl_PLAYLIST --page board-page --primitive board --release-id rel_NEW', 'screenrig playlist replace-release pl_PLAYLIST --page board-page --primitive board --release-id rel_NEW --apply --expect-rev 4 --expect-impact TOKEN'); playlist.command("export").description("Export a playlist bundle") .argument("", "Playlist identifier") .requiredOption("--output ", "Write the exported bundle to this directory (required)") .action(bind(handlePlaylistExport)); - playlist.command("import").description("Import a playlist bundle") + const importCommand = playlist.command("import").description("Import a playlist bundle") .argument("", "Local directory") .option("--name ", "Set the imported playlist name") .option("--update ", "Update this playlist when importing") .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("expectRev") === "cli"; - if (update !== ifMatch) - throw usageError("playlist import --update and --expect-rev must be supplied together."); - }) .action(bind(handlePlaylistImport)); - playlist.command("show").description("Inspect a playlist or write an editable document") + requireOptionGroup(importCommand, "together", ["--update", "--expect-rev"]); + const show = 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)); + addCommandExamples(show, 'screenrig playlist show pl_PLAYLIST --output playlist.json', 'screenrig playlist show pl_PLAYLIST --editable'); playlist.command("list").description("List playlists") .action(bind(handlePlaylistList)); playlist.command("delete").description("Delete a playlist") diff --git a/plugins/screenrig/cli/dist/cli-commands/playlist.js.map b/plugins/screenrig/cli/dist/cli-commands/playlist.js.map index e6731731..0160d940 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,kBAAkB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAElR,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,MAAM,CAAC,CAAC,WAAW,CAAC,2DAA2D,CAAC;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pC,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/recovery.d.ts b/plugins/screenrig/cli/dist/cli-commands/recovery.d.ts new file mode 100644 index 00000000..8d33a696 --- /dev/null +++ b/plugins/screenrig/cli/dist/cli-commands/recovery.d.ts @@ -0,0 +1,4 @@ +import type { Command } from "commander"; +import type { CommandActionBinder } from "./types.js"; +export declare function registerRecoveryCommands(root: Command, bind: CommandActionBinder): void; +//# sourceMappingURL=recovery.d.ts.map \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/recovery.d.ts.map b/plugins/screenrig/cli/dist/cli-commands/recovery.d.ts.map new file mode 100644 index 00000000..a3f03943 --- /dev/null +++ b/plugins/screenrig/cli/dist/cli-commands/recovery.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"recovery.d.ts","sourceRoot":"","sources":["../../src/cli-commands/recovery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAyBtD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAUvF"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/recovery.js b/plugins/screenrig/cli/dist/cli-commands/recovery.js new file mode 100644 index 00000000..46f97d61 --- /dev/null +++ b/plugins/screenrig/cli/dist/cli-commands/recovery.js @@ -0,0 +1,32 @@ +import { resolveConfig } from "../config.js"; +import { successEnvelope } from "../envelope.js"; +import { ExitCode } from "../exit-codes.js"; +import { manageWriteRecovery } from "../write-recovery.js"; +const guidance = "Inspect the remote outcome before reconciling. Reconcile removes local retry protection only; it does not retry, cancel, or undo the remote write. A subsequent invocation can create a new write."; +function handler(action) { + return async (args, runtime) => { + const resolved = await resolveConfig({ flags: args.flags, fs: { ...runtime.fs, env: runtime.env, homedir: runtime.homedir } }); + const entries = await manageWriteRecovery(resolved, runtime, action, args.positionals[2]); + const data = action === "list" ? { entries, guidance } + : action === "show" ? { entry: entries[0], guidance } + : { entry: entries[0], reconciled: true, remote_changed: false, guidance }; + return { + envelope: successEnvelope(data), exitCode: ExitCode.Success, + human: [action === "reconcile" ? "Recovery entry reconciled locally" : "Pending write recovery", + ...entries.map(entry => `${entry.id} | ${entry.command ?? "unknown command (legacy entry)"} | ${entry.created_at} | ${entry.replay_status}`), + ...(entries.length ? [] : ["No pending writes"]), guidance].join("\n"), + }; + }; +} +export function registerRecoveryCommands(root, bind) { + const recovery = root.command("recovery").description("Inspect and reconcile local ordinary-write recovery state"); + recovery.command("list").description("List safe recovery metadata without sending requests") + .action(bind(handler("list"))); + recovery.command("show").description("Inspect one pending write; legacy entries have no command metadata") + .argument("", "Recovery identifier from recovery list") + .action(bind(handler("show"))); + recovery.command("reconcile").description("Remove local retry protection after verifying the remote outcome; does not undo the write") + .argument("", "Recovery identifier from recovery list") + .action(bind(handler("reconcile"))); +} +//# sourceMappingURL=recovery.js.map \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/recovery.js.map b/plugins/screenrig/cli/dist/cli-commands/recovery.js.map new file mode 100644 index 00000000..b542885b --- /dev/null +++ b/plugins/screenrig/cli/dist/cli-commands/recovery.js.map @@ -0,0 +1 @@ +{"version":3,"file":"recovery.js","sourceRoot":"","sources":["../../src/cli-commands/recovery.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;A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IAAI,gCAAgC,MAAM,KAAK,CAAC,UAAU,MAAM,KAAK,CAAC,aAAa,EAAE,CAAC;gBAC5I,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;SACzE,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,IAAa,EAAE,IAAyB;IAC/E,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC,2DAA2D,CAAC,CAAC;IACnH,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,sDAAsD,CAAC;SACzF,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACjC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,oEAAoE,CAAC;SACvG,QAAQ,CAAC,MAAM,EAAE,wCAAwC,CAAC;SAC1D,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACjC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,2FAA2F,CAAC;SACnI,QAAQ,CAAC,MAAM,EAAE,wCAAwC,CAAC;SAC1D,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;AACxC,CAAC"} \ No newline at end of file diff --git a/plugins/screenrig/cli/dist/cli-commands/screen.d.ts b/plugins/screenrig/cli/dist/cli-commands/screen.d.ts index 7ccd005f..21ce3ce5 100644 --- a/plugins/screenrig/cli/dist/cli-commands/screen.d.ts +++ b/plugins/screenrig/cli/dist/cli-commands/screen.d.ts @@ -1,4 +1,4 @@ import type { CommandActionBinder } from "./types.js"; -import type { Command } from "commander"; +import { type Command } from "commander"; export declare function registerScreenCommands(root: Command, bind: CommandActionBinder): void; //# sourceMappingURL=screen.d.ts.map \ 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 741b0648..ec10af72 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,CAgFrF"} \ No newline at end of file +{"version":3,"file":"screen.d.ts","sourceRoot":"","sources":["../../src/cli-commands/screen.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,WAAW,CAAC;AAEjD,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAwFrF"} \ 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 925ce5a2..3edda60c 100644 --- a/plugins/screenrig/cli/dist/cli-commands/screen.js +++ b/plugins/screenrig/cli/dist/cli-commands/screen.js @@ -1,20 +1,21 @@ +import { addValueAlias } from "./aliases.js"; +import { addCommandExamples, addCommandNotes, requireOptionGroup } from "./notes.js"; import { positiveInteger, revision, toastDuration } from "./options.js"; -import { handleScreenPublish, 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, handleScreenRecover, handleScreenToast, handleScreenScreenshot } from "../commands.js"; +import { Option } from "commander"; 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") + screen.command("publish").description("Create a new playlist from a prepared file and assign it to a screen") .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