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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -38,7 +38,7 @@ const commit = await medeo.handle({
38
38
  plan_id: run.plan_id,
39
39
  });
40
40
 
41
- // Generation facts are recalled by the host and passed into the sandbox.
41
+ // Media facts are recalled by the host and passed into the sandbox.
42
42
  // This example is text-to-image: there is no invented input-media entity.
43
43
  const entityRun = await medeo.handle({
44
44
  op: 'run-edit-script',
@@ -48,12 +48,10 @@ const entityRun = await medeo.handle({
48
48
  if (typeof inputs.output_asset_id !== 'string' || typeof inputs.track_entity_id !== 'string') {
49
49
  throw new Error('missing recalled generation facts');
50
50
  }
51
- const asset = entities.importAsset({ asset_id: inputs.output_asset_id });
52
- const output = entities.create({
53
- entity_kind: 'image',
54
- payload: { extent: { kind: 'unbounded', start: 0 }, sampling: 'constant', coordinateSpace: 'ms' },
51
+ const { contentEntityId: output } = entities.ensureMedia({
52
+ assetId: inputs.output_asset_id,
53
+ kind: 'image',
55
54
  });
56
- relations.link({ relation_kind: 'physical-asset', endpoint_0_entity_id: output, endpoint_1_entity_id: asset });
57
55
  edit.insertClip({
58
56
  trackEntityId: inputs.track_entity_id,
59
57
  contentEntityId: output,
@@ -70,8 +68,35 @@ await medeo.close();
70
68
  The sandbox has no network, storage, clock, or generation access. Materialize
71
69
  or recall speech/media side effects in the host first and pass stable facts
72
70
  through `inputs`. There is no automatic Asset→Entity projection: the model
73
- selects and imports assets, creates only known typed Entities, and links them
74
- explicitly. Assets and media Entities are intentionally not one-to-one.
71
+ selects when to bring a recalled asset into the editor through `entities.ensureMedia`.
72
+ The resolver gets or creates one typed Asset by external `(system, key)` within
73
+ the document. Image/Video/Audio/Voice are logical Asset variants: the typed row
74
+ directly owns `external`, `storageKey` and its media fields, and its Asset ID is
75
+ also its content Entity ID. Imports create no separate physical-only Asset
76
+ row and no `physical-asset` relation. Raw typed resource creation also reuses
77
+ an existing identity; prefer `ensureMedia` with the recalled media kind.
78
+ `findByAssetId` includes Voice (`memota-speech`) variants. There is no separate
79
+ `importAsset` API.
80
+ Generation facts currently carry bare asset IDs. If a returned fact matches
81
+ both media and speech namespaces, synchronization fails explicitly without
82
+ writing ambiguous lineage edges.
83
+ Conflicting facts or duplicate candidates fail explicitly; no automatic
84
+ merge or deletion occurs. This is the MEngine editor profile, not a global DSL
85
+ cardinality rule. Separate Asset+media graphs are invalid: every media variant
86
+ must directly own its external identity, with no read fallback or migration.
87
+ Inline caption Assets without external identity are not deduplicated.
88
+
89
+ Before model context/snapshot/editing, the host ensures one Timeline and the four
90
+ fixed Tracks (`video_clip`, `speech`, `caption`, `bgm`). Existing IDs, settings and
91
+ relations are retained; repeated calls add no rows or revisions. First initialization
92
+ uses revision CAS and may write. An empty legacy draft is initialized through the
93
+ version-guarded migration path to preserve configured track identities/visibility;
94
+ non-empty legacy content still requires explicit `migrate-legacy`. Missing Tracks
95
+ are filled in a subsequent CAS when necessary. A lost initialization response is
96
+ reconciled by a fresh snapshot, never by assuming success.
97
+
98
+ Each placement still creates an independent Clip and SequenceMarker. Reusing a
99
+ media variant does not share per-placement trim, speed, volume or placement state.
75
100
 
76
101
  The production tool exposes native Clip/Marker editing plus visual placement,
77
102
  voiceover, caption, and BGM helpers through its generated sandbox interface.
@@ -83,9 +108,9 @@ Generation lineage is program-synced, not model-authored. After a confirmed
83
108
  entity commit the tool resolves the plan's diff against host-supplied generation
84
109
  facts and commits missing `generated` Relations between fact-matched media
85
110
  Entities already present in the document (endpoint 0 output, endpoint 1 input;
86
- lookup can use either endpoint). The diff covers created media Entities, edits
87
- that re-point an existing physical-asset binding or Asset external key, and
88
- creations; pairs already fact-resolvable before the plan stay untouched. Models
111
+ lookup can use either endpoint). The diff covers newly exposed media Asset
112
+ identities; placement-only edits and
113
+ pairs already fact-resolvable before the plan stay untouched. Models
89
114
  do not pass generation history through inputs — the host queries it with
90
115
  `loadGenerationFacts(docId, assetIds)`, returning every known generation record
91
116
  involving the given asset ids in either role. Each record must carry an explicit
@@ -95,9 +120,9 @@ that fails the whole query instead of being silently read as text-only.
95
120
  One-sided facts are skipped without creating entities or blocking the commit —
96
121
  lineage sync never backfills a missing source or output Entity; entity creation
97
122
  stays a model decision inside the edit plan. Repeated commits are idempotent,
98
- and deletions, rebindings, and revision conflicts are respected: a CAS-conflict
99
- retry re-derives the trigger keys from the fresh bindings and re-queries the
100
- newly scoped facts, so a backfillable edge is never misreported as current.
123
+ and deletions and revision conflicts are respected: a CAS-conflict retry reads
124
+ the fresh graph and recomputes missing edges without recreating deleted endpoints.
125
+ Asset identities are immutable, so each synchronization queries its facts once.
101
126
  An empty result array means no known lineage; a rejection means the lineage
102
127
  query failed and is reported as `generation_sync: {status:'failed'}` plus a
103
128
  `generation_sync_failed` warning — never as synced state.
@@ -1,3 +1,5 @@
1
+ import { MediaAssetFact } from "@mengine/medeo-client";
2
+
1
3
  //#region src/entity/entity-contract.d.ts
2
4
  type JsonPrimitive = string | number | boolean | null;
3
5
  type JsonValue = JsonPrimitive | JsonObject | JsonValue[];
@@ -5,7 +7,9 @@ interface JsonObject {
5
7
  [key: string]: JsonValue;
6
8
  }
7
9
  type KnownEntityKind = 'axvideo' | 'timeline' | 'track' | 'clip' | 'asset' | 'video' | 'audio' | 'voice' | 'image' | 'sequence-marker' | 'viewport' | 'audio-script' | 'phonetic-script' | 'caption';
8
- type KnownRelationKind = 'timeline-track' | 'track-clip' | 'clip-marker' | 'marker-content' | 'axvideo-marker' | 'marker-timeline' | 'physical-asset' | 'generated' | 'phonetic-script-provenance' | 'caption-provenance' | 'caption-alignment' | 'clip-anchor' | 'audio-script-render';
10
+ /** Asset identity, either an old physical-only row or a directly composed media variant. */
11
+ type ResourceEntityKind = 'image' | 'video' | 'audio' | 'voice';
12
+ type KnownRelationKind = 'timeline-track' | 'track-clip' | 'clip-marker' | 'marker-content' | 'axvideo-marker' | 'marker-timeline' | 'physical-asset' | 'generated' | 'caption-alignment' | 'clip-anchor' | 'phonetic-script-render' | 'audio-script-source' | 'audio-script-marker';
9
13
  type AuthorableRelationKind = Exclude<KnownRelationKind, 'generated'>;
10
14
  interface BoundedNativeSequencePayload extends JsonObject {
11
15
  /** Factual coordinates from recalled media metadata; never invent an end/duration. */
@@ -39,6 +43,30 @@ type ScriptTextSegment = JsonObject & {
39
43
  text: string;
40
44
  language?: string;
41
45
  };
46
+ type MediaAssetPayload = JsonObject & {
47
+ external: {
48
+ system: 'memota' | 'memota-speech';
49
+ key: string;
50
+ };
51
+ storageKey?: string;
52
+ };
53
+ type CaptionTextSelection = JsonObject & {
54
+ segmentId: string; /** Half-open Unicode code-point range within the selected source segment. */
55
+ textRange?: {
56
+ start: number;
57
+ end: number;
58
+ };
59
+ };
60
+ /** Read result only: base text is assembled from the real AudioScript row. */
61
+ interface ComposedScriptContent {
62
+ audio_script_entity_id: string;
63
+ text: string;
64
+ segments: ScriptTextSegment[];
65
+ }
66
+ interface ComposedPhoneticContent extends ComposedScriptContent {
67
+ phonemeScript?: string;
68
+ prosody?: JsonObject;
69
+ }
42
70
  interface EntityPayloadByKind {
43
71
  axvideo: BoundedDerivedSequencePayload;
44
72
  timeline: JsonObject;
@@ -47,12 +75,12 @@ interface EntityPayloadByKind {
47
75
  role?: string;
48
76
  };
49
77
  clip: JsonObject;
50
- /** Asset-owned metadata. Peer media associations belong in physical-asset Relations. */
78
+ /** Physical resource fields; never a copy of Caption content. */
51
79
  asset: JsonObject;
52
- video: BoundedNativeSequencePayload;
53
- audio: BoundedNativeSequencePayload;
54
- voice: BoundedNativeSequencePayload;
55
- image: UnboundedConstantSequencePayload;
80
+ video: BoundedNativeSequencePayload & MediaAssetPayload;
81
+ audio: BoundedNativeSequencePayload & MediaAssetPayload;
82
+ voice: BoundedNativeSequencePayload & MediaAssetPayload;
83
+ image: UnboundedConstantSequencePayload & MediaAssetPayload;
56
84
  'sequence-marker': JsonObject & {
57
85
  sourceRange: {
58
86
  start: number;
@@ -70,21 +98,36 @@ interface EntityPayloadByKind {
70
98
  };
71
99
  timeRemapping?: JsonValue;
72
100
  anchorOffset?: number;
73
- durationPolicy?: 'timeline';
101
+ durationPolicy?: 'timeline'; /** Directly assigned AudioScript annotation times; annotation Markers only. */
102
+ segmentRanges?: {
103
+ segmentId: string;
104
+ startMs: number;
105
+ endMs: number;
106
+ }[];
74
107
  };
75
108
  viewport: JsonObject;
76
109
  'audio-script': JsonObject & {
77
110
  segments: ScriptTextSegment[];
78
111
  };
79
112
  'phonetic-script': JsonObject & {
80
- segments: ScriptTextSegment[];
113
+ baseEntityIds: string[];
114
+ phonemeScript?: string;
115
+ prosody?: JsonObject;
116
+ };
117
+ caption: BoundedNativeSequencePayload & {
118
+ baseEntityIds: string[];
119
+ selections: CaptionTextSelection[];
120
+ style?: JsonObject;
81
121
  };
82
- caption: BoundedNativeSequencePayload;
83
122
  }
123
+ /** Stored own fields; a variant may obtain required content fields from its declared bases. */
124
+ type StoredEntityPayload<K extends KnownEntityKind> = EntityPayloadByKind[K] | (JsonObject & Partial<EntityPayloadByKind[K]> & {
125
+ baseEntityIds: string[];
126
+ });
84
127
  interface SandboxEntity<K extends KnownEntityKind = KnownEntityKind> {
85
128
  entity_id: string;
86
129
  entity_kind: K;
87
- payload: EntityPayloadByKind[K];
130
+ payload: StoredEntityPayload<K>;
88
131
  }
89
132
  interface SandboxRelation {
90
133
  relation_id: string;
@@ -96,14 +139,16 @@ interface SandboxRelation {
96
139
  }
97
140
  interface EntityStoreSnapshot {
98
141
  revision: number;
142
+ audioScriptEntityId: string | null;
99
143
  entities: SandboxEntity[];
100
144
  relations: SandboxRelation[];
101
145
  }
102
146
  type CreateEntityInput = { [K in KnownEntityKind]: {
103
147
  entity_id?: string;
104
148
  entity_kind: K;
105
- payload: EntityPayloadByKind[K];
149
+ payload: StoredEntityPayload<K>;
106
150
  } }[KnownEntityKind];
151
+ /** Patch supplied fields on the assembled entity; omitted fields remain unchanged. */
107
152
  interface UpdateEntityInput {
108
153
  entity_id: string;
109
154
  payload: JsonObject;
@@ -111,12 +156,7 @@ interface UpdateEntityInput {
111
156
  interface DeleteEntityInput {
112
157
  entity_id: string;
113
158
  }
114
- interface ImportAssetInput {
115
- asset_id: string;
116
- entity_id?: string;
117
- payload?: JsonObject;
118
- }
119
- type EmptyRelationKind = 'timeline-track' | 'track-clip' | 'clip-marker' | 'marker-content' | 'axvideo-marker' | 'marker-timeline';
159
+ type EmptyRelationKind = 'timeline-track' | 'track-clip' | 'clip-marker' | 'marker-content' | 'axvideo-marker' | 'marker-timeline' | 'audio-script-marker';
120
160
  interface LinkRelationBase {
121
161
  relation_id?: string;
122
162
  endpoint_0_entity_id: string;
@@ -131,11 +171,6 @@ type LinkRelationInput = (LinkRelationBase & {
131
171
  }) | (LinkRelationBase & {
132
172
  relation_kind: 'physical-asset';
133
173
  metadata?: JsonObject;
134
- }) | (LinkRelationBase & {
135
- relation_kind: 'phonetic-script-provenance' | 'caption-provenance';
136
- metadata: JsonObject & {
137
- segmentAlignment: JsonValue;
138
- };
139
174
  }) | (LinkRelationBase & {
140
175
  relation_kind: 'caption-alignment';
141
176
  metadata: JsonObject & {
@@ -154,16 +189,26 @@ interface LinkClipAnchorRelationInput {
154
189
  host_clip_entity_id: string;
155
190
  trace?: JsonObject;
156
191
  }
157
- interface LinkAudioScriptRenderRelationInput {
192
+ interface LinkPhoneticScriptRenderRelationInput {
158
193
  relation_id?: string;
159
194
  output_entity_id: string;
195
+ phonetic_script_entity_id: string;
196
+ trace?: JsonObject;
197
+ }
198
+ /** `audio-script-source(script, source)`; the script was transcribed from the source media. */
199
+ interface LinkAudioScriptSourceRelationInput {
200
+ relation_id?: string;
160
201
  script_entity_id: string;
202
+ source_entity_id: string;
161
203
  trace?: JsonObject;
162
204
  }
163
205
  interface UnlinkRelationInput {
164
206
  relation_id: string;
165
207
  }
166
208
  type EntityCommand = {
209
+ kind: 'set-document-audio-script';
210
+ audioScriptEntityId: string | null;
211
+ } | {
167
212
  kind: 'create-entity';
168
213
  entity: SandboxEntity;
169
214
  } | {
@@ -188,33 +233,44 @@ interface EntityPlanState {
188
233
  deleted_relation_ids: readonly string[];
189
234
  }
190
235
  interface EntityFacade {
236
+ /** Read complete assembled fields; returned objects are snapshots. Use update to persist edits. */
191
237
  list(): SandboxEntity[];
192
238
  get(entityId: string): SandboxEntity | null;
193
- /** Return every explicitly imported Asset entity for a Memota asset id. */
194
- findByAssetId(assetId: string): SandboxEntity<'asset'>[];
239
+ /** Find document resources by external Memota asset id, including directly composed media variants. */
240
+ findByAssetId(assetId: string): SandboxEntity<ResourceEntityKind>[];
241
+ /** Assemble selected Caption text; missing composition is an error. */
242
+ readCaptionContent(entityId: string): ComposedScriptContent;
243
+ /** Assemble base text and pronunciation fields before generating Voice. */
244
+ readPhoneticScriptContent(entityId: string): ComposedPhoneticContent;
195
245
  create(input: CreateEntityInput): string;
196
- /** Replace one Entity's owned payload without changing its identity or kind. */
246
+ /** Patch assembled fields, routing inherited fields to their declaring entity. */
197
247
  update(input: UpdateEntityInput): void;
248
+ /** Explicitly declare own fields, overriding unambiguous bases without modifying them. Ordinary edits use update. */
249
+ declareFields(input: UpdateEntityInput): void;
198
250
  /** Delete an Entity only after all of its incident Relations have been explicitly unlinked. */
199
251
  delete(input: DeleteEntityInput): void;
200
- /** Import one physical asset without implying a one-to-one media Entity mapping. */
201
- importAsset(input: ImportAssetInput): string;
252
+ /** Get or create one typed Asset by factual external id and return its single content identity. Never creates a Clip. */
253
+ ensureMedia(fact: MediaAssetFact): {
254
+ contentEntityId: string;
255
+ };
202
256
  }
203
257
  interface RelationFacade {
204
258
  list(): SandboxRelation[];
205
259
  /** Incident lookup is endpoint-agnostic; persisted endpoint positions stay unchanged. */
206
260
  of(entityId: string, relationKind?: KnownRelationKind): SandboxRelation[];
207
- /** For physical-asset use sequence media as endpoint 0 and Asset as endpoint 1. */
261
+ /** Link existing entities through ordinary associations; variant bases are stored directly on the variant. */
208
262
  link(input: LinkRelationInput): string;
209
263
  /** Author ordered generated(output,input); generic link() deliberately rejects this kind. */
210
264
  linkGenerated(input: LinkGeneratedRelationInput): string;
211
265
  /** Author ordered clip-anchor(child,host) without positional endpoint ambiguity. */
212
266
  linkClipAnchor(input: LinkClipAnchorRelationInput): string;
213
- /** Author ordered audio-script-render(output,script) without positional endpoint ambiguity. */
214
- linkAudioScriptRender(input: LinkAudioScriptRenderRelationInput): string;
267
+ /** Author ordered phonetic-script-render(output,script) without positional endpoint ambiguity. */
268
+ linkPhoneticScriptRender(input: LinkPhoneticScriptRenderRelationInput): string;
269
+ /** Author ordered audio-script-source(script,source) without positional endpoint ambiguity. */
270
+ linkAudioScriptSource(input: LinkAudioScriptSourceRelationInput): string;
215
271
  /** Remove a Relation by identity; endpoint replacement is an explicit unlink plus link. */
216
272
  unlink(input: UnlinkRelationInput): void;
217
273
  }
218
274
  //#endregion
219
- export { SandboxEntity as _, EntityFacade as a, UpdateEntityInput as b, ImportAssetInput as c, JsonValue as d, KnownEntityKind as f, RelationFacade as g, LinkRelationInput as h, EntityCommand as i, JsonObject as l, LinkGeneratedRelationInput as m, CreateEntityInput as n, EntityPlanState as o, KnownRelationKind as p, DeleteEntityInput as r, EntityStoreSnapshot as s, AuthorableRelationKind as t, JsonPrimitive as u, SandboxRelation as v, UnlinkRelationInput as y };
220
- //# sourceMappingURL=entity-contract-DycLxdQ5.d.mts.map
275
+ export { SandboxEntity as _, EntityFacade as a, UpdateEntityInput as b, JsonObject as c, KnownEntityKind as d, KnownRelationKind as f, ResourceEntityKind as g, RelationFacade as h, EntityCommand as i, JsonPrimitive as l, LinkRelationInput as m, CreateEntityInput as n, EntityPlanState as o, LinkGeneratedRelationInput as p, DeleteEntityInput as r, EntityStoreSnapshot as s, AuthorableRelationKind as t, JsonValue as u, SandboxRelation as v, UnlinkRelationInput as y };
276
+ //# sourceMappingURL=entity-contract-Dm3AMEC9.d.mts.map
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
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";
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-Dm3AMEC9.mjs";
2
2
  import { JournalEntry, ManualSyncDoc, MediaAssetFact, 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
 
@@ -256,223 +256,223 @@ type MedeoToolOp = 'snapshot' | 'migrate-legacy' | 'run-edit-script' | 'commit-p
256
256
  * journal used for commit.
257
257
  */
258
258
  declare const MEDEO_TOOL_PARAMETERS: {
259
- readonly type: 'object';
260
- readonly required: readonly ['op', 'doc_id'];
259
+ readonly type: "object";
260
+ readonly required: readonly ["op", "doc_id"];
261
261
  readonly additionalProperties: false;
262
262
  readonly properties: {
263
263
  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.';
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.";
267
267
  };
268
268
  readonly doc_id: {
269
- readonly type: 'string';
269
+ readonly type: "string";
270
270
  readonly minLength: 1;
271
- readonly description: 'Medeo document id. Copy it from the host context; never invent it.';
271
+ readonly description: "Medeo document id. Copy it from the host context; never invent it.";
272
272
  };
273
273
  readonly script: {
274
- readonly type: 'string';
274
+ readonly type: "string";
275
275
  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.';
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.";
277
277
  };
278
278
  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.';
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
281
  };
282
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.';
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
285
  readonly items: {
286
286
  readonly oneOf: readonly [{
287
- readonly type: 'object';
287
+ readonly type: "object";
288
288
  readonly additionalProperties: false;
289
- readonly required: readonly ['assetId', 'kind'];
289
+ readonly required: readonly ["assetId", "kind"];
290
290
  readonly properties: {
291
291
  readonly assetId: {
292
- readonly type: 'string';
292
+ readonly type: "string";
293
293
  readonly minLength: 1;
294
294
  };
295
295
  readonly kind: {
296
- readonly const: 'image';
296
+ readonly const: "image";
297
297
  };
298
298
  readonly storageKey: {
299
- readonly type: 'string';
299
+ readonly type: "string";
300
300
  readonly minLength: 1;
301
301
  };
302
302
  };
303
303
  }, {
304
- readonly type: 'object';
304
+ readonly type: "object";
305
305
  readonly additionalProperties: false;
306
- readonly required: readonly ['assetId', 'kind', 'durationMs'];
306
+ readonly required: readonly ["assetId", "kind", "durationMs"];
307
307
  readonly properties: {
308
308
  readonly assetId: {
309
- readonly type: 'string';
309
+ readonly type: "string";
310
310
  readonly minLength: 1;
311
311
  };
312
312
  readonly kind: {
313
- readonly const: 'video';
313
+ readonly const: "video";
314
314
  };
315
315
  readonly durationMs: {
316
- readonly type: 'integer';
316
+ readonly type: "integer";
317
317
  readonly minimum: 1;
318
318
  };
319
319
  readonly storageKey: {
320
- readonly type: 'string';
320
+ readonly type: "string";
321
321
  readonly minLength: 1;
322
322
  };
323
323
  };
324
324
  }, {
325
- readonly type: 'object';
325
+ readonly type: "object";
326
326
  readonly additionalProperties: false;
327
- readonly required: readonly ['assetId', 'kind', 'durationMs', 'storageKey'];
327
+ readonly required: readonly ["assetId", "kind", "durationMs", "storageKey"];
328
328
  readonly properties: {
329
329
  readonly assetId: {
330
- readonly type: 'string';
330
+ readonly type: "string";
331
331
  readonly minLength: 1;
332
332
  };
333
333
  readonly kind: {
334
- readonly const: 'audio';
334
+ readonly const: "audio";
335
335
  };
336
336
  readonly durationMs: {
337
- readonly type: 'integer';
337
+ readonly type: "integer";
338
338
  readonly minimum: 1;
339
339
  };
340
340
  readonly storageKey: {
341
- readonly type: 'string';
341
+ readonly type: "string";
342
342
  readonly minLength: 1;
343
343
  };
344
344
  };
345
345
  }, {
346
- readonly type: 'object';
346
+ readonly type: "object";
347
347
  readonly additionalProperties: false;
348
- readonly required: readonly ['assetId', 'kind', 'durationMs', 'storageKey', 'voice'];
348
+ readonly required: readonly ["assetId", "kind", "durationMs", "storageKey", "voice"];
349
349
  readonly properties: {
350
+ readonly kind: {
351
+ readonly const: "voice";
352
+ };
350
353
  readonly assetId: {
351
- readonly type: 'string';
354
+ readonly type: "string";
352
355
  readonly minLength: 1;
353
356
  };
354
357
  readonly durationMs: {
355
- readonly type: 'integer';
358
+ readonly type: "integer";
356
359
  readonly minimum: 1;
357
360
  };
358
361
  readonly storageKey: {
359
- readonly type: 'string';
362
+ readonly type: "string";
360
363
  readonly minLength: 1;
361
364
  };
362
365
  readonly voice: {
363
- readonly type: 'object';
366
+ readonly type: "object";
364
367
  readonly additionalProperties: false;
365
- readonly required: readonly ['system', 'key'];
368
+ readonly required: readonly ["system", "key"];
366
369
  readonly properties: {
367
370
  readonly system: {
368
- readonly const: 'voice-library';
371
+ readonly const: "voice-library";
369
372
  };
370
373
  readonly key: {
371
- readonly type: 'string';
374
+ readonly type: "string";
372
375
  readonly minLength: 1;
373
376
  };
374
377
  readonly name: {
375
- readonly type: 'string';
378
+ readonly type: "string";
376
379
  };
377
380
  };
378
381
  };
379
- readonly kind: {
380
- readonly const: 'voice';
381
- };
382
382
  };
383
383
  }];
384
384
  };
385
385
  };
386
386
  readonly timeout_ms: {
387
- readonly type: 'integer';
387
+ readonly type: "integer";
388
388
  readonly minimum: 1;
389
- readonly description: 'Maximum script wall-clock time after worker startup (default 2000).';
389
+ readonly description: "Maximum script wall-clock time after worker startup (default 2000).";
390
390
  };
391
391
  readonly memory_limit_mb: {
392
- readonly type: 'integer';
392
+ readonly type: "integer";
393
393
  readonly minimum: 16;
394
- readonly description: 'Worker old-generation memory ceiling in MB (default 256).';
394
+ readonly description: "Worker old-generation memory ceiling in MB (default 256).";
395
395
  };
396
396
  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.';
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.";
399
399
  };
400
400
  readonly plan_id: {
401
- readonly type: 'string';
401
+ readonly type: "string";
402
402
  readonly minLength: 1;
403
- readonly description: 'Plan id returned by run-edit-script; required by commit-plan.';
403
+ readonly description: "Plan id returned by run-edit-script; required by commit-plan.";
404
404
  };
405
405
  readonly validation: {
406
- readonly type: 'string';
407
- readonly enum: readonly ['version'];
408
- readonly description: 'Commit with Entity revision CAS; reject concurrent changes.';
406
+ readonly type: "string";
407
+ readonly enum: readonly ["version"];
408
+ readonly description: "Commit with Entity revision CAS; reject concurrent changes.";
409
409
  };
410
410
  };
411
411
  readonly oneOf: readonly [{
412
- readonly required: readonly ['op', 'doc_id', 'asset_facts'];
412
+ readonly required: readonly ["op", "doc_id", "asset_facts"];
413
413
  readonly properties: {
414
414
  readonly op: {
415
- readonly const: 'migrate-legacy';
415
+ readonly const: "migrate-legacy";
416
416
  };
417
417
  readonly doc_id: {
418
- readonly $ref: '#/properties/doc_id';
418
+ readonly $ref: "#/properties/doc_id";
419
419
  };
420
420
  readonly asset_facts: {
421
- readonly $ref: '#/properties/asset_facts';
421
+ readonly $ref: "#/properties/asset_facts";
422
422
  };
423
423
  };
424
424
  readonly additionalProperties: false;
425
425
  }, {
426
- readonly required: readonly ['op', 'doc_id'];
426
+ readonly required: readonly ["op", "doc_id"];
427
427
  readonly properties: {
428
428
  readonly op: {
429
- readonly const: 'snapshot';
429
+ readonly const: "snapshot";
430
430
  };
431
431
  readonly doc_id: {
432
- readonly $ref: '#/properties/doc_id';
432
+ readonly $ref: "#/properties/doc_id";
433
433
  };
434
434
  };
435
435
  readonly additionalProperties: false;
436
436
  }, {
437
- readonly required: readonly ['op', 'doc_id', 'script'];
437
+ readonly required: readonly ["op", "doc_id", "script"];
438
438
  readonly properties: {
439
439
  readonly op: {
440
- readonly const: 'run-edit-script';
440
+ readonly const: "run-edit-script";
441
441
  };
442
442
  readonly doc_id: {
443
- readonly $ref: '#/properties/doc_id';
443
+ readonly $ref: "#/properties/doc_id";
444
444
  };
445
445
  readonly script: {
446
- readonly $ref: '#/properties/script';
446
+ readonly $ref: "#/properties/script";
447
447
  };
448
448
  readonly inputs: {
449
- readonly $ref: '#/properties/inputs';
449
+ readonly $ref: "#/properties/inputs";
450
450
  };
451
451
  readonly timeout_ms: {
452
- readonly $ref: '#/properties/timeout_ms';
452
+ readonly $ref: "#/properties/timeout_ms";
453
453
  };
454
454
  readonly memory_limit_mb: {
455
- readonly $ref: '#/properties/memory_limit_mb';
455
+ readonly $ref: "#/properties/memory_limit_mb";
456
456
  };
457
457
  readonly auto_commit: {
458
- readonly $ref: '#/properties/auto_commit';
458
+ readonly $ref: "#/properties/auto_commit";
459
459
  };
460
460
  };
461
461
  readonly additionalProperties: false;
462
462
  }, {
463
- readonly required: readonly ['op', 'doc_id', 'plan_id'];
463
+ readonly required: readonly ["op", "doc_id", "plan_id"];
464
464
  readonly properties: {
465
465
  readonly op: {
466
- readonly const: 'commit-plan';
466
+ readonly const: "commit-plan";
467
467
  };
468
468
  readonly doc_id: {
469
- readonly $ref: '#/properties/doc_id';
469
+ readonly $ref: "#/properties/doc_id";
470
470
  };
471
471
  readonly plan_id: {
472
- readonly $ref: '#/properties/plan_id';
472
+ readonly $ref: "#/properties/plan_id";
473
473
  };
474
474
  readonly validation: {
475
- readonly $ref: '#/properties/validation';
475
+ readonly $ref: "#/properties/validation";
476
476
  };
477
477
  };
478
478
  readonly additionalProperties: false;
@@ -728,5 +728,5 @@ type MedeoInitialDraft = VideoDraft;
728
728
  */
729
729
  declare function createMedeoTool(options: CreateMedeoToolOptions): MedeoTool;
730
730
  //#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 };
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 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
732
  //# sourceMappingURL=index.d.mts.map