@mengine/medeo-tool 1.2.1-alpha.9 → 1.3.1-alpha.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as SandboxEntity, a as EntityFacade, b as UpdateEntityInput, c as ImportAssetInput, d as JsonValue, f as KnownEntityKind, g as RelationFacade, h as LinkRelationInput, i as EntityCommand, l as JsonObject, m as LinkGeneratedRelationInput, n as CreateEntityInput, o as EntityPlanState, p as KnownRelationKind, r as DeleteEntityInput, s as EntityStoreSnapshot, t as AuthorableRelationKind, u as JsonPrimitive, v as SandboxRelation, y as UnlinkRelationInput } from "./entity-contract-DycLxdQ5.mjs";
2
- import { JournalEntry, ManualSyncDoc, MediaAssetFact, PartIdFactory, SemanticOpName, VideoDocument, VideoDraft, fromVideoDocument } from "@mengine/medeo-client";
1
+ import { _ as SandboxEntity, a as EntityFacade, b as UpdateEntityInput, c as JsonObject, d as KnownEntityKind, f as KnownRelationKind, g as ResourceEntityKind, h as RelationFacade, i as EntityCommand, l as JsonPrimitive, m as LinkRelationInput, n as CreateEntityInput, o as EntityPlanState, p as LinkGeneratedRelationInput, r as DeleteEntityInput, s as EntityStoreSnapshot, t as AuthorableRelationKind, u as JsonValue, v as SandboxRelation, y as UnlinkRelationInput } from "./entity-contract-DHasvrhq.mjs";
2
+ import { JournalEntry, ManualSyncDoc, PartIdFactory, SemanticOpName, VideoDocument, VideoDraft, fromVideoDocument } from "@mengine/medeo-client";
3
3
  import { AddSpeechesInput, AddVideoClipsInput, AdjustBgmVolumeInput, AdjustSpeechVolumeInput, AdjustVideoClipDurationInput, AdjustVideoClipVolumeInput, ChangeSpeechScriptInput, ChangeSpeechVoiceInput, DeleteBgmInput, DeleteSpeechesInput, DeleteVideoClipsInput, MoveSpeechesInput, MoveVideoClipsByAnchorInput, MoveVideoClipsInput, ReplaceVideoClipContentInput, ReplaceVideoClipSequenceInput, SetBgmInput, SetCaptionStyleInput, SetCaptionVisibilityInput, SetVideoClipSpeedShiftInput } from "@mengine/medeo-client/schemas";
4
4
 
5
5
  //#region src/document/compact-projection.d.ts
@@ -49,6 +49,8 @@ interface SandboxCheckpoint {
49
49
  readonly index: number;
50
50
  }
51
51
  interface ChangePlan {
52
+ /** Native operations compiled against the causal sandbox baseline. */
53
+ loro_update?: string;
52
54
  readonly plan_kind: 'timeline' | 'entities';
53
55
  doc_id: string;
54
56
  base_version: string;
@@ -246,7 +248,7 @@ declare const MEDEO_TOOL_DESCRIPTION: string;
246
248
  //#endregion
247
249
  //#region src/schema.d.ts
248
250
  declare const MEDEO_TOOL_NAME = "medeo";
249
- type MedeoToolOp = 'snapshot' | 'migrate-legacy' | 'run-edit-script' | 'commit-plan';
251
+ type MedeoToolOp = 'snapshot' | 'run-edit-script' | 'commit-plan';
250
252
  /**
251
253
  * JSON Schema for the host-facing `medeo` tool surface.
252
254
  *
@@ -256,223 +258,105 @@ type MedeoToolOp = 'snapshot' | 'migrate-legacy' | 'run-edit-script' | 'commit-p
256
258
  * journal used for commit.
257
259
  */
258
260
  declare const MEDEO_TOOL_PARAMETERS: {
259
- readonly type: 'object';
260
- readonly required: readonly ['op', 'doc_id'];
261
+ readonly type: "object";
262
+ readonly required: readonly ["op", "doc_id"];
261
263
  readonly additionalProperties: false;
262
264
  readonly properties: {
263
265
  readonly op: {
264
- readonly type: 'string';
265
- readonly enum: readonly ['snapshot', 'migrate-legacy', 'run-edit-script', 'commit-plan'];
266
- readonly description: 'Which Medeo document operation to run.';
266
+ readonly type: "string";
267
+ readonly enum: readonly ["snapshot", "run-edit-script", "commit-plan"];
268
+ readonly description: "Which Medeo document operation to run.";
267
269
  };
268
270
  readonly doc_id: {
269
- readonly type: 'string';
271
+ readonly type: "string";
270
272
  readonly minLength: 1;
271
- readonly description: 'Medeo document id. Copy it from the host context; never invent it.';
273
+ readonly description: "Medeo document id. Copy it from the host context; never invent it.";
272
274
  };
273
275
  readonly script: {
274
- readonly type: 'string';
276
+ readonly type: "string";
275
277
  readonly minLength: 1;
276
- readonly description: 'JavaScript body for run-edit-script. Use edit, timeline, entities, relations, checkpoint, rollbackTo, inputs, and console. Asset import, media relations, and timeline entity edits share one entity plan.';
278
+ readonly description: "JavaScript body for run-edit-script. Use edit, timeline, entities, relations, checkpoint, rollbackTo, inputs, and console. Asset import, media relations, and timeline entity edits share one entity plan.";
277
279
  };
278
280
  readonly inputs: {
279
- readonly type: 'object';
280
- readonly description: 'Pre-materialized, side-effect-free values passed into the script, including recalled asset facts. Generation history is never an input: the host queries lineage itself and syncs generated Relations after each commit. Generation and network IO must happen in the host before this call.';
281
- };
282
- readonly asset_facts: {
283
- readonly type: 'array';
284
- readonly description: 'Factual asset metadata recalled by the host for migrate-legacy only. The package reads the canonical legacy snapshot and version itself; never supply a clip trim window as media duration.';
285
- readonly items: {
286
- readonly oneOf: readonly [{
287
- readonly type: 'object';
288
- readonly additionalProperties: false;
289
- readonly required: readonly ['assetId', 'kind'];
290
- readonly properties: {
291
- readonly assetId: {
292
- readonly type: 'string';
293
- readonly minLength: 1;
294
- };
295
- readonly kind: {
296
- readonly const: 'image';
297
- };
298
- readonly storageKey: {
299
- readonly type: 'string';
300
- readonly minLength: 1;
301
- };
302
- };
303
- }, {
304
- readonly type: 'object';
305
- readonly additionalProperties: false;
306
- readonly required: readonly ['assetId', 'kind', 'durationMs'];
307
- readonly properties: {
308
- readonly assetId: {
309
- readonly type: 'string';
310
- readonly minLength: 1;
311
- };
312
- readonly kind: {
313
- readonly const: 'video';
314
- };
315
- readonly durationMs: {
316
- readonly type: 'integer';
317
- readonly minimum: 1;
318
- };
319
- readonly storageKey: {
320
- readonly type: 'string';
321
- readonly minLength: 1;
322
- };
323
- };
324
- }, {
325
- readonly type: 'object';
326
- readonly additionalProperties: false;
327
- readonly required: readonly ['assetId', 'kind', 'durationMs', 'storageKey'];
328
- readonly properties: {
329
- readonly assetId: {
330
- readonly type: 'string';
331
- readonly minLength: 1;
332
- };
333
- readonly kind: {
334
- readonly const: 'audio';
335
- };
336
- readonly durationMs: {
337
- readonly type: 'integer';
338
- readonly minimum: 1;
339
- };
340
- readonly storageKey: {
341
- readonly type: 'string';
342
- readonly minLength: 1;
343
- };
344
- };
345
- }, {
346
- readonly type: 'object';
347
- readonly additionalProperties: false;
348
- readonly required: readonly ['assetId', 'kind', 'durationMs', 'storageKey', 'voice'];
349
- readonly properties: {
350
- readonly assetId: {
351
- readonly type: 'string';
352
- readonly minLength: 1;
353
- };
354
- readonly durationMs: {
355
- readonly type: 'integer';
356
- readonly minimum: 1;
357
- };
358
- readonly storageKey: {
359
- readonly type: 'string';
360
- readonly minLength: 1;
361
- };
362
- readonly voice: {
363
- readonly type: 'object';
364
- readonly additionalProperties: false;
365
- readonly required: readonly ['system', 'key'];
366
- readonly properties: {
367
- readonly system: {
368
- readonly const: 'voice-library';
369
- };
370
- readonly key: {
371
- readonly type: 'string';
372
- readonly minLength: 1;
373
- };
374
- readonly name: {
375
- readonly type: 'string';
376
- };
377
- };
378
- };
379
- readonly kind: {
380
- readonly const: 'voice';
381
- };
382
- };
383
- }];
384
- };
281
+ readonly type: "object";
282
+ readonly description: "Pre-materialized, side-effect-free values passed into the script, including recalled asset facts. Generation history is never an input: the host queries lineage itself and syncs generated Relations after each commit. Generation and network IO must happen in the host before this call.";
385
283
  };
386
284
  readonly timeout_ms: {
387
- readonly type: 'integer';
285
+ readonly type: "integer";
388
286
  readonly minimum: 1;
389
- readonly description: 'Maximum script wall-clock time after worker startup (default 2000).';
287
+ readonly description: "Maximum script wall-clock time after worker startup (default 2000).";
390
288
  };
391
289
  readonly memory_limit_mb: {
392
- readonly type: 'integer';
290
+ readonly type: "integer";
393
291
  readonly minimum: 16;
394
- readonly description: 'Worker old-generation memory ceiling in MB (default 256).';
292
+ readonly description: "Worker old-generation memory ceiling in MB (default 256).";
395
293
  };
396
294
  readonly auto_commit: {
397
- readonly type: 'boolean';
398
- readonly description: 'Commit the returned plan immediately after the sandbox succeeds. Default false: return preview plus plan_id for explicit commit.';
295
+ readonly type: "boolean";
296
+ readonly description: "Commit the returned plan immediately after the sandbox succeeds. Default false: return preview plus plan_id for explicit commit.";
399
297
  };
400
298
  readonly plan_id: {
401
- readonly type: 'string';
299
+ readonly type: "string";
402
300
  readonly minLength: 1;
403
- readonly description: 'Plan id returned by run-edit-script; required by commit-plan.';
301
+ readonly description: "Plan id returned by run-edit-script; required by commit-plan.";
404
302
  };
405
303
  readonly validation: {
406
- readonly type: 'string';
407
- readonly enum: readonly ['version'];
408
- readonly description: 'Commit with Entity revision CAS; reject concurrent changes.';
304
+ readonly type: "string";
305
+ readonly enum: readonly ["preflight"];
306
+ readonly description: "Publish the native update already validated on its causal Loro fork.";
409
307
  };
410
308
  };
411
309
  readonly oneOf: readonly [{
412
- readonly required: readonly ['op', 'doc_id', 'asset_facts'];
413
- readonly properties: {
414
- readonly op: {
415
- readonly const: 'migrate-legacy';
416
- };
417
- readonly doc_id: {
418
- readonly $ref: '#/properties/doc_id';
419
- };
420
- readonly asset_facts: {
421
- readonly $ref: '#/properties/asset_facts';
422
- };
423
- };
424
- readonly additionalProperties: false;
425
- }, {
426
- readonly required: readonly ['op', 'doc_id'];
310
+ readonly required: readonly ["op", "doc_id"];
427
311
  readonly properties: {
428
312
  readonly op: {
429
- readonly const: 'snapshot';
313
+ readonly const: "snapshot";
430
314
  };
431
315
  readonly doc_id: {
432
- readonly $ref: '#/properties/doc_id';
316
+ readonly $ref: "#/properties/doc_id";
433
317
  };
434
318
  };
435
319
  readonly additionalProperties: false;
436
320
  }, {
437
- readonly required: readonly ['op', 'doc_id', 'script'];
321
+ readonly required: readonly ["op", "doc_id", "script"];
438
322
  readonly properties: {
439
323
  readonly op: {
440
- readonly const: 'run-edit-script';
324
+ readonly const: "run-edit-script";
441
325
  };
442
326
  readonly doc_id: {
443
- readonly $ref: '#/properties/doc_id';
327
+ readonly $ref: "#/properties/doc_id";
444
328
  };
445
329
  readonly script: {
446
- readonly $ref: '#/properties/script';
330
+ readonly $ref: "#/properties/script";
447
331
  };
448
332
  readonly inputs: {
449
- readonly $ref: '#/properties/inputs';
333
+ readonly $ref: "#/properties/inputs";
450
334
  };
451
335
  readonly timeout_ms: {
452
- readonly $ref: '#/properties/timeout_ms';
336
+ readonly $ref: "#/properties/timeout_ms";
453
337
  };
454
338
  readonly memory_limit_mb: {
455
- readonly $ref: '#/properties/memory_limit_mb';
339
+ readonly $ref: "#/properties/memory_limit_mb";
456
340
  };
457
341
  readonly auto_commit: {
458
- readonly $ref: '#/properties/auto_commit';
342
+ readonly $ref: "#/properties/auto_commit";
459
343
  };
460
344
  };
461
345
  readonly additionalProperties: false;
462
346
  }, {
463
- readonly required: readonly ['op', 'doc_id', 'plan_id'];
347
+ readonly required: readonly ["op", "doc_id", "plan_id"];
464
348
  readonly properties: {
465
349
  readonly op: {
466
- readonly const: 'commit-plan';
350
+ readonly const: "commit-plan";
467
351
  };
468
352
  readonly doc_id: {
469
- readonly $ref: '#/properties/doc_id';
353
+ readonly $ref: "#/properties/doc_id";
470
354
  };
471
355
  readonly plan_id: {
472
- readonly $ref: '#/properties/plan_id';
356
+ readonly $ref: "#/properties/plan_id";
473
357
  };
474
358
  readonly validation: {
475
- readonly $ref: '#/properties/validation';
359
+ readonly $ref: "#/properties/validation";
476
360
  };
477
361
  };
478
362
  readonly additionalProperties: false;
@@ -599,10 +483,6 @@ interface MedeoModelContext {
599
483
  type MedeoToolInput = {
600
484
  op: 'snapshot';
601
485
  doc_id: string;
602
- } | {
603
- op: 'migrate-legacy';
604
- doc_id: string;
605
- asset_facts: readonly MediaAssetFact[];
606
486
  } | {
607
487
  op: 'run-edit-script';
608
488
  doc_id: string;
@@ -615,7 +495,7 @@ type MedeoToolInput = {
615
495
  op: 'commit-plan';
616
496
  doc_id: string;
617
497
  plan_id: string;
618
- validation?: 'version' | 'preflight';
498
+ validation?: 'preflight';
619
499
  };
620
500
  type MedeoToolWarning = {
621
501
  kind: 'pull_failed';
@@ -625,9 +505,14 @@ type MedeoToolWarning = {
625
505
  message: string;
626
506
  };
627
507
  type EntityCommitResult = {
508
+ kind: 'conflicted';
509
+ accepted: true;
510
+ entity_revision: number;
511
+ message: string;
512
+ } | {
628
513
  kind: 'committed';
629
514
  ops_applied: number;
630
- collaborated: false;
515
+ collaborated: boolean;
631
516
  entity_revision: number; /** Present only when the host supplies loadGenerationFacts. */
632
517
  generation_sync?: GenerationSyncOutcome;
633
518
  warnings?: MedeoToolWarning[];
@@ -636,11 +521,6 @@ type EntityCommitResult = {
636
521
  reason: 'push_failed';
637
522
  ops_applied: number;
638
523
  message: string;
639
- } | {
640
- kind: 'rejected';
641
- reason: 'entity_revision_mismatch';
642
- expected: number;
643
- actual: number;
644
524
  } | {
645
525
  kind: 'rejected';
646
526
  reason: 'entity_state_rejected';
@@ -649,13 +529,6 @@ type EntityCommitResult = {
649
529
  };
650
530
  type MedeoCommitResult = CommitPlanResult | EntityCommitResult;
651
531
  type MedeoToolResult = {
652
- ok: true;
653
- op: 'migrate-legacy';
654
- doc_id: string;
655
- migration_status: 'committed' | 'already_entity';
656
- entity_revision: number;
657
- next_action: 'snapshot';
658
- } | {
659
532
  ok: true;
660
533
  op: 'snapshot';
661
534
  doc_id: string;
@@ -728,5 +601,5 @@ type MedeoInitialDraft = VideoDraft;
728
601
  */
729
602
  declare function createMedeoTool(options: CreateMedeoToolOptions): MedeoTool;
730
603
  //#endregion
731
- export { type AssetGenerationFact, type AuthorableRelationKind, type ChangePlan, type CommitPlan, type CommitPlanOptions, type CommitPlanResult, type CompactProjectionOptions, type ConsoleShim, type CreateEntityInput, type CreateMedeoToolOptions, type DeleteEntityInput, type EditFacade, EditSandboxSession, type EditSandboxSessionOptions, type EditScriptResult, type EntityCommand, type EntityCommitResult, type EntityFacade, type EntityPlanState, type EntityStoreSnapshot, type GenerationFactsLoader, type GenerationSyncOutcome, type ImportAssetInput, type JsonObject, type JsonPrimitive, type JsonValue, type KnownEntityKind, type KnownRelationKind, type LinkGeneratedRelationInput, type LinkRelationInput, MEDEO_TOOL_DESCRIPTION, MEDEO_TOOL_NAME, MEDEO_TOOL_PARAMETERS, type MedeoCommitResult, type MedeoInitialDraft, type MedeoModelContext, type MedeoModelContextInput, type MedeoTool, type MedeoToolInput, type MedeoToolOp, type MedeoToolResult, type RelationFacade, type RunEditScriptOptions, type SandboxCheckpoint, type SandboxEntity, type SandboxRelation, type TimelineClipDescriptor, type TimelineFacade, type TimelinePartDescriptor, type UnlinkRelationInput, type UpdateEntityInput, collectAffectedPartIds, commitPlan, createMedeoTool, renderCompactProjection, renderPreview, runEditScript };
604
+ export { type AssetGenerationFact, type AuthorableRelationKind, type ChangePlan, type CommitPlan, type CommitPlanOptions, type CommitPlanResult, type CompactProjectionOptions, type ConsoleShim, type CreateEntityInput, type CreateMedeoToolOptions, type DeleteEntityInput, type EditFacade, EditSandboxSession, type EditSandboxSessionOptions, type EditScriptResult, type EntityCommand, type EntityCommitResult, type EntityFacade, type EntityPlanState, type EntityStoreSnapshot, type GenerationFactsLoader, type GenerationSyncOutcome, type JsonObject, type JsonPrimitive, type JsonValue, type KnownEntityKind, type KnownRelationKind, type LinkGeneratedRelationInput, type LinkRelationInput, MEDEO_TOOL_DESCRIPTION, MEDEO_TOOL_NAME, MEDEO_TOOL_PARAMETERS, type MedeoCommitResult, type MedeoInitialDraft, type MedeoModelContext, type MedeoModelContextInput, type MedeoTool, type MedeoToolInput, type MedeoToolOp, type MedeoToolResult, type RelationFacade, type ResourceEntityKind, type RunEditScriptOptions, type SandboxCheckpoint, type SandboxEntity, type SandboxRelation, type TimelineClipDescriptor, type TimelineFacade, type TimelinePartDescriptor, type UnlinkRelationInput, type UpdateEntityInput, collectAffectedPartIds, commitPlan, createMedeoTool, renderCompactProjection, renderPreview, runEditScript };
732
605
  //# sourceMappingURL=index.d.mts.map