@reactor-models/lingbot 0.2.18 → 0.2.21

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/dist/index.d.mts CHANGED
@@ -1,451 +1,4 @@
1
- import * as _reactor_team_js_sdk from '@reactor-team/js-sdk';
2
- import { ReactorViewProps, ReactorConnectOptions, FileRef, Reactor } from '@reactor-team/js-sdk';
1
+ export { LingbotChunkCompleteMessage, LingbotCommandErrorMessage, LingbotConditionsReadyMessage, LingbotGenerationCompleteMessage, LingbotGenerationPausedMessage, LingbotGenerationResetMessage, LingbotGenerationResumedMessage, LingbotGenerationStartedMessage, LingbotImageAcceptedMessage, LingbotMessage, LingbotModel, LingbotOptions, LingbotPromptAcceptedMessage, LingbotRecvTrackName, LingbotSetImageParams, LingbotSetLookHorizontalParams, LingbotSetLookVerticalParams, LingbotSetMovementParams, LingbotSetPromptParams, LingbotSetRotationSpeedDegParams, LingbotSetSeedParams, LingbotStateMessage, LingbotTracks, MODEL_NAME, MODEL_VERSION } from './core.mjs';
2
+ export { LingbotMainVideoView, LingbotMainVideoViewProps, LingbotProvider, LingbotProviderProps, useLingbot, useLingbotChunkComplete, useLingbotCommandError, useLingbotConditionsReady, useLingbotGenerationComplete, useLingbotGenerationPaused, useLingbotGenerationReset, useLingbotGenerationResumed, useLingbotGenerationStarted, useLingbotImageAccepted, useLingbotMessage, useLingbotPromptAccepted, useLingbotState, useLingbotTrack } from './react.mjs';
3
3
  export { FileRef } from '@reactor-team/js-sdk';
4
- import { ReactElement, ReactNode } from 'react';
5
-
6
- interface LingbotProviderProps extends LingbotOptions {
7
- jwtToken?: string;
8
- connectOptions?: ReactorConnectOptions;
9
- children: ReactNode;
10
- }
11
- /**
12
- * Provider for the Lingbot model.
13
- *
14
- * Wraps {@link ReactorProvider} with `modelName` and `modelTracks` pre-configured from the
15
- * generated constants. Drop this near the top of your tree, then use
16
- * {@link useLingbot} and the `useLingbot<Message>` hooks below it.
17
- */
18
- declare function LingbotProvider({ apiUrl, local, jwtToken, connectOptions, children, }: LingbotProviderProps): ReactElement;
19
- /**
20
- * Access the Lingbot model as typed commands bound to the nearest
21
- * {@link LingbotProvider}. Re-renders when `status` changes.
22
- *
23
- * Returns the full action surface — connection `status`, `connect` /
24
- * `disconnect` for manual lifecycle control, one method per model event, and `uploadFile` for upload-reference params.
25
- *
26
- * `connect` / `disconnect` are pulled off the store so consumers using
27
- * `<LingbotProvider>` with `autoConnect: false` (or manual reconnect
28
- * flows) don't have to reach for the raw `useReactor` hook themselves,
29
- * which in turn would force `@reactor-team/js-sdk` to be a direct
30
- * dependency instead of a transitive one through this package.
31
- */
32
- declare function useLingbot(): {
33
- status: _reactor_team_js_sdk.ReactorStatus;
34
- connect: (jwtToken?: string, options?: _reactor_team_js_sdk.ConnectOptions) => Promise<void>;
35
- disconnect: (recoverable?: boolean) => Promise<void>;
36
- pause: () => Promise<void>;
37
- reset: () => Promise<void>;
38
- start: () => Promise<void>;
39
- resume: () => Promise<void>;
40
- setSeed: (params: LingbotSetSeedParams) => Promise<void>;
41
- setImage: (params: LingbotSetImageParams) => Promise<void>;
42
- setPrompt: (params: LingbotSetPromptParams) => Promise<void>;
43
- setMovement: (params: LingbotSetMovementParams) => Promise<void>;
44
- setLookVertical: (params: LingbotSetLookVerticalParams) => Promise<void>;
45
- setLookHorizontal: (params: LingbotSetLookHorizontalParams) => Promise<void>;
46
- setRotationSpeedDeg: (params: LingbotSetRotationSpeedDegParams) => Promise<void>;
47
- uploadFile: (file: File | Blob, options?: {
48
- name?: string;
49
- }) => Promise<FileRef>;
50
- };
51
- /**
52
- * Subscribe to any Lingbot message with a fully-typed handler.
53
- * The handler receives a discriminated LingbotMessage.
54
- */
55
- declare function useLingbotMessage(handler: (message: LingbotMessage) => void): void;
56
- /**
57
- * Subscribe to "state" messages only.
58
- * Handler receives a fully-typed LingbotStateMessage.
59
- */
60
- declare function useLingbotState(handler: (message: LingbotStateMessage) => void): void;
61
- /**
62
- * Subscribe to "command_error" messages only.
63
- * Handler receives a fully-typed LingbotCommandErrorMessage.
64
- */
65
- declare function useLingbotCommandError(handler: (message: LingbotCommandErrorMessage) => void): void;
66
- /**
67
- * Subscribe to "chunk_complete" messages only.
68
- * Handler receives a fully-typed LingbotChunkCompleteMessage.
69
- */
70
- declare function useLingbotChunkComplete(handler: (message: LingbotChunkCompleteMessage) => void): void;
71
- /**
72
- * Subscribe to "image_accepted" messages only.
73
- * Handler receives a fully-typed LingbotImageAcceptedMessage.
74
- */
75
- declare function useLingbotImageAccepted(handler: (message: LingbotImageAcceptedMessage) => void): void;
76
- /**
77
- * Subscribe to "prompt_accepted" messages only.
78
- * Handler receives a fully-typed LingbotPromptAcceptedMessage.
79
- */
80
- declare function useLingbotPromptAccepted(handler: (message: LingbotPromptAcceptedMessage) => void): void;
81
- /**
82
- * Subscribe to "conditions_ready" messages only.
83
- * Handler receives a fully-typed LingbotConditionsReadyMessage.
84
- */
85
- declare function useLingbotConditionsReady(handler: (message: LingbotConditionsReadyMessage) => void): void;
86
- /**
87
- * Subscribe to "generation_reset" messages only.
88
- * Handler receives a fully-typed LingbotGenerationResetMessage.
89
- */
90
- declare function useLingbotGenerationReset(handler: (message: LingbotGenerationResetMessage) => void): void;
91
- /**
92
- * Subscribe to "generation_paused" messages only.
93
- * Handler receives a fully-typed LingbotGenerationPausedMessage.
94
- */
95
- declare function useLingbotGenerationPaused(handler: (message: LingbotGenerationPausedMessage) => void): void;
96
- /**
97
- * Subscribe to "generation_resumed" messages only.
98
- * Handler receives a fully-typed LingbotGenerationResumedMessage.
99
- */
100
- declare function useLingbotGenerationResumed(handler: (message: LingbotGenerationResumedMessage) => void): void;
101
- /**
102
- * Subscribe to "generation_started" messages only.
103
- * Handler receives a fully-typed LingbotGenerationStartedMessage.
104
- */
105
- declare function useLingbotGenerationStarted(handler: (message: LingbotGenerationStartedMessage) => void): void;
106
- /**
107
- * Subscribe to "generation_complete" messages only.
108
- * Handler receives a fully-typed LingbotGenerationCompleteMessage.
109
- */
110
- declare function useLingbotGenerationComplete(handler: (message: LingbotGenerationCompleteMessage) => void): void;
111
- /**
112
- * Subscribe to a recvonly MediaStreamTrack the model publishes, by name.
113
- *
114
- * Returns `undefined` until the model emits the track, then the live track for the lifetime of the connection. `name` is constrained to the model's declared recvonly channels — use one of `LingbotRecvTrackName`.
115
- * @param name - A recvonly track name declared by the model
116
- * @returns The live MediaStreamTrack, or `undefined` until received
117
- */
118
- declare function useLingbotTrack(name: LingbotRecvTrackName): MediaStreamTrack | undefined;
119
- type LingbotMainVideoViewProps = Omit<ReactorViewProps, "track">;
120
- /**
121
- * Render the model's "main_video" recvonly video track in a `<video>` element.
122
- *
123
- * Thin wrapper around `<ReactorView>` with `track` pre-bound. Accepts every other `ReactorViewProps` (`audioTrack`, `className`, `style`, `videoObjectFit`, `muted`, …). Must be rendered inside `<LingbotProvider>`.
124
- */
125
- declare function LingbotMainVideoView(props: LingbotMainVideoViewProps): ReactElement;
126
-
127
- declare const MODEL_NAME: "lingbot";
128
- declare const MODEL_VERSION: "v0.2.18";
129
- /**
130
- * Preset media tracks for the Lingbot model.
131
- *
132
- * Declared in the model's OpenAPI schema and passed to the SDK as
133
- * `modelTracks` so the transport can prepare the SDP offer in
134
- * parallel with session polling (faster first-frame latency).
135
- */
136
- declare const LingbotTracks: readonly [{
137
- readonly name: "main_video";
138
- readonly kind: "video";
139
- readonly direction: "recvonly";
140
- }];
141
- /** Track names the client can subscribe to (recvonly, from the client's perspective). */
142
- type LingbotRecvTrackName = "main_video";
143
- /** Set seed */
144
- interface LingbotSetSeedParams {
145
- /**
146
- * Seed for the random generator used to sample the initial noise. Must be a non-negative integer; the model never draws its own random seed — pick one explicitly (or keep the default) for reproducible runs. Read once when `start` fires; later changes take effect only after `reset` followed by a new `start`.
147
- * @minimum 0
148
- * @default 42
149
- */
150
- seed?: number;
151
- }
152
- /** Provide a reference image that anchors generation (image-to-video). Call before `start`; the image is required for generation to begin. Changes during generation have no effect until `reset` is issued and `start` is called again. Emits `image_accepted`, `conditions_ready`, and `state` on success, or `command_error` if the file is missing, not an image, or cannot be decoded. */
153
- interface LingbotSetImageParams {
154
- /**
155
- * Reference to a file uploaded via the Reactor presigned-URL protocol.
156
- * @default null
157
- */
158
- image?: FileRef;
159
- }
160
- /** Set the scene prompt. Valid at any time — call before `start` to arm generation, or hot-swap during generation to steer the next chunk. Emits `prompt_accepted`, `conditions_ready`, and `state` on success. */
161
- interface LingbotSetPromptParams {
162
- /**
163
- * Natural-language description of the scene to generate. Replaces the previously active prompt. Applied on the next chunk when generating; otherwise takes effect when `start` fires.
164
- * @default ""
165
- */
166
- prompt?: string;
167
- }
168
- /** Set movement */
169
- interface LingbotSetMovementParams {
170
- /**
171
- * Character movement in the generated scene. `idle` holds the character stationary; `forward` / `back` translate along the look axis; `strafe_left` / `strafe_right` translate sideways. Can be changed at any time; the new value applies to the next chunk.
172
- * @default "idle"
173
- */
174
- movement?: "idle" | "forward" | "back" | "strafe_left" | "strafe_right";
175
- }
176
- /** Set look_vertical */
177
- interface LingbotSetLookVerticalParams {
178
- /**
179
- * Vertical (pitch) camera rotation. `idle` holds pitch steady; `up` / `down` rotate the camera at the rate given by `rotation_speed_deg`. Can be changed at any time; the new value applies to the next chunk.
180
- * @default "idle"
181
- */
182
- look_vertical?: "idle" | "up" | "down";
183
- }
184
- /** Set look_horizontal */
185
- interface LingbotSetLookHorizontalParams {
186
- /**
187
- * Horizontal (yaw) camera rotation. `idle` holds yaw steady; `left` / `right` rotate the camera at the rate given by `rotation_speed_deg`. Can be changed at any time; the new value applies to the next chunk.
188
- * @default "idle"
189
- */
190
- look_horizontal?: "idle" | "left" | "right";
191
- }
192
- /** Set rotation_speed_deg */
193
- interface LingbotSetRotationSpeedDegParams {
194
- /**
195
- * Camera rotation speed in degrees per latent frame, applied when `look_horizontal` or `look_vertical` is not `idle`. Range 0.0 – 30.0. Ignored when both look axes are `idle`. Can be changed at any time; the new value applies to the next chunk.
196
- * @minimum 0
197
- * @maximum 30
198
- * @default 5
199
- */
200
- rotation_speed_deg?: number;
201
- }
202
- /**
203
- * Snapshot of the session's observable state.
204
- *
205
- * Emitted on connect, after every command that mutates session state (`set_prompt`, `set_image`, `start`, `pause`, `resume`, `reset`, and the auto-generated `set_<field>` setters), and after each `chunk_complete`. Clients can treat this as the single source of truth for driving UI, without having to track every individual command and message themselves.
206
- */
207
- interface LingbotStateMessage {
208
- type: "state";
209
- /** Current value of the `seed` input field. The seed that was actually used by the running generation was captured when `start` fired — later changes to `seed` only take effect after `reset` and a new `start`. */
210
- seed: number;
211
- /** True while generation is paused via `pause`. */
212
- paused: boolean;
213
- /** True while the chunk loop is actively producing frames — equivalent to `started and not paused`. `False` both before `start` and while paused; read `started` to disambiguate. */
214
- running: boolean;
215
- /** True once `start` has been accepted. Remains true while paused; reset to false by `reset` or after `generation_complete` when the session is not auto-restarting. */
216
- started: boolean;
217
- /** Current value of the `movement` input field. */
218
- movement: string;
219
- /** True once a reference image has been set for the session. */
220
- has_image: boolean;
221
- /** True once a prompt has been set for the session. */
222
- has_prompt: boolean;
223
- /** Zero-based index of the last completed chunk. `0` before the first chunk has completed, and resets to `0` on `reset`. */
224
- current_chunk: number;
225
- /** Current value of the `look_vertical` input field. */
226
- look_vertical: string;
227
- /** Composite action string derived from `movement`, `look_horizontal`, and `look_vertical` — a `+`-joined combination of `w`/`s`/`a`/`d` and `left`/`right`/`up`/`down`, or `still` when idle. */
228
- current_action: string;
229
- /** The prompt currently driving generation, or `null` if no prompt has been set for the session. */
230
- current_prompt: unknown;
231
- /** Current value of the `look_horizontal` input field. */
232
- look_horizontal: string;
233
- /** Current value of the `rotation_speed_deg` input field (0.0 – 30.0). */
234
- rotation_speed_deg: number;
235
- }
236
- /** Emitted when a command is rejected because preconditions are not met or its arguments could not be processed. */
237
- interface LingbotCommandErrorMessage {
238
- type: "command_error";
239
- /** Human-readable explanation of why the command was rejected. */
240
- reason: string;
241
- /** Name of the command that was rejected. */
242
- command: string;
243
- }
244
- /** Emitted once per completed chunk of `main_video`. */
245
- interface LingbotChunkCompleteMessage {
246
- type: "chunk_complete";
247
- /** Zero-based index of the chunk that just completed. */
248
- chunk_index: number;
249
- /** The composite action string used to drive this chunk — a `+`-joined combination of movement (`w`/`s`/`a`/`d`) and look directions (`left`/`right`/`up`/`down`), or `still` when the character is idle with no camera rotation. */
250
- active_action: string;
251
- /** The prompt that was active while this chunk was generated. */
252
- active_prompt: string;
253
- /** Number of pixel frames emitted by this chunk. */
254
- frames_emitted: number;
255
- }
256
- /** Emitted after `set_image` successfully decodes the uploaded file. */
257
- interface LingbotImageAcceptedMessage {
258
- type: "image_accepted";
259
- /** Width in pixels of the decoded reference image. */
260
- width: number;
261
- /** Height in pixels of the decoded reference image. */
262
- height: number;
263
- }
264
- /** Emitted after `set_prompt` is accepted. */
265
- interface LingbotPromptAcceptedMessage {
266
- type: "prompt_accepted";
267
- /** The prompt text that was accepted. */
268
- prompt: string;
269
- }
270
- /** Emitted after `set_prompt` or `set_image` so the client can tell at a glance whether `start` will succeed. */
271
- interface LingbotConditionsReadyMessage {
272
- type: "conditions_ready";
273
- /** True once a reference image has been set for the session. */
274
- has_image: boolean;
275
- /** True once a prompt has been set for the session. */
276
- has_prompt: boolean;
277
- }
278
- /** Emitted after `reset` clears session state and returns to the waiting state. */
279
- interface LingbotGenerationResetMessage {
280
- type: "generation_reset";
281
- /** Short human-readable reason the reset was issued. */
282
- reason: string;
283
- }
284
- /** Emitted in response to `pause`, once the current chunk finishes. */
285
- interface LingbotGenerationPausedMessage {
286
- type: "generation_paused";
287
- /** Index of the last completed chunk before pausing. */
288
- chunk_index: number;
289
- }
290
- /** Emitted in response to `resume` when leaving the paused state. */
291
- interface LingbotGenerationResumedMessage {
292
- type: "generation_resumed";
293
- /** Index of the last completed chunk before resuming. */
294
- chunk_index: number;
295
- }
296
- /** Emitted once when `start` succeeds and frames begin streaming. */
297
- interface LingbotGenerationStartedMessage {
298
- type: "generation_started";
299
- /** The prompt active at the start of generation. */
300
- prompt: string;
301
- /** Total number of chunks the run will produce before `generation_complete` fires. */
302
- chunk_num: number;
303
- /** Total number of pixel frames the run will emit on `main_video` before `generation_complete`. */
304
- frame_num: number;
305
- }
306
- /** Emitted when all `chunk_num` chunks of a run have streamed. If the session is still `started`, a new run kicks off immediately with the same prompt and image; call `reset` to stop. */
307
- interface LingbotGenerationCompleteMessage {
308
- type: "generation_complete";
309
- /** Total number of chunks produced by the run. */
310
- total_chunks: number;
311
- }
312
- type LingbotMessage = LingbotStateMessage | LingbotCommandErrorMessage | LingbotChunkCompleteMessage | LingbotImageAcceptedMessage | LingbotPromptAcceptedMessage | LingbotConditionsReadyMessage | LingbotGenerationResetMessage | LingbotGenerationPausedMessage | LingbotGenerationResumedMessage | LingbotGenerationStartedMessage | LingbotGenerationCompleteMessage;
313
- /** Options for creating a LingbotModel (model name is set automatically). */
314
- interface LingbotOptions {
315
- apiUrl?: string;
316
- local?: boolean;
317
- }
318
- /**
319
- * Strongly-typed client for the Lingbot model.
320
- *
321
- * Creates a Reactor connection with the model name pre-configured.
322
- * Provides typed methods for every event and typed message listeners.
323
- */
324
- declare class LingbotModel {
325
- readonly reactor: Reactor;
326
- constructor(options?: LingbotOptions);
327
- connect(jwtToken?: string): Promise<void>;
328
- disconnect(): Promise<void>;
329
- /** Pause generation after the current chunk finishes. Frames stop streaming on `main_video` until `resume` is called. Requires generation to be active. Emits `generation_paused` and `state` on success, or `command_error` if not generating or already paused. */
330
- pause(): Promise<void>;
331
- /** Abort the current run, clear the active prompt and reference image, and return to the waiting state. Valid at any time. After `reset`, call `set_prompt` and `set_image` again before `start` to begin a new session. Emits `generation_reset` and `state`. */
332
- reset(): Promise<void>;
333
- /** Begin generating video on `main_video`. Requires both a prompt (via `set_prompt`) and a reference image (via `set_image`). Emits `generation_started` and `state` on success, or `command_error` if a precondition is missing. Has no effect while already generating. */
334
- start(): Promise<void>;
335
- /** Resume generation from a previous `pause`. Requires the session to be paused. Emits `generation_resumed` and `state` on success, or `command_error` if not paused. */
336
- resume(): Promise<void>;
337
- /**
338
- * Set seed
339
- * @param params - Set seed
340
- */
341
- setSeed(params: LingbotSetSeedParams): Promise<void>;
342
- /**
343
- * Provide a reference image that anchors generation (image-to-video). Call before `start`; the image is required for generation to begin. Changes during generation have no effect until `reset` is issued and `start` is called again. Emits `image_accepted`, `conditions_ready`, and `state` on success, or `command_error` if the file is missing, not an image, or cannot be decoded.
344
- * @param params - Provide a reference image that anchors generation (image-to-video). Call before `start`; the image is required for generation to begin. Changes during generation have no effect until `reset` is issued and `start` is called again. Emits `image_accepted`, `conditions_ready`, and `state` on success, or `command_error` if the file is missing, not an image, or cannot be decoded.
345
- */
346
- setImage(params: LingbotSetImageParams): Promise<void>;
347
- /**
348
- * Set the scene prompt. Valid at any time — call before `start` to arm generation, or hot-swap during generation to steer the next chunk. Emits `prompt_accepted`, `conditions_ready`, and `state` on success.
349
- * @param params - Set the scene prompt. Valid at any time — call before `start` to arm generation, or hot-swap during generation to steer the next chunk. Emits `prompt_accepted`, `conditions_ready`, and `state` on success.
350
- */
351
- setPrompt(params: LingbotSetPromptParams): Promise<void>;
352
- /**
353
- * Set movement
354
- * @param params - Set movement
355
- */
356
- setMovement(params: LingbotSetMovementParams): Promise<void>;
357
- /**
358
- * Set look_vertical
359
- * @param params - Set look_vertical
360
- */
361
- setLookVertical(params: LingbotSetLookVerticalParams): Promise<void>;
362
- /**
363
- * Set look_horizontal
364
- * @param params - Set look_horizontal
365
- */
366
- setLookHorizontal(params: LingbotSetLookHorizontalParams): Promise<void>;
367
- /**
368
- * Set rotation_speed_deg
369
- * @param params - Set rotation_speed_deg
370
- */
371
- setRotationSpeedDeg(params: LingbotSetRotationSpeedDegParams): Promise<void>;
372
- /**
373
- * Subscribe to typed model messages.
374
- * @param handler - Called with a discriminated LingbotMessage
375
- * @returns Unsubscribe function
376
- */
377
- onMessage(handler: (message: LingbotMessage) => void): () => void;
378
- /**
379
- * Subscribe to "state" messages only.
380
- * @returns Unsubscribe function
381
- */
382
- onState(handler: (message: LingbotStateMessage) => void): () => void;
383
- /**
384
- * Subscribe to "command_error" messages only.
385
- * @returns Unsubscribe function
386
- */
387
- onCommandError(handler: (message: LingbotCommandErrorMessage) => void): () => void;
388
- /**
389
- * Subscribe to "chunk_complete" messages only.
390
- * @returns Unsubscribe function
391
- */
392
- onChunkComplete(handler: (message: LingbotChunkCompleteMessage) => void): () => void;
393
- /**
394
- * Subscribe to "image_accepted" messages only.
395
- * @returns Unsubscribe function
396
- */
397
- onImageAccepted(handler: (message: LingbotImageAcceptedMessage) => void): () => void;
398
- /**
399
- * Subscribe to "prompt_accepted" messages only.
400
- * @returns Unsubscribe function
401
- */
402
- onPromptAccepted(handler: (message: LingbotPromptAcceptedMessage) => void): () => void;
403
- /**
404
- * Subscribe to "conditions_ready" messages only.
405
- * @returns Unsubscribe function
406
- */
407
- onConditionsReady(handler: (message: LingbotConditionsReadyMessage) => void): () => void;
408
- /**
409
- * Subscribe to "generation_reset" messages only.
410
- * @returns Unsubscribe function
411
- */
412
- onGenerationReset(handler: (message: LingbotGenerationResetMessage) => void): () => void;
413
- /**
414
- * Subscribe to "generation_paused" messages only.
415
- * @returns Unsubscribe function
416
- */
417
- onGenerationPaused(handler: (message: LingbotGenerationPausedMessage) => void): () => void;
418
- /**
419
- * Subscribe to "generation_resumed" messages only.
420
- * @returns Unsubscribe function
421
- */
422
- onGenerationResumed(handler: (message: LingbotGenerationResumedMessage) => void): () => void;
423
- /**
424
- * Subscribe to "generation_started" messages only.
425
- * @returns Unsubscribe function
426
- */
427
- onGenerationStarted(handler: (message: LingbotGenerationStartedMessage) => void): () => void;
428
- /**
429
- * Subscribe to "generation_complete" messages only.
430
- * @returns Unsubscribe function
431
- */
432
- onGenerationComplete(handler: (message: LingbotGenerationCompleteMessage) => void): () => void;
433
- /**
434
- * Upload a file and get a FileRef for use in events.
435
- * @param file - File or Blob to upload
436
- * @param options - Optional name override
437
- */
438
- uploadFile(file: File | Blob, options?: {
439
- name?: string;
440
- }): Promise<FileRef>;
441
- /**
442
- * Subscribe to the "main_video" recvonly video track the model publishes.
443
- *
444
- * The handler fires once the model starts publishing this track; it receives the live MediaStreamTrack and the parent MediaStream (useful for attaching to a `<video>` / `<audio>` element via `srcObject`).
445
- * @param handler - Called with the received track and its stream
446
- * @returns Unsubscribe function
447
- */
448
- onMainVideo(handler: (track: MediaStreamTrack, stream: MediaStream) => void): () => void;
449
- }
450
-
451
- export { type LingbotChunkCompleteMessage, type LingbotCommandErrorMessage, type LingbotConditionsReadyMessage, type LingbotGenerationCompleteMessage, type LingbotGenerationPausedMessage, type LingbotGenerationResetMessage, type LingbotGenerationResumedMessage, type LingbotGenerationStartedMessage, type LingbotImageAcceptedMessage, LingbotMainVideoView, type LingbotMainVideoViewProps, type LingbotMessage, LingbotModel, type LingbotOptions, type LingbotPromptAcceptedMessage, LingbotProvider, type LingbotProviderProps, type LingbotRecvTrackName, type LingbotSetImageParams, type LingbotSetLookHorizontalParams, type LingbotSetLookVerticalParams, type LingbotSetMovementParams, type LingbotSetPromptParams, type LingbotSetRotationSpeedDegParams, type LingbotSetSeedParams, type LingbotStateMessage, LingbotTracks, MODEL_NAME, MODEL_VERSION, useLingbot, useLingbotChunkComplete, useLingbotCommandError, useLingbotConditionsReady, useLingbotGenerationComplete, useLingbotGenerationPaused, useLingbotGenerationReset, useLingbotGenerationResumed, useLingbotGenerationStarted, useLingbotImageAccepted, useLingbotMessage, useLingbotPromptAccepted, useLingbotState, useLingbotTrack };
4
+ import 'react';