@mengine/medeo-tool 1.2.1-alpha.9 → 1.3.1-alpha.6
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 +39 -14
- package/dist/{entity-contract-DycLxdQ5.d.mts → entity-contract-hKZbJSRP.d.mts} +85 -33
- package/dist/index.d.mts +76 -76
- package/dist/index.mjs +258 -140
- package/dist/index.mjs.map +1 -1
- package/dist/sandbox-api.d.mts +142 -43
- package/dist/{script-session-CHyIUBkO.mjs → script-session-1eqBGegp.mjs} +664 -132
- package/dist/script-session-1eqBGegp.mjs.map +1 -0
- package/dist/worker-entry.d.mts +1 -1
- package/dist/worker-entry.mjs +28 -8
- package/dist/worker-entry.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/script-session-CHyIUBkO.mjs.map +0 -1
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
|
-
//
|
|
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
|
|
52
|
-
|
|
53
|
-
|
|
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
|
|
74
|
-
|
|
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
|
|
87
|
-
|
|
88
|
-
|
|
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
|
|
99
|
-
|
|
100
|
-
|
|
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
|
-
|
|
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
|
-
/**
|
|
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
|
-
|
|
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:
|
|
130
|
+
payload: StoredEntityPayload<K>;
|
|
88
131
|
}
|
|
89
132
|
interface SandboxRelation {
|
|
90
133
|
relation_id: string;
|
|
@@ -102,8 +145,9 @@ interface EntityStoreSnapshot {
|
|
|
102
145
|
type CreateEntityInput = { [K in KnownEntityKind]: {
|
|
103
146
|
entity_id?: string;
|
|
104
147
|
entity_kind: K;
|
|
105
|
-
payload:
|
|
148
|
+
payload: StoredEntityPayload<K>;
|
|
106
149
|
} }[KnownEntityKind];
|
|
150
|
+
/** Patch supplied fields on the assembled entity; omitted fields remain unchanged. */
|
|
107
151
|
interface UpdateEntityInput {
|
|
108
152
|
entity_id: string;
|
|
109
153
|
payload: JsonObject;
|
|
@@ -111,12 +155,7 @@ interface UpdateEntityInput {
|
|
|
111
155
|
interface DeleteEntityInput {
|
|
112
156
|
entity_id: string;
|
|
113
157
|
}
|
|
114
|
-
|
|
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';
|
|
158
|
+
type EmptyRelationKind = 'timeline-track' | 'track-clip' | 'clip-marker' | 'marker-content' | 'axvideo-marker' | 'marker-timeline' | 'audio-script-marker';
|
|
120
159
|
interface LinkRelationBase {
|
|
121
160
|
relation_id?: string;
|
|
122
161
|
endpoint_0_entity_id: string;
|
|
@@ -131,11 +170,6 @@ type LinkRelationInput = (LinkRelationBase & {
|
|
|
131
170
|
}) | (LinkRelationBase & {
|
|
132
171
|
relation_kind: 'physical-asset';
|
|
133
172
|
metadata?: JsonObject;
|
|
134
|
-
}) | (LinkRelationBase & {
|
|
135
|
-
relation_kind: 'phonetic-script-provenance' | 'caption-provenance';
|
|
136
|
-
metadata: JsonObject & {
|
|
137
|
-
segmentAlignment: JsonValue;
|
|
138
|
-
};
|
|
139
173
|
}) | (LinkRelationBase & {
|
|
140
174
|
relation_kind: 'caption-alignment';
|
|
141
175
|
metadata: JsonObject & {
|
|
@@ -154,10 +188,17 @@ interface LinkClipAnchorRelationInput {
|
|
|
154
188
|
host_clip_entity_id: string;
|
|
155
189
|
trace?: JsonObject;
|
|
156
190
|
}
|
|
157
|
-
interface
|
|
191
|
+
interface LinkPhoneticScriptRenderRelationInput {
|
|
158
192
|
relation_id?: string;
|
|
159
193
|
output_entity_id: string;
|
|
194
|
+
phonetic_script_entity_id: string;
|
|
195
|
+
trace?: JsonObject;
|
|
196
|
+
}
|
|
197
|
+
/** `audio-script-source(script, source)`; the script was transcribed from the source media. */
|
|
198
|
+
interface LinkAudioScriptSourceRelationInput {
|
|
199
|
+
relation_id?: string;
|
|
160
200
|
script_entity_id: string;
|
|
201
|
+
source_entity_id: string;
|
|
161
202
|
trace?: JsonObject;
|
|
162
203
|
}
|
|
163
204
|
interface UnlinkRelationInput {
|
|
@@ -188,33 +229,44 @@ interface EntityPlanState {
|
|
|
188
229
|
deleted_relation_ids: readonly string[];
|
|
189
230
|
}
|
|
190
231
|
interface EntityFacade {
|
|
232
|
+
/** Read complete assembled fields; returned objects are snapshots. Use update to persist edits. */
|
|
191
233
|
list(): SandboxEntity[];
|
|
192
234
|
get(entityId: string): SandboxEntity | null;
|
|
193
|
-
/**
|
|
194
|
-
findByAssetId(assetId: string): SandboxEntity<
|
|
235
|
+
/** Find document resources by external Memota asset id, including directly composed media variants. */
|
|
236
|
+
findByAssetId(assetId: string): SandboxEntity<ResourceEntityKind>[];
|
|
237
|
+
/** Assemble selected Caption text; missing composition is an error. */
|
|
238
|
+
readCaptionContent(entityId: string): ComposedScriptContent;
|
|
239
|
+
/** Assemble base text and pronunciation fields before generating Voice. */
|
|
240
|
+
readPhoneticScriptContent(entityId: string): ComposedPhoneticContent;
|
|
195
241
|
create(input: CreateEntityInput): string;
|
|
196
|
-
/**
|
|
242
|
+
/** Patch assembled fields, routing inherited fields to their declaring entity. */
|
|
197
243
|
update(input: UpdateEntityInput): void;
|
|
244
|
+
/** Explicitly declare own fields, overriding unambiguous bases without modifying them. Ordinary edits use update. */
|
|
245
|
+
declareFields(input: UpdateEntityInput): void;
|
|
198
246
|
/** Delete an Entity only after all of its incident Relations have been explicitly unlinked. */
|
|
199
247
|
delete(input: DeleteEntityInput): void;
|
|
200
|
-
/**
|
|
201
|
-
|
|
248
|
+
/** Get or create one typed Asset by factual external id and return its single content identity. Never creates a Clip. */
|
|
249
|
+
ensureMedia(fact: MediaAssetFact): {
|
|
250
|
+
contentEntityId: string;
|
|
251
|
+
};
|
|
202
252
|
}
|
|
203
253
|
interface RelationFacade {
|
|
204
254
|
list(): SandboxRelation[];
|
|
205
255
|
/** Incident lookup is endpoint-agnostic; persisted endpoint positions stay unchanged. */
|
|
206
256
|
of(entityId: string, relationKind?: KnownRelationKind): SandboxRelation[];
|
|
207
|
-
/**
|
|
257
|
+
/** Link existing entities through ordinary associations; variant bases are stored directly on the variant. */
|
|
208
258
|
link(input: LinkRelationInput): string;
|
|
209
259
|
/** Author ordered generated(output,input); generic link() deliberately rejects this kind. */
|
|
210
260
|
linkGenerated(input: LinkGeneratedRelationInput): string;
|
|
211
261
|
/** Author ordered clip-anchor(child,host) without positional endpoint ambiguity. */
|
|
212
262
|
linkClipAnchor(input: LinkClipAnchorRelationInput): string;
|
|
213
|
-
/** Author ordered
|
|
214
|
-
|
|
263
|
+
/** Author ordered phonetic-script-render(output,script) without positional endpoint ambiguity. */
|
|
264
|
+
linkPhoneticScriptRender(input: LinkPhoneticScriptRenderRelationInput): string;
|
|
265
|
+
/** Author ordered audio-script-source(script,source) without positional endpoint ambiguity. */
|
|
266
|
+
linkAudioScriptSource(input: LinkAudioScriptSourceRelationInput): string;
|
|
215
267
|
/** Remove a Relation by identity; endpoint replacement is an explicit unlink plus link. */
|
|
216
268
|
unlink(input: UnlinkRelationInput): void;
|
|
217
269
|
}
|
|
218
270
|
//#endregion
|
|
219
|
-
export { SandboxEntity as _, EntityFacade as a, UpdateEntityInput as b,
|
|
220
|
-
//# sourceMappingURL=entity-contract-
|
|
271
|
+
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 };
|
|
272
|
+
//# sourceMappingURL=entity-contract-hKZbJSRP.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
|
|
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-hKZbJSRP.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:
|
|
260
|
-
readonly required: readonly [
|
|
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:
|
|
265
|
-
readonly enum: readonly [
|
|
266
|
-
readonly description:
|
|
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:
|
|
269
|
+
readonly type: "string";
|
|
270
270
|
readonly minLength: 1;
|
|
271
|
-
readonly description:
|
|
271
|
+
readonly description: "Medeo document id. Copy it from the host context; never invent it.";
|
|
272
272
|
};
|
|
273
273
|
readonly script: {
|
|
274
|
-
readonly type:
|
|
274
|
+
readonly type: "string";
|
|
275
275
|
readonly minLength: 1;
|
|
276
|
-
readonly description:
|
|
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:
|
|
280
|
-
readonly description:
|
|
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:
|
|
284
|
-
readonly description:
|
|
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:
|
|
287
|
+
readonly type: "object";
|
|
288
288
|
readonly additionalProperties: false;
|
|
289
|
-
readonly required: readonly [
|
|
289
|
+
readonly required: readonly ["assetId", "kind"];
|
|
290
290
|
readonly properties: {
|
|
291
291
|
readonly assetId: {
|
|
292
|
-
readonly type:
|
|
292
|
+
readonly type: "string";
|
|
293
293
|
readonly minLength: 1;
|
|
294
294
|
};
|
|
295
295
|
readonly kind: {
|
|
296
|
-
readonly const:
|
|
296
|
+
readonly const: "image";
|
|
297
297
|
};
|
|
298
298
|
readonly storageKey: {
|
|
299
|
-
readonly type:
|
|
299
|
+
readonly type: "string";
|
|
300
300
|
readonly minLength: 1;
|
|
301
301
|
};
|
|
302
302
|
};
|
|
303
303
|
}, {
|
|
304
|
-
readonly type:
|
|
304
|
+
readonly type: "object";
|
|
305
305
|
readonly additionalProperties: false;
|
|
306
|
-
readonly required: readonly [
|
|
306
|
+
readonly required: readonly ["assetId", "kind", "durationMs"];
|
|
307
307
|
readonly properties: {
|
|
308
308
|
readonly assetId: {
|
|
309
|
-
readonly type:
|
|
309
|
+
readonly type: "string";
|
|
310
310
|
readonly minLength: 1;
|
|
311
311
|
};
|
|
312
312
|
readonly kind: {
|
|
313
|
-
readonly const:
|
|
313
|
+
readonly const: "video";
|
|
314
314
|
};
|
|
315
315
|
readonly durationMs: {
|
|
316
|
-
readonly type:
|
|
316
|
+
readonly type: "integer";
|
|
317
317
|
readonly minimum: 1;
|
|
318
318
|
};
|
|
319
319
|
readonly storageKey: {
|
|
320
|
-
readonly type:
|
|
320
|
+
readonly type: "string";
|
|
321
321
|
readonly minLength: 1;
|
|
322
322
|
};
|
|
323
323
|
};
|
|
324
324
|
}, {
|
|
325
|
-
readonly type:
|
|
325
|
+
readonly type: "object";
|
|
326
326
|
readonly additionalProperties: false;
|
|
327
|
-
readonly required: readonly [
|
|
327
|
+
readonly required: readonly ["assetId", "kind", "durationMs", "storageKey"];
|
|
328
328
|
readonly properties: {
|
|
329
329
|
readonly assetId: {
|
|
330
|
-
readonly type:
|
|
330
|
+
readonly type: "string";
|
|
331
331
|
readonly minLength: 1;
|
|
332
332
|
};
|
|
333
333
|
readonly kind: {
|
|
334
|
-
readonly const:
|
|
334
|
+
readonly const: "audio";
|
|
335
335
|
};
|
|
336
336
|
readonly durationMs: {
|
|
337
|
-
readonly type:
|
|
337
|
+
readonly type: "integer";
|
|
338
338
|
readonly minimum: 1;
|
|
339
339
|
};
|
|
340
340
|
readonly storageKey: {
|
|
341
|
-
readonly type:
|
|
341
|
+
readonly type: "string";
|
|
342
342
|
readonly minLength: 1;
|
|
343
343
|
};
|
|
344
344
|
};
|
|
345
345
|
}, {
|
|
346
|
-
readonly type:
|
|
346
|
+
readonly type: "object";
|
|
347
347
|
readonly additionalProperties: false;
|
|
348
|
-
readonly required: readonly [
|
|
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:
|
|
354
|
+
readonly type: "string";
|
|
352
355
|
readonly minLength: 1;
|
|
353
356
|
};
|
|
354
357
|
readonly durationMs: {
|
|
355
|
-
readonly type:
|
|
358
|
+
readonly type: "integer";
|
|
356
359
|
readonly minimum: 1;
|
|
357
360
|
};
|
|
358
361
|
readonly storageKey: {
|
|
359
|
-
readonly type:
|
|
362
|
+
readonly type: "string";
|
|
360
363
|
readonly minLength: 1;
|
|
361
364
|
};
|
|
362
365
|
readonly voice: {
|
|
363
|
-
readonly type:
|
|
366
|
+
readonly type: "object";
|
|
364
367
|
readonly additionalProperties: false;
|
|
365
|
-
readonly required: readonly [
|
|
368
|
+
readonly required: readonly ["system", "key"];
|
|
366
369
|
readonly properties: {
|
|
367
370
|
readonly system: {
|
|
368
|
-
readonly const:
|
|
371
|
+
readonly const: "voice-library";
|
|
369
372
|
};
|
|
370
373
|
readonly key: {
|
|
371
|
-
readonly type:
|
|
374
|
+
readonly type: "string";
|
|
372
375
|
readonly minLength: 1;
|
|
373
376
|
};
|
|
374
377
|
readonly name: {
|
|
375
|
-
readonly type:
|
|
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:
|
|
387
|
+
readonly type: "integer";
|
|
388
388
|
readonly minimum: 1;
|
|
389
|
-
readonly description:
|
|
389
|
+
readonly description: "Maximum script wall-clock time after worker startup (default 2000).";
|
|
390
390
|
};
|
|
391
391
|
readonly memory_limit_mb: {
|
|
392
|
-
readonly type:
|
|
392
|
+
readonly type: "integer";
|
|
393
393
|
readonly minimum: 16;
|
|
394
|
-
readonly description:
|
|
394
|
+
readonly description: "Worker old-generation memory ceiling in MB (default 256).";
|
|
395
395
|
};
|
|
396
396
|
readonly auto_commit: {
|
|
397
|
-
readonly type:
|
|
398
|
-
readonly description:
|
|
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:
|
|
401
|
+
readonly type: "string";
|
|
402
402
|
readonly minLength: 1;
|
|
403
|
-
readonly description:
|
|
403
|
+
readonly description: "Plan id returned by run-edit-script; required by commit-plan.";
|
|
404
404
|
};
|
|
405
405
|
readonly validation: {
|
|
406
|
-
readonly type:
|
|
407
|
-
readonly enum: readonly [
|
|
408
|
-
readonly description:
|
|
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 [
|
|
412
|
+
readonly required: readonly ["op", "doc_id", "asset_facts"];
|
|
413
413
|
readonly properties: {
|
|
414
414
|
readonly op: {
|
|
415
|
-
readonly const:
|
|
415
|
+
readonly const: "migrate-legacy";
|
|
416
416
|
};
|
|
417
417
|
readonly doc_id: {
|
|
418
|
-
readonly $ref:
|
|
418
|
+
readonly $ref: "#/properties/doc_id";
|
|
419
419
|
};
|
|
420
420
|
readonly asset_facts: {
|
|
421
|
-
readonly $ref:
|
|
421
|
+
readonly $ref: "#/properties/asset_facts";
|
|
422
422
|
};
|
|
423
423
|
};
|
|
424
424
|
readonly additionalProperties: false;
|
|
425
425
|
}, {
|
|
426
|
-
readonly required: readonly [
|
|
426
|
+
readonly required: readonly ["op", "doc_id"];
|
|
427
427
|
readonly properties: {
|
|
428
428
|
readonly op: {
|
|
429
|
-
readonly const:
|
|
429
|
+
readonly const: "snapshot";
|
|
430
430
|
};
|
|
431
431
|
readonly doc_id: {
|
|
432
|
-
readonly $ref:
|
|
432
|
+
readonly $ref: "#/properties/doc_id";
|
|
433
433
|
};
|
|
434
434
|
};
|
|
435
435
|
readonly additionalProperties: false;
|
|
436
436
|
}, {
|
|
437
|
-
readonly required: readonly [
|
|
437
|
+
readonly required: readonly ["op", "doc_id", "script"];
|
|
438
438
|
readonly properties: {
|
|
439
439
|
readonly op: {
|
|
440
|
-
readonly const:
|
|
440
|
+
readonly const: "run-edit-script";
|
|
441
441
|
};
|
|
442
442
|
readonly doc_id: {
|
|
443
|
-
readonly $ref:
|
|
443
|
+
readonly $ref: "#/properties/doc_id";
|
|
444
444
|
};
|
|
445
445
|
readonly script: {
|
|
446
|
-
readonly $ref:
|
|
446
|
+
readonly $ref: "#/properties/script";
|
|
447
447
|
};
|
|
448
448
|
readonly inputs: {
|
|
449
|
-
readonly $ref:
|
|
449
|
+
readonly $ref: "#/properties/inputs";
|
|
450
450
|
};
|
|
451
451
|
readonly timeout_ms: {
|
|
452
|
-
readonly $ref:
|
|
452
|
+
readonly $ref: "#/properties/timeout_ms";
|
|
453
453
|
};
|
|
454
454
|
readonly memory_limit_mb: {
|
|
455
|
-
readonly $ref:
|
|
455
|
+
readonly $ref: "#/properties/memory_limit_mb";
|
|
456
456
|
};
|
|
457
457
|
readonly auto_commit: {
|
|
458
|
-
readonly $ref:
|
|
458
|
+
readonly $ref: "#/properties/auto_commit";
|
|
459
459
|
};
|
|
460
460
|
};
|
|
461
461
|
readonly additionalProperties: false;
|
|
462
462
|
}, {
|
|
463
|
-
readonly required: readonly [
|
|
463
|
+
readonly required: readonly ["op", "doc_id", "plan_id"];
|
|
464
464
|
readonly properties: {
|
|
465
465
|
readonly op: {
|
|
466
|
-
readonly const:
|
|
466
|
+
readonly const: "commit-plan";
|
|
467
467
|
};
|
|
468
468
|
readonly doc_id: {
|
|
469
|
-
readonly $ref:
|
|
469
|
+
readonly $ref: "#/properties/doc_id";
|
|
470
470
|
};
|
|
471
471
|
readonly plan_id: {
|
|
472
|
-
readonly $ref:
|
|
472
|
+
readonly $ref: "#/properties/plan_id";
|
|
473
473
|
};
|
|
474
474
|
readonly validation: {
|
|
475
|
-
readonly $ref:
|
|
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
|
|
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
|