@mediaruntime/cli 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/AUTH.md CHANGED
@@ -61,6 +61,14 @@ Authenticated commands resolve credentials in this order:
61
61
  No command-line API-key flag exists. No plaintext credential-file fallback exists. A
62
62
  machine without a supported credential vault must use `MEDIARUNTIME_API_KEY`.
63
63
 
64
+ Hosted Sticker Runtime has one deliberately narrower exception. For collection-bound
65
+ `stickers packs list`, `search`, `typeahead`, `get`, and `resolve`,
66
+ `MEDIARUNTIME_STICKER_CLIENT_TOKEN` selects a short-lived scoped client without reading the
67
+ master API key or stored login. The explicit collection must match the token claim.
68
+ Collection management, pack binding, workspace usage, and token issuance never accept that
69
+ credential and continue using the normal resolution order above. See
70
+ [the Sticker Runtime contract](STICKERS.md) for the exact boundary.
71
+
64
72
  ## Security invariants
65
73
 
66
74
  - Device codes and PKCE verifiers carry at least 256 bits of randomness.
package/docs/CLI_SDD.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MediaRuntime CLI software design
2
2
 
3
- Status: stable public contract released as `1.1.0`
3
+ Status: stable public contract released as `1.2.0`
4
4
 
5
5
  Package: `@mediaruntime/cli`
6
6
 
@@ -18,6 +18,17 @@ mediaruntime run <source> --output <alias>
18
18
  mediaruntime run <source> --preset <public-preset>
19
19
  mediaruntime capabilities
20
20
  mediaruntime presets list
21
+ mediaruntime recipes list
22
+ mediaruntime recipes get <name>
23
+ mediaruntime recipes create --file <recipe.json>
24
+ mediaruntime recipes version <name> --file <recipe.json> --expected <version>
25
+ mediaruntime recipes archive <name>
26
+ mediaruntime stickers collections list
27
+ mediaruntime stickers collections packs enable <collection_id> --pack <pack_id>
28
+ mediaruntime stickers search <query> --collection <collection_id>
29
+ mediaruntime stickers resolve <sticker_id> --variant <name> --collection <collection_id>
30
+ mediaruntime stickers usage
31
+ mediaruntime stickers token create --collection <collection_id>
21
32
  mediaruntime jobs list
22
33
  mediaruntime jobs get <job_id>
23
34
  mediaruntime trigger job.completed --to http://127.0.0.1:3000/webhooks/mediaruntime
@@ -36,6 +47,11 @@ The canonical result remains one expiring ZIP bundle containing the complete out
36
47
  The CLI downloads that ZIP as-is; it does not expose individual artifacts or infer an
37
48
  engine directory layout.
38
49
 
50
+ Hosted Sticker Runtime commands are the other explicit asset-delivery surface. They bind
51
+ all reads to one application collection and use the SDK's short-lived, generation-pinned
52
+ sticker resolution rather than the job ZIP contract. The complete command and security
53
+ contract is maintained in `docs/STICKERS.md`.
54
+
39
55
  ## 2. Goals and non-goals
40
56
 
41
57
  ### Goals
@@ -56,7 +72,7 @@ engine directory layout.
56
72
  authenticated connections, event ownership, expiry, rate limits, and an abuse model.
57
73
  - Named multi-account profiles are deferred. Browser login stores one credential per API
58
74
  origin; an explicit environment key remains the account override.
59
- - Batch submission, custom output recipe editing, moderation, watermark management,
75
+ - Batch submission, arbitrary inline output-object editing, moderation, watermark management,
60
76
  webhook registration, media-report retrieval, and moderation-result retrieval remain
61
77
  available through the SDK/API but are not CLI v1 commands. Named public presets are
62
78
  supported through `--preset`; arbitrary output objects remain deferred.
@@ -125,6 +141,28 @@ mediaruntime run <source>
125
141
  [--json]
126
142
  ```
127
143
 
144
+ When exactly one `contact_sheet_v1` preset is selected, `run` also accepts bounded
145
+ `--contact-columns`, `--contact-rows`, `--contact-tile-width`,
146
+ `--contact-tile-height`, `--contact-interval`, `--contact-start`,
147
+ `--contact-duration`, `--contact-max-sheets`, `--contact-format`, and
148
+ `--contact-quality` controls. They are rejected with recipes, mixed outputs, or any
149
+ other preset so the CLI cannot attach them ambiguously.
150
+
151
+ When exactly one `audiogram_v1` preset is selected, `--audiogram-artwork` is required.
152
+ `--audiogram-captions` is optional and explicitly enables caption burning. Layout,
153
+ background/waveform colours, start, duration, and frame-rate controls mirror the bounded
154
+ gateway contract. Artwork and captions may be HTTP(S), `gs://`, `file://`, or local
155
+ paths. Local secondary assets use the same authenticated signed-upload client as the
156
+ main source; the submitted job contains only the resulting account-scoped `gs://` URI.
157
+ Raw filters, font paths, and arbitrary rendering arguments are not accepted.
158
+
159
+ Privacy redaction is a Premium Preview for still-image inputs and public image presets with one or
160
+ more repeatable `--privacy-detector face|license_plate|text` flags. The CLI accepts only
161
+ the gateway's bounded style, strength, failure-mode, confidence, segmented frame-count,
162
+ padding, pixel-block, debug-observation, and solid-colour controls. It resolves aliases through the live capabilities document so
163
+ the request carries explicit output objects, rejects video, audio, animated-image, and recipe combinations
164
+ locally, and never accepts model paths, raw OCR retention, or arbitrary detector options.
165
+
128
166
  `-o` is the short spelling of `--output`. Exactly one source and at least one output or preset are
129
167
  required. `<source>` may be an HTTP(S) URL, `gs://` URI, local path, or `file://` URL. The
130
168
  CLI passes it to the SDK so local inputs use the SDK's signed-upload flow.
@@ -164,6 +202,10 @@ mediaruntime run ./launch.mp4 \
164
202
  mediaruntime run ./launch.mp4 \
165
203
  --preset dash_ladder_v1 --preset webm_vp9_1080p \
166
204
  --download ./adaptive-and-vp9.zip
205
+
206
+ mediaruntime run ./launch.mp4 \
207
+ --recipe team-video@3 \
208
+ --download ./launch.zip
167
209
  ```
168
210
 
169
211
  ### 5.2 Capability and preset discovery
@@ -179,7 +221,15 @@ features, and the ordered public preset table. JSON uses the Node SDK's camelCas
179
221
  `presets list --json` returns `{presets: [...]}` in gateway order. Neither command infers
180
222
  public availability from the broader internal preset map.
181
223
 
182
- ### 5.3 `jobs list`
224
+ ### 5.3 Hosted recipes
225
+
226
+ `recipes list/get/create/version/archive` delegates to the Node SDK recipe resource.
227
+ Create and version commands read explicit JSON files; secrets are never accepted in a
228
+ recipe or printed. `version --expected` is the optimistic-lock precondition. `run
229
+ --recipe` is mutually exclusive with aliases and public presets, and a resolved recipe
230
+ uses the same job wait, exit, spinner, and atomic ZIP path as any other job.
231
+
232
+ ### 5.4 `jobs list`
183
233
 
184
234
  ```text
185
235
  mediaruntime jobs list
@@ -198,7 +248,7 @@ The human table columns are `ID`, `STATUS`, `TIER`, `UNITS`, `BUNDLE`, and `UPDA
198
248
  List rows intentionally have no bundle download URL; `jobs get` is the download-aware
199
249
  surface.
200
250
 
201
- ### 5.4 `jobs get`
251
+ ### 5.5 `jobs get`
202
252
 
203
253
  ```text
204
254
  mediaruntime jobs get <job_id>
@@ -0,0 +1,98 @@
1
+ # Hosted Sticker Runtime CLI contract
2
+
3
+ ## Authentication boundary
4
+
5
+ Sticker commands use the normal trusted credential by default: an explicit
6
+ `MEDIARUNTIME_API_KEY`, then the API key stored by `mediaruntime login`. There is no
7
+ command-line secret flag.
8
+
9
+ `MEDIARUNTIME_STICKER_CLIENT_TOKEN` is an optional short-lived credential for only these
10
+ collection-bound runtime reads:
11
+
12
+ ```text
13
+ stickers packs list
14
+ stickers search
15
+ stickers typeahead
16
+ stickers get
17
+ stickers resolve
18
+ ```
19
+
20
+ When this variable is set for one of those reads, the CLI constructs the Node SDK's scoped
21
+ `StickerRuntime` directly and does not resolve or send a master API key. The explicit
22
+ `--collection` must match the token claim. A scoped token cannot manage collections or pack
23
+ bindings, inspect workspace usage, or mint another token. Those commands always require the
24
+ trusted credential.
25
+
26
+ ## Collection management
27
+
28
+ ```text
29
+ mediaruntime stickers collections list [--include-archived] [--json]
30
+ mediaruntime stickers collections create --name <name> [--description <text>] [--json]
31
+ mediaruntime stickers collections get <collection_id> [--json]
32
+ mediaruntime stickers collections update <collection_id>
33
+ [--name <name>] [--description <text> | --clear-description]
34
+ [--status active|archived] [--json]
35
+ mediaruntime stickers collections archive <collection_id> [--json]
36
+ ```
37
+
38
+ Archive is recoverable and retains pack-binding history. Restore an archived collection with
39
+ `collections update <collection_id> --status active`. JSON output is the SDK's camel-case
40
+ projection.
41
+
42
+ ## Pack bindings
43
+
44
+ ```text
45
+ mediaruntime stickers collections packs list <collection_id> [--json]
46
+ mediaruntime stickers collections packs enable <collection_id>
47
+ (--pack <pack_id> | --activation <activation_id>) [--json]
48
+ mediaruntime stickers collections packs disable <collection_id> --pack <pack_id> [--json]
49
+ ```
50
+
51
+ These commands bind an existing paid Hosted Pack activation to an application collection.
52
+ They do not purchase, activate, revoke, or charge for a pack. The stable pack-ID form is
53
+ idempotent and suitable for configuration scripts. The activation-ID form is useful just
54
+ after an account administrator completes activation elsewhere.
55
+
56
+ Disabling removes the pack from new-use discovery while retaining the binding and its
57
+ historical-access policy. Exact historical references can therefore remain renderable when
58
+ the policy is `preserve`; search and metadata retrieval no longer return the disabled pack.
59
+
60
+ ## Runtime reads
61
+
62
+ ```text
63
+ mediaruntime stickers packs list --collection <collection_id> [--json]
64
+ mediaruntime stickers search <query> --collection <collection_id>
65
+ [--pack <pack_id>] [--category <category>]
66
+ [--animated | --static] [--limit <1..50>] [--json]
67
+ mediaruntime stickers typeahead <prefix> --collection <collection_id>
68
+ [--pack <pack_id>] [--locale <locale>] [--limit <1..20>] [--json]
69
+ mediaruntime stickers get <sticker_id> --collection <collection_id> [--json]
70
+ mediaruntime stickers resolve <sticker_id> --variant <variant>
71
+ --collection <collection_id> [--json]
72
+ ```
73
+
74
+ Search is metadata-only. Persist the stable `stickerId`, then call `resolve` only when an
75
+ approved representation is needed. Resolution intentionally prints the short-lived signed
76
+ URL because delivery authorization is the command's purpose. The URL is collection checked,
77
+ variant checked, generation pinned, and expiring; do not persist it or write it to logs.
78
+
79
+ Supported variants are `animated`, `reduced_motion`, `small_80`, `small_100`, `small_160`,
80
+ and `thumbnail`. The gateway remains authoritative and may reject a supported name when the
81
+ specific sticker does not publish that representation.
82
+
83
+ ## Usage and scoped token issuance
84
+
85
+ ```text
86
+ mediaruntime stickers usage [--json]
87
+ mediaruntime stickers token create --collection <collection_id>
88
+ [--expires-in <60..3600>]
89
+ [--scope packs:read|stickers:search|stickers:read|assets:resolve]...
90
+ [--json]
91
+ ```
92
+
93
+ Omitting `--scope` asks the gateway for all four read scopes. Repeated scopes are
94
+ deduplicated. Token output is secret-bearing by explicit request; redirect it only to a
95
+ protected sink and avoid CI log capture. Usage is pooled at workspace/month level and
96
+ reports operations, authorized delivery bytes, included allowances, settled overage, and
97
+ health status. URL issuance records maximum authorized bytes; it does not claim that the
98
+ client completed a CDN transfer.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediaruntime/cli",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "description": "Official command-line client for MediaRuntime",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@napi-rs/keyring": "^1.3.0",
35
- "@mediaruntime/node": "^1.1.1"
35
+ "@mediaruntime/node": "^1.3.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/node": "^24.3.0",