@mengine/medeo-client 1.3.1-alpha.2 → 1.3.1-alpha.4

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,5 +1,4 @@
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-Dxxu0Mi1.js";
1
+ import { $ as VideoDraft, A as assertValidVideoDocument, B as CaptionPart, C as index_d_exports, D as VideoDocumentMirrorSchema, E as VideoDocumentDraft, F as buildSpeechHostMap, G as Timeline, H as PartKind, I as derivePositionFromAbs, J as TrackItemTimePosition, K as Track, L as fromVideoDocument, M as buildInitialVideoDocument, N as DerivedItemPosition, O as videoDocumentMirrorSchema, P as SpeechHostMap, Q as VideoDocumentValidationIssueCode, R as toVideoDocument, S as ValidationError, T as TrackItemDraft, U as PartUnion, V as DEFAULT_UNIT_TIME_MS, W as SpeechPart, X as VideoDocument, Y as VideoClipPart, Z as VideoDocumentValidationIssue, _ as PlannedSemanticOpKind, a as MirrorVideoDocumentOptions, at as PartAggregation, b as SchemaValidator, c as CommitOptions, ct as Track$1, d as SemanticEditor, et as VideoDraftContent, f as SemanticOpInput, g as ImplementedSemanticOpKind, h as IMPLEMENTED_SEMANTIC_OP_KINDS, i as MirrorVideoDocumentAdapter, it as CaptionStyle, j as validateVideoDocument, k as VideoDocumentValidationError, l as OpActor, lt as TrackItem$1, m as TransactAudit, n as videoDocumentSchema, nt as Attachment, o as createMirrorVideoDocument, ot as SpeedShift, p as SemanticOpName, q as TrackItem, r as readVideoDocumentFromDraft, rt as CaptionPart$1, s as createMirrorVideoDocumentAdapter, st as Timeline$1, t as partUnionSchema, tt as VideoDraftPartUnion, u as SemanticDocumentAdapter, v as SemanticOpKind, w as TrackDraft, x as SnapshotReadable, y as isImplementedSemanticOpKind, z as BgmPart } from "./index-DdnuQf17.js";
3
2
  import { 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";
@@ -178,498 +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 revision: number;
225
- readonly rows: EntityRelationRows;
226
- }
227
- interface EntityGraphCommitOptions {
228
- /** Server version vector proving the explicit legacy-to-Entity migration baseline. */
229
- readonly migrationBaseVv?: string;
230
- }
231
- /** Browser-safe authenticated CAS client for a document's Entity graph. */
232
- declare class EntityGraphHttpClient {
233
- private readonly options;
234
- private readonly transport;
235
- private readonly endpoint;
236
- constructor(options: MengineHttpClientOptions);
237
- fetchState(): Promise<EntityGraphState>;
238
- /**
239
- * Replace the complete Entity graph under the baseline revision.
240
- *
241
- * Deletion intent is derived from baseline IDs omitted from `nextRows`, so a
242
- * transient create-then-remove never becomes a request to delete unknown
243
- * persisted data.
244
- */
245
- commit(baseState: EntityGraphState, nextRows: EntityRelationRows, options?: EntityGraphCommitOptions): Promise<EntityGraphState>;
246
- private request;
247
- }
248
- //#endregion
249
- //#region src/entity-editor/types.d.ts
250
- /** Injectable domain-id mint shared by Entity and Relation authoring surfaces. */
251
- type EntityTimelineIdFactory = (prefix: 'entity' | 'relation') => string;
252
- interface ImageMediaAssetFact {
253
- readonly assetId: string;
254
- readonly kind: 'image';
255
- readonly storageKey?: string;
256
- }
257
- interface VideoMediaAssetFact {
258
- readonly assetId: string;
259
- readonly kind: 'video';
260
- readonly durationMs: number;
261
- readonly storageKey?: string;
262
- }
263
- interface AudioMediaAssetFact {
264
- readonly assetId: string;
265
- readonly kind: 'audio';
266
- readonly durationMs: number;
267
- readonly storageKey: string;
268
- }
269
- interface VoiceMediaAssetFact {
270
- /** Stable external speech result id, independent of the placed Clip id. */
271
- readonly assetId: string;
272
- readonly kind: 'voice';
273
- readonly durationMs: number;
274
- readonly storageKey: string;
275
- /** Present for synthesized voice, absent for original recorded audio. */
276
- readonly voice?: VoiceDescriptor;
277
- }
278
- /** Facts resolved from media storage. A trim window never substitutes for intrinsic duration. */
279
- type MediaAssetFact = ImageMediaAssetFact | VideoMediaAssetFact | AudioMediaAssetFact | VoiceMediaAssetFact;
280
- type ClipPlacement = {
281
- readonly kind: 'sequential';
282
- readonly order: number;
283
- } | {
284
- readonly kind: 'absolute';
285
- readonly targetRange: SequenceRange<number>;
286
- } | {
287
- readonly kind: 'anchored';
288
- readonly hostClipEntityId: string;
289
- readonly anchorOffset: number;
290
- };
291
- interface InsertPlacedClipInput {
292
- readonly trackEntityId: string;
293
- readonly contentEntityId: string;
294
- readonly sourceRange: SequenceRange<number>;
295
- readonly duration: SequenceDuration<number>;
296
- readonly placement: ClipPlacement;
297
- readonly clipPayload?: JsonObject;
298
- /** Stable caller-owned placement identity, when one already exists outside the graph. */
299
- readonly clipEntityId?: string;
300
- }
301
- interface SetClipPlacementInput {
302
- readonly clipEntityId: string;
303
- readonly placement: ClipPlacement;
304
- }
305
- type SequentialClipAnchor = {
306
- readonly position: 'before' | 'after';
307
- readonly clipEntityId: string;
308
- } | {
309
- readonly position: 'trackStart';
310
- };
311
- interface MoveSequentialClipsInput {
312
- readonly clipEntityIds: readonly string[];
313
- readonly anchor: SequentialClipAnchor;
314
- readonly onAnchored: 'follow' | 'keepAbsolute';
315
- }
316
- interface MoveClipsToStartsInput {
317
- readonly moves: readonly {
318
- readonly clipEntityId: string;
319
- readonly newStartMs: number;
320
- }[];
321
- /** Absolute-time drags preserve every voiceover's current visible landing. */
322
- readonly onAnchored: 'keepAbsolute';
323
- }
324
- interface DeleteClipTreeInput {
325
- readonly clipEntityIds: readonly string[];
326
- readonly onAnchored: 'cascade' | 'detach';
327
- }
328
- interface VoiceoverCaptionFact {
329
- /** Stable placed caption identity supplied by the materialized side effect. */
330
- readonly captionClipEntityId: string;
331
- /** Directly held bases; includes the AudioScript used by the Voice. */
332
- readonly baseEntityIds: readonly string[];
333
- /** Ordered selection of AudioScript segments; caption text is never passed inline. */
334
- readonly selections: readonly CaptionSegmentSelection[];
335
- readonly startMs: number;
336
- readonly durationMs: number;
337
- readonly style?: CaptionStyleFields;
338
- }
339
- type VoiceoverTakeInput = {
340
- readonly timelineEntityId: string; /** Stable placed speech identity, distinct from media.assetId. */
341
- readonly voiceoverClipEntityId: string;
342
- readonly media: VoiceMediaAssetFact; /** Existing pronunciation variant; its composed AudioScript stays the text owner. */
343
- readonly phoneticScriptEntityId: string;
344
- readonly volume: number;
345
- readonly captions: readonly VoiceoverCaptionFact[];
346
- } & ({
347
- readonly placement: ClipPlacement;
348
- readonly hostClipEntityId?: never;
349
- readonly anchorOffset?: never;
350
- } | {
351
- readonly placement?: never;
352
- readonly hostClipEntityId: string;
353
- readonly anchorOffset: number;
354
- });
355
- type VisualMediaAssetFact = ImageMediaAssetFact | VideoMediaAssetFact;
356
- interface InsertMediaClipInput {
357
- readonly timelineEntityId: string;
358
- readonly clipEntityId?: string;
359
- readonly media: VisualMediaAssetFact;
360
- /** Source/display window in whole milliseconds. Images use this as their finite display span. */
361
- readonly sourceRange: SequenceRange<number>;
362
- readonly placement: ClipPlacement;
363
- readonly volume?: number;
364
- }
365
- interface ReplaceMediaClipInput {
366
- readonly clipEntityId: string;
367
- readonly media: VisualMediaAssetFact;
368
- readonly sourceRange: SequenceRange<number>;
369
- }
370
- interface ReplacementMediaClipInput {
371
- readonly clipEntityId?: string;
372
- readonly media: VisualMediaAssetFact;
373
- readonly sourceRange: SequenceRange<number>;
374
- readonly volume?: number;
375
- }
376
- type MediaClipInsertion = {
377
- readonly kind: 'before';
378
- readonly clipEntityId: string;
379
- } | {
380
- readonly kind: 'after';
381
- readonly clipEntityId: string;
382
- } | {
383
- readonly kind: 'firstStart';
384
- readonly startMs: number;
385
- };
386
- interface InsertMediaClipsInput {
387
- readonly timelineEntityId: string;
388
- readonly clips: readonly ReplacementMediaClipInput[];
389
- /** One placement decision for the whole input-ordered block. */
390
- readonly insertion: MediaClipInsertion;
391
- }
392
- interface ReplaceSequentialClipsInput {
393
- readonly timelineEntityId: string;
394
- readonly oldClipEntityIds: readonly string[];
395
- readonly newClips: readonly ReplacementMediaClipInput[];
396
- readonly onAnchored: 'remap' | 'cascade';
397
- }
398
- interface SetClipVolumeInput {
399
- readonly clipEntityId: string;
400
- /** Playback gain in decibels. */
401
- readonly volume: number;
402
- }
403
- interface LinearClipSpeed {
404
- readonly kind: 'linear';
405
- readonly rate: number;
406
- readonly mode?: string;
407
- }
408
- interface SetClipSpeedInput {
409
- readonly clipEntityId: string;
410
- readonly timeRemapping: LinearClipSpeed | null;
411
- }
412
- interface TrimClipInput {
413
- readonly clipEntityId: string;
414
- readonly sourceRange: SequenceRange<number>;
415
- }
416
- interface VoiceoverTakeResult {
417
- readonly voiceoverClipEntityId: string;
418
- readonly voiceEntityId: string;
419
- /** The pronunciation variant the Voice was rendered from. */
420
- readonly phoneticScriptEntityId: string;
421
- /** The base-text owner resolved from the PhoneticScript baseEntityIds. */
422
- readonly audioScriptEntityId: string;
423
- readonly captionClipEntityIds: readonly string[];
424
- }
425
- interface MoveVoiceoverInput {
426
- readonly voiceoverClipEntityId: string;
427
- /** Absolute requested timeline start; MEngine resolves and persists the host relation. */
428
- readonly newStartMs: number;
429
- }
430
- interface DeleteVoiceoverInput {
431
- readonly voiceoverClipEntityIds: readonly string[];
432
- }
433
- interface SetBgmInput {
434
- readonly timelineEntityId: string;
435
- readonly bgmClipEntityId: string;
436
- readonly media: AudioMediaAssetFact;
437
- readonly volume: number;
438
- }
439
- interface DeleteBgmInput {
440
- readonly timelineEntityId: string;
441
- }
442
- interface SetCaptionVisibilityInput {
443
- readonly timelineEntityId: string;
444
- readonly hidden: boolean;
445
- }
446
- interface PatchCaptionStyleInput {
447
- readonly timelineEntityId: string;
448
- readonly style: CaptionStyleFields;
449
- }
450
- interface InsertCaptionClipInput {
451
- readonly timelineEntityId: string;
452
- /** Stable placed caption identity, distinct from the Caption content identity. */
453
- readonly captionClipEntityId?: string;
454
- /** Existing bases composed by this variant; includes an AudioScript text owner. */
455
- readonly baseEntityIds: readonly string[];
456
- /** Ordered selection of the AudioScript segments this Caption displays. */
457
- readonly selections: readonly CaptionSegmentSelection[];
458
- /** Intrinsic cue length of the Caption entity itself; display comes from the placement. */
459
- readonly durationMs: number;
460
- readonly style?: CaptionStyleFields;
461
- readonly placement: ClipPlacement;
462
- }
463
- interface InsertClipInput {
464
- readonly trackEntityId: string;
465
- /** Existing Sequence media Entity id. Asset ids and URLs are not content ids. */
466
- readonly contentEntityId: string;
467
- readonly sourceRange: SequenceRange<number>;
468
- readonly duration: SequenceDuration<number>;
469
- readonly targetRange?: SequenceRange<number>;
470
- readonly clipPayload?: JsonObject;
471
- }
472
- interface UpdateClipMarkerInput {
473
- readonly clipEntityId: string;
474
- readonly sourceRange?: SequenceRange<number>;
475
- /** Passing `undefined` explicitly removes the optional target range. */
476
- readonly targetRange?: SequenceRange<number> | undefined;
477
- readonly duration?: SequenceDuration<number>;
478
- /** Passing `undefined` explicitly removes the optional remapping value. */
479
- readonly timeRemapping?: JsonValue | undefined;
480
- }
481
- interface MoveClipInput {
482
- readonly clipEntityId: string;
483
- readonly trackEntityId: string;
484
- }
485
- interface ReplaceClipContentInput {
486
- readonly clipEntityId: string;
487
- /** Existing Sequence media Entity id. Asset ids and URLs are not content ids. */
488
- readonly contentEntityId: string;
489
- readonly sourceRange: SequenceRange<number>;
490
- readonly duration: SequenceDuration<number>;
491
- readonly targetRange?: SequenceRange<number>;
492
- readonly timeRemapping?: JsonValue;
493
- }
494
- interface DeleteClipInput {
495
- readonly clipEntityId: string;
496
- }
497
- interface UpdateClipInput {
498
- readonly clipEntityId: string;
499
- /** Complete replacement for the Clip-owned payload. */
500
- readonly payload: JsonObject;
501
- }
502
- type ClipEntityId = EntityId;
503
- //#endregion
504
- //#region src/entity-editor/entity-timeline-editor.d.ts
505
- /**
506
- * Graph-native timeline authoring over authoritative Medeo Entity and Relation rows.
182
+ * Part-id generation, aligned with the online ecosystem.
507
183
  *
508
- * Each mutation is applied to a detached graph, validated as a complete DSL set,
509
- * and committed only after validation succeeds.
510
- */
511
- declare class EntityTimelineEditor {
512
- private readonly idFactory;
513
- private state;
514
- constructor(initialRows: EntityRelationRows, idFactory?: EntityTimelineIdFactory);
515
- rows(): EntityRelationRows;
516
- insertClip(input: InsertClipInput): ClipEntityId;
517
- insertPlacedClip(input: InsertPlacedClipInput): ClipEntityId;
518
- updateClipMarker(input: UpdateClipMarkerInput): void;
519
- setClipPlacement(input: SetClipPlacementInput): void;
520
- moveSequentialClips(input: MoveSequentialClipsInput): void;
521
- moveClipsToStarts(input: MoveClipsToStartsInput): void;
522
- moveClip(input: MoveClipInput): void;
523
- replaceClipContent(input: ReplaceClipContentInput): void;
524
- insertMediaClip(input: InsertMediaClipInput): ClipEntityId;
525
- insertMediaClips(input: InsertMediaClipsInput): readonly ClipEntityId[];
526
- replaceMediaClip(input: ReplaceMediaClipInput): void;
527
- setClipVolume(input: SetClipVolumeInput): void;
528
- setClipSpeed(input: SetClipSpeedInput): void;
529
- trimClip(input: TrimClipInput): void;
530
- replaceSequentialClips(input: ReplaceSequentialClipsInput): readonly ClipEntityId[];
531
- deleteClip(input: DeleteClipInput): void;
532
- deleteClipTree(input: DeleteClipTreeInput): void;
533
- updateClip(input: UpdateClipInput): void;
534
- upsertVoiceoverTake(input: VoiceoverTakeInput): VoiceoverTakeResult;
535
- moveVoiceover(input: MoveVoiceoverInput): void;
536
- deleteVoiceover(input: DeleteVoiceoverInput): void;
537
- setBgm(input: SetBgmInput): ClipEntityId;
538
- deleteBgm(input: DeleteBgmInput): void;
539
- setCaptionVisibility(input: SetCaptionVisibilityInput): void;
540
- patchCaptionStyle(input: PatchCaptionStyleInput): void;
541
- /**
542
- * Place a Caption as a composed variant of an existing AudioScript: the
543
- * entity stores baseEntityIds, selection, optional style, and inherent cue-bounded
544
- * Sequence. This helper does not copy base text. The Clip and its display Marker describe this use;
545
- * moving or stretching the returned Clip later changes the Clip/Marker,
546
- * never the Caption entity or the AudioScript.
547
- */
548
- insertCaptionClip(input: InsertCaptionClipInput): ClipEntityId;
549
- private insertPlacedClipIntoDraft;
550
- private ensureRoleTrack;
551
- /** The existing pronunciation variant a Voice consumes; composition is required. */
552
- private requireComposedPhoneticScript;
553
- /** Preserve the factual synthesis input, regardless of persisted endpoint positions. */
554
- private ensurePhoneticRender;
555
- private reconcileVoiceoverCaptions;
556
- private ensureRoleTrackForClip;
557
- private replaceCaptionAlignment;
558
- /**
559
- * Remove one placed Caption use. The composed AudioScript outlives the
560
- * caption: it may anchor further captions and remains the text owner.
561
- */
562
- private removeCaptionClipGraph;
563
- private replaceAnchorHost;
564
- /** Rebuild the legacy edit baseline from current visual order before a high-level cascade. */
565
- private normalizeMainSequential;
566
- private resolveOneVoiceoverOverlap;
567
- private applyClipPlacement;
568
- private reanchorAtAbsolute;
569
- private removeAnchoredDescendants;
570
- private removeClipGraph;
571
- private transact;
572
- private mintEntityId;
573
- private createRelation;
574
- private relinkRelation;
575
- private mintRelationId;
576
- }
577
- //#endregion
578
- //#region src/entity-editor/editor-resources.d.ts
579
- declare const roleOrder: {
580
- readonly caption: 0;
581
- readonly video_clip: 1;
582
- readonly speech: 2;
583
- readonly bgm: 3;
584
- };
585
- type EditorTrackRole = keyof typeof roleOrder;
586
- interface EditorFoundation {
587
- readonly rows: EntityRelationRows;
588
- readonly timelineEntityId: string;
589
- readonly trackEntityIds: Readonly<Record<EditorTrackRole, string>>;
590
- }
591
- /**
592
- * MEngine editor policy, not a cardinality restriction on the general-purpose DSL.
593
- *
594
- * Media variants share one entity identity with their Asset: every
595
- * Image/Video/Audio/Voice Entity must carry its own external locator, every
596
- * external asset id has exactly one claimant, and no media variant may be
597
- * bound through a legacy `physical-asset` Relation. Dual-entity media graphs
598
- * are rejected, not migrated. Caption composes AudioScript text and has no physical text Asset.
599
- */
600
- declare function assertCanonicalEditorResources(rows: EntityRelationRows): void;
601
- /**
602
- * Commit-transition policy shared by the editor, the HTTP commit boundary, the
603
- * host tool, and the entity stores. It compares the authoritative before and
604
- * after rows of one CAS commit and enforces the single-identity write rules
605
- * on the complete after state, with no exemption for historical graphs:
606
- *
607
- * 1. every Image/Video/Audio/Voice Entity carries its own Asset `external`
608
- * identity;
609
- * 2. no `physical-asset` Relation may bind a media variant or Caption;
610
- * 3. a self-carried media identity is immutable — it cannot be rewritten to
611
- * 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.
612
191
  *
613
- * Dual-entity media graphs are rejected instead of being migrated or merged
614
- * implicitly. Deleting media is explicit and allowed.
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.
615
197
  */
616
- declare function assertMediaAssetWritePolicy(before: EntityRelationRows, after: EntityRelationRows): void;
617
- /** Add only missing editor structure; existing identities and owned settings are never replaced. */
618
- declare function ensureEditorFoundation(initial: EntityRelationRows, idFactory?: EntityTimelineIdFactory, timelinePayload?: EntityRow['payload']): EditorFoundation;
619
- //#endregion
620
- //#region src/entity-editor/media-asset-import.d.ts
621
- interface ImportedMediaAsset {
622
- readonly rows: EntityRelationRows;
623
- /** The single media variant identity for this asset id; it is its own Asset. */
624
- readonly contentEntityId: string;
625
- }
626
198
  /**
627
- * Import at the editor boundary, not at asset generation time. Existing
628
- * provenance is retained.
629
- *
630
- * A media variant is a logical facet of its Asset and shares one entity
631
- * identity: the import mints exactly one entity of the media kind that carries
632
- * the external locator itself, and deduplicates only against existing variants
633
- * that already carry the same `(system, key)`. Legacy dual-entity graphs
634
- * (`asset` row plus a `physical-asset` binding) are not reused and are
635
- * rejected by the canonical resource policy instead of being migrated.
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.
636
204
  */
637
- declare function importMediaAsset(initial: EntityRelationRows, fact: MediaAssetFact, idFactory?: EntityTimelineIdFactory): ImportedMediaAsset;
638
- //#endregion
639
- //#region src/entity-editor/legacy-entity-migration.d.ts
640
- /** One-time import only. Ordinary editor operations must never reverse-diff a legacy document. */
641
- declare function migrateLegacyTimelineToEntities(legacy: VideoDocument, assetFacts: readonly MediaAssetFact[], initial?: EntityRelationRows, idFactory?: EntityTimelineIdFactory): EntityRelationRows;
642
- /** Server gate: a cutover may change representation, never the existing render facts. */
643
- declare function assertEntityProjectionPreservesLegacy(legacy: VideoDocument, projection: VideoDocument, rows: EntityRelationRows): void;
644
- //#endregion
645
- //#region src/entity-editor/caption-content.d.ts
646
- interface CaptionContentInput {
647
- readonly contentEntityId: string;
648
- readonly audioScriptEntityId: string;
649
- readonly text: string;
650
- readonly selections?: readonly CaptionSegmentSelection[];
651
- readonly durationMs: number;
652
- }
653
- /** Author Caption content from semantic intent; callers never reconcile variant bases or assembled fields. */
654
- declare function prepareCaptionContent(rows: EntityRelationRows, input: CaptionContentInput): EntityRow<'caption'>;
655
- //#endregion
656
- //#region src/editor/journal.d.ts
657
- /**
658
- * Wire a plain-memory adapter + editor that share a recording id factory, so
659
- * every mutating transact lands in `journal` with ordered `generated_ids`.
660
- */
661
- declare function createEditSandbox(document: VideoDocument, options?: PlainMemoryAdapterOptions): {
662
- adapter: PlainMemoryAdapter;
663
- editor: SemanticEditor;
664
- journal: readonly JournalEntry[];
665
- };
666
- /**
667
- * Re-drive `doc` from a recorded journal, forcing each entry's `generated_ids`
668
- * through a queue-backed id factory. Never mints fresh ids: an empty queue on
669
- * demand throws `unrecorded id`; leftover ids after an entry throws
670
- * `unconsumed ids`. Legacy entries without `generated_ids` are treated as `[]`.
671
- */
672
- 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;
673
207
  //#endregion
674
208
  //#region src/editor/snapshot-utils.d.ts
675
209
  /** Main-track item identity read from a raw snapshot (only `part_id` is needed). */
@@ -762,7 +296,9 @@ type PushResultKind = 'ack' | 'duplicate' | 'rejected' | 'failed' | 'nothing_to_
762
296
  */
763
297
  interface PushResult {
764
298
  kind: PushResultKind;
765
- /** 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`. */
766
302
  updateSeq?: number | undefined;
767
303
  /** Whether the server held ops the local document lacked. See above. */
768
304
  collaborated: boolean;
@@ -886,27 +422,16 @@ declare class ManualSyncDoc {
886
422
  * was passed to the constructor.
887
423
  */
888
424
  editorPeerId(): PeerID;
889
- /** Current document projected to the legacy `VideoDraft` read shape. */
890
- draft(): VideoDraft;
891
- /**
892
- * Replay a deterministic sandbox journal into this document.
893
- *
894
- * The adapter stays private so callers cannot bypass the manual-sync
895
- * lifecycle; journal replay is the one host-side operation that needs the
896
- * adapter's transaction boundary and recorded id queue. Durability is still
897
- * explicit: call {@link push} after replay and report success only from its
898
- * verdict.
899
- */
900
- replayJournal(journal: readonly JournalEntry[]): Promise<void>;
425
+ /** Current content projected into the compatible track and part read shape. */
426
+ content(): VideoDraftContent;
901
427
  /**
902
428
  * Mark the document state the caller has just observed, for a later
903
429
  * {@link hasChangedSince}.
904
430
  *
905
431
  * This pair replaces the legacy integer-version comparison that
906
432
  * `DraftVersionDetector` used to tell the LLM "the draft was modified
907
- * externally, reload before editing". Under mengine `meta.version` never
908
- * changes, so that detector would go permanently silent; comparing version
909
- * vectors restores the same capability.
433
+ * externally, reload before editing". Comparing Loro version vectors covers
434
+ * all collaborative edits without a business revision field in the document.
910
435
  *
911
436
  * Same capability, not a stronger one: like the legacy detector, this only
912
437
  * reports what changed between two moments the caller chose to sample.
@@ -1051,6 +576,9 @@ declare class MedeoHttpDocStorage implements DocStorage {
1051
576
  * tool-level ack wait) subscribe here.
1052
577
  */
1053
578
  subscribePushOutcome(callback: (outcome: PushOutcome) => void): () => void;
579
+ /** Authoritative HTTP reads and accepted pushes, never inferred from SSE bytes. */
580
+ subscribeServerVersion(callback: (version: Uint8Array) => void): () => void;
581
+ private reportServerVersion;
1054
582
  deleteDoc(_docId: string): Promise<void>;
1055
583
  subscribeDocUpdate(callback: (update: DocUpdate, origin: unknown) => void): () => void;
1056
584
  private assertDocId;
@@ -1099,6 +627,14 @@ interface WaitForServerAckOptions {
1099
627
  /** Deadline in ms. Rejects with reason `timeout` when it elapses. */
1100
628
  timeoutMs?: number;
1101
629
  }
630
+ /** Document-level confirmation is independent of local operation completion. */
631
+ interface MengineDocSyncState {
632
+ /** Remote-only imports do not create a new local confirmation obligation. */
633
+ readonly confirmation: 'unknown' | 'pending' | 'confirmed';
634
+ /** Transport/activity phase. Idle does not imply confirmation; failure details
635
+ * remain available through push outcomes and confirmation wait errors. */
636
+ readonly phase: 'connecting' | 'idle' | 'syncing' | 'offline' | 'failed';
637
+ }
1102
638
  interface MengineDocSessionOptions {
1103
639
  docId: string;
1104
640
  client: MengineHttpClient;
@@ -1109,11 +645,6 @@ interface MengineDocSessionOptions {
1109
645
  */
1110
646
  localStorage?: DocStorageLike;
1111
647
  sseReconnectDelayMs?: number;
1112
- /**
1113
- * Keep remote synchronization read-only: pull snapshot/diffs and subscribe to
1114
- * SSE updates, but never POST local Loro updates to the server.
1115
- */
1116
- readonlyMode?: boolean;
1117
648
  }
1118
649
  /**
1119
650
  * A live editing session for one Medeo document — the single entry point clients
@@ -1149,8 +680,15 @@ declare class MengineDocSession {
1149
680
  private adapterValue;
1150
681
  private editorValue;
1151
682
  private started;
683
+ private startTask;
684
+ private destroyed;
685
+ private lifetime;
686
+ private hasConnected;
687
+ private initialVersionValue;
688
+ private localVersionValue;
689
+ private pushErrorValue;
1152
690
  /**
1153
- * Latest server oplog version seen on a push outcome. Lets `waitForServerAck`
691
+ * Latest server oplog version seen on an authoritative HTTP response. Lets `waitForServerAck`
1154
692
  * return without waiting when the server is already known to cover the local
1155
693
  * doc (e.g. nothing was edited since the last confirmed push).
1156
694
  */
@@ -1165,14 +703,14 @@ declare class MengineDocSession {
1165
703
  */
1166
704
  subscribePushOutcome(callback: (outcome: PushOutcome) => void): () => void;
1167
705
  /**
1168
- * Resolve once the server has durably accepted the local document state as of
706
+ * Resolve once the server has durably accepted the local commits as of
1169
707
  * *now* — the capability an Agent tool needs to answer "did my edit land?"
1170
708
  * before reporting success.
1171
709
  *
1172
710
  * Call it right after the editor ops whose durability matters. It snapshots the
1173
- * local doc's current version and resolves on the first push outcome whose
1174
- * `serverVV` covers that version, i.e. the server log is at least as advanced as
1175
- * the local doc was when this was called.
711
+ * latest local commit's version (or the loaded baseline before any edit) and
712
+ * resolves when an authoritative server version covers it. Remote-only
713
+ * imports do not extend this target, matching the displayed confirmation state.
1176
714
  *
1177
715
  * Version coverage, not byte identity, is the acceptance test — for two reasons:
1178
716
  * the ops may reach the server inside a merged blob rather than as the exact
@@ -1194,18 +732,6 @@ declare class MengineDocSession {
1194
732
  * step. The committed change drives DocManager's local-update push.
1195
733
  */
1196
734
  get editor(): SemanticEditor;
1197
- /**
1198
- * Opaque version token of the local oplog (base64 `VersionVector.encode`).
1199
- * Equality-comparable only: equal means no observed change (local or
1200
- * remote-arrived) since the token was taken. Throws when not started.
1201
- */
1202
- version(): string;
1203
- /**
1204
- * The live document adapter, exposed for journal replay (commit channel).
1205
- * Replaying through it still goes SemanticEditor → Loro → mengine-server —
1206
- * no write bypass. Typed by the narrow interface on purpose.
1207
- */
1208
- get documentAdapter(): SemanticDocumentAdapter;
1209
735
  /** Current document snapshot (read model). */
1210
736
  snapshot(): VideoDocument;
1211
737
  /**
@@ -1216,21 +742,18 @@ declare class MengineDocSession {
1216
742
  * surfaces through `subscribe`.
1217
743
  */
1218
744
  start(): Promise<VideoDocument>;
745
+ private open;
746
+ getSyncState(): MengineDocSyncState;
747
+ private confirmationTarget;
748
+ /** Immediately supplies current state; unsubscribe when the host changes docs. */
749
+ subscribeSyncState(cb: (state: MengineDocSyncState) => void): () => void;
750
+ private emitSyncState;
1219
751
  subscribe(cb: (event: MengineDocSessionUpdateEvent) => void): () => void;
1220
752
  onStateChange(cb: (state: DocState) => void): () => void;
1221
753
  getState(): DocState;
1222
754
  destroy(): void;
1223
- /**
1224
- * Resolve once the Loro doc holds the document root.
1225
- *
1226
- * `DocManager` loads from local storage, which starts empty for a fresh
1227
- * client; the server snapshot arrives asynchronously via the first sync job.
1228
- * `loaded` only means the local load ran, so we wait for actual content
1229
- * (populated schema roots) instead, surfaced by the doc subscription set up
1230
- * in `start()`.
1231
- */
1232
- private waitForContent;
1233
- private hasContent;
755
+ /** Merge persisted local edits before exposing the initial content. */
756
+ private waitForLocalLoad;
1234
757
  }
1235
758
  //#endregion
1236
759
  //#region src/storage/memory-doc-storage.d.ts
@@ -1557,4 +1080,4 @@ declare function hostForAbsMs(ranges: MainClipRange[], absMs: number): MainClipR
1557
1080
  */
1558
1081
  declare function relativePositionForAbs(ranges: MainClipRange[], absMs: number): TrackItemTimePosition;
1559
1082
  //#endregion
1560
- 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, 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, 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 };
1083
+ 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, 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 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, ValidationError, type VideoClipPart, type VideoDocument, type VideoDocumentDraft, type VideoDocumentMirrorSchema, VideoDocumentValidationError, type VideoDocumentValidationIssue, type VideoDocumentValidationIssueCode, type VideoDraft, type CaptionPart$1 as VideoDraftCaptionPart, type VideoDraftContent, 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 };