@mediaruntime/cli 1.2.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
@@ -23,6 +23,12 @@ mediaruntime recipes get <name>
23
23
  mediaruntime recipes create --file <recipe.json>
24
24
  mediaruntime recipes version <name> --file <recipe.json> --expected <version>
25
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>
26
32
  mediaruntime jobs list
27
33
  mediaruntime jobs get <job_id>
28
34
  mediaruntime trigger job.completed --to http://127.0.0.1:3000/webhooks/mediaruntime
@@ -41,6 +47,11 @@ The canonical result remains one expiring ZIP bundle containing the complete out
41
47
  The CLI downloads that ZIP as-is; it does not expose individual artifacts or infer an
42
48
  engine directory layout.
43
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
+
44
55
  ## 2. Goals and non-goals
45
56
 
46
57
  ### Goals
@@ -130,6 +141,28 @@ mediaruntime run <source>
130
141
  [--json]
131
142
  ```
132
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
+
133
166
  `-o` is the short spelling of `--output`. Exactly one source and at least one output or preset are
134
167
  required. `<source>` may be an HTTP(S) URL, `gs://` URI, local path, or `file://` URL. The
135
168
  CLI passes it to the SDK so local inputs use the SDK's signed-upload flow.
@@ -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.2.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.2.0"
35
+ "@mediaruntime/node": "^1.3.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/node": "^24.3.0",