@reactor-models/lingbot-world-2 0.2.5
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 +1084 -0
- package/dist/chunk-GS3BM4VC.mjs +247 -0
- package/dist/chunk-GS3BM4VC.mjs.map +1 -0
- package/dist/chunk-NTXVRMPF.mjs +205 -0
- package/dist/chunk-NTXVRMPF.mjs.map +1 -0
- package/dist/core.d.mts +370 -0
- package/dist/core.d.ts +370 -0
- package/dist/core.js +275 -0
- package/dist/core.js.map +1 -0
- package/dist/core.mjs +15 -0
- package/dist/core.mjs.map +1 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +485 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +49 -0
- package/dist/index.mjs.map +1 -0
- package/dist/react.d.mts +150 -0
- package/dist/react.d.ts +150 -0
- package/dist/react.js +244 -0
- package/dist/react.js.map +1 -0
- package/dist/react.mjs +39 -0
- package/dist/react.mjs.map +1 -0
- package/package.json +54 -0
package/dist/core.d.mts
ADDED
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
import { Reactor, FileRef } from '@reactor-team/js-sdk';
|
|
2
|
+
export { FileRef } from '@reactor-team/js-sdk';
|
|
3
|
+
|
|
4
|
+
declare const MODEL_NAME: "reactor/lingbot-world-2";
|
|
5
|
+
declare const MODEL_VERSION: "v0.2.5";
|
|
6
|
+
/**
|
|
7
|
+
* Preset media tracks for the LingbotWorld2 model.
|
|
8
|
+
*
|
|
9
|
+
* Declared in the model's OpenAPI schema and passed to the SDK as
|
|
10
|
+
* `modelTracks` so the transport can prepare the SDP offer in
|
|
11
|
+
* parallel with session polling (faster first-frame latency).
|
|
12
|
+
*/
|
|
13
|
+
declare const LingbotWorld2Tracks: readonly [{
|
|
14
|
+
readonly name: "main_video";
|
|
15
|
+
readonly kind: "video";
|
|
16
|
+
readonly direction: "recvonly";
|
|
17
|
+
}];
|
|
18
|
+
/** Track names the client can subscribe to (recvonly, from the client's perspective). */
|
|
19
|
+
type LingbotWorld2RecvTrackName = "main_video";
|
|
20
|
+
/** Set seed */
|
|
21
|
+
interface LingbotWorld2SetSeedParams {
|
|
22
|
+
/**
|
|
23
|
+
* 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`.
|
|
24
|
+
* @minimum 0
|
|
25
|
+
* @default 42
|
|
26
|
+
*/
|
|
27
|
+
seed?: number;
|
|
28
|
+
}
|
|
29
|
+
/** 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. */
|
|
30
|
+
interface LingbotWorld2SetImageParams {
|
|
31
|
+
/**
|
|
32
|
+
* Reference to a file uploaded via the Reactor presigned-URL protocol.
|
|
33
|
+
* @default null
|
|
34
|
+
*/
|
|
35
|
+
image?: FileRef;
|
|
36
|
+
}
|
|
37
|
+
/** 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. */
|
|
38
|
+
interface LingbotWorld2SetPromptParams {
|
|
39
|
+
/**
|
|
40
|
+
* 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.
|
|
41
|
+
* @default ""
|
|
42
|
+
*/
|
|
43
|
+
prompt?: string;
|
|
44
|
+
}
|
|
45
|
+
/** Set attn_window */
|
|
46
|
+
interface LingbotWorld2SetAttnWindowParams {
|
|
47
|
+
/**
|
|
48
|
+
* Manual override for the DiT self-attention window. `auto` uses the motion-based still-window trigger (unchanged default behavior); `small` forces the still (small) window; `large` forces the moving (large) window. Can be changed at any time; the new value applies to the next chunk.
|
|
49
|
+
* @default "auto"
|
|
50
|
+
*/
|
|
51
|
+
attn_window?: "auto" | "small" | "large";
|
|
52
|
+
}
|
|
53
|
+
/** Set camera_pose */
|
|
54
|
+
interface LingbotWorld2SetCameraPoseParams {
|
|
55
|
+
/**
|
|
56
|
+
* Native camera-pose layer: a flat list of per-frame motion deltas, length a multiple of 6 — `[rx, ry, rz, tx, ty, tz]` per frame (small Euler-radian rotation + translation, in the camera-local frame). 6 floats = one delta applied to the whole chunk; 6*chunk_size = one delta per latent frame; any other 6*k is resampled to chunk_size. When active, rotation OVERRIDES look_horizontal / look_vertical and translation ADDS to WASD movement. Inputs are sanitized (NaN/Inf→0, rotations clamped to ±pi, translation to ±100), so any payload is safe. Pass an empty list (or omit) to deactivate.
|
|
57
|
+
* @maxLength 1536
|
|
58
|
+
* @default null
|
|
59
|
+
*/
|
|
60
|
+
camera_pose?: unknown[];
|
|
61
|
+
}
|
|
62
|
+
/** Set move_lateral */
|
|
63
|
+
interface LingbotWorld2SetMoveLateralParams {
|
|
64
|
+
/**
|
|
65
|
+
* Lateral (strafe left/right) camera translation. `idle` holds position; `strafe_left` / `strafe_right` translate sideways. Independent of `move_longitudinal` — both can be active together for diagonal movement. Can be changed at any time; the new value applies to the next chunk.
|
|
66
|
+
* @default "idle"
|
|
67
|
+
*/
|
|
68
|
+
move_lateral?: "idle" | "strafe_left" | "strafe_right";
|
|
69
|
+
}
|
|
70
|
+
/** Set look_vertical */
|
|
71
|
+
interface LingbotWorld2SetLookVerticalParams {
|
|
72
|
+
/**
|
|
73
|
+
* 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.
|
|
74
|
+
* @default "idle"
|
|
75
|
+
*/
|
|
76
|
+
look_vertical?: "idle" | "up" | "down";
|
|
77
|
+
}
|
|
78
|
+
/** Set look_horizontal */
|
|
79
|
+
interface LingbotWorld2SetLookHorizontalParams {
|
|
80
|
+
/**
|
|
81
|
+
* 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.
|
|
82
|
+
* @default "idle"
|
|
83
|
+
*/
|
|
84
|
+
look_horizontal?: "idle" | "left" | "right";
|
|
85
|
+
}
|
|
86
|
+
/** Set move_longitudinal */
|
|
87
|
+
interface LingbotWorld2SetMoveLongitudinalParams {
|
|
88
|
+
/**
|
|
89
|
+
* Longitudinal (forward/back) camera translation. `idle` holds position; `forward` / `back` translate along the look axis. Independent of `move_lateral` — both can be active together for diagonal movement. Can be changed at any time; the new value applies to the next chunk.
|
|
90
|
+
* @default "idle"
|
|
91
|
+
*/
|
|
92
|
+
move_longitudinal?: "idle" | "forward" | "back";
|
|
93
|
+
}
|
|
94
|
+
/** Set rotation_speed_deg */
|
|
95
|
+
interface LingbotWorld2SetRotationSpeedDegParams {
|
|
96
|
+
/**
|
|
97
|
+
* 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.
|
|
98
|
+
* @minimum 0
|
|
99
|
+
* @maximum 30
|
|
100
|
+
* @default 5
|
|
101
|
+
*/
|
|
102
|
+
rotation_speed_deg?: number;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Snapshot of the session's observable state.
|
|
106
|
+
*
|
|
107
|
+
* 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.
|
|
108
|
+
*/
|
|
109
|
+
interface LingbotWorld2StateMessage {
|
|
110
|
+
type: "state";
|
|
111
|
+
/** 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`. */
|
|
112
|
+
seed: number;
|
|
113
|
+
/** True while generation is paused via `pause`. */
|
|
114
|
+
paused: boolean;
|
|
115
|
+
/** 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. */
|
|
116
|
+
running: boolean;
|
|
117
|
+
/** 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. */
|
|
118
|
+
started: boolean;
|
|
119
|
+
/** True once a reference image has been set for the session. */
|
|
120
|
+
has_image: boolean;
|
|
121
|
+
/** True once a prompt has been set for the session. */
|
|
122
|
+
has_prompt: boolean;
|
|
123
|
+
/** Current value of the `move_lateral` input field. */
|
|
124
|
+
move_lateral: string;
|
|
125
|
+
/** Zero-based index of the last completed chunk. `0` before the first chunk has completed, and resets to `0` on `reset`. */
|
|
126
|
+
current_chunk: number;
|
|
127
|
+
/** Current value of the `look_vertical` input field. */
|
|
128
|
+
look_vertical: string;
|
|
129
|
+
/** Composite action string derived from `move_longitudinal`, `move_lateral`, `look_horizontal`, and `look_vertical` — a `+`-joined combination of `w`/`s`/`a`/`d` and `left`/`right`/`up`/`down`, or `still` when idle. */
|
|
130
|
+
current_action: string;
|
|
131
|
+
/** The prompt currently driving generation, or `null` if no prompt has been set for the session. */
|
|
132
|
+
current_prompt: unknown;
|
|
133
|
+
/** Current value of the `look_horizontal` input field. */
|
|
134
|
+
look_horizontal: string;
|
|
135
|
+
/** Current value of the `move_longitudinal` input field. */
|
|
136
|
+
move_longitudinal: string;
|
|
137
|
+
/** True when a non-empty `camera_pose` has been set. */
|
|
138
|
+
camera_pose_active: boolean;
|
|
139
|
+
/** Current value of the `rotation_speed_deg` input field (0.0 – 30.0). */
|
|
140
|
+
rotation_speed_deg: number;
|
|
141
|
+
}
|
|
142
|
+
/** Emitted when a command is rejected because preconditions are not met or its arguments could not be processed. */
|
|
143
|
+
interface LingbotWorld2CommandErrorMessage {
|
|
144
|
+
type: "command_error";
|
|
145
|
+
/** Human-readable explanation of why the command was rejected. */
|
|
146
|
+
reason: string;
|
|
147
|
+
/** Name of the command that was rejected. */
|
|
148
|
+
command: string;
|
|
149
|
+
}
|
|
150
|
+
/** Emitted once per completed chunk of `main_video`. */
|
|
151
|
+
interface LingbotWorld2ChunkCompleteMessage {
|
|
152
|
+
type: "chunk_complete";
|
|
153
|
+
/** Zero-based index of the chunk that just completed. */
|
|
154
|
+
chunk_index: number;
|
|
155
|
+
/** The composite action string used to drive this chunk — a `+`-joined combination of translation (`w`/`s`/`a`/`d`) and look directions (`left`/`right`/`up`/`down`), or `still` when the camera is stationary. */
|
|
156
|
+
active_action: string;
|
|
157
|
+
/** The prompt that was active while this chunk was generated. */
|
|
158
|
+
active_prompt: string;
|
|
159
|
+
/** Number of pixel frames emitted by this chunk. */
|
|
160
|
+
frames_emitted: number;
|
|
161
|
+
}
|
|
162
|
+
/** Emitted after `set_image` successfully decodes the uploaded file. */
|
|
163
|
+
interface LingbotWorld2ImageAcceptedMessage {
|
|
164
|
+
type: "image_accepted";
|
|
165
|
+
/** Width in pixels of the decoded reference image. */
|
|
166
|
+
width: number;
|
|
167
|
+
/** Height in pixels of the decoded reference image. */
|
|
168
|
+
height: number;
|
|
169
|
+
}
|
|
170
|
+
/** Emitted after `set_prompt` is accepted. */
|
|
171
|
+
interface LingbotWorld2PromptAcceptedMessage {
|
|
172
|
+
type: "prompt_accepted";
|
|
173
|
+
/** The prompt text that was accepted. */
|
|
174
|
+
prompt: string;
|
|
175
|
+
}
|
|
176
|
+
/** Emitted after `set_prompt` or `set_image` so the client can tell at a glance whether `start` will succeed. */
|
|
177
|
+
interface LingbotWorld2ConditionsReadyMessage {
|
|
178
|
+
type: "conditions_ready";
|
|
179
|
+
/** True once a reference image has been set for the session. */
|
|
180
|
+
has_image: boolean;
|
|
181
|
+
/** True once a prompt has been set for the session. */
|
|
182
|
+
has_prompt: boolean;
|
|
183
|
+
}
|
|
184
|
+
/** Emitted after `reset` clears session state and returns to the waiting state. */
|
|
185
|
+
interface LingbotWorld2GenerationResetMessage {
|
|
186
|
+
type: "generation_reset";
|
|
187
|
+
/** Short human-readable reason the reset was issued. */
|
|
188
|
+
reason: string;
|
|
189
|
+
}
|
|
190
|
+
/** Emitted in response to `pause`, once the current chunk finishes. */
|
|
191
|
+
interface LingbotWorld2GenerationPausedMessage {
|
|
192
|
+
type: "generation_paused";
|
|
193
|
+
/** Index of the last completed chunk before pausing. */
|
|
194
|
+
chunk_index: number;
|
|
195
|
+
}
|
|
196
|
+
/** Emitted in response to `resume` when leaving the paused state. */
|
|
197
|
+
interface LingbotWorld2GenerationResumedMessage {
|
|
198
|
+
type: "generation_resumed";
|
|
199
|
+
/** Index of the last completed chunk before resuming. */
|
|
200
|
+
chunk_index: number;
|
|
201
|
+
}
|
|
202
|
+
/** Emitted once when `start` succeeds and frames begin streaming. */
|
|
203
|
+
interface LingbotWorld2GenerationStartedMessage {
|
|
204
|
+
type: "generation_started";
|
|
205
|
+
/** The prompt active at the start of generation. */
|
|
206
|
+
prompt: string;
|
|
207
|
+
/** Total number of chunks the run will produce before `generation_complete` fires. */
|
|
208
|
+
chunk_num: number;
|
|
209
|
+
/** Total number of pixel frames the run will emit on `main_video` before `generation_complete`. */
|
|
210
|
+
frame_num: number;
|
|
211
|
+
}
|
|
212
|
+
/** 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. */
|
|
213
|
+
interface LingbotWorld2GenerationCompleteMessage {
|
|
214
|
+
type: "generation_complete";
|
|
215
|
+
/** Total number of chunks produced by the run. */
|
|
216
|
+
total_chunks: number;
|
|
217
|
+
}
|
|
218
|
+
type LingbotWorld2Message = LingbotWorld2StateMessage | LingbotWorld2CommandErrorMessage | LingbotWorld2ChunkCompleteMessage | LingbotWorld2ImageAcceptedMessage | LingbotWorld2PromptAcceptedMessage | LingbotWorld2ConditionsReadyMessage | LingbotWorld2GenerationResetMessage | LingbotWorld2GenerationPausedMessage | LingbotWorld2GenerationResumedMessage | LingbotWorld2GenerationStartedMessage | LingbotWorld2GenerationCompleteMessage;
|
|
219
|
+
/**
|
|
220
|
+
* Options for creating a LingbotWorld2Model (model name is set automatically).
|
|
221
|
+
*
|
|
222
|
+
* Derived from `Reactor`'s own constructor options with `modelName`
|
|
223
|
+
* and `modelTracks` removed — those are supplied by this class.
|
|
224
|
+
* Any new option the SDK adds appears here automatically on the
|
|
225
|
+
* next `defaultSdkVersion` bump.
|
|
226
|
+
*/
|
|
227
|
+
type LingbotWorld2Options = Omit<ConstructorParameters<typeof Reactor>[0], "modelName" | "modelTracks">;
|
|
228
|
+
/**
|
|
229
|
+
* Strongly-typed client for the LingbotWorld2 model.
|
|
230
|
+
*
|
|
231
|
+
* Extends {@link Reactor} with the model name (and modelTracks) baked into the
|
|
232
|
+
* constructor, so every public method on Reactor — `connect`, `disconnect`,
|
|
233
|
+
* `sendCommand`, `on`/`off`, `getStats`, `publishTrack`/`unpublishTrack`,
|
|
234
|
+
* etc. — is reachable directly on the instance. The schema-derived sugar
|
|
235
|
+
* below adds typed wrappers for every declared event, message, and track.
|
|
236
|
+
*/
|
|
237
|
+
declare class LingbotWorld2Model extends Reactor {
|
|
238
|
+
constructor(options?: LingbotWorld2Options);
|
|
239
|
+
/** @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. */
|
|
240
|
+
get reactor(): this;
|
|
241
|
+
/** 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. */
|
|
242
|
+
pause(): Promise<void>;
|
|
243
|
+
/** 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`. */
|
|
244
|
+
reset(): Promise<void>;
|
|
245
|
+
/** 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. */
|
|
246
|
+
start(): Promise<void>;
|
|
247
|
+
/** 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. */
|
|
248
|
+
resume(): Promise<void>;
|
|
249
|
+
/**
|
|
250
|
+
* Set seed
|
|
251
|
+
* @param params - Set seed
|
|
252
|
+
*/
|
|
253
|
+
setSeed(params: LingbotWorld2SetSeedParams): Promise<void>;
|
|
254
|
+
/**
|
|
255
|
+
* 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.
|
|
256
|
+
* @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.
|
|
257
|
+
*/
|
|
258
|
+
setImage(params: LingbotWorld2SetImageParams): Promise<void>;
|
|
259
|
+
/**
|
|
260
|
+
* 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.
|
|
261
|
+
* @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.
|
|
262
|
+
*/
|
|
263
|
+
setPrompt(params: LingbotWorld2SetPromptParams): Promise<void>;
|
|
264
|
+
/**
|
|
265
|
+
* Set attn_window
|
|
266
|
+
* @param params - Set attn_window
|
|
267
|
+
*/
|
|
268
|
+
setAttnWindow(params: LingbotWorld2SetAttnWindowParams): Promise<void>;
|
|
269
|
+
/**
|
|
270
|
+
* Set camera_pose
|
|
271
|
+
* @param params - Set camera_pose
|
|
272
|
+
*/
|
|
273
|
+
setCameraPose(params: LingbotWorld2SetCameraPoseParams): Promise<void>;
|
|
274
|
+
/**
|
|
275
|
+
* Set move_lateral
|
|
276
|
+
* @param params - Set move_lateral
|
|
277
|
+
*/
|
|
278
|
+
setMoveLateral(params: LingbotWorld2SetMoveLateralParams): Promise<void>;
|
|
279
|
+
/**
|
|
280
|
+
* Set look_vertical
|
|
281
|
+
* @param params - Set look_vertical
|
|
282
|
+
*/
|
|
283
|
+
setLookVertical(params: LingbotWorld2SetLookVerticalParams): Promise<void>;
|
|
284
|
+
/**
|
|
285
|
+
* Set look_horizontal
|
|
286
|
+
* @param params - Set look_horizontal
|
|
287
|
+
*/
|
|
288
|
+
setLookHorizontal(params: LingbotWorld2SetLookHorizontalParams): Promise<void>;
|
|
289
|
+
/**
|
|
290
|
+
* Set move_longitudinal
|
|
291
|
+
* @param params - Set move_longitudinal
|
|
292
|
+
*/
|
|
293
|
+
setMoveLongitudinal(params: LingbotWorld2SetMoveLongitudinalParams): Promise<void>;
|
|
294
|
+
/**
|
|
295
|
+
* Set rotation_speed_deg
|
|
296
|
+
* @param params - Set rotation_speed_deg
|
|
297
|
+
*/
|
|
298
|
+
setRotationSpeedDeg(params: LingbotWorld2SetRotationSpeedDegParams): Promise<void>;
|
|
299
|
+
/**
|
|
300
|
+
* Subscribe to typed model messages.
|
|
301
|
+
* @param handler - Called with a discriminated LingbotWorld2Message
|
|
302
|
+
* @returns Unsubscribe function
|
|
303
|
+
*/
|
|
304
|
+
onMessage(handler: (message: LingbotWorld2Message) => void): () => void;
|
|
305
|
+
/**
|
|
306
|
+
* Subscribe to "state" messages only.
|
|
307
|
+
* @returns Unsubscribe function
|
|
308
|
+
*/
|
|
309
|
+
onState(handler: (message: LingbotWorld2StateMessage) => void): () => void;
|
|
310
|
+
/**
|
|
311
|
+
* Subscribe to "command_error" messages only.
|
|
312
|
+
* @returns Unsubscribe function
|
|
313
|
+
*/
|
|
314
|
+
onCommandError(handler: (message: LingbotWorld2CommandErrorMessage) => void): () => void;
|
|
315
|
+
/**
|
|
316
|
+
* Subscribe to "chunk_complete" messages only.
|
|
317
|
+
* @returns Unsubscribe function
|
|
318
|
+
*/
|
|
319
|
+
onChunkComplete(handler: (message: LingbotWorld2ChunkCompleteMessage) => void): () => void;
|
|
320
|
+
/**
|
|
321
|
+
* Subscribe to "image_accepted" messages only.
|
|
322
|
+
* @returns Unsubscribe function
|
|
323
|
+
*/
|
|
324
|
+
onImageAccepted(handler: (message: LingbotWorld2ImageAcceptedMessage) => void): () => void;
|
|
325
|
+
/**
|
|
326
|
+
* Subscribe to "prompt_accepted" messages only.
|
|
327
|
+
* @returns Unsubscribe function
|
|
328
|
+
*/
|
|
329
|
+
onPromptAccepted(handler: (message: LingbotWorld2PromptAcceptedMessage) => void): () => void;
|
|
330
|
+
/**
|
|
331
|
+
* Subscribe to "conditions_ready" messages only.
|
|
332
|
+
* @returns Unsubscribe function
|
|
333
|
+
*/
|
|
334
|
+
onConditionsReady(handler: (message: LingbotWorld2ConditionsReadyMessage) => void): () => void;
|
|
335
|
+
/**
|
|
336
|
+
* Subscribe to "generation_reset" messages only.
|
|
337
|
+
* @returns Unsubscribe function
|
|
338
|
+
*/
|
|
339
|
+
onGenerationReset(handler: (message: LingbotWorld2GenerationResetMessage) => void): () => void;
|
|
340
|
+
/**
|
|
341
|
+
* Subscribe to "generation_paused" messages only.
|
|
342
|
+
* @returns Unsubscribe function
|
|
343
|
+
*/
|
|
344
|
+
onGenerationPaused(handler: (message: LingbotWorld2GenerationPausedMessage) => void): () => void;
|
|
345
|
+
/**
|
|
346
|
+
* Subscribe to "generation_resumed" messages only.
|
|
347
|
+
* @returns Unsubscribe function
|
|
348
|
+
*/
|
|
349
|
+
onGenerationResumed(handler: (message: LingbotWorld2GenerationResumedMessage) => void): () => void;
|
|
350
|
+
/**
|
|
351
|
+
* Subscribe to "generation_started" messages only.
|
|
352
|
+
* @returns Unsubscribe function
|
|
353
|
+
*/
|
|
354
|
+
onGenerationStarted(handler: (message: LingbotWorld2GenerationStartedMessage) => void): () => void;
|
|
355
|
+
/**
|
|
356
|
+
* Subscribe to "generation_complete" messages only.
|
|
357
|
+
* @returns Unsubscribe function
|
|
358
|
+
*/
|
|
359
|
+
onGenerationComplete(handler: (message: LingbotWorld2GenerationCompleteMessage) => void): () => void;
|
|
360
|
+
/**
|
|
361
|
+
* Subscribe to the "main_video" recvonly video track the model publishes.
|
|
362
|
+
*
|
|
363
|
+
* 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`).
|
|
364
|
+
* @param handler - Called with the received track and its stream
|
|
365
|
+
* @returns Unsubscribe function
|
|
366
|
+
*/
|
|
367
|
+
onMainVideo(handler: (track: MediaStreamTrack, stream: MediaStream) => void): () => void;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
export { type LingbotWorld2ChunkCompleteMessage, type LingbotWorld2CommandErrorMessage, type LingbotWorld2ConditionsReadyMessage, type LingbotWorld2GenerationCompleteMessage, type LingbotWorld2GenerationPausedMessage, type LingbotWorld2GenerationResetMessage, type LingbotWorld2GenerationResumedMessage, type LingbotWorld2GenerationStartedMessage, type LingbotWorld2ImageAcceptedMessage, type LingbotWorld2Message, LingbotWorld2Model, type LingbotWorld2Options, type LingbotWorld2PromptAcceptedMessage, type LingbotWorld2RecvTrackName, type LingbotWorld2SetAttnWindowParams, type LingbotWorld2SetCameraPoseParams, type LingbotWorld2SetImageParams, type LingbotWorld2SetLookHorizontalParams, type LingbotWorld2SetLookVerticalParams, type LingbotWorld2SetMoveLateralParams, type LingbotWorld2SetMoveLongitudinalParams, type LingbotWorld2SetPromptParams, type LingbotWorld2SetRotationSpeedDegParams, type LingbotWorld2SetSeedParams, type LingbotWorld2StateMessage, LingbotWorld2Tracks, MODEL_NAME, MODEL_VERSION };
|