@reactor-models/fast-h3 1.1.0 → 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 -19
- package/dist/{chunk-CKECQBJK.mjs → chunk-K4CGGYQP.mjs} +2 -2
- package/dist/{chunk-CKECQBJK.mjs.map → chunk-K4CGGYQP.mjs.map} +1 -1
- package/dist/{chunk-BE5NWNKY.mjs → chunk-O4Q6CVNF.mjs} +7 -7
- package/dist/chunk-O4Q6CVNF.mjs.map +1 -0
- package/dist/core.d.mts +29 -13
- package/dist/core.d.ts +29 -13
- 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-BE5NWNKY.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.
|
|
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. An `ending_frame` can accompany any
|
|
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;
|
|
@@ -85,7 +85,7 @@ interface FastH3EnqueueParams {
|
|
|
85
85
|
*/
|
|
86
86
|
position?: number | null;
|
|
87
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.
|
|
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
89
|
* @default null
|
|
90
90
|
*/
|
|
91
91
|
ending_frame?: FileRef | null;
|
|
@@ -94,6 +94,11 @@ interface FastH3EnqueueParams {
|
|
|
94
94
|
* @default null
|
|
95
95
|
*/
|
|
96
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;
|
|
97
102
|
/**
|
|
98
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`.
|
|
99
104
|
* @default ""
|
|
@@ -157,6 +162,7 @@ interface FastH3ClipMovedMessage {
|
|
|
157
162
|
"metadata": string;
|
|
158
163
|
"has_ending_frame"?: boolean;
|
|
159
164
|
"has_starting_frame": boolean;
|
|
165
|
+
"ending_from_clip_id"?: string | null;
|
|
160
166
|
"continue_from_clip_id": string | null;
|
|
161
167
|
};
|
|
162
168
|
/** Which queue it moved within: `generation` or `playout`. */
|
|
@@ -182,6 +188,7 @@ interface FastH3ClipFailedMessage {
|
|
|
182
188
|
"metadata": string;
|
|
183
189
|
"has_ending_frame"?: boolean;
|
|
184
190
|
"has_starting_frame": boolean;
|
|
191
|
+
"ending_from_clip_id"?: string | null;
|
|
185
192
|
"continue_from_clip_id": string | null;
|
|
186
193
|
};
|
|
187
194
|
/** What went wrong. */
|
|
@@ -205,6 +212,7 @@ interface FastH3ClipPoppedMessage {
|
|
|
205
212
|
"metadata": string;
|
|
206
213
|
"has_ending_frame"?: boolean;
|
|
207
214
|
"has_starting_frame": boolean;
|
|
215
|
+
"ending_from_clip_id"?: string | null;
|
|
208
216
|
"continue_from_clip_id": string | null;
|
|
209
217
|
};
|
|
210
218
|
}
|
|
@@ -222,6 +230,7 @@ interface FastH3ClipQueuedMessage {
|
|
|
222
230
|
"metadata": string;
|
|
223
231
|
"has_ending_frame"?: boolean;
|
|
224
232
|
"has_starting_frame": boolean;
|
|
233
|
+
"ending_from_clip_id"?: string | null;
|
|
225
234
|
"continue_from_clip_id": string | null;
|
|
226
235
|
};
|
|
227
236
|
}
|
|
@@ -239,6 +248,7 @@ interface FastH3ClipStartedMessage {
|
|
|
239
248
|
"metadata": string;
|
|
240
249
|
"has_ending_frame"?: boolean;
|
|
241
250
|
"has_starting_frame": boolean;
|
|
251
|
+
"ending_from_clip_id"?: string | null;
|
|
242
252
|
"continue_from_clip_id": string | null;
|
|
243
253
|
};
|
|
244
254
|
}
|
|
@@ -260,6 +270,7 @@ interface FastH3ClipStoppedMessage {
|
|
|
260
270
|
"metadata": string;
|
|
261
271
|
"has_ending_frame"?: boolean;
|
|
262
272
|
"has_starting_frame": boolean;
|
|
273
|
+
"ending_from_clip_id"?: string | null;
|
|
263
274
|
"continue_from_clip_id": string | null;
|
|
264
275
|
};
|
|
265
276
|
/** Seconds of video and audio sent since the session began. */
|
|
@@ -272,7 +283,7 @@ interface FastH3ClipStoppedMessage {
|
|
|
272
283
|
*/
|
|
273
284
|
interface FastH3QueueUpdateMessage {
|
|
274
285
|
type: "queue_update";
|
|
275
|
-
/** 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. */
|
|
276
287
|
history: {
|
|
277
288
|
"seed": number;
|
|
278
289
|
"ready": boolean;
|
|
@@ -283,6 +294,7 @@ interface FastH3QueueUpdateMessage {
|
|
|
283
294
|
"metadata": string;
|
|
284
295
|
"has_ending_frame"?: boolean;
|
|
285
296
|
"has_starting_frame": boolean;
|
|
297
|
+
"ending_from_clip_id"?: string | null;
|
|
286
298
|
"continue_from_clip_id": string | null;
|
|
287
299
|
}[];
|
|
288
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. */
|
|
@@ -296,9 +308,10 @@ interface FastH3QueueUpdateMessage {
|
|
|
296
308
|
"metadata": string;
|
|
297
309
|
"has_ending_frame"?: boolean;
|
|
298
310
|
"has_starting_frame": boolean;
|
|
311
|
+
"ending_from_clip_id"?: string | null;
|
|
299
312
|
"continue_from_clip_id": string | null;
|
|
300
313
|
}[];
|
|
301
|
-
/** 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. */
|
|
302
315
|
generation: {
|
|
303
316
|
"seed": number;
|
|
304
317
|
"ready": boolean;
|
|
@@ -309,6 +322,7 @@ interface FastH3QueueUpdateMessage {
|
|
|
309
322
|
"metadata": string;
|
|
310
323
|
"has_ending_frame"?: boolean;
|
|
311
324
|
"has_starting_frame": boolean;
|
|
325
|
+
"ending_from_clip_id"?: string | null;
|
|
312
326
|
"continue_from_clip_id": string | null;
|
|
313
327
|
}[];
|
|
314
328
|
}
|
|
@@ -374,6 +388,7 @@ interface FastH3ClipFinishedMessage {
|
|
|
374
388
|
"metadata": string;
|
|
375
389
|
"has_ending_frame"?: boolean;
|
|
376
390
|
"has_starting_frame": boolean;
|
|
391
|
+
"ending_from_clip_id"?: string | null;
|
|
377
392
|
"continue_from_clip_id": string | null;
|
|
378
393
|
};
|
|
379
394
|
/** Seconds of video and audio sent since the session began, this clip included. */
|
|
@@ -423,6 +438,7 @@ interface FastH3ClipGeneratedMessage {
|
|
|
423
438
|
"metadata": string;
|
|
424
439
|
"has_ending_frame"?: boolean;
|
|
425
440
|
"has_starting_frame": boolean;
|
|
441
|
+
"ending_from_clip_id"?: string | null;
|
|
426
442
|
"continue_from_clip_id": string | null;
|
|
427
443
|
};
|
|
428
444
|
}
|
|
@@ -484,8 +500,8 @@ declare class FastH3Model extends Reactor {
|
|
|
484
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. */
|
|
485
501
|
get reactor(): this;
|
|
486
502
|
/**
|
|
487
|
-
* 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
|
|
488
|
-
* @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.
|
|
489
505
|
* @returns The correlated {@link FastH3ClipPoppedMessage} reply, or `undefined` when the send fails (the SDK never rejects — see `getLastError()`).
|
|
490
506
|
*/
|
|
491
507
|
pop(params: FastH3PopParams): Promise<FastH3ClipPoppedMessage | undefined>;
|
|
@@ -512,8 +528,8 @@ declare class FastH3Model extends Reactor {
|
|
|
512
528
|
*/
|
|
513
529
|
reset(): Promise<FastH3SessionResetMessage | undefined>;
|
|
514
530
|
/**
|
|
515
|
-
* 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 `ending_frame` can accompany any
|
|
516
|
-
* @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 `ending_frame` can accompany any
|
|
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.
|
|
517
533
|
* @returns The correlated {@link FastH3ClipQueuedMessage} reply, or `undefined` when the send fails (the SDK never rejects — see `getLastError()`).
|
|
518
534
|
*/
|
|
519
535
|
enqueue(params: FastH3EnqueueParams): Promise<FastH3ClipQueuedMessage | undefined>;
|
|
@@ -524,7 +540,7 @@ declare class FastH3Model extends Reactor {
|
|
|
524
540
|
*/
|
|
525
541
|
setSeed(params: FastH3SetSeedParams): Promise<FastH3SeedAcceptedMessage | undefined>;
|
|
526
542
|
/**
|
|
527
|
-
* 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.
|
|
528
544
|
* @returns The correlated {@link FastH3QueueUpdateMessage} reply, or `undefined` when the send fails (the SDK never rejects — see `getLastError()`).
|
|
529
545
|
*/
|
|
530
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.
|
|
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. An `ending_frame` can accompany any
|
|
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;
|
|
@@ -85,7 +85,7 @@ interface FastH3EnqueueParams {
|
|
|
85
85
|
*/
|
|
86
86
|
position?: number | null;
|
|
87
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.
|
|
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
89
|
* @default null
|
|
90
90
|
*/
|
|
91
91
|
ending_frame?: FileRef | null;
|
|
@@ -94,6 +94,11 @@ interface FastH3EnqueueParams {
|
|
|
94
94
|
* @default null
|
|
95
95
|
*/
|
|
96
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;
|
|
97
102
|
/**
|
|
98
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`.
|
|
99
104
|
* @default ""
|
|
@@ -157,6 +162,7 @@ interface FastH3ClipMovedMessage {
|
|
|
157
162
|
"metadata": string;
|
|
158
163
|
"has_ending_frame"?: boolean;
|
|
159
164
|
"has_starting_frame": boolean;
|
|
165
|
+
"ending_from_clip_id"?: string | null;
|
|
160
166
|
"continue_from_clip_id": string | null;
|
|
161
167
|
};
|
|
162
168
|
/** Which queue it moved within: `generation` or `playout`. */
|
|
@@ -182,6 +188,7 @@ interface FastH3ClipFailedMessage {
|
|
|
182
188
|
"metadata": string;
|
|
183
189
|
"has_ending_frame"?: boolean;
|
|
184
190
|
"has_starting_frame": boolean;
|
|
191
|
+
"ending_from_clip_id"?: string | null;
|
|
185
192
|
"continue_from_clip_id": string | null;
|
|
186
193
|
};
|
|
187
194
|
/** What went wrong. */
|
|
@@ -205,6 +212,7 @@ interface FastH3ClipPoppedMessage {
|
|
|
205
212
|
"metadata": string;
|
|
206
213
|
"has_ending_frame"?: boolean;
|
|
207
214
|
"has_starting_frame": boolean;
|
|
215
|
+
"ending_from_clip_id"?: string | null;
|
|
208
216
|
"continue_from_clip_id": string | null;
|
|
209
217
|
};
|
|
210
218
|
}
|
|
@@ -222,6 +230,7 @@ interface FastH3ClipQueuedMessage {
|
|
|
222
230
|
"metadata": string;
|
|
223
231
|
"has_ending_frame"?: boolean;
|
|
224
232
|
"has_starting_frame": boolean;
|
|
233
|
+
"ending_from_clip_id"?: string | null;
|
|
225
234
|
"continue_from_clip_id": string | null;
|
|
226
235
|
};
|
|
227
236
|
}
|
|
@@ -239,6 +248,7 @@ interface FastH3ClipStartedMessage {
|
|
|
239
248
|
"metadata": string;
|
|
240
249
|
"has_ending_frame"?: boolean;
|
|
241
250
|
"has_starting_frame": boolean;
|
|
251
|
+
"ending_from_clip_id"?: string | null;
|
|
242
252
|
"continue_from_clip_id": string | null;
|
|
243
253
|
};
|
|
244
254
|
}
|
|
@@ -260,6 +270,7 @@ interface FastH3ClipStoppedMessage {
|
|
|
260
270
|
"metadata": string;
|
|
261
271
|
"has_ending_frame"?: boolean;
|
|
262
272
|
"has_starting_frame": boolean;
|
|
273
|
+
"ending_from_clip_id"?: string | null;
|
|
263
274
|
"continue_from_clip_id": string | null;
|
|
264
275
|
};
|
|
265
276
|
/** Seconds of video and audio sent since the session began. */
|
|
@@ -272,7 +283,7 @@ interface FastH3ClipStoppedMessage {
|
|
|
272
283
|
*/
|
|
273
284
|
interface FastH3QueueUpdateMessage {
|
|
274
285
|
type: "queue_update";
|
|
275
|
-
/** 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. */
|
|
276
287
|
history: {
|
|
277
288
|
"seed": number;
|
|
278
289
|
"ready": boolean;
|
|
@@ -283,6 +294,7 @@ interface FastH3QueueUpdateMessage {
|
|
|
283
294
|
"metadata": string;
|
|
284
295
|
"has_ending_frame"?: boolean;
|
|
285
296
|
"has_starting_frame": boolean;
|
|
297
|
+
"ending_from_clip_id"?: string | null;
|
|
286
298
|
"continue_from_clip_id": string | null;
|
|
287
299
|
}[];
|
|
288
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. */
|
|
@@ -296,9 +308,10 @@ interface FastH3QueueUpdateMessage {
|
|
|
296
308
|
"metadata": string;
|
|
297
309
|
"has_ending_frame"?: boolean;
|
|
298
310
|
"has_starting_frame": boolean;
|
|
311
|
+
"ending_from_clip_id"?: string | null;
|
|
299
312
|
"continue_from_clip_id": string | null;
|
|
300
313
|
}[];
|
|
301
|
-
/** 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. */
|
|
302
315
|
generation: {
|
|
303
316
|
"seed": number;
|
|
304
317
|
"ready": boolean;
|
|
@@ -309,6 +322,7 @@ interface FastH3QueueUpdateMessage {
|
|
|
309
322
|
"metadata": string;
|
|
310
323
|
"has_ending_frame"?: boolean;
|
|
311
324
|
"has_starting_frame": boolean;
|
|
325
|
+
"ending_from_clip_id"?: string | null;
|
|
312
326
|
"continue_from_clip_id": string | null;
|
|
313
327
|
}[];
|
|
314
328
|
}
|
|
@@ -374,6 +388,7 @@ interface FastH3ClipFinishedMessage {
|
|
|
374
388
|
"metadata": string;
|
|
375
389
|
"has_ending_frame"?: boolean;
|
|
376
390
|
"has_starting_frame": boolean;
|
|
391
|
+
"ending_from_clip_id"?: string | null;
|
|
377
392
|
"continue_from_clip_id": string | null;
|
|
378
393
|
};
|
|
379
394
|
/** Seconds of video and audio sent since the session began, this clip included. */
|
|
@@ -423,6 +438,7 @@ interface FastH3ClipGeneratedMessage {
|
|
|
423
438
|
"metadata": string;
|
|
424
439
|
"has_ending_frame"?: boolean;
|
|
425
440
|
"has_starting_frame": boolean;
|
|
441
|
+
"ending_from_clip_id"?: string | null;
|
|
426
442
|
"continue_from_clip_id": string | null;
|
|
427
443
|
};
|
|
428
444
|
}
|
|
@@ -484,8 +500,8 @@ declare class FastH3Model extends Reactor {
|
|
|
484
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. */
|
|
485
501
|
get reactor(): this;
|
|
486
502
|
/**
|
|
487
|
-
* 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
|
|
488
|
-
* @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.
|
|
489
505
|
* @returns The correlated {@link FastH3ClipPoppedMessage} reply, or `undefined` when the send fails (the SDK never rejects — see `getLastError()`).
|
|
490
506
|
*/
|
|
491
507
|
pop(params: FastH3PopParams): Promise<FastH3ClipPoppedMessage | undefined>;
|
|
@@ -512,8 +528,8 @@ declare class FastH3Model extends Reactor {
|
|
|
512
528
|
*/
|
|
513
529
|
reset(): Promise<FastH3SessionResetMessage | undefined>;
|
|
514
530
|
/**
|
|
515
|
-
* 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 `ending_frame` can accompany any
|
|
516
|
-
* @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 `ending_frame` can accompany any
|
|
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.
|
|
517
533
|
* @returns The correlated {@link FastH3ClipQueuedMessage} reply, or `undefined` when the send fails (the SDK never rejects — see `getLastError()`).
|
|
518
534
|
*/
|
|
519
535
|
enqueue(params: FastH3EnqueueParams): Promise<FastH3ClipQueuedMessage | undefined>;
|
|
@@ -524,7 +540,7 @@ declare class FastH3Model extends Reactor {
|
|
|
524
540
|
*/
|
|
525
541
|
setSeed(params: FastH3SetSeedParams): Promise<FastH3SeedAcceptedMessage | undefined>;
|
|
526
542
|
/**
|
|
527
|
-
* 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.
|
|
528
544
|
* @returns The correlated {@link FastH3QueueUpdateMessage} reply, or `undefined` when the send fails (the SDK never rejects — see `getLastError()`).
|
|
529
545
|
*/
|
|
530
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.
|
|
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. An `ending_frame` can accompany any
|
|
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 `ending_frame` can accompany any
|
|
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() {
|