@cloudglue/tinycloud 0.3.0 → 0.3.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudglue/tinycloud",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Agent CLI for deep video work, by Cloudglue. Downloads the tinycloud binary on first run.",
5
5
  "bin": {
6
6
  "tinycloud": "bin/tinycloud.js"
@@ -57,7 +57,9 @@ Parse the single JSON envelope from stdout (machine output; logs are stderr):
57
57
  Default: `./tinycloud-output/runs/<data.run_id>/ad-analysis.html`.
58
58
  - Report the HTML path; offer
59
59
  `tinycloud publish <html> --name ad-analysis --visibility private --json`
60
- to host it as a shareable page.
60
+ to host it as a shareable page. Share the returned `data.url` (fresh
61
+ content can take ~1 min to appear there; `data.version_url` is live
62
+ immediately, so a brief 403 at `data.url` is not a failure).
61
63
 
62
64
  Any other `status` (`needs_credentials`, `needs_upload`, `pending`, `paused`,
63
65
  `error`) or `data.status` of `partial`/`failed`: stop, report the envelope's
@@ -57,7 +57,9 @@ Parse the single JSON envelope from stdout (machine output; logs are stderr):
57
57
  Default: `./tinycloud-output/runs/<data.run_id>/blog-post.html`.
58
58
  - Report the HTML path; offer
59
59
  `tinycloud publish <html> --name blog-post --visibility private --json`
60
- to host it as a shareable page.
60
+ to host it as a shareable page. Share the returned `data.url` (fresh
61
+ content can take ~1 min to appear there; `data.version_url` is live
62
+ immediately, so a brief 403 at `data.url` is not a failure).
61
63
 
62
64
  Any other `status` (`needs_credentials`, `needs_upload`, `pending`, `paused`,
63
65
  `error`) or `data.status` of `partial`/`failed`: stop, report the envelope's
@@ -57,7 +57,9 @@ Parse the single JSON envelope from stdout (machine output; logs are stderr):
57
57
  Default: `./tinycloud-output/runs/<data.run_id>/meeting-breakdown.html`.
58
58
  - Report the HTML path; offer
59
59
  `tinycloud publish <html> --name meeting-breakdown --visibility private --json`
60
- to host it as a shareable page.
60
+ to host it as a shareable page. Share the returned `data.url` (fresh
61
+ content can take ~1 min to appear there; `data.version_url` is live
62
+ immediately, so a brief 403 at `data.url` is not a failure).
61
63
 
62
64
  Any other `status` (`needs_credentials`, `needs_upload`, `pending`, `paused`,
63
65
  `error`) or `data.status` of `partial`/`failed`: stop, report the envelope's
@@ -58,7 +58,9 @@ Parse the single JSON envelope from stdout (machine output; logs are stderr):
58
58
  Default: `./tinycloud-output/runs/<data.run_id>/sales-coaching.html`.
59
59
  - Report the HTML path to the user; offer
60
60
  `tinycloud publish <html> --name sales-coaching --visibility private --json`
61
- to host it as a shareable page.
61
+ to host it as a shareable page. Share the returned `data.url` (fresh
62
+ content can take ~1 min to appear there; `data.version_url` is live
63
+ immediately, so a brief 403 at `data.url` is not a failure).
62
64
 
63
65
  Any other `status` (`needs_credentials`, `needs_upload`, `pending`, `paused`,
64
66
  `error`) or `data.status` of `partial`/`failed`: stop, report the envelope's
@@ -98,6 +98,9 @@ tinycloud jobs wait <job-id> --timeout 120s --json
98
98
  # Publish an HTML artifact to Cloudglue Sites (manage with list / unpublish)
99
99
  tinycloud publish ./tinycloud-output/html/report.html --name report --visibility private --json
100
100
  tinycloud publish list --json
101
+
102
+ # Share a video itself (hosted share page + HLS stream, like a Loom link)
103
+ tinycloud publish video ./demo.mp4 --visibility public --json
101
104
  ```
102
105
 
103
106
  Per-verb details and all flags: [reference/verbs.md](reference/verbs.md).
@@ -131,8 +134,9 @@ Authoring your own recipes: [reference/workflow-authoring.md](reference/workflow
131
134
  [command]`) — don't add `--allow-command` for them (host-agent permission
132
135
  classifiers may flag it); it's only needed for path-run recipes without
133
136
  that permission.
134
- - Sources: local paths, URLs, `cloudglue://files/<id>` URIs, or
135
- `collection:col_…` a bare file-id UUID is not accepted.
137
+ - Sources: local paths, URLs, `cloudglue://files/<id>` URIs,
138
+ `collection:col_…`, or a bare Cloudglue file-id UUID (normalized to
139
+ `cloudglue://files/<id>`; an existing local path of the same name wins).
136
140
  - Do not pass `--background` to `ask`; background jobs exist only for tracked
137
141
  async ops (`watch`, `extract`).
138
142
  - `workflow status` / `workflow resume` are not implemented in 0.3.x; treat
@@ -146,6 +150,17 @@ Authoring your own recipes: [reference/workflow-authoring.md](reference/workflow
146
150
  `--out` flag where supported).
147
151
  - Cached results are reused automatically; `--refresh` forces re-computation,
148
152
  `--no-cache` disables persistence.
153
+ - After `publish`, share `data.url` (the stable site link). Fresh content can
154
+ take up to a minute to appear there — a brief 403 right after publishing is
155
+ propagation, not a failure; `data.version_url` serves that exact version
156
+ immediately.
157
+ - Never pair a private video share with a public site: private stream URLs
158
+ are signed and short-lived (never hard-code them) — embed via
159
+ `data.embed_snippet` (`<cg-video>`), which only plays on a private site of
160
+ the same account. When writing HTML around an embed, use the component's
161
+ built-ins (`autoplay`+`muted`, `loop`, `start-time`, `exclusive`; JS
162
+ `playSegment(start, end?)`) rather than hand-rolled players — details in
163
+ [reference/verbs.md](reference/verbs.md).
149
164
 
150
165
  ## 5. Reference (load on demand)
151
166
 
@@ -30,8 +30,9 @@ connector?" or an envelope field needs explaining.
30
30
  individual items by URI (e.g. `grain://recording/<id>`) so they become
31
31
  Cloudglue files.
32
32
  - **Source** — anything a verb accepts as input: a local path, URL,
33
- `cloudglue://files/<id>` URI, connector URI, or collection. Bare file-id
34
- UUIDs are not accepted — wrap them as `cloudglue://files/<id>`.
33
+ `cloudglue://files/<id>` URI, connector URI, collection, or a bare file-id
34
+ UUID (normalized to `cloudglue://files/<id>`; an existing local path of the
35
+ same name wins).
35
36
  - **`ref` / `source_id` / `result_id`** — stable identifiers in every
36
37
  envelope. `ref` is a reusable pointer to the analyzed source (including
37
38
  `cloud_ready` and the Cloudglue file id) that pipes between verbs;
@@ -68,6 +69,19 @@ connector?" or an envelope field needs explaining.
68
69
  - **Command step** — a workflow step that runs a local script (e.g. an HTML
69
70
  renderer); gated by `--allow-command` / recipe `permissions: [command]`.
70
71
  - **Cloudglue Sites** — hosted pages for published artifacts:
71
- `tinycloud publish <html> --visibility public|private` returns a shareable
72
- URL (private = Cloudglue account members only, same URL). Manage with
73
- `publish list` and `publish unpublish <site-id | site-name | label>`.
72
+ `tinycloud publish <html> --visibility public|private` returns the stable
73
+ site URL (`{name}.cloudglue.site`) as `url` the share link plus a
74
+ `version_url` permalink to that exact version (live immediately; the site
75
+ URL can take up to a minute to serve fresh content). Private = Cloudglue
76
+ account members only, same URL. Manage with `publish list` (rows show
77
+ `published` / `site_version_id`) and
78
+ `publish unpublish <site-id | site-name | label>`.
79
+ - **Video share (shareable asset)** — `tinycloud publish video <source>`
80
+ wraps a Cloudglue file in a hosted share page (`data.share.share_url`) plus
81
+ an HLS stream; one active share per (file, visibility). Private shares
82
+ embed via the `data.embed_snippet` `<cg-video>` tag, which only plays on a
83
+ private published site of the same account. The embed has playback
84
+ attributes (`autoplay`+`muted`, `loop`, `start-time`, `poster`,
85
+ `accent-color`, `exclusive`) and a JS API (`playSegment`, `seekTo`, media
86
+ events re-dispatched on the element) for custom site HTML — see
87
+ reference/verbs.md.
@@ -17,7 +17,7 @@ every verb. Regenerate doubts from it instead of trusting prose.
17
17
  | `library` | varies | no | Collections, connectors, local mirrors, sync |
18
18
  | `jobs` | network | yes | Poll/wait/forget tracked async jobs |
19
19
  | `workflow` | varies | no | Validate/plan/run workflow recipes |
20
- | `publish` | cloud | yes | Publish HTML/code artifacts as Cloudglue Sites |
20
+ | `publish` | cloud | yes | Publish HTML/code artifacts as Cloudglue Sites; share videos |
21
21
  | `setup` | local | no | Credentials and service connections |
22
22
 
23
23
  Cloud verbs run through the configured Cloudglue API key.
@@ -150,11 +150,56 @@ Republishing identical content makes no network calls; flipping visibility
150
150
  patches without re-uploading. `list`/`unpublish` are gated by the
151
151
  `publish.manage.v1` feature id.
152
152
 
153
+ The returned `data.url` is the stable site link (`{name}.cloudglue.site`) —
154
+ share that one. It can take up to a minute to serve fresh content after a
155
+ publish (a brief 403 there is propagation, not a failure); `data.version_url`
156
+ is a permalink to that exact version and is live immediately. `publish list`
157
+ rows carry `published` (whether a version is live at `url`) and
158
+ `site_version_id`; text output marks unpublished sites with
159
+ `(no published version)`.
160
+
153
161
  Note: `--name` is a label for the artifact (republishing reuses it) — the
154
162
  site itself gets a generated name (e.g. `young-fire-2486`) shown by
155
163
  `publish list`. `unpublish` resolves any of: the `site_id` UUID, the
156
164
  generated site name, or your `--name` label.
157
165
 
166
+ ### publish video — share a video
167
+
168
+ ```bash
169
+ tinycloud publish video <source> [--visibility public|private] # default public
170
+ [--name <title>] [--segment-id <id>] --json
171
+ tinycloud publish video list [--in <source>] [--visibility public|private] --json
172
+ tinycloud publish video unpublish <share-id | source> --json # --visibility disambiguates
173
+ ```
174
+
175
+ Wraps a Cloudglue file in a shareable asset — a stable hosted share page
176
+ (`data.share.share_url`) plus an HLS stream. Local sources upload first (same
177
+ prepare step as `watch`). One active share per (file, visibility); re-running
178
+ returns the existing share. Stream processing surfaces as a `pending`
179
+ envelope — re-run per its `next` hint. Gated by the `publish.video.v1`
180
+ feature id.
181
+
182
+ - Public: `data.share.stream_url` is plain HLS usable anywhere players
183
+ support it — bare `<video>` tags only play HLS in Safari.
184
+ - Private: only account members can watch; stream URLs are signed and
185
+ short-lived (redacted in machine output — never hard-code them). Embed with
186
+ `data.embed_snippet` (a `<cg-video share-id="...">` tag), which only plays
187
+ on a PRIVATE published site of the same account — `tinycloud publish`
188
+ rejects an artifact with a private embed targeted at a public site.
189
+
190
+ When generating custom site HTML around a `<cg-video>` embed, use the
191
+ component's built-ins instead of reinventing them. It defaults to a
192
+ responsive 16:9 dark placeholder (override with plain page CSS on the
193
+ `cg-video` selector); mount-time attributes: `autoplay` (pair with `muted` or
194
+ browsers block it), `loop`, `start-time`, `poster`, `accent-color`, and
195
+ `exclusive` (put it on every player in a gallery so starting one pauses the
196
+ rest). Its JS API queues until ready — `playSegment(start, end?)`,
197
+ `seekTo()`, `play()`/`pause()` — and media events are re-dispatched on the
198
+ element (`timeupdate`, `ended`, `cg-ready`); prefer `playSegment` over
199
+ hand-rolled seek logic for "click a moment to play that segment" pages. The
200
+ full reference ships with the binary as `references/cg-video.md` inside the
201
+ bundled media-artifact skill (under the install's `skills/` directory).
202
+
158
203
  ### setup — credentials
159
204
 
160
205
  ```bash
@@ -178,3 +223,9 @@ exact-match history), `--no-upload` (refuse cloud upload → `needs_upload`),
178
223
  `ask`/`probe` always call the cloud; use `search` for a free cached lookup.
179
224
 
180
225
  Source reuse (`watch`/`extract`/`caption`): `--source-id <id>`, `--result-id <id>`.
226
+
227
+ Sources: local paths, URLs, `cloudglue://files/<id>` URIs,
228
+ `collection:col_…`, or a bare Cloudglue file-id UUID — bare ids are
229
+ normalized to `cloudglue://files/<id>` (an existing local path of the same
230
+ name wins), so file ids echoed in tinycloud output can be passed straight
231
+ back as sources or `--in` scopes.
@@ -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.0"
12
+ MIN_VERSION="0.3.1"
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 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 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.1.0",
2
+ "skill_version": "0.2.0",
3
3
  "tinycloud": {
4
- "min_version": "0.3.0",
5
- "supported_range": ">=0.3.0 <0.4.0",
4
+ "min_version": "0.3.1",
5
+ "supported_range": ">=0.3.1 <0.4.0",
6
6
  "required_features": [
7
7
  "envelope.v1",
8
8
  "watch.v1",
@@ -18,6 +18,7 @@
18
18
  "workflow.v1",
19
19
  "publish.v1",
20
20
  "publish.manage.v1",
21
+ "publish.video.v1",
21
22
  "setup.v1"
22
23
  ],
23
24
  "envelope_schema": "1",
@@ -94,7 +94,9 @@ Edit the scaffolded files with the user's specifics.
94
94
  interpolated JS object literals.
95
95
  - If the deliverable should be a URL, finish with
96
96
  `tinycloud publish <html-or-dir> --visibility public|private --json` and
97
- ask the user public-or-private before the first publish.
97
+ ask the user public-or-private before the first publish. Report `data.url`
98
+ (the stable site link) as the deliverable; fresh content can take ~1 min to
99
+ appear there — `data.version_url` serves that exact version immediately.
98
100
 
99
101
  ## 4. Validate and dry-run
100
102