@cloudglue/tinycloud 0.3.9 → 0.3.11

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/README.md CHANGED
@@ -17,11 +17,11 @@ The npm package is a small launcher: on first run it downloads the matching
17
17
  platform distribution from Cloudglue's CDN (cached under
18
18
  `~/.tinycloud/versions/<version>/`), verifies its checksum, and execs the real
19
19
  binary. The package version pins the binary version, so
20
- `npx @cloudglue/tinycloud@0.3.9` always runs tinycloud 0.3.9. It also adds two
20
+ `npx @cloudglue/tinycloud@0.3.11` always runs tinycloud 0.3.11. It also adds two
21
21
  wrapper commands:
22
22
 
23
23
  ```bash
24
- tinycloud install --version 0.3.9 # pre-download a version
24
+ tinycloud install --version 0.3.11 # pre-download a version
25
25
  tinycloud install --latest # install latest stable and pin to it
26
26
  tinycloud update # move to latest stable, prune old versions
27
27
  ```
@@ -38,9 +38,12 @@ supported — use WSL2.
38
38
 
39
39
  ### Setup
40
40
 
41
- Cloud features need a Cloudglue API key:
41
+ Cloud features need a Cloudglue API key. The quickest way is browser sign-in
42
+ (0.3.10+) — it provisions a key for you, no copy-paste:
42
43
 
43
44
  ```bash
45
+ tinycloud login # browser sign-in → provisions & saves a key (0.3.10+)
46
+ # or paste a key yourself:
44
47
  tinycloud setup cloudglue --api-key <key> # or: export CLOUDGLUE_API_KEY=...
45
48
  tinycloud setup --check --json # verify
46
49
  ```
@@ -131,6 +134,7 @@ go to stderr) — pass `--json`.
131
134
  | `workflow` | Run packaged pipeline recipes (see below) |
132
135
  | `publish` | Publish HTML artifacts as Cloudglue Sites; share videos |
133
136
  | `setup` | Configure the Cloudglue API key and service connections |
137
+ | `login` | Browser sign-in — provisions & saves a Cloudglue API key (0.3.10+) |
134
138
 
135
139
  A few common invocations:
136
140
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudglue/tinycloud",
3
- "version": "0.3.9",
3
+ "version": "0.3.11",
4
4
  "description": "Agent CLI for deep video and image work, by Cloudglue. Downloads the tinycloud binary on first run.",
5
5
  "bin": {
6
6
  "tinycloud": "bin/tinycloud.js"
@@ -37,8 +37,9 @@ npm install -g @cloudglue/tinycloud
37
37
  ```
38
38
 
39
39
  Credentials (required for cloud verbs): `tinycloud setup cloudglue --api-key <key>`
40
- (or `export CLOUDGLUE_API_KEY=...`). Verify with
41
- `tinycloud setup --check --json` `data.ok == true`.
40
+ (or `export CLOUDGLUE_API_KEY=...`), or, for a human at a terminal,
41
+ `tinycloud login` (0.3.10+) for browser sign-in that provisions and saves a key.
42
+ Verify with `tinycloud setup --check --json` → `data.ok == true`.
42
43
 
43
44
  ## 1. The envelope contract
44
45
 
@@ -51,7 +52,7 @@ credentials), `error` (`{code, message, retryable}`).
51
52
  |---|---|
52
53
  | `ready` | consume `data` / `ref` / file paths and continue |
53
54
  | `pending` | async job started — `tinycloud jobs wait <meta.job_id> --timeout 120s --json` |
54
- | `needs_credentials` | run the command in `setup.command` or set the env in `setup.env` |
55
+ | `needs_credentials` | run the command in `setup.command` (or `setup.login_command`, `tinycloud login`, for browser sign-in — 0.3.10+) or set the env in `setup.env` |
55
56
  | `needs_upload` | cloud upload required (runs through the user's Cloudglue account) — rerun without `--no-upload` or confirm with the user |
56
57
  | `needs_download` | fetch locally first: `tinycloud grab <url> --json` |
57
58
  | `paused` | stop; surface `resume` info to the user (resume is not automated in 0.3.x) |
@@ -16,7 +16,7 @@ Envelope schema version: `"1"` (reported in `--version --json` as
16
16
  "meta": { "elapsed_ms": 1234, "requires": "cloud", "cache": { "identity": "hit" } },
17
17
  "summary": "one-line human summary",
18
18
  "next": [ { "…": "suggested follow-up commands" } ],
19
- "setup": { "service": "cloudglue", "env": ["CLOUDGLUE_API_KEY"], "command": "tinycloud setup cloudglue" },
19
+ "setup": { "service": "cloudglue", "env": ["CLOUDGLUE_API_KEY"], "command": "tinycloud setup cloudglue", "login_command": "tinycloud login" },
20
20
  "resume": { "run_id": "…", "paused_step": "…", "resume_command": "…" },
21
21
  "error": { "code": "validation", "message": "…", "retryable": false }
22
22
  }
@@ -44,7 +44,7 @@ Envelope schema version: `"1"` (reported in `--version --json` as
44
44
  | `ready` | 0 | `data` usable | consume and continue |
45
45
  | `pending` | 0 | `meta.job_id` set | `tinycloud jobs wait <id> --timeout 120s --json`; do NOT start downstream work |
46
46
  | `paused` | 0 | `resume` present | stop; surface resume info (resume not automated in 0.3.x) |
47
- | `needs_credentials` | 2 | `setup` present | run `setup.command` or set `setup.env` |
47
+ | `needs_credentials` | 2 | `setup` present | run `setup.command` (or `setup.login_command`, `tinycloud login`, browser sign-in — 0.3.10+) or set `setup.env` |
48
48
  | `needs_upload` | 3 | — | cloud upload required (runs through the user's Cloudglue account); rerun without `--no-upload` after confirming |
49
49
  | `needs_download` | 3 | — | materialize locally first (`tinycloud grab …`) |
50
50
  | `error` | 1 | `error` present | stop; report `error.message`; retry only if `error.retryable` |
@@ -14,6 +14,12 @@ connector?" or an envelope field needs explaining.
14
14
  - **tinycloud** — the agent CLI distributed from this repo
15
15
  (https://tinycloud.sh). Local verbs (`clip`, `search`, `setup`) run on your
16
16
  machine; cloud verbs call Cloudglue with your API key.
17
+ - **Browser sign-in / device login (0.3.10+)** — `tinycloud login` runs an
18
+ OAuth-style device-authorization flow: it prints a short code + verification
19
+ URL, opens the Cloudglue dashboard, and on approval mints a normal `cg-` API
20
+ key saved to config exactly like a pasted key (the raw key is never printed).
21
+ The interactive counterpart of `setup cloudglue --api-key`; paste-key and
22
+ `$CLOUDGLUE_API_KEY` remain fully supported for headless/scripted setup.
17
23
 
18
24
  ## Media and identity
19
25
 
@@ -33,10 +39,11 @@ connector?" or an envelope field needs explaining.
33
39
  `library collections show <col>` until every `files[].status` is `completed`
34
40
  before querying.
35
41
  - **Data connector** — a linked external source of recordings (Zoom, Grain,
36
- Google Drive, Dropbox, Loom, S3/GCS). `tinycloud library connectors …`
37
- lists, browses (`files`, with provider-specific filters), and syncs
38
- individual items by URI (e.g. `grain://recording/<id>`) so they become
39
- Cloudglue files.
42
+ Gong, Recall, Google Drive, Dropbox, S3/GCS). `tinycloud library connectors …`
43
+ lists, browses (`files`, with provider-specific filters; rows carry provider
44
+ metadata on 0.3.11+), peeks one item's provider metadata without syncing
45
+ (`inspect`, 0.3.11+), and syncs individual items by URI
46
+ (e.g. `grain://recording/<id>`) so they become Cloudglue files.
40
47
  - **Source** — anything a verb accepts as input: a local path, URL,
41
48
  `cloudglue://files/<id>` URI, connector URI, collection, or a bare file-id
42
49
  UUID (normalized to `cloudglue://files/<id>`; an existing local path of the
@@ -31,11 +31,22 @@ Usage is billed to that key per the
31
31
  [rate card](https://app.cloudglue.dev/home/billing/rate-card).
32
32
 
33
33
  ```bash
34
+ tinycloud login # browser sign-in → provisions & saves a key (0.3.10+)
35
+ # or paste/point at a key yourself:
34
36
  tinycloud setup cloudglue --api-key <key> # persist the key
35
37
  # or
36
38
  export CLOUDGLUE_API_KEY=<key> # env only, nothing persisted
37
39
  ```
38
40
 
41
+ `tinycloud login` (0.3.10+) runs an OAuth-style device sign-in: it best-effort
42
+ opens the Cloudglue dashboard, you approve a short code, and a normal `cg-` API
43
+ key is minted and saved to config exactly like a pasted key — you never handle
44
+ the key. It blocks on a browser flow (~minutes), so for headless or scripted
45
+ setup prefer `setup cloudglue --api-key` / `$CLOUDGLUE_API_KEY`. When a cloud
46
+ verb hits missing credentials, the `needs_credentials` envelope's `setup` object
47
+ now carries both `setup.command` (`tinycloud setup cloudglue`) and
48
+ `setup.login_command` (`tinycloud login`).
49
+
39
50
  `frameio` is an optional service and requires interactive OAuth
40
51
  (`tinycloud setup frameio` inside the tinycloud agent TUI).
41
52
 
@@ -21,6 +21,7 @@ every verb. Regenerate doubts from it instead of trusting prose.
21
21
  | `workflow` | varies | no | Validate/plan/run workflow recipes |
22
22
  | `publish` | cloud | yes | Publish HTML/code artifacts as Cloudglue Sites; share videos |
23
23
  | `setup` | local | no | Credentials and service connections |
24
+ | `login` | network | no | Browser sign-in → provisions & saves a Cloudglue API key (0.3.10+) |
24
25
 
25
26
  Cloud verbs run through the configured Cloudglue API key.
26
27
  `caption`/`library`/`workflow` vary by what they end up doing.
@@ -205,6 +206,7 @@ tinycloud library collections delete <col_id> --json
205
206
  tinycloud library collections entities <col_id> <source> [--limit <n>] [--offset <n>] --json # read a video's entities
206
207
  tinycloud library connectors list --json
207
208
  tinycloud library connectors files <connector-id> [--limit 25] [--page-token <t>] --json
209
+ tinycloud library connectors inspect [<connector-id>] <uri-or-share-link> --json # metadata peek, no file created (0.3.11+)
208
210
  tinycloud library connectors sync [<connector-id>] <uri-share-link-or-public-url> --json
209
211
  ```
210
212
 
@@ -249,17 +251,32 @@ Dropbox file share links sync server-side via the connector's OAuth
249
251
  (including login-gated links); `zoom.us/rec/share` links resolve best-effort
250
252
  (Zoom mints a new token per copy — the recording-detail link is the reliable
251
253
  form). Link warnings are advisory and surface in `data.warnings` rather than
252
- blocking the sync. Non-connector public URLs (direct media URLs, TikTok,
254
+ blocking the sync. Synced files carry provider `source_metadata` (title,
255
+ participants, summary) for Grain, Zoom, Recall, Google Drive, Dropbox, and
256
+ Gong. Non-connector public URLs (direct media URLs, TikTok,
253
257
  Loom, public Dropbox links without a connector) sync into a standalone
254
258
  Cloudglue file via direct URL ingestion — same command, no connector needed.
255
259
  YouTube URLs cannot sync; use `tinycloud grab` instead.
256
260
 
257
261
  `connectors files` also takes provider-specific filters: `--from`/`--to`
258
- (Zoom, Grain dates), `--folder-id` (Google Drive), `--path` (Dropbox),
259
- `--bucket`/`--prefix` (S3/GCS), `--title-search`/`--team`/`--meeting-type`
260
- (Grain). Collection IDs (`col_…`) are stable; collection names are
262
+ (dates — every provider except S3/GCS; Zoom and Gong default to the last
263
+ 6 months), `--folder-id` (Google Drive), `--path` (Dropbox),
264
+ `--bucket`/`--prefix` (S3/GCS bucket required), `--title-search` (Grain,
265
+ Zoom, Google Drive, Dropbox, Gong), `--team`/`--meeting-type` (Grain).
266
+ Filters a provider can't honor are ignored, and filtered pages can come back
267
+ short or even empty while more remain — keep paging until `next_page_token`
268
+ is null. On 0.3.11+ each row also carries provider `metadata` (participants,
269
+ host, duration, AI summary) when the source exposes it — use it to pick files
270
+ before syncing. Collection IDs (`col_…`) are stable; collection names are
261
271
  display-only.
262
272
 
273
+ `connectors inspect <uri>` (0.3.11+, feature `library.connectors.inspect.v1`)
274
+ returns one item's provider `source_metadata` WITHOUT materializing a file —
275
+ same URI/share-link forms as sync, connector id optional. S3/GCS objects have
276
+ nothing richer to inspect. On older binaries it fails with an unknown-command
277
+ error — fall back to `connectors sync` (idempotent) and read
278
+ `source_metadata` from the sync envelope instead.
279
+
263
280
  ### jobs — async work
264
281
 
265
282
  ```bash
@@ -427,6 +444,26 @@ tinycloud setup --list --json # known services
427
444
  tinycloud setup cloudglue --api-key <key> # or --stdin
428
445
  ```
429
446
 
447
+ ### login — browser sign-in (network, 0.3.10+)
448
+
449
+ ```bash
450
+ tinycloud login [--no-browser] [--web-url <url>] [--label <text>] --json
451
+ ```
452
+
453
+ An OAuth-style **device-authorization** sign-in — the interactive counterpart of
454
+ `tinycloud setup cloudglue --api-key`. It prints a short code + a verification
455
+ URL, best-effort opens the Cloudglue dashboard, and polls until you approve;
456
+ approval mints a normal `cg-` API key that is saved to `~/.tinycloud/config.json`
457
+ (0600) exactly like a pasted key. The **raw key is never printed** — the `ready`
458
+ envelope's `data` carries only `{account, api_base_url, key_masked, config_path,
459
+ replaced_existing}` (progress code + URL go to **stderr**). `--no-browser` prints
460
+ the URL only (SSH/containers); `--web-url` (or `$CLOUDGLUE_WEB_URL`) points at a
461
+ non-default dashboard; `--label` names the provisioned key (default: hostname).
462
+ Revoke by deleting the key in the dashboard. Because it blocks on a
463
+ ~10-minute human flow, `login` is a manual/onboarding command — don't script it
464
+ into an agent's tool loop; for headless/automated setup keep using
465
+ `tinycloud setup cloudglue --api-key <key>` or `$CLOUDGLUE_API_KEY`.
466
+
430
467
  ## Shared flags
431
468
 
432
469
  Output: `--json` (force JSONL envelopes), `--pretty` (one JSON array),
@@ -1,5 +1,5 @@
1
1
  {
2
- "skill_version": "0.3.9",
2
+ "skill_version": "0.3.11",
3
3
  "tinycloud": {
4
4
  "min_version": "0.3.7",
5
5
  "supported_range": ">=0.3.7 <0.4.0",
@@ -43,18 +43,26 @@ at https://tinycloud.sh. Windows is unsupported — use WSL2.
43
43
  tinycloud setup --check --json </dev/null
44
44
  ```
45
45
 
46
- If `data.ok` is `true`, go to step 3. Otherwise tell the user: cloud
47
- features run through a Cloudglue account keys live at
48
- [app.cloudglue.dev](https://app.cloudglue.dev) (usage billed per the
49
- [rate card](https://app.cloudglue.dev/home/billing/rate-card)). Ask them to
50
- paste their API key, then configure it via stdin so the key never lands in
51
- shell history or process args:
52
-
53
- ```bash
54
- printf '%s' "<key>" | tinycloud setup cloudglue --stdin
55
- ```
56
-
57
- Re-run `tinycloud setup --check --json` and confirm `data.ok == true`.
46
+ If `data.ok` is `true`, go to step 3. Otherwise cloud features run through a
47
+ Cloudglue account (usage billed per the
48
+ [rate card](https://app.cloudglue.dev/home/billing/rate-card)) connect one of
49
+ two ways:
50
+
51
+ - **Browser sign-in (recommended; tinycloud 0.3.10+).** Ask the user to run
52
+ `tinycloud login` **themselves in their terminal** — it's an interactive
53
+ browser flow you can't drive from here. It opens the Cloudglue dashboard, they
54
+ approve a short code, and a key is provisioned and saved automatically (no
55
+ copy-pasting keys).
56
+ - **Paste an API key.** If they'd rather paste an existing key (or their
57
+ tinycloud predates `login`), have them get one at
58
+ [app.cloudglue.dev](https://app.cloudglue.dev) and configure it via stdin so
59
+ the key never lands in shell history or process args — this path you can run:
60
+
61
+ ```bash
62
+ printf '%s' "<key>" | tinycloud setup cloudglue --stdin
63
+ ```
64
+
65
+ Then re-run `tinycloud setup --check --json` and confirm `data.ok == true`.
58
66
 
59
67
  ## 3. Prove it works (free)
60
68