@b3os/sdk 0.0.1 → 0.1.3

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.
Files changed (204) hide show
  1. package/README.md +171 -42
  2. package/dist/cjs/core/bytes.d.ts +30 -0
  3. package/dist/cjs/core/bytes.js +115 -0
  4. package/dist/cjs/core/bytes.js.map +1 -0
  5. package/dist/cjs/core/client.d.ts +61 -3
  6. package/dist/cjs/core/client.js +211 -33
  7. package/dist/cjs/core/client.js.map +1 -1
  8. package/dist/cjs/core/errors.d.ts +16 -4
  9. package/dist/cjs/core/errors.js +9 -6
  10. package/dist/cjs/core/errors.js.map +1 -1
  11. package/dist/cjs/core/handle.d.ts +31 -0
  12. package/dist/cjs/core/handle.js +86 -0
  13. package/dist/cjs/core/handle.js.map +1 -0
  14. package/dist/cjs/core/index.d.ts +6 -4
  15. package/dist/cjs/core/index.js +8 -1
  16. package/dist/cjs/core/index.js.map +1 -1
  17. package/dist/cjs/core/login.d.ts +24 -0
  18. package/dist/cjs/core/login.js +93 -0
  19. package/dist/cjs/core/login.js.map +1 -0
  20. package/dist/cjs/core/namespace.d.ts +1 -1
  21. package/dist/cjs/core/namespace.js +1 -1
  22. package/dist/cjs/core/op.d.ts +11 -1
  23. package/dist/cjs/core/timing.d.ts +1 -1
  24. package/dist/cjs/core/timing.js +8 -1
  25. package/dist/cjs/core/timing.js.map +1 -1
  26. package/dist/cjs/core/transport.js +1 -1
  27. package/dist/cjs/core/transport.js.map +1 -1
  28. package/dist/cjs/core/util.d.ts +15 -3
  29. package/dist/cjs/core/util.js +54 -2
  30. package/dist/cjs/core/util.js.map +1 -1
  31. package/dist/cjs/core/ws.d.ts +4 -0
  32. package/dist/cjs/core/ws.js +7 -4
  33. package/dist/cjs/core/ws.js.map +1 -1
  34. package/dist/cjs/generated/client.d.ts +2 -2
  35. package/dist/cjs/generated/client.js +2 -2
  36. package/dist/cjs/generated/errors.d.ts +1 -1
  37. package/dist/cjs/generated/errors.js +30 -0
  38. package/dist/cjs/generated/errors.js.map +1 -1
  39. package/dist/cjs/generated/jobs.js +1 -1
  40. package/dist/cjs/generated/ns/actions.d.ts +48 -6
  41. package/dist/cjs/generated/ns/actions.js +59 -6
  42. package/dist/cjs/generated/ns/actions.js.map +1 -1
  43. package/dist/cjs/generated/ns/infer.d.ts +185 -54
  44. package/dist/cjs/generated/ns/infer.js +28 -74
  45. package/dist/cjs/generated/ns/infer.js.map +1 -1
  46. package/dist/cjs/generated/ns/keys.d.ts +12 -0
  47. package/dist/cjs/generated/ns/keys.js +22 -0
  48. package/dist/cjs/generated/ns/keys.js.map +1 -1
  49. package/dist/cjs/generated/ns/render.d.ts +95 -6
  50. package/dist/cjs/generated/ns/render.js +124 -7
  51. package/dist/cjs/generated/ns/render.js.map +1 -1
  52. package/dist/cjs/generated/ns/requests.d.ts +3 -1
  53. package/dist/cjs/generated/ns/requests.js +3 -1
  54. package/dist/cjs/generated/ns/requests.js.map +1 -1
  55. package/dist/cjs/generated/ns/routines.d.ts +131 -9
  56. package/dist/cjs/generated/ns/routines.js +186 -9
  57. package/dist/cjs/generated/ns/routines.js.map +1 -1
  58. package/dist/cjs/generated/ns/sandboxes.d.ts +298 -31
  59. package/dist/cjs/generated/ns/sandboxes.js +368 -29
  60. package/dist/cjs/generated/ns/sandboxes.js.map +1 -1
  61. package/dist/cjs/generated/ns/vision.d.ts +133 -14
  62. package/dist/cjs/generated/ns/vision.js +158 -12
  63. package/dist/cjs/generated/ns/vision.js.map +1 -1
  64. package/dist/cjs/generated/ns/webhooks.d.ts +8 -5
  65. package/dist/cjs/generated/ns/webhooks.js +8 -5
  66. package/dist/cjs/generated/ns/webhooks.js.map +1 -1
  67. package/dist/cjs/generated/types.d.ts +1956 -301
  68. package/dist/cjs/helpers/agents.d.ts +95 -0
  69. package/dist/cjs/helpers/agents.js +205 -0
  70. package/dist/cjs/helpers/agents.js.map +1 -0
  71. package/dist/cjs/helpers/render.d.ts +15 -0
  72. package/dist/cjs/helpers/render.js +74 -0
  73. package/dist/cjs/helpers/render.js.map +1 -0
  74. package/dist/cjs/helpers/routines.d.ts +61 -0
  75. package/dist/cjs/helpers/routines.js +234 -0
  76. package/dist/cjs/helpers/routines.js.map +1 -0
  77. package/dist/cjs/helpers/sandboxes.d.ts +237 -0
  78. package/dist/cjs/helpers/sandboxes.js +608 -0
  79. package/dist/cjs/helpers/sandboxes.js.map +1 -0
  80. package/dist/cjs/index.d.ts +4 -1
  81. package/dist/cjs/index.js +8 -5
  82. package/dist/cjs/index.js.map +1 -1
  83. package/dist/cjs/routines.d.ts +1 -0
  84. package/dist/cjs/routines.js +21 -0
  85. package/dist/cjs/routines.js.map +1 -0
  86. package/dist/cjs/webhooks.js.map +1 -1
  87. package/dist/esm/core/bytes.d.ts +30 -0
  88. package/dist/esm/core/bytes.js +111 -0
  89. package/dist/esm/core/bytes.js.map +1 -0
  90. package/dist/esm/core/client.d.ts +61 -3
  91. package/dist/esm/core/client.js +208 -31
  92. package/dist/esm/core/client.js.map +1 -1
  93. package/dist/esm/core/errors.d.ts +16 -4
  94. package/dist/esm/core/errors.js +9 -6
  95. package/dist/esm/core/errors.js.map +1 -1
  96. package/dist/esm/core/handle.d.ts +31 -0
  97. package/dist/esm/core/handle.js +82 -0
  98. package/dist/esm/core/handle.js.map +1 -0
  99. package/dist/esm/core/index.d.ts +6 -4
  100. package/dist/esm/core/index.js +4 -2
  101. package/dist/esm/core/index.js.map +1 -1
  102. package/dist/esm/core/login.d.ts +24 -0
  103. package/dist/esm/core/login.js +85 -0
  104. package/dist/esm/core/login.js.map +1 -0
  105. package/dist/esm/core/namespace.d.ts +1 -1
  106. package/dist/esm/core/namespace.js +1 -1
  107. package/dist/esm/core/op.d.ts +11 -1
  108. package/dist/esm/core/timing.d.ts +1 -1
  109. package/dist/esm/core/timing.js +8 -1
  110. package/dist/esm/core/timing.js.map +1 -1
  111. package/dist/esm/core/transport.js +1 -1
  112. package/dist/esm/core/transport.js.map +1 -1
  113. package/dist/esm/core/util.d.ts +15 -3
  114. package/dist/esm/core/util.js +48 -1
  115. package/dist/esm/core/util.js.map +1 -1
  116. package/dist/esm/core/ws.d.ts +4 -0
  117. package/dist/esm/core/ws.js +7 -4
  118. package/dist/esm/core/ws.js.map +1 -1
  119. package/dist/esm/generated/client.d.ts +2 -2
  120. package/dist/esm/generated/client.js +2 -2
  121. package/dist/esm/generated/errors.d.ts +1 -1
  122. package/dist/esm/generated/errors.js +30 -0
  123. package/dist/esm/generated/errors.js.map +1 -1
  124. package/dist/esm/generated/jobs.js +1 -1
  125. package/dist/esm/generated/ns/actions.d.ts +48 -6
  126. package/dist/esm/generated/ns/actions.js +59 -6
  127. package/dist/esm/generated/ns/actions.js.map +1 -1
  128. package/dist/esm/generated/ns/infer.d.ts +185 -54
  129. package/dist/esm/generated/ns/infer.js +28 -74
  130. package/dist/esm/generated/ns/infer.js.map +1 -1
  131. package/dist/esm/generated/ns/keys.d.ts +12 -0
  132. package/dist/esm/generated/ns/keys.js +22 -0
  133. package/dist/esm/generated/ns/keys.js.map +1 -1
  134. package/dist/esm/generated/ns/render.d.ts +95 -6
  135. package/dist/esm/generated/ns/render.js +124 -7
  136. package/dist/esm/generated/ns/render.js.map +1 -1
  137. package/dist/esm/generated/ns/requests.d.ts +3 -1
  138. package/dist/esm/generated/ns/requests.js +3 -1
  139. package/dist/esm/generated/ns/requests.js.map +1 -1
  140. package/dist/esm/generated/ns/routines.d.ts +131 -9
  141. package/dist/esm/generated/ns/routines.js +186 -9
  142. package/dist/esm/generated/ns/routines.js.map +1 -1
  143. package/dist/esm/generated/ns/sandboxes.d.ts +298 -31
  144. package/dist/esm/generated/ns/sandboxes.js +368 -29
  145. package/dist/esm/generated/ns/sandboxes.js.map +1 -1
  146. package/dist/esm/generated/ns/vision.d.ts +133 -14
  147. package/dist/esm/generated/ns/vision.js +158 -12
  148. package/dist/esm/generated/ns/vision.js.map +1 -1
  149. package/dist/esm/generated/ns/webhooks.d.ts +8 -5
  150. package/dist/esm/generated/ns/webhooks.js +8 -5
  151. package/dist/esm/generated/ns/webhooks.js.map +1 -1
  152. package/dist/esm/generated/types.d.ts +1956 -301
  153. package/dist/esm/helpers/agents.d.ts +95 -0
  154. package/dist/esm/helpers/agents.js +199 -0
  155. package/dist/esm/helpers/agents.js.map +1 -0
  156. package/dist/esm/helpers/render.d.ts +15 -0
  157. package/dist/esm/helpers/render.js +70 -0
  158. package/dist/esm/helpers/render.js.map +1 -0
  159. package/dist/esm/helpers/routines.d.ts +61 -0
  160. package/dist/esm/helpers/routines.js +226 -0
  161. package/dist/esm/helpers/routines.js.map +1 -0
  162. package/dist/esm/helpers/sandboxes.d.ts +237 -0
  163. package/dist/esm/helpers/sandboxes.js +600 -0
  164. package/dist/esm/helpers/sandboxes.js.map +1 -0
  165. package/dist/esm/index.d.ts +4 -1
  166. package/dist/esm/index.js +6 -5
  167. package/dist/esm/index.js.map +1 -1
  168. package/dist/esm/routines.d.ts +1 -0
  169. package/dist/esm/routines.js +5 -0
  170. package/dist/esm/routines.js.map +1 -0
  171. package/dist/esm/webhooks.js.map +1 -1
  172. package/package.json +18 -7
  173. package/src/core/bytes.ts +112 -0
  174. package/src/core/client.ts +253 -33
  175. package/src/core/errors.ts +27 -10
  176. package/src/core/handle.ts +97 -0
  177. package/src/core/index.ts +7 -2
  178. package/src/core/login.ts +98 -0
  179. package/src/core/namespace.ts +1 -1
  180. package/src/core/op.ts +11 -1
  181. package/src/core/timing.ts +7 -2
  182. package/src/core/transport.ts +1 -1
  183. package/src/core/util.ts +53 -3
  184. package/src/core/ws.ts +11 -4
  185. package/src/generated/client.ts +2 -2
  186. package/src/generated/errors.ts +60 -0
  187. package/src/generated/jobs.ts +1 -1
  188. package/src/generated/ns/actions.ts +69 -6
  189. package/src/generated/ns/infer.ts +229 -61
  190. package/src/generated/ns/keys.ts +23 -0
  191. package/src/generated/ns/render.ts +152 -7
  192. package/src/generated/ns/requests.ts +3 -1
  193. package/src/generated/ns/routines.ts +205 -9
  194. package/src/generated/ns/sandboxes.ts +434 -34
  195. package/src/generated/ns/vision.ts +168 -14
  196. package/src/generated/ns/webhooks.ts +8 -5
  197. package/src/generated/types.ts +2211 -422
  198. package/src/helpers/agents.ts +300 -0
  199. package/src/helpers/render.ts +91 -0
  200. package/src/helpers/routines.ts +278 -0
  201. package/src/helpers/sandboxes.ts +788 -0
  202. package/src/index.ts +29 -5
  203. package/src/routines.ts +5 -0
  204. package/src/webhooks.ts +5 -1
@@ -3,10 +3,13 @@ import { Namespace } from "../../core/namespace.ts";
3
3
  import type { Op } from "../../core/op.ts";
4
4
  import type { APIPromise, JobPromise, ListPromise } from "../../core/promise.ts";
5
5
  import type { EventStream } from "../../core/sse.ts";
6
+ import { type ArtifactBytes } from "../../helpers/render.ts";
6
7
  import type * as T from "../types.ts";
7
8
  /** Descriptors of every render operation, keyed by method name (for tooling and custom clients). */
8
9
  export declare const renderOps: {
9
10
  readonly getArtifact: Op;
11
+ readonly listBackgrounds: Op;
12
+ readonly listBackgroundPacks: Op;
10
13
  readonly listPresets: Op;
11
14
  readonly listScreenshots: Op;
12
15
  readonly createScreenshot: Op;
@@ -19,6 +22,8 @@ export declare const renderOps: {
19
22
  readonly cancelVideo: Op;
20
23
  readonly videoEvents: Op;
21
24
  readonly restyleVideo: Op;
25
+ readonly unshareVideo: Op;
26
+ readonly shareVideo: Op;
22
27
  readonly getVideoTimeline: Op;
23
28
  };
24
29
  /** Styled screenshots and product videos (`/v1/render`). */
@@ -33,12 +38,46 @@ export declare class RenderAPI extends Namespace {
33
38
  * `GET /v1/render/artifacts/{artifact_id}` · scope `render:read` · served by the node
34
39
  */
35
40
  getArtifact(artifactId: string, options?: RequestOptions): APIPromise<T.Artifact>;
41
+ /**
42
+ * List library backgrounds
43
+ *
44
+ * Lists the background library: backgrounds a style names with `overrides.background_ref`, with their license,
45
+ * source and a 360x200 thumbnail served by B3OS. Three kinds:
46
+ *
47
+ * - `css`: drawn by the compositor from CSS gradient layers (no image file), recolorable through `tokens`.
48
+ * - `procedural`: the `studio` pack, our own soft meshes computed by the compositor (no image file, no
49
+ * tokens); the ones tagged `auto` are the set the `auto` background preset picks from.
50
+ * - `image`: a lossless WebP from ScreenFramed's curated library (decisions T9 and T10: Sean's grants as owner
51
+ * of the library), up to 3840 px on the long edge, with its measured tone in `image` (theme, luminance, hue,
52
+ * detail; how `"auto"` matches a page). `image.coverage` is `full-bleed` for backgrounds; the `gradients`
53
+ * group holds transparent shapes (`cutout`) drawn over a matte.
54
+ *
55
+ * Rows are in `ref` order, paged by `limit` and `cursor`. A ref whose bytes equal an earlier one's still
56
+ * resolves but is not listed. Public: no API key, rate limited per client address, and answered from the
57
+ * edge's cache for up to 5 minutes.
58
+ *
59
+ * `GET /v1/render/backgrounds` · scope `public` · served by the node
60
+ */
61
+ listBackgrounds(params?: T.RenderListBackgroundsParams, options?: RequestOptions): ListPromise<T.RenderBackgroundList, T.RenderBackground>;
62
+ /**
63
+ * List library background packs
64
+ *
65
+ * Lists the packs of the background library with their license, notice, source, entry count and a cover
66
+ * thumbnail: the CSS packs first, then the image packs by look (`quiet`, `bold`, `soft-photo`, `texture`,
67
+ * `scenic`, `loud`, `cutout`) and size. `auto` says whether `background_ref: "auto"` may pick from the pack.
68
+ * Public and edge-cached like `GET /v1/render/backgrounds`.
69
+ *
70
+ * `GET /v1/render/backgrounds/packs` · scope `public` · served by the node
71
+ */
72
+ listBackgroundPacks(options?: RequestOptions): APIPromise<T.RenderBackgroundPackList>;
36
73
  /**
37
74
  * List style presets
38
75
  *
39
- * Lists the style presets `style` can name (backgrounds, window frames, cursors, caption styles, click effects), with a preview image for each.
76
+ * Lists the style presets `style` can name (backgrounds, window frames, cursors, caption styles, click effects),
77
+ * with a preview image for each. Public: no API key, rate limited per client address, and answered from the
78
+ * edge's cache for up to 5 minutes.
40
79
  *
41
- * `GET /v1/render/presets` · scope `render:read` · served by the node
80
+ * `GET /v1/render/presets` · scope `public` · served by the node
42
81
  */
43
82
  listPresets(params?: T.RenderListPresetsParams, options?: RequestOptions): APIPromise<T.PresetList>;
44
83
  /**
@@ -57,6 +96,19 @@ export declare class RenderAPI extends Namespace {
57
96
  * URLs, or the image bytes directly when `Accept` is `image/png`, `image/jpeg` or `image/webp`. `variants`
58
97
  * adds extra encodings of the same capture. Bills one `render.screenshot` per capture plus one per variant.
59
98
  *
99
+ * A page loaded from `url` is cleaned before the capture: consent walls, sign-up and app dialogs, dim layers
100
+ * and chat widgets are hidden (never clicked, so no consent is given), and with `block_ads` the empty slots of
101
+ * blocked ads collapse. The answer lists what was hidden in `overlays_removed`; `overlays: "keep"` leaves
102
+ * everything and says what is in view in `warnings`. A paywall or registration wall is the site's answer, not
103
+ * clutter: it stays in the image with its dim layer and scroll lock, and `page_state` says so. Readiness (`settle: "auto"`) finishes the page's
104
+ * entrance animations, and when the capture's main area comes back blank while the page is still loading or
105
+ * fading in, captures again every 100 ms for up to 1.5 s (`recapture_ms` in `timing`). Render cannot tell a
106
+ * beacon or a request that never answers from content on its way, so a sparse page that has finished can wait
107
+ * while one is open; a page with nothing coming pays only `ready_check_ms`. A page whose load event is held up (a script or tracker that never answers)
108
+ * is taken once its first screen has painted, from 2 s on (`wait_until: "auto"`, the default). `status_code`,
109
+ * `final_url` and `page_state` say what the site answered, and `warnings` what a caller should know: an error
110
+ * status, a main area that stayed blank, a page taken before its load event, overlays or a wall left in place.
111
+ *
60
112
  * `POST /v1/render/screenshots` · scope `render:run` · served by the node
61
113
  */
62
114
  createScreenshot(body: T.ScreenshotCreateRequest, options: RequestOptions & {
@@ -93,7 +145,9 @@ export declare class RenderAPI extends Namespace {
93
145
  * Record a video
94
146
  *
95
147
  * Starts a job that records a scripted demo of `source.url`. Narration (`say`) is synthesized first with
96
- * `/v1/infer/audio/speech`; the director then places each beat's steps on its narration, plans cursor and
148
+ * `/v1/infer/audio/speech`, as the caller: it needs `infer:run` in the key's scopes too. Without it, or when
149
+ * speech is unavailable, the video is made silent with estimated word times and `result.narration.spoken` is
150
+ * false (without the scope, `result.warnings` has `narration_scope`, naming it); the director then places each beat's steps on its narration, plans cursor and
97
151
  * camera, records segments in parallel on a virtual clock, composes at the output frame rate and encodes MP4
98
152
  * (H.264, BT.709), GIF, poster and captions. Artifacts appear as they finish (`video.artifact` events, poster
99
153
  * first). Bills `render.video_s` per second of output.
@@ -104,7 +158,7 @@ export declare class RenderAPI extends Namespace {
104
158
  /**
105
159
  * Delete a video
106
160
  *
107
- * Cancels the job if it is still running, then deletes the video, its artifacts and its archived capture.
161
+ * Cancels the job if it is still running, then deletes the video, its artifacts, its share page and its archived capture.
108
162
  *
109
163
  * `DELETE /v1/render/videos/{video_id}` · scope `render:write` · served by the node
110
164
  */
@@ -120,7 +174,8 @@ export declare class RenderAPI extends Namespace {
120
174
  /**
121
175
  * Cancel a video
122
176
  *
123
- * Stops the job. Artifacts already produced are kept; seconds already encoded are billed.
177
+ * Stops the job and marks the video canceled. A canceled video bills nothing: `render.video_s` is billed only
178
+ * when a video succeeds. A video that already finished answers 409.
124
179
  *
125
180
  * `POST /v1/render/videos/{video_id}/cancel` · scope `render:run` · served by the node
126
181
  */
@@ -146,14 +201,48 @@ export declare class RenderAPI extends Namespace {
146
201
  * `POST /v1/render/videos/{video_id}/restyle` · scope `render:run` · served by the node
147
202
  */
148
203
  restyleVideo(videoId: string, body: T.VideoRestyleRequest, options?: RequestOptions): JobPromise<T.Video, T.VideoEvent>;
204
+ /**
205
+ * Stop sharing a video
206
+ *
207
+ * Deletes the video's share page; its link stops working within 60 seconds. The video stays, and so do the
208
+ * signed file links the page used (until the video expires); delete the video to end them. Works whether or not
209
+ * the `render.share_pages` flag is on.
210
+ *
211
+ * `DELETE /v1/render/videos/{video_id}/share` · scope `render:write` · served by the node
212
+ */
213
+ unshareVideo(videoId: string, options?: RequestOptions): APIPromise<T.Deleted>;
214
+ /**
215
+ * Share a video
216
+ *
217
+ * Makes a share page for a finished video: one HTML page on `usercontent.b3os.org` that plays the MP4 with its
218
+ * poster, captions and chapters, carries Open Graph tags for link previews, and works as an iframe embed on any
219
+ * site. No script runs on it (`Content-Security-Policy: sandbox`). The link is signed like every artifact URL and
220
+ * lasts as long as the video's MP4 (7 days by default). Sharing again returns the same page while it lasts
221
+ * (200); a new one answers 201.
222
+ *
223
+ * Off by default: creating a share page needs the `render.share_pages` feature flag on for your organization,
224
+ * and answers 404 `feature_not_enabled` without it. The page plays the video from the video's own signed file
225
+ * links, which stay valid until the video expires: stopping the share (or deleting the video) takes the page
226
+ * down within 60 seconds, but only deleting the video ends the file links a viewer or a link preview already
227
+ * has. There is no password option.
228
+ *
229
+ * `POST /v1/render/videos/{video_id}/share` · scope `render:write` · served by the node
230
+ */
231
+ shareVideo(videoId: string, body?: T.VideoShareRequest, options?: RequestOptions): APIPromise<T.VideoShare>;
149
232
  /**
150
233
  * Get a video's timeline
151
234
  *
152
235
  * Returns the compiled timeline of a video that has finished planning: beats, narration with word timings,
153
236
  * the timed action list the recorder replayed, cursor path, camera keyframes, captions and style
154
- * (`timeline.schema.json`). `frames=1` adds the per-frame compositor state (large; for debugging).
237
+ * (`timeline.schema.json`). `frames=true` adds the per-frame compositor state (large; for debugging).
155
238
  *
156
239
  * `GET /v1/render/videos/{video_id}/timeline` · scope `render:read` · served by the node
157
240
  */
158
241
  getVideoTimeline(videoId: string, params?: T.RenderGetVideoTimelineParams, options?: RequestOptions): APIPromise<T.RenderTimeline>;
242
+ /**
243
+ * An artifact's bytes (from a screenshot or video, or its URL). A client that reaches the node (its Unix socket,
244
+ * or a node URL inside a sandbox) reads them from the node's signed content route, so they never leave the
245
+ * machine; any other client fetches the usercontent URL as given.
246
+ */
247
+ fetchArtifact(artifact: Pick<T.Artifact, "url" | "content_type"> | string, options?: RequestOptions): Promise<ArtifactBytes>;
159
248
  }
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.RenderAPI = exports.renderOps = void 0;
5
5
  const jobs_ts_1 = require("../../core/jobs.js");
6
6
  const namespace_ts_1 = require("../../core/namespace.js");
7
+ const render_ts_1 = require("../../helpers/render.js");
7
8
  const getArtifactOp = {
8
9
  id: "renderGetArtifact",
9
10
  method: "GET",
@@ -12,12 +13,26 @@ const getArtifactOp = {
12
13
  timeoutMs: 10000,
13
14
  scope: "render:read",
14
15
  };
16
+ const listBackgroundsOp = {
17
+ id: "renderListBackgrounds",
18
+ method: "GET",
19
+ path: "/v1/render/backgrounds",
20
+ timeoutMs: 10000,
21
+ scope: "public",
22
+ };
23
+ const listBackgroundPacksOp = {
24
+ id: "renderListBackgroundPacks",
25
+ method: "GET",
26
+ path: "/v1/render/backgrounds/packs",
27
+ timeoutMs: 10000,
28
+ scope: "public",
29
+ };
15
30
  const listPresetsOp = {
16
31
  id: "renderListPresets",
17
32
  method: "GET",
18
33
  path: "/v1/render/presets",
19
34
  timeoutMs: 10000,
20
- scope: "render:read",
35
+ scope: "public",
21
36
  };
22
37
  const listScreenshotsOp = {
23
38
  id: "renderListScreenshots",
@@ -91,6 +106,23 @@ const videoEventsOp = {
91
106
  timeoutMs: 3600000,
92
107
  scope: "render:read",
93
108
  };
109
+ const unshareVideoOp = {
110
+ id: "renderUnshareVideo",
111
+ method: "DELETE",
112
+ path: "/v1/render/videos/{video_id}/share",
113
+ params: ["video_id"],
114
+ timeoutMs: 10000,
115
+ scope: "render:write",
116
+ };
117
+ const shareVideoOp = {
118
+ id: "renderShareVideo",
119
+ method: "POST",
120
+ path: "/v1/render/videos/{video_id}/share",
121
+ params: ["video_id"],
122
+ body: "json",
123
+ timeoutMs: 10000,
124
+ scope: "render:write",
125
+ };
94
126
  const getVideoTimelineOp = {
95
127
  id: "renderGetVideoTimeline",
96
128
  method: "GET",
@@ -125,6 +157,8 @@ const restyleVideoOp = {
125
157
  /** Descriptors of every render operation, keyed by method name (for tooling and custom clients). */
126
158
  exports.renderOps = {
127
159
  getArtifact: getArtifactOp,
160
+ listBackgrounds: listBackgroundsOp,
161
+ listBackgroundPacks: listBackgroundPacksOp,
128
162
  listPresets: listPresetsOp,
129
163
  listScreenshots: listScreenshotsOp,
130
164
  createScreenshot: createScreenshotOp,
@@ -137,6 +171,8 @@ exports.renderOps = {
137
171
  cancelVideo: cancelVideoOp,
138
172
  videoEvents: videoEventsOp,
139
173
  restyleVideo: restyleVideoOp,
174
+ unshareVideo: unshareVideoOp,
175
+ shareVideo: shareVideoOp,
140
176
  getVideoTimeline: getVideoTimelineOp,
141
177
  };
142
178
  /** Styled screenshots and product videos (`/v1/render`). */
@@ -153,12 +189,50 @@ class RenderAPI extends namespace_ts_1.Namespace {
153
189
  getArtifact(artifactId, options) {
154
190
  return this._client._call(getArtifactOp, { path: [artifactId] }, options);
155
191
  }
192
+ /**
193
+ * List library backgrounds
194
+ *
195
+ * Lists the background library: backgrounds a style names with `overrides.background_ref`, with their license,
196
+ * source and a 360x200 thumbnail served by B3OS. Three kinds:
197
+ *
198
+ * - `css`: drawn by the compositor from CSS gradient layers (no image file), recolorable through `tokens`.
199
+ * - `procedural`: the `studio` pack, our own soft meshes computed by the compositor (no image file, no
200
+ * tokens); the ones tagged `auto` are the set the `auto` background preset picks from.
201
+ * - `image`: a lossless WebP from ScreenFramed's curated library (decisions T9 and T10: Sean's grants as owner
202
+ * of the library), up to 3840 px on the long edge, with its measured tone in `image` (theme, luminance, hue,
203
+ * detail; how `"auto"` matches a page). `image.coverage` is `full-bleed` for backgrounds; the `gradients`
204
+ * group holds transparent shapes (`cutout`) drawn over a matte.
205
+ *
206
+ * Rows are in `ref` order, paged by `limit` and `cursor`. A ref whose bytes equal an earlier one's still
207
+ * resolves but is not listed. Public: no API key, rate limited per client address, and answered from the
208
+ * edge's cache for up to 5 minutes.
209
+ *
210
+ * `GET /v1/render/backgrounds` · scope `public` · served by the node
211
+ */
212
+ listBackgrounds(params, options) {
213
+ return this._client._list(listBackgroundsOp, { query: params }, options);
214
+ }
215
+ /**
216
+ * List library background packs
217
+ *
218
+ * Lists the packs of the background library with their license, notice, source, entry count and a cover
219
+ * thumbnail: the CSS packs first, then the image packs by look (`quiet`, `bold`, `soft-photo`, `texture`,
220
+ * `scenic`, `loud`, `cutout`) and size. `auto` says whether `background_ref: "auto"` may pick from the pack.
221
+ * Public and edge-cached like `GET /v1/render/backgrounds`.
222
+ *
223
+ * `GET /v1/render/backgrounds/packs` · scope `public` · served by the node
224
+ */
225
+ listBackgroundPacks(options) {
226
+ return this._client._call(listBackgroundPacksOp, {}, options);
227
+ }
156
228
  /**
157
229
  * List style presets
158
230
  *
159
- * Lists the style presets `style` can name (backgrounds, window frames, cursors, caption styles, click effects), with a preview image for each.
231
+ * Lists the style presets `style` can name (backgrounds, window frames, cursors, caption styles, click effects),
232
+ * with a preview image for each. Public: no API key, rate limited per client address, and answered from the
233
+ * edge's cache for up to 5 minutes.
160
234
  *
161
- * `GET /v1/render/presets` · scope `render:read` · served by the node
235
+ * `GET /v1/render/presets` · scope `public` · served by the node
162
236
  */
163
237
  listPresets(params, options) {
164
238
  return this._client._call(listPresetsOp, { query: params }, options);
@@ -214,7 +288,9 @@ class RenderAPI extends namespace_ts_1.Namespace {
214
288
  * Record a video
215
289
  *
216
290
  * Starts a job that records a scripted demo of `source.url`. Narration (`say`) is synthesized first with
217
- * `/v1/infer/audio/speech`; the director then places each beat's steps on its narration, plans cursor and
291
+ * `/v1/infer/audio/speech`, as the caller: it needs `infer:run` in the key's scopes too. Without it, or when
292
+ * speech is unavailable, the video is made silent with estimated word times and `result.narration.spoken` is
293
+ * false (without the scope, `result.warnings` has `narration_scope`, naming it); the director then places each beat's steps on its narration, plans cursor and
218
294
  * camera, records segments in parallel on a virtual clock, composes at the output frame rate and encodes MP4
219
295
  * (H.264, BT.709), GIF, poster and captions. Artifacts appear as they finish (`video.artifact` events, poster
220
296
  * first). Bills `render.video_s` per second of output.
@@ -227,7 +303,7 @@ class RenderAPI extends namespace_ts_1.Namespace {
227
303
  /**
228
304
  * Delete a video
229
305
  *
230
- * Cancels the job if it is still running, then deletes the video, its artifacts and its archived capture.
306
+ * Cancels the job if it is still running, then deletes the video, its artifacts, its share page and its archived capture.
231
307
  *
232
308
  * `DELETE /v1/render/videos/{video_id}` · scope `render:write` · served by the node
233
309
  */
@@ -247,7 +323,8 @@ class RenderAPI extends namespace_ts_1.Namespace {
247
323
  /**
248
324
  * Cancel a video
249
325
  *
250
- * Stops the job. Artifacts already produced are kept; seconds already encoded are billed.
326
+ * Stops the job and marks the video canceled. A canceled video bills nothing: `render.video_s` is billed only
327
+ * when a video succeeds. A video that already finished answers 409.
251
328
  *
252
329
  * `POST /v1/render/videos/{video_id}/cancel` · scope `render:run` · served by the node
253
330
  */
@@ -282,18 +359,58 @@ class RenderAPI extends namespace_ts_1.Namespace {
282
359
  restyleVideo(videoId, body, options) {
283
360
  return this._client._job(restyleVideoOp, { path: [videoId], body }, options);
284
361
  }
362
+ /**
363
+ * Stop sharing a video
364
+ *
365
+ * Deletes the video's share page; its link stops working within 60 seconds. The video stays, and so do the
366
+ * signed file links the page used (until the video expires); delete the video to end them. Works whether or not
367
+ * the `render.share_pages` flag is on.
368
+ *
369
+ * `DELETE /v1/render/videos/{video_id}/share` · scope `render:write` · served by the node
370
+ */
371
+ unshareVideo(videoId, options) {
372
+ return this._client._call(unshareVideoOp, { path: [videoId] }, options);
373
+ }
374
+ /**
375
+ * Share a video
376
+ *
377
+ * Makes a share page for a finished video: one HTML page on `usercontent.b3os.org` that plays the MP4 with its
378
+ * poster, captions and chapters, carries Open Graph tags for link previews, and works as an iframe embed on any
379
+ * site. No script runs on it (`Content-Security-Policy: sandbox`). The link is signed like every artifact URL and
380
+ * lasts as long as the video's MP4 (7 days by default). Sharing again returns the same page while it lasts
381
+ * (200); a new one answers 201.
382
+ *
383
+ * Off by default: creating a share page needs the `render.share_pages` feature flag on for your organization,
384
+ * and answers 404 `feature_not_enabled` without it. The page plays the video from the video's own signed file
385
+ * links, which stay valid until the video expires: stopping the share (or deleting the video) takes the page
386
+ * down within 60 seconds, but only deleting the video ends the file links a viewer or a link preview already
387
+ * has. There is no password option.
388
+ *
389
+ * `POST /v1/render/videos/{video_id}/share` · scope `render:write` · served by the node
390
+ */
391
+ shareVideo(videoId, body, options) {
392
+ return this._client._call(shareVideoOp, { path: [videoId], body }, options);
393
+ }
285
394
  /**
286
395
  * Get a video's timeline
287
396
  *
288
397
  * Returns the compiled timeline of a video that has finished planning: beats, narration with word timings,
289
398
  * the timed action list the recorder replayed, cursor path, camera keyframes, captions and style
290
- * (`timeline.schema.json`). `frames=1` adds the per-frame compositor state (large; for debugging).
399
+ * (`timeline.schema.json`). `frames=true` adds the per-frame compositor state (large; for debugging).
291
400
  *
292
401
  * `GET /v1/render/videos/{video_id}/timeline` · scope `render:read` · served by the node
293
402
  */
294
403
  getVideoTimeline(videoId, params, options) {
295
404
  return this._client._call(getVideoTimelineOp, { path: [videoId], query: params }, options);
296
405
  }
406
+ /**
407
+ * An artifact's bytes (from a screenshot or video, or its URL). A client that reaches the node (its Unix socket,
408
+ * or a node URL inside a sandbox) reads them from the node's signed content route, so they never leave the
409
+ * machine; any other client fetches the usercontent URL as given.
410
+ */
411
+ fetchArtifact(artifact, options) {
412
+ return (0, render_ts_1.fetchArtifact)(this._client, artifact, options);
413
+ }
297
414
  }
298
415
  exports.RenderAPI = RenderAPI;
299
416
  //# sourceMappingURL=render.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"render.js","sourceRoot":"","sources":["../../../../src/generated/ns/render.ts"],"names":[],"mappings":";AAAA,4GAA4G;;;AAG5G,gDAAwD;AACxD,0DAAoD;AAMpD,MAAM,aAAa,GAAO;IACxB,EAAE,EAAE,mBAAmB;IACvB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,oCAAoC;IAC1C,MAAM,EAAE,CAAC,aAAa,CAAC;IACvB,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,aAAa;CACrB,CAAC;AACF,MAAM,aAAa,GAAO;IACxB,EAAE,EAAE,mBAAmB;IACvB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,oBAAoB;IAC1B,SAAS,EAAE,KAAK;IAChB,K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L,CAAC;IAED;;;;;;;;;OASG;IACH,YAAY,CACV,OAAe,EACf,IAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAwB,cAAc,EAAE,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IACtG,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,CAAC,OAAe,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAY,cAAc,EAAE,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,UAAU,CAAC,OAAe,EAAE,IAA0B,EAAE,OAAwB;QAC9E,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAe,YAAY,EAAE,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5F,CAAC;IAED;;;;;;;;OAQG;IACH,gBAAgB,CACd,OAAe,EACf,MAAuC,EACvC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAmB,kBAAkB,EAAE,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/G,CAAC;IAED;;;;OAIG;IACH,aAAa,CACX,QAA2D,EAC3D,OAAwB;QAExB,OAAO,IAAA,yBAAa,EAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;CACF;AApTD,8BAoTC"}
@@ -14,7 +14,9 @@ export declare class RequestsAPI extends Namespace {
14
14
  * List requests
15
15
  *
16
16
  * Lists the requests the node served for your project in the last 7 days, newest first, over every connection
17
- * kind, filterable by product, operation, status, key, connection kind and sandbox. Requests the edge answered
17
+ * kind, filterable by product, operation, status, key, source, connection kind, sandbox and trace. Every source
18
+ * is listed unless `source` narrows it (the dashboard's Requests page leaves `dashboard` out until you show it).
19
+ * Requests the edge answered
18
20
  * without forwarding them (edge-served operations, or requests refused before forwarding) are not listed; get
19
21
  * those by ID. The edge forwards this operation and merges its `edge_*` phases into each record.
20
22
  *
@@ -26,7 +26,9 @@ class RequestsAPI extends namespace_ts_1.Namespace {
26
26
  * List requests
27
27
  *
28
28
  * Lists the requests the node served for your project in the last 7 days, newest first, over every connection
29
- * kind, filterable by product, operation, status, key, connection kind and sandbox. Requests the edge answered
29
+ * kind, filterable by product, operation, status, key, source, connection kind, sandbox and trace. Every source
30
+ * is listed unless `source` narrows it (the dashboard's Requests page leaves `dashboard` out until you show it).
31
+ * Requests the edge answered
30
32
  * without forwarding them (edge-served operations, or requests refused before forwarding) are not listed; get
31
33
  * those by ID. The edge forwards this operation and merges its `edge_*` phases into each record.
32
34
  *
@@ -1 +1 @@
1
- {"version":3,"file":"requests.js","sourceRoot":"","sources":["../../../../src/generated/ns/requests.ts"],"names":[],"mappings":";AAAA,4GAA4G;;;AAG5G,0DAAoD;AAKpD,MAAM,cAAc,GAAO;IACzB,EAAE,EAAE,sBAAsB;IAC1B,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,cAAc;IACpB,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,eAAe;CACvB,CAAC;AACF,MAAM,YAAY,GAAO;IACvB,EAAE,EAAE,oBAAoB;IACxB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,2BAA2B;IACjC,MAAM,EAAE,CAAC,YAAY,CAAC;IACtB,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,eAAe;CACvB,CAAC;AAEF,sGAAsG;AACzF,QAAA,WAAW,GAAG,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,YAAY,EAAW,CAAC;AAE/F,sEAAsE;AACtE,MAAa,WAAY,SAAQ,wBAAS;IACxC;;;;;;;;;OASG;IACH,YAAY,CACV,M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