@cloudglue/tinycloud 0.3.1 → 0.3.2
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/package.json +1 -1
- package/skills/tinycloud/SKILL.md +7 -1
- package/skills/tinycloud/reference/envelope.md +5 -1
- package/skills/tinycloud/reference/glossary.md +6 -3
- package/skills/tinycloud/reference/pipelines.md +47 -0
- package/skills/tinycloud/reference/setup.md +6 -0
- package/skills/tinycloud/reference/verbs.md +44 -3
- package/skills/tinycloud/scripts/preflight.sh +2 -2
- package/skills/tinycloud/tinycloud-skill.json +4 -3
package/package.json
CHANGED
|
@@ -91,6 +91,7 @@ tinycloud clip burn ./demo.mp4 --subtitle-file ./captions/demo.srt -o ./out.mp4
|
|
|
91
91
|
|
|
92
92
|
# Remote videos, collections, async jobs
|
|
93
93
|
tinycloud grab https://youtu.be/<id> -o ./tinycloud-output/grabbed/ --json
|
|
94
|
+
tinycloud library connectors sync https://example.com/clip.mp4 --json # public URL → Cloudglue file (not YouTube — use grab)
|
|
94
95
|
tinycloud library collections list --json
|
|
95
96
|
tinycloud watch ./long.mp4 --background --json # returns pending + meta.job_id
|
|
96
97
|
tinycloud jobs wait <job-id> --timeout 120s --json
|
|
@@ -105,6 +106,9 @@ tinycloud publish video ./demo.mp4 --visibility public --json
|
|
|
105
106
|
|
|
106
107
|
Per-verb details and all flags: [reference/verbs.md](reference/verbs.md).
|
|
107
108
|
Multi-video batching and pipe semantics: [reference/pipelines.md](reference/pipelines.md).
|
|
109
|
+
Evaluating a video the host project's code rendered (render → evaluate →
|
|
110
|
+
edit → rerender): the render-review loop in
|
|
111
|
+
[reference/pipelines.md](reference/pipelines.md).
|
|
108
112
|
|
|
109
113
|
## 3. Workflows (packaged recipes)
|
|
110
114
|
|
|
@@ -159,7 +163,9 @@ Authoring your own recipes: [reference/workflow-authoring.md](reference/workflow
|
|
|
159
163
|
`data.embed_snippet` (`<cg-video>`), which only plays on a private site of
|
|
160
164
|
the same account. When writing HTML around an embed, use the component's
|
|
161
165
|
built-ins (`autoplay`+`muted`, `loop`, `start-time`, `exclusive`; JS
|
|
162
|
-
`playSegment(start, end?)`)
|
|
166
|
+
`playSegment(start, end?)`) and the container components
|
|
167
|
+
(`<cg-playlist>`, `<cg-grid>`, `<cg-chapters>`) rather than hand-rolled
|
|
168
|
+
players, galleries, or segment-list JS — details in
|
|
163
169
|
[reference/verbs.md](reference/verbs.md).
|
|
164
170
|
|
|
165
171
|
## 5. Reference (load on demand)
|
|
@@ -59,7 +59,11 @@ the exit code alone.
|
|
|
59
59
|
`needs_download`, `visual_analysis_requires_download`, `upstream`.
|
|
60
60
|
|
|
61
61
|
`upstream` on a piped command means the upstream envelope was not `ready` —
|
|
62
|
-
fix the upstream failure, don't retry downstream.
|
|
62
|
+
fix the upstream failure, don't retry downstream. `upstream` from a cloud
|
|
63
|
+
call itself is a Cloudglue API failure; when it's a request deadline
|
|
64
|
+
(retryable, message names `TINYCLOUD_HTTP_TIMEOUT_MS` /
|
|
65
|
+
`TINYCLOUD_UPLOAD_TIMEOUT_MS`), the server may still be processing — retry
|
|
66
|
+
or raise the knob.
|
|
63
67
|
|
|
64
68
|
## JSON vs JSONL vs text
|
|
65
69
|
|
|
@@ -48,7 +48,9 @@ connector?" or an envelope field needs explaining.
|
|
|
48
48
|
mirrored in Cloudglue, so later `extract`/`ask`/`search` reuse it instead
|
|
49
49
|
of re-analyzing.
|
|
50
50
|
- **Segmentation** — how a video is split for analysis: `chapters`
|
|
51
|
-
(semantic), `shots` (visual cuts
|
|
51
|
+
(semantic), `shots` (visual cuts; bounds tunable via
|
|
52
|
+
`--shot-min-seconds`/`--shot-max-seconds`, sub-second min allowed),
|
|
53
|
+
`uniform:<seconds>` (fixed windows).
|
|
52
54
|
- **Cache layers** — `meta.cache` reports `identity` (is this the same file
|
|
53
55
|
we've seen?) and `enrichment` (analysis results) as
|
|
54
56
|
`hit | miss | written | skipped`.
|
|
@@ -83,5 +85,6 @@ connector?" or an envelope field needs explaining.
|
|
|
83
85
|
private published site of the same account. The embed has playback
|
|
84
86
|
attributes (`autoplay`+`muted`, `loop`, `start-time`, `poster`,
|
|
85
87
|
`accent-color`, `exclusive`) and a JS API (`playSegment`, `seekTo`, media
|
|
86
|
-
events re-dispatched on the element) for custom site HTML
|
|
87
|
-
|
|
88
|
+
events re-dispatched on the element) for custom site HTML, and plays
|
|
89
|
+
standalone or inside the container components (`<cg-playlist>`,
|
|
90
|
+
`<cg-grid>`, `<cg-chapters>`) — see reference/verbs.md.
|
|
@@ -102,3 +102,50 @@ tinycloud watch ./talk.mp4 --json \
|
|
|
102
102
|
| tinycloud extract "the three strongest quotes with timestamps" --json \
|
|
103
103
|
| tinycloud clip cut --from-findings -o ./tinycloud-output/quotes/ --json
|
|
104
104
|
```
|
|
105
|
+
|
|
106
|
+
## Render-review loop (videos your code generates)
|
|
107
|
+
|
|
108
|
+
When the host project's code produces a video (Remotion, Manim, ffmpeg
|
|
109
|
+
filter graphs, slide-render pipelines, recorded E2E runs), don't stop at a
|
|
110
|
+
successful render exit code — a clean render is not a good video. Use
|
|
111
|
+
tinycloud as the eyes in the edit loop:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
# 1. Render with the project's own tooling (example: Remotion).
|
|
115
|
+
npx remotion render Promo out/promo.mp4
|
|
116
|
+
|
|
117
|
+
# 2. Evaluate the result.
|
|
118
|
+
tinycloud watch ./out/promo.mp4 --segment shots --json \
|
|
119
|
+
| tinycloud extract "Evaluate pacing, text readability and clipping, scene \
|
|
120
|
+
continuity, and audio/visual sync. Return timestamped findings with \
|
|
121
|
+
severity and concrete edit instructions." --json
|
|
122
|
+
|
|
123
|
+
# 3. Map each finding's timestamp to code (frame = seconds x fps for
|
|
124
|
+
# frame-based renderers), apply fixes, rerender to the SAME path.
|
|
125
|
+
|
|
126
|
+
# 4. Re-evaluate, feeding the previous findings back so the model confirms fixes.
|
|
127
|
+
tinycloud watch ./out/promo.mp4 --segment shots --json \
|
|
128
|
+
| tinycloud extract "Re-evaluate this render. Previous findings: <summarize \
|
|
129
|
+
prior findings>. Confirm whether each is resolved and report any new \
|
|
130
|
+
issues." --json
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Loop rules:
|
|
134
|
+
|
|
135
|
+
- Stop when findings are empty or low-severity only; then report done with
|
|
136
|
+
the final findings summary. "Done" means evaluated, not rendered.
|
|
137
|
+
- Hunting sub-second flash frames or rapid cuts? Tighten the shot pass with
|
|
138
|
+
`--shot-min-seconds 0.6` (fractional values allowed);
|
|
139
|
+
`--shot-max-seconds` caps overly long shots the same way.
|
|
140
|
+
- Each rerender is a new file, so each iteration uploads and runs through
|
|
141
|
+
the configured Cloudglue API key
|
|
142
|
+
(https://app.cloudglue.dev/home/billing/rate-card). Tell the user, and
|
|
143
|
+
prefer short/low-res preview renders while iterating when the project
|
|
144
|
+
supports them.
|
|
145
|
+
- Reuse the same output path between iterations so stale renders don't pile
|
|
146
|
+
up; the new file content makes the cache treat it as a new source (that is
|
|
147
|
+
correct — you want the new render evaluated, not the cached old one).
|
|
148
|
+
|
|
149
|
+
You own the renderer-specific half of the loop (mapping timestamps to frames
|
|
150
|
+
and code, editing, rerendering); tinycloud only ever sees the media file.
|
|
151
|
+
The loop applies to any pipeline that emits video.
|
|
@@ -95,3 +95,9 @@ binary reports in `--version --json`.
|
|
|
95
95
|
| `CLOUDGLUE_API_KEY` | Cloudglue API key (alternative to `tinycloud setup cloudglue`) |
|
|
96
96
|
| `TINYCLOUD_VERSION` | npm launcher: run a specific binary version |
|
|
97
97
|
| `TINYCLOUD_INSTALL_DIR` | npm launcher: cache root (default `~/.tinycloud`) |
|
|
98
|
+
| `TINYCLOUD_HTTP_TIMEOUT_MS` | Hard deadline per Cloudglue request (default 120s; `0` disables) |
|
|
99
|
+
| `TINYCLOUD_UPLOAD_TIMEOUT_MS` | Deadline for upload-shaped requests (default 60min; `0` disables) |
|
|
100
|
+
|
|
101
|
+
Every Cloudglue request carries a hard deadline, so a stalled route can never
|
|
102
|
+
hang the CLI indefinitely; a timeout surfaces as a retryable `upstream` error
|
|
103
|
+
envelope whose message names the knob to adjust.
|
|
@@ -31,20 +31,31 @@ Flags shared by most verbs are listed once at the bottom.
|
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
33
|
tinycloud watch <source> [--segment uniform:20|chapters|shots|segments]
|
|
34
|
+
[--shot-min-seconds <s>] [--shot-max-seconds <s>]
|
|
34
35
|
[--profile default|light|custom] [--speech-only | --visual-only]
|
|
35
36
|
[--start <t>] [--end <t>] [--transcript] [--content] [--json-index]
|
|
36
37
|
[--background]
|
|
37
38
|
```
|
|
38
39
|
|
|
40
|
+
Shot bounds tune `--segment shots` only: min 0.6–600 (fractional/sub-second
|
|
41
|
+
values catch flash frames and rapid cuts), max 1–600, min ≤ max. Out-of-range
|
|
42
|
+
or wrong-mode values fail with a validation envelope before any upload. The
|
|
43
|
+
bounds are part of the cache key, so tuned and default shot passes never
|
|
44
|
+
collide.
|
|
45
|
+
|
|
39
46
|
### extract — structured facts
|
|
40
47
|
|
|
41
48
|
```bash
|
|
42
49
|
tinycloud extract "<query>" <source> --json # free-form query
|
|
43
50
|
tinycloud extract --schema ./schema.json <source> # JSON-schema-shaped output
|
|
44
51
|
[--segment-level] [--segmentation chapters|shots|segments]
|
|
52
|
+
[--shot-min-seconds <s>] [--shot-max-seconds <s>]
|
|
45
53
|
[--include-thumbnails] [--transcript-mode] [--background]
|
|
46
54
|
```
|
|
47
55
|
|
|
56
|
+
`--shot-min-seconds`/`--shot-max-seconds` work exactly as on `watch`, against
|
|
57
|
+
`--segmentation shots`.
|
|
58
|
+
|
|
48
59
|
### caption — subtitles and transcripts
|
|
49
60
|
|
|
50
61
|
```bash
|
|
@@ -105,9 +116,23 @@ tinycloud library collections show <col_id> --json
|
|
|
105
116
|
tinycloud library collections sync <col_id> --artifacts descriptions,transcripts,thumbnails,metadata --json
|
|
106
117
|
tinycloud library connectors list --json
|
|
107
118
|
tinycloud library connectors files <connector-id> [--limit 25] [--page-token <t>] --json
|
|
108
|
-
tinycloud library connectors sync <connector-id> <uri> --json
|
|
119
|
+
tinycloud library connectors sync [<connector-id>] <uri-share-link-or-public-url> --json
|
|
109
120
|
```
|
|
110
121
|
|
|
122
|
+
`connectors sync` materializes its argument into a Cloudglue file without
|
|
123
|
+
starting analysis (idempotent). The connector id is optional — with just a
|
|
124
|
+
URI or link, sync routes through the matching connector type. Connector URIs
|
|
125
|
+
(`grain://recording/<id>`, `gdrive://file/<id>`, `dropbox://<path>`,
|
|
126
|
+
`zoom://uuid/<uuid>`, `s3://<bucket>/<key>`, …) and share links are accepted:
|
|
127
|
+
Dropbox file share links sync server-side via the connector's OAuth
|
|
128
|
+
(including login-gated links); `zoom.us/rec/share` links resolve best-effort
|
|
129
|
+
(Zoom mints a new token per copy — the recording-detail link is the reliable
|
|
130
|
+
form). Link warnings are advisory and surface in `data.warnings` rather than
|
|
131
|
+
blocking the sync. Non-connector public URLs (direct media URLs, TikTok,
|
|
132
|
+
Loom, public Dropbox links without a connector) sync into a standalone
|
|
133
|
+
Cloudglue file via direct URL ingestion — same command, no connector needed.
|
|
134
|
+
YouTube URLs cannot sync; use `tinycloud grab` instead.
|
|
135
|
+
|
|
111
136
|
`connectors files` also takes provider-specific filters: `--from`/`--to`
|
|
112
137
|
(Zoom, Grain dates), `--folder-id` (Google Drive), `--path` (Dropbox),
|
|
113
138
|
`--bucket`/`--prefix` (S3/GCS), `--title-search`/`--team`/`--meeting-type`
|
|
@@ -196,8 +221,24 @@ browsers block it), `loop`, `start-time`, `poster`, `accent-color`, and
|
|
|
196
221
|
rest). Its JS API queues until ready — `playSegment(start, end?)`,
|
|
197
222
|
`seekTo()`, `play()`/`pause()` — and media events are re-dispatched on the
|
|
198
223
|
element (`timeupdate`, `ended`, `cg-ready`); prefer `playSegment` over
|
|
199
|
-
hand-rolled seek logic for "click a moment to play that segment" pages.
|
|
200
|
-
|
|
224
|
+
hand-rolled seek logic for "click a moment to play that segment" pages.
|
|
225
|
+
|
|
226
|
+
For multi-video or segment-navigation pages, prefer the container components
|
|
227
|
+
over hand-rolled galleries and segment-list JS:
|
|
228
|
+
|
|
229
|
+
- `<cg-playlist>` + `<cg-playlist-item share-id="…">` — one player plus a
|
|
230
|
+
clickable track list, with auto-advance.
|
|
231
|
+
- `<cg-grid>` + `<cg-grid-item share-id="…">` — lazy poster-card gallery,
|
|
232
|
+
inline or lightbox modal, at most one live player.
|
|
233
|
+
- `<cg-chapters>` + `<cg-chapter start="…" [end="…"]>` — segment navigation
|
|
234
|
+
bound to a player by id; an `end` attribute plays just that clip via
|
|
235
|
+
`playSegment`. Hand-rolled `playSegment` calls remain the fallback for
|
|
236
|
+
fully custom layouts.
|
|
237
|
+
|
|
238
|
+
Share ids inside `<cg-playlist-item>`/`<cg-grid-item>` tags count toward the
|
|
239
|
+
private-embed guard: `tinycloud publish` rejects an artifact embedding a
|
|
240
|
+
private share — directly or through a container — on a public site. The full
|
|
241
|
+
reference ships with the binary as `references/cg-video.md` inside the
|
|
201
242
|
bundled media-artifact skill (under the install's `skills/` directory).
|
|
202
243
|
|
|
203
244
|
### setup — credentials
|
|
@@ -9,11 +9,11 @@ set -u
|
|
|
9
9
|
|
|
10
10
|
# Mirror tinycloud-skill.json: min_version / supported_range upper bound
|
|
11
11
|
# (CI diffs these against the manifest).
|
|
12
|
-
MIN_VERSION="0.3.
|
|
12
|
+
MIN_VERSION="0.3.2"
|
|
13
13
|
MAX_VERSION_EXCLUSIVE="0.4.0"
|
|
14
14
|
INSTALL_CMD='curl -fsSL https://app.cloudglue.dev/tinycloud.sh | bash'
|
|
15
15
|
# Kept in sync with ../tinycloud-skill.json required_features (CI diffs them).
|
|
16
|
-
REQUIRED_FEATURES="envelope.v1 watch.v1 extract.v1 caption.v1 search.v1 probe.v1 ask.v1 clip.v1 grab.v1 jobs.v1 library.collections.v1 workflow.v1 publish.v1 publish.manage.v1 publish.video.v1 setup.v1"
|
|
16
|
+
REQUIRED_FEATURES="envelope.v1 watch.v1 extract.v1 caption.v1 search.v1 probe.v1 ask.v1 clip.v1 grab.v1 jobs.v1 library.collections.v1 library.sync.url.v1 workflow.v1 publish.v1 publish.manage.v1 publish.video.v1 setup.v1"
|
|
17
17
|
|
|
18
18
|
# 1) Binary present and responsive?
|
|
19
19
|
if ! command -v tinycloud >/dev/null 2>&1; then
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"skill_version": "0.
|
|
2
|
+
"skill_version": "0.3.0",
|
|
3
3
|
"tinycloud": {
|
|
4
|
-
"min_version": "0.3.
|
|
5
|
-
"supported_range": ">=0.3.
|
|
4
|
+
"min_version": "0.3.2",
|
|
5
|
+
"supported_range": ">=0.3.2 <0.4.0",
|
|
6
6
|
"required_features": [
|
|
7
7
|
"envelope.v1",
|
|
8
8
|
"watch.v1",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"grab.v1",
|
|
16
16
|
"jobs.v1",
|
|
17
17
|
"library.collections.v1",
|
|
18
|
+
"library.sync.url.v1",
|
|
18
19
|
"workflow.v1",
|
|
19
20
|
"publish.v1",
|
|
20
21
|
"publish.manage.v1",
|