@slatesvideo/shared 0.7.19 → 0.7.20
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/dist/operations/index.d.ts +344 -55
- package/dist/operations/index.js +343 -22
- package/dist/operations/surface.js +2 -0
- package/package.json +1 -1
|
@@ -216,18 +216,65 @@ declare const gridSelectionInput: z.ZodObject<{
|
|
|
216
216
|
aspects: string[];
|
|
217
217
|
rowKeys: string[];
|
|
218
218
|
}>;
|
|
219
|
+
declare const exportEncodingInput: z.ZodObject<{
|
|
220
|
+
presetId: z.ZodOptional<z.ZodEnum<["tiktok", "reels", "meta-feed", "stories", "shorts", "youtube"]>>;
|
|
221
|
+
codec: z.ZodOptional<z.ZodEnum<["h264", "h265", "prores"]>>;
|
|
222
|
+
videoBitrateMbps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
223
|
+
fps: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<24>, z.ZodLiteral<30>, z.ZodLiteral<60>]>>>;
|
|
224
|
+
}, "strict", z.ZodTypeAny, {
|
|
225
|
+
presetId?: "tiktok" | "reels" | "meta-feed" | "stories" | "shorts" | "youtube" | undefined;
|
|
226
|
+
codec?: "h264" | "h265" | "prores" | undefined;
|
|
227
|
+
videoBitrateMbps?: number | null | undefined;
|
|
228
|
+
fps?: 24 | 30 | 60 | null | undefined;
|
|
229
|
+
}, {
|
|
230
|
+
presetId?: "tiktok" | "reels" | "meta-feed" | "stories" | "shorts" | "youtube" | undefined;
|
|
231
|
+
codec?: "h264" | "h265" | "prores" | undefined;
|
|
232
|
+
videoBitrateMbps?: number | null | undefined;
|
|
233
|
+
fps?: 24 | 30 | 60 | null | undefined;
|
|
234
|
+
}>;
|
|
219
235
|
declare const deliveryInput: z.ZodObject<{
|
|
220
236
|
formats: z.ZodArray<z.ZodString, "many">;
|
|
221
237
|
shortSide: z.ZodOptional<z.ZodNumber>;
|
|
222
238
|
mode: z.ZodOptional<z.ZodEnum<["fill", "fit"]>>;
|
|
239
|
+
presetId: z.ZodOptional<z.ZodNullable<z.ZodEnum<["tiktok", "reels", "meta-feed", "stories", "shorts", "youtube"]>>>;
|
|
240
|
+
encoding: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
241
|
+
presetId: z.ZodOptional<z.ZodEnum<["tiktok", "reels", "meta-feed", "stories", "shorts", "youtube"]>>;
|
|
242
|
+
codec: z.ZodOptional<z.ZodEnum<["h264", "h265", "prores"]>>;
|
|
243
|
+
videoBitrateMbps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
244
|
+
fps: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<24>, z.ZodLiteral<30>, z.ZodLiteral<60>]>>>;
|
|
245
|
+
}, "strict", z.ZodTypeAny, {
|
|
246
|
+
presetId?: "tiktok" | "reels" | "meta-feed" | "stories" | "shorts" | "youtube" | undefined;
|
|
247
|
+
codec?: "h264" | "h265" | "prores" | undefined;
|
|
248
|
+
videoBitrateMbps?: number | null | undefined;
|
|
249
|
+
fps?: 24 | 30 | 60 | null | undefined;
|
|
250
|
+
}, {
|
|
251
|
+
presetId?: "tiktok" | "reels" | "meta-feed" | "stories" | "shorts" | "youtube" | undefined;
|
|
252
|
+
codec?: "h264" | "h265" | "prores" | undefined;
|
|
253
|
+
videoBitrateMbps?: number | null | undefined;
|
|
254
|
+
fps?: 24 | 30 | 60 | null | undefined;
|
|
255
|
+
}>>>;
|
|
223
256
|
}, "strict", z.ZodTypeAny, {
|
|
224
257
|
formats: string[];
|
|
225
258
|
mode?: "fill" | "fit" | undefined;
|
|
259
|
+
presetId?: "tiktok" | "reels" | "meta-feed" | "stories" | "shorts" | "youtube" | null | undefined;
|
|
226
260
|
shortSide?: number | undefined;
|
|
261
|
+
encoding?: {
|
|
262
|
+
presetId?: "tiktok" | "reels" | "meta-feed" | "stories" | "shorts" | "youtube" | undefined;
|
|
263
|
+
codec?: "h264" | "h265" | "prores" | undefined;
|
|
264
|
+
videoBitrateMbps?: number | null | undefined;
|
|
265
|
+
fps?: 24 | 30 | 60 | null | undefined;
|
|
266
|
+
} | null | undefined;
|
|
227
267
|
}, {
|
|
228
268
|
formats: string[];
|
|
229
269
|
mode?: "fill" | "fit" | undefined;
|
|
270
|
+
presetId?: "tiktok" | "reels" | "meta-feed" | "stories" | "shorts" | "youtube" | null | undefined;
|
|
230
271
|
shortSide?: number | undefined;
|
|
272
|
+
encoding?: {
|
|
273
|
+
presetId?: "tiktok" | "reels" | "meta-feed" | "stories" | "shorts" | "youtube" | undefined;
|
|
274
|
+
codec?: "h264" | "h265" | "prores" | undefined;
|
|
275
|
+
videoBitrateMbps?: number | null | undefined;
|
|
276
|
+
fps?: 24 | 30 | 60 | null | undefined;
|
|
277
|
+
} | null | undefined;
|
|
231
278
|
}>;
|
|
232
279
|
declare const taxonomyInput: z.ZodObject<{
|
|
233
280
|
concept: z.ZodString;
|
|
@@ -520,6 +567,8 @@ export declare const setView: Operation<{
|
|
|
520
567
|
open?: boolean;
|
|
521
568
|
assetIds?: string[];
|
|
522
569
|
};
|
|
570
|
+
review?: boolean;
|
|
571
|
+
reviewAssetIds?: string[] | null;
|
|
523
572
|
animatic?: {
|
|
524
573
|
open: boolean;
|
|
525
574
|
fromShotId?: string;
|
|
@@ -1472,9 +1521,9 @@ declare const exportCutsInput: z.ZodEffects<z.ZodObject<{
|
|
|
1472
1521
|
action: z.ZodOptional<z.ZodOptional<z.ZodEnum<["start", "status", "cancel"]>>>;
|
|
1473
1522
|
}, "strict", z.ZodTypeAny, {
|
|
1474
1523
|
projectId: string;
|
|
1475
|
-
action?: "start" | "status" | "cancel" | undefined;
|
|
1476
1524
|
directory?: string | undefined;
|
|
1477
1525
|
manifestId?: string | undefined;
|
|
1526
|
+
action?: "start" | "status" | "cancel" | undefined;
|
|
1478
1527
|
items?: ({
|
|
1479
1528
|
timelineId: string;
|
|
1480
1529
|
format: "mp4" | "xml";
|
|
@@ -1515,9 +1564,9 @@ declare const exportCutsInput: z.ZodEffects<z.ZodObject<{
|
|
|
1515
1564
|
}> | undefined;
|
|
1516
1565
|
}, {
|
|
1517
1566
|
projectId: string;
|
|
1518
|
-
action?: "start" | "status" | "cancel" | undefined;
|
|
1519
1567
|
directory?: string | undefined;
|
|
1520
1568
|
manifestId?: string | undefined;
|
|
1569
|
+
action?: "start" | "status" | "cancel" | undefined;
|
|
1521
1570
|
items?: ({
|
|
1522
1571
|
timelineId: string;
|
|
1523
1572
|
format: "mp4" | "xml";
|
|
@@ -1558,9 +1607,9 @@ declare const exportCutsInput: z.ZodEffects<z.ZodObject<{
|
|
|
1558
1607
|
}> | undefined;
|
|
1559
1608
|
}>, {
|
|
1560
1609
|
projectId: string;
|
|
1561
|
-
action?: "start" | "status" | "cancel" | undefined;
|
|
1562
1610
|
directory?: string | undefined;
|
|
1563
1611
|
manifestId?: string | undefined;
|
|
1612
|
+
action?: "start" | "status" | "cancel" | undefined;
|
|
1564
1613
|
items?: ({
|
|
1565
1614
|
timelineId: string;
|
|
1566
1615
|
format: "mp4" | "xml";
|
|
@@ -1601,9 +1650,9 @@ declare const exportCutsInput: z.ZodEffects<z.ZodObject<{
|
|
|
1601
1650
|
}> | undefined;
|
|
1602
1651
|
}, {
|
|
1603
1652
|
projectId: string;
|
|
1604
|
-
action?: "start" | "status" | "cancel" | undefined;
|
|
1605
1653
|
directory?: string | undefined;
|
|
1606
1654
|
manifestId?: string | undefined;
|
|
1655
|
+
action?: "start" | "status" | "cancel" | undefined;
|
|
1607
1656
|
items?: ({
|
|
1608
1657
|
timelineId: string;
|
|
1609
1658
|
format: "mp4" | "xml";
|
|
@@ -1699,10 +1748,10 @@ declare const variantSlotsInput: z.ZodObject<{
|
|
|
1699
1748
|
clipIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1700
1749
|
sequenceId: z.ZodOptional<z.ZodString>;
|
|
1701
1750
|
}, "strict", z.ZodTypeAny, {
|
|
1702
|
-
action: "add" | "update" | "remove" | "add-alternative" | "update-alternative" | "remove-alternative";
|
|
1703
1751
|
projectId: string;
|
|
1704
|
-
|
|
1752
|
+
action: "add" | "update" | "remove" | "add-alternative" | "update-alternative" | "remove-alternative";
|
|
1705
1753
|
timelineId?: string | undefined;
|
|
1754
|
+
at?: number | undefined;
|
|
1706
1755
|
slotId?: string | undefined;
|
|
1707
1756
|
slotName?: string | undefined;
|
|
1708
1757
|
alternativeId?: string | undefined;
|
|
@@ -1712,10 +1761,10 @@ declare const variantSlotsInput: z.ZodObject<{
|
|
|
1712
1761
|
clipIds?: string[] | undefined;
|
|
1713
1762
|
sequenceId?: string | undefined;
|
|
1714
1763
|
}, {
|
|
1715
|
-
action: "add" | "update" | "remove" | "add-alternative" | "update-alternative" | "remove-alternative";
|
|
1716
1764
|
projectId: string;
|
|
1717
|
-
|
|
1765
|
+
action: "add" | "update" | "remove" | "add-alternative" | "update-alternative" | "remove-alternative";
|
|
1718
1766
|
timelineId?: string | undefined;
|
|
1767
|
+
at?: number | undefined;
|
|
1719
1768
|
slotId?: string | undefined;
|
|
1720
1769
|
slotName?: string | undefined;
|
|
1721
1770
|
alternativeId?: string | undefined;
|
|
@@ -1797,8 +1846,8 @@ declare const variantsInput: z.ZodObject<{
|
|
|
1797
1846
|
frames: number;
|
|
1798
1847
|
}>]>>>;
|
|
1799
1848
|
}, "strict", z.ZodTypeAny, {
|
|
1800
|
-
action: "add" | "update" | "remove" | "rebuild";
|
|
1801
1849
|
projectId: string;
|
|
1850
|
+
action: "add" | "update" | "remove" | "rebuild";
|
|
1802
1851
|
timelineId?: string | undefined;
|
|
1803
1852
|
name?: string | undefined;
|
|
1804
1853
|
variantId?: string | undefined;
|
|
@@ -1823,8 +1872,8 @@ declare const variantsInput: z.ZodObject<{
|
|
|
1823
1872
|
}> | undefined;
|
|
1824
1873
|
}[] | undefined;
|
|
1825
1874
|
}, {
|
|
1826
|
-
action: "add" | "update" | "remove" | "rebuild";
|
|
1827
1875
|
projectId: string;
|
|
1876
|
+
action: "add" | "update" | "remove" | "rebuild";
|
|
1828
1877
|
timelineId?: string | undefined;
|
|
1829
1878
|
name?: string | undefined;
|
|
1830
1879
|
variantId?: string | undefined;
|
|
@@ -1883,43 +1932,158 @@ declare const reframeClipInput: z.ZodObject<{
|
|
|
1883
1932
|
focusY: z.ZodOptional<z.ZodNumber>;
|
|
1884
1933
|
zoom: z.ZodOptional<z.ZodNumber>;
|
|
1885
1934
|
}, "strict", z.ZodTypeAny, {
|
|
1886
|
-
zoom?: number | undefined;
|
|
1887
1935
|
mode?: "fill" | "fit" | undefined;
|
|
1888
1936
|
focusX?: number | undefined;
|
|
1889
1937
|
focusY?: number | undefined;
|
|
1890
|
-
}, {
|
|
1891
1938
|
zoom?: number | undefined;
|
|
1939
|
+
}, {
|
|
1892
1940
|
mode?: "fill" | "fit" | undefined;
|
|
1893
1941
|
focusX?: number | undefined;
|
|
1894
1942
|
focusY?: number | undefined;
|
|
1943
|
+
zoom?: number | undefined;
|
|
1895
1944
|
}>>>;
|
|
1896
|
-
follow: z.ZodOptional<z.ZodEnum<["face", "off"]
|
|
1945
|
+
follow: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["face", "off"]>, z.ZodObject<{
|
|
1946
|
+
maskId: z.ZodString;
|
|
1947
|
+
}, "strict", z.ZodTypeAny, {
|
|
1948
|
+
maskId: string;
|
|
1949
|
+
}, {
|
|
1950
|
+
maskId: string;
|
|
1951
|
+
}>]>>;
|
|
1897
1952
|
}, "strict", z.ZodTypeAny, {
|
|
1898
1953
|
projectId: string;
|
|
1899
1954
|
timelineId: string;
|
|
1900
1955
|
aspect: string;
|
|
1901
1956
|
clipId: string;
|
|
1902
1957
|
framing?: {
|
|
1903
|
-
zoom?: number | undefined;
|
|
1904
1958
|
mode?: "fill" | "fit" | undefined;
|
|
1905
1959
|
focusX?: number | undefined;
|
|
1906
1960
|
focusY?: number | undefined;
|
|
1961
|
+
zoom?: number | undefined;
|
|
1907
1962
|
} | null | undefined;
|
|
1908
|
-
follow?: "
|
|
1963
|
+
follow?: "face" | "off" | {
|
|
1964
|
+
maskId: string;
|
|
1965
|
+
} | undefined;
|
|
1909
1966
|
}, {
|
|
1910
1967
|
projectId: string;
|
|
1911
1968
|
timelineId: string;
|
|
1912
1969
|
aspect: string;
|
|
1913
1970
|
clipId: string;
|
|
1914
1971
|
framing?: {
|
|
1915
|
-
zoom?: number | undefined;
|
|
1916
1972
|
mode?: "fill" | "fit" | undefined;
|
|
1917
1973
|
focusX?: number | undefined;
|
|
1918
1974
|
focusY?: number | undefined;
|
|
1975
|
+
zoom?: number | undefined;
|
|
1919
1976
|
} | null | undefined;
|
|
1920
|
-
follow?: "
|
|
1977
|
+
follow?: "face" | "off" | {
|
|
1978
|
+
maskId: string;
|
|
1979
|
+
} | undefined;
|
|
1921
1980
|
}>;
|
|
1922
1981
|
export declare const reframeClip: Operation<z.infer<typeof reframeClipInput>>;
|
|
1982
|
+
export declare const freezeFrame: Operation<{
|
|
1983
|
+
projectId: string;
|
|
1984
|
+
clipId: string;
|
|
1985
|
+
frame?: number;
|
|
1986
|
+
sec?: number;
|
|
1987
|
+
seconds?: number;
|
|
1988
|
+
linked?: boolean;
|
|
1989
|
+
}>;
|
|
1990
|
+
export declare const stabilizeClip: Operation<{
|
|
1991
|
+
projectId: string;
|
|
1992
|
+
clipId: string;
|
|
1993
|
+
strength: 'light' | 'standard' | 'strong' | null;
|
|
1994
|
+
}>;
|
|
1995
|
+
export declare const slideClip: Operation<{
|
|
1996
|
+
projectId: string;
|
|
1997
|
+
clipId: string;
|
|
1998
|
+
deltaFrames: number;
|
|
1999
|
+
}>;
|
|
2000
|
+
export declare const punchIn: Operation<{
|
|
2001
|
+
projectId: string;
|
|
2002
|
+
clipId: string;
|
|
2003
|
+
amount?: number;
|
|
2004
|
+
style?: 'cut' | 'ease-in' | 'slow-push';
|
|
2005
|
+
fromFrame?: number;
|
|
2006
|
+
words?: number[];
|
|
2007
|
+
holdSec?: number;
|
|
2008
|
+
off?: boolean;
|
|
2009
|
+
replaceKeys?: boolean;
|
|
2010
|
+
}>;
|
|
2011
|
+
declare const dialogueCleanupOptions: z.ZodObject<{
|
|
2012
|
+
fillers: z.ZodOptional<z.ZodBoolean>;
|
|
2013
|
+
pauses: z.ZodOptional<z.ZodBoolean>;
|
|
2014
|
+
repeats: z.ZodOptional<z.ZodBoolean>;
|
|
2015
|
+
minPauseSec: z.ZodOptional<z.ZodNumber>;
|
|
2016
|
+
keepAirSec: z.ZodOptional<z.ZodNumber>;
|
|
2017
|
+
}, "strict", z.ZodTypeAny, {
|
|
2018
|
+
fillers?: boolean | undefined;
|
|
2019
|
+
pauses?: boolean | undefined;
|
|
2020
|
+
repeats?: boolean | undefined;
|
|
2021
|
+
minPauseSec?: number | undefined;
|
|
2022
|
+
keepAirSec?: number | undefined;
|
|
2023
|
+
}, {
|
|
2024
|
+
fillers?: boolean | undefined;
|
|
2025
|
+
pauses?: boolean | undefined;
|
|
2026
|
+
repeats?: boolean | undefined;
|
|
2027
|
+
minPauseSec?: number | undefined;
|
|
2028
|
+
keepAirSec?: number | undefined;
|
|
2029
|
+
}>;
|
|
2030
|
+
export declare const cleanUpDialogue: Operation<{
|
|
2031
|
+
projectId: string;
|
|
2032
|
+
clipId: string;
|
|
2033
|
+
action?: 'scan' | 'apply' | 'restore' | 'nudge';
|
|
2034
|
+
options?: z.infer<typeof dialogueCleanupOptions>;
|
|
2035
|
+
range?: {
|
|
2036
|
+
startSec: number;
|
|
2037
|
+
endSec: number;
|
|
2038
|
+
};
|
|
2039
|
+
edge?: 'start' | 'end';
|
|
2040
|
+
deltaFrames?: number;
|
|
2041
|
+
linked?: boolean;
|
|
2042
|
+
}>;
|
|
2043
|
+
export declare const autoColourClip: Operation<{
|
|
2044
|
+
projectId: string;
|
|
2045
|
+
clipId: string;
|
|
2046
|
+
frame?: number;
|
|
2047
|
+
sec?: number;
|
|
2048
|
+
}>;
|
|
2049
|
+
export declare const autoDuck: Operation<{
|
|
2050
|
+
projectId: string;
|
|
2051
|
+
trackId?: string;
|
|
2052
|
+
clipId?: string;
|
|
2053
|
+
duckDb?: number;
|
|
2054
|
+
attackSec?: number;
|
|
2055
|
+
releaseSec?: number;
|
|
2056
|
+
holdSec?: number;
|
|
2057
|
+
bridgeSec?: number;
|
|
2058
|
+
off?: boolean;
|
|
2059
|
+
}>;
|
|
2060
|
+
export declare const matchLoudness: Operation<{
|
|
2061
|
+
projectId: string;
|
|
2062
|
+
timelineId?: string;
|
|
2063
|
+
trackId?: string;
|
|
2064
|
+
}>;
|
|
2065
|
+
export declare const upscaleImage: Operation<{
|
|
2066
|
+
projectId: string;
|
|
2067
|
+
assetId: string;
|
|
2068
|
+
factor: 2 | 4;
|
|
2069
|
+
confirm?: boolean;
|
|
2070
|
+
requestId?: string;
|
|
2071
|
+
}>;
|
|
2072
|
+
export declare const getReviewPacket: Operation<{
|
|
2073
|
+
projectId: string;
|
|
2074
|
+
packetId?: string;
|
|
2075
|
+
include?: 'sent' | 'open' | 'all';
|
|
2076
|
+
claim?: boolean;
|
|
2077
|
+
}>;
|
|
2078
|
+
export declare const resolveReviewNote: Operation<{
|
|
2079
|
+
projectId: string;
|
|
2080
|
+
replies: Array<{
|
|
2081
|
+
noteId: string;
|
|
2082
|
+
kind: 'fixed' | 'question' | 'why_not' | 'alternates' | 'note';
|
|
2083
|
+
text?: string;
|
|
2084
|
+
assetIds?: string[];
|
|
2085
|
+
}>;
|
|
2086
|
+
}>;
|
|
1923
2087
|
export declare const listTimelines: Operation<{
|
|
1924
2088
|
projectId: string;
|
|
1925
2089
|
}>;
|
|
@@ -2079,7 +2243,7 @@ declare const keyframeList: z.ZodArray<z.ZodObject<{
|
|
|
2079
2243
|
/** An effect list as the desktop stores it (`slate/src/shared/audioEffects.ts`); slates_get_timeline's audioEffects lists each type's parameters and ranges, and eq what a band list takes. */
|
|
2080
2244
|
declare const audioEffectList: z.ZodArray<z.ZodObject<{
|
|
2081
2245
|
id: z.ZodOptional<z.ZodString>;
|
|
2082
|
-
type: z.ZodEnum<["volume", "eq"]>;
|
|
2246
|
+
type: z.ZodEnum<["volume", "eq", "denoise", "voice_enhance"]>;
|
|
2083
2247
|
bypass: z.ZodOptional<z.ZodBoolean>;
|
|
2084
2248
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
2085
2249
|
keyframes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
@@ -2168,7 +2332,7 @@ declare const audioEffectList: z.ZodArray<z.ZodObject<{
|
|
|
2168
2332
|
slope?: number | undefined;
|
|
2169
2333
|
}>, "many">>;
|
|
2170
2334
|
}, "strict", z.ZodTypeAny, {
|
|
2171
|
-
type: "volume" | "eq";
|
|
2335
|
+
type: "volume" | "eq" | "denoise" | "voice_enhance";
|
|
2172
2336
|
params?: Record<string, number> | undefined;
|
|
2173
2337
|
id?: string | undefined;
|
|
2174
2338
|
bypass?: boolean | undefined;
|
|
@@ -2196,7 +2360,7 @@ declare const audioEffectList: z.ZodArray<z.ZodObject<{
|
|
|
2196
2360
|
slope?: number | undefined;
|
|
2197
2361
|
}[] | undefined;
|
|
2198
2362
|
}, {
|
|
2199
|
-
type: "volume" | "eq";
|
|
2363
|
+
type: "volume" | "eq" | "denoise" | "voice_enhance";
|
|
2200
2364
|
params?: Record<string, number> | undefined;
|
|
2201
2365
|
id?: string | undefined;
|
|
2202
2366
|
bypass?: boolean | undefined;
|
|
@@ -2236,27 +2400,27 @@ declare const clipPanel: z.ZodObject<{
|
|
|
2236
2400
|
}, "strict", z.ZodTypeAny, {
|
|
2237
2401
|
x?: number | undefined;
|
|
2238
2402
|
y?: number | undefined;
|
|
2403
|
+
color?: string | undefined;
|
|
2239
2404
|
blur?: number | undefined;
|
|
2240
2405
|
opacity?: number | undefined;
|
|
2241
|
-
color?: string | undefined;
|
|
2242
2406
|
}, {
|
|
2243
2407
|
x?: number | undefined;
|
|
2244
2408
|
y?: number | undefined;
|
|
2409
|
+
color?: string | undefined;
|
|
2245
2410
|
blur?: number | undefined;
|
|
2246
2411
|
opacity?: number | undefined;
|
|
2247
|
-
color?: string | undefined;
|
|
2248
2412
|
}>>;
|
|
2249
2413
|
border: z.ZodOptional<z.ZodObject<{
|
|
2250
2414
|
width: z.ZodOptional<z.ZodNumber>;
|
|
2251
2415
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
2252
2416
|
color: z.ZodOptional<z.ZodString>;
|
|
2253
2417
|
}, "strict", z.ZodTypeAny, {
|
|
2254
|
-
opacity?: number | undefined;
|
|
2255
2418
|
color?: string | undefined;
|
|
2419
|
+
opacity?: number | undefined;
|
|
2256
2420
|
width?: number | undefined;
|
|
2257
2421
|
}, {
|
|
2258
|
-
opacity?: number | undefined;
|
|
2259
2422
|
color?: string | undefined;
|
|
2423
|
+
opacity?: number | undefined;
|
|
2260
2424
|
width?: number | undefined;
|
|
2261
2425
|
}>>;
|
|
2262
2426
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -2264,13 +2428,13 @@ declare const clipPanel: z.ZodObject<{
|
|
|
2264
2428
|
shadow?: {
|
|
2265
2429
|
x?: number | undefined;
|
|
2266
2430
|
y?: number | undefined;
|
|
2431
|
+
color?: string | undefined;
|
|
2267
2432
|
blur?: number | undefined;
|
|
2268
2433
|
opacity?: number | undefined;
|
|
2269
|
-
color?: string | undefined;
|
|
2270
2434
|
} | undefined;
|
|
2271
2435
|
border?: {
|
|
2272
|
-
opacity?: number | undefined;
|
|
2273
2436
|
color?: string | undefined;
|
|
2437
|
+
opacity?: number | undefined;
|
|
2274
2438
|
width?: number | undefined;
|
|
2275
2439
|
} | undefined;
|
|
2276
2440
|
}, {
|
|
@@ -2278,16 +2442,149 @@ declare const clipPanel: z.ZodObject<{
|
|
|
2278
2442
|
shadow?: {
|
|
2279
2443
|
x?: number | undefined;
|
|
2280
2444
|
y?: number | undefined;
|
|
2445
|
+
color?: string | undefined;
|
|
2281
2446
|
blur?: number | undefined;
|
|
2282
2447
|
opacity?: number | undefined;
|
|
2283
|
-
color?: string | undefined;
|
|
2284
2448
|
} | undefined;
|
|
2285
2449
|
border?: {
|
|
2286
|
-
opacity?: number | undefined;
|
|
2287
2450
|
color?: string | undefined;
|
|
2451
|
+
opacity?: number | undefined;
|
|
2288
2452
|
width?: number | undefined;
|
|
2289
2453
|
} | undefined;
|
|
2290
2454
|
}>;
|
|
2455
|
+
declare const clipLookInput: z.ZodObject<{
|
|
2456
|
+
blend: z.ZodOptional<z.ZodEnum<["normal", "multiply", "screen", "overlay", "soft-light"]>>;
|
|
2457
|
+
grain: z.ZodOptional<z.ZodNumber>;
|
|
2458
|
+
saturation: z.ZodOptional<z.ZodNumber>;
|
|
2459
|
+
exposure: z.ZodOptional<z.ZodNumber>;
|
|
2460
|
+
contrast: z.ZodOptional<z.ZodNumber>;
|
|
2461
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
2462
|
+
tint: z.ZodOptional<z.ZodNumber>;
|
|
2463
|
+
highlights: z.ZodOptional<z.ZodNumber>;
|
|
2464
|
+
shadows: z.ZodOptional<z.ZodNumber>;
|
|
2465
|
+
lutPath: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
|
|
2466
|
+
lutIntensity: z.ZodOptional<z.ZodNumber>;
|
|
2467
|
+
}, "strict", z.ZodTypeAny, {
|
|
2468
|
+
blend?: "normal" | "multiply" | "screen" | "overlay" | "soft-light" | undefined;
|
|
2469
|
+
grain?: number | undefined;
|
|
2470
|
+
saturation?: number | undefined;
|
|
2471
|
+
exposure?: number | undefined;
|
|
2472
|
+
contrast?: number | undefined;
|
|
2473
|
+
temperature?: number | undefined;
|
|
2474
|
+
tint?: number | undefined;
|
|
2475
|
+
highlights?: number | undefined;
|
|
2476
|
+
shadows?: number | undefined;
|
|
2477
|
+
lutPath?: string | undefined;
|
|
2478
|
+
lutIntensity?: number | undefined;
|
|
2479
|
+
}, {
|
|
2480
|
+
blend?: "normal" | "multiply" | "screen" | "overlay" | "soft-light" | undefined;
|
|
2481
|
+
grain?: number | undefined;
|
|
2482
|
+
saturation?: number | undefined;
|
|
2483
|
+
exposure?: number | undefined;
|
|
2484
|
+
contrast?: number | undefined;
|
|
2485
|
+
temperature?: number | undefined;
|
|
2486
|
+
tint?: number | undefined;
|
|
2487
|
+
highlights?: number | undefined;
|
|
2488
|
+
shadows?: number | undefined;
|
|
2489
|
+
lutPath?: string | undefined;
|
|
2490
|
+
lutIntensity?: number | undefined;
|
|
2491
|
+
}>;
|
|
2492
|
+
/** A clip's matte (slate's `src/shared/clipMatte.ts`): a subject mask, a shape, or a colour key. One kind at a time. */
|
|
2493
|
+
declare const clipMatteInput: z.ZodUnion<[z.ZodObject<{
|
|
2494
|
+
maskId: z.ZodString;
|
|
2495
|
+
mode: z.ZodOptional<z.ZodEnum<["subject", "background"]>>;
|
|
2496
|
+
feather: z.ZodOptional<z.ZodNumber>;
|
|
2497
|
+
}, "strict", z.ZodTypeAny, {
|
|
2498
|
+
maskId: string;
|
|
2499
|
+
mode?: "subject" | "background" | undefined;
|
|
2500
|
+
feather?: number | undefined;
|
|
2501
|
+
}, {
|
|
2502
|
+
maskId: string;
|
|
2503
|
+
mode?: "subject" | "background" | undefined;
|
|
2504
|
+
feather?: number | undefined;
|
|
2505
|
+
}>, z.ZodObject<{
|
|
2506
|
+
shape: z.ZodObject<{
|
|
2507
|
+
kind: z.ZodEnum<["rect", "ellipse"]>;
|
|
2508
|
+
x: z.ZodNumber;
|
|
2509
|
+
y: z.ZodNumber;
|
|
2510
|
+
w: z.ZodNumber;
|
|
2511
|
+
h: z.ZodNumber;
|
|
2512
|
+
rotation: z.ZodOptional<z.ZodNumber>;
|
|
2513
|
+
feather: z.ZodOptional<z.ZodNumber>;
|
|
2514
|
+
invert: z.ZodOptional<z.ZodBoolean>;
|
|
2515
|
+
}, "strict", z.ZodTypeAny, {
|
|
2516
|
+
kind: "rect" | "ellipse";
|
|
2517
|
+
x: number;
|
|
2518
|
+
y: number;
|
|
2519
|
+
w: number;
|
|
2520
|
+
h: number;
|
|
2521
|
+
feather?: number | undefined;
|
|
2522
|
+
rotation?: number | undefined;
|
|
2523
|
+
invert?: boolean | undefined;
|
|
2524
|
+
}, {
|
|
2525
|
+
kind: "rect" | "ellipse";
|
|
2526
|
+
x: number;
|
|
2527
|
+
y: number;
|
|
2528
|
+
w: number;
|
|
2529
|
+
h: number;
|
|
2530
|
+
feather?: number | undefined;
|
|
2531
|
+
rotation?: number | undefined;
|
|
2532
|
+
invert?: boolean | undefined;
|
|
2533
|
+
}>;
|
|
2534
|
+
}, "strict", z.ZodTypeAny, {
|
|
2535
|
+
shape: {
|
|
2536
|
+
kind: "rect" | "ellipse";
|
|
2537
|
+
x: number;
|
|
2538
|
+
y: number;
|
|
2539
|
+
w: number;
|
|
2540
|
+
h: number;
|
|
2541
|
+
feather?: number | undefined;
|
|
2542
|
+
rotation?: number | undefined;
|
|
2543
|
+
invert?: boolean | undefined;
|
|
2544
|
+
};
|
|
2545
|
+
}, {
|
|
2546
|
+
shape: {
|
|
2547
|
+
kind: "rect" | "ellipse";
|
|
2548
|
+
x: number;
|
|
2549
|
+
y: number;
|
|
2550
|
+
w: number;
|
|
2551
|
+
h: number;
|
|
2552
|
+
feather?: number | undefined;
|
|
2553
|
+
rotation?: number | undefined;
|
|
2554
|
+
invert?: boolean | undefined;
|
|
2555
|
+
};
|
|
2556
|
+
}>, z.ZodObject<{
|
|
2557
|
+
chroma: z.ZodObject<{
|
|
2558
|
+
color: z.ZodString;
|
|
2559
|
+
tolerance: z.ZodNumber;
|
|
2560
|
+
softness: z.ZodNumber;
|
|
2561
|
+
spill: z.ZodOptional<z.ZodNumber>;
|
|
2562
|
+
}, "strict", z.ZodTypeAny, {
|
|
2563
|
+
color: string;
|
|
2564
|
+
tolerance: number;
|
|
2565
|
+
softness: number;
|
|
2566
|
+
spill?: number | undefined;
|
|
2567
|
+
}, {
|
|
2568
|
+
color: string;
|
|
2569
|
+
tolerance: number;
|
|
2570
|
+
softness: number;
|
|
2571
|
+
spill?: number | undefined;
|
|
2572
|
+
}>;
|
|
2573
|
+
}, "strict", z.ZodTypeAny, {
|
|
2574
|
+
chroma: {
|
|
2575
|
+
color: string;
|
|
2576
|
+
tolerance: number;
|
|
2577
|
+
softness: number;
|
|
2578
|
+
spill?: number | undefined;
|
|
2579
|
+
};
|
|
2580
|
+
}, {
|
|
2581
|
+
chroma: {
|
|
2582
|
+
color: string;
|
|
2583
|
+
tolerance: number;
|
|
2584
|
+
softness: number;
|
|
2585
|
+
spill?: number | undefined;
|
|
2586
|
+
};
|
|
2587
|
+
}>]>;
|
|
2291
2588
|
export declare const updateClip: Operation<{
|
|
2292
2589
|
projectId: string;
|
|
2293
2590
|
clipId: string;
|
|
@@ -2298,17 +2595,9 @@ export declare const updateClip: Operation<{
|
|
|
2298
2595
|
fadeOutFrames?: number | null;
|
|
2299
2596
|
audioFadeInFrames?: number | null;
|
|
2300
2597
|
audioFadeOutFrames?: number | null;
|
|
2301
|
-
look?:
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
saturation?: number;
|
|
2305
|
-
exposure?: number;
|
|
2306
|
-
} | null;
|
|
2307
|
-
matte?: {
|
|
2308
|
-
maskId: string;
|
|
2309
|
-
mode?: 'subject' | 'background';
|
|
2310
|
-
feather?: number;
|
|
2311
|
-
} | null;
|
|
2598
|
+
look?: z.infer<typeof clipLookInput> | null;
|
|
2599
|
+
matte?: z.infer<typeof clipMatteInput> | null;
|
|
2600
|
+
reversed?: boolean | null;
|
|
2312
2601
|
space?: {
|
|
2313
2602
|
pitch?: number;
|
|
2314
2603
|
yaw?: number;
|
|
@@ -2341,7 +2630,7 @@ export declare const addTimelineTrack: Operation<{
|
|
|
2341
2630
|
above?: string;
|
|
2342
2631
|
below?: string;
|
|
2343
2632
|
}>;
|
|
2344
|
-
declare const TEXT_STYLE_IDS: readonly ["word-pop", "keyword", "subtitle", "headline", "clean", "plain"];
|
|
2633
|
+
declare const TEXT_STYLE_IDS: readonly ["word-pop", "keyword", "subtitle", "headline", "clean", "plain", "active-pill", "reel-bold", "impact-hook", "lower-third", "minimal-caption", "kinetic-pop"];
|
|
2345
2634
|
declare const TEXT_FONT_IDS: readonly ["bebas-neue", "montserrat-medium", "montserrat-bold", "montserrat-extrabold", "montserrat-black", "geist-regular", "geist-medium", "geist-semibold", "geist-bold"];
|
|
2346
2635
|
type TextSet = {
|
|
2347
2636
|
font?: (typeof TEXT_FONT_IDS)[number];
|
|
@@ -2363,21 +2652,21 @@ declare const overlayWordsInput: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
|
2363
2652
|
start: z.ZodNumber;
|
|
2364
2653
|
end: z.ZodNumber;
|
|
2365
2654
|
}, "strict", z.ZodTypeAny, {
|
|
2366
|
-
text: string;
|
|
2367
2655
|
start: number;
|
|
2368
2656
|
end: number;
|
|
2369
|
-
}, {
|
|
2370
2657
|
text: string;
|
|
2658
|
+
}, {
|
|
2371
2659
|
start: number;
|
|
2372
2660
|
end: number;
|
|
2373
|
-
}>, {
|
|
2374
2661
|
text: string;
|
|
2662
|
+
}>, {
|
|
2375
2663
|
start: number;
|
|
2376
2664
|
end: number;
|
|
2377
|
-
}, {
|
|
2378
2665
|
text: string;
|
|
2666
|
+
}, {
|
|
2379
2667
|
start: number;
|
|
2380
2668
|
end: number;
|
|
2669
|
+
text: string;
|
|
2381
2670
|
}>, "many">;
|
|
2382
2671
|
export declare const addTextClip: Operation<{
|
|
2383
2672
|
projectId: string;
|
|
@@ -2509,7 +2798,7 @@ export declare const exportVideo: Operation<{
|
|
|
2509
2798
|
overwrite?: boolean;
|
|
2510
2799
|
aspect?: string;
|
|
2511
2800
|
audioBitrate?: typeof AUDIO_BITRATES[number];
|
|
2512
|
-
}
|
|
2801
|
+
} & z.infer<typeof exportEncodingInput>>;
|
|
2513
2802
|
export declare const exportTimelineXml: Operation<{
|
|
2514
2803
|
projectId?: string;
|
|
2515
2804
|
timelineId?: string;
|
|
@@ -3136,15 +3425,15 @@ declare const writeScriptDocumentInput: z.ZodObject<{
|
|
|
3136
3425
|
removed: z.ZodNumber;
|
|
3137
3426
|
text: z.ZodString;
|
|
3138
3427
|
}, "strip", z.ZodTypeAny, {
|
|
3139
|
-
text: string;
|
|
3140
3428
|
at: number;
|
|
3141
3429
|
sceneId: string;
|
|
3142
3430
|
removed: number;
|
|
3143
|
-
}, {
|
|
3144
3431
|
text: string;
|
|
3432
|
+
}, {
|
|
3145
3433
|
at: number;
|
|
3146
3434
|
sceneId: string;
|
|
3147
3435
|
removed: number;
|
|
3436
|
+
text: string;
|
|
3148
3437
|
}>, "many">;
|
|
3149
3438
|
structures: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3150
3439
|
sceneId: z.ZodString;
|
|
@@ -3179,7 +3468,7 @@ declare const writeScriptDocumentInput: z.ZodObject<{
|
|
|
3179
3468
|
end: number;
|
|
3180
3469
|
}[];
|
|
3181
3470
|
label?: string | undefined;
|
|
3182
|
-
level?:
|
|
3471
|
+
level?: 3 | 2 | undefined;
|
|
3183
3472
|
}, {
|
|
3184
3473
|
start: number;
|
|
3185
3474
|
kind: "paragraph" | "heading" | "direction";
|
|
@@ -3191,7 +3480,7 @@ declare const writeScriptDocumentInput: z.ZodObject<{
|
|
|
3191
3480
|
end: number;
|
|
3192
3481
|
}[];
|
|
3193
3482
|
label?: string | undefined;
|
|
3194
|
-
level?:
|
|
3483
|
+
level?: 3 | 2 | undefined;
|
|
3195
3484
|
}>, "many">;
|
|
3196
3485
|
}, "strip", z.ZodTypeAny, {
|
|
3197
3486
|
sceneId: string;
|
|
@@ -3206,7 +3495,7 @@ declare const writeScriptDocumentInput: z.ZodObject<{
|
|
|
3206
3495
|
end: number;
|
|
3207
3496
|
}[];
|
|
3208
3497
|
label?: string | undefined;
|
|
3209
|
-
level?:
|
|
3498
|
+
level?: 3 | 2 | undefined;
|
|
3210
3499
|
}[];
|
|
3211
3500
|
}, {
|
|
3212
3501
|
sceneId: string;
|
|
@@ -3221,7 +3510,7 @@ declare const writeScriptDocumentInput: z.ZodObject<{
|
|
|
3221
3510
|
end: number;
|
|
3222
3511
|
}[];
|
|
3223
3512
|
label?: string | undefined;
|
|
3224
|
-
level?:
|
|
3513
|
+
level?: 3 | 2 | undefined;
|
|
3225
3514
|
}[];
|
|
3226
3515
|
}>, "many">>;
|
|
3227
3516
|
move: z.ZodOptional<z.ZodObject<{
|
|
@@ -3281,10 +3570,10 @@ declare const writeScriptDocumentInput: z.ZodObject<{
|
|
|
3281
3570
|
storyboardId: string;
|
|
3282
3571
|
expectedRevision: number;
|
|
3283
3572
|
edits: {
|
|
3284
|
-
text: string;
|
|
3285
3573
|
at: number;
|
|
3286
3574
|
sceneId: string;
|
|
3287
3575
|
removed: number;
|
|
3576
|
+
text: string;
|
|
3288
3577
|
}[];
|
|
3289
3578
|
structures?: {
|
|
3290
3579
|
sceneId: string;
|
|
@@ -3299,7 +3588,7 @@ declare const writeScriptDocumentInput: z.ZodObject<{
|
|
|
3299
3588
|
end: number;
|
|
3300
3589
|
}[];
|
|
3301
3590
|
label?: string | undefined;
|
|
3302
|
-
level?:
|
|
3591
|
+
level?: 3 | 2 | undefined;
|
|
3303
3592
|
}[];
|
|
3304
3593
|
}[] | undefined;
|
|
3305
3594
|
move?: {
|
|
@@ -3327,10 +3616,10 @@ declare const writeScriptDocumentInput: z.ZodObject<{
|
|
|
3327
3616
|
storyboardId: string;
|
|
3328
3617
|
expectedRevision: number;
|
|
3329
3618
|
edits: {
|
|
3330
|
-
text: string;
|
|
3331
3619
|
at: number;
|
|
3332
3620
|
sceneId: string;
|
|
3333
3621
|
removed: number;
|
|
3622
|
+
text: string;
|
|
3334
3623
|
}[];
|
|
3335
3624
|
structures?: {
|
|
3336
3625
|
sceneId: string;
|
|
@@ -3345,7 +3634,7 @@ declare const writeScriptDocumentInput: z.ZodObject<{
|
|
|
3345
3634
|
end: number;
|
|
3346
3635
|
}[];
|
|
3347
3636
|
label?: string | undefined;
|
|
3348
|
-
level?:
|
|
3637
|
+
level?: 3 | 2 | undefined;
|
|
3349
3638
|
}[];
|
|
3350
3639
|
}[] | undefined;
|
|
3351
3640
|
move?: {
|
package/dist/operations/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
1
2
|
import { MAX_IMAGE_VARIATIONS, SHEET_TOOL_ASPECT_RATIO, SHEET_TOOL_GPT_QUALITY } from '../prompts/generation-policy.js';
|
|
2
3
|
import { STYLE_LIBRARY, DEFAULT_STYLE_ID } from '../prompts/style-library.js';
|
|
3
4
|
import { discoverGuides, guideCatalog } from '../prompts/guide-discovery.js';
|
|
@@ -557,11 +558,28 @@ const DOCK_SECTION_NAMES = { storyboards: 'Boards', library: 'Library', folders:
|
|
|
557
558
|
// Delivery ids and dimensions come from the desktop catalog, not model capabilities.
|
|
558
559
|
const deliveryAspectInput = z.string().min(1).describe('Delivery format id from slates_get_variant_grid.formats; the desktop validates it and supplies dimensions.');
|
|
559
560
|
const gridSelectionInput = z.object({ rowKeys: z.array(z.string()), aspects: z.array(deliveryAspectInput) }).strict();
|
|
561
|
+
// A file's encoding. Mirrors slate's `@shared/deliveryFormats` (PLATFORM_PRESET_IDS, EXPORT_VIDEO_CODECS,
|
|
562
|
+
// EXPORT_FRAME_RATES, VIDEO_BITRATE_RANGE); the desktop validates every value again.
|
|
563
|
+
const PLATFORM_PRESET_IDS = ['tiktok', 'reels', 'meta-feed', 'stories', 'shorts', 'youtube'];
|
|
564
|
+
const exportEncodingShape = {
|
|
565
|
+
presetId: z.enum(PLATFORM_PRESET_IDS).optional().describe("A platform's targets: its frame size, H.264 bitrate, frame-rate ceiling and sound."),
|
|
566
|
+
codec: z.enum(['h264', 'h265', 'prores']).optional().describe('h264 (default) and h265 write an .mp4; prores writes a .mov with PCM sound for editing elsewhere.'),
|
|
567
|
+
videoBitrateMbps: z.number().min(2).max(120).nullable().optional().describe("The picture's Mb/s; null is Auto (the preset's, else the engine's own). Ignored by prores."),
|
|
568
|
+
fps: z.union([z.literal(24), z.literal(30), z.literal(60)]).nullable().optional().describe("The file's frame rate; null is the timeline's."),
|
|
569
|
+
};
|
|
570
|
+
const exportEncodingInput = z.object(exportEncodingShape).strict();
|
|
560
571
|
const deliveryInput = z.object({
|
|
561
572
|
formats: z.array(deliveryAspectInput).min(1),
|
|
562
573
|
shortSide: z.number().int().positive().optional().describe('Optional short side supported by the desktop delivery settings.'),
|
|
563
574
|
mode: z.enum(['fill', 'fit']).optional().describe('Fill crops around focus; fit pads the frame.'),
|
|
575
|
+
presetId: z.enum(PLATFORM_PRESET_IDS).nullable().optional().describe('The platform the cut is made for: its encoding targets and its safe-area guide.'),
|
|
576
|
+
encoding: exportEncodingInput.nullable().optional().describe("The cut's own encoding over the preset's; every export of it uses it."),
|
|
564
577
|
}).strict();
|
|
578
|
+
/** A delivery naming a preset or an encoding: an older desktop drops both without a word. */
|
|
579
|
+
async function requireDeliveryEncoding(desktop, delivery) {
|
|
580
|
+
if (delivery && (delivery.presetId != null || delivery.encoding != null))
|
|
581
|
+
await desktop.requireCapability('export-encoding', 'platform presets and export encoding');
|
|
582
|
+
}
|
|
565
583
|
const taxonomyInput = z.object({
|
|
566
584
|
concept: z.string().min(1), variant: z.string().min(1),
|
|
567
585
|
hook: z.string().optional(), body: z.string().optional(), cast: z.string().optional(),
|
|
@@ -687,7 +705,7 @@ export const getView = {
|
|
|
687
705
|
*/
|
|
688
706
|
export const setView = {
|
|
689
707
|
id: 'slates_set_view',
|
|
690
|
-
description: "Change what the user is looking at, as their own clicks would: open a project or go Home, switch tab, open a board, jump to a scene, set the Board's View and Filter, set Media's tab, folder and narrowing, jump to a card in Media, open a Library page, a picture in the picture viewer or a clip in the timeline's Viewer, Compare, the animatic or Settings on a pane, show or hide the prompt box, open or park the timeline or switch the cut on it, open a Shot's panel on Script, set the side panels (the project navigator and its folded sections, the Slates Director panel), the Script page's Words or Words + shots and its text size, the Board's card size and linked clips, and on a desktop with the one-window layout the layout (Edit, Plan or one the user saved), its shape and which areas show. Only the fields you name change; the app clamps sizes, answers with what it settled on, and names any field it could not apply. A project change is applied alone (it restores that project's own view). Use it when the user asks you to show or open something, not to answer a question they can see for themselves.",
|
|
708
|
+
description: "Change what the user is looking at, as their own clicks would: open a project or go Home, switch tab, open a board, jump to a scene, set the Board's View and Filter, set Media's tab, folder and narrowing, jump to a card in Media, open a Library page, a picture in the picture viewer or a clip in the timeline's Viewer, Compare, Review mode (review, reviewAssetIds), the animatic or Settings on a pane, show or hide the prompt box, open or park the timeline or switch the cut on it, open a Shot's panel on Script, set the side panels (the project navigator and its folded sections, the Slates Director panel), the Script page's Words or Words + shots and its text size, the Board's card size and linked clips, and on a desktop with the one-window layout the layout (Edit, Plan or one the user saved), its shape and which areas show. Only the fields you name change; the app clamps sizes, answers with what it settled on, and names any field it could not apply. A project change is applied alone (it restores that project's own view). Use it when the user asks you to show or open something, not to answer a question they can see for themselves.",
|
|
691
709
|
input: z
|
|
692
710
|
.object({
|
|
693
711
|
projectId: z.string().nullable().optional().describe('Open this project, or null for Home. Applied alone.'),
|
|
@@ -777,6 +795,8 @@ export const setView = {
|
|
|
777
795
|
.object({ open: z.boolean().optional(), assetIds: z.array(z.string()).max(4).optional().describe('The compare set, two to four items.') })
|
|
778
796
|
.strict()
|
|
779
797
|
.optional(),
|
|
798
|
+
review: z.boolean().optional().describe("Review mode on or off, as the Viewer's Review button: on shows the Viewer with the Notes view in its drawer, where the person marks, rates and sends notes."),
|
|
799
|
+
reviewAssetIds: z.array(z.string()).nullable().optional().describe('With review on: the pictures and clips the arrow keys step through (a round to review); null steps through what is on screen. Turns review on.'),
|
|
780
800
|
animatic: z.object({ open: z.boolean(), fromShotId: z.string().optional() }).strict().optional().describe('Play the board as a rough cut from a Shot (the Board or Script tab must be showing).'),
|
|
781
801
|
settings: z.object({ open: z.boolean(), pane: z.enum(VIEW_SETTINGS_PANES).optional() }).strict().optional().describe('Open Settings, on a pane (ai is AI tools, keys is API keys).'),
|
|
782
802
|
composer: z.object({ open: z.boolean() }).strict().optional().describe('Show or hide the prompt box.'),
|
|
@@ -821,6 +841,8 @@ export const setView = {
|
|
|
821
841
|
if (input.cut?.format !== undefined || input.cut?.gridSelection !== undefined) {
|
|
822
842
|
await ctx.desktop().requireCapability('ad-variant-export', 'delivery preview and variant grid selection');
|
|
823
843
|
}
|
|
844
|
+
if (input.review !== undefined || input.reviewAssetIds !== undefined)
|
|
845
|
+
await ctx.desktop().requireCapability('view-review', 'Review mode');
|
|
824
846
|
// A desktop from before the one window has no capability token for it, and refuses a patch holding only
|
|
825
847
|
// `window` as empty; its view report has no `window`, so read that first.
|
|
826
848
|
if (input.window !== undefined && Object.entries(input).every(([k, v]) => k === 'window' || v === undefined)) {
|
|
@@ -6091,20 +6113,249 @@ const reframeClipInput = reframeReportInput.extend({ clipId: z.string().uuid(),
|
|
|
6091
6113
|
mode: z.enum(['fill', 'fit']).optional(), focusX: z.number().min(0).max(1).optional(),
|
|
6092
6114
|
focusY: z.number().min(0).max(1).optional(), zoom: z.number().min(1).optional(),
|
|
6093
6115
|
}).strict().nullable().optional().describe('Normalized focus and zoom for this clip/aspect. Null resets the override; the desktop binds it to the current take. Required unless follow is set.'),
|
|
6094
|
-
follow: z.enum(['face', 'off']).optional().describe('"face" finds the face in the clip and keys its focusX/focusY to it (smooth, held where the face is lost; every format draws those keys, each keyframe editable by hand or with slates_set_clip_keyframes); "off" removes those keys. Runs on the computer and spends nothing.') });
|
|
6116
|
+
follow: z.union([z.enum(['face', 'off']), z.object({ maskId: z.string().regex(/^[A-Za-z0-9_-]{1,80}$/) }).strict()]).optional().describe('"face" finds the face in the clip and keys its focusX/focusY to it (smooth, held where the face is lost; every format draws those keys, each keyframe editable by hand or with slates_set_clip_keyframes); { maskId } follows one of the clip\'s subject masks instead (slates_get_subject_mask lists them); "off" removes those keys. Runs on the computer and spends nothing.') });
|
|
6095
6117
|
export const reframeClip = {
|
|
6096
|
-
id: 'slates_reframe_clip', description: 'Set or reset a clip framing override for one delivery aspect and return the desktop computed framing report. Changes focus, fill/fit and zoom without duplicating the timeline or generating media. follow: "face" makes a vertical cut follow a talking head (framing, when sent too, lands first) and answers follow: the clip keyframes, samples, found, still and the lost spans in seconds. Requires ad-variant-export, and reframe-follow for follow; update Slates on capability refusal.',
|
|
6118
|
+
id: 'slates_reframe_clip', description: 'Set or reset a clip framing override for one delivery aspect and return the desktop computed framing report. Changes focus, fill/fit and zoom without duplicating the timeline or generating media. follow: "face" makes a vertical cut follow a talking head, or { maskId } a subject mask (framing, when sent too, lands first) and answers follow: the clip keyframes, samples, found, still and the lost spans in seconds. Requires ad-variant-export, and reframe-follow for follow; update Slates on capability refusal.',
|
|
6097
6119
|
billable: false,
|
|
6098
6120
|
input: reframeClipInput,
|
|
6099
6121
|
async run(input, ctx) {
|
|
6100
6122
|
await ctx.desktop().requireCapability('ad-variant-export', 'clip delivery reframing');
|
|
6101
6123
|
if (input.follow)
|
|
6102
6124
|
await ctx.desktop().requireCapability('reframe-follow', 'following a face');
|
|
6125
|
+
if (typeof input.follow === 'object')
|
|
6126
|
+
await ctx.desktop().requireCapability('subject-follow', 'following a subject mask');
|
|
6103
6127
|
else if (input.framing === undefined)
|
|
6104
6128
|
throw new Error('Send framing (null resets it) or follow');
|
|
6105
6129
|
return ok(await ctx.desktop().post('/agent/timeline/reframe', input));
|
|
6106
6130
|
},
|
|
6107
6131
|
};
|
|
6132
|
+
// ── The Cut's finishing tools and Review mode (slate roadmap Waves 1 to 3) ─────────────
|
|
6133
|
+
// Desktop routes in slate `src/main/agent/routes-finishing.ts`; each calls the core the window's own control
|
|
6134
|
+
// calls. A clip's grade, LUT, colour key, shape mask and reverse are fields on slates_update_clip.
|
|
6135
|
+
const clipTargetInput = {
|
|
6136
|
+
projectId: z.string().uuid(),
|
|
6137
|
+
clipId: z.string().uuid().describe('The clip on the timeline (slates_get_timeline lists them).'),
|
|
6138
|
+
};
|
|
6139
|
+
export const freezeFrame = {
|
|
6140
|
+
id: 'slates_freeze_frame',
|
|
6141
|
+
billable: false,
|
|
6142
|
+
description: "Hold one frame of a video clip as a still, as the Inspector's Freeze frame does: the frame at the timeline point named (frame, or sec) is saved as a new picture and placed on the clip's own lane for seconds (default 2), the clip splitting around it and everything after moving later; linked: false leaves the clip's linked sound where it is. Returns the clips written, stillClipId and stillAssetId. Free, on this machine. Requires freeze-frame; update Slates on capability refusal.",
|
|
6143
|
+
input: z.object({
|
|
6144
|
+
...clipTargetInput,
|
|
6145
|
+
frame: z.number().int().min(0).optional().describe('The timeline frame to hold. Or sec.'),
|
|
6146
|
+
sec: z.number().min(0).optional().describe('The timeline second to hold. Or frame.'),
|
|
6147
|
+
seconds: z.number().min(0.1).max(60).optional().describe('How long the still holds, 0.1 to 60 seconds. Default 2.'),
|
|
6148
|
+
linked: z.boolean().optional().describe("False: leave the linked sound in place. Default true."),
|
|
6149
|
+
}).strict(),
|
|
6150
|
+
async run(input, ctx) {
|
|
6151
|
+
if (input.frame === undefined && input.sec === undefined)
|
|
6152
|
+
throw new Error('Name the frame to hold: frame (timeline frames) or sec (timeline seconds).');
|
|
6153
|
+
await ctx.desktop().requireCapability('freeze-frame', 'freeze frame');
|
|
6154
|
+
return ok(await ctx.desktop().post('/agent/timeline/freeze-frame', input));
|
|
6155
|
+
},
|
|
6156
|
+
};
|
|
6157
|
+
export const stabilizeClip = {
|
|
6158
|
+
id: 'slates_stabilize_clip',
|
|
6159
|
+
billable: false,
|
|
6160
|
+
description: "Steady a shaky video clip, as the Inspector's Stabilize does: the file's motion is analysed on this machine and a steadied copy plays in its place (the original file is untouched). strength light keeps most of the move and crops least, strong holds the frame stillest and crops most; null turns it off. Takes about as long as the clip runs. Free. Requires stabilize; update Slates on capability refusal.",
|
|
6161
|
+
input: z.object({
|
|
6162
|
+
...clipTargetInput,
|
|
6163
|
+
strength: z.enum(['light', 'standard', 'strong']).nullable().describe('How steady; null turns stabilize off.'),
|
|
6164
|
+
}).strict(),
|
|
6165
|
+
async run(input, ctx) {
|
|
6166
|
+
await ctx.desktop().requireCapability('stabilize', 'stabilize');
|
|
6167
|
+
return ok(await ctx.desktop().post('/agent/timeline/stabilize', input));
|
|
6168
|
+
},
|
|
6169
|
+
};
|
|
6170
|
+
export const slideClip = {
|
|
6171
|
+
id: 'slates_slide_clip',
|
|
6172
|
+
billable: false,
|
|
6173
|
+
description: "Slide a clip between its neighbours, as the Slide tool does: the clip keeps its own content and length and moves deltaFrames later (or earlier, negative), the clip before it growing and the one after shrinking to fill, so nothing else on the timeline moves. Needs a clip touching each side; held to the media each neighbour has. Returns the clips written and slidFrames, the move made. Free. Requires slide-edit; update Slates on capability refusal.",
|
|
6174
|
+
input: z.object({
|
|
6175
|
+
...clipTargetInput,
|
|
6176
|
+
deltaFrames: z.number().int().describe('Frames to move: positive later, negative earlier.'),
|
|
6177
|
+
}).strict(),
|
|
6178
|
+
async run(input, ctx) {
|
|
6179
|
+
await ctx.desktop().requireCapability('slide-edit', 'slide edit');
|
|
6180
|
+
return ok(await ctx.desktop().post('/agent/timeline/slide-clip', input));
|
|
6181
|
+
},
|
|
6182
|
+
};
|
|
6183
|
+
export const punchIn = {
|
|
6184
|
+
id: 'slates_punch_in',
|
|
6185
|
+
billable: false,
|
|
6186
|
+
description: "Punch in on a video clip or picture, as the Inspector's Punch in does: scale and position keys that push in about the subject (its framing focus). From a point: fromFrame (frames from the clip's start, default 0) to the clip's end. On emphasis words: words (indexes into slates_get_asset_transcript's words) each punch in on the word and back out holdSec after it (default about half a second). style: cut (a hard punch), ease-in, slow-push. amount is the scale, above 1 and at most 1.5 (default 1.15). off: true takes the punch away. A clip with hand-set scale or position keys is refused unless replaceKeys: true. Returns the clip's keyframes and the punch read back. Every key stays editable with slates_set_clip_keyframes. Free. Requires punch-in; update Slates on capability refusal.",
|
|
6187
|
+
input: z.object({
|
|
6188
|
+
...clipTargetInput,
|
|
6189
|
+
amount: z.number().gt(1).max(1.5).optional().describe('The scale, above 1 and at most 1.5. Default 1.15.'),
|
|
6190
|
+
style: z.enum(['cut', 'ease-in', 'slow-push']).optional(),
|
|
6191
|
+
fromFrame: z.number().int().min(0).optional().describe("Where the punch starts, in frames from the clip's start."),
|
|
6192
|
+
words: z.array(z.number().int().min(0)).min(1).optional().describe("Punch on these words, by index in the clip's transcript words."),
|
|
6193
|
+
holdSec: z.number().min(0).max(5).optional().describe('With words: how long each punch holds past its word, 0 to 5 seconds.'),
|
|
6194
|
+
off: z.boolean().optional().describe('True removes the punch in.'),
|
|
6195
|
+
replaceKeys: z.boolean().optional().describe("True puts the punch in place of the clip's own scale and position keys."),
|
|
6196
|
+
}).strict(),
|
|
6197
|
+
async run(input, ctx) {
|
|
6198
|
+
await ctx.desktop().requireCapability('punch-in', 'punch in');
|
|
6199
|
+
return ok(await ctx.desktop().post('/agent/timeline/punch-in', input));
|
|
6200
|
+
},
|
|
6201
|
+
};
|
|
6202
|
+
const dialogueCleanupOptions = z.object({
|
|
6203
|
+
fillers: z.boolean().optional().describe('Filler words (um, uh, like as a filler). Default on.'),
|
|
6204
|
+
pauses: z.boolean().optional().describe('Long pauses. Default on.'),
|
|
6205
|
+
repeats: z.boolean().optional().describe('A word or phrase said twice in a row: the first goes. Default on.'),
|
|
6206
|
+
minPauseSec: z.number().min(0).optional().describe('A pause counts from this long.'),
|
|
6207
|
+
keepAirSec: z.number().min(0).optional().describe('Air kept at each side of a cut pause.'),
|
|
6208
|
+
}).strict();
|
|
6209
|
+
export const cleanUpDialogue = {
|
|
6210
|
+
id: 'slates_clean_up_dialogue',
|
|
6211
|
+
billable: false,
|
|
6212
|
+
description: "Clean up a talking clip by its transcript, as the Transcript page's Clean up does. scan (default, writes nothing) lists the fillers, long pauses and repeated words found, with counts, the top fillers, what apply would cut and the joins an earlier clean-up left. apply cuts them all in one edit (ripple; the linked sound and captions follow unless linked: false) and lists each join. restore puts one join's cut back (range, as scan or apply listed it); nudge moves the clip edge at a join (edge start or end) by deltaFrames. options turns each kind on or off and sets the pause length and the air kept. The clip needs a transcript (slates_transcribe_asset, free). For words picked one by one, slates_cut_by_transcript. Free. Requires dialogue-cleanup; update Slates on capability refusal.",
|
|
6213
|
+
input: z.object({
|
|
6214
|
+
...clipTargetInput,
|
|
6215
|
+
action: z.enum(['scan', 'apply', 'restore', 'nudge']).optional().describe('Default scan.'),
|
|
6216
|
+
options: dialogueCleanupOptions.optional(),
|
|
6217
|
+
range: z.object({ startSec: z.number().min(0), endSec: z.number().min(0) }).strict().optional().describe("restore: the join's range, in the file's own seconds."),
|
|
6218
|
+
edge: z.enum(['start', 'end']).optional().describe('nudge: start (where the cut begins) or end (where it stops).'),
|
|
6219
|
+
deltaFrames: z.number().int().optional().describe('nudge: frames to move the edge, positive later.'),
|
|
6220
|
+
linked: z.boolean().optional().describe("False: cut only the clip's lane. Default true."),
|
|
6221
|
+
}).strict(),
|
|
6222
|
+
async run(input, ctx) {
|
|
6223
|
+
if (input.action === 'restore' && !input.range)
|
|
6224
|
+
throw new Error('restore needs range: a join as scan or apply listed it.');
|
|
6225
|
+
if (input.action === 'nudge' && (!input.edge || input.deltaFrames === undefined))
|
|
6226
|
+
throw new Error('nudge needs edge and deltaFrames.');
|
|
6227
|
+
await ctx.desktop().requireCapability('dialogue-cleanup', 'dialogue clean-up');
|
|
6228
|
+
return ok(await ctx.desktop().post('/agent/timeline/dialogue-cleanup', input));
|
|
6229
|
+
},
|
|
6230
|
+
};
|
|
6231
|
+
export const autoColourClip = {
|
|
6232
|
+
id: 'slates_auto_colour_clip',
|
|
6233
|
+
billable: false,
|
|
6234
|
+
description: "Give a video clip or picture a neutral grade from its own frame, as the Inspector's Auto colour does: the frame at frame or sec (default the clip's middle) is read, and exposure, contrast, temperature, tint, highlights and shadows are written to the clip's look as ordinary values (other look fields kept), each editable with slates_update_clip. Returns the values, the look and the frame read. Free, on this machine. Requires clip-grade; update Slates on capability refusal.",
|
|
6235
|
+
input: z.object({
|
|
6236
|
+
...clipTargetInput,
|
|
6237
|
+
frame: z.number().int().min(0).optional().describe('The timeline frame to read.'),
|
|
6238
|
+
sec: z.number().min(0).optional().describe('The timeline second to read.'),
|
|
6239
|
+
}).strict(),
|
|
6240
|
+
async run(input, ctx) {
|
|
6241
|
+
await ctx.desktop().requireCapability('clip-grade', 'auto colour');
|
|
6242
|
+
return ok(await ctx.desktop().post('/agent/timeline/auto-colour', input));
|
|
6243
|
+
},
|
|
6244
|
+
};
|
|
6245
|
+
export const autoDuck = {
|
|
6246
|
+
id: 'slates_auto_duck',
|
|
6247
|
+
billable: false,
|
|
6248
|
+
description: "Dip music under speech, as the lane's Auto duck does: a music lane (trackId) or one clip (clipId) drops by duckDb wherever another lane speaks, read from the transcripts (a clip with no transcript counts as speech for its whole sound). attackSec and releaseSec shape the dip, holdSec keeps it down past each word, bridgeSec joins gaps shorter than that. Written as one effect on the lane or clip, redone on each call; off: true takes it away. Returns dips, the number of dips. Transcribe the voice first for word-tight dips (slates_transcribe_asset, free). Free. Requires audio-suite; update Slates on capability refusal.",
|
|
6249
|
+
input: z.object({
|
|
6250
|
+
projectId: z.string().uuid(),
|
|
6251
|
+
trackId: z.string().min(1).optional().describe('The music lane. Or clipId.'),
|
|
6252
|
+
clipId: z.string().uuid().optional().describe('One clip. Or trackId.'),
|
|
6253
|
+
duckDb: z.number().min(-40).max(0).optional().describe('The dip in dB, -40 to 0. Default -12.'),
|
|
6254
|
+
attackSec: z.number().min(0).max(10).optional().describe('How fast it dips. Default 0.15.'),
|
|
6255
|
+
releaseSec: z.number().min(0).max(10).optional().describe('How fast it comes back. Default 0.3.'),
|
|
6256
|
+
holdSec: z.number().min(0).max(10).optional().describe('How long it stays down past a word. Default 0.1.'),
|
|
6257
|
+
bridgeSec: z.number().min(0).max(10).optional().describe('Gaps in speech shorter than this stay ducked. Default 0.6.'),
|
|
6258
|
+
off: z.boolean().optional().describe('True removes the auto duck.'),
|
|
6259
|
+
}).strict(),
|
|
6260
|
+
async run(input, ctx) {
|
|
6261
|
+
if ((input.trackId === undefined) === (input.clipId === undefined))
|
|
6262
|
+
throw new Error('Name trackId (a lane) or clipId (one clip), not both.');
|
|
6263
|
+
await ctx.desktop().requireCapability('audio-suite', 'auto duck');
|
|
6264
|
+
return ok(await ctx.desktop().post('/agent/timeline/auto-duck', input));
|
|
6265
|
+
},
|
|
6266
|
+
};
|
|
6267
|
+
export const matchLoudness = {
|
|
6268
|
+
id: 'slates_match_loudness',
|
|
6269
|
+
billable: false,
|
|
6270
|
+
description: "Bring a mix or one lane to -14 LUFS, the level social platforms play at, as the Output level popover's Match does: the sound is measured as the export writes it, then one gain is set on the master (or on the lane, with trackId) to land on -14 LUFS integrated under a -1 dBTP true peak (held lower when the peak would pass it). Redone on each call. Returns the target, what was measured, the gain set and the effects. Measure without changing anything with slates_get_timeline_loudness. Free. Requires audio-suite; update Slates on capability refusal.",
|
|
6271
|
+
input: z.object({
|
|
6272
|
+
projectId: z.string().uuid(),
|
|
6273
|
+
timelineId: z.string().uuid().optional().describe("The cut; absent: the project's default timeline."),
|
|
6274
|
+
trackId: z.string().min(1).optional().describe('Match this lane alone; absent: the whole mix, on the master.'),
|
|
6275
|
+
}).strict(),
|
|
6276
|
+
async run(input, ctx) {
|
|
6277
|
+
const desktop = ctx.desktop();
|
|
6278
|
+
await desktop.requireCapability('audio-suite', 'loudness match');
|
|
6279
|
+
await requireNamedCut(desktop, input.timelineId);
|
|
6280
|
+
return ok(await desktop.post('/agent/timeline/match-loudness', input));
|
|
6281
|
+
},
|
|
6282
|
+
};
|
|
6283
|
+
export const upscaleImage = {
|
|
6284
|
+
id: 'slates_upscale_image',
|
|
6285
|
+
billable: true,
|
|
6286
|
+
description: "Make a sharper copy of a picture at 2x or 4x its size, as the picture viewer's Upscale does: faithful (no new content), saved as a new picture beside the original, which is untouched. Priced by the picture's size; a picture that would pass 144 megapixels at 4x is refused (try 2x). " +
|
|
6287
|
+
CONFIRM_GATE_SENTENCE +
|
|
6288
|
+
' Supply a new UUID requestId once per intended upscale and reuse it for a retry: the same id never pays twice (a retry waits for the same run, or returns its picture). Returns the new picture (id, code, file, size) and cost_credits spent. Requires image-upscale; update Slates on capability refusal.',
|
|
6289
|
+
input: z.object({
|
|
6290
|
+
projectId: z.string().uuid(),
|
|
6291
|
+
assetId: z.string().min(1).describe('The picture: its code (IMG-A4) or id.'),
|
|
6292
|
+
factor: z.union([z.literal(2), z.literal(4)]).describe('2 or 4 times the size.'),
|
|
6293
|
+
confirm: z.boolean().optional().describe(CONFIRM_PARAM),
|
|
6294
|
+
requestId: z.string().uuid().optional().describe('A new UUID per intended upscale; the same one on a retry. Absent: one is made for this call.'),
|
|
6295
|
+
}).strict(),
|
|
6296
|
+
async run(input, ctx) {
|
|
6297
|
+
const desktop = ctx.desktop();
|
|
6298
|
+
await desktop.requireCapability('image-upscale', 'picture upscale');
|
|
6299
|
+
const id = (await resolveAssetRefs(ctx, input.projectId, [input.assetId])).get(input.assetId).id;
|
|
6300
|
+
const quote = await desktop.get('/agent/generation/upscale-quote', { projectId: input.projectId, assetId: id, factor: String(input.factor) });
|
|
6301
|
+
if (quote.credits === null)
|
|
6302
|
+
throw new Error(quote.refused ?? 'This picture cannot be upscaled at that size.');
|
|
6303
|
+
const name = quote.code ?? id;
|
|
6304
|
+
const size = `${quote.width}x${quote.height} to ${quote.outWidth}x${quote.outHeight}`;
|
|
6305
|
+
if (quote.credits > CONFIRM_CREDITS && !input.confirm) {
|
|
6306
|
+
return ok({
|
|
6307
|
+
requires_confirm: true, estimated_credits: quote.credits, estimated_cents: quote.credits, factor: quote.factor,
|
|
6308
|
+
width: quote.width, height: quote.height, outWidth: quote.outWidth, outHeight: quote.outHeight,
|
|
6309
|
+
message: `Cost: ${fmtCredits(quote.credits)} to upscale ${name} ${quote.factor}x (${size}). Re-call with confirm=true after the user explicitly OKs the spend.`,
|
|
6310
|
+
});
|
|
6311
|
+
}
|
|
6312
|
+
const requestId = input.requestId ?? randomUUID();
|
|
6313
|
+
const r = await desktop.post('/agent/generation/upscale-image', { projectId: input.projectId, assetId: id, factor: input.factor, expectedCredits: quote.credits, requestId });
|
|
6314
|
+
if (!r.asset)
|
|
6315
|
+
return ok({ ...r, requestId }, `The upscale of ${name} under this requestId is still running; check slates_get_generation_status with ${r.generationId ?? requestId}. Do not start it again with a new requestId.`);
|
|
6316
|
+
const spent = r.cost_credits ?? r.credits ?? quote.credits;
|
|
6317
|
+
return ok({ ...r, cost_credits: spent, requestId }, `Upscaled ${name} ${quote.factor}x (${size}) into ${r.asset.code ?? r.asset.id} for ${fmtCredits(spent)}.`);
|
|
6318
|
+
},
|
|
6319
|
+
};
|
|
6320
|
+
export const getReviewPacket = {
|
|
6321
|
+
id: 'slates_get_review_packet',
|
|
6322
|
+
description: "Read the notes the person sent from Review mode (the Viewer's Review button): each note with its number, its words or a wordless mark (mark: true, no words: 'this is off'), what it points at (a picture region, a clip span, a transition, a transcript join) with a still, its thread, and the ratings changed since (stars, favourite, rejected, redo, more like this). By default the oldest packet the person sent and nobody has read; include: open reads notes and ratings not yet sent; include: all reads every note and rating in the project, with the packets they were sent in, and claims nothing. Reading a sent packet claims it, so the person sees it was picked up (claim: false only peeks). Answer each note with slates_resolve_review_note. null with a reason when nothing waits. Free. Requires review-mode; update Slates on capability refusal.",
|
|
6323
|
+
input: z.object({
|
|
6324
|
+
projectId: z.string().uuid(),
|
|
6325
|
+
packetId: z.string().min(1).optional().describe('One packet by id; absent: the oldest unread.'),
|
|
6326
|
+
include: z.enum(['sent', 'open', 'all']).optional().describe('sent (default): a packet the person sent. open: unsent notes and ratings. all: every note and rating, with its packets; never claims.'),
|
|
6327
|
+
claim: z.boolean().optional().describe('False reads without claiming. Default true for a sent packet.'),
|
|
6328
|
+
}).strict(),
|
|
6329
|
+
async run(input, ctx) {
|
|
6330
|
+
await ctx.desktop().requireCapability('review-mode', 'Review mode');
|
|
6331
|
+
return ok(await ctx.desktop().get('/agent/review/packet', {
|
|
6332
|
+
projectId: input.projectId,
|
|
6333
|
+
...(input.packetId ? { packetId: input.packetId } : {}),
|
|
6334
|
+
...(input.include ? { include: input.include } : {}),
|
|
6335
|
+
...(input.claim !== undefined ? { claim: String(input.claim) } : {}),
|
|
6336
|
+
}));
|
|
6337
|
+
},
|
|
6338
|
+
};
|
|
6339
|
+
export const resolveReviewNote = {
|
|
6340
|
+
id: 'slates_resolve_review_note',
|
|
6341
|
+
description: "Answer the person's review notes, on the note where it was pinned, as the Notes view shows it. One reply per note: fixed (done; text optional), question (ask what they meant), why_not (why it stays as is), alternates (two or three takes to choose from, assetIds), note (anything else). A wordless mark (mark: true with no words) is answered with alternates, two or three versions, never one guess, unless the person has since written in its thread. Only a sent note can be answered (not one still being written, nor one already answered or done); alternates are two or three different pictures or clips; every take is in this project. Returns each note's new state and how many in its packet still wait. Free. Requires review-mode; update Slates on capability refusal.",
|
|
6342
|
+
input: z.object({
|
|
6343
|
+
projectId: z.string().uuid(),
|
|
6344
|
+
replies: z.array(z.object({
|
|
6345
|
+
noteId: z.string().min(1),
|
|
6346
|
+
kind: z.enum(['fixed', 'question', 'why_not', 'alternates', 'note']),
|
|
6347
|
+
text: z.string().max(4000).optional().describe('The answer. Needed for question, why_not and note.'),
|
|
6348
|
+
assetIds: z.array(z.string().min(1)).max(3).optional().describe('alternates: two or three takes, codes or ids. fixed: the take that fixes it.'),
|
|
6349
|
+
}).strict()).min(1),
|
|
6350
|
+
}).strict(),
|
|
6351
|
+
async run(input, ctx) {
|
|
6352
|
+
await ctx.desktop().requireCapability('review-mode', 'Review mode');
|
|
6353
|
+
const refs = [...new Set(input.replies.flatMap((r) => r.assetIds ?? []))];
|
|
6354
|
+
const resolved = refs.length ? await resolveAssetRefs(ctx, input.projectId, refs) : new Map();
|
|
6355
|
+
const replies = input.replies.map((r) => (r.assetIds ? { ...r, assetIds: r.assetIds.map((a) => resolved.get(a).id) } : r));
|
|
6356
|
+
return ok(await ctx.desktop().post('/agent/review/resolve', { projectId: input.projectId, replies }));
|
|
6357
|
+
},
|
|
6358
|
+
};
|
|
6108
6359
|
export const listTimelines = {
|
|
6109
6360
|
id: 'slates_list_timelines', description: "List the independent named cuts in a project (not a slot's alternative timelines: slates_get_variants names those). Use the selected timelineId for edits, builds and exports.",
|
|
6110
6361
|
input: z.object({ projectId: z.string().uuid() }),
|
|
@@ -6121,6 +6372,7 @@ export const saveTimeline = {
|
|
|
6121
6372
|
if (input.delivery !== undefined || input.taxonomy !== undefined || input.gridBinding !== undefined) {
|
|
6122
6373
|
await ctx.desktop().requireCapability('ad-variant-export', 'cut delivery, naming and grid bindings');
|
|
6123
6374
|
}
|
|
6375
|
+
await requireDeliveryEncoding(ctx.desktop(), input.delivery);
|
|
6124
6376
|
return ok(await ctx.desktop().post('/agent/timelines', input));
|
|
6125
6377
|
},
|
|
6126
6378
|
};
|
|
@@ -6445,7 +6697,7 @@ const audioEffectList = z
|
|
|
6445
6697
|
.array(z
|
|
6446
6698
|
.object({
|
|
6447
6699
|
id: z.string().max(64).optional().describe('Kept when sent back; a new effect gets one.'),
|
|
6448
|
-
type: z.enum(['volume', 'eq']).describe("volume: gain in dB (param gainDb, -60 silent to +12). eq: ten bands in this order: a high-pass, a low shelf, six bells, a high shelf, a low-pass; send the ones it plays as bands. An older eq's 'lowpass.frequency' and 'lowpass.q' read as the low-pass at 12 dB."),
|
|
6700
|
+
type: z.enum(['volume', 'eq', 'denoise', 'voice_enhance']).describe("volume: gain in dB (param gainDb, -60 silent to +12). eq: ten bands in this order: a high-pass, a low shelf, six bells, a high shelf, a low-pass; send the ones it plays as bands. An older eq's 'lowpass.frequency' and 'lowpass.q' read as the low-pass at 12 dB. denoise: pushes the noise between words down (amount 0 to 1, floorDb -48 to -12). voice_enhance: a broadcast voice chain, EQ and levelling (amount 0 to 1)."),
|
|
6449
6701
|
bypass: z.boolean().optional(),
|
|
6450
6702
|
params: z.record(z.number()).optional().describe("Fixed values by parameter name ('gainDb'; an eq's '<band>.<name>', as 'bell3.gain' or 'highpass.slope')."),
|
|
6451
6703
|
keyframes: z.record(keyframeKeys.max(4000)).optional().describe('Keys by parameter name; a keyed parameter reads its keys instead of its fixed value.'),
|
|
@@ -6453,6 +6705,8 @@ const audioEffectList = z
|
|
|
6453
6705
|
})
|
|
6454
6706
|
.strict())
|
|
6455
6707
|
.max(16);
|
|
6708
|
+
/** True when an effect list holds a voice cleaner (denoise, voice_enhance), which an older desktop refuses. */
|
|
6709
|
+
const usesVoiceCleaners = (effects) => (effects ?? []).some((e) => e.type === 'denoise' || e.type === 'voice_enhance');
|
|
6456
6710
|
/** True when an effect list uses the ten-band EQ: a band list, or a parameter an older desktop does not know. */
|
|
6457
6711
|
function usesEqBands(effects) {
|
|
6458
6712
|
const legacy = new Set(['lowpass.frequency', 'lowpass.q']);
|
|
@@ -6463,6 +6717,8 @@ function usesEqBands(effects) {
|
|
|
6463
6717
|
async function requireEqBands(desktop, effects) {
|
|
6464
6718
|
if (usesEqBands(effects))
|
|
6465
6719
|
await desktop.requireCapability('eq-bands', 'the ten-band EQ');
|
|
6720
|
+
if (usesVoiceCleaners(effects))
|
|
6721
|
+
await desktop.requireCapability('audio-suite', 'denoise and voice enhance');
|
|
6466
6722
|
}
|
|
6467
6723
|
/** A clip's panel (slate's `src/shared/clipPanel.ts`): lengths in fractions of the frame's height. */
|
|
6468
6724
|
const clipPanel = z.object({
|
|
@@ -6480,9 +6736,53 @@ const clipPanel = z.object({
|
|
|
6480
6736
|
color: z.string().regex(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/).optional().describe('#rrggbb; default white.'),
|
|
6481
6737
|
}).strict().optional().describe('Present is on: {} is the default border.'),
|
|
6482
6738
|
}).strict();
|
|
6739
|
+
/** A clip's look (slate's `src/shared/clipLook.ts`): blend, grain, colour, exposure, the grade and a LUT. */
|
|
6740
|
+
const GRADE_DESCRIBE = '-1 to 1; 0 is as shot.';
|
|
6741
|
+
const clipLookInput = z.object({
|
|
6742
|
+
blend: z.enum(['normal', 'multiply', 'screen', 'overlay', 'soft-light']).optional(),
|
|
6743
|
+
grain: z.number().min(0).max(1).optional(),
|
|
6744
|
+
saturation: z.number().min(0).max(2).optional(),
|
|
6745
|
+
exposure: z.number().min(-4).max(4).optional().describe('Stops of light: 1 is twice as bright, -1 half.'),
|
|
6746
|
+
contrast: z.number().min(-1).max(1).optional().describe(`Flat (-1) to punchy (1). ${GRADE_DESCRIBE}`),
|
|
6747
|
+
temperature: z.number().min(-1).max(1).optional().describe(`Cool blue (-1) to warm amber (1). ${GRADE_DESCRIBE}`),
|
|
6748
|
+
tint: z.number().min(-1).max(1).optional().describe(`Green (-1) to magenta (1). ${GRADE_DESCRIBE}`),
|
|
6749
|
+
highlights: z.number().min(-1).max(1).optional().describe(`Pulls the bright parts down (-1) or lifts them (1). ${GRADE_DESCRIBE}`),
|
|
6750
|
+
shadows: z.number().min(-1).max(1).optional().describe(`Crushes the dark parts (-1) or opens them (1). ${GRADE_DESCRIBE}`),
|
|
6751
|
+
lutPath: localFile('lutPath', ['cube']).optional().describe('A 3D LUT (.cube) laid on after the grade, by its absolute path; the app copies it into the project.'),
|
|
6752
|
+
lutIntensity: z.number().min(0).max(1).optional().describe('How much of the LUT shows, 0 to 1 (default 1).'),
|
|
6753
|
+
}).strict();
|
|
6754
|
+
const GRADE_FIELDS = ['contrast', 'temperature', 'tint', 'highlights', 'shadows', 'lutPath', 'lutIntensity'];
|
|
6755
|
+
/** A clip's matte (slate's `src/shared/clipMatte.ts`): a subject mask, a shape, or a colour key. One kind at a time. */
|
|
6756
|
+
const clipMatteInput = z.union([
|
|
6757
|
+
z.object({
|
|
6758
|
+
maskId: z.string().regex(/^[A-Za-z0-9_-]{1,80}$/).describe("One of the clip's own media's subject masks."),
|
|
6759
|
+
mode: z.enum(['subject', 'background']).optional().describe('subject (default) draws only the subject; background everything but it.'),
|
|
6760
|
+
feather: z.number().min(0).max(1).optional().describe('How soft the edge is: 0 as made, 1 softened over about 3% of the picture height. Default 0.'),
|
|
6761
|
+
}).strict(),
|
|
6762
|
+
z.object({
|
|
6763
|
+
shape: z.object({
|
|
6764
|
+
kind: z.enum(['rect', 'ellipse']),
|
|
6765
|
+
x: z.number().min(0).max(1).describe('Centre, 0 left to 1 right.'),
|
|
6766
|
+
y: z.number().min(0).max(1).describe('Centre, 0 top to 1 bottom.'),
|
|
6767
|
+
w: z.number().min(0.01).max(2).describe("Width as a fraction of the picture's."),
|
|
6768
|
+
h: z.number().min(0.01).max(2).describe("Height as a fraction of the picture's."),
|
|
6769
|
+
rotation: z.number().min(-180).max(180).optional().describe('Degrees clockwise.'),
|
|
6770
|
+
feather: z.number().min(0).max(1).optional().describe('0 crisp to 1 soft.'),
|
|
6771
|
+
invert: z.boolean().optional().describe('Draw what is outside the shape instead.'),
|
|
6772
|
+
}).strict(),
|
|
6773
|
+
}).strict(),
|
|
6774
|
+
z.object({
|
|
6775
|
+
chroma: z.object({
|
|
6776
|
+
color: z.string().regex(/^#[0-9a-fA-F]{6}$/).describe("The screen's colour, #rrggbb (#00ff00 green, #0000ff blue)."),
|
|
6777
|
+
tolerance: z.number().min(0).max(1).describe('How far from the colour still keys out; 0.35 is a good start.'),
|
|
6778
|
+
softness: z.number().min(0).max(1).describe('Width of the soft edge; 0.2 is a good start.'),
|
|
6779
|
+
spill: z.number().min(0).max(1).optional().describe("How much of the screen's colour is pulled off the subject."),
|
|
6780
|
+
}).strict(),
|
|
6781
|
+
}).strict(),
|
|
6782
|
+
]);
|
|
6483
6783
|
export const updateClip = {
|
|
6484
6784
|
id: 'slates_update_clip',
|
|
6485
|
-
description: "Set a timeline clip's own speed, volume, split edit (J-cut or L-cut) and fades, as the Cut's Inspector does. Only the fields you name change; null puts one back to the default. speed keeps the clip's media in and out points and its start and changes its length (2 is twice as fast, half as long); with ripple: true the lane's later clips move by the change, otherwise a longer clip covers what follows. audioOffsetFrames, on a video clip, moves its own sound against its picture in sync: below 0 is a J-cut (the sound starts first), above 0 an L-cut (it runs on). Fades are frames: fadeIn/fadeOut for the picture, audioFadeIn/audioFadeOut for the sound. volume is linear gain (1 = 0 dB, 0 = silent). look, on a clip with a picture, is the Inspector's Blend, Grain, Colour and Exposure, sent whole: blend mixes the picture with what is under it (multiply darkens, screen lightens, overlay and soft-light add contrast), grain is film grain from 0 to 1, saturation is colour from 0 (black and white) through 1 (as shot) to 2, exposure is stops of light from -4 to 4 (1 twice as bright); null clears the look. matte draws a video clip through one of its subject masks (slates_get_subject_mask lists them): mode subject draws only the subject, background everything but it, feather softens the edge from 0 to 1; lay a matted copy over the clip and put a title on a lane between them (slates_update_timeline_track above or below) to put the title behind the subject. space turns any picture clip in 3D about its centre: pitch leans the top away (degrees, -85 to 85), yaw turns the right edge away (-85 to 85), perspective 0 flat to 1 very wide (0.5 a normal lens). panel makes it a floating panel: radius rounds the corners, shadow puts a soft shadow under it, border a line just inside its edge; lengths are fractions of the frame's height (0.02 is about 22 px at 1080p). blur is a lens blur, amount 0 sharp to 1 (a point spreads over 5% of the frame's height), with a maskId to blur only around the subject and keep it sharp. Each of matte, space, panel and blur is sent whole and null clears it; their amounts can be keyed with slates_set_clip_keyframes. effects is the clip's sound effects, sent whole, in order: a volume (gain in dB) and an eq (up to ten bands: high- and low-pass cuts at 6 to 48 dB per octave, shelves, bells, a notch, a band-pass), each value fixed or keyed in frames from the clip's start, the same in preview and export. speedRamp keys the speed over the clip (a slow-motion ramp): media in and out stay, the length becomes what the keys take, and the sound follows tape-style; not with speed. speedSound 'tape' makes a constant speed's sound change pitch with it. On an audio lane, startSec, sourceInSec and sourceOutSec (or sourceInSample and sourceOutSample) set where its sound starts and its media in and out to the sample, for a music edit between frames; a longer clip covers what follows unless ripple; not with speed in the same call.",
|
|
6785
|
+
description: "Set a timeline clip's own speed, volume, split edit (J-cut or L-cut) and fades, as the Cut's Inspector does. Only the fields you name change; null puts one back to the default. speed keeps the clip's media in and out points and its start and changes its length (2 is twice as fast, half as long); with ripple: true the lane's later clips move by the change, otherwise a longer clip covers what follows. audioOffsetFrames, on a video clip, moves its own sound against its picture in sync: below 0 is a J-cut (the sound starts first), above 0 an L-cut (it runs on). Fades are frames: fadeIn/fadeOut for the picture, audioFadeIn/audioFadeOut for the sound. volume is linear gain (1 = 0 dB, 0 = silent). look, on a clip with a picture, is the Inspector's Blend, Grain, Colour and Exposure, sent whole: blend mixes the picture with what is under it (multiply darkens, screen lightens, overlay and soft-light add contrast), grain is film grain from 0 to 1, saturation is colour from 0 (black and white) through 1 (as shot) to 2, exposure is stops of light from -4 to 4 (1 twice as bright); null clears the look. matte draws a video clip through one of its subject masks (slates_get_subject_mask lists them): mode subject draws only the subject, background everything but it, feather softens the edge from 0 to 1; lay a matted copy over the clip and put a title on a lane between them (slates_update_timeline_track above or below) to put the title behind the subject. space turns any picture clip in 3D about its centre: pitch leans the top away (degrees, -85 to 85), yaw turns the right edge away (-85 to 85), perspective 0 flat to 1 very wide (0.5 a normal lens). panel makes it a floating panel: radius rounds the corners, shadow puts a soft shadow under it, border a line just inside its edge; lengths are fractions of the frame's height (0.02 is about 22 px at 1080p). blur is a lens blur, amount 0 sharp to 1 (a point spreads over 5% of the frame's height), with a maskId to blur only around the subject and keep it sharp. look also takes a grade and a .cube LUT, matte a shape mask or a colour key, and reversed plays it backward (each field says how). Each of matte, space, panel and blur is sent whole and null clears it; their amounts can be keyed with slates_set_clip_keyframes. effects is the clip's sound effects, sent whole, in order: a volume (gain in dB) and an eq (up to ten bands: high- and low-pass cuts at 6 to 48 dB per octave, shelves, bells, a notch, a band-pass), each value fixed or keyed in frames from the clip's start, the same in preview and export. speedRamp keys the speed over the clip (a slow-motion ramp): media in and out stay, the length becomes what the keys take, and the sound follows tape-style; not with speed. speedSound 'tape' makes a constant speed's sound change pitch with it. On an audio lane, startSec, sourceInSec and sourceOutSec (or sourceInSample and sourceOutSample) set where its sound starts and its media in and out to the sample, for a music edit between frames; a longer clip covers what follows unless ripple; not with speed in the same call.",
|
|
6486
6786
|
input: z.object({
|
|
6487
6787
|
projectId: z.string().uuid(),
|
|
6488
6788
|
clipId: z.string().uuid(),
|
|
@@ -6493,17 +6793,9 @@ export const updateClip = {
|
|
|
6493
6793
|
fadeOutFrames: z.number().int().min(0).nullable().optional(),
|
|
6494
6794
|
audioFadeInFrames: z.number().int().min(0).nullable().optional(),
|
|
6495
6795
|
audioFadeOutFrames: z.number().int().min(0).nullable().optional(),
|
|
6496
|
-
look:
|
|
6497
|
-
|
|
6498
|
-
|
|
6499
|
-
saturation: z.number().min(0).max(2).optional(),
|
|
6500
|
-
exposure: z.number().min(-4).max(4).optional().describe('Stops of light: 1 is twice as bright, -1 half.'),
|
|
6501
|
-
}).strict().nullable().optional().describe('The whole look, at least one field; a field left out is its default (normal, no grain, colour 1, exposure 0). null clears it.'),
|
|
6502
|
-
matte: z.object({
|
|
6503
|
-
maskId: z.string().regex(/^[A-Za-z0-9_-]{1,80}$/).describe("One of the clip's own media's subject masks."),
|
|
6504
|
-
mode: z.enum(['subject', 'background']).optional().describe('subject (default) draws only the subject; background everything but it.'),
|
|
6505
|
-
feather: z.number().min(0).max(1).optional().describe('How soft the edge is: 0 as made, 1 softened over about 3% of the picture height. Default 0.'),
|
|
6506
|
-
}).strict().nullable().optional().describe('A video clip drawn through a subject mask; null draws the whole picture.'),
|
|
6796
|
+
look: clipLookInput.nullable().optional().describe('The whole look, at least one field; a field left out is its default (normal, no grain, colour 1, exposure 0, no grade, no LUT). null clears it.'),
|
|
6797
|
+
matte: clipMatteInput.nullable().optional().describe('A subject mask ({ maskId }), a shape ({ shape }) or a colour key ({ chroma }); null draws the whole picture.'),
|
|
6798
|
+
reversed: z.boolean().nullable().optional().describe("true plays the clip's media backward (its linked sound too); false or null forward."),
|
|
6507
6799
|
space: z.object({
|
|
6508
6800
|
pitch: z.number().min(-85).max(85).optional().describe('Degrees; positive leans the top away.'),
|
|
6509
6801
|
yaw: z.number().min(-85).max(85).optional().describe('Degrees; positive turns the right edge away.'),
|
|
@@ -6532,7 +6824,11 @@ export const updateClip = {
|
|
|
6532
6824
|
}
|
|
6533
6825
|
// An empty look would clear the clip's look without saying so; null is how to ask for that.
|
|
6534
6826
|
if (input.look && Object.keys(input.look).length === 0)
|
|
6535
|
-
throw new Error('look needs at least one
|
|
6827
|
+
throw new Error('look needs at least one field (blend, grain, saturation, exposure, a grade value or a LUT); send look: null to clear it');
|
|
6828
|
+
const matteKind = input.matte && ('shape' in input.matte || 'chroma' in input.matte);
|
|
6829
|
+
if (GRADE_FIELDS.some((f) => input.look?.[f] !== undefined) || matteKind || input.reversed !== undefined) {
|
|
6830
|
+
await desktop.requireCapability('clip-grade', 'the grade, LUTs, colour keys, shape masks and reverse');
|
|
6831
|
+
}
|
|
6536
6832
|
if (input.look !== undefined)
|
|
6537
6833
|
await desktop.requireCapability('clip-look', "a clip's blend, grain and colour");
|
|
6538
6834
|
if (input.look?.exposure !== undefined || input.matte !== undefined || input.space !== undefined || input.panel !== undefined || input.blur !== undefined) {
|
|
@@ -6596,7 +6892,9 @@ export const addTimelineTrack = {
|
|
|
6596
6892
|
// and the batch cap slate's `src/main/agent/routes-editor.ts`, which this package cannot import;
|
|
6597
6893
|
// lockstep check 12 fails when they differ. The 0..1 position and
|
|
6598
6894
|
// opacity are fractions by definition, not a desktop choice.
|
|
6599
|
-
|
|
6895
|
+
// A desktop before the caption presets refuses one of the last six by name, so they need no gate.
|
|
6896
|
+
const TEXT_STYLE_IDS = ['word-pop', 'keyword', 'subtitle', 'headline', 'clean', 'plain',
|
|
6897
|
+
'active-pill', 'reel-bold', 'impact-hook', 'lower-third', 'minimal-caption', 'kinetic-pop'];
|
|
6600
6898
|
// A text clip set exactly (slate 1.6.x, capability text-fonts): the fonts Slates carries, the exact size,
|
|
6601
6899
|
// the picture before the words and a line of clips, mirrored from slate's `src/shared/textStyles.ts` and
|
|
6602
6900
|
// `src/shared/overlays.ts` like the rest (lockstep check 12).
|
|
@@ -7067,6 +7365,7 @@ export const updateTimelineSettings = {
|
|
|
7067
7365
|
if (input.delivery !== undefined || input.taxonomy !== undefined || input.gridBinding !== undefined) {
|
|
7068
7366
|
await desktop.requireCapability('ad-variant-export', 'cut delivery, naming and grid bindings');
|
|
7069
7367
|
}
|
|
7368
|
+
await requireDeliveryEncoding(desktop, input.delivery);
|
|
7070
7369
|
if (input.timelineId && input.delivery !== undefined && Object.keys(input).every(key => ['projectId', 'timelineId', 'delivery'].includes(key))) {
|
|
7071
7370
|
return ok(await desktop.post('/agent/timeline/delivery', input));
|
|
7072
7371
|
}
|
|
@@ -7077,16 +7376,17 @@ export const updateTimelineSettings = {
|
|
|
7077
7376
|
export const exportVideo = {
|
|
7078
7377
|
id: 'slates_export_video',
|
|
7079
7378
|
billable: false,
|
|
7080
|
-
description: "Render the project's timeline to
|
|
7379
|
+
description: "Render the project's timeline to a video file on disk through the desktop app's timeline engine, the renderer its monitor shows, so the file matches the preview (H.264 + AAC by default, every video lane composited with its transitions, fades and keyframes, gaps rendered as black; the Slates window must be open, and the export opens the timeline's project there first, answering openedProject: true when it did). No dialogs — pass an absolute outputPath ending in .mp4 (.mov for codec prores). presetId exports for a platform (tiktok, reels, meta-feed, stories, shorts, youtube: its bitrate, frame-rate ceiling and sound); codec, videoBitrateMbps and fps override it, or the cut's own encoding, for this file. Fails if the file exists unless overwrite=true. Blocks until encoding finishes (can take minutes for long timelines) and returns the real file size and probed duration. After success, consider slates_reveal_file to show the file to the user. Requires at least one video clip on the timeline. The sound is AAC at the timeline's Sound bitrate (slates_update_timeline_settings audioBitrate; default 320 kb/s) unless audioBitrate names one for this file. Pass exactly one of projectId (the project's default timeline) or timelineId (a named cut).",
|
|
7081
7380
|
input: z
|
|
7082
7381
|
.object({
|
|
7083
7382
|
projectId: z.string().uuid().optional(),
|
|
7084
7383
|
timelineId: z.string().uuid().optional(),
|
|
7085
|
-
outputPath: localFile('outputPath', ['mp4'])
|
|
7086
|
-
.describe('Absolute path for the rendered file, ending in .mp4 (e.g. C:\\Users\\you\\Videos\\ad.mp4 or /Users/you/ad.mp4). slates_get_project_directory gives a sensible default folder.'),
|
|
7384
|
+
outputPath: localFile('outputPath', ['mp4', 'mov'])
|
|
7385
|
+
.describe('Absolute path for the rendered file, ending in .mp4, or .mov for prores (e.g. C:\\Users\\you\\Videos\\ad.mp4 or /Users/you/ad.mp4). slates_get_project_directory gives a sensible default folder.'),
|
|
7087
7386
|
overwrite: z.boolean().optional(),
|
|
7088
7387
|
aspect: deliveryAspectInput.optional().describe('Optional delivery aspect from slates_get_variant_grid; requires ad-variant-export. Omission keeps existing export behavior.'),
|
|
7089
7388
|
audioBitrate: audioBitrateInput.optional().describe(`This file's AAC sound in kb/s (${AUDIO_BITRATES.join(', ')}); omit for the timeline's Sound bitrate.`),
|
|
7389
|
+
...exportEncodingShape,
|
|
7090
7390
|
})
|
|
7091
7391
|
.refine((d) => !!d.projectId !== !!d.timelineId, {
|
|
7092
7392
|
message: 'Pass exactly one of projectId or timelineId',
|
|
@@ -7094,6 +7394,12 @@ export const exportVideo = {
|
|
|
7094
7394
|
async run(input, ctx) {
|
|
7095
7395
|
const desktop = ctx.desktop();
|
|
7096
7396
|
await desktop.requireCapability('export', 'video export');
|
|
7397
|
+
if (input.presetId !== undefined || input.codec !== undefined || input.videoBitrateMbps !== undefined || input.fps !== undefined) {
|
|
7398
|
+
await desktop.requireCapability('export-encoding', 'platform presets and export encoding');
|
|
7399
|
+
}
|
|
7400
|
+
if (input.codec !== undefined && (input.codec === 'prores') !== /\.mov$/i.test(input.outputPath)) {
|
|
7401
|
+
throw new Error('A prores export writes a .mov file and every other codec an .mp4: change outputPath to match.');
|
|
7402
|
+
}
|
|
7097
7403
|
if (input.aspect !== undefined)
|
|
7098
7404
|
await desktop.requireCapability('ad-variant-export', 'single video delivery export');
|
|
7099
7405
|
if (input.audioBitrate !== undefined)
|
|
@@ -7105,9 +7411,13 @@ export const exportVideo = {
|
|
|
7105
7411
|
overwrite: input.overwrite,
|
|
7106
7412
|
aspect: input.aspect,
|
|
7107
7413
|
audioBitrate: input.audioBitrate,
|
|
7414
|
+
presetId: input.presetId,
|
|
7415
|
+
codec: input.codec,
|
|
7416
|
+
videoBitrateMbps: input.videoBitrateMbps,
|
|
7417
|
+
fps: input.fps,
|
|
7108
7418
|
});
|
|
7109
7419
|
const mb = r.fileSizeBytes != null ? (r.fileSizeBytes / (1024 * 1024)).toFixed(1) : '?';
|
|
7110
|
-
return ok(r, `Exported ${r.durationSec ?? '?'}s MP4 (${mb} MB) to ${r.outputPath ?? input.outputPath}.`);
|
|
7420
|
+
return ok(r, `Exported ${r.durationSec ?? '?'}s ${/\.mov$/i.test(input.outputPath) ? 'MOV' : 'MP4'} (${mb} MB) to ${r.outputPath ?? input.outputPath}.`);
|
|
7111
7421
|
},
|
|
7112
7422
|
};
|
|
7113
7423
|
export const exportTimelineXml = {
|
|
@@ -9975,6 +10285,17 @@ export const ALL_OPERATIONS = [
|
|
|
9975
10285
|
getRecipe,
|
|
9976
10286
|
reframeClip,
|
|
9977
10287
|
getReframeReport,
|
|
10288
|
+
freezeFrame,
|
|
10289
|
+
stabilizeClip,
|
|
10290
|
+
slideClip,
|
|
10291
|
+
punchIn,
|
|
10292
|
+
cleanUpDialogue,
|
|
10293
|
+
autoColourClip,
|
|
10294
|
+
autoDuck,
|
|
10295
|
+
matchLoudness,
|
|
10296
|
+
upscaleImage,
|
|
10297
|
+
getReviewPacket,
|
|
10298
|
+
resolveReviewNote,
|
|
9978
10299
|
getTimeline,
|
|
9979
10300
|
getTimelineLoudness,
|
|
9980
10301
|
addClipToTimeline,
|
|
@@ -180,6 +180,8 @@ export const OPERATION_GROUPS = {
|
|
|
180
180
|
'slates_quote_cut_drafts', 'slates_finish_cut_drafts', 'slates_get_cut_draft_status',
|
|
181
181
|
'slates_get_export_batch', 'slates_cancel_export_batch', 'slates_get_variant_grid', 'slates_get_recipe',
|
|
182
182
|
'slates_reframe_clip', 'slates_get_reframe_report',
|
|
183
|
+
'slates_freeze_frame', 'slates_stabilize_clip', 'slates_slide_clip', 'slates_punch_in', 'slates_clean_up_dialogue',
|
|
184
|
+
'slates_auto_colour_clip', 'slates_auto_duck', 'slates_match_loudness',
|
|
183
185
|
'slates_get_timeline',
|
|
184
186
|
'slates_get_timeline_loudness',
|
|
185
187
|
'slates_add_clip_to_timeline',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slatesvideo/shared",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.20",
|
|
4
4
|
"description": "Shared operations layer for the Slates MCP server and CLI: auth, cloud/desktop clients, and the single tool surface both consume. Most users want @slatesvideo/mcp-server or @slatesvideo/cli instead.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|