@mengine/medeo-tool 1.4.1-alpha.2 → 1.4.1-alpha.3
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 +67 -141
- package/dist/{entity-contract-Cpf3P69H.d.mts → entity-contract-DQ56Ihrh.d.mts} +36 -76
- package/dist/{script-session-lXpqmupK.mjs → entity-sandbox-BH-7F5C8.mjs} +126 -503
- package/dist/entity-sandbox-BH-7F5C8.mjs.map +1 -0
- package/dist/index.d.mts +3 -99
- package/dist/index.mjs +233 -343
- package/dist/index.mjs.map +1 -1
- package/dist/sandbox-api.d.mts +59 -293
- package/dist/worker-entry.d.mts +1 -2
- package/dist/worker-entry.mjs +70 -209
- package/dist/worker-entry.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/script-session-lXpqmupK.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { JournalEntry, ManualSyncDoc, MediaAssetFact, PartIdFactory, SemanticOpName, VideoDocument, VideoDraft
|
|
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";
|
|
1
|
+
import { C as UpdateEntityInput, S as UnlinkRelationInput, _ as LinkRelationInput, a as DeleteEntityInput, b as SandboxEntity, c as EntitySandboxCheckpoint, d as JsonObject, f as JsonPrimitive, g as LinkGeneratedRelationInput, h as KnownRelationKind, i as CreateEntityInput, l as EntityStoreSnapshot, m as KnownEntityKind, n as BusinessEntityFacade, o as EntityCommand, p as JsonValue, r as BusinessRelationFacade, s as EntityPlanState, t as AuthorableRelationKind, u as EntityUpdateInput, v as RelationUpdateInput, x as SandboxRelation, y as ResourceEntityKind } from "./entity-contract-DQ56Ihrh.mjs";
|
|
2
|
+
import { JournalEntry, ManualSyncDoc, MediaAssetFact, PartIdFactory, SemanticOpName, VideoDocument, VideoDraft } from "@mengine/medeo-client";
|
|
4
3
|
|
|
5
4
|
//#region src/document/compact-projection.d.ts
|
|
6
5
|
/**
|
|
@@ -46,17 +45,6 @@ type EntityAssetLoader = (docId: string, entity: SandboxEntity) => Promise<Entit
|
|
|
46
45
|
type DomainIdFactory = (prefix: 'entity' | 'relation') => string;
|
|
47
46
|
//#endregion
|
|
48
47
|
//#region src/sandbox/script-session.d.ts
|
|
49
|
-
/**
|
|
50
|
-
* Runtime-neutral edit-sandbox session: `edit.*` / `timeline.*` / checkpoint
|
|
51
|
-
* facade over a forked `VideoDocument`, self-maintained journal, and console
|
|
52
|
-
* log buffer. No `node:*` imports — host/worker layers inject this into vm.
|
|
53
|
-
*
|
|
54
|
-
* Known gap (not solved here): `Math.random` / `Date.now` remain reachable in
|
|
55
|
-
* the vm; purity is by convention.
|
|
56
|
-
*/
|
|
57
|
-
interface SandboxCheckpoint {
|
|
58
|
-
readonly index: number;
|
|
59
|
-
}
|
|
60
48
|
interface ChangePlan {
|
|
61
49
|
/** Native operations compiled against the causal sandbox baseline. */
|
|
62
50
|
loro_update?: string;
|
|
@@ -83,88 +71,6 @@ interface EditSandboxSessionOptions {
|
|
|
83
71
|
onEntityCommand?: (command: EntityCommand) => void;
|
|
84
72
|
onEntityTruncate?: (index: number) => void;
|
|
85
73
|
}
|
|
86
|
-
interface TimelineClipDescriptor {
|
|
87
|
-
id: string;
|
|
88
|
-
start_ms: number;
|
|
89
|
-
end_ms: number;
|
|
90
|
-
duration_ms: number;
|
|
91
|
-
speed_shift: unknown;
|
|
92
|
-
volume: number | undefined;
|
|
93
|
-
media_id: string | undefined;
|
|
94
|
-
}
|
|
95
|
-
interface TimelinePartDescriptor {
|
|
96
|
-
id: string;
|
|
97
|
-
kind: string;
|
|
98
|
-
lane: string;
|
|
99
|
-
start_ms: number;
|
|
100
|
-
end_ms: number;
|
|
101
|
-
duration_ms: number;
|
|
102
|
-
part: unknown;
|
|
103
|
-
}
|
|
104
|
-
/** Session core for one forked document; globals stay identity-stable across rollback. */
|
|
105
|
-
declare class EditSandboxSession {
|
|
106
|
-
private readonly original;
|
|
107
|
-
private readonly idFactory;
|
|
108
|
-
private readonly onEntry;
|
|
109
|
-
private readonly onLog;
|
|
110
|
-
private readonly onTruncate;
|
|
111
|
-
private readonly entitySandbox;
|
|
112
|
-
private current;
|
|
113
|
-
/** Adapter journal length already accounted for — new slices are real commits. */
|
|
114
|
-
private adapterJournalSeen;
|
|
115
|
-
private readonly entries;
|
|
116
|
-
private readonly logs;
|
|
117
|
-
private logBytes;
|
|
118
|
-
private logCapped;
|
|
119
|
-
readonly edit: EditFacade;
|
|
120
|
-
readonly timeline: TimelineFacade;
|
|
121
|
-
readonly entities: EntityFacade;
|
|
122
|
-
readonly relations: RelationFacade;
|
|
123
|
-
readonly console: ConsoleShim;
|
|
124
|
-
readonly checkpoint: () => SandboxCheckpoint;
|
|
125
|
-
readonly rollbackTo: (cp: SandboxCheckpoint) => void;
|
|
126
|
-
constructor(document: VideoDocument, options?: EditSandboxSessionOptions);
|
|
127
|
-
/** Assemble a ChangePlan from the self-maintained journal + current preview. */
|
|
128
|
-
buildPlan(baseVersion: string): ChangePlan;
|
|
129
|
-
getEntries(): readonly JournalEntry[];
|
|
130
|
-
getLogs(): readonly string[];
|
|
131
|
-
private boot;
|
|
132
|
-
private doRollbackTo;
|
|
133
|
-
private captureNewEntries;
|
|
134
|
-
private appendLog;
|
|
135
|
-
private buildConsoleShim;
|
|
136
|
-
private buildEditFacade;
|
|
137
|
-
private buildTimelineFacade;
|
|
138
|
-
private clipsInRange;
|
|
139
|
-
private part;
|
|
140
|
-
}
|
|
141
|
-
interface EditFacade {
|
|
142
|
-
addSpeeches: (input: AddSpeechesInput) => Promise<void>;
|
|
143
|
-
addVideoClips: (input: AddVideoClipsInput) => Promise<void>;
|
|
144
|
-
adjustBgmVolume: (input: AdjustBgmVolumeInput) => Promise<void>;
|
|
145
|
-
adjustSpeechVolume: (input: AdjustSpeechVolumeInput) => Promise<void>;
|
|
146
|
-
adjustVideoClipDuration: (input: AdjustVideoClipDurationInput) => Promise<void>;
|
|
147
|
-
adjustVideoClipVolume: (input: AdjustVideoClipVolumeInput) => Promise<void>;
|
|
148
|
-
changeSpeechScript: (input: ChangeSpeechScriptInput) => Promise<void>;
|
|
149
|
-
changeSpeechVoice: (input: ChangeSpeechVoiceInput) => Promise<void>;
|
|
150
|
-
deleteBgm: (input: DeleteBgmInput) => Promise<void>;
|
|
151
|
-
deleteSpeeches: (input: DeleteSpeechesInput) => Promise<void>;
|
|
152
|
-
deleteVideoClips: (input: DeleteVideoClipsInput) => Promise<void>;
|
|
153
|
-
moveSpeeches: (input: MoveSpeechesInput) => Promise<void>;
|
|
154
|
-
moveVideoClips: (input: MoveVideoClipsInput) => Promise<void>;
|
|
155
|
-
moveVideoClipsByAnchor: (input: MoveVideoClipsByAnchorInput) => Promise<void>;
|
|
156
|
-
replaceVideoClipContent: (input: ReplaceVideoClipContentInput) => Promise<void>;
|
|
157
|
-
replaceVideoClipSequence: (input: ReplaceVideoClipSequenceInput) => Promise<void>;
|
|
158
|
-
setBgm: (input: SetBgmInput) => Promise<void>;
|
|
159
|
-
setCaptionStyle: (input: SetCaptionStyleInput) => Promise<void>;
|
|
160
|
-
setCaptionVisibility: (input: SetCaptionVisibilityInput) => Promise<void>;
|
|
161
|
-
setVideoClipSpeedShift: (input: SetVideoClipSpeedShiftInput) => Promise<void>;
|
|
162
|
-
}
|
|
163
|
-
interface TimelineFacade {
|
|
164
|
-
snapshot: () => ReturnType<typeof fromVideoDocument>;
|
|
165
|
-
clipsInRange: (startMs: number, endMs: number) => TimelineClipDescriptor[];
|
|
166
|
-
part: (id: string) => TimelinePartDescriptor | null;
|
|
167
|
-
}
|
|
168
74
|
interface ConsoleShim {
|
|
169
75
|
log: (...args: unknown[]) => void;
|
|
170
76
|
info: (...args: unknown[]) => void;
|
|
@@ -190,8 +96,6 @@ interface RunEditScriptOptions {
|
|
|
190
96
|
entityState?: EntityStoreSnapshot;
|
|
191
97
|
/** Deterministic id mint label for tests; omit to use the default ULID factory. */
|
|
192
98
|
idLabel?: string;
|
|
193
|
-
/** @internal Select the graph-native Entity session used by the production host. */
|
|
194
|
-
entityOnly?: boolean;
|
|
195
99
|
/** Hard wall-clock timeout; default 2000 ms. */
|
|
196
100
|
timeoutMs?: number;
|
|
197
101
|
/** V8 old-generation ceiling for the worker; default 256 MB. */
|
|
@@ -663,5 +567,5 @@ declare function materializeResources(options: EntityHttpClientOptions & {
|
|
|
663
567
|
loadGenerationFacts?: GenerationFactsLoader;
|
|
664
568
|
}, resources: readonly GeneratedResource[]): Promise<readonly string[]>;
|
|
665
569
|
//#endregion
|
|
666
|
-
export { type AssetGenerationFact, type AuthorableRelationKind, type CaptionAssetAssemblyOutcome, type CaptionAssetFact, type CaptionAssetsLoader, type ChangePlan, type CommitPlan, type CommitPlanOptions, type CommitPlanResult, type CompactProjectionOptions, type ConsoleShim, type CreateEntityInput, type CreateMedeoToolOptions, type DeleteEntityInput, type
|
|
570
|
+
export { type AssetGenerationFact, type AuthorableRelationKind, type BusinessEntityFacade, type BusinessRelationFacade, type CaptionAssetAssemblyOutcome, type CaptionAssetFact, type CaptionAssetsLoader, type ChangePlan, type CommitPlan, type CommitPlanOptions, type CommitPlanResult, type CompactProjectionOptions, type ConsoleShim, type CreateEntityInput, type CreateMedeoToolOptions, type DeleteEntityInput, type EditSandboxSessionOptions, type EditScriptResult, type EntityAssetContent, type EntityAssetLoader, type EntityCommand, type EntityCommitResult, type EntityPlanState, type EntitySandboxCheckpoint, type EntityStoreSnapshot, type EntityUpdateInput, type GeneratedResource, 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 RelationUpdateInput, type ResourceEntityKind, type RunEditScriptOptions, type SandboxEntity, type SandboxRelation, type UnlinkRelationInput, type UpdateEntityInput, collectAffectedPartIds, commitPlan, createMedeoTool, materializeResources, renderCompactProjection, renderPreview, runEditScript };
|
|
667
571
|
//# sourceMappingURL=index.d.mts.map
|