@mengine/medeo-client 1.2.0 → 1.2.1-alpha.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.
@@ -0,0 +1,609 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/editor/schemas/add-speeches.d.ts
4
+ /**
5
+ * Add speeches (and their captions). TTS runs upstream; the stable speech /
6
+ * caption parts arrive materialized (see `speech-assets.ts`). The op writes the
7
+ * parts and each speech's `{ mode:'anchored', anchorPartId, offsetMs }` fact
8
+ * verbatim — no write-time host-picking, no cascade (RFC 02 §4). The projection
9
+ * derives absolute positions on read.
10
+ */
11
+ declare const addSpeechesInputSchema: z.ZodObject<{
12
+ speeches: z.ZodArray<z.ZodObject<{
13
+ speech_id: z.ZodString;
14
+ anchor_part_id: z.ZodString;
15
+ offset_ms: z.ZodNumber;
16
+ audio_storage_key: z.ZodString;
17
+ duration_ms: z.ZodNumber;
18
+ audio_script: z.ZodString;
19
+ volume: z.ZodNumber;
20
+ voice: z.ZodObject<{
21
+ id: z.ZodString;
22
+ name: z.ZodString;
23
+ }, z.core.$strip>;
24
+ origin_speech_id: z.ZodString;
25
+ caption_ids: z.ZodArray<z.ZodString>;
26
+ }, z.core.$strip>>;
27
+ captions: z.ZodArray<z.ZodObject<{
28
+ caption_id: z.ZodString;
29
+ speech_part_id: z.ZodString;
30
+ text: z.ZodString;
31
+ start_ms: z.ZodNumber;
32
+ duration_ms: z.ZodNumber;
33
+ }, z.core.$strip>>;
34
+ }, z.core.$strip>;
35
+ type AddSpeechesInput = z.infer<typeof addSpeechesInputSchema>;
36
+ //#endregion
37
+ //#region src/editor/schemas/add-video-clips.d.ts
38
+ /**
39
+ * Add video clips to a track. Each clip's duration facts are separated so a
40
+ * single number is never overloaded (RFC 02 / `reference/16` §0b):
41
+ *
42
+ * - `media_duration_ms` is the source media's intrinsic full length (a resource
43
+ * fact, written to the part);
44
+ * - `play_in` / `play_out` are the optional trim window into that media; when
45
+ * omitted the whole media is used (`play_in=0`, `play_out=media_duration_ms`).
46
+ *
47
+ * The clip's effective timeline duration is derived by the projection from the
48
+ * trim window and `speed_shift` — it is never an input here.
49
+ */
50
+ declare const addVideoClipsInputSchema: z.ZodObject<{
51
+ clips: z.ZodArray<z.ZodObject<{
52
+ media_id: z.ZodString;
53
+ start_ms: z.ZodOptional<z.ZodNumber>;
54
+ media_duration_ms: z.ZodNumber;
55
+ play_in: z.ZodOptional<z.ZodNumber>;
56
+ play_out: z.ZodOptional<z.ZodNumber>;
57
+ track_id: z.ZodOptional<z.ZodString>;
58
+ }, z.core.$strip>>;
59
+ before_clip_id: z.ZodOptional<z.ZodString>;
60
+ after_clip_id: z.ZodOptional<z.ZodString>;
61
+ }, z.core.$strip>;
62
+ type AddVideoClipsInput = z.infer<typeof addVideoClipsInputSchema>;
63
+ //#endregion
64
+ //#region src/editor/schemas/adjust-bgm-volume.d.ts
65
+ declare const adjustBgmVolumeInputSchema: z.ZodObject<{
66
+ bgm: z.ZodArray<z.ZodObject<{
67
+ bgm_id: z.ZodString;
68
+ volume: z.ZodNumber;
69
+ }, z.core.$strip>>;
70
+ }, z.core.$strip>;
71
+ type AdjustBgmVolumeInput = z.infer<typeof adjustBgmVolumeInputSchema>;
72
+ //#endregion
73
+ //#region src/editor/schemas/adjust-speech-volume.d.ts
74
+ declare const adjustSpeechVolumeInputSchema: z.ZodObject<{
75
+ speeches: z.ZodArray<z.ZodObject<{
76
+ speech_id: z.ZodString;
77
+ volume: z.ZodNumber;
78
+ }, z.core.$strip>>;
79
+ }, z.core.$strip>;
80
+ type AdjustSpeechVolumeInput = z.infer<typeof adjustSpeechVolumeInputSchema>;
81
+ //#endregion
82
+ //#region src/editor/schemas/adjust-video-clip-duration.d.ts
83
+ /**
84
+ * Re-trim existing video clips (the user-facing "adjust duration" gesture is a
85
+ * trim of the source window). The new `play_in` / `play_out` are the facts; the
86
+ * effective timeline duration is derived from them and the clip's `speed_shift`,
87
+ * and the change reflows downstream clips, speeches, and the timeline inside the
88
+ * op's transaction (no caller-materialized cascade).
89
+ */
90
+ declare const adjustVideoClipDurationInputSchema: z.ZodObject<{
91
+ clips: z.ZodArray<z.ZodObject<{
92
+ clip_id: z.ZodString;
93
+ play_in: z.ZodNumber;
94
+ play_out: z.ZodNumber;
95
+ }, z.core.$strip>>;
96
+ }, z.core.$strip>;
97
+ type AdjustVideoClipDurationInput = z.infer<typeof adjustVideoClipDurationInputSchema>;
98
+ //#endregion
99
+ //#region src/editor/schemas/adjust-video-clip-volume.d.ts
100
+ declare const adjustVideoClipVolumeInputSchema: z.ZodObject<{
101
+ clips: z.ZodArray<z.ZodObject<{
102
+ clip_id: z.ZodString;
103
+ volume: z.ZodNumber;
104
+ }, z.core.$strip>>;
105
+ }, z.core.$strip>;
106
+ type AdjustVideoClipVolumeInput = z.infer<typeof adjustVideoClipVolumeInputSchema>;
107
+ //#endregion
108
+ //#region src/editor/schemas/change-speech.d.ts
109
+ /**
110
+ * Change a speech's script or voice. Both re-run TTS upstream and return the
111
+ * regenerated speech / caption parts in the same materialized shape as
112
+ * `AddSpeeches` (`speech-assets.ts`); the op upserts them by id (the speech part
113
+ * id is preserved across a re-TTS), re-seats at `start_ms`, and reflows. Old
114
+ * caption parts no longer owned by the speech are removed via `caption_ids`.
115
+ */
116
+ declare const changeSpeechScriptInputSchema: z.ZodObject<{
117
+ speeches: z.ZodArray<z.ZodObject<{
118
+ speech_id: z.ZodString;
119
+ anchor_part_id: z.ZodString;
120
+ offset_ms: z.ZodNumber;
121
+ audio_storage_key: z.ZodString;
122
+ duration_ms: z.ZodNumber;
123
+ audio_script: z.ZodString;
124
+ volume: z.ZodNumber;
125
+ voice: z.ZodObject<{
126
+ id: z.ZodString;
127
+ name: z.ZodString;
128
+ }, z.core.$strip>;
129
+ origin_speech_id: z.ZodString;
130
+ caption_ids: z.ZodArray<z.ZodString>;
131
+ }, z.core.$strip>>;
132
+ captions: z.ZodArray<z.ZodObject<{
133
+ caption_id: z.ZodString;
134
+ speech_part_id: z.ZodString;
135
+ text: z.ZodString;
136
+ start_ms: z.ZodNumber;
137
+ duration_ms: z.ZodNumber;
138
+ }, z.core.$strip>>;
139
+ }, z.core.$strip>;
140
+ declare const changeSpeechVoiceInputSchema: z.ZodObject<{
141
+ speeches: z.ZodArray<z.ZodObject<{
142
+ speech_id: z.ZodString;
143
+ anchor_part_id: z.ZodString;
144
+ offset_ms: z.ZodNumber;
145
+ audio_storage_key: z.ZodString;
146
+ duration_ms: z.ZodNumber;
147
+ audio_script: z.ZodString;
148
+ volume: z.ZodNumber;
149
+ voice: z.ZodObject<{
150
+ id: z.ZodString;
151
+ name: z.ZodString;
152
+ }, z.core.$strip>;
153
+ origin_speech_id: z.ZodString;
154
+ caption_ids: z.ZodArray<z.ZodString>;
155
+ }, z.core.$strip>>;
156
+ captions: z.ZodArray<z.ZodObject<{
157
+ caption_id: z.ZodString;
158
+ speech_part_id: z.ZodString;
159
+ text: z.ZodString;
160
+ start_ms: z.ZodNumber;
161
+ duration_ms: z.ZodNumber;
162
+ }, z.core.$strip>>;
163
+ }, z.core.$strip>;
164
+ type ChangeSpeechScriptInput = z.infer<typeof changeSpeechScriptInputSchema>;
165
+ type ChangeSpeechVoiceInput = z.infer<typeof changeSpeechVoiceInputSchema>;
166
+ //#endregion
167
+ //#region src/editor/schemas/delete-bgm.d.ts
168
+ /**
169
+ * Remove the document BGM. Pure document edit: clears the bgm lane and removes
170
+ * the bgm part. Takes no input (a document holds at most one bgm); an empty
171
+ * object keeps the op signature uniform with the rest.
172
+ */
173
+ declare const deleteBgmInputSchema: z.ZodObject<{}, z.core.$strip>;
174
+ type DeleteBgmInput = z.infer<typeof deleteBgmInputSchema>;
175
+ //#endregion
176
+ //#region src/editor/schemas/delete-speeches.d.ts
177
+ /**
178
+ * Delete speeches with their captions. Pure document edit (no side effect): the
179
+ * op removes each speech part, cascade-deletes the captions it owns (via
180
+ * `caption_ids` / `speech_part_id`), drops their track items, and reflows.
181
+ */
182
+ declare const deleteSpeechesInputSchema: z.ZodObject<{
183
+ speech_ids: z.ZodArray<z.ZodString>;
184
+ }, z.core.$strip>;
185
+ type DeleteSpeechesInput = z.infer<typeof deleteSpeechesInputSchema>;
186
+ //#endregion
187
+ //#region src/editor/schemas/delete-video-clips.d.ts
188
+ /**
189
+ * How a delete handles the anchored subtree (speeches anchored to a deleted clip,
190
+ * and their captions) — a delete-op policy, not a data-model field (reference/17
191
+ * §6). `cascade` (default) removes the subtree; `detach` keeps the direct
192
+ * anchored children, re-pinning them to `absolute` so they stay on the timeline.
193
+ */
194
+ declare const anchoredDeletePolicySchema: z.ZodEnum<{
195
+ cascade: "cascade";
196
+ detach: "detach";
197
+ }>;
198
+ type AnchoredDeletePolicy = z.infer<typeof anchoredDeletePolicySchema>;
199
+ declare const deleteVideoClipsInputSchema: z.ZodObject<{
200
+ clip_ids: z.ZodArray<z.ZodString>;
201
+ on_anchored: z.ZodOptional<z.ZodEnum<{
202
+ cascade: "cascade";
203
+ detach: "detach";
204
+ }>>;
205
+ }, z.core.$strip>;
206
+ type DeleteVideoClipsInput = z.infer<typeof deleteVideoClipsInputSchema>;
207
+ //#endregion
208
+ //#region src/editor/schemas/move-speeches.d.ts
209
+ /**
210
+ * Move speeches in time. Pure document edit: the op re-seats each speech at its
211
+ * new absolute `start_ms`; the cascade reassigns it to the host video clip,
212
+ * resolves overlaps, and reflows. Captions follow their speech.
213
+ */
214
+ declare const moveSpeechesInputSchema: z.ZodObject<{
215
+ speeches: z.ZodArray<z.ZodObject<{
216
+ speech_id: z.ZodString;
217
+ new_start_ms: z.ZodNumber;
218
+ }, z.core.$strip>>;
219
+ }, z.core.$strip>;
220
+ type MoveSpeechesInput = z.infer<typeof moveSpeechesInputSchema>;
221
+ //#endregion
222
+ //#region src/editor/schemas/move-video-clips-by-anchor.d.ts
223
+ /**
224
+ * Where the moved block lands on the main track.
225
+ *
226
+ * A discriminated union rather than two optional `before_clip_id` /
227
+ * `after_clip_id` fields (the shape `addVideoClips` had to use, because there the
228
+ * two modes share a whole clip description): here the alternatives carry nothing
229
+ * in common, so making them mutually exclusive *by type* removes three runtime
230
+ * `superRefine` checks that would otherwise have to be written and tested.
231
+ *
232
+ * `track_start` is an explicit member, not the absence of an anchor. The
233
+ * agent-harness mutation this maps from treats "neither anchor given" as
234
+ * "move to the front" (`applyBatchMoveVideoClips` falls back to `insertIndex = 0`),
235
+ * which is a default buried in a tool description. Requiring the caller to name
236
+ * that intent keeps a forgotten field from silently reordering the timeline.
237
+ */
238
+ declare const moveAnchorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
239
+ position: z.ZodLiteral<"before">;
240
+ clip_id: z.ZodString;
241
+ }, z.core.$strip>, z.ZodObject<{
242
+ position: z.ZodLiteral<"after">;
243
+ clip_id: z.ZodString;
244
+ }, z.core.$strip>, z.ZodObject<{
245
+ position: z.ZodLiteral<"track_start">;
246
+ }, z.core.$strip>], "position">;
247
+ /**
248
+ * What happens to the speeches anchored to the clips being moved.
249
+ *
250
+ * - `follow` keeps each speech anchored where it is, so it travels with its clip
251
+ * to the new position. In the anchored model this is the *no-op* branch: a
252
+ * speech's authoritative fact is `{ anchorPartId, offsetMs }` and its absolute
253
+ * time is derived on read from the host's position, so moving the host moves
254
+ * the speech with no write to the speech at all.
255
+ * - `keep_absolute` preserves each speech's current absolute landing instead, then
256
+ * re-anchors it to whichever clip now covers that time (RFC 02 §9.1/§11.1). This
257
+ * is the branch that costs an extra pass, and the one the FE timeline uses.
258
+ *
259
+ * **Required, with no default**, matching `deleteVideoClips` and
260
+ * `replaceVideoClipSequence`. The two branches decide which picture the user's
261
+ * narration ends up over, which is too consequential to infer from a missing
262
+ * field — and neither branch is "safe enough" to be the implicit one.
263
+ */
264
+ declare const movedClipAnchoredPolicySchema: z.ZodEnum<{
265
+ follow: "follow";
266
+ keep_absolute: "keep_absolute";
267
+ }>;
268
+ /**
269
+ * Reorder a set of main-track clips relative to a reference clip.
270
+ *
271
+ * Distinct from `moveVideoClips`, which positions clips by absolute time
272
+ * (`new_start_ms`) and is what the FE timeline dispatches after a drag. Main-track
273
+ * clips are `sequential`-positioned, so absolute time is not authoritative state
274
+ * there (RFC 02 §4/§7): `moveVideoClips` has to *guess* an index back out of the
275
+ * time it was handed, whereas an anchor already is the ordinal fact being changed.
276
+ * Keeping them separate also isolates blast radius — this method can diverge on
277
+ * speech policy without touching the FE path.
278
+ *
279
+ * `clip_ids` need not be contiguous. They move as one block, keeping their
280
+ * relative order, which is the agent-harness `batch_move_video_clips` contract.
281
+ */
282
+ declare const moveVideoClipsByAnchorInputSchema: z.ZodObject<{
283
+ clip_ids: z.ZodArray<z.ZodString>;
284
+ anchor: z.ZodDiscriminatedUnion<[z.ZodObject<{
285
+ position: z.ZodLiteral<"before">;
286
+ clip_id: z.ZodString;
287
+ }, z.core.$strip>, z.ZodObject<{
288
+ position: z.ZodLiteral<"after">;
289
+ clip_id: z.ZodString;
290
+ }, z.core.$strip>, z.ZodObject<{
291
+ position: z.ZodLiteral<"track_start">;
292
+ }, z.core.$strip>], "position">;
293
+ on_anchored: z.ZodEnum<{
294
+ follow: "follow";
295
+ keep_absolute: "keep_absolute";
296
+ }>;
297
+ }, z.core.$strip>;
298
+ type MoveAnchor = z.infer<typeof moveAnchorSchema>;
299
+ type MovedClipAnchoredPolicy = z.infer<typeof movedClipAnchoredPolicySchema>;
300
+ type MoveVideoClipsByAnchorInput = z.infer<typeof moveVideoClipsByAnchorInputSchema>;
301
+ //#endregion
302
+ //#region src/editor/schemas/move-video-clips.d.ts
303
+ declare const moveVideoClipsInputSchema: z.ZodObject<{
304
+ clips: z.ZodArray<z.ZodObject<{
305
+ clip_id: z.ZodString;
306
+ new_start_ms: z.ZodNumber;
307
+ new_track_id: z.ZodOptional<z.ZodString>;
308
+ }, z.core.$strip>>;
309
+ }, z.core.$strip>;
310
+ type MoveVideoClipsInput = z.infer<typeof moveVideoClipsInputSchema>;
311
+ //#endregion
312
+ //#region src/editor/schemas/replace-video-clip-content.d.ts
313
+ /**
314
+ * Replace the media backing existing video clips. The media import runs upstream
315
+ * (Director); its stable result — the new media id, intrinsic length, and the
316
+ * reset trim window — arrives materialized (see
317
+ * `results/phase-4-side-effect-payload-contract.md` §4). Director resets
318
+ * `play_in=0` / `play_out=media_duration_ms` and clears `speed_shift` on
319
+ * replacement. The clip `part_id`s (hence their track items) are unchanged; the
320
+ * editor reflows the main track from the new effective durations.
321
+ */
322
+ declare const replaceVideoClipContentInputSchema: z.ZodObject<{
323
+ clips: z.ZodArray<z.ZodObject<{
324
+ clip_id: z.ZodString;
325
+ origin_media_id: z.ZodString;
326
+ media_duration_ms: z.ZodNumber;
327
+ play_in: z.ZodNumber;
328
+ play_out: z.ZodNumber;
329
+ volume: z.ZodNumber;
330
+ }, z.core.$strip>>;
331
+ }, z.core.$strip>;
332
+ type ReplaceVideoClipContentInput = z.infer<typeof replaceVideoClipContentInputSchema>;
333
+ //#endregion
334
+ //#region src/editor/schemas/replace-video-clip-sequence.d.ts
335
+ /**
336
+ * What happens to the speeches anchored to the clips being replaced.
337
+ *
338
+ * - `remap` re-anchors each surviving speech to the new clip in the SAME POSITION
339
+ * of the sequence, keeping its offset — old[i]'s children become new[i]'s
340
+ * children. An old clip with no counterpart (fewer new clips than old) has its
341
+ * subtree deleted, because there is nothing left to anchor to.
342
+ * - `cascade` deletes every anchored speech (and its captions) outright, like
343
+ * `deleteVideoClips`.
344
+ *
345
+ * **Required, with no default.** The two branches differ in whether the user's
346
+ * narration survives, and the agent tool that drives this op makes its
347
+ * `preserve_speeches` flag required for that reason. A default here would let a
348
+ * caller that forgot the field silently delete speech.
349
+ */
350
+ declare const anchoredReplacePolicySchema: z.ZodEnum<{
351
+ cascade: "cascade";
352
+ remap: "remap";
353
+ }>;
354
+ type AnchoredReplacePolicy = z.infer<typeof anchoredReplacePolicySchema>;
355
+ /**
356
+ * Replace a contiguous run of main-track clips with a new run.
357
+ *
358
+ * A composite of delete + insert that cannot be expressed as the two ops in
359
+ * sequence, because the anchored speeches have to survive *across* the swap: with
360
+ * `remap` they are re-anchored positionally, which needs both the old and the new
361
+ * ids in the same transaction (ADR 0009 — the cascade stays in the editor, callers
362
+ * never re-wire anchors themselves).
363
+ *
364
+ * Duration facts follow `addVideoClips`: `media_duration_ms` is the source's
365
+ * intrinsic length and the trim window defaults to the whole media. The effective
366
+ * timeline duration is derived by the projection, never an input.
367
+ *
368
+ * `media_id` is optional: omitting it creates a **deliberate empty placeholder
369
+ * clip** (`origin_media_id: ''`) — structure with no picture. This is the only op
370
+ * that can produce one, and it is authoritative state, unlike the gap fillers the
371
+ * read-side solve mints (which never enter the document).
372
+ */
373
+ declare const replaceVideoClipSequenceInputSchema: z.ZodObject<{
374
+ old_clip_ids: z.ZodArray<z.ZodString>;
375
+ new_clips: z.ZodArray<z.ZodObject<{
376
+ media_id: z.ZodOptional<z.ZodString>;
377
+ media_duration_ms: z.ZodNumber;
378
+ play_in: z.ZodOptional<z.ZodNumber>;
379
+ play_out: z.ZodOptional<z.ZodNumber>;
380
+ }, z.core.$strip>>;
381
+ on_anchored: z.ZodEnum<{
382
+ cascade: "cascade";
383
+ remap: "remap";
384
+ }>;
385
+ }, z.core.$strip>;
386
+ type ReplaceVideoClipSequenceInput = z.infer<typeof replaceVideoClipSequenceInputSchema>;
387
+ //#endregion
388
+ //#region src/editor/schemas/set-bgm.d.ts
389
+ /**
390
+ * Set the document BGM. The media's stable result (storage key) arrives
391
+ * materialized from upstream (see
392
+ * `results/phase-4-side-effect-payload-contract.md` §3). The op upserts the bgm
393
+ * part and seats it on the bgm lane; its effective length is always the whole
394
+ * timeline, derived by the projection on read — so there is no `duration_ms`
395
+ * input or fact (RFC 02 / `reference/16` §0b). A `bgm_id` lets the op replace an
396
+ * existing bgm part by id.
397
+ */
398
+ declare const setBgmInputSchema: z.ZodObject<{
399
+ bgm_id: z.ZodString;
400
+ audio_storage_key: z.ZodString;
401
+ origin_media_id: z.ZodString;
402
+ volume: z.ZodNumber;
403
+ }, z.core.$strip>;
404
+ type SetBgmInput = z.infer<typeof setBgmInputSchema>;
405
+ //#endregion
406
+ //#region src/editor/schemas/set-caption-style.d.ts
407
+ /**
408
+ * Set the caption visual style. GLOBAL by design: the style applies to every
409
+ * caption part in the document — it carries NO `caption_id`. This mirrors the FE,
410
+ * whose caption-style store (`caption-style.ts:persistCaptionStylePatch`) iterates
411
+ * ALL captions and writes the same normalized style to each; the product has a
412
+ * single document-wide caption style, not per-caption styling.
413
+ *
414
+ * Every field is optional and maps to a `CaptionStyle` attribute (snake_case
415
+ * IDL). A field present in the input is written to every caption; a field ABSENT
416
+ * from the input is left untouched on each caption (the editor merges the patch
417
+ * onto each caption's existing style — this is a value edit, not a full-style
418
+ * replace, so a partial patch such as "recolor only" does not wipe font size).
419
+ *
420
+ * Pure document edit, no cascade — captions keep their positions; only the style
421
+ * sub-map of each caption part changes.
422
+ */
423
+ declare const setCaptionStyleInputSchema: z.ZodObject<{
424
+ font_id: z.ZodOptional<z.ZodString>;
425
+ font_size: z.ZodOptional<z.ZodNumber>;
426
+ font_color: z.ZodOptional<z.ZodString>;
427
+ font_weight: z.ZodOptional<z.ZodNumber>;
428
+ entrance_animation: z.ZodOptional<z.ZodString>;
429
+ entrance_animation_duration_ms: z.ZodOptional<z.ZodNumber>;
430
+ stroke_color: z.ZodOptional<z.ZodString>;
431
+ stroke_width: z.ZodOptional<z.ZodNumber>;
432
+ position_x: z.ZodOptional<z.ZodNumber>;
433
+ position_y: z.ZodOptional<z.ZodNumber>;
434
+ }, z.core.$strip>;
435
+ type SetCaptionStyleInput = z.infer<typeof setCaptionStyleInputSchema>;
436
+ //#endregion
437
+ //#region src/editor/schemas/set-caption-visibility.d.ts
438
+ /**
439
+ * Toggle caption visibility (the caption track's `is_hidden` flag). Pure
440
+ * document edit, no cascade — captions keep their positions; only the lane's
441
+ * hidden flag changes.
442
+ */
443
+ declare const setCaptionVisibilityInputSchema: z.ZodObject<{
444
+ is_hidden: z.ZodBoolean;
445
+ }, z.core.$strip>;
446
+ type SetCaptionVisibilityInput = z.infer<typeof setCaptionVisibilityInputSchema>;
447
+ //#endregion
448
+ //#region src/editor/schemas/set-video-clip-speed-shift.d.ts
449
+ /**
450
+ * Set the playback speed of existing video clips. Per the speed-shift decision
451
+ * (`reference/16` §0): the op writes only the `speed_shift` fact — it does NOT
452
+ * store an effective `duration_ms` (projection derives it from the trim window /
453
+ * speed) and does NOT scale anchored speeches' relative offsets (offsets stay
454
+ * put; the cascade reflows absolute positions). A `null` speed_shift clears the
455
+ * speed back to original (1×).
456
+ */
457
+ declare const setVideoClipSpeedShiftInputSchema: z.ZodObject<{
458
+ clips: z.ZodArray<z.ZodObject<{
459
+ clip_id: z.ZodString;
460
+ speed_shift: z.ZodNullable<z.ZodObject<{
461
+ category: z.ZodEnum<{
462
+ curve: "curve";
463
+ linear: "linear";
464
+ }>;
465
+ mode: z.ZodString;
466
+ config: z.ZodUnion<readonly [z.ZodObject<{
467
+ linear: z.ZodObject<{
468
+ speed: z.ZodNumber;
469
+ }, z.core.$strip>;
470
+ }, z.core.$strip>, z.ZodObject<{
471
+ curve: z.ZodObject<{
472
+ keyframes: z.ZodArray<z.ZodObject<{
473
+ position: z.ZodNumber;
474
+ rate: z.ZodNumber;
475
+ in_tangent: z.ZodOptional<z.ZodObject<{
476
+ x: z.ZodNumber;
477
+ y: z.ZodNumber;
478
+ }, z.core.$strip>>;
479
+ out_tangent: z.ZodOptional<z.ZodObject<{
480
+ x: z.ZodNumber;
481
+ y: z.ZodNumber;
482
+ }, z.core.$strip>>;
483
+ }, z.core.$strip>>;
484
+ }, z.core.$strip>;
485
+ }, z.core.$strip>]>;
486
+ }, z.core.$strip>>;
487
+ }, z.core.$strip>>;
488
+ }, z.core.$strip>;
489
+ type SetVideoClipSpeedShiftInput = z.infer<typeof setVideoClipSpeedShiftInputSchema>;
490
+ //#endregion
491
+ //#region src/editor/schemas/shared.d.ts
492
+ declare const clipIdSchema: z.ZodString;
493
+ declare const clipIdsSchema: z.ZodArray<z.ZodString>;
494
+ declare const mediaIdSchema: z.ZodString;
495
+ declare const speechIdSchema: z.ZodString;
496
+ declare const timelineMsSchema: z.ZodNumber;
497
+ declare const positiveMsSchema: z.ZodNumber;
498
+ declare const volumeSchema: z.ZodNumber;
499
+ declare const speechIdsSchema: z.ZodArray<z.ZodString>;
500
+ /**
501
+ * A clip's playback-speed fact, the only thing `SetVideoClipSpeedShift` writes.
502
+ * Mirrors the IDL `SpeedShift`: `category` is `linear` | `curve`, and `config`
503
+ * is a discriminated union — `{ linear: { speed } }` for a constant multiplier
504
+ * (the multiplier projection reads at `config.linear.speed`) or `{ curve: {
505
+ * keyframes } }` for a Bezier-controlled variable speed (RFC 02 / `reference/16`
506
+ * §0). Exactly one of `linear` / `curve` is present.
507
+ */
508
+ declare const speedShiftSchema: z.ZodObject<{
509
+ category: z.ZodEnum<{
510
+ curve: "curve";
511
+ linear: "linear";
512
+ }>;
513
+ mode: z.ZodString;
514
+ config: z.ZodUnion<readonly [z.ZodObject<{
515
+ linear: z.ZodObject<{
516
+ speed: z.ZodNumber;
517
+ }, z.core.$strip>;
518
+ }, z.core.$strip>, z.ZodObject<{
519
+ curve: z.ZodObject<{
520
+ keyframes: z.ZodArray<z.ZodObject<{
521
+ position: z.ZodNumber;
522
+ rate: z.ZodNumber;
523
+ in_tangent: z.ZodOptional<z.ZodObject<{
524
+ x: z.ZodNumber;
525
+ y: z.ZodNumber;
526
+ }, z.core.$strip>>;
527
+ out_tangent: z.ZodOptional<z.ZodObject<{
528
+ x: z.ZodNumber;
529
+ y: z.ZodNumber;
530
+ }, z.core.$strip>>;
531
+ }, z.core.$strip>>;
532
+ }, z.core.$strip>;
533
+ }, z.core.$strip>]>;
534
+ }, z.core.$strip>;
535
+ declare const voiceSchema: z.ZodObject<{
536
+ id: z.ZodString;
537
+ name: z.ZodString;
538
+ }, z.core.$strip>;
539
+ //#endregion
540
+ //#region src/editor/schemas/speech-assets.d.ts
541
+ /**
542
+ * The materialized TTS result shared by `AddSpeeches` / `ChangeSpeechScript` /
543
+ * `ChangeSpeechVoice` (see `results/phase-4-side-effect-payload-contract.md`
544
+ * §1/§2). The side effect (TTS/ASR + billing) runs upstream; the op receives the
545
+ * stable speech + caption parts and writes them as authoritative facts. No
546
+ * cascade runs on write — the projection derives absolute positions on read.
547
+ *
548
+ * Each speech carries the anchoring fact directly (RFC 02 §4): the host video
549
+ * clip `anchor_part_id` and the `offset_ms` within it. The upstream caller
550
+ * already knows which clip a speech attaches to, so the op writes
551
+ * `{ mode:'anchored', anchorPartId, offsetMs }` verbatim — no write-time
552
+ * host-picking. Captions anchor to their speech via the caption part's
553
+ * `start_ms` (offset within the speech).
554
+ */
555
+ declare const speechAssetSchema: z.ZodObject<{
556
+ speech_id: z.ZodString;
557
+ anchor_part_id: z.ZodString;
558
+ offset_ms: z.ZodNumber;
559
+ audio_storage_key: z.ZodString;
560
+ duration_ms: z.ZodNumber;
561
+ audio_script: z.ZodString;
562
+ volume: z.ZodNumber;
563
+ voice: z.ZodObject<{
564
+ id: z.ZodString;
565
+ name: z.ZodString;
566
+ }, z.core.$strip>;
567
+ origin_speech_id: z.ZodString;
568
+ caption_ids: z.ZodArray<z.ZodString>;
569
+ }, z.core.$strip>;
570
+ declare const captionAssetSchema: z.ZodObject<{
571
+ caption_id: z.ZodString;
572
+ speech_part_id: z.ZodString;
573
+ text: z.ZodString;
574
+ start_ms: z.ZodNumber;
575
+ duration_ms: z.ZodNumber;
576
+ }, z.core.$strip>;
577
+ /** A materialized speech-subtree write (speeches + their captions). */
578
+ declare const speechAssetsSchema: z.ZodObject<{
579
+ speeches: z.ZodArray<z.ZodObject<{
580
+ speech_id: z.ZodString;
581
+ anchor_part_id: z.ZodString;
582
+ offset_ms: z.ZodNumber;
583
+ audio_storage_key: z.ZodString;
584
+ duration_ms: z.ZodNumber;
585
+ audio_script: z.ZodString;
586
+ volume: z.ZodNumber;
587
+ voice: z.ZodObject<{
588
+ id: z.ZodString;
589
+ name: z.ZodString;
590
+ }, z.core.$strip>;
591
+ origin_speech_id: z.ZodString;
592
+ caption_ids: z.ZodArray<z.ZodString>;
593
+ }, z.core.$strip>>;
594
+ captions: z.ZodArray<z.ZodObject<{
595
+ caption_id: z.ZodString;
596
+ speech_part_id: z.ZodString;
597
+ text: z.ZodString;
598
+ start_ms: z.ZodNumber;
599
+ duration_ms: z.ZodNumber;
600
+ }, z.core.$strip>>;
601
+ }, z.core.$strip>;
602
+ type SpeechAsset = z.infer<typeof speechAssetSchema>;
603
+ type CaptionAsset = z.infer<typeof captionAssetSchema>;
604
+ type SpeechAssets = z.infer<typeof speechAssetsSchema>;
605
+ declare namespace index_d_exports {
606
+ export { AddSpeechesInput, AddVideoClipsInput, AdjustBgmVolumeInput, AdjustSpeechVolumeInput, AdjustVideoClipDurationInput, AdjustVideoClipVolumeInput, AnchoredDeletePolicy, AnchoredReplacePolicy, CaptionAsset, ChangeSpeechScriptInput, ChangeSpeechVoiceInput, DeleteBgmInput, DeleteSpeechesInput, DeleteVideoClipsInput, MoveAnchor, MoveSpeechesInput, MoveVideoClipsByAnchorInput, MoveVideoClipsInput, MovedClipAnchoredPolicy, ReplaceVideoClipContentInput, ReplaceVideoClipSequenceInput, SetBgmInput, SetCaptionStyleInput, SetCaptionVisibilityInput, SetVideoClipSpeedShiftInput, SpeechAsset, SpeechAssets, addSpeechesInputSchema, addVideoClipsInputSchema, adjustBgmVolumeInputSchema, adjustSpeechVolumeInputSchema, adjustVideoClipDurationInputSchema, adjustVideoClipVolumeInputSchema, anchoredDeletePolicySchema, anchoredReplacePolicySchema, changeSpeechScriptInputSchema, changeSpeechVoiceInputSchema, clipIdSchema, clipIdsSchema, deleteBgmInputSchema, deleteSpeechesInputSchema, deleteVideoClipsInputSchema, mediaIdSchema, moveAnchorSchema, moveSpeechesInputSchema, moveVideoClipsByAnchorInputSchema, moveVideoClipsInputSchema, movedClipAnchoredPolicySchema, positiveMsSchema, replaceVideoClipContentInputSchema, replaceVideoClipSequenceInputSchema, setBgmInputSchema, setCaptionStyleInputSchema, setCaptionVisibilityInputSchema, setVideoClipSpeedShiftInputSchema, speechAssetsSchema, speechIdSchema, speechIdsSchema, speedShiftSchema, timelineMsSchema, voiceSchema, volumeSchema };
607
+ }
608
+ //#endregion
609
+ export { adjustVideoClipVolumeInputSchema as $, MoveVideoClipsInput as A, AnchoredDeletePolicy as B, setBgmInputSchema as C, replaceVideoClipSequenceInputSchema as D, anchoredReplacePolicySchema as E, moveAnchorSchema as F, deleteSpeechesInputSchema as G, anchoredDeletePolicySchema as H, moveVideoClipsByAnchorInputSchema as I, ChangeSpeechScriptInput as J, DeleteBgmInput as K, movedClipAnchoredPolicySchema as L, MoveAnchor as M, MoveVideoClipsByAnchorInput as N, ReplaceVideoClipContentInput as O, MovedClipAnchoredPolicy as P, AdjustVideoClipVolumeInput as Q, MoveSpeechesInput as R, SetBgmInput as S, ReplaceVideoClipSequenceInput as T, deleteVideoClipsInputSchema as U, DeleteVideoClipsInput as V, DeleteSpeechesInput as W, changeSpeechScriptInputSchema as X, ChangeSpeechVoiceInput as Y, changeSpeechVoiceInputSchema as Z, setVideoClipSpeedShiftInputSchema as _, speechAssetsSchema as a, adjustBgmVolumeInputSchema as at, SetCaptionStyleInput as b, mediaIdSchema as c, AddSpeechesInput as ct, speechIdsSchema as d, AdjustVideoClipDurationInput as et, speedShiftSchema as f, SetVideoClipSpeedShiftInput as g, volumeSchema as h, SpeechAssets as i, AdjustBgmVolumeInput as it, moveVideoClipsInputSchema as j, replaceVideoClipContentInputSchema as k, positiveMsSchema as l, addSpeechesInputSchema as lt, voiceSchema as m, CaptionAsset as n, AdjustSpeechVolumeInput as nt, clipIdSchema as o, AddVideoClipsInput as ot, timelineMsSchema as p, deleteBgmInputSchema as q, SpeechAsset as r, adjustSpeechVolumeInputSchema as rt, clipIdsSchema as s, addVideoClipsInputSchema as st, index_d_exports as t, adjustVideoClipDurationInputSchema as tt, speechIdSchema as u, SetCaptionVisibilityInput as v, AnchoredReplacePolicy as w, setCaptionStyleInputSchema as x, setCaptionVisibilityInputSchema as y, moveSpeechesInputSchema as z };