@mengine/medeo-tool 1.2.1-alpha.7 → 1.2.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 +49 -16
- package/dist/{entity-contract-B3txrzTt.d.mts → entity-contract-DycLxdQ5.d.mts} +49 -3
- package/dist/index.d.mts +142 -9
- package/dist/index.mjs +756 -906
- package/dist/index.mjs.map +1 -1
- package/dist/sandbox-api.d.mts +397 -818
- package/dist/{script-session-BF44uKv_.mjs → script-session-CHyIUBkO.mjs} +366 -26
- package/dist/script-session-CHyIUBkO.mjs.map +1 -0
- package/dist/worker-entry.d.mts +5 -4
- package/dist/worker-entry.mjs +286 -5
- package/dist/worker-entry.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/script-session-BF44uKv_.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# `@mengine/medeo-tool`
|
|
2
2
|
|
|
3
|
-
Node tool surface for editing
|
|
4
|
-
|
|
3
|
+
Node tool surface for editing the authoritative Medeo Entity/Relation graph
|
|
4
|
+
through the deterministic edit sandbox. Timeline editing is entity editing,
|
|
5
|
+
not a legacy document mutation followed by optional entity registration.
|
|
5
6
|
|
|
6
7
|
The package owns the complete tool path:
|
|
7
8
|
|
|
8
9
|
- compact snapshot projection;
|
|
9
10
|
- trusted worker execution of an agent-authored JavaScript edit script;
|
|
10
|
-
-
|
|
11
|
-
- versioned or per-op-preflight commit through `ManualSyncDoc`;
|
|
11
|
+
- entity-command `ChangePlan` caching;
|
|
12
12
|
- complete Entity/Relation snapshot reads and revision-CAS commits;
|
|
13
13
|
- per-document serialization, document cache, and shutdown.
|
|
14
14
|
|
|
@@ -28,7 +28,8 @@ const snapshot = await medeo.handle({ op: 'snapshot', doc_id: docId });
|
|
|
28
28
|
const run = await medeo.handle({
|
|
29
29
|
op: 'run-edit-script',
|
|
30
30
|
doc_id: docId,
|
|
31
|
-
script: '
|
|
31
|
+
script: 'edit.updateClip({ clipEntityId: inputs.clip_id, payload: { volume: -6 } })',
|
|
32
|
+
inputs: { clip_id: existingClipEntityId },
|
|
32
33
|
});
|
|
33
34
|
if (!run.ok || run.op !== 'run-edit-script') throw new Error('edit script failed');
|
|
34
35
|
const commit = await medeo.handle({
|
|
@@ -38,25 +39,28 @@ const commit = await medeo.handle({
|
|
|
38
39
|
});
|
|
39
40
|
|
|
40
41
|
// Generation facts are recalled by the host and passed into the sandbox.
|
|
42
|
+
// This example is text-to-image: there is no invented input-media entity.
|
|
41
43
|
const entityRun = await medeo.handle({
|
|
42
44
|
op: 'run-edit-script',
|
|
43
45
|
doc_id: docId,
|
|
44
|
-
inputs: { output_asset_id: 'asset-from-host',
|
|
46
|
+
inputs: { output_asset_id: 'asset-from-host', track_entity_id: existingTrackEntityId },
|
|
45
47
|
script: `
|
|
46
|
-
if (typeof inputs.output_asset_id !== 'string' || typeof inputs.
|
|
48
|
+
if (typeof inputs.output_asset_id !== 'string' || typeof inputs.track_entity_id !== 'string') {
|
|
47
49
|
throw new Error('missing recalled generation facts');
|
|
48
50
|
}
|
|
49
51
|
const asset = entities.importAsset({ asset_id: inputs.output_asset_id });
|
|
50
|
-
const
|
|
52
|
+
const output = entities.create({
|
|
51
53
|
entity_kind: 'image',
|
|
52
54
|
payload: { extent: { kind: 'unbounded', start: 0 }, sampling: 'constant', coordinateSpace: 'ms' },
|
|
53
55
|
});
|
|
54
|
-
const output = entities.create({
|
|
55
|
-
entity_kind: 'video',
|
|
56
|
-
payload: { extent: { kind: 'bounded', start: 0, end: 1000 }, sampling: 'native', coordinateSpace: 'ms' },
|
|
57
|
-
});
|
|
58
56
|
relations.link({ relation_kind: 'physical-asset', endpoint_0_entity_id: output, endpoint_1_entity_id: asset });
|
|
59
|
-
|
|
57
|
+
edit.insertClip({
|
|
58
|
+
trackEntityId: inputs.track_entity_id,
|
|
59
|
+
contentEntityId: output,
|
|
60
|
+
sourceRange: { start: 0, end: 1 },
|
|
61
|
+
duration: { mode: 'fixed', value: 5000 },
|
|
62
|
+
targetRange: { start: 0, end: 5000 },
|
|
63
|
+
});
|
|
60
64
|
`,
|
|
61
65
|
});
|
|
62
66
|
|
|
@@ -69,6 +73,35 @@ through `inputs`. There is no automatic Asset→Entity projection: the model
|
|
|
69
73
|
selects and imports assets, creates only known typed Entities, and links them
|
|
70
74
|
explicitly. Assets and media Entities are intentionally not one-to-one.
|
|
71
75
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
76
|
+
The production tool exposes native Clip/Marker editing plus visual placement,
|
|
77
|
+
voiceover, caption, and BGM helpers through its generated sandbox interface.
|
|
78
|
+
They preserve structural and anchor relations in the same plan. Timeline targets
|
|
79
|
+
are Entity IDs, never raw asset IDs or URLs. Asset import, media creation, factual `generated` relations, and Clip
|
|
80
|
+
insertion belong in the **same entity plan**. `generated` retains output at
|
|
81
|
+
endpoint 0 and input at endpoint 1, while lookup can use either endpoint.
|
|
82
|
+
|
|
83
|
+
Entities own their facts: SequenceMarker owns source/target ranges, duration,
|
|
84
|
+
and time remapping; Clip owns volume; Track owns role/visibility. Cross-entity
|
|
85
|
+
references are Relations. There is no separate orientation or timing profile.
|
|
86
|
+
|
|
87
|
+
The server validates and commits the graph and its read-only Loro projection in
|
|
88
|
+
one database transaction. `deleted_entity_ids` and `deleted_relation_ids` make
|
|
89
|
+
deletion explicit; dropped rows without deletion intent are rejected. After
|
|
90
|
+
cutover, raw Loro `/updates` cannot mutate the document. Legacy standalone
|
|
91
|
+
sandbox exports remain library compatibility APIs, not a production-tool mode.
|
|
92
|
+
|
|
93
|
+
Existing nonempty legacy documents require a separate version-CAS migration
|
|
94
|
+
whose projection preserves existing editing facts. `snapshot` identifies that
|
|
95
|
+
requirement and the media IDs needing factual metadata. Call
|
|
96
|
+
`{op:'migrate-legacy',doc_id,asset_facts}` explicitly, then take a fresh snapshot
|
|
97
|
+
before editing. The package reads the canonical document and current Loro
|
|
98
|
+
version itself; it does not accept a caller-supplied snapshot or version, use a
|
|
99
|
+
stale cached document after a failed pull, or combine migration with a new edit.
|
|
100
|
+
Repeating migration on an entity timeline is read-only. An uncertain submission
|
|
101
|
+
must be inspected and retried, never reported as committed.
|
|
102
|
+
|
|
103
|
+
The compatibility reader covers the existing four lanes: Image/Video, Voice,
|
|
104
|
+
Caption, and background Audio. Coordinates are whole milliseconds for this
|
|
105
|
+
reader. It preserves linear visual remapping (`{kind:'linear',rate:2}`), including
|
|
106
|
+
image display speed, and explicit anchor chains. Nonlinear remapping and multiple
|
|
107
|
+
visual overlay tracks are not existing editor features and remain unsupported.
|
|
@@ -5,7 +5,7 @@ interface JsonObject {
|
|
|
5
5
|
[key: string]: JsonValue;
|
|
6
6
|
}
|
|
7
7
|
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';
|
|
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';
|
|
9
9
|
type AuthorableRelationKind = Exclude<KnownRelationKind, 'generated'>;
|
|
10
10
|
interface BoundedNativeSequencePayload extends JsonObject {
|
|
11
11
|
/** Factual coordinates from recalled media metadata; never invent an end/duration. */
|
|
@@ -69,6 +69,8 @@ interface EntityPayloadByKind {
|
|
|
69
69
|
value: number;
|
|
70
70
|
};
|
|
71
71
|
timeRemapping?: JsonValue;
|
|
72
|
+
anchorOffset?: number;
|
|
73
|
+
durationPolicy?: 'timeline';
|
|
72
74
|
};
|
|
73
75
|
viewport: JsonObject;
|
|
74
76
|
'audio-script': JsonObject & {
|
|
@@ -102,6 +104,13 @@ type CreateEntityInput = { [K in KnownEntityKind]: {
|
|
|
102
104
|
entity_kind: K;
|
|
103
105
|
payload: EntityPayloadByKind[K];
|
|
104
106
|
} }[KnownEntityKind];
|
|
107
|
+
interface UpdateEntityInput {
|
|
108
|
+
entity_id: string;
|
|
109
|
+
payload: JsonObject;
|
|
110
|
+
}
|
|
111
|
+
interface DeleteEntityInput {
|
|
112
|
+
entity_id: string;
|
|
113
|
+
}
|
|
105
114
|
interface ImportAssetInput {
|
|
106
115
|
asset_id: string;
|
|
107
116
|
entity_id?: string;
|
|
@@ -139,17 +148,44 @@ interface LinkGeneratedRelationInput {
|
|
|
139
148
|
input_entity_id: string;
|
|
140
149
|
trace?: JsonObject;
|
|
141
150
|
}
|
|
151
|
+
interface LinkClipAnchorRelationInput {
|
|
152
|
+
relation_id?: string;
|
|
153
|
+
child_clip_entity_id: string;
|
|
154
|
+
host_clip_entity_id: string;
|
|
155
|
+
trace?: JsonObject;
|
|
156
|
+
}
|
|
157
|
+
interface LinkAudioScriptRenderRelationInput {
|
|
158
|
+
relation_id?: string;
|
|
159
|
+
output_entity_id: string;
|
|
160
|
+
script_entity_id: string;
|
|
161
|
+
trace?: JsonObject;
|
|
162
|
+
}
|
|
163
|
+
interface UnlinkRelationInput {
|
|
164
|
+
relation_id: string;
|
|
165
|
+
}
|
|
142
166
|
type EntityCommand = {
|
|
143
167
|
kind: 'create-entity';
|
|
144
168
|
entity: SandboxEntity;
|
|
169
|
+
} | {
|
|
170
|
+
kind: 'update-entity';
|
|
171
|
+
entity_id: string;
|
|
172
|
+
payload: JsonObject;
|
|
173
|
+
} | {
|
|
174
|
+
kind: 'delete-entity';
|
|
175
|
+
entity_id: string;
|
|
145
176
|
} | {
|
|
146
177
|
kind: 'link-relation';
|
|
147
178
|
relation: SandboxRelation;
|
|
179
|
+
} | {
|
|
180
|
+
kind: 'unlink-relation';
|
|
181
|
+
relation_id: string;
|
|
148
182
|
};
|
|
149
183
|
interface EntityPlanState {
|
|
150
184
|
base_revision: number;
|
|
151
185
|
commands: readonly EntityCommand[];
|
|
152
186
|
rows: EntityStoreSnapshot;
|
|
187
|
+
deleted_entity_ids: readonly string[];
|
|
188
|
+
deleted_relation_ids: readonly string[];
|
|
153
189
|
}
|
|
154
190
|
interface EntityFacade {
|
|
155
191
|
list(): SandboxEntity[];
|
|
@@ -157,6 +193,10 @@ interface EntityFacade {
|
|
|
157
193
|
/** Return every explicitly imported Asset entity for a Memota asset id. */
|
|
158
194
|
findByAssetId(assetId: string): SandboxEntity<'asset'>[];
|
|
159
195
|
create(input: CreateEntityInput): string;
|
|
196
|
+
/** Replace one Entity's owned payload without changing its identity or kind. */
|
|
197
|
+
update(input: UpdateEntityInput): void;
|
|
198
|
+
/** Delete an Entity only after all of its incident Relations have been explicitly unlinked. */
|
|
199
|
+
delete(input: DeleteEntityInput): void;
|
|
160
200
|
/** Import one physical asset without implying a one-to-one media Entity mapping. */
|
|
161
201
|
importAsset(input: ImportAssetInput): string;
|
|
162
202
|
}
|
|
@@ -168,7 +208,13 @@ interface RelationFacade {
|
|
|
168
208
|
link(input: LinkRelationInput): string;
|
|
169
209
|
/** Author ordered generated(output,input); generic link() deliberately rejects this kind. */
|
|
170
210
|
linkGenerated(input: LinkGeneratedRelationInput): string;
|
|
211
|
+
/** Author ordered clip-anchor(child,host) without positional endpoint ambiguity. */
|
|
212
|
+
linkClipAnchor(input: LinkClipAnchorRelationInput): string;
|
|
213
|
+
/** Author ordered audio-script-render(output,script) without positional endpoint ambiguity. */
|
|
214
|
+
linkAudioScriptRender(input: LinkAudioScriptRenderRelationInput): string;
|
|
215
|
+
/** Remove a Relation by identity; endpoint replacement is an explicit unlink plus link. */
|
|
216
|
+
unlink(input: UnlinkRelationInput): void;
|
|
171
217
|
}
|
|
172
218
|
//#endregion
|
|
173
|
-
export {
|
|
174
|
-
//# sourceMappingURL=entity-contract-
|
|
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
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { JournalEntry, ManualSyncDoc, PartIdFactory, SemanticOpName, VideoDocument, VideoDraft, fromVideoDocument } from "@mengine/medeo-client";
|
|
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";
|
|
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
|
|
@@ -56,6 +56,8 @@ interface ChangePlan {
|
|
|
56
56
|
entity_base_revision: number;
|
|
57
57
|
entity_commands: readonly EntityCommand[];
|
|
58
58
|
entity_rows?: EntityStoreSnapshot;
|
|
59
|
+
deleted_entity_ids?: readonly string[];
|
|
60
|
+
deleted_relation_ids?: readonly string[];
|
|
59
61
|
preview: string;
|
|
60
62
|
logs: string[];
|
|
61
63
|
}
|
|
@@ -176,6 +178,8 @@ interface RunEditScriptOptions {
|
|
|
176
178
|
entityState?: EntityStoreSnapshot;
|
|
177
179
|
/** Deterministic id mint label for tests; omit to use the default ULID factory. */
|
|
178
180
|
idLabel?: string;
|
|
181
|
+
/** @internal Select the graph-native Entity session used by the production host. */
|
|
182
|
+
entityOnly?: boolean;
|
|
179
183
|
/** Hard wall-clock timeout; default 2000 ms. */
|
|
180
184
|
timeoutMs?: number;
|
|
181
185
|
/** V8 old-generation ceiling for the worker; default 256 MB. */
|
|
@@ -210,9 +214,9 @@ declare const MEDEO_TOOL_DESCRIPTION: string;
|
|
|
210
214
|
//#endregion
|
|
211
215
|
//#region src/schema.d.ts
|
|
212
216
|
declare const MEDEO_TOOL_NAME = "medeo";
|
|
213
|
-
type MedeoToolOp = 'snapshot' | 'run-edit-script' | 'commit-plan';
|
|
217
|
+
type MedeoToolOp = 'snapshot' | 'migrate-legacy' | 'run-edit-script' | 'commit-plan';
|
|
214
218
|
/**
|
|
215
|
-
* JSON Schema for the host-facing
|
|
219
|
+
* JSON Schema for the host-facing `medeo` tool surface.
|
|
216
220
|
*
|
|
217
221
|
* The schema intentionally does not return or accept the full op journal:
|
|
218
222
|
* journals stay in the tool process and are referenced by `plan_id`. This keeps
|
|
@@ -226,7 +230,7 @@ declare const MEDEO_TOOL_PARAMETERS: {
|
|
|
226
230
|
readonly properties: {
|
|
227
231
|
readonly op: {
|
|
228
232
|
readonly type: 'string';
|
|
229
|
-
readonly enum: readonly ['snapshot', 'run-edit-script', 'commit-plan'];
|
|
233
|
+
readonly enum: readonly ['snapshot', 'migrate-legacy', 'run-edit-script', 'commit-plan'];
|
|
230
234
|
readonly description: 'Which Medeo document operation to run.';
|
|
231
235
|
};
|
|
232
236
|
readonly doc_id: {
|
|
@@ -237,12 +241,116 @@ declare const MEDEO_TOOL_PARAMETERS: {
|
|
|
237
241
|
readonly script: {
|
|
238
242
|
readonly type: 'string';
|
|
239
243
|
readonly minLength: 1;
|
|
240
|
-
readonly description: 'JavaScript body for run-edit-script.
|
|
244
|
+
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.';
|
|
241
245
|
};
|
|
242
246
|
readonly inputs: {
|
|
243
247
|
readonly type: 'object';
|
|
244
248
|
readonly description: 'Pre-materialized, side-effect-free values passed into the script, including recalled generation lineage and asset facts. Generation and network IO must happen in the host before this call.';
|
|
245
249
|
};
|
|
250
|
+
readonly asset_facts: {
|
|
251
|
+
readonly type: 'array';
|
|
252
|
+
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.';
|
|
253
|
+
readonly items: {
|
|
254
|
+
readonly oneOf: readonly [{
|
|
255
|
+
readonly type: 'object';
|
|
256
|
+
readonly additionalProperties: false;
|
|
257
|
+
readonly required: readonly ['assetId', 'kind'];
|
|
258
|
+
readonly properties: {
|
|
259
|
+
readonly assetId: {
|
|
260
|
+
readonly type: 'string';
|
|
261
|
+
readonly minLength: 1;
|
|
262
|
+
};
|
|
263
|
+
readonly kind: {
|
|
264
|
+
readonly const: 'image';
|
|
265
|
+
};
|
|
266
|
+
readonly storageKey: {
|
|
267
|
+
readonly type: 'string';
|
|
268
|
+
readonly minLength: 1;
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
}, {
|
|
272
|
+
readonly type: 'object';
|
|
273
|
+
readonly additionalProperties: false;
|
|
274
|
+
readonly required: readonly ['assetId', 'kind', 'durationMs'];
|
|
275
|
+
readonly properties: {
|
|
276
|
+
readonly assetId: {
|
|
277
|
+
readonly type: 'string';
|
|
278
|
+
readonly minLength: 1;
|
|
279
|
+
};
|
|
280
|
+
readonly kind: {
|
|
281
|
+
readonly const: 'video';
|
|
282
|
+
};
|
|
283
|
+
readonly durationMs: {
|
|
284
|
+
readonly type: 'integer';
|
|
285
|
+
readonly minimum: 1;
|
|
286
|
+
};
|
|
287
|
+
readonly storageKey: {
|
|
288
|
+
readonly type: 'string';
|
|
289
|
+
readonly minLength: 1;
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
}, {
|
|
293
|
+
readonly type: 'object';
|
|
294
|
+
readonly additionalProperties: false;
|
|
295
|
+
readonly required: readonly ['assetId', 'kind', 'durationMs', 'storageKey'];
|
|
296
|
+
readonly properties: {
|
|
297
|
+
readonly assetId: {
|
|
298
|
+
readonly type: 'string';
|
|
299
|
+
readonly minLength: 1;
|
|
300
|
+
};
|
|
301
|
+
readonly kind: {
|
|
302
|
+
readonly const: 'audio';
|
|
303
|
+
};
|
|
304
|
+
readonly durationMs: {
|
|
305
|
+
readonly type: 'integer';
|
|
306
|
+
readonly minimum: 1;
|
|
307
|
+
};
|
|
308
|
+
readonly storageKey: {
|
|
309
|
+
readonly type: 'string';
|
|
310
|
+
readonly minLength: 1;
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
}, {
|
|
314
|
+
readonly type: 'object';
|
|
315
|
+
readonly additionalProperties: false;
|
|
316
|
+
readonly required: readonly ['assetId', 'kind', 'durationMs', 'storageKey', 'voice'];
|
|
317
|
+
readonly properties: {
|
|
318
|
+
readonly assetId: {
|
|
319
|
+
readonly type: 'string';
|
|
320
|
+
readonly minLength: 1;
|
|
321
|
+
};
|
|
322
|
+
readonly durationMs: {
|
|
323
|
+
readonly type: 'integer';
|
|
324
|
+
readonly minimum: 1;
|
|
325
|
+
};
|
|
326
|
+
readonly storageKey: {
|
|
327
|
+
readonly type: 'string';
|
|
328
|
+
readonly minLength: 1;
|
|
329
|
+
};
|
|
330
|
+
readonly voice: {
|
|
331
|
+
readonly type: 'object';
|
|
332
|
+
readonly additionalProperties: false;
|
|
333
|
+
readonly required: readonly ['system', 'key'];
|
|
334
|
+
readonly properties: {
|
|
335
|
+
readonly system: {
|
|
336
|
+
readonly const: 'voice-library';
|
|
337
|
+
};
|
|
338
|
+
readonly key: {
|
|
339
|
+
readonly type: 'string';
|
|
340
|
+
readonly minLength: 1;
|
|
341
|
+
};
|
|
342
|
+
readonly name: {
|
|
343
|
+
readonly type: 'string';
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
readonly kind: {
|
|
348
|
+
readonly const: 'voice';
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
}];
|
|
352
|
+
};
|
|
353
|
+
};
|
|
246
354
|
readonly timeout_ms: {
|
|
247
355
|
readonly type: 'integer';
|
|
248
356
|
readonly minimum: 1;
|
|
@@ -264,11 +372,25 @@ declare const MEDEO_TOOL_PARAMETERS: {
|
|
|
264
372
|
};
|
|
265
373
|
readonly validation: {
|
|
266
374
|
readonly type: 'string';
|
|
267
|
-
readonly enum: readonly ['version'
|
|
268
|
-
readonly description: '
|
|
375
|
+
readonly enum: readonly ['version'];
|
|
376
|
+
readonly description: 'Commit with Entity revision CAS; reject concurrent changes.';
|
|
269
377
|
};
|
|
270
378
|
};
|
|
271
379
|
readonly oneOf: readonly [{
|
|
380
|
+
readonly required: readonly ['op', 'doc_id', 'asset_facts'];
|
|
381
|
+
readonly properties: {
|
|
382
|
+
readonly op: {
|
|
383
|
+
readonly const: 'migrate-legacy';
|
|
384
|
+
};
|
|
385
|
+
readonly doc_id: {
|
|
386
|
+
readonly $ref: '#/properties/doc_id';
|
|
387
|
+
};
|
|
388
|
+
readonly asset_facts: {
|
|
389
|
+
readonly $ref: '#/properties/asset_facts';
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
readonly additionalProperties: false;
|
|
393
|
+
}, {
|
|
272
394
|
readonly required: readonly ['op', 'doc_id'];
|
|
273
395
|
readonly properties: {
|
|
274
396
|
readonly op: {
|
|
@@ -436,6 +558,10 @@ interface MedeoModelContext {
|
|
|
436
558
|
type MedeoToolInput = {
|
|
437
559
|
op: 'snapshot';
|
|
438
560
|
doc_id: string;
|
|
561
|
+
} | {
|
|
562
|
+
op: 'migrate-legacy';
|
|
563
|
+
doc_id: string;
|
|
564
|
+
asset_facts: readonly MediaAssetFact[];
|
|
439
565
|
} | {
|
|
440
566
|
op: 'run-edit-script';
|
|
441
567
|
doc_id: string;
|
|
@@ -477,6 +603,13 @@ type EntityCommitResult = {
|
|
|
477
603
|
};
|
|
478
604
|
type MedeoCommitResult = CommitPlanResult | EntityCommitResult;
|
|
479
605
|
type MedeoToolResult = {
|
|
606
|
+
ok: true;
|
|
607
|
+
op: 'migrate-legacy';
|
|
608
|
+
doc_id: string;
|
|
609
|
+
migration_status: 'committed' | 'already_entity';
|
|
610
|
+
entity_revision: number;
|
|
611
|
+
next_action: 'snapshot';
|
|
612
|
+
} | {
|
|
480
613
|
ok: true;
|
|
481
614
|
op: 'snapshot';
|
|
482
615
|
doc_id: string;
|
|
@@ -549,5 +682,5 @@ type MedeoInitialDraft = VideoDraft;
|
|
|
549
682
|
*/
|
|
550
683
|
declare function createMedeoTool(options: CreateMedeoToolOptions): MedeoTool;
|
|
551
684
|
//#endregion
|
|
552
|
-
export { type AuthorableRelationKind, type ChangePlan, type CommitPlan, type CommitPlanOptions, type CommitPlanResult, type CompactProjectionOptions, type ConsoleShim, type CreateEntityInput, type CreateMedeoToolOptions, type EditFacade, EditSandboxSession, type EditSandboxSessionOptions, type EditScriptResult, type EntityCommand, type EntityCommitResult, type EntityFacade, type EntityPlanState, type EntityStoreSnapshot, 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, collectAffectedPartIds, commitPlan, createMedeoTool, renderCompactProjection, renderPreview, runEditScript };
|
|
685
|
+
export { 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 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 };
|
|
553
686
|
//# sourceMappingURL=index.d.mts.map
|