@mengine/medeo-client 1.3.1-alpha.8 → 1.4.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/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { t as index_d_exports } from "./index-CMa6ZCtX.js";
2
- import { $ as VoiceDescriptor, A as generatePartId, At as effectiveVideoClipDurationMs, B as ResolvedEntityClipPlacement, C as PlannedSemanticOpKind, Ct as VideoClipPart, D as SnapshotReadable, Dt as VideoDocumentValidationIssueCode, E as SchemaValidator, Et as VideoDocumentValidationIssue, F as videoDocumentMirrorSchema, Ft as PartAggregation, G as EntityTimelineProjectionError, H as ResolvedEntityTrack, I as VideoDocumentValidationError, It as SpeedShift, J as CaptionSegmentSelection, K as EntityRelationRows, L as assertValidVideoDocument, Lt as Timeline$1, M as TrackItemDraft, Mt as Attachment, N as VideoDocumentDraft, Nt as CaptionPart$1, O as ValidationError, Ot as VideoDraft, P as VideoDocumentMirrorSchema, Pt as CaptionStyle, Q as SequenceRange, R as validateVideoDocument, Rt as Track$1, S as ImplementedSemanticOpKind, St as VIDEO_DOCUMENT_SCHEMA_VERSION, T as isImplementedSemanticOpKind, Tt as VideoDocumentSchemaVersion, U as resolveEntityTimelineLayout, V as ResolvedEntityTimelineLayout, W as projectEntityTimeline, X as ScriptTextSegment, Y as CaptionStyleFields, Z as SequenceDuration, _ as SemanticEditor, _t as SpeechPart, a as PlainMemoryAdapter, at as DerivedItemPosition, b as TransactAudit, bt as TrackItem, c as MirrorVideoDocumentAdapter, ct as derivePositionFromAbs, d as createMirrorVideoDocument, dt as BgmPart, et as JsonObject, f as createMirrorVideoDocumentAdapter, ft as CaptionPart, g as SemanticDocumentAdapter, gt as PartUnion, h as OpActor, ht as PartKind, i as JournalEntry, it as buildInitialVideoDocument, j as TrackDraft, jt as speedOf, k as PartIdFactory, kt as VideoDraftPartUnion, l as MirrorVideoDocumentOptions, lt as fromVideoDocument, m as CommitOptions, mt as ENTITY_TIMELINE_PROJECTION_SCHEMA_VERSION, n as videoDocumentSchema, nt as EntityId, o as PlainMemoryAdapterOptions, ot as SpeechHostMap, p as writeVideoDocumentToDraft, pt as DEFAULT_UNIT_TIME_MS, q as EntityRow, r as readVideoDocumentFromDraft, rt as InitialDocumentFacts, s as createPlainMemoryAdapter, st as buildSpeechHostMap, t as partUnionSchema, tt as JsonValue, u as applyEntityTimelineProjection, ut as toVideoDocument, v as SemanticOpInput, vt as Timeline, w as SemanticOpKind, wt as VideoDocument, x as IMPLEMENTED_SEMANTIC_OP_KINDS, xt as TrackItemTimePosition, y as SemanticOpName, yt as Track, z as EntityTimelineTrackRole, zt as TrackItem$1 } from "./index-BUkDsU7c.js";
3
- import { PeerID } from "loro-crdt";
1
+ import { $ as VideoDocumentSchemaVersion, A as assertValidVideoDocument, B as BgmPart, C as index_d_exports, D as VideoDocumentMirrorSchema, E as VideoDocumentDraft, F as SpeechHostMap, G as SpeechPart, H as DEFAULT_UNIT_TIME_MS, I as buildSpeechHostMap, J as TrackItem, K as Timeline, L as derivePositionFromAbs, M as InitialDocumentFacts, N as buildInitialVideoDocument, O as videoDocumentMirrorSchema, P as DerivedItemPosition, Q as VideoDocument, R as fromVideoDocument, S as ValidationError, T as TrackItemDraft, U as PartKind, V as CaptionPart, W as PartUnion, X as VIDEO_DOCUMENT_SCHEMA_VERSION, Y as TrackItemTimePosition, Z as VideoClipPart, _ as PlannedSemanticOpKind, a as MirrorVideoDocumentOptions, at as CaptionPart$1, b as SchemaValidator, c as CommitOptions, ct as SpeedShift, d as SemanticEditor, dt as TrackItem$1, et as VideoDocumentValidationIssue, f as SemanticOpInput, g as ImplementedSemanticOpKind, h as IMPLEMENTED_SEMANTIC_OP_KINDS, i as MirrorVideoDocumentAdapter, it as Attachment, j as validateVideoDocument, k as VideoDocumentValidationError, l as OpActor, lt as Timeline$1, m as TransactAudit, n as videoDocumentSchema, nt as VideoDraft, o as createMirrorVideoDocument, ot as CaptionStyle, p as SemanticOpName, q as Track, r as readVideoDocumentFromDraft, rt as VideoDraftPartUnion, s as createMirrorVideoDocumentAdapter, st as PartAggregation, t as partUnionSchema, tt as VideoDocumentValidationIssueCode, u as SemanticDocumentAdapter, ut as Track$1, v as SemanticOpKind, w as TrackDraft, x as SnapshotReadable, y as isImplementedSemanticOpKind, z as toVideoDocument } from "./index-CX7IXsnp.js";
2
+ import { LoroDoc, PeerID } from "loro-crdt";
4
3
  import { DocState } from "@mengine/sync";
5
4
  import { BaseDocStorage, Connection, DocDiff, DocPushReceipt, DocSnapshotRecord, DocStorage, DocStorageOptions, DocUpdate, DocUpdateRecord } from "@mengine/storage";
6
5
 
@@ -178,509 +177,33 @@ interface MengineEventStreamOptions {
178
177
  }
179
178
  declare function readMengineEventStream(options: MengineEventStreamOptions): Promise<void>;
180
179
  //#endregion
181
- //#region ../medeo-dsl/src/composition.d.ts
182
- type ScriptCompositionIssueCode = 'field_conflict' | 'composition_cycle' | 'invalid_bases' | 'composition_missing' | 'composition_ambiguous' | 'composition_dangling' | 'unknown_segment' | 'empty_selection' | 'invalid_script' | 'invalid_selection';
183
- /** Assembly fails explicitly when declared bases cannot provide valid, unambiguous content. */
184
- declare class ScriptCompositionError extends Error {
185
- readonly code: ScriptCompositionIssueCode;
186
- readonly entityId: EntityId;
187
- constructor(code: ScriptCompositionIssueCode, entityId: EntityId, message: string);
188
- }
189
- interface AssembledCaptionContent {
190
- readonly caption: EntityRow<'caption'>;
191
- readonly audioScript: EntityRow<'audio-script'>;
192
- /** Selected AudioScript segments in Caption selection order. */
193
- readonly segments: readonly ScriptTextSegment[];
194
- /** Complete display text: the selected segments' text joined in order. */
195
- readonly text: string;
196
- }
197
- interface AssembledPhoneticScriptContent {
198
- readonly phoneticScript: EntityRow<'phonetic-script'>;
199
- readonly audioScript: EntityRow<'audio-script'>;
200
- /** All AudioScript segments in script order; the pronunciation variant never reorders text. */
201
- readonly segments: readonly ScriptTextSegment[];
202
- /** Complete base text owned by the AudioScript. */
203
- readonly text: string;
204
- }
205
- /** Validate all base providers before applying explicit own fields; ordering cannot resolve ambiguity. */
206
- declare function assembleEntityContent(rows: EntityRelationRows, entityId: EntityId): EntityRow;
207
- /** Find the actual AudioScript text owner through direct variant bases. */
208
- declare function findComposedAudioScript(rows: EntityRelationRows, variantEntityId: EntityId, variantKind: 'caption' | 'phonetic-script'): EntityRow<'audio-script'>;
209
- /** Join the whole AudioScript text in segment order. */
210
- declare function assembleScriptText(script: EntityRow<'audio-script'>): string;
211
- /** Assemble selected text after base-field validation and explicit variant overrides. */
212
- declare function assembleCaptionContent(rows: EntityRelationRows, captionEntityId: EntityId): AssembledCaptionContent;
180
+ //#region src/editor/id-gen.d.ts
213
181
  /**
214
- * Assemble the complete Phonetic Script content for TTS: the composed
215
- * AudioScript's base text plus the variant's own phoneme and prosody fields.
216
- */
217
- declare function assemblePhoneticScriptContent(rows: EntityRelationRows, phoneticScriptEntityId: EntityId): AssembledPhoneticScriptContent;
218
- /** Select source text without creating another authoritative text field. */
219
- declare function selectAudioScriptSegments(script: EntityRow<'audio-script'>, selections: readonly CaptionSegmentSelection[]): readonly ScriptTextSegment[];
220
- //#endregion
221
- //#region src/entity-editor/entity-graph-http-client.d.ts
222
- /** One authenticated revision of the authoritative Medeo Entity graph. */
223
- interface EntityGraphState {
224
- readonly audioScriptEntityId: string | null;
225
- readonly revision: number;
226
- readonly rows: EntityRelationRows;
227
- }
228
- interface EntityGraphCommitOptions {
229
- /** Omitted preserves the baseline association; null explicitly clears it. */
230
- readonly audioScriptEntityId?: string | null;
231
- /** Server version vector proving the explicit legacy-to-Entity migration baseline. */
232
- readonly migrationBaseVv?: string;
233
- }
234
- /** Browser-safe authenticated CAS client for a document's Entity graph. */
235
- declare class EntityGraphHttpClient {
236
- private readonly options;
237
- private readonly transport;
238
- private readonly endpoint;
239
- constructor(options: MengineHttpClientOptions);
240
- fetchState(): Promise<EntityGraphState>;
241
- /**
242
- * Replace the complete Entity graph under the baseline revision.
243
- *
244
- * Deletion intent is derived from baseline IDs omitted from `nextRows`, so a
245
- * transient create-then-remove never becomes a request to delete unknown
246
- * persisted data.
247
- */
248
- commit(baseState: EntityGraphState, nextRows: EntityRelationRows, options?: EntityGraphCommitOptions): Promise<EntityGraphState>;
249
- private request;
250
- }
251
- //#endregion
252
- //#region src/entity-editor/types.d.ts
253
- /** Injectable domain-id mint shared by Entity and Relation authoring surfaces. */
254
- type EntityTimelineIdFactory = (prefix: 'entity' | 'relation') => string;
255
- interface ImageMediaAssetFact {
256
- readonly assetId: string;
257
- readonly kind: 'image';
258
- readonly storageKey?: string;
259
- }
260
- interface VideoMediaAssetFact {
261
- readonly assetId: string;
262
- readonly kind: 'video';
263
- readonly durationMs: number;
264
- readonly storageKey?: string;
265
- }
266
- interface AudioMediaAssetFact {
267
- readonly assetId: string;
268
- readonly kind: 'audio';
269
- readonly durationMs: number;
270
- readonly storageKey: string;
271
- }
272
- interface VoiceMediaAssetFact {
273
- /** Stable external speech result id, independent of the placed Clip id. */
274
- readonly assetId: string;
275
- readonly kind: 'voice';
276
- readonly durationMs: number;
277
- readonly storageKey: string;
278
- /** Present for synthesized voice, absent for original recorded audio. */
279
- readonly voice?: VoiceDescriptor;
280
- }
281
- /** Facts resolved from media storage. A trim window never substitutes for intrinsic duration. */
282
- type MediaAssetFact = ImageMediaAssetFact | VideoMediaAssetFact | AudioMediaAssetFact | VoiceMediaAssetFact;
283
- type ClipPlacement = {
284
- readonly kind: 'sequential';
285
- readonly order: number;
286
- } | {
287
- readonly kind: 'absolute';
288
- readonly targetRange: SequenceRange<number>;
289
- } | {
290
- readonly kind: 'anchored';
291
- readonly hostClipEntityId: string;
292
- readonly anchorOffset: number;
293
- };
294
- interface InsertPlacedClipInput {
295
- readonly trackEntityId: string;
296
- readonly contentEntityId: string;
297
- readonly sourceRange: SequenceRange<number>;
298
- readonly duration: SequenceDuration<number>;
299
- readonly placement: ClipPlacement;
300
- readonly clipPayload?: JsonObject;
301
- /** Stable caller-owned placement identity, when one already exists outside the graph. */
302
- readonly clipEntityId?: string;
303
- }
304
- interface SetClipPlacementInput {
305
- readonly clipEntityId: string;
306
- readonly placement: ClipPlacement;
307
- }
308
- type SequentialClipAnchor = {
309
- readonly position: 'before' | 'after';
310
- readonly clipEntityId: string;
311
- } | {
312
- readonly position: 'trackStart';
313
- };
314
- interface MoveSequentialClipsInput {
315
- readonly clipEntityIds: readonly string[];
316
- readonly anchor: SequentialClipAnchor;
317
- readonly onAnchored: 'follow' | 'keepAbsolute';
318
- }
319
- interface MoveClipsToStartsInput {
320
- readonly moves: readonly {
321
- readonly clipEntityId: string;
322
- readonly newStartMs: number;
323
- }[];
324
- /** Absolute-time drags preserve every voiceover's current visible landing. */
325
- readonly onAnchored: 'keepAbsolute';
326
- }
327
- interface DeleteClipTreeInput {
328
- readonly clipEntityIds: readonly string[];
329
- readonly onAnchored: 'cascade' | 'detach';
330
- }
331
- interface VoiceoverCaptionFact {
332
- /** Stable placed caption identity supplied by the materialized side effect. */
333
- readonly captionClipEntityId: string;
334
- /** Directly held bases; includes the AudioScript used by the Voice. */
335
- readonly baseEntityIds: readonly string[];
336
- /** Ordered selection of AudioScript segments; caption text is never passed inline. */
337
- readonly selections: readonly CaptionSegmentSelection[];
338
- readonly startMs: number;
339
- readonly durationMs: number;
340
- readonly style?: CaptionStyleFields;
341
- }
342
- type VoiceoverTakeInput = {
343
- readonly timelineEntityId: string; /** Stable placed speech identity, distinct from media.assetId. */
344
- readonly voiceoverClipEntityId: string;
345
- readonly media: VoiceMediaAssetFact; /** Existing pronunciation variant; its composed AudioScript stays the text owner. */
346
- readonly phoneticScriptEntityId: string;
347
- readonly volume: number;
348
- readonly captions: readonly VoiceoverCaptionFact[];
349
- } & ({
350
- readonly placement: ClipPlacement;
351
- readonly hostClipEntityId?: never;
352
- readonly anchorOffset?: never;
353
- } | {
354
- readonly placement?: never;
355
- readonly hostClipEntityId: string;
356
- readonly anchorOffset: number;
357
- });
358
- type VisualMediaAssetFact = ImageMediaAssetFact | VideoMediaAssetFact;
359
- interface InsertMediaClipInput {
360
- readonly timelineEntityId: string;
361
- readonly clipEntityId?: string;
362
- readonly media: VisualMediaAssetFact;
363
- /** Source/display window in whole milliseconds. Images use this as their finite display span. */
364
- readonly sourceRange: SequenceRange<number>;
365
- readonly placement: ClipPlacement;
366
- readonly volume?: number;
367
- }
368
- interface ReplaceMediaClipInput {
369
- readonly clipEntityId: string;
370
- readonly media: VisualMediaAssetFact;
371
- readonly sourceRange: SequenceRange<number>;
372
- }
373
- interface ReplacementMediaClipInput {
374
- readonly clipEntityId?: string;
375
- readonly media: VisualMediaAssetFact;
376
- readonly sourceRange: SequenceRange<number>;
377
- readonly volume?: number;
378
- }
379
- type MediaClipInsertion = {
380
- readonly kind: 'before';
381
- readonly clipEntityId: string;
382
- } | {
383
- readonly kind: 'after';
384
- readonly clipEntityId: string;
385
- } | {
386
- readonly kind: 'firstStart';
387
- readonly startMs: number;
388
- };
389
- interface InsertMediaClipsInput {
390
- readonly timelineEntityId: string;
391
- readonly clips: readonly ReplacementMediaClipInput[];
392
- /** One placement decision for the whole input-ordered block. */
393
- readonly insertion: MediaClipInsertion;
394
- }
395
- interface ReplaceSequentialClipsInput {
396
- readonly timelineEntityId: string;
397
- readonly oldClipEntityIds: readonly string[];
398
- readonly newClips: readonly ReplacementMediaClipInput[];
399
- readonly onAnchored: 'remap' | 'cascade';
400
- }
401
- interface SetClipVolumeInput {
402
- readonly clipEntityId: string;
403
- /** Playback gain in decibels. */
404
- readonly volume: number;
405
- }
406
- interface LinearClipSpeed {
407
- readonly kind: 'linear';
408
- readonly rate: number;
409
- readonly mode?: string;
410
- }
411
- interface SetClipSpeedInput {
412
- readonly clipEntityId: string;
413
- readonly timeRemapping: LinearClipSpeed | null;
414
- }
415
- interface TrimClipInput {
416
- readonly clipEntityId: string;
417
- readonly sourceRange: SequenceRange<number>;
418
- }
419
- interface VoiceoverTakeResult {
420
- readonly voiceoverClipEntityId: string;
421
- readonly voiceEntityId: string;
422
- /** The pronunciation variant the Voice was rendered from. */
423
- readonly phoneticScriptEntityId: string;
424
- /** The base-text owner resolved from the PhoneticScript baseEntityIds. */
425
- readonly audioScriptEntityId: string;
426
- readonly captionClipEntityIds: readonly string[];
427
- }
428
- interface MoveVoiceoverInput {
429
- readonly voiceoverClipEntityId: string;
430
- /** Absolute requested timeline start; MEngine resolves and persists the host relation. */
431
- readonly newStartMs: number;
432
- }
433
- interface DeleteVoiceoverInput {
434
- readonly voiceoverClipEntityIds: readonly string[];
435
- }
436
- interface SetBgmInput {
437
- readonly timelineEntityId: string;
438
- readonly bgmClipEntityId: string;
439
- readonly media: AudioMediaAssetFact;
440
- readonly volume: number;
441
- }
442
- interface DeleteBgmInput {
443
- readonly timelineEntityId: string;
444
- }
445
- interface SetCaptionVisibilityInput {
446
- readonly timelineEntityId: string;
447
- readonly hidden: boolean;
448
- }
449
- interface PatchCaptionStyleInput {
450
- readonly timelineEntityId: string;
451
- readonly style: CaptionStyleFields;
452
- }
453
- interface InsertCaptionClipInput {
454
- readonly timelineEntityId: string;
455
- /** Stable placed caption identity, distinct from the Caption content identity. */
456
- readonly captionClipEntityId?: string;
457
- /** Existing bases composed by this variant; includes an AudioScript text owner. */
458
- readonly baseEntityIds: readonly string[];
459
- /** Ordered selection of the AudioScript segments this Caption displays. */
460
- readonly selections: readonly CaptionSegmentSelection[];
461
- /** Intrinsic cue length of the Caption entity itself; display comes from the placement. */
462
- readonly durationMs: number;
463
- readonly style?: CaptionStyleFields;
464
- readonly placement: ClipPlacement;
465
- }
466
- interface InsertClipInput {
467
- readonly trackEntityId: string;
468
- /** Existing Sequence media Entity id. Asset ids and URLs are not content ids. */
469
- readonly contentEntityId: string;
470
- readonly sourceRange: SequenceRange<number>;
471
- readonly duration: SequenceDuration<number>;
472
- readonly targetRange?: SequenceRange<number>;
473
- readonly clipPayload?: JsonObject;
474
- }
475
- interface UpdateClipMarkerInput {
476
- readonly clipEntityId: string;
477
- readonly sourceRange?: SequenceRange<number>;
478
- /** Passing `undefined` explicitly removes the optional target range. */
479
- readonly targetRange?: SequenceRange<number> | undefined;
480
- readonly duration?: SequenceDuration<number>;
481
- /** Passing `undefined` explicitly removes the optional remapping value. */
482
- readonly timeRemapping?: JsonValue | undefined;
483
- }
484
- interface MoveClipInput {
485
- readonly clipEntityId: string;
486
- readonly trackEntityId: string;
487
- }
488
- interface ReplaceClipContentInput {
489
- readonly clipEntityId: string;
490
- /** Existing Sequence media Entity id. Asset ids and URLs are not content ids. */
491
- readonly contentEntityId: string;
492
- readonly sourceRange: SequenceRange<number>;
493
- readonly duration: SequenceDuration<number>;
494
- readonly targetRange?: SequenceRange<number>;
495
- readonly timeRemapping?: JsonValue;
496
- }
497
- interface DeleteClipInput {
498
- readonly clipEntityId: string;
499
- }
500
- interface UpdateClipInput {
501
- readonly clipEntityId: string;
502
- /** Complete replacement for the Clip-owned payload. */
503
- readonly payload: JsonObject;
504
- }
505
- type ClipEntityId = EntityId;
506
- //#endregion
507
- //#region src/entity-editor/entity-timeline-editor.d.ts
508
- /**
509
- * Graph-native timeline authoring over authoritative Medeo Entity and Relation rows.
510
- *
511
- * Each mutation is applied to a detached graph, validated as a complete DSL set,
512
- * and committed only after validation succeeds.
513
- */
514
- declare class EntityTimelineEditor {
515
- private readonly idFactory;
516
- private state;
517
- constructor(initialRows: EntityRelationRows, idFactory?: EntityTimelineIdFactory);
518
- rows(): EntityRelationRows;
519
- insertClip(input: InsertClipInput): ClipEntityId;
520
- insertPlacedClip(input: InsertPlacedClipInput): ClipEntityId;
521
- updateClipMarker(input: UpdateClipMarkerInput): void;
522
- setClipPlacement(input: SetClipPlacementInput): void;
523
- moveSequentialClips(input: MoveSequentialClipsInput): void;
524
- moveClipsToStarts(input: MoveClipsToStartsInput): void;
525
- moveClip(input: MoveClipInput): void;
526
- replaceClipContent(input: ReplaceClipContentInput): void;
527
- insertMediaClip(input: InsertMediaClipInput): ClipEntityId;
528
- insertMediaClips(input: InsertMediaClipsInput): readonly ClipEntityId[];
529
- replaceMediaClip(input: ReplaceMediaClipInput): void;
530
- setClipVolume(input: SetClipVolumeInput): void;
531
- setClipSpeed(input: SetClipSpeedInput): void;
532
- trimClip(input: TrimClipInput): void;
533
- replaceSequentialClips(input: ReplaceSequentialClipsInput): readonly ClipEntityId[];
534
- deleteClip(input: DeleteClipInput): void;
535
- deleteClipTree(input: DeleteClipTreeInput): void;
536
- updateClip(input: UpdateClipInput): void;
537
- upsertVoiceoverTake(input: VoiceoverTakeInput): VoiceoverTakeResult;
538
- moveVoiceover(input: MoveVoiceoverInput): void;
539
- deleteVoiceover(input: DeleteVoiceoverInput): void;
540
- setBgm(input: SetBgmInput): ClipEntityId;
541
- deleteBgm(input: DeleteBgmInput): void;
542
- setCaptionVisibility(input: SetCaptionVisibilityInput): void;
543
- patchCaptionStyle(input: PatchCaptionStyleInput): void;
544
- /**
545
- * Place a Caption as a composed variant of an existing AudioScript: the
546
- * entity stores baseEntityIds, selection, optional style, and inherent cue-bounded
547
- * Sequence. This helper does not copy base text. The Clip and its display Marker describe this use;
548
- * moving or stretching the returned Clip later changes the Clip/Marker,
549
- * never the Caption entity or the AudioScript.
550
- */
551
- insertCaptionClip(input: InsertCaptionClipInput): ClipEntityId;
552
- private insertPlacedClipIntoDraft;
553
- private ensureRoleTrack;
554
- /** The existing pronunciation variant a Voice consumes; composition is required. */
555
- private requireComposedPhoneticScript;
556
- /** Preserve the factual synthesis input, regardless of persisted endpoint positions. */
557
- private ensurePhoneticRender;
558
- private reconcileVoiceoverCaptions;
559
- private ensureRoleTrackForClip;
560
- private replaceCaptionAlignment;
561
- /**
562
- * Remove one placed Caption use. The composed AudioScript outlives the
563
- * caption: it may anchor further captions and remains the text owner.
564
- */
565
- private removeCaptionClipGraph;
566
- private replaceAnchorHost;
567
- /** Rebuild the legacy edit baseline from current visual order before a high-level cascade. */
568
- private normalizeMainSequential;
569
- private resolveOneVoiceoverOverlap;
570
- private applyClipPlacement;
571
- private reanchorAtAbsolute;
572
- private removeAnchoredDescendants;
573
- private removeClipGraph;
574
- private transact;
575
- private mintEntityId;
576
- private createRelation;
577
- private relinkRelation;
578
- private mintRelationId;
579
- }
580
- //#endregion
581
- //#region src/entity-editor/editor-resources.d.ts
582
- declare const roleOrder: {
583
- readonly caption: 0;
584
- readonly video_clip: 1;
585
- readonly speech: 2;
586
- readonly bgm: 3;
587
- };
588
- type EditorTrackRole = keyof typeof roleOrder;
589
- interface EditorFoundation {
590
- readonly rows: EntityRelationRows;
591
- readonly timelineEntityId: string;
592
- readonly trackEntityIds: Readonly<Record<EditorTrackRole, string>>;
593
- }
594
- /**
595
- * MEngine editor policy, not a cardinality restriction on the general-purpose DSL.
182
+ * Part-id generation, aligned with the online ecosystem.
596
183
  *
597
- * Media variants share one entity identity with their Asset: every
598
- * Image/Video/Audio/Voice Entity must carry its own external locator, every
599
- * external asset id has exactly one claimant, and no media variant may be
600
- * bound through a legacy `physical-asset` Relation. Dual-entity media graphs
601
- * are rejected, not migrated. Caption composes AudioScript text and has no physical text Asset.
602
- */
603
- declare function assertCanonicalEditorResources(rows: EntityRelationRows): void;
604
- /**
605
- * Commit-transition policy shared by the editor, the HTTP commit boundary, the
606
- * host tool, and the entity stores. It compares the authoritative before and
607
- * after rows of one CAS commit and enforces the single-identity write rules
608
- * on the complete after state, with no exemption for historical graphs:
609
- *
610
- * 1. every Image/Video/Audio/Voice Entity carries its own Asset `external`
611
- * identity;
612
- * 2. no `physical-asset` Relation may bind a media variant or Caption;
613
- * 3. a self-carried media identity is immutable — it cannot be rewritten to
614
- * another asset id.
184
+ * The authoritative online producers — agent-harness (`@harness/shared`
185
+ * `genObjId`) and director.v2 (`common/obj_id.py` `gen_obj_id`) — both mint part
186
+ * ids as `` `${prefix}_${ulid()}` ``, and real captured drafts use exactly that
187
+ * shape (`clip_…` / `spe_…` / `cap_…` / `bgm_…`, each a 26-char ULID). The engine
188
+ * previously emitted `vc_<base36 timestamp><6 random>`, a different prefix AND a
189
+ * different encoding — the sole cross-repo id divergence. This module removes it
190
+ * by emitting the same `<prefix>_<ULID>` bytes.
615
191
  *
616
- * Dual-entity media graphs are rejected instead of being migrated or merged
617
- * implicitly. Deleting media is explicit and allowed.
618
- */
619
- declare function assertMediaAssetWritePolicy(before: EntityRelationRows, after: EntityRelationRows): void;
620
- /** Add only missing editor structure; existing identities and owned settings are never replaced. */
621
- declare function ensureEditorFoundation(initial: EntityRelationRows, idFactory?: EntityTimelineIdFactory, timelinePayload?: EntityRow['payload']): EditorFoundation;
622
- //#endregion
623
- //#region src/entity-editor/media-asset-import.d.ts
624
- interface ImportedMediaAsset {
625
- readonly rows: EntityRelationRows;
626
- /** The single media variant identity for this asset id; it is its own Asset. */
627
- readonly contentEntityId: string;
628
- }
629
- /**
630
- * Import at the editor boundary, not at asset generation time. Existing
631
- * provenance is retained.
632
- *
633
- * A media variant is a logical facet of its Asset and shares one entity
634
- * identity: the import mints exactly one entity of the media kind that carries
635
- * the external locator itself, and deduplicates only against existing variants
636
- * that already carry the same `(system, key)`. Legacy dual-entity graphs
637
- * (`asset` row plus a `physical-asset` binding) are not reused and are
638
- * rejected by the canonical resource policy instead of being migrated.
639
- */
640
- declare function importMediaAsset(initial: EntityRelationRows, fact: MediaAssetFact, idFactory?: EntityTimelineIdFactory): ImportedMediaAsset;
641
- //#endregion
642
- //#region src/entity-editor/legacy-entity-migration.d.ts
643
- /** One-time import only. Ordinary editor operations must never reverse-diff a legacy document. */
644
- declare function migrateLegacyTimelineToEntities(legacy: VideoDocument, assetFacts: readonly MediaAssetFact[], initial?: EntityRelationRows, idFactory?: EntityTimelineIdFactory): EntityRelationRows;
645
- /** Server gate: a cutover may change representation, never the existing render facts. */
646
- declare function assertEntityProjectionPreservesLegacy(legacy: VideoDocument, projection: VideoDocument, rows: EntityRelationRows): void;
647
- //#endregion
648
- //#region src/entity-editor/caption-content.d.ts
649
- interface CaptionContentInput {
650
- readonly contentEntityId: string;
651
- readonly audioScriptEntityId: string;
652
- readonly text: string;
653
- readonly selections?: readonly CaptionSegmentSelection[];
654
- readonly durationMs: number;
655
- }
656
- /** Author Caption content from semantic intent; callers never reconcile variant bases or assembled fields. */
657
- declare function prepareCaptionContent(rows: EntityRelationRows, input: CaptionContentInput): EntityRow<'caption'>;
658
- //#endregion
659
- //#region src/entity-editor/document-audio-script.d.ts
660
- interface DocumentAudioScript {
661
- readonly entityId: string;
662
- readonly segments: readonly (ScriptTextSegment & Readonly<Record<string, unknown>>)[];
663
- }
664
- /** Resolve only the document association; other AudioScripts remain independent resources. */
665
- declare function readDocumentAudioScript(state: Pick<EntityGraphState, 'rows' | 'audioScriptEntityId'>): DocumentAudioScript | null;
666
- //#endregion
667
- //#region src/editor/journal.d.ts
668
- /**
669
- * Wire a plain-memory adapter + editor that share a recording id factory, so
670
- * every mutating transact lands in `journal` with ordered `generated_ids`.
192
+ * The ULID is generated inline (Crockford Base32, 48-bit time + 80-bit random)
193
+ * rather than pulling the `ulid` npm package: the randomness class matches the
194
+ * old generator (both `Math.random`-based) and it keeps `@mengine/medeo-client`
195
+ * dependency-free for a purely mechanical id string. Part ids only need to be
196
+ * unique and lexicographically time-sortable, which this satisfies.
671
197
  */
672
- declare function createEditSandbox(document: VideoDocument, options?: PlainMemoryAdapterOptions): {
673
- adapter: PlainMemoryAdapter;
674
- editor: SemanticEditor;
675
- journal: readonly JournalEntry[];
676
- };
677
198
  /**
678
- * Re-drive `doc` from a recorded journal, forcing each entry's `generated_ids`
679
- * through a queue-backed id factory. Never mints fresh ids: an empty queue on
680
- * demand throws `unrecorded id`; leftover ids after an entry throws
681
- * `unconsumed ids`. Legacy entries without `generated_ids` are treated as `[]`.
199
+ * Online part-id semantic prefixes. `clip` (video clip) is the only value the
200
+ * engine currently mints (see `addVideoClips`); the rest are declared so the
201
+ * type documents the shared vocabulary and guards against reintroducing the old
202
+ * `vc`/`sp`/`cp`/`bg` names. Speech/caption/bgm ids arrive pre-minted in op
203
+ * payloads, so the engine never generates them itself.
682
204
  */
683
- declare function replayJournal(doc: SemanticDocumentAdapter, journal: readonly JournalEntry[]): Promise<void>;
205
+ type PartIdPrefix = 'clip' | 'spe' | 'cap' | 'bgm' | 'ti';
206
+ declare function generatePartId(prefix: PartIdPrefix): string;
684
207
  //#endregion
685
208
  //#region src/editor/snapshot-utils.d.ts
686
209
  /** Main-track item identity read from a raw snapshot (only `part_id` is needed). */
@@ -773,7 +296,9 @@ type PushResultKind = 'ack' | 'duplicate' | 'rejected' | 'failed' | 'nothing_to_
773
296
  */
774
297
  interface PushResult {
775
298
  kind: PushResultKind;
776
- /** Server-allocated sequence number; only present for `ack`. */
299
+ /** Server document sequence observed after a successful `ack` or `duplicate`. */
300
+ mengineUpdateSeq?: number | undefined;
301
+ /** @deprecated Ack-only sequence retained until consumers adopt `mengineUpdateSeq`. */
777
302
  updateSeq?: number | undefined;
778
303
  /** Whether the server held ops the local document lacked. See above. */
779
304
  collaborated: boolean;
@@ -899,16 +424,6 @@ declare class ManualSyncDoc {
899
424
  editorPeerId(): PeerID;
900
425
  /** Current document projected to the legacy `VideoDraft` read shape. */
901
426
  draft(): VideoDraft;
902
- /**
903
- * Replay a deterministic sandbox journal into this document.
904
- *
905
- * The adapter stays private so callers cannot bypass the manual-sync
906
- * lifecycle; journal replay is the one host-side operation that needs the
907
- * adapter's transaction boundary and recorded id queue. Durability is still
908
- * explicit: call {@link push} after replay and report success only from its
909
- * verdict.
910
- */
911
- replayJournal(journal: readonly JournalEntry[]): Promise<void>;
912
427
  /**
913
428
  * Mark the document state the caller has just observed, for a later
914
429
  * {@link hasChangedSince}.
@@ -1062,12 +577,22 @@ declare class MedeoHttpDocStorage implements DocStorage {
1062
577
  * tool-level ack wait) subscribe here.
1063
578
  */
1064
579
  subscribePushOutcome(callback: (outcome: PushOutcome) => void): () => void;
580
+ /** Authoritative HTTP reads and accepted pushes, never inferred from SSE bytes. */
581
+ subscribeServerVersion(callback: (version: Uint8Array) => void): () => void;
582
+ private reportServerVersion;
1065
583
  deleteDoc(_docId: string): Promise<void>;
1066
584
  subscribeDocUpdate(callback: (update: DocUpdate, origin: unknown) => void): () => void;
1067
585
  private assertDocId;
1068
586
  private emitUpdate;
1069
587
  }
1070
588
  //#endregion
589
+ //#region src/session/document-undo-manager.d.ts
590
+ /** Availability for this document's current editing session, not server revisions. */
591
+ interface MengineUndoState {
592
+ readonly canUndo: boolean;
593
+ readonly canRedo: boolean;
594
+ }
595
+ //#endregion
1071
596
  //#region src/session/types.d.ts
1072
597
  /**
1073
598
  * Local storage contract the runtime depends on. Aliased to the engine
@@ -1110,6 +635,14 @@ interface WaitForServerAckOptions {
1110
635
  /** Deadline in ms. Rejects with reason `timeout` when it elapses. */
1111
636
  timeoutMs?: number;
1112
637
  }
638
+ /** Document-level confirmation is independent of local operation completion. */
639
+ interface MengineDocSyncState {
640
+ /** Remote-only imports do not create a new local confirmation obligation. */
641
+ readonly confirmation: 'unknown' | 'pending' | 'confirmed';
642
+ /** Transport/activity phase. Idle does not imply confirmation; failure details
643
+ * remain available through push outcomes and confirmation wait errors. */
644
+ readonly phase: 'connecting' | 'idle' | 'syncing' | 'offline' | 'failed';
645
+ }
1113
646
  interface MengineDocSessionOptions {
1114
647
  docId: string;
1115
648
  client: MengineHttpClient;
@@ -1120,23 +653,14 @@ interface MengineDocSessionOptions {
1120
653
  */
1121
654
  localStorage?: DocStorageLike;
1122
655
  sseReconnectDelayMs?: number;
1123
- /**
1124
- * Keep remote synchronization read-only: pull snapshot/diffs and subscribe to
1125
- * SSE updates, but never POST local Loro updates to the server.
1126
- */
1127
- readonlyMode?: boolean;
1128
656
  }
1129
657
  /**
1130
658
  * A live editing session for one Medeo document — the single entry point clients
1131
659
  * (FE draft driver, Agent, embeds) use to open, edit, and observe a document.
1132
660
  *
1133
- * It assembles the engine sync stack around one Medeo document:
1134
- *
1135
- * local DocStorage ─┐
1136
- * ├─ ClientServerSynchronizer ── DocManager ── LoroDoc
1137
- * MedeoHttpDocStorage┘ │
1138
- * (remote = Rust mengine-server) ▼
1139
- * MirrorVideoDocumentAdapter + SemanticEditor
661
+ * SemanticEditor writes through MirrorVideoDocumentAdapter directly, while
662
+ * DocumentUndoManager observes the same LoroDoc independently. Both mutation
663
+ * paths use the session's DocumentMutationGuard, closed before teardown.
1140
664
  *
1141
665
  * `DocManager` owns the `LoroDoc`: local edits committed on the adapter are
1142
666
  * picked up via `subscribeLocalUpdates`, saved to local storage, then pushed to
@@ -1157,11 +681,19 @@ declare class MengineDocSession {
1157
681
  private readonly manager;
1158
682
  private readonly events;
1159
683
  private readonly disposables;
684
+ private readonly mutationGuard;
1160
685
  private adapterValue;
1161
686
  private editorValue;
687
+ private undoManagerValue;
1162
688
  private started;
689
+ private destroyed;
690
+ private lifetime;
691
+ private hasConnected;
692
+ private initialVersionValue;
693
+ private localVersionValue;
694
+ private pushErrorValue;
1163
695
  /**
1164
- * Latest server oplog version seen on a push outcome. Lets `waitForServerAck`
696
+ * Latest server oplog version seen on an authoritative HTTP response. Lets `waitForServerAck`
1165
697
  * return without waiting when the server is already known to cover the local
1166
698
  * doc (e.g. nothing was edited since the last confirmed push).
1167
699
  */
@@ -1176,14 +708,14 @@ declare class MengineDocSession {
1176
708
  */
1177
709
  subscribePushOutcome(callback: (outcome: PushOutcome) => void): () => void;
1178
710
  /**
1179
- * Resolve once the server has durably accepted the local document state as of
711
+ * Resolve once the server has durably accepted the local commits as of
1180
712
  * *now* — the capability an Agent tool needs to answer "did my edit land?"
1181
713
  * before reporting success.
1182
714
  *
1183
715
  * Call it right after the editor ops whose durability matters. It snapshots the
1184
- * local doc's current version and resolves on the first push outcome whose
1185
- * `serverVV` covers that version, i.e. the server log is at least as advanced as
1186
- * the local doc was when this was called.
716
+ * latest local commit's version (or the loaded baseline before any edit) and
717
+ * resolves when an authoritative server version covers it. Remote-only
718
+ * imports do not extend this target, matching the displayed confirmation state.
1187
719
  *
1188
720
  * Version coverage, not byte identity, is the acceptance test — for two reasons:
1189
721
  * the ops may reach the server inside a merged blob rather than as the exact
@@ -1205,20 +737,39 @@ declare class MengineDocSession {
1205
737
  * step. The committed change drives DocManager's local-update push.
1206
738
  */
1207
739
  get editor(): SemanticEditor;
740
+ /** Current document snapshot (read model). */
741
+ snapshot(): VideoDocument;
742
+ /** Current-session undo/redo availability. Loading and closed sessions report false. */
743
+ getUndoState(): MengineUndoState;
1208
744
  /**
1209
- * Opaque version token of the local oplog (base64 `VersionVector.encode`).
1210
- * Equality-comparable only: equal means no observed change (local or
1211
- * remote-arrived) since the token was taken. Throws when not started.
745
+ * Supplies current availability immediately, then coalesces stack changes in a
746
+ * microtask. Session teardown publishes empty availability synchronously.
1212
747
  */
1213
- version(): string;
748
+ subscribeUndoState(cb: (state: MengineUndoState) => void): () => void;
1214
749
  /**
1215
- * The live document adapter, exposed for journal replay (commit channel).
1216
- * Replaying through it still goes SemanticEditor → Loro → mengine-server —
1217
- * no write bypass. Typed by the narrow interface on purpose.
750
+ * Undo a local edit immediately; server confirmation remains asynchronous.
751
+ * On a shared LWW field this writes its prior value, potentially overwriting a
752
+ * later remote edit to that same field. Returns false if no update is produced.
1218
753
  */
1219
- get documentAdapter(): SemanticDocumentAdapter;
1220
- /** Current document snapshot (read model). */
1221
- snapshot(): VideoDocument;
754
+ undo(options?: CommitOptions): boolean;
755
+ /**
756
+ * Restore the state visible before undo without rerunning external side effects.
757
+ * Returns false if no update is produced; durable confirmation is separate.
758
+ */
759
+ redo(options?: CommitOptions): boolean;
760
+ /**
761
+ * Combine existing semantic operations (e.g. trim a clip and adjust its volume)
762
+ * or repeated commits during one drag gesture into a single undo step. A gesture
763
+ * that only previews locally and commits once on release needs no group.
764
+ * Each commit is immediately visible locally and enters sync independently;
765
+ * a later failure does not roll it back.
766
+ * Always pair with endUndoGroup in a finally block. Conflicting remote imports
767
+ * can end/split the group early, and unrelated local edits would join it.
768
+ * Complete asynchronous asset preparation before opening the group.
769
+ */
770
+ beginUndoGroup(): void;
771
+ /** End a gesture, including one already split by a conflicting remote import. */
772
+ endUndoGroup(): void;
1222
773
  /**
1223
774
  * Start the sync stack and connect the document.
1224
775
  *
@@ -1227,6 +778,11 @@ declare class MengineDocSession {
1227
778
  * surfaces through `subscribe`.
1228
779
  */
1229
780
  start(): Promise<VideoDocument>;
781
+ getSyncState(): MengineDocSyncState;
782
+ private confirmationTarget;
783
+ /** Immediately supplies current state; unsubscribe when the host changes docs. */
784
+ subscribeSyncState(cb: (state: MengineDocSyncState) => void): () => void;
785
+ private emitSyncState;
1230
786
  subscribe(cb: (event: MengineDocSessionUpdateEvent) => void): () => void;
1231
787
  onStateChange(cb: (state: DocState) => void): () => void;
1232
788
  getState(): DocState;
@@ -1568,4 +1124,4 @@ declare function hostForAbsMs(ranges: MainClipRange[], absMs: number): MainClipR
1568
1124
  */
1569
1125
  declare function relativePositionForAbs(ranges: MainClipRange[], absMs: number): TrackItemTimePosition;
1570
1126
  //#endregion
1571
- export { type Aggregation, type AssembledCaptionContent, type AssembledPhoneticScriptContent, type Attachment, type AudioMediaAssetFact, type BgmPart, type CaptionContentInput, type CaptionPart, type CaptionSegmentSelection, type CaptionStyle, type ClipEntityId, type ClipPlacement, type CommitOptions, DEFAULT_UNIT_TIME_MS, type DeleteBgmInput, type DeleteClipInput, type DeleteClipTreeInput, type DeleteVoiceoverInput, type DerivedItemPosition, type DocStorageLike, type DocVersionMark, type DocumentAudioScript, ENTITY_TIMELINE_PROJECTION_SCHEMA_VERSION, type EditorFoundation, type EntityGraphCommitOptions, EntityGraphHttpClient, type EntityGraphState, EntityTimelineEditor, type EntityTimelineIdFactory, EntityTimelineProjectionError, type EntityTimelineTrackRole, IMPLEMENTED_SEMANTIC_OP_KINDS, type ImageMediaAssetFact, type ImplementedSemanticOpKind, type ImportedMediaAsset, type InitialDocumentFacts, type InsertCaptionClipInput, type InsertClipInput, type InsertMediaClipInput, type InsertMediaClipsInput, type InsertPlacedClipInput, type JournalEntry, LANE_KINDS_IN_STACK_ORDER, type LaneKind, type LinearClipSpeed, type MainClipRange, type MakeEmptyPart, ManualSyncDoc, type ManualSyncDocOptions, MedeoHttpDocStorage, type MedeoHttpDocStorageOptions, type MediaAssetFact, type MediaClipInsertion, MemoryDocStorage, MengineAckFailedError, type MengineAuditEntry, type MengineAuditResponse, MengineDocSession, type MengineDocSessionOptions, type MengineDocSessionUpdateEvent, type MengineDocumentVersion, type MengineEventStreamOptions, MengineHttpClient, type MengineHttpClientOptions, MengineHttpRequestError, MenginePushRejectedError, type MenginePushResponse, type MenginePushUpdateResponse, type MengineRejectedResponse, type MengineSnapshotResponse, type MengineSseUpdateEvent, type MengineSyncResponse, type MengineUpdateMeta, MirrorVideoDocumentAdapter, type MirrorVideoDocumentOptions, type MoveClipInput, type MoveClipsToStartsInput, type MoveSequentialClipsInput, type MoveVoiceoverInput, type OpActor, type PartAggregation, type PartIdFactory, type PartKind, type PartUnion, type PatchCaptionStyleInput, PlainMemoryAdapter, type PlainMemoryAdapterOptions, type PlannedSemanticOpKind, type PullFailureReason, type PullResult, type PushOutcome, type PushOutcomeKind, type PushResult, type PushResultKind, type ReplaceClipContentInput, type ReplaceMediaClipInput, type ReplaceSequentialClipsInput, type ReplacementMediaClipInput, type ResolvedEntityClipPlacement, type ResolvedEntityTimelineLayout, type ResolvedEntityTrack, SchemaValidator, ScriptCompositionError, type SemanticDocumentAdapter, SemanticEditor, type SemanticOpInput, type SemanticOpKind, type SemanticOpName, type SequentialClipAnchor, type SetBgmInput, type SetCaptionVisibilityInput, type SetClipPlacementInput, type SetClipSpeedInput, type SetClipVolumeInput, type SnapshotReadable, type SolvedVideoDocument, type SpeechHostMap, type SpeechPart, type SpeedShift, TIMELINE_SKELETON_DURATION_MS, type Timeline, type TimelineDoc, type TimelineItem, type Track, type TrackDraft, type TrackItem, type TrackItemDraft, type TrackItemTimePosition, type TransactAudit, type TrimClipInput, type UpdateClipInput, type UpdateClipMarkerInput, VIDEO_DOCUMENT_SCHEMA_VERSION, ValidationError, type VideoClipPart, type VideoDocument, type VideoDocumentDraft, type VideoDocumentMirrorSchema, type VideoDocumentSchemaVersion, VideoDocumentValidationError, type VideoDocumentValidationIssue, type VideoDocumentValidationIssueCode, type VideoDraft, type CaptionPart$1 as VideoDraftCaptionPart, type VideoDraftPartUnion, type Timeline$1 as VideoDraftTimeline, type Track$1 as VideoDraftTrack, type TrackItem$1 as VideoDraftTrackItem, type VideoMediaAssetFact, type VisualMediaAssetFact, type VoiceMediaAssetFact, type VoiceoverCaptionFact, type VoiceoverTakeInput, type VoiceoverTakeResult, type WaitForServerAckOptions, applyEntityTimelineProjection, arrangeMainTrackSeamlessly, assembleCaptionContent, assembleEntityContent, assemblePhoneticScriptContent, assembleScriptText, assertCanonicalEditorResources, assertEntityProjectionPreservesLegacy, assertMediaAssetWritePolicy, assertValidVideoDocument, base64ToBytes, buildInitialVideoDocument, buildSpeechHostMap, bytesToBase64, cascadeAfterVideoClipChanges, createEditSandbox, createMirrorVideoDocument, createMirrorVideoDocumentAdapter, createPlainMemoryAdapter, decodeDocVersionMark, derivePositionFromAbs, effectiveVideoClipDurationMs, encodeDocVersionMark, ensureEditorFoundation, ensureLaneTrack, fillMainTrackTimeGaps, findComposedAudioScript, findLaneTrack, fromVideoDocument, generatePartId, getAt, hostForAbsMs, importMediaAsset, isEmptyVideoClip, isImplementedSemanticOpKind, isMap, laneTrackId, mainTrackRanges, migrateLegacyTimelineToEntities, partDurationMs, partUnionSchema, prepareCaptionContent, projectEntityTimeline, readDocumentAudioScript, readMainTrackItems, readMengineEventStream, readPart, readPartDurationMs, readVideoDocumentFromDraft, reassignSpeechesToVideoClipsByTime, recalculateTimelineDuration, relativePositionForAbs, replayJournal, resolveAllSpeechOverlaps, resolveEntityTimelineLayout, resolveSpeechOverlapByShiftingVideos, safeDurationMs, index_d_exports as schemas, selectAudioScriptSegments, snapshotToPlain, solveVideoDocument, speedOf, syncAggregatedClipsTimePosition, toVideoDocument, validateVideoDocument, videoDocumentMirrorSchema, videoDocumentSchema, writeVideoDocumentToDraft };
1127
+ export { type Aggregation, type Attachment, type BgmPart, type CaptionPart, type CaptionStyle, type CommitOptions, DEFAULT_UNIT_TIME_MS, type DerivedItemPosition, type DocStorageLike, type DocVersionMark, IMPLEMENTED_SEMANTIC_OP_KINDS, type ImplementedSemanticOpKind, type InitialDocumentFacts, LANE_KINDS_IN_STACK_ORDER, type LaneKind, type MainClipRange, type MakeEmptyPart, ManualSyncDoc, type ManualSyncDocOptions, MedeoHttpDocStorage, type MedeoHttpDocStorageOptions, MemoryDocStorage, MengineAckFailedError, type MengineAuditEntry, type MengineAuditResponse, MengineDocSession, type MengineDocSessionOptions, type MengineDocSessionUpdateEvent, type MengineDocSyncState, type MengineDocumentVersion, type MengineEventStreamOptions, MengineHttpClient, type MengineHttpClientOptions, MengineHttpRequestError, MenginePushRejectedError, type MenginePushResponse, type MenginePushUpdateResponse, type MengineRejectedResponse, type MengineSnapshotResponse, type MengineSseUpdateEvent, type MengineSyncResponse, type MengineUndoState, type MengineUpdateMeta, MirrorVideoDocumentAdapter, type MirrorVideoDocumentOptions, type OpActor, type PartAggregation, type PartKind, type PartUnion, type PlannedSemanticOpKind, type PullFailureReason, type PullResult, type PushOutcome, type PushOutcomeKind, type PushResult, type PushResultKind, SchemaValidator, type SemanticDocumentAdapter, SemanticEditor, type SemanticOpInput, type SemanticOpKind, type SemanticOpName, type SnapshotReadable, type SolvedVideoDocument, type SpeechHostMap, type SpeechPart, type SpeedShift, TIMELINE_SKELETON_DURATION_MS, type Timeline, type TimelineDoc, type TimelineItem, type Track, type TrackDraft, type TrackItem, type TrackItemDraft, type TrackItemTimePosition, type TransactAudit, VIDEO_DOCUMENT_SCHEMA_VERSION, ValidationError, type VideoClipPart, type VideoDocument, type VideoDocumentDraft, type VideoDocumentMirrorSchema, type VideoDocumentSchemaVersion, VideoDocumentValidationError, type VideoDocumentValidationIssue, type VideoDocumentValidationIssueCode, type VideoDraft, type CaptionPart$1 as VideoDraftCaptionPart, type VideoDraftPartUnion, type Timeline$1 as VideoDraftTimeline, type Track$1 as VideoDraftTrack, type TrackItem$1 as VideoDraftTrackItem, type WaitForServerAckOptions, arrangeMainTrackSeamlessly, assertValidVideoDocument, base64ToBytes, buildInitialVideoDocument, buildSpeechHostMap, bytesToBase64, cascadeAfterVideoClipChanges, createMirrorVideoDocument, createMirrorVideoDocumentAdapter, decodeDocVersionMark, derivePositionFromAbs, encodeDocVersionMark, ensureLaneTrack, fillMainTrackTimeGaps, findLaneTrack, fromVideoDocument, generatePartId, getAt, hostForAbsMs, isEmptyVideoClip, isImplementedSemanticOpKind, isMap, laneTrackId, mainTrackRanges, partDurationMs, partUnionSchema, readMainTrackItems, readMengineEventStream, readPart, readPartDurationMs, readVideoDocumentFromDraft, reassignSpeechesToVideoClipsByTime, recalculateTimelineDuration, relativePositionForAbs, resolveAllSpeechOverlaps, resolveSpeechOverlapByShiftingVideos, safeDurationMs, index_d_exports as schemas, snapshotToPlain, solveVideoDocument, syncAggregatedClipsTimePosition, toVideoDocument, validateVideoDocument, videoDocumentMirrorSchema, videoDocumentSchema };