@reactor-models/fast-h3 1.0.2 → 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/README.md +20 -18
- package/dist/{chunk-4DZUZYZH.mjs → chunk-K4CGGYQP.mjs} +2 -2
- package/dist/{chunk-4DZUZYZH.mjs.map → chunk-K4CGGYQP.mjs.map} +1 -1
- package/dist/{chunk-NMQA7NIH.mjs → chunk-O4Q6CVNF.mjs} +7 -7
- package/dist/chunk-O4Q6CVNF.mjs.map +1 -0
- package/dist/core.d.mts +44 -12
- package/dist/core.d.ts +44 -12
- package/dist/core.js +6 -6
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +2 -2
- package/package.json +2 -2
- package/dist/chunk-NMQA7NIH.mjs.map +0 -1
package/dist/core.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import { FileRef, Reactor } from '@reactor-team/js-sdk';
|
|
|
2
2
|
export { FileRef } from '@reactor-team/js-sdk';
|
|
3
3
|
|
|
4
4
|
declare const MODEL_NAME: "reactor/fast-h3";
|
|
5
|
-
declare const MODEL_VERSION: "v1.0
|
|
5
|
+
declare const MODEL_VERSION: "v1.3.0";
|
|
6
6
|
/**
|
|
7
7
|
* Preset media tracks for the FastH3 model.
|
|
8
8
|
*
|
|
@@ -21,7 +21,7 @@ declare const FastH3Tracks: readonly [{
|
|
|
21
21
|
}];
|
|
22
22
|
/** Track names the client can subscribe to (recvonly, from the client's perspective). */
|
|
23
23
|
type FastH3RecvTrackName = "main_video" | "main_audio";
|
|
24
|
-
/** Remove one clip by its UUID from whichever queue holds it, freeing its slot. Works on generating and built clips alike; a build already running for it is discarded when it completes. The clip that is playing is in neither queue — `stop` is the command that cuts it. A built clip stays in `queue_update.history` after popping, so clips
|
|
24
|
+
/** Remove one clip by its UUID from whichever queue holds it, freeing its slot. Works on generating and built clips alike; a build already running for it is discarded when it completes. The clip that is playing is in neither queue — `stop` is the command that cuts it. A built clip stays in `queue_update.history` after popping, so clips referencing its frame are unaffected; an unbuilt clip that queued clips reference is refused, since popping it would leave them without an endpoint — pop those first. Emits `clip_popped`, `queue_update` and `state_update`, or `command_error` when no queued clip has that id or queued clips still reference its last frame. */
|
|
25
25
|
interface FastH3PopParams {
|
|
26
26
|
/**
|
|
27
27
|
* UUID of the queued clip to remove, from `clip_queued` or `queue_update`.
|
|
@@ -51,7 +51,7 @@ interface FastH3PlayParams {
|
|
|
51
51
|
*/
|
|
52
52
|
clip_id?: string;
|
|
53
53
|
}
|
|
54
|
-
/** Queue one clip generation. The clip enters the generation queue (at `position`, or the back), builds when its turn comes, and then joins the back of the playout queue, announced by `clip_generated`. The prompt is what the clip will show; the metadata is an opaque string echoed back on every message that references the clip, for frontends to carry their own tracking data. The clip opens from text alone, from an uploaded still (`starting_frame` — the image animates forward), or from an existing clip's last frame (`continue_from_clip_id` — any clip in the queues or in `queue_update.history`); a continued clip simply waits its turn until its source is built, wherever the two sit in the queue. The clip's canvas is the session's; its length is the `seconds` passed here (snapped to what the model can produce) or the session default, and its seed is the one passed here or the session's advancing default. Builds run through the queue in order; watch `queue_update` for the clip turning ready. Replies `clip_queued` with the clip's UUID and emits `queue_update` and `state_update`, or `command_error` when the queue is full, the prompt is empty, both a starting frame and a source clip are given,
|
|
54
|
+
/** Queue one clip generation. The clip enters the generation queue (at `position`, or the back), builds when its turn comes, and then joins the back of the playout queue, announced by `clip_generated`. The prompt is what the clip will show; the metadata is an opaque string echoed back on every message that references the clip, for frontends to carry their own tracking data. The clip opens from text alone, from an uploaded still (`starting_frame` — the image animates forward), or from an existing clip's last frame (`continue_from_clip_id` — any clip in the queues or in `queue_update.history`); a continued clip simply waits its turn until its source is built, wherever the two sit in the queue. An uploaded `ending_frame` or a generated clip's clean last frame (`ending_from_clip_id`) can accompany any opener — or stand alone — to make the clip animate *into* and close on that image. Set both clip-id fields to the same UUID to leave and return to one generated frame. The clip's canvas is the session's; its length is the `seconds` passed here (snapped to what the model can produce) or the session default, and its seed is the one passed here or the session's advancing default. Builds run through the queue in order; watch `queue_update` for the clip turning ready. Replies `clip_queued` with the clip's UUID and emits `queue_update` and `state_update`, or `command_error` when the queue is full, the prompt is empty, both a starting frame and a source clip are given, both ending conditions are given, a source clip is unknown or no longer retained, or an upload is not a decodable image. */
|
|
55
55
|
interface FastH3EnqueueParams {
|
|
56
56
|
/**
|
|
57
57
|
* Seed for this clip. Omitted or null, the session's default is used and advances by one; passing a seed leaves the default untouched, so explicit and automatic seeding do not interfere.
|
|
@@ -60,8 +60,8 @@ interface FastH3EnqueueParams {
|
|
|
60
60
|
*/
|
|
61
61
|
seed?: number | null;
|
|
62
62
|
/**
|
|
63
|
-
* What the clip should show, up to
|
|
64
|
-
* @maxLength
|
|
63
|
+
* What the clip should show, up to 4000 characters. Fixed once enqueued; a different scene is a new `enqueue`.
|
|
64
|
+
* @maxLength 4000
|
|
65
65
|
* @default ""
|
|
66
66
|
*/
|
|
67
67
|
prompt?: string;
|
|
@@ -84,11 +84,21 @@ interface FastH3EnqueueParams {
|
|
|
84
84
|
* @default null
|
|
85
85
|
*/
|
|
86
86
|
position?: number | null;
|
|
87
|
+
/**
|
|
88
|
+
* A still image the clip animates into and closes on — its last frame. Common formats decode; the frame is fitted to the session canvas. Combine it with a `starting_frame` (or a `continue_from_clip_id` opener) for first-and-last generation, or send it alone to fix only the ending. Omit for a clip with no fixed end or one ending on a retained generated frame. At most one of this and `ending_from_clip_id`; independent of how the clip opens, so it pairs with either opener.
|
|
89
|
+
* @default null
|
|
90
|
+
*/
|
|
91
|
+
ending_frame?: FileRef | null;
|
|
87
92
|
/**
|
|
88
93
|
* A still image the clip opens from and animates forward — image-to-video. Common formats decode; the frame is fitted to the session canvas. To continue from a video, extract the frame you want and send it here. Omit for a clip opening from text or from another clip; at most one of this and `continue_from_clip_id`.
|
|
89
94
|
* @default null
|
|
90
95
|
*/
|
|
91
96
|
starting_frame?: FileRef | null;
|
|
97
|
+
/**
|
|
98
|
+
* UUID of the clip whose clean retained last frame this clip animates into and closes on. Any clip in either queue or in `queue_update.history` qualifies, including one that has not built yet: this clip then waits for it. Blank for no generated ending target; at most one of this and `ending_frame`. This is independent of the opener, so it may equal `continue_from_clip_id` to create a hold that starts and ends on the same generated frame.
|
|
99
|
+
* @default ""
|
|
100
|
+
*/
|
|
101
|
+
ending_from_clip_id?: string;
|
|
92
102
|
/**
|
|
93
103
|
* UUID of the clip whose last frame this one opens from and animates forward — how clips chain into a continuing scene. Any clip in either queue or in `queue_update.history` qualifies, including one that has not built yet: this clip then waits for it. Blank for a clip opening from text or from an uploaded frame; at most one of this and `starting_frame`.
|
|
94
104
|
* @default ""
|
|
@@ -150,7 +160,9 @@ interface FastH3ClipMovedMessage {
|
|
|
150
160
|
"clip_id": string;
|
|
151
161
|
"seconds": number;
|
|
152
162
|
"metadata": string;
|
|
163
|
+
"has_ending_frame"?: boolean;
|
|
153
164
|
"has_starting_frame": boolean;
|
|
165
|
+
"ending_from_clip_id"?: string | null;
|
|
154
166
|
"continue_from_clip_id": string | null;
|
|
155
167
|
};
|
|
156
168
|
/** Which queue it moved within: `generation` or `playout`. */
|
|
@@ -174,7 +186,9 @@ interface FastH3ClipFailedMessage {
|
|
|
174
186
|
"clip_id": string;
|
|
175
187
|
"seconds": number;
|
|
176
188
|
"metadata": string;
|
|
189
|
+
"has_ending_frame"?: boolean;
|
|
177
190
|
"has_starting_frame": boolean;
|
|
191
|
+
"ending_from_clip_id"?: string | null;
|
|
178
192
|
"continue_from_clip_id": string | null;
|
|
179
193
|
};
|
|
180
194
|
/** What went wrong. */
|
|
@@ -196,7 +210,9 @@ interface FastH3ClipPoppedMessage {
|
|
|
196
210
|
"clip_id": string;
|
|
197
211
|
"seconds": number;
|
|
198
212
|
"metadata": string;
|
|
213
|
+
"has_ending_frame"?: boolean;
|
|
199
214
|
"has_starting_frame": boolean;
|
|
215
|
+
"ending_from_clip_id"?: string | null;
|
|
200
216
|
"continue_from_clip_id": string | null;
|
|
201
217
|
};
|
|
202
218
|
}
|
|
@@ -212,7 +228,9 @@ interface FastH3ClipQueuedMessage {
|
|
|
212
228
|
"clip_id": string;
|
|
213
229
|
"seconds": number;
|
|
214
230
|
"metadata": string;
|
|
231
|
+
"has_ending_frame"?: boolean;
|
|
215
232
|
"has_starting_frame": boolean;
|
|
233
|
+
"ending_from_clip_id"?: string | null;
|
|
216
234
|
"continue_from_clip_id": string | null;
|
|
217
235
|
};
|
|
218
236
|
}
|
|
@@ -228,7 +246,9 @@ interface FastH3ClipStartedMessage {
|
|
|
228
246
|
"clip_id": string;
|
|
229
247
|
"seconds": number;
|
|
230
248
|
"metadata": string;
|
|
249
|
+
"has_ending_frame"?: boolean;
|
|
231
250
|
"has_starting_frame": boolean;
|
|
251
|
+
"ending_from_clip_id"?: string | null;
|
|
232
252
|
"continue_from_clip_id": string | null;
|
|
233
253
|
};
|
|
234
254
|
}
|
|
@@ -248,7 +268,9 @@ interface FastH3ClipStoppedMessage {
|
|
|
248
268
|
"clip_id": string;
|
|
249
269
|
"seconds": number;
|
|
250
270
|
"metadata": string;
|
|
271
|
+
"has_ending_frame"?: boolean;
|
|
251
272
|
"has_starting_frame": boolean;
|
|
273
|
+
"ending_from_clip_id"?: string | null;
|
|
252
274
|
"continue_from_clip_id": string | null;
|
|
253
275
|
};
|
|
254
276
|
/** Seconds of video and audio sent since the session began. */
|
|
@@ -261,7 +283,7 @@ interface FastH3ClipStoppedMessage {
|
|
|
261
283
|
*/
|
|
262
284
|
interface FastH3QueueUpdateMessage {
|
|
263
285
|
type: "queue_update";
|
|
264
|
-
/** Built clips no longer queued — played, stopped, or popped — whose last frame is still retained, oldest first. No longer playable (`play` refuses them), but any can be named in `enqueue`'s `continue_from_clip_id`; the oldest are evicted as new builds finish, so the front of this list is what expires next. */
|
|
286
|
+
/** Built clips no longer queued — played, stopped, or popped — whose last frame is still retained, oldest first. No longer playable (`play` refuses them), but any can be named in `enqueue`'s `continue_from_clip_id` or `ending_from_clip_id`; the oldest are evicted as new builds finish, so the front of this list is what expires next. */
|
|
265
287
|
history: {
|
|
266
288
|
"seed": number;
|
|
267
289
|
"ready": boolean;
|
|
@@ -270,7 +292,9 @@ interface FastH3QueueUpdateMessage {
|
|
|
270
292
|
"clip_id": string;
|
|
271
293
|
"seconds": number;
|
|
272
294
|
"metadata": string;
|
|
295
|
+
"has_ending_frame"?: boolean;
|
|
273
296
|
"has_starting_frame": boolean;
|
|
297
|
+
"ending_from_clip_id"?: string | null;
|
|
274
298
|
"continue_from_clip_id": string | null;
|
|
275
299
|
}[];
|
|
276
300
|
/** Built clips waiting to play, front first. A finished build joins at the back; bare `play` (and autoplay) takes the front; `move` reorders; playing or `pop` consumes. */
|
|
@@ -282,10 +306,12 @@ interface FastH3QueueUpdateMessage {
|
|
|
282
306
|
"clip_id": string;
|
|
283
307
|
"seconds": number;
|
|
284
308
|
"metadata": string;
|
|
309
|
+
"has_ending_frame"?: boolean;
|
|
285
310
|
"has_starting_frame": boolean;
|
|
311
|
+
"ending_from_clip_id"?: string | null;
|
|
286
312
|
"continue_from_clip_id": string | null;
|
|
287
313
|
}[];
|
|
288
|
-
/** Clips waiting to build, front first. Builds consume this queue from the front, one at a time, pausing only while `playout` is at capacity; a clip whose
|
|
314
|
+
/** Clips waiting to build, front first. Builds consume this queue from the front, one at a time, pausing only while `playout` is at capacity; a clip whose referenced starting or ending source is not built yet is skipped until it is, without blocking the rest. `enqueue`'s `position` and `move` control the order. */
|
|
289
315
|
generation: {
|
|
290
316
|
"seed": number;
|
|
291
317
|
"ready": boolean;
|
|
@@ -294,7 +320,9 @@ interface FastH3QueueUpdateMessage {
|
|
|
294
320
|
"clip_id": string;
|
|
295
321
|
"seconds": number;
|
|
296
322
|
"metadata": string;
|
|
323
|
+
"has_ending_frame"?: boolean;
|
|
297
324
|
"has_starting_frame": boolean;
|
|
325
|
+
"ending_from_clip_id"?: string | null;
|
|
298
326
|
"continue_from_clip_id": string | null;
|
|
299
327
|
}[];
|
|
300
328
|
}
|
|
@@ -358,7 +386,9 @@ interface FastH3ClipFinishedMessage {
|
|
|
358
386
|
"clip_id": string;
|
|
359
387
|
"seconds": number;
|
|
360
388
|
"metadata": string;
|
|
389
|
+
"has_ending_frame"?: boolean;
|
|
361
390
|
"has_starting_frame": boolean;
|
|
391
|
+
"ending_from_clip_id"?: string | null;
|
|
362
392
|
"continue_from_clip_id": string | null;
|
|
363
393
|
};
|
|
364
394
|
/** Seconds of video and audio sent since the session began, this clip included. */
|
|
@@ -406,7 +436,9 @@ interface FastH3ClipGeneratedMessage {
|
|
|
406
436
|
"clip_id": string;
|
|
407
437
|
"seconds": number;
|
|
408
438
|
"metadata": string;
|
|
439
|
+
"has_ending_frame"?: boolean;
|
|
409
440
|
"has_starting_frame": boolean;
|
|
441
|
+
"ending_from_clip_id"?: string | null;
|
|
410
442
|
"continue_from_clip_id": string | null;
|
|
411
443
|
};
|
|
412
444
|
}
|
|
@@ -468,8 +500,8 @@ declare class FastH3Model extends Reactor {
|
|
|
468
500
|
/** @deprecated The model client now extends `Reactor` directly — call methods on `this` instead. This accessor returns `this` for backwards compatibility and will be removed in a future major release. */
|
|
469
501
|
get reactor(): this;
|
|
470
502
|
/**
|
|
471
|
-
* Remove one clip by its UUID from whichever queue holds it, freeing its slot. Works on generating and built clips alike; a build already running for it is discarded when it completes. The clip that is playing is in neither queue — `stop` is the command that cuts it. A built clip stays in `queue_update.history` after popping, so clips
|
|
472
|
-
* @param params - Remove one clip by its UUID from whichever queue holds it, freeing its slot. Works on generating and built clips alike; a build already running for it is discarded when it completes. The clip that is playing is in neither queue — `stop` is the command that cuts it. A built clip stays in `queue_update.history` after popping, so clips
|
|
503
|
+
* Remove one clip by its UUID from whichever queue holds it, freeing its slot. Works on generating and built clips alike; a build already running for it is discarded when it completes. The clip that is playing is in neither queue — `stop` is the command that cuts it. A built clip stays in `queue_update.history` after popping, so clips referencing its frame are unaffected; an unbuilt clip that queued clips reference is refused, since popping it would leave them without an endpoint — pop those first. Emits `clip_popped`, `queue_update` and `state_update`, or `command_error` when no queued clip has that id or queued clips still reference its last frame.
|
|
504
|
+
* @param params - Remove one clip by its UUID from whichever queue holds it, freeing its slot. Works on generating and built clips alike; a build already running for it is discarded when it completes. The clip that is playing is in neither queue — `stop` is the command that cuts it. A built clip stays in `queue_update.history` after popping, so clips referencing its frame are unaffected; an unbuilt clip that queued clips reference is refused, since popping it would leave them without an endpoint — pop those first. Emits `clip_popped`, `queue_update` and `state_update`, or `command_error` when no queued clip has that id or queued clips still reference its last frame.
|
|
473
505
|
* @returns The correlated {@link FastH3ClipPoppedMessage} reply, or `undefined` when the send fails (the SDK never rejects — see `getLastError()`).
|
|
474
506
|
*/
|
|
475
507
|
pop(params: FastH3PopParams): Promise<FastH3ClipPoppedMessage | undefined>;
|
|
@@ -496,8 +528,8 @@ declare class FastH3Model extends Reactor {
|
|
|
496
528
|
*/
|
|
497
529
|
reset(): Promise<FastH3SessionResetMessage | undefined>;
|
|
498
530
|
/**
|
|
499
|
-
* Queue one clip generation. The clip enters the generation queue (at `position`, or the back), builds when its turn comes, and then joins the back of the playout queue, announced by `clip_generated`. The prompt is what the clip will show; the metadata is an opaque string echoed back on every message that references the clip, for frontends to carry their own tracking data. The clip opens from text alone, from an uploaded still (`starting_frame` — the image animates forward), or from an existing clip's last frame (`continue_from_clip_id` — any clip in the queues or in `queue_update.history`); a continued clip simply waits its turn until its source is built, wherever the two sit in the queue. The clip's canvas is the session's; its length is the `seconds` passed here (snapped to what the model can produce) or the session default, and its seed is the one passed here or the session's advancing default. Builds run through the queue in order; watch `queue_update` for the clip turning ready. Replies `clip_queued` with the clip's UUID and emits `queue_update` and `state_update`, or `command_error` when the queue is full, the prompt is empty, both a starting frame and a source clip are given,
|
|
500
|
-
* @param params - Queue one clip generation. The clip enters the generation queue (at `position`, or the back), builds when its turn comes, and then joins the back of the playout queue, announced by `clip_generated`. The prompt is what the clip will show; the metadata is an opaque string echoed back on every message that references the clip, for frontends to carry their own tracking data. The clip opens from text alone, from an uploaded still (`starting_frame` — the image animates forward), or from an existing clip's last frame (`continue_from_clip_id` — any clip in the queues or in `queue_update.history`); a continued clip simply waits its turn until its source is built, wherever the two sit in the queue. The clip's canvas is the session's; its length is the `seconds` passed here (snapped to what the model can produce) or the session default, and its seed is the one passed here or the session's advancing default. Builds run through the queue in order; watch `queue_update` for the clip turning ready. Replies `clip_queued` with the clip's UUID and emits `queue_update` and `state_update`, or `command_error` when the queue is full, the prompt is empty, both a starting frame and a source clip are given,
|
|
531
|
+
* Queue one clip generation. The clip enters the generation queue (at `position`, or the back), builds when its turn comes, and then joins the back of the playout queue, announced by `clip_generated`. The prompt is what the clip will show; the metadata is an opaque string echoed back on every message that references the clip, for frontends to carry their own tracking data. The clip opens from text alone, from an uploaded still (`starting_frame` — the image animates forward), or from an existing clip's last frame (`continue_from_clip_id` — any clip in the queues or in `queue_update.history`); a continued clip simply waits its turn until its source is built, wherever the two sit in the queue. An uploaded `ending_frame` or a generated clip's clean last frame (`ending_from_clip_id`) can accompany any opener — or stand alone — to make the clip animate *into* and close on that image. Set both clip-id fields to the same UUID to leave and return to one generated frame. The clip's canvas is the session's; its length is the `seconds` passed here (snapped to what the model can produce) or the session default, and its seed is the one passed here or the session's advancing default. Builds run through the queue in order; watch `queue_update` for the clip turning ready. Replies `clip_queued` with the clip's UUID and emits `queue_update` and `state_update`, or `command_error` when the queue is full, the prompt is empty, both a starting frame and a source clip are given, both ending conditions are given, a source clip is unknown or no longer retained, or an upload is not a decodable image.
|
|
532
|
+
* @param params - Queue one clip generation. The clip enters the generation queue (at `position`, or the back), builds when its turn comes, and then joins the back of the playout queue, announced by `clip_generated`. The prompt is what the clip will show; the metadata is an opaque string echoed back on every message that references the clip, for frontends to carry their own tracking data. The clip opens from text alone, from an uploaded still (`starting_frame` — the image animates forward), or from an existing clip's last frame (`continue_from_clip_id` — any clip in the queues or in `queue_update.history`); a continued clip simply waits its turn until its source is built, wherever the two sit in the queue. An uploaded `ending_frame` or a generated clip's clean last frame (`ending_from_clip_id`) can accompany any opener — or stand alone — to make the clip animate *into* and close on that image. Set both clip-id fields to the same UUID to leave and return to one generated frame. The clip's canvas is the session's; its length is the `seconds` passed here (snapped to what the model can produce) or the session default, and its seed is the one passed here or the session's advancing default. Builds run through the queue in order; watch `queue_update` for the clip turning ready. Replies `clip_queued` with the clip's UUID and emits `queue_update` and `state_update`, or `command_error` when the queue is full, the prompt is empty, both a starting frame and a source clip are given, both ending conditions are given, a source clip is unknown or no longer retained, or an upload is not a decodable image.
|
|
501
533
|
* @returns The correlated {@link FastH3ClipQueuedMessage} reply, or `undefined` when the send fails (the SDK never rejects — see `getLastError()`).
|
|
502
534
|
*/
|
|
503
535
|
enqueue(params: FastH3EnqueueParams): Promise<FastH3ClipQueuedMessage | undefined>;
|
|
@@ -508,7 +540,7 @@ declare class FastH3Model extends Reactor {
|
|
|
508
540
|
*/
|
|
509
541
|
setSeed(params: FastH3SetSeedParams): Promise<FastH3SeedAcceptedMessage | undefined>;
|
|
510
542
|
/**
|
|
511
|
-
* Return both queues' contents — `generation` (waiting to build) and `playout` (built, playable) — plus `history`, the built clips no longer queued that `continue_from_clip_id` can still name, every clip as its full structure. The same payload the model broadcasts as `queue_update`. Valid at any time.
|
|
543
|
+
* Return both queues' contents — `generation` (waiting to build) and `playout` (built, playable) — plus `history`, the built clips no longer queued that `continue_from_clip_id` or `ending_from_clip_id` can still name, every clip as its full structure. The same payload the model broadcasts as `queue_update`. Valid at any time.
|
|
512
544
|
* @returns The correlated {@link FastH3QueueUpdateMessage} reply, or `undefined` when the send fails (the SDK never rejects — see `getLastError()`).
|
|
513
545
|
*/
|
|
514
546
|
getQueue(): Promise<FastH3QueueUpdateMessage | undefined>;
|
package/dist/core.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { FileRef, Reactor } from '@reactor-team/js-sdk';
|
|
|
2
2
|
export { FileRef } from '@reactor-team/js-sdk';
|
|
3
3
|
|
|
4
4
|
declare const MODEL_NAME: "reactor/fast-h3";
|
|
5
|
-
declare const MODEL_VERSION: "v1.0
|
|
5
|
+
declare const MODEL_VERSION: "v1.3.0";
|
|
6
6
|
/**
|
|
7
7
|
* Preset media tracks for the FastH3 model.
|
|
8
8
|
*
|
|
@@ -21,7 +21,7 @@ declare const FastH3Tracks: readonly [{
|
|
|
21
21
|
}];
|
|
22
22
|
/** Track names the client can subscribe to (recvonly, from the client's perspective). */
|
|
23
23
|
type FastH3RecvTrackName = "main_video" | "main_audio";
|
|
24
|
-
/** Remove one clip by its UUID from whichever queue holds it, freeing its slot. Works on generating and built clips alike; a build already running for it is discarded when it completes. The clip that is playing is in neither queue — `stop` is the command that cuts it. A built clip stays in `queue_update.history` after popping, so clips
|
|
24
|
+
/** Remove one clip by its UUID from whichever queue holds it, freeing its slot. Works on generating and built clips alike; a build already running for it is discarded when it completes. The clip that is playing is in neither queue — `stop` is the command that cuts it. A built clip stays in `queue_update.history` after popping, so clips referencing its frame are unaffected; an unbuilt clip that queued clips reference is refused, since popping it would leave them without an endpoint — pop those first. Emits `clip_popped`, `queue_update` and `state_update`, or `command_error` when no queued clip has that id or queued clips still reference its last frame. */
|
|
25
25
|
interface FastH3PopParams {
|
|
26
26
|
/**
|
|
27
27
|
* UUID of the queued clip to remove, from `clip_queued` or `queue_update`.
|
|
@@ -51,7 +51,7 @@ interface FastH3PlayParams {
|
|
|
51
51
|
*/
|
|
52
52
|
clip_id?: string;
|
|
53
53
|
}
|
|
54
|
-
/** Queue one clip generation. The clip enters the generation queue (at `position`, or the back), builds when its turn comes, and then joins the back of the playout queue, announced by `clip_generated`. The prompt is what the clip will show; the metadata is an opaque string echoed back on every message that references the clip, for frontends to carry their own tracking data. The clip opens from text alone, from an uploaded still (`starting_frame` — the image animates forward), or from an existing clip's last frame (`continue_from_clip_id` — any clip in the queues or in `queue_update.history`); a continued clip simply waits its turn until its source is built, wherever the two sit in the queue. The clip's canvas is the session's; its length is the `seconds` passed here (snapped to what the model can produce) or the session default, and its seed is the one passed here or the session's advancing default. Builds run through the queue in order; watch `queue_update` for the clip turning ready. Replies `clip_queued` with the clip's UUID and emits `queue_update` and `state_update`, or `command_error` when the queue is full, the prompt is empty, both a starting frame and a source clip are given,
|
|
54
|
+
/** Queue one clip generation. The clip enters the generation queue (at `position`, or the back), builds when its turn comes, and then joins the back of the playout queue, announced by `clip_generated`. The prompt is what the clip will show; the metadata is an opaque string echoed back on every message that references the clip, for frontends to carry their own tracking data. The clip opens from text alone, from an uploaded still (`starting_frame` — the image animates forward), or from an existing clip's last frame (`continue_from_clip_id` — any clip in the queues or in `queue_update.history`); a continued clip simply waits its turn until its source is built, wherever the two sit in the queue. An uploaded `ending_frame` or a generated clip's clean last frame (`ending_from_clip_id`) can accompany any opener — or stand alone — to make the clip animate *into* and close on that image. Set both clip-id fields to the same UUID to leave and return to one generated frame. The clip's canvas is the session's; its length is the `seconds` passed here (snapped to what the model can produce) or the session default, and its seed is the one passed here or the session's advancing default. Builds run through the queue in order; watch `queue_update` for the clip turning ready. Replies `clip_queued` with the clip's UUID and emits `queue_update` and `state_update`, or `command_error` when the queue is full, the prompt is empty, both a starting frame and a source clip are given, both ending conditions are given, a source clip is unknown or no longer retained, or an upload is not a decodable image. */
|
|
55
55
|
interface FastH3EnqueueParams {
|
|
56
56
|
/**
|
|
57
57
|
* Seed for this clip. Omitted or null, the session's default is used and advances by one; passing a seed leaves the default untouched, so explicit and automatic seeding do not interfere.
|
|
@@ -60,8 +60,8 @@ interface FastH3EnqueueParams {
|
|
|
60
60
|
*/
|
|
61
61
|
seed?: number | null;
|
|
62
62
|
/**
|
|
63
|
-
* What the clip should show, up to
|
|
64
|
-
* @maxLength
|
|
63
|
+
* What the clip should show, up to 4000 characters. Fixed once enqueued; a different scene is a new `enqueue`.
|
|
64
|
+
* @maxLength 4000
|
|
65
65
|
* @default ""
|
|
66
66
|
*/
|
|
67
67
|
prompt?: string;
|
|
@@ -84,11 +84,21 @@ interface FastH3EnqueueParams {
|
|
|
84
84
|
* @default null
|
|
85
85
|
*/
|
|
86
86
|
position?: number | null;
|
|
87
|
+
/**
|
|
88
|
+
* A still image the clip animates into and closes on — its last frame. Common formats decode; the frame is fitted to the session canvas. Combine it with a `starting_frame` (or a `continue_from_clip_id` opener) for first-and-last generation, or send it alone to fix only the ending. Omit for a clip with no fixed end or one ending on a retained generated frame. At most one of this and `ending_from_clip_id`; independent of how the clip opens, so it pairs with either opener.
|
|
89
|
+
* @default null
|
|
90
|
+
*/
|
|
91
|
+
ending_frame?: FileRef | null;
|
|
87
92
|
/**
|
|
88
93
|
* A still image the clip opens from and animates forward — image-to-video. Common formats decode; the frame is fitted to the session canvas. To continue from a video, extract the frame you want and send it here. Omit for a clip opening from text or from another clip; at most one of this and `continue_from_clip_id`.
|
|
89
94
|
* @default null
|
|
90
95
|
*/
|
|
91
96
|
starting_frame?: FileRef | null;
|
|
97
|
+
/**
|
|
98
|
+
* UUID of the clip whose clean retained last frame this clip animates into and closes on. Any clip in either queue or in `queue_update.history` qualifies, including one that has not built yet: this clip then waits for it. Blank for no generated ending target; at most one of this and `ending_frame`. This is independent of the opener, so it may equal `continue_from_clip_id` to create a hold that starts and ends on the same generated frame.
|
|
99
|
+
* @default ""
|
|
100
|
+
*/
|
|
101
|
+
ending_from_clip_id?: string;
|
|
92
102
|
/**
|
|
93
103
|
* UUID of the clip whose last frame this one opens from and animates forward — how clips chain into a continuing scene. Any clip in either queue or in `queue_update.history` qualifies, including one that has not built yet: this clip then waits for it. Blank for a clip opening from text or from an uploaded frame; at most one of this and `starting_frame`.
|
|
94
104
|
* @default ""
|
|
@@ -150,7 +160,9 @@ interface FastH3ClipMovedMessage {
|
|
|
150
160
|
"clip_id": string;
|
|
151
161
|
"seconds": number;
|
|
152
162
|
"metadata": string;
|
|
163
|
+
"has_ending_frame"?: boolean;
|
|
153
164
|
"has_starting_frame": boolean;
|
|
165
|
+
"ending_from_clip_id"?: string | null;
|
|
154
166
|
"continue_from_clip_id": string | null;
|
|
155
167
|
};
|
|
156
168
|
/** Which queue it moved within: `generation` or `playout`. */
|
|
@@ -174,7 +186,9 @@ interface FastH3ClipFailedMessage {
|
|
|
174
186
|
"clip_id": string;
|
|
175
187
|
"seconds": number;
|
|
176
188
|
"metadata": string;
|
|
189
|
+
"has_ending_frame"?: boolean;
|
|
177
190
|
"has_starting_frame": boolean;
|
|
191
|
+
"ending_from_clip_id"?: string | null;
|
|
178
192
|
"continue_from_clip_id": string | null;
|
|
179
193
|
};
|
|
180
194
|
/** What went wrong. */
|
|
@@ -196,7 +210,9 @@ interface FastH3ClipPoppedMessage {
|
|
|
196
210
|
"clip_id": string;
|
|
197
211
|
"seconds": number;
|
|
198
212
|
"metadata": string;
|
|
213
|
+
"has_ending_frame"?: boolean;
|
|
199
214
|
"has_starting_frame": boolean;
|
|
215
|
+
"ending_from_clip_id"?: string | null;
|
|
200
216
|
"continue_from_clip_id": string | null;
|
|
201
217
|
};
|
|
202
218
|
}
|
|
@@ -212,7 +228,9 @@ interface FastH3ClipQueuedMessage {
|
|
|
212
228
|
"clip_id": string;
|
|
213
229
|
"seconds": number;
|
|
214
230
|
"metadata": string;
|
|
231
|
+
"has_ending_frame"?: boolean;
|
|
215
232
|
"has_starting_frame": boolean;
|
|
233
|
+
"ending_from_clip_id"?: string | null;
|
|
216
234
|
"continue_from_clip_id": string | null;
|
|
217
235
|
};
|
|
218
236
|
}
|
|
@@ -228,7 +246,9 @@ interface FastH3ClipStartedMessage {
|
|
|
228
246
|
"clip_id": string;
|
|
229
247
|
"seconds": number;
|
|
230
248
|
"metadata": string;
|
|
249
|
+
"has_ending_frame"?: boolean;
|
|
231
250
|
"has_starting_frame": boolean;
|
|
251
|
+
"ending_from_clip_id"?: string | null;
|
|
232
252
|
"continue_from_clip_id": string | null;
|
|
233
253
|
};
|
|
234
254
|
}
|
|
@@ -248,7 +268,9 @@ interface FastH3ClipStoppedMessage {
|
|
|
248
268
|
"clip_id": string;
|
|
249
269
|
"seconds": number;
|
|
250
270
|
"metadata": string;
|
|
271
|
+
"has_ending_frame"?: boolean;
|
|
251
272
|
"has_starting_frame": boolean;
|
|
273
|
+
"ending_from_clip_id"?: string | null;
|
|
252
274
|
"continue_from_clip_id": string | null;
|
|
253
275
|
};
|
|
254
276
|
/** Seconds of video and audio sent since the session began. */
|
|
@@ -261,7 +283,7 @@ interface FastH3ClipStoppedMessage {
|
|
|
261
283
|
*/
|
|
262
284
|
interface FastH3QueueUpdateMessage {
|
|
263
285
|
type: "queue_update";
|
|
264
|
-
/** Built clips no longer queued — played, stopped, or popped — whose last frame is still retained, oldest first. No longer playable (`play` refuses them), but any can be named in `enqueue`'s `continue_from_clip_id`; the oldest are evicted as new builds finish, so the front of this list is what expires next. */
|
|
286
|
+
/** Built clips no longer queued — played, stopped, or popped — whose last frame is still retained, oldest first. No longer playable (`play` refuses them), but any can be named in `enqueue`'s `continue_from_clip_id` or `ending_from_clip_id`; the oldest are evicted as new builds finish, so the front of this list is what expires next. */
|
|
265
287
|
history: {
|
|
266
288
|
"seed": number;
|
|
267
289
|
"ready": boolean;
|
|
@@ -270,7 +292,9 @@ interface FastH3QueueUpdateMessage {
|
|
|
270
292
|
"clip_id": string;
|
|
271
293
|
"seconds": number;
|
|
272
294
|
"metadata": string;
|
|
295
|
+
"has_ending_frame"?: boolean;
|
|
273
296
|
"has_starting_frame": boolean;
|
|
297
|
+
"ending_from_clip_id"?: string | null;
|
|
274
298
|
"continue_from_clip_id": string | null;
|
|
275
299
|
}[];
|
|
276
300
|
/** Built clips waiting to play, front first. A finished build joins at the back; bare `play` (and autoplay) takes the front; `move` reorders; playing or `pop` consumes. */
|
|
@@ -282,10 +306,12 @@ interface FastH3QueueUpdateMessage {
|
|
|
282
306
|
"clip_id": string;
|
|
283
307
|
"seconds": number;
|
|
284
308
|
"metadata": string;
|
|
309
|
+
"has_ending_frame"?: boolean;
|
|
285
310
|
"has_starting_frame": boolean;
|
|
311
|
+
"ending_from_clip_id"?: string | null;
|
|
286
312
|
"continue_from_clip_id": string | null;
|
|
287
313
|
}[];
|
|
288
|
-
/** Clips waiting to build, front first. Builds consume this queue from the front, one at a time, pausing only while `playout` is at capacity; a clip whose
|
|
314
|
+
/** Clips waiting to build, front first. Builds consume this queue from the front, one at a time, pausing only while `playout` is at capacity; a clip whose referenced starting or ending source is not built yet is skipped until it is, without blocking the rest. `enqueue`'s `position` and `move` control the order. */
|
|
289
315
|
generation: {
|
|
290
316
|
"seed": number;
|
|
291
317
|
"ready": boolean;
|
|
@@ -294,7 +320,9 @@ interface FastH3QueueUpdateMessage {
|
|
|
294
320
|
"clip_id": string;
|
|
295
321
|
"seconds": number;
|
|
296
322
|
"metadata": string;
|
|
323
|
+
"has_ending_frame"?: boolean;
|
|
297
324
|
"has_starting_frame": boolean;
|
|
325
|
+
"ending_from_clip_id"?: string | null;
|
|
298
326
|
"continue_from_clip_id": string | null;
|
|
299
327
|
}[];
|
|
300
328
|
}
|
|
@@ -358,7 +386,9 @@ interface FastH3ClipFinishedMessage {
|
|
|
358
386
|
"clip_id": string;
|
|
359
387
|
"seconds": number;
|
|
360
388
|
"metadata": string;
|
|
389
|
+
"has_ending_frame"?: boolean;
|
|
361
390
|
"has_starting_frame": boolean;
|
|
391
|
+
"ending_from_clip_id"?: string | null;
|
|
362
392
|
"continue_from_clip_id": string | null;
|
|
363
393
|
};
|
|
364
394
|
/** Seconds of video and audio sent since the session began, this clip included. */
|
|
@@ -406,7 +436,9 @@ interface FastH3ClipGeneratedMessage {
|
|
|
406
436
|
"clip_id": string;
|
|
407
437
|
"seconds": number;
|
|
408
438
|
"metadata": string;
|
|
439
|
+
"has_ending_frame"?: boolean;
|
|
409
440
|
"has_starting_frame": boolean;
|
|
441
|
+
"ending_from_clip_id"?: string | null;
|
|
410
442
|
"continue_from_clip_id": string | null;
|
|
411
443
|
};
|
|
412
444
|
}
|
|
@@ -468,8 +500,8 @@ declare class FastH3Model extends Reactor {
|
|
|
468
500
|
/** @deprecated The model client now extends `Reactor` directly — call methods on `this` instead. This accessor returns `this` for backwards compatibility and will be removed in a future major release. */
|
|
469
501
|
get reactor(): this;
|
|
470
502
|
/**
|
|
471
|
-
* Remove one clip by its UUID from whichever queue holds it, freeing its slot. Works on generating and built clips alike; a build already running for it is discarded when it completes. The clip that is playing is in neither queue — `stop` is the command that cuts it. A built clip stays in `queue_update.history` after popping, so clips
|
|
472
|
-
* @param params - Remove one clip by its UUID from whichever queue holds it, freeing its slot. Works on generating and built clips alike; a build already running for it is discarded when it completes. The clip that is playing is in neither queue — `stop` is the command that cuts it. A built clip stays in `queue_update.history` after popping, so clips
|
|
503
|
+
* Remove one clip by its UUID from whichever queue holds it, freeing its slot. Works on generating and built clips alike; a build already running for it is discarded when it completes. The clip that is playing is in neither queue — `stop` is the command that cuts it. A built clip stays in `queue_update.history` after popping, so clips referencing its frame are unaffected; an unbuilt clip that queued clips reference is refused, since popping it would leave them without an endpoint — pop those first. Emits `clip_popped`, `queue_update` and `state_update`, or `command_error` when no queued clip has that id or queued clips still reference its last frame.
|
|
504
|
+
* @param params - Remove one clip by its UUID from whichever queue holds it, freeing its slot. Works on generating and built clips alike; a build already running for it is discarded when it completes. The clip that is playing is in neither queue — `stop` is the command that cuts it. A built clip stays in `queue_update.history` after popping, so clips referencing its frame are unaffected; an unbuilt clip that queued clips reference is refused, since popping it would leave them without an endpoint — pop those first. Emits `clip_popped`, `queue_update` and `state_update`, or `command_error` when no queued clip has that id or queued clips still reference its last frame.
|
|
473
505
|
* @returns The correlated {@link FastH3ClipPoppedMessage} reply, or `undefined` when the send fails (the SDK never rejects — see `getLastError()`).
|
|
474
506
|
*/
|
|
475
507
|
pop(params: FastH3PopParams): Promise<FastH3ClipPoppedMessage | undefined>;
|
|
@@ -496,8 +528,8 @@ declare class FastH3Model extends Reactor {
|
|
|
496
528
|
*/
|
|
497
529
|
reset(): Promise<FastH3SessionResetMessage | undefined>;
|
|
498
530
|
/**
|
|
499
|
-
* Queue one clip generation. The clip enters the generation queue (at `position`, or the back), builds when its turn comes, and then joins the back of the playout queue, announced by `clip_generated`. The prompt is what the clip will show; the metadata is an opaque string echoed back on every message that references the clip, for frontends to carry their own tracking data. The clip opens from text alone, from an uploaded still (`starting_frame` — the image animates forward), or from an existing clip's last frame (`continue_from_clip_id` — any clip in the queues or in `queue_update.history`); a continued clip simply waits its turn until its source is built, wherever the two sit in the queue. The clip's canvas is the session's; its length is the `seconds` passed here (snapped to what the model can produce) or the session default, and its seed is the one passed here or the session's advancing default. Builds run through the queue in order; watch `queue_update` for the clip turning ready. Replies `clip_queued` with the clip's UUID and emits `queue_update` and `state_update`, or `command_error` when the queue is full, the prompt is empty, both a starting frame and a source clip are given,
|
|
500
|
-
* @param params - Queue one clip generation. The clip enters the generation queue (at `position`, or the back), builds when its turn comes, and then joins the back of the playout queue, announced by `clip_generated`. The prompt is what the clip will show; the metadata is an opaque string echoed back on every message that references the clip, for frontends to carry their own tracking data. The clip opens from text alone, from an uploaded still (`starting_frame` — the image animates forward), or from an existing clip's last frame (`continue_from_clip_id` — any clip in the queues or in `queue_update.history`); a continued clip simply waits its turn until its source is built, wherever the two sit in the queue. The clip's canvas is the session's; its length is the `seconds` passed here (snapped to what the model can produce) or the session default, and its seed is the one passed here or the session's advancing default. Builds run through the queue in order; watch `queue_update` for the clip turning ready. Replies `clip_queued` with the clip's UUID and emits `queue_update` and `state_update`, or `command_error` when the queue is full, the prompt is empty, both a starting frame and a source clip are given,
|
|
531
|
+
* Queue one clip generation. The clip enters the generation queue (at `position`, or the back), builds when its turn comes, and then joins the back of the playout queue, announced by `clip_generated`. The prompt is what the clip will show; the metadata is an opaque string echoed back on every message that references the clip, for frontends to carry their own tracking data. The clip opens from text alone, from an uploaded still (`starting_frame` — the image animates forward), or from an existing clip's last frame (`continue_from_clip_id` — any clip in the queues or in `queue_update.history`); a continued clip simply waits its turn until its source is built, wherever the two sit in the queue. An uploaded `ending_frame` or a generated clip's clean last frame (`ending_from_clip_id`) can accompany any opener — or stand alone — to make the clip animate *into* and close on that image. Set both clip-id fields to the same UUID to leave and return to one generated frame. The clip's canvas is the session's; its length is the `seconds` passed here (snapped to what the model can produce) or the session default, and its seed is the one passed here or the session's advancing default. Builds run through the queue in order; watch `queue_update` for the clip turning ready. Replies `clip_queued` with the clip's UUID and emits `queue_update` and `state_update`, or `command_error` when the queue is full, the prompt is empty, both a starting frame and a source clip are given, both ending conditions are given, a source clip is unknown or no longer retained, or an upload is not a decodable image.
|
|
532
|
+
* @param params - Queue one clip generation. The clip enters the generation queue (at `position`, or the back), builds when its turn comes, and then joins the back of the playout queue, announced by `clip_generated`. The prompt is what the clip will show; the metadata is an opaque string echoed back on every message that references the clip, for frontends to carry their own tracking data. The clip opens from text alone, from an uploaded still (`starting_frame` — the image animates forward), or from an existing clip's last frame (`continue_from_clip_id` — any clip in the queues or in `queue_update.history`); a continued clip simply waits its turn until its source is built, wherever the two sit in the queue. An uploaded `ending_frame` or a generated clip's clean last frame (`ending_from_clip_id`) can accompany any opener — or stand alone — to make the clip animate *into* and close on that image. Set both clip-id fields to the same UUID to leave and return to one generated frame. The clip's canvas is the session's; its length is the `seconds` passed here (snapped to what the model can produce) or the session default, and its seed is the one passed here or the session's advancing default. Builds run through the queue in order; watch `queue_update` for the clip turning ready. Replies `clip_queued` with the clip's UUID and emits `queue_update` and `state_update`, or `command_error` when the queue is full, the prompt is empty, both a starting frame and a source clip are given, both ending conditions are given, a source clip is unknown or no longer retained, or an upload is not a decodable image.
|
|
501
533
|
* @returns The correlated {@link FastH3ClipQueuedMessage} reply, or `undefined` when the send fails (the SDK never rejects — see `getLastError()`).
|
|
502
534
|
*/
|
|
503
535
|
enqueue(params: FastH3EnqueueParams): Promise<FastH3ClipQueuedMessage | undefined>;
|
|
@@ -508,7 +540,7 @@ declare class FastH3Model extends Reactor {
|
|
|
508
540
|
*/
|
|
509
541
|
setSeed(params: FastH3SetSeedParams): Promise<FastH3SeedAcceptedMessage | undefined>;
|
|
510
542
|
/**
|
|
511
|
-
* Return both queues' contents — `generation` (waiting to build) and `playout` (built, playable) — plus `history`, the built clips no longer queued that `continue_from_clip_id` can still name, every clip as its full structure. The same payload the model broadcasts as `queue_update`. Valid at any time.
|
|
543
|
+
* Return both queues' contents — `generation` (waiting to build) and `playout` (built, playable) — plus `history`, the built clips no longer queued that `continue_from_clip_id` or `ending_from_clip_id` can still name, every clip as its full structure. The same payload the model broadcasts as `queue_update`. Valid at any time.
|
|
512
544
|
* @returns The correlated {@link FastH3QueueUpdateMessage} reply, or `undefined` when the send fails (the SDK never rejects — see `getLastError()`).
|
|
513
545
|
*/
|
|
514
546
|
getQueue(): Promise<FastH3QueueUpdateMessage | undefined>;
|
package/dist/core.js
CHANGED
|
@@ -29,7 +29,7 @@ __export(core_exports, {
|
|
|
29
29
|
module.exports = __toCommonJS(core_exports);
|
|
30
30
|
var import_js_sdk = require("@reactor-team/js-sdk");
|
|
31
31
|
var MODEL_NAME = "reactor/fast-h3";
|
|
32
|
-
var MODEL_VERSION = "v1.0
|
|
32
|
+
var MODEL_VERSION = "v1.3.0";
|
|
33
33
|
var FastH3Tracks = [
|
|
34
34
|
{ name: "main_video", kind: "video", direction: "recvonly" },
|
|
35
35
|
{ name: "main_audio", kind: "audio", direction: "recvonly" }
|
|
@@ -54,8 +54,8 @@ var FastH3Model = class extends import_js_sdk.Reactor {
|
|
|
54
54
|
return this;
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
|
-
* Remove one clip by its UUID from whichever queue holds it, freeing its slot. Works on generating and built clips alike; a build already running for it is discarded when it completes. The clip that is playing is in neither queue — `stop` is the command that cuts it. A built clip stays in `queue_update.history` after popping, so clips
|
|
58
|
-
* @param params - Remove one clip by its UUID from whichever queue holds it, freeing its slot. Works on generating and built clips alike; a build already running for it is discarded when it completes. The clip that is playing is in neither queue — `stop` is the command that cuts it. A built clip stays in `queue_update.history` after popping, so clips
|
|
57
|
+
* Remove one clip by its UUID from whichever queue holds it, freeing its slot. Works on generating and built clips alike; a build already running for it is discarded when it completes. The clip that is playing is in neither queue — `stop` is the command that cuts it. A built clip stays in `queue_update.history` after popping, so clips referencing its frame are unaffected; an unbuilt clip that queued clips reference is refused, since popping it would leave them without an endpoint — pop those first. Emits `clip_popped`, `queue_update` and `state_update`, or `command_error` when no queued clip has that id or queued clips still reference its last frame.
|
|
58
|
+
* @param params - Remove one clip by its UUID from whichever queue holds it, freeing its slot. Works on generating and built clips alike; a build already running for it is discarded when it completes. The clip that is playing is in neither queue — `stop` is the command that cuts it. A built clip stays in `queue_update.history` after popping, so clips referencing its frame are unaffected; an unbuilt clip that queued clips reference is refused, since popping it would leave them without an endpoint — pop those first. Emits `clip_popped`, `queue_update` and `state_update`, or `command_error` when no queued clip has that id or queued clips still reference its last frame.
|
|
59
59
|
* @returns The correlated {@link FastH3ClipPoppedMessage} reply, or `undefined` when the send fails (the SDK never rejects — see `getLastError()`).
|
|
60
60
|
*/
|
|
61
61
|
async pop(params) {
|
|
@@ -97,8 +97,8 @@ var FastH3Model = class extends import_js_sdk.Reactor {
|
|
|
97
97
|
return reply === void 0 ? void 0 : _unwrapMessage(reply);
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
|
-
* Queue one clip generation. The clip enters the generation queue (at `position`, or the back), builds when its turn comes, and then joins the back of the playout queue, announced by `clip_generated`. The prompt is what the clip will show; the metadata is an opaque string echoed back on every message that references the clip, for frontends to carry their own tracking data. The clip opens from text alone, from an uploaded still (`starting_frame` — the image animates forward), or from an existing clip's last frame (`continue_from_clip_id` — any clip in the queues or in `queue_update.history`); a continued clip simply waits its turn until its source is built, wherever the two sit in the queue. The clip's canvas is the session's; its length is the `seconds` passed here (snapped to what the model can produce) or the session default, and its seed is the one passed here or the session's advancing default. Builds run through the queue in order; watch `queue_update` for the clip turning ready. Replies `clip_queued` with the clip's UUID and emits `queue_update` and `state_update`, or `command_error` when the queue is full, the prompt is empty, both a starting frame and a source clip are given,
|
|
101
|
-
* @param params - Queue one clip generation. The clip enters the generation queue (at `position`, or the back), builds when its turn comes, and then joins the back of the playout queue, announced by `clip_generated`. The prompt is what the clip will show; the metadata is an opaque string echoed back on every message that references the clip, for frontends to carry their own tracking data. The clip opens from text alone, from an uploaded still (`starting_frame` — the image animates forward), or from an existing clip's last frame (`continue_from_clip_id` — any clip in the queues or in `queue_update.history`); a continued clip simply waits its turn until its source is built, wherever the two sit in the queue. The clip's canvas is the session's; its length is the `seconds` passed here (snapped to what the model can produce) or the session default, and its seed is the one passed here or the session's advancing default. Builds run through the queue in order; watch `queue_update` for the clip turning ready. Replies `clip_queued` with the clip's UUID and emits `queue_update` and `state_update`, or `command_error` when the queue is full, the prompt is empty, both a starting frame and a source clip are given,
|
|
100
|
+
* Queue one clip generation. The clip enters the generation queue (at `position`, or the back), builds when its turn comes, and then joins the back of the playout queue, announced by `clip_generated`. The prompt is what the clip will show; the metadata is an opaque string echoed back on every message that references the clip, for frontends to carry their own tracking data. The clip opens from text alone, from an uploaded still (`starting_frame` — the image animates forward), or from an existing clip's last frame (`continue_from_clip_id` — any clip in the queues or in `queue_update.history`); a continued clip simply waits its turn until its source is built, wherever the two sit in the queue. An uploaded `ending_frame` or a generated clip's clean last frame (`ending_from_clip_id`) can accompany any opener — or stand alone — to make the clip animate *into* and close on that image. Set both clip-id fields to the same UUID to leave and return to one generated frame. The clip's canvas is the session's; its length is the `seconds` passed here (snapped to what the model can produce) or the session default, and its seed is the one passed here or the session's advancing default. Builds run through the queue in order; watch `queue_update` for the clip turning ready. Replies `clip_queued` with the clip's UUID and emits `queue_update` and `state_update`, or `command_error` when the queue is full, the prompt is empty, both a starting frame and a source clip are given, both ending conditions are given, a source clip is unknown or no longer retained, or an upload is not a decodable image.
|
|
101
|
+
* @param params - Queue one clip generation. The clip enters the generation queue (at `position`, or the back), builds when its turn comes, and then joins the back of the playout queue, announced by `clip_generated`. The prompt is what the clip will show; the metadata is an opaque string echoed back on every message that references the clip, for frontends to carry their own tracking data. The clip opens from text alone, from an uploaded still (`starting_frame` — the image animates forward), or from an existing clip's last frame (`continue_from_clip_id` — any clip in the queues or in `queue_update.history`); a continued clip simply waits its turn until its source is built, wherever the two sit in the queue. An uploaded `ending_frame` or a generated clip's clean last frame (`ending_from_clip_id`) can accompany any opener — or stand alone — to make the clip animate *into* and close on that image. Set both clip-id fields to the same UUID to leave and return to one generated frame. The clip's canvas is the session's; its length is the `seconds` passed here (snapped to what the model can produce) or the session default, and its seed is the one passed here or the session's advancing default. Builds run through the queue in order; watch `queue_update` for the clip turning ready. Replies `clip_queued` with the clip's UUID and emits `queue_update` and `state_update`, or `command_error` when the queue is full, the prompt is empty, both a starting frame and a source clip are given, both ending conditions are given, a source clip is unknown or no longer retained, or an upload is not a decodable image.
|
|
102
102
|
* @returns The correlated {@link FastH3ClipQueuedMessage} reply, or `undefined` when the send fails (the SDK never rejects — see `getLastError()`).
|
|
103
103
|
*/
|
|
104
104
|
async enqueue(params) {
|
|
@@ -115,7 +115,7 @@ var FastH3Model = class extends import_js_sdk.Reactor {
|
|
|
115
115
|
return reply === void 0 ? void 0 : _unwrapMessage(reply);
|
|
116
116
|
}
|
|
117
117
|
/**
|
|
118
|
-
* Return both queues' contents — `generation` (waiting to build) and `playout` (built, playable) — plus `history`, the built clips no longer queued that `continue_from_clip_id` can still name, every clip as its full structure. The same payload the model broadcasts as `queue_update`. Valid at any time.
|
|
118
|
+
* Return both queues' contents — `generation` (waiting to build) and `playout` (built, playable) — plus `history`, the built clips no longer queued that `continue_from_clip_id` or `ending_from_clip_id` can still name, every clip as its full structure. The same payload the model broadcasts as `queue_update`. Valid at any time.
|
|
119
119
|
* @returns The correlated {@link FastH3QueueUpdateMessage} reply, or `undefined` when the send fails (the SDK never rejects — see `getLastError()`).
|
|
120
120
|
*/
|
|
121
121
|
async getQueue() {
|