@rightkit/video-ui 0.0.0-stage → 0.1.0
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/CHANGELOG.md +5 -0
- package/LICENSE-APACHE +201 -0
- package/LICENSE-MIT +21 -0
- package/README.md +47 -2
- package/dist/appName.d.ts +2 -0
- package/dist/appName.js +8 -0
- package/dist/components/DesktopWorkspace.d.ts +4 -0
- package/dist/components/DesktopWorkspace.js +527 -0
- package/dist/components/Player.d.ts +49 -0
- package/dist/components/Player.js +335 -0
- package/dist/components/RangePreview.d.ts +9 -0
- package/dist/components/RangePreview.js +22 -0
- package/dist/components/Workspace.css +15 -0
- package/dist/demo/DemoSettings.d.ts +1 -0
- package/dist/demo/DemoSettings.js +43 -0
- package/dist/demo/bindings.d.ts +121 -0
- package/dist/demo/bindings.js +57 -0
- package/dist/demo/demo.css +124 -0
- package/dist/demo/useDemo.d.ts +8 -0
- package/dist/demo/useDemo.js +37 -0
- package/dist/editor/CaptionInspector.d.ts +8 -0
- package/dist/editor/CaptionInspector.js +33 -0
- package/dist/editor/ChangesPanel.d.ts +13 -0
- package/dist/editor/ChangesPanel.js +87 -0
- package/dist/editor/ColourInspector.d.ts +5 -0
- package/dist/editor/ColourInspector.js +341 -0
- package/dist/editor/Inspector.d.ts +15 -0
- package/dist/editor/Inspector.js +202 -0
- package/dist/editor/Timeline.d.ts +39 -0
- package/dist/editor/Timeline.js +506 -0
- package/dist/editor/TimelineEditorView.d.ts +9 -0
- package/dist/editor/TimelineEditorView.js +237 -0
- package/dist/editor/TranscriptPanel.d.ts +20 -0
- package/dist/editor/TranscriptPanel.js +180 -0
- package/dist/editor/actions.d.ts +63 -0
- package/dist/editor/actions.js +124 -0
- package/dist/editor/adapter.d.ts +76 -0
- package/dist/editor/adapter.js +181 -0
- package/dist/editor/capabilities.d.ts +37 -0
- package/dist/editor/capabilities.js +33 -0
- package/dist/editor/gesture.d.ts +29 -0
- package/dist/editor/gesture.js +119 -0
- package/dist/editor/index.d.ts +10 -0
- package/dist/editor/index.js +7 -0
- package/dist/editor/keys.d.ts +15 -0
- package/dist/editor/keys.js +42 -0
- package/dist/editor/model.d.ts +88 -0
- package/dist/editor/model.js +87 -0
- package/dist/editor/transcript.d.ts +27 -0
- package/dist/editor/transcript.js +59 -0
- package/dist/editor/vendor/hyperframes/PlayheadIndicator.d.ts +9 -0
- package/dist/editor/vendor/hyperframes/PlayheadIndicator.js +38 -0
- package/dist/editor/vendor/hyperframes/audioWaveformPeaks.d.ts +7 -0
- package/dist/editor/vendor/hyperframes/audioWaveformPeaks.js +47 -0
- package/dist/editor/vendor/hyperframes/rulerGeometry.d.ts +13 -0
- package/dist/editor/vendor/hyperframes/rulerGeometry.js +133 -0
- package/dist/editor/vendor/hyperframes/useInspectorGestureTransaction.d.ts +33 -0
- package/dist/editor/vendor/hyperframes/useInspectorGestureTransaction.js +126 -0
- package/dist/env.d.ts +66 -0
- package/dist/hooks/useEngine.d.ts +10 -0
- package/dist/hooks/useEngine.js +68 -0
- package/dist/hooks/useHdrToSdr.d.ts +11 -0
- package/dist/hooks/useHdrToSdr.js +19 -0
- package/dist/hooks/useProgress.d.ts +10 -0
- package/dist/hooks/useProgress.js +32 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.js +57 -0
- package/dist/legal/legalConfig.d.ts +38 -0
- package/dist/legal/legalConfig.js +77 -0
- package/dist/lib/assemble.d.ts +100 -0
- package/dist/lib/assemble.js +72 -0
- package/dist/lib/asset.d.ts +2 -0
- package/dist/lib/asset.js +3 -0
- package/dist/lib/dialog.d.ts +4 -0
- package/dist/lib/dialog.js +44 -0
- package/dist/lib/engine.d.ts +44 -0
- package/dist/lib/engine.js +51 -0
- package/dist/lib/genright.d.ts +90 -0
- package/dist/lib/genright.js +160 -0
- package/dist/lib/media.d.ts +1045 -0
- package/dist/lib/media.js +171 -0
- package/dist/lib/mediaAdapters.d.ts +18 -0
- package/dist/lib/mediaAdapters.js +46 -0
- package/dist/lib/mic.d.ts +38 -0
- package/dist/lib/mic.js +14 -0
- package/dist/lib/models.d.ts +53 -0
- package/dist/lib/models.js +72 -0
- package/dist/lib/modelsBackend.d.ts +3 -0
- package/dist/lib/modelsBackend.js +68 -0
- package/dist/lib/progress.d.ts +77 -0
- package/dist/lib/progress.js +192 -0
- package/dist/lib/project.d.ts +138 -0
- package/dist/lib/project.js +48 -0
- package/dist/lib/services.d.ts +24 -0
- package/dist/lib/services.js +38 -0
- package/dist/lib/settingsBackend.d.ts +2 -0
- package/dist/lib/settingsBackend.js +57 -0
- package/dist/lib/shell.d.ts +171 -0
- package/dist/lib/shell.js +32 -0
- package/dist/styles.css +16 -0
- package/dist/ui/icons.d.ts +7 -0
- package/dist/ui/icons.js +62 -0
- package/dist/ui/index.d.ts +45 -0
- package/dist/ui/index.js +43 -0
- package/dist/ui/ui.css +104 -0
- package/dist/views/Assets.css +99 -0
- package/dist/views/AssetsView.d.ts +6 -0
- package/dist/views/AssetsView.js +371 -0
- package/dist/views/AutoEditView.d.ts +16 -0
- package/dist/views/AutoEditView.js +452 -0
- package/dist/views/BatchDelivery.d.ts +3 -0
- package/dist/views/BatchDelivery.js +331 -0
- package/dist/views/BundleExport.d.ts +3 -0
- package/dist/views/BundleExport.js +81 -0
- package/dist/views/Exports.css +117 -0
- package/dist/views/ExportsView.d.ts +12 -0
- package/dist/views/ExportsView.js +354 -0
- package/dist/views/FinishedEdit.css +546 -0
- package/dist/views/Home.css +97 -0
- package/dist/views/Home.d.ts +14 -0
- package/dist/views/Home.js +192 -0
- package/dist/views/Media.css +65 -0
- package/dist/views/OnboardingGate.d.ts +10 -0
- package/dist/views/OnboardingGate.js +54 -0
- package/dist/views/Phrases.css +45 -0
- package/dist/views/PhrasesView.d.ts +4 -0
- package/dist/views/PhrasesView.js +104 -0
- package/dist/views/ProgressView.d.ts +19 -0
- package/dist/views/ProgressView.js +36 -0
- package/dist/views/Prompt.css +84 -0
- package/dist/views/PromptPanel.d.ts +8 -0
- package/dist/views/PromptPanel.js +169 -0
- package/dist/views/Recipe.css +84 -0
- package/dist/views/RecipeLibrary.d.ts +7 -0
- package/dist/views/RecipeLibrary.js +104 -0
- package/dist/views/Retention.css +49 -0
- package/dist/views/RetentionView.d.ts +7 -0
- package/dist/views/RetentionView.js +145 -0
- package/dist/views/SettingsView.d.ts +9 -0
- package/dist/views/SettingsView.js +235 -0
- package/dist/views/Shorts.css +112 -0
- package/dist/views/ShortsView.d.ts +4 -0
- package/dist/views/ShortsView.js +205 -0
- package/dist/views/SourcesView.d.ts +6 -0
- package/dist/views/SourcesView.js +417 -0
- package/dist/views/TimelineView.d.ts +20 -0
- package/dist/views/TimelineView.js +12 -0
- package/package.json +70 -3
|
@@ -0,0 +1,1045 @@
|
|
|
1
|
+
export type CutPreset = "tight" | "natural" | "punchy" | "fast";
|
|
2
|
+
export type TranscriptWord = {
|
|
3
|
+
text: string;
|
|
4
|
+
start_ms: number;
|
|
5
|
+
end_ms: number;
|
|
6
|
+
};
|
|
7
|
+
export type Transcript = {
|
|
8
|
+
duration_ms: number;
|
|
9
|
+
words: TranscriptWord[];
|
|
10
|
+
model?: {
|
|
11
|
+
id?: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export type TranscribeResult = {
|
|
15
|
+
status: string;
|
|
16
|
+
job: string;
|
|
17
|
+
source: string;
|
|
18
|
+
duration_ms: number;
|
|
19
|
+
words: number;
|
|
20
|
+
vad_spans: number;
|
|
21
|
+
report?: {
|
|
22
|
+
backend?: string;
|
|
23
|
+
vad_backend?: string;
|
|
24
|
+
elapsed_ms?: number;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export type EditorialItem = {
|
|
28
|
+
id: string;
|
|
29
|
+
kind: string;
|
|
30
|
+
tier?: string;
|
|
31
|
+
confidence?: number;
|
|
32
|
+
start_ms: number;
|
|
33
|
+
end_ms: number;
|
|
34
|
+
reason: string;
|
|
35
|
+
text?: string;
|
|
36
|
+
};
|
|
37
|
+
export type TakeInfo = {
|
|
38
|
+
index: number;
|
|
39
|
+
start_ms: number;
|
|
40
|
+
end_ms: number;
|
|
41
|
+
text: string;
|
|
42
|
+
rank: number;
|
|
43
|
+
chosen: boolean;
|
|
44
|
+
explanation?: string[];
|
|
45
|
+
};
|
|
46
|
+
export type TakeGroup = {
|
|
47
|
+
id: string;
|
|
48
|
+
chosen: number;
|
|
49
|
+
takes: TakeInfo[];
|
|
50
|
+
};
|
|
51
|
+
export type SourcePlan = {
|
|
52
|
+
source: string;
|
|
53
|
+
mode: "speech" | "visual";
|
|
54
|
+
plan_id: string;
|
|
55
|
+
duration_ms?: number;
|
|
56
|
+
items: EditorialItem[];
|
|
57
|
+
take_groups: TakeGroup[];
|
|
58
|
+
beats: unknown[];
|
|
59
|
+
};
|
|
60
|
+
export type AnalysisResult = {
|
|
61
|
+
status: string;
|
|
62
|
+
preset: string;
|
|
63
|
+
/** Present on single-source runs (flat shape) — also mirrored in plans. */
|
|
64
|
+
plan_id?: string;
|
|
65
|
+
source?: string;
|
|
66
|
+
mode?: "speech" | "visual";
|
|
67
|
+
items?: EditorialItem[];
|
|
68
|
+
take_groups?: TakeGroup[];
|
|
69
|
+
beats?: unknown[];
|
|
70
|
+
plans?: SourcePlan[];
|
|
71
|
+
cross_file_retakes?: number;
|
|
72
|
+
};
|
|
73
|
+
export type ApplyResult = {
|
|
74
|
+
status: string;
|
|
75
|
+
revision?: {
|
|
76
|
+
cursor: number;
|
|
77
|
+
total: number;
|
|
78
|
+
};
|
|
79
|
+
kept_ranges?: number;
|
|
80
|
+
removed?: number;
|
|
81
|
+
output_frames?: number;
|
|
82
|
+
mode?: "speech" | "visual";
|
|
83
|
+
group?: string;
|
|
84
|
+
applied?: {
|
|
85
|
+
source: string;
|
|
86
|
+
mode: "speech" | "visual";
|
|
87
|
+
kept_ranges: number;
|
|
88
|
+
removed: number;
|
|
89
|
+
output_frames: number;
|
|
90
|
+
}[];
|
|
91
|
+
};
|
|
92
|
+
export type SourceRow = {
|
|
93
|
+
id: string;
|
|
94
|
+
name: string;
|
|
95
|
+
path?: string;
|
|
96
|
+
duration?: number;
|
|
97
|
+
verified?: boolean;
|
|
98
|
+
error?: string;
|
|
99
|
+
};
|
|
100
|
+
export type PhraseMatch = {
|
|
101
|
+
source: string;
|
|
102
|
+
name: string;
|
|
103
|
+
word_index: number;
|
|
104
|
+
start_ms: number;
|
|
105
|
+
end_ms: number;
|
|
106
|
+
context: {
|
|
107
|
+
start_ms: number;
|
|
108
|
+
end_ms: number;
|
|
109
|
+
text: string;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
export type ShortProposal = {
|
|
113
|
+
id: string;
|
|
114
|
+
rank: number;
|
|
115
|
+
start_ms: number;
|
|
116
|
+
end_ms: number;
|
|
117
|
+
duration_ms: number;
|
|
118
|
+
clip_start_ms?: number;
|
|
119
|
+
clip_end_ms?: number;
|
|
120
|
+
transcript: string;
|
|
121
|
+
title: string;
|
|
122
|
+
rationale: string;
|
|
123
|
+
/** Ranker output; `composite` is 0–1. */
|
|
124
|
+
scores?: {
|
|
125
|
+
composite?: number;
|
|
126
|
+
};
|
|
127
|
+
platform_fit?: {
|
|
128
|
+
platform: string;
|
|
129
|
+
duration_fit?: number;
|
|
130
|
+
fits: boolean;
|
|
131
|
+
}[];
|
|
132
|
+
};
|
|
133
|
+
/** How the proposals were ranked (`RankingInfo` in cutright-shorts). */
|
|
134
|
+
export type ShortsRanking = {
|
|
135
|
+
/** `"llm"` or `"heuristic"`. */
|
|
136
|
+
method: string;
|
|
137
|
+
provider?: string | null;
|
|
138
|
+
model?: string | null;
|
|
139
|
+
/** Why the heuristic scorer ran instead of the LLM; null when the LLM ranked. */
|
|
140
|
+
fallback_reason?: string | null;
|
|
141
|
+
llm_moments_returned?: number;
|
|
142
|
+
llm_moments_accepted?: number;
|
|
143
|
+
prompt_budget?: {
|
|
144
|
+
action: string;
|
|
145
|
+
budget_tokens: number;
|
|
146
|
+
requests: number;
|
|
147
|
+
sentences_offered: number;
|
|
148
|
+
sentences_sent: number;
|
|
149
|
+
requests_cut_by_budget: number;
|
|
150
|
+
note: string;
|
|
151
|
+
} | null;
|
|
152
|
+
};
|
|
153
|
+
export type ShortsResult = {
|
|
154
|
+
status: string;
|
|
155
|
+
proposals: ShortProposal[];
|
|
156
|
+
ranking?: ShortsRanking;
|
|
157
|
+
rejected?: number;
|
|
158
|
+
windows_considered?: number;
|
|
159
|
+
};
|
|
160
|
+
export type RenderFile = {
|
|
161
|
+
name: string;
|
|
162
|
+
path: string;
|
|
163
|
+
bytes: number;
|
|
164
|
+
/** Render-lane receipt (`cutright.render.v1`) attached to mp4 entries. */
|
|
165
|
+
record?: {
|
|
166
|
+
schema?: string;
|
|
167
|
+
name?: string;
|
|
168
|
+
preset?: string;
|
|
169
|
+
encoder?: string;
|
|
170
|
+
created_at?: string;
|
|
171
|
+
output_blake3?: string;
|
|
172
|
+
duration_ms?: number;
|
|
173
|
+
loudness?: {
|
|
174
|
+
after?: {
|
|
175
|
+
input_i?: number;
|
|
176
|
+
input_tp?: number;
|
|
177
|
+
};
|
|
178
|
+
measured?: {
|
|
179
|
+
input_i?: number;
|
|
180
|
+
};
|
|
181
|
+
within_tolerance?: boolean;
|
|
182
|
+
skipped_silent?: boolean;
|
|
183
|
+
};
|
|
184
|
+
origin?: {
|
|
185
|
+
kind?: string;
|
|
186
|
+
variant?: string;
|
|
187
|
+
timeline_cursor?: number;
|
|
188
|
+
timeline_head_hash?: string;
|
|
189
|
+
};
|
|
190
|
+
time_map?: {
|
|
191
|
+
kind?: string;
|
|
192
|
+
clip_id?: string;
|
|
193
|
+
source?: string;
|
|
194
|
+
source_in_ms: number;
|
|
195
|
+
source_out_ms: number;
|
|
196
|
+
out_in_ms: number;
|
|
197
|
+
out_end_ms: number;
|
|
198
|
+
}[];
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
export type QaResult = {
|
|
202
|
+
status: string;
|
|
203
|
+
render: string;
|
|
204
|
+
report?: {
|
|
205
|
+
checks?: {
|
|
206
|
+
id?: string;
|
|
207
|
+
status?: string;
|
|
208
|
+
detail?: string;
|
|
209
|
+
}[];
|
|
210
|
+
};
|
|
211
|
+
receipt?: unknown;
|
|
212
|
+
};
|
|
213
|
+
export type ProjectCard = {
|
|
214
|
+
dir: string;
|
|
215
|
+
id?: string;
|
|
216
|
+
name?: string;
|
|
217
|
+
created?: string;
|
|
218
|
+
/** Epoch seconds; project.json mtime. */
|
|
219
|
+
edited?: number | null;
|
|
220
|
+
sources?: number;
|
|
221
|
+
missing_sources?: number;
|
|
222
|
+
duration_ms?: number;
|
|
223
|
+
aspect?: string;
|
|
224
|
+
status?: "finished" | "needs_review" | "media_only" | "missing_media";
|
|
225
|
+
/** `media.thumbnail` target for the card image (latest render, else first video source). */
|
|
226
|
+
thumb?: {
|
|
227
|
+
render?: string;
|
|
228
|
+
source?: string;
|
|
229
|
+
} | null;
|
|
230
|
+
error?: string;
|
|
231
|
+
};
|
|
232
|
+
export declare const projectsList: (roots: string[]) => Promise<{
|
|
233
|
+
projects: ProjectCard[];
|
|
234
|
+
}>;
|
|
235
|
+
export declare const sourceList: (dir: string) => Promise<{
|
|
236
|
+
sources: SourceRow[];
|
|
237
|
+
}>;
|
|
238
|
+
export declare const sourceVerify: (dir: string, tag?: string) => Promise<{
|
|
239
|
+
ok: boolean;
|
|
240
|
+
checks: {
|
|
241
|
+
source_id: string;
|
|
242
|
+
status: string;
|
|
243
|
+
found_at?: string | null;
|
|
244
|
+
}[];
|
|
245
|
+
}>;
|
|
246
|
+
export declare const sourceRelink: (dir: string, source: string, path: string) => Promise<{
|
|
247
|
+
status: string;
|
|
248
|
+
}>;
|
|
249
|
+
export declare const transcribe: (dir: string, source: string, job?: string, install?: boolean, tag?: string) => Promise<TranscribeResult>;
|
|
250
|
+
export declare const transcribeCancel: (job: string) => Promise<{
|
|
251
|
+
cancelled: boolean;
|
|
252
|
+
}>;
|
|
253
|
+
export declare const transcriptShow: (dir: string, source: string) => Promise<{
|
|
254
|
+
transcript: Transcript;
|
|
255
|
+
}>;
|
|
256
|
+
export declare const phraseSearch: (dir: string, query: string) => Promise<{
|
|
257
|
+
query: string;
|
|
258
|
+
matches: PhraseMatch[];
|
|
259
|
+
}>;
|
|
260
|
+
export declare const autoeditAnalyze: (dir: string, preset: CutPreset, opts?: {
|
|
261
|
+
source?: string;
|
|
262
|
+
sources?: string[];
|
|
263
|
+
}, tag?: string) => Promise<AnalysisResult>;
|
|
264
|
+
export declare const autoeditApply: (dir: string, preset: CutPreset, opts?: {
|
|
265
|
+
source?: string;
|
|
266
|
+
sources?: string[];
|
|
267
|
+
review?: {
|
|
268
|
+
reject?: string[];
|
|
269
|
+
accept?: string[];
|
|
270
|
+
takes?: Record<string, number>;
|
|
271
|
+
};
|
|
272
|
+
}, tag?: string) => Promise<ApplyResult>;
|
|
273
|
+
export declare const captionsExport: (dir: string, source: string, format: "srt" | "vtt") => Promise<{
|
|
274
|
+
status: string;
|
|
275
|
+
path?: string;
|
|
276
|
+
cues?: number;
|
|
277
|
+
}>;
|
|
278
|
+
export declare const shortsPropose: (dir: string, source: string, count?: number) => Promise<ShortsResult>;
|
|
279
|
+
export declare const shortsAccept: (dir: string, source: string, proposal: string, opts?: {
|
|
280
|
+
start_ms?: number;
|
|
281
|
+
end_ms?: number;
|
|
282
|
+
}, tag?: string) => Promise<{
|
|
283
|
+
status: string;
|
|
284
|
+
variant: string;
|
|
285
|
+
output_frames: number;
|
|
286
|
+
}>;
|
|
287
|
+
/** `clip.export` — render one source range through the full finish path (R7). */
|
|
288
|
+
export declare const clipExport: (dir: string, params: {
|
|
289
|
+
source: string;
|
|
290
|
+
start_ms: number;
|
|
291
|
+
end_ms: number;
|
|
292
|
+
preset?: string;
|
|
293
|
+
name?: string;
|
|
294
|
+
}, tag?: string) => Promise<{
|
|
295
|
+
status: string;
|
|
296
|
+
output: string;
|
|
297
|
+
name: string;
|
|
298
|
+
bytes: number;
|
|
299
|
+
job: string;
|
|
300
|
+
}>;
|
|
301
|
+
export declare const rendersList: (dir: string) => Promise<{
|
|
302
|
+
renders: RenderFile[];
|
|
303
|
+
}>;
|
|
304
|
+
export declare const qaRun: (dir: string, render?: string, preset?: string, tag?: string) => Promise<QaResult>;
|
|
305
|
+
export declare const exportFcpxml: (dir: string, name?: string) => Promise<{
|
|
306
|
+
fcpxml: string;
|
|
307
|
+
unsupported: string[];
|
|
308
|
+
}>;
|
|
309
|
+
export declare const exportOtio: (dir: string, name?: string) => Promise<{
|
|
310
|
+
otio: string | null;
|
|
311
|
+
unsupported: string[];
|
|
312
|
+
}>;
|
|
313
|
+
export declare const variantsList: (dir: string) => Promise<{
|
|
314
|
+
variants: {
|
|
315
|
+
name: string;
|
|
316
|
+
path?: string;
|
|
317
|
+
error?: string;
|
|
318
|
+
}[];
|
|
319
|
+
}>;
|
|
320
|
+
export declare const variantsCreate: (dir: string, source: string) => Promise<{
|
|
321
|
+
status: string;
|
|
322
|
+
variants: {
|
|
323
|
+
name: string;
|
|
324
|
+
dir?: string;
|
|
325
|
+
error?: string;
|
|
326
|
+
}[];
|
|
327
|
+
}>;
|
|
328
|
+
export declare const variantsPromote: (dir: string, variant: string) => Promise<{
|
|
329
|
+
status: string;
|
|
330
|
+
}>;
|
|
331
|
+
export type DropOff = {
|
|
332
|
+
id: string;
|
|
333
|
+
out_start_ms: number;
|
|
334
|
+
out_end_ms: number;
|
|
335
|
+
drop_points: number;
|
|
336
|
+
suggested: string;
|
|
337
|
+
source_mappings: {
|
|
338
|
+
source: string;
|
|
339
|
+
source_in_ms: number;
|
|
340
|
+
source_out_ms: number;
|
|
341
|
+
out_start_ms: number;
|
|
342
|
+
out_end_ms: number;
|
|
343
|
+
}[];
|
|
344
|
+
};
|
|
345
|
+
export declare const retentionImport: (dir: string, csv: string, render: string, name?: string) => Promise<{
|
|
346
|
+
status: string;
|
|
347
|
+
name: string;
|
|
348
|
+
points: number;
|
|
349
|
+
drop_offs: number;
|
|
350
|
+
render_hash?: string;
|
|
351
|
+
revision?: number;
|
|
352
|
+
}>;
|
|
353
|
+
export declare const retentionList: (dir: string) => Promise<{
|
|
354
|
+
retention: {
|
|
355
|
+
name: string;
|
|
356
|
+
render?: string;
|
|
357
|
+
points: number;
|
|
358
|
+
drop_offs?: number;
|
|
359
|
+
revision?: number;
|
|
360
|
+
}[];
|
|
361
|
+
}>;
|
|
362
|
+
export declare const retentionProposals: (dir: string, name: string) => Promise<{
|
|
363
|
+
name: string;
|
|
364
|
+
render?: string;
|
|
365
|
+
drop_offs: DropOff[];
|
|
366
|
+
}>;
|
|
367
|
+
export declare const retentionApply: (dir: string, name: string, drops?: string[], tag?: string) => Promise<{
|
|
368
|
+
status: string;
|
|
369
|
+
cuts: number;
|
|
370
|
+
revision?: {
|
|
371
|
+
cursor: number;
|
|
372
|
+
total: number;
|
|
373
|
+
};
|
|
374
|
+
render_request?: string;
|
|
375
|
+
}>;
|
|
376
|
+
export type FramingApproval = "review" | "auto";
|
|
377
|
+
export declare const framingApproval: (settings: {
|
|
378
|
+
app: Record<string, unknown>;
|
|
379
|
+
project: Record<string, unknown>;
|
|
380
|
+
}) => FramingApproval;
|
|
381
|
+
export declare const framingLabel: (plan: ReframeSummary | undefined, auto: boolean) => string;
|
|
382
|
+
export declare const settingsGet: (dir?: string) => Promise<{
|
|
383
|
+
app: Record<string, unknown>;
|
|
384
|
+
project: Record<string, unknown>;
|
|
385
|
+
revision: string;
|
|
386
|
+
}>;
|
|
387
|
+
/** Fired on `window` after a finishing setting is saved. `detail.dir` is the project it was saved
|
|
388
|
+
* to, or absent for an app-wide save, so a listener for one project can tell them apart. */
|
|
389
|
+
export declare const SETTINGS_CHANGED = "cutright:settings-changed";
|
|
390
|
+
/** `expectedRevision` (the `revision` `settings.get` reported) makes the write a compare-and-set:
|
|
391
|
+
* a file that changed since is refused with code `revision_conflict` and nothing is written. */
|
|
392
|
+
export declare const settingsSet: (settings: Record<string, unknown>, dir?: string, expectedRevision?: string) => Promise<{
|
|
393
|
+
status: string;
|
|
394
|
+
settings: Record<string, unknown>;
|
|
395
|
+
revision: string;
|
|
396
|
+
}>;
|
|
397
|
+
export type ColourPt = {
|
|
398
|
+
x: number;
|
|
399
|
+
y: number;
|
|
400
|
+
};
|
|
401
|
+
export type ColourRgb = [number, number, number];
|
|
402
|
+
export type ColourWheel = "lift" | "gamma" | "gain";
|
|
403
|
+
export type ColourCurveChannel = "master" | "r" | "g" | "b";
|
|
404
|
+
export type ColourRange = "reds" | "yellows" | "greens" | "cyans" | "blues" | "magentas";
|
|
405
|
+
export type ColourHsl = {
|
|
406
|
+
range: ColourRange;
|
|
407
|
+
hue_shift: number;
|
|
408
|
+
saturation: number;
|
|
409
|
+
lightness: number;
|
|
410
|
+
strength: number;
|
|
411
|
+
};
|
|
412
|
+
/** Partial grade: an absent field is neutral. Ranges are enforced by the engine. */
|
|
413
|
+
export type ColourGrade = {
|
|
414
|
+
curves?: Partial<Record<ColourCurveChannel, ColourPt[]>>;
|
|
415
|
+
wheels?: Record<ColourWheel, ColourRgb>;
|
|
416
|
+
hsl?: ColourHsl[];
|
|
417
|
+
saturation?: number;
|
|
418
|
+
};
|
|
419
|
+
export type ColourGetResult = {
|
|
420
|
+
grade: ColourGrade | null;
|
|
421
|
+
by_source: Record<string, ColourGrade>;
|
|
422
|
+
/** Absent on older engines; `hdr_to_sdr: false` means HDR footage cannot be finished here. */
|
|
423
|
+
capabilities?: {
|
|
424
|
+
hdr_to_sdr?: boolean;
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
export type ColourSetResult = {
|
|
428
|
+
status: "saved";
|
|
429
|
+
scope: "project" | "source";
|
|
430
|
+
source?: string;
|
|
431
|
+
grade: ColourGrade | null;
|
|
432
|
+
};
|
|
433
|
+
export type ColourScopes = {
|
|
434
|
+
status: "ok";
|
|
435
|
+
at_ms: number;
|
|
436
|
+
graded: boolean;
|
|
437
|
+
/** Local file paths; show through `assetUrl`. */
|
|
438
|
+
waveform: string;
|
|
439
|
+
vectorscope: string;
|
|
440
|
+
stats: {
|
|
441
|
+
y_min: number;
|
|
442
|
+
y_max: number;
|
|
443
|
+
y_avg: number;
|
|
444
|
+
sat_avg: number;
|
|
445
|
+
sat_max: number;
|
|
446
|
+
};
|
|
447
|
+
clipped: {
|
|
448
|
+
low: boolean;
|
|
449
|
+
high: boolean;
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
/** Project grade plus per-source grades for the project at `dir`. */
|
|
453
|
+
export declare const colourGet: (args: {
|
|
454
|
+
dir: string;
|
|
455
|
+
}) => Promise<ColourGetResult>;
|
|
456
|
+
/** Omit `source` to write the project grade; `grade: null` clears a grade. */
|
|
457
|
+
export declare const colourSet: (args: {
|
|
458
|
+
dir: string;
|
|
459
|
+
source?: string;
|
|
460
|
+
grade: ColourGrade | null;
|
|
461
|
+
}) => Promise<ColourSetResult>;
|
|
462
|
+
export declare const colourScopes: (args: {
|
|
463
|
+
dir: string;
|
|
464
|
+
source: string;
|
|
465
|
+
at_ms?: number;
|
|
466
|
+
graded?: boolean;
|
|
467
|
+
width?: number;
|
|
468
|
+
}) => Promise<ColourScopes>;
|
|
469
|
+
export declare const storageStatus: (dir?: string) => Promise<{
|
|
470
|
+
cache_dirs: {
|
|
471
|
+
path: string;
|
|
472
|
+
bytes: number;
|
|
473
|
+
}[];
|
|
474
|
+
cache_bytes: number;
|
|
475
|
+
/** Where dropped-footage projects go when Settings › Storage › Project folder is unset. */
|
|
476
|
+
default_project_root?: string;
|
|
477
|
+
}>;
|
|
478
|
+
export declare const storageClear: (dir?: string) => Promise<{
|
|
479
|
+
status: string;
|
|
480
|
+
freed_bytes: number;
|
|
481
|
+
}>;
|
|
482
|
+
export type ModelKind = "speech" | "face";
|
|
483
|
+
export type ModelRow = {
|
|
484
|
+
id?: string;
|
|
485
|
+
label?: string;
|
|
486
|
+
version?: number;
|
|
487
|
+
ready?: boolean;
|
|
488
|
+
state?: "ready" | "missing" | "partial" | "installing";
|
|
489
|
+
files_ok?: number;
|
|
490
|
+
files_total?: number;
|
|
491
|
+
needed?: string[];
|
|
492
|
+
bytes_on_disk?: number;
|
|
493
|
+
size_hint_bytes?: number;
|
|
494
|
+
can_download?: boolean;
|
|
495
|
+
in_progress?: boolean;
|
|
496
|
+
dir?: string;
|
|
497
|
+
error?: string;
|
|
498
|
+
};
|
|
499
|
+
export declare const modelsStatus: () => Promise<{
|
|
500
|
+
speech: ModelRow;
|
|
501
|
+
face: ModelRow;
|
|
502
|
+
models_root?: string;
|
|
503
|
+
signed_packs_only?: boolean;
|
|
504
|
+
}>;
|
|
505
|
+
export type ModelProgress = {
|
|
506
|
+
event: "model.progress";
|
|
507
|
+
model: ModelKind;
|
|
508
|
+
phase: "verify" | "download" | "install" | "done";
|
|
509
|
+
file?: string;
|
|
510
|
+
received?: number;
|
|
511
|
+
total?: number;
|
|
512
|
+
};
|
|
513
|
+
/** `models.install` — install or repair one signed-pack model (progress: `model.progress` events on `tag`). */
|
|
514
|
+
export declare const modelsInstall: (model: ModelKind, tag?: string) => Promise<ModelRow>;
|
|
515
|
+
export interface ReframeSummary {
|
|
516
|
+
status?: string;
|
|
517
|
+
source?: string;
|
|
518
|
+
plan_path: string;
|
|
519
|
+
plan_hash: string;
|
|
520
|
+
mode: string;
|
|
521
|
+
target_aspect?: string;
|
|
522
|
+
output: [number, number];
|
|
523
|
+
crop: [number, number];
|
|
524
|
+
duration_ms: number;
|
|
525
|
+
keyframes: number;
|
|
526
|
+
anchors: number;
|
|
527
|
+
anchors_approved: number;
|
|
528
|
+
approved: boolean;
|
|
529
|
+
approval?: {
|
|
530
|
+
approver: string;
|
|
531
|
+
approved_at: string;
|
|
532
|
+
plan_hash: string;
|
|
533
|
+
} | null;
|
|
534
|
+
detector?: {
|
|
535
|
+
model?: string;
|
|
536
|
+
} & Record<string, unknown>;
|
|
537
|
+
stats?: Record<string, unknown>;
|
|
538
|
+
plan?: {
|
|
539
|
+
anchors?: {
|
|
540
|
+
start_ms?: number;
|
|
541
|
+
end_ms?: number;
|
|
542
|
+
approved?: boolean;
|
|
543
|
+
gap?: boolean;
|
|
544
|
+
}[];
|
|
545
|
+
} & Record<string, unknown>;
|
|
546
|
+
}
|
|
547
|
+
/** R2: plans are per (source × aspect); `aspect` is "9:16" or "1:1". */
|
|
548
|
+
export declare const reframeAnalyze: (dir: string, source: string, aspect?: string, tag?: string) => Promise<ReframeSummary>;
|
|
549
|
+
export declare const reframeShow: (dir: string, source: string, aspect?: string) => Promise<ReframeSummary>;
|
|
550
|
+
export declare const reframeApprove: (dir: string, source: string, opts: {
|
|
551
|
+
anchor?: number;
|
|
552
|
+
all?: boolean;
|
|
553
|
+
approve?: boolean;
|
|
554
|
+
approver?: string;
|
|
555
|
+
aspect?: string;
|
|
556
|
+
}) => Promise<ReframeSummary>;
|
|
557
|
+
export declare const reframeRender: (dir: string, source: string, aspect?: string, tag?: string) => Promise<{
|
|
558
|
+
status: string;
|
|
559
|
+
output: string;
|
|
560
|
+
receipt: unknown;
|
|
561
|
+
}>;
|
|
562
|
+
/** Caption looks the engine renders, with the labels the screens show. */
|
|
563
|
+
export declare const CAPTION_STYLES: readonly [readonly ["classic-box", "Classic box"], readonly ["clean-outline", "Clean outline"], readonly ["shorts-pop", "Shorts pop"], readonly ["karaoke-pop", "Karaoke pop"], readonly ["karaoke-fill", "Karaoke fill"], readonly ["card-classic", "Card classic"], readonly ["card-emphasis", "Card emphasis"], readonly ["minimal-lower", "Minimal lower"]];
|
|
564
|
+
/** The caption look used when none is chosen; matches the engine default (`captions_cmd.rs`). */
|
|
565
|
+
export declare const DEFAULT_CAPTION_STYLE = "classic-box";
|
|
566
|
+
/** R3: PNG swatch of a caption style on a source frame (`captions.preview`). */
|
|
567
|
+
export type CaptionPreview = {
|
|
568
|
+
status: string;
|
|
569
|
+
path: string;
|
|
570
|
+
style: string;
|
|
571
|
+
preset: string;
|
|
572
|
+
width: number;
|
|
573
|
+
height: number;
|
|
574
|
+
mtime_ms?: number;
|
|
575
|
+
};
|
|
576
|
+
export declare const captionsPreview: (dir: string, opts?: {
|
|
577
|
+
style?: string;
|
|
578
|
+
preset?: string;
|
|
579
|
+
source?: string;
|
|
580
|
+
}) => Promise<CaptionPreview>;
|
|
581
|
+
export type PlaybackMeta = {
|
|
582
|
+
kind: "timeline" | "file";
|
|
583
|
+
playing: boolean;
|
|
584
|
+
position_ms: number;
|
|
585
|
+
frame: number;
|
|
586
|
+
total_frames: number;
|
|
587
|
+
duration_ms: number;
|
|
588
|
+
fps: {
|
|
589
|
+
num: number;
|
|
590
|
+
den: number;
|
|
591
|
+
};
|
|
592
|
+
width: number;
|
|
593
|
+
height: number;
|
|
594
|
+
audio: string;
|
|
595
|
+
speed: number;
|
|
596
|
+
loop?: {
|
|
597
|
+
start_ms: number;
|
|
598
|
+
end_ms: number;
|
|
599
|
+
} | null;
|
|
600
|
+
revision: number;
|
|
601
|
+
};
|
|
602
|
+
export declare const playbackOpen: (params: {
|
|
603
|
+
dir?: string;
|
|
604
|
+
file?: string;
|
|
605
|
+
width?: number;
|
|
606
|
+
height?: number;
|
|
607
|
+
}) => Promise<PlaybackMeta>;
|
|
608
|
+
/** Rebuilds the open timeline preview with freshly fetched colour chains and restores the
|
|
609
|
+
* playhead. A grade change does not change the revision, so the revision-keyed reopen misses it.
|
|
610
|
+
* Resolves null when no timeline preview is open. */
|
|
611
|
+
/** Fired on `window` after the preview session was rebuilt; a paused player repaints on it. */
|
|
612
|
+
export declare const PLAYBACK_REFRESHED = "cutright:playback-refreshed";
|
|
613
|
+
export declare const playbackRefreshFinishing: (dir: string) => Promise<PlaybackMeta | null>;
|
|
614
|
+
export declare const playbackClose: () => Promise<void>;
|
|
615
|
+
export declare const playbackStatus: () => Promise<PlaybackMeta>;
|
|
616
|
+
export declare const playbackControl: (cmd: string, value?: number, value2?: number) => Promise<PlaybackMeta>;
|
|
617
|
+
/** Binary frame reply: `[u32 w][u32 h][u32 frame][u32 total][f64 pts]` + RGBA8. */
|
|
618
|
+
export declare const playbackFrame: () => Promise<ArrayBuffer | Uint8Array<ArrayBufferLike>>;
|
|
619
|
+
/** Runtime asset-protocol scope grant (project dirs, referenced media). */
|
|
620
|
+
export declare const mediaScopeAllow: (paths: string[], recursive?: boolean) => Promise<void>;
|
|
621
|
+
/** One cached JPEG frame (`media.thumbnail`); `path` is local — show via `assetUrl`. */
|
|
622
|
+
export type ThumbFrame = {
|
|
623
|
+
at_ms: number;
|
|
624
|
+
path: string;
|
|
625
|
+
};
|
|
626
|
+
/** Frames of a source (id or file name) or a render (file name in renders/).
|
|
627
|
+
* Omit times for one representative frame (20% in). */
|
|
628
|
+
export declare const thumbnails: (dir: string, target: {
|
|
629
|
+
source: string;
|
|
630
|
+
} | {
|
|
631
|
+
render: string;
|
|
632
|
+
}, opts?: {
|
|
633
|
+
times_ms?: number[];
|
|
634
|
+
at_ms?: number;
|
|
635
|
+
width?: number;
|
|
636
|
+
}) => Promise<{
|
|
637
|
+
status: "ok";
|
|
638
|
+
width: number;
|
|
639
|
+
frames: ThumbFrame[];
|
|
640
|
+
}>;
|
|
641
|
+
/** One stored retention point (`{out_ms, retention}` percent). */
|
|
642
|
+
export type RetentionPoint = {
|
|
643
|
+
out_ms: number;
|
|
644
|
+
retention: number;
|
|
645
|
+
};
|
|
646
|
+
export type RetentionShow = {
|
|
647
|
+
name: string;
|
|
648
|
+
render: string;
|
|
649
|
+
revision?: number;
|
|
650
|
+
drop_min?: number;
|
|
651
|
+
points: RetentionPoint[];
|
|
652
|
+
drop_offs: DropOff[];
|
|
653
|
+
render_exists: boolean;
|
|
654
|
+
stale: boolean;
|
|
655
|
+
};
|
|
656
|
+
export declare const retentionShow: (dir: string, name: string) => Promise<RetentionShow>;
|
|
657
|
+
export declare const rendersDelete: (dir: string, name: string) => Promise<{
|
|
658
|
+
status: string;
|
|
659
|
+
removed: string[];
|
|
660
|
+
}>;
|
|
661
|
+
export type QaReportRow = {
|
|
662
|
+
render_hash: string;
|
|
663
|
+
status: string;
|
|
664
|
+
issues: number;
|
|
665
|
+
checks?: {
|
|
666
|
+
id?: string;
|
|
667
|
+
status?: string;
|
|
668
|
+
detail?: string;
|
|
669
|
+
}[];
|
|
670
|
+
};
|
|
671
|
+
export declare const qaList: (dir: string) => Promise<{
|
|
672
|
+
reports: QaReportRow[];
|
|
673
|
+
}>;
|
|
674
|
+
export type PackagePlatform = "youtube" | "shorts" | "reels" | "tiktok";
|
|
675
|
+
/** `package.build` reply. `manifest` is `package-manifest.json` inside the package folder. */
|
|
676
|
+
export type PackageBuildResult = {
|
|
677
|
+
status: "packaged";
|
|
678
|
+
platform: PackagePlatform;
|
|
679
|
+
manifest: string;
|
|
680
|
+
files: {
|
|
681
|
+
path: string;
|
|
682
|
+
role: string;
|
|
683
|
+
blake3: string;
|
|
684
|
+
size_bytes: number;
|
|
685
|
+
}[];
|
|
686
|
+
render: string;
|
|
687
|
+
};
|
|
688
|
+
/** `render` is a bare file name in renders/. A QA refusal arrives as an error starting `qa_failed:`. */
|
|
689
|
+
export declare const packageBuild: (dir: string, params: {
|
|
690
|
+
platform: PackagePlatform;
|
|
691
|
+
title: string;
|
|
692
|
+
render?: string;
|
|
693
|
+
description?: string;
|
|
694
|
+
tags?: string[];
|
|
695
|
+
}) => Promise<PackageBuildResult>;
|
|
696
|
+
export type SourceProbe = {
|
|
697
|
+
status: string;
|
|
698
|
+
source: string;
|
|
699
|
+
duration_ms: number;
|
|
700
|
+
width: number;
|
|
701
|
+
height: number;
|
|
702
|
+
fps?: {
|
|
703
|
+
num: number;
|
|
704
|
+
den: number;
|
|
705
|
+
} | null;
|
|
706
|
+
video_codec?: string;
|
|
707
|
+
video_profile?: string | null;
|
|
708
|
+
color_space?: string | null;
|
|
709
|
+
hdr?: string | null;
|
|
710
|
+
has_audio: boolean;
|
|
711
|
+
audio_codec?: string | null;
|
|
712
|
+
audio_channels?: number | null;
|
|
713
|
+
audio_sample_rate?: number | null;
|
|
714
|
+
container?: string;
|
|
715
|
+
rotation?: number;
|
|
716
|
+
};
|
|
717
|
+
export declare const sourceProbe: (dir: string, source: string) => Promise<SourceProbe>;
|
|
718
|
+
export type RecipeStageEvent = {
|
|
719
|
+
event: "recipe.stage";
|
|
720
|
+
stage: string;
|
|
721
|
+
state: "running" | "done" | "failed" | "skipped";
|
|
722
|
+
fraction?: number;
|
|
723
|
+
error?: string;
|
|
724
|
+
};
|
|
725
|
+
export type RecipeRunResult = {
|
|
726
|
+
status: string;
|
|
727
|
+
job: string;
|
|
728
|
+
renders: {
|
|
729
|
+
format: string;
|
|
730
|
+
preset: string;
|
|
731
|
+
status: string;
|
|
732
|
+
output?: string;
|
|
733
|
+
}[];
|
|
734
|
+
};
|
|
735
|
+
export declare const recipeRun: (dir: string, opts: {
|
|
736
|
+
style?: string;
|
|
737
|
+
formats?: string[];
|
|
738
|
+
sources?: string[];
|
|
739
|
+
captions?: boolean;
|
|
740
|
+
music?: string;
|
|
741
|
+
music_level?: number;
|
|
742
|
+
job?: string;
|
|
743
|
+
}, tag?: string) => Promise<RecipeRunResult>;
|
|
744
|
+
export declare const recipeCancel: (job: string) => Promise<{
|
|
745
|
+
job: string;
|
|
746
|
+
cancelled: boolean;
|
|
747
|
+
}>;
|
|
748
|
+
export type RecipeStatus = {
|
|
749
|
+
ran: boolean;
|
|
750
|
+
signature: Record<string, unknown>;
|
|
751
|
+
done: Record<string, unknown>;
|
|
752
|
+
finished_at?: string;
|
|
753
|
+
};
|
|
754
|
+
export declare const recipeStatus: (dir: string) => Promise<RecipeStatus>;
|
|
755
|
+
/** A caption cue mapped onto the current timeline (`captions.show`). */
|
|
756
|
+
export type CaptionCue = {
|
|
757
|
+
start_ms: number;
|
|
758
|
+
end_ms: number;
|
|
759
|
+
lines: string[];
|
|
760
|
+
text: string;
|
|
761
|
+
};
|
|
762
|
+
export declare const captionsShow: (dir: string, preset?: string) => Promise<{
|
|
763
|
+
status: string;
|
|
764
|
+
preset: string;
|
|
765
|
+
cues: CaptionCue[];
|
|
766
|
+
}>;
|
|
767
|
+
export declare const captionCues: typeof captionsShow;
|
|
768
|
+
/** One editorial plan item/take mapped through the live timeline. */
|
|
769
|
+
export type PlanItem = {
|
|
770
|
+
id: string;
|
|
771
|
+
kind: string;
|
|
772
|
+
tier?: string;
|
|
773
|
+
confidence?: number;
|
|
774
|
+
start_ms: number;
|
|
775
|
+
end_ms: number;
|
|
776
|
+
reason: string;
|
|
777
|
+
text?: string;
|
|
778
|
+
action?: {
|
|
779
|
+
op?: string;
|
|
780
|
+
first?: number;
|
|
781
|
+
end?: number;
|
|
782
|
+
start_ms?: number;
|
|
783
|
+
end_ms?: number;
|
|
784
|
+
};
|
|
785
|
+
take?: {
|
|
786
|
+
group?: string;
|
|
787
|
+
index?: number;
|
|
788
|
+
};
|
|
789
|
+
covered_by?: string | null;
|
|
790
|
+
/** Output ranges this source window still occupies ([] = already cut). */
|
|
791
|
+
out?: {
|
|
792
|
+
start_ms: number;
|
|
793
|
+
end_ms: number;
|
|
794
|
+
}[];
|
|
795
|
+
/** Output position to seek to for this item. */
|
|
796
|
+
at_ms?: number;
|
|
797
|
+
/** Plan this item belongs to (editor lane). */
|
|
798
|
+
plan_id?: string;
|
|
799
|
+
/** Currently chosen take index when alternates exist. */
|
|
800
|
+
candidate_take?: number;
|
|
801
|
+
/** Alternate takes for retake-style items. */
|
|
802
|
+
alternates?: PlanTake[];
|
|
803
|
+
};
|
|
804
|
+
export type PlanTake = {
|
|
805
|
+
index: number;
|
|
806
|
+
item_id?: string;
|
|
807
|
+
start_ms: number;
|
|
808
|
+
end_ms: number;
|
|
809
|
+
text: string;
|
|
810
|
+
rank?: number;
|
|
811
|
+
chosen?: boolean;
|
|
812
|
+
out?: {
|
|
813
|
+
start_ms: number;
|
|
814
|
+
end_ms: number;
|
|
815
|
+
}[];
|
|
816
|
+
at_ms?: number;
|
|
817
|
+
};
|
|
818
|
+
export type StoredPlan = {
|
|
819
|
+
id?: string;
|
|
820
|
+
source?: string;
|
|
821
|
+
source_blake3?: string;
|
|
822
|
+
source_duration_ms?: number;
|
|
823
|
+
items?: PlanItem[];
|
|
824
|
+
take_groups?: {
|
|
825
|
+
id: string;
|
|
826
|
+
chosen: number;
|
|
827
|
+
takes: PlanTake[];
|
|
828
|
+
}[];
|
|
829
|
+
};
|
|
830
|
+
export declare const editplanList: (dir: string) => Promise<{
|
|
831
|
+
status: string;
|
|
832
|
+
plans: StoredPlan[];
|
|
833
|
+
}>;
|
|
834
|
+
export declare const editPlanList: typeof editplanList;
|
|
835
|
+
export type EditPlan = StoredPlan;
|
|
836
|
+
export type EditPlanItem = PlanItem;
|
|
837
|
+
/** Engine id rule for library recipes: lowercase letters, digits and '-', 1..64 chars. */
|
|
838
|
+
export declare const RECIPE_ID_RULE: RegExp;
|
|
839
|
+
export type RecipeSummary = {
|
|
840
|
+
id: string;
|
|
841
|
+
name: string;
|
|
842
|
+
version: number;
|
|
843
|
+
updated_at: string;
|
|
844
|
+
body_blake3: string;
|
|
845
|
+
};
|
|
846
|
+
export type RecipeListResult = {
|
|
847
|
+
recipes: RecipeSummary[];
|
|
848
|
+
invalid?: unknown[];
|
|
849
|
+
};
|
|
850
|
+
export type RecipeDocument = RecipeSummary & {
|
|
851
|
+
schema: string;
|
|
852
|
+
body: Record<string, unknown>;
|
|
853
|
+
};
|
|
854
|
+
/** The library recipe this project last applied. */
|
|
855
|
+
export type RecipeRef = {
|
|
856
|
+
id: string;
|
|
857
|
+
version: number;
|
|
858
|
+
body_blake3: string;
|
|
859
|
+
applied_at: string;
|
|
860
|
+
};
|
|
861
|
+
export type RecipeStatusResult = {
|
|
862
|
+
ref: RecipeRef | null;
|
|
863
|
+
/** The project's recipe settings were edited after the apply. */
|
|
864
|
+
overridden: boolean;
|
|
865
|
+
update_available: boolean;
|
|
866
|
+
library_version: number | null;
|
|
867
|
+
};
|
|
868
|
+
export declare const recipesList: () => Promise<RecipeListResult>;
|
|
869
|
+
export declare const recipesGet: (id: string) => Promise<RecipeDocument>;
|
|
870
|
+
export declare const recipesSave: (args: {
|
|
871
|
+
id: string;
|
|
872
|
+
name: string;
|
|
873
|
+
body: Record<string, unknown>;
|
|
874
|
+
expect_version?: number;
|
|
875
|
+
}) => Promise<RecipeDocument>;
|
|
876
|
+
export declare const recipesDelete: (id: string) => Promise<unknown>;
|
|
877
|
+
/** Saves this project's recipe settings to the library under `id`; a new version when `id` exists. */
|
|
878
|
+
export declare const recipesSaveFromProject: (args: {
|
|
879
|
+
dir: string;
|
|
880
|
+
id: string;
|
|
881
|
+
name: string;
|
|
882
|
+
}) => Promise<RecipeDocument>;
|
|
883
|
+
/** Replaces this project's recipe settings with the library recipe `id`. */
|
|
884
|
+
export declare const recipesApply: (dir: string, id: string) => Promise<unknown>;
|
|
885
|
+
export declare const recipesStatus: (dir: string) => Promise<RecipeStatusResult>;
|
|
886
|
+
export type BatchPreset = "youtube" | "reels" | "tiktok" | "square";
|
|
887
|
+
export type BatchState = "pending" | "rendered" | "qualified" | "failed";
|
|
888
|
+
export type BatchCover = {
|
|
889
|
+
at_ms: number;
|
|
890
|
+
path: string;
|
|
891
|
+
blake3: string;
|
|
892
|
+
};
|
|
893
|
+
/** One requested output. Omit `variant` for the main timeline. */
|
|
894
|
+
export type BatchOutputSpec = {
|
|
895
|
+
variant?: string;
|
|
896
|
+
preset: BatchPreset;
|
|
897
|
+
};
|
|
898
|
+
export type BatchOutputRow = {
|
|
899
|
+
key: string;
|
|
900
|
+
variant: string | null;
|
|
901
|
+
preset: string;
|
|
902
|
+
qa_preset: string;
|
|
903
|
+
state: BatchState;
|
|
904
|
+
output: string | null;
|
|
905
|
+
output_blake3: string | null;
|
|
906
|
+
qa: {
|
|
907
|
+
status: string;
|
|
908
|
+
receipt: string;
|
|
909
|
+
} | null;
|
|
910
|
+
cover: BatchCover | null;
|
|
911
|
+
error: string | null;
|
|
912
|
+
attempts: number;
|
|
913
|
+
};
|
|
914
|
+
export type BatchDocument = {
|
|
915
|
+
schema: string;
|
|
916
|
+
id: string;
|
|
917
|
+
created_at: string;
|
|
918
|
+
timeline_cursor: number;
|
|
919
|
+
outputs: BatchOutputRow[];
|
|
920
|
+
};
|
|
921
|
+
export type BatchRunOutput = Pick<BatchOutputRow, "key" | "state" | "output" | "cover" | "error">;
|
|
922
|
+
/** `batch.status`: the batch document plus its finishing check against the project's settings now. */
|
|
923
|
+
export type BatchStatus = BatchDocument & {
|
|
924
|
+
/** Lowercase hex BLAKE3 of the finishing settings the batch was created under; null before pinning existed. */
|
|
925
|
+
finishing_blake3: string | null;
|
|
926
|
+
/** null when the batch is unpinned or the settings could not be read (see `finishing_error`). */
|
|
927
|
+
finishing_matches: boolean | null;
|
|
928
|
+
/** Setting names that differ from the pinned settings, in the engine's order; empty when none. */
|
|
929
|
+
finishing_differs: string[];
|
|
930
|
+
current_finishing_blake3: string | null;
|
|
931
|
+
finishing_error?: string;
|
|
932
|
+
};
|
|
933
|
+
export type BatchRunResult = {
|
|
934
|
+
status: "done" | "partial";
|
|
935
|
+
id: string;
|
|
936
|
+
outputs: BatchRunOutput[];
|
|
937
|
+
/** Output keys rendered by this run. */
|
|
938
|
+
ran: string[];
|
|
939
|
+
/** Output keys already delivered and kept as they were. */
|
|
940
|
+
skipped: string[];
|
|
941
|
+
/** How this run treated the batch's pinned finishing settings. */
|
|
942
|
+
finishing?: {
|
|
943
|
+
action: "match" | "pinned" | "repinned";
|
|
944
|
+
differs: string[];
|
|
945
|
+
note?: string;
|
|
946
|
+
finishing_blake3: string;
|
|
947
|
+
previous_finishing_blake3: string | null;
|
|
948
|
+
};
|
|
949
|
+
};
|
|
950
|
+
export type BatchListResult = {
|
|
951
|
+
batches: {
|
|
952
|
+
id: string;
|
|
953
|
+
counts?: Record<string, number>;
|
|
954
|
+
}[];
|
|
955
|
+
};
|
|
956
|
+
/** `batch.output` progress event emitted by `batch.run` on the run's tag; only `key` and `state` are guaranteed. */
|
|
957
|
+
export type BatchOutputEvent = {
|
|
958
|
+
event: "batch.output";
|
|
959
|
+
key: string;
|
|
960
|
+
state: BatchState;
|
|
961
|
+
output?: string | null;
|
|
962
|
+
cover?: BatchCover | null;
|
|
963
|
+
error?: string | null;
|
|
964
|
+
attempts?: number;
|
|
965
|
+
};
|
|
966
|
+
export declare const batchCreate: (dir: string, outputs: BatchOutputSpec[], id?: string) => Promise<BatchDocument>;
|
|
967
|
+
/**
|
|
968
|
+
* Long-running: pass `job` to cancel with `recipeCancel(job)`; progress arrives as `batch.output` on `tag`.
|
|
969
|
+
* `finishing: "current"` pins the batch to the project's current finishing settings and renders every output again.
|
|
970
|
+
*/
|
|
971
|
+
export declare const batchRun: (dir: string, id: string, job?: string, tag?: string, finishing?: "current") => Promise<BatchRunResult>;
|
|
972
|
+
export declare const batchStatus: (dir: string, id: string) => Promise<BatchStatus>;
|
|
973
|
+
export declare const batchList: (dir: string) => Promise<BatchListResult>;
|
|
974
|
+
/** Sets the cover frame of one output; the reply carries the updated fields of that output row. */
|
|
975
|
+
export declare const batchCover: (dir: string, id: string, key: string, at_ms: number) => Promise<Partial<BatchOutputRow> & {
|
|
976
|
+
key: string;
|
|
977
|
+
}>;
|
|
978
|
+
/** `collected` copies each source into the bundle; `referenced` lists it by original path. */
|
|
979
|
+
export type BundleMedia = "collected" | "referenced";
|
|
980
|
+
/** One `external` entry of an export reply. `source` = referenced media; `asset` = a font/LUT that was missing. */
|
|
981
|
+
export type BundleExternal = {
|
|
982
|
+
kind: "source" | "asset";
|
|
983
|
+
path: string;
|
|
984
|
+
id?: string;
|
|
985
|
+
name?: string;
|
|
986
|
+
size?: number;
|
|
987
|
+
blake3?: string;
|
|
988
|
+
};
|
|
989
|
+
/** `bundle.export` reply (`status: "exported"`). `members` counts the project files, not `bundle.json`. */
|
|
990
|
+
export type BundleExportResult = {
|
|
991
|
+
status: "exported";
|
|
992
|
+
out: string;
|
|
993
|
+
manifest: string;
|
|
994
|
+
manifest_blake3: string;
|
|
995
|
+
media: BundleMedia;
|
|
996
|
+
project_id: string;
|
|
997
|
+
members: number;
|
|
998
|
+
bytes: number;
|
|
999
|
+
external: BundleExternal[];
|
|
1000
|
+
settings_assets: {
|
|
1001
|
+
member: string;
|
|
1002
|
+
original: string;
|
|
1003
|
+
}[];
|
|
1004
|
+
};
|
|
1005
|
+
/** A referenced source the bundle names that is absent here, or no longer hashes to its BLAKE3. */
|
|
1006
|
+
export type BundleMissingMedia = {
|
|
1007
|
+
id: string | null;
|
|
1008
|
+
name: string | null;
|
|
1009
|
+
path: string;
|
|
1010
|
+
reason: string;
|
|
1011
|
+
};
|
|
1012
|
+
/** A generated source the bundle names: `missing` when its bound file is absent here,
|
|
1013
|
+
* `unverified` when present here with a SHA-256 other than the one it was bound to. */
|
|
1014
|
+
export type BundleGeneratedSourceNote = {
|
|
1015
|
+
job_id: string;
|
|
1016
|
+
path: string;
|
|
1017
|
+
reason: string;
|
|
1018
|
+
};
|
|
1019
|
+
/** `bundle.import` reply (`status: "imported"`). `dir` is the new project folder. */
|
|
1020
|
+
export type BundleImportResult = {
|
|
1021
|
+
status: "imported";
|
|
1022
|
+
dir: string;
|
|
1023
|
+
project_id: string;
|
|
1024
|
+
media: BundleMedia;
|
|
1025
|
+
members: number;
|
|
1026
|
+
bytes: number;
|
|
1027
|
+
imported: string[];
|
|
1028
|
+
missing_media: BundleMissingMedia[];
|
|
1029
|
+
missing_assets: string[];
|
|
1030
|
+
/** Present on this computer, but the bundle recorded no hash to check them against. */
|
|
1031
|
+
unverified_assets?: string[];
|
|
1032
|
+
/** Generated sources whose bound file is absent on this computer. */
|
|
1033
|
+
missing_generated_sources?: BundleGeneratedSourceNote[];
|
|
1034
|
+
/** Generated sources whose bound file is here but is not the file they were bound to. */
|
|
1035
|
+
unverified_generated_sources?: BundleGeneratedSourceNote[];
|
|
1036
|
+
};
|
|
1037
|
+
/** `tag` routes the `bundle.progress` frames (`{completed, total}`, write stage) to this call. */
|
|
1038
|
+
export declare const bundleExport: (dir: string, params: {
|
|
1039
|
+
out: string;
|
|
1040
|
+
media: BundleMedia;
|
|
1041
|
+
}, tag?: string) => Promise<BundleExportResult>;
|
|
1042
|
+
export declare const bundleImport: (params: {
|
|
1043
|
+
bundle: string;
|
|
1044
|
+
dir: string;
|
|
1045
|
+
}) => Promise<BundleImportResult>;
|