@slatesvideo/shared 0.7.21 → 0.7.22
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/analytics/events.js +4 -4
- package/dist/auth.d.ts +11 -11
- package/dist/auth.js +54 -18
- package/dist/clients/cloud.d.ts +1 -0
- package/dist/clients/cloud.js +4 -1
- package/dist/clients/desktop.d.ts +15 -0
- package/dist/clients/desktop.js +37 -12
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -1
- package/dist/manual/content.d.ts +1 -1
- package/dist/manual/content.js +1 -1
- package/dist/operations/index.d.ts +109 -5
- package/dist/operations/index.js +891 -429
- package/dist/operations/parse-input.d.ts +47 -0
- package/dist/operations/parse-input.js +100 -0
- package/dist/operations/surface.js +1 -0
- package/dist/prompts/model-capabilities.d.ts +139 -27
- package/dist/prompts/model-capabilities.js +222 -150
- package/dist/prompts/model-facts.d.ts +14 -0
- package/dist/prompts/model-facts.js +29 -28
- package/dist/prompts/prompting-tips.d.ts +1 -1
- package/dist/prompts/prompting-tips.js +1 -66
- package/dist/prompts/retired-models.d.ts +34 -0
- package/dist/prompts/retired-models.js +67 -0
- package/dist/prompts/shot-spec.d.ts +6 -1
- package/dist/prompts/shot-spec.js +12 -1
- package/dist/skills/content.js +0 -1
- package/dist/update-check.js +15 -6
- package/package.json +1 -1
|
@@ -31,6 +31,19 @@ export interface OperationContext {
|
|
|
31
31
|
* desktop one per chat. Absent (the CLI, one call per process), no gate.
|
|
32
32
|
*/
|
|
33
33
|
guidesRead?: Set<string>;
|
|
34
|
+
/**
|
|
35
|
+
* The host's own spending decision for this one call, where the host has one (the desktop Studio Agent's loop):
|
|
36
|
+
* the credits the user approved beyond the call's own quote, the quote they approved (its `fingerprint`), and
|
|
37
|
+
* whether that approval still stands. Present, a paid op takes its ceiling from here and never from
|
|
38
|
+
* `approvedCredits` in its input, and sends nothing once `approved()` is false (`approvedSpend`). Absent (MCP,
|
|
39
|
+
* the CLI), the input's `approvedCredits` stands: on MCP the confirm gate sets it to the figure the user approved
|
|
40
|
+
* (the reply's own `approvedCredits`), else the host client's per-call approval is the consent.
|
|
41
|
+
*/
|
|
42
|
+
spend?: {
|
|
43
|
+
approvedCredits?: number;
|
|
44
|
+
quoteFingerprint?: string;
|
|
45
|
+
approved: () => boolean;
|
|
46
|
+
};
|
|
34
47
|
}
|
|
35
48
|
export declare function defaultContext(): OperationContext;
|
|
36
49
|
/** Thrown by an op that noticed `ctx.signal` had aborted mid-work. */
|
|
@@ -931,7 +944,7 @@ export declare const getCreditBalance: Operation<Record<string, never>>;
|
|
|
931
944
|
export declare const listAvailableModels: Operation<{
|
|
932
945
|
filter?: string;
|
|
933
946
|
}>;
|
|
934
|
-
export declare const VIDEO_MODELS: readonly ["kling-v3.0-std", "kling-v3.0-pro", "kling-v3.0-omni", "seedance-2", "seedance-2.5", "omni-flash-1-2", "wan-3.0", "kling-v4.0", "minimax-h3", "minimax-h3-max", "minimax-h3-max-turbo"
|
|
947
|
+
export declare const VIDEO_MODELS: readonly ["kling-v3.0-std", "kling-v3.0-pro", "kling-v3.0-omni", "seedance-2", "seedance-2.5", "omni-flash-1-2", "wan-3.0", "kling-v4.0", "minimax-h3", "minimax-h3-max", "minimax-h3-max-turbo"];
|
|
935
948
|
type VideoModel = (typeof VIDEO_MODELS)[number];
|
|
936
949
|
/** The exact `model` ids `slates_edit_video` accepts. Edit rows are deliberately
|
|
937
950
|
* NOT in VIDEO_MODELS — they take a source clip, not frames. */
|
|
@@ -955,6 +968,7 @@ export declare const estimateGenerationCost: Operation<{
|
|
|
955
968
|
seedanceFace?: boolean;
|
|
956
969
|
seedanceRealFace?: boolean;
|
|
957
970
|
referenceImages?: number;
|
|
971
|
+
videoReferenceSecondsEach?: number[];
|
|
958
972
|
videoRefSeconds?: number;
|
|
959
973
|
audioRefSeconds?: number;
|
|
960
974
|
}>;
|
|
@@ -1178,6 +1192,30 @@ export type GptQualityId = GptQuality;
|
|
|
1178
1192
|
* part of any cost key. `auto` is fal's default and ours.
|
|
1179
1193
|
*/
|
|
1180
1194
|
export type GptBackgroundId = GptBackground;
|
|
1195
|
+
type Clarification = {
|
|
1196
|
+
requires_clarification: true;
|
|
1197
|
+
missing: string[];
|
|
1198
|
+
message: string;
|
|
1199
|
+
};
|
|
1200
|
+
/**
|
|
1201
|
+
* The per-model image gate: the aspect ratio and the resolution rung the seat
|
|
1202
|
+
* declares in `MODEL_CAPABILITIES`. Generate, edit, the estimate and a saved
|
|
1203
|
+
* image Shot all run this one function, so a quote, a recipe and a generation
|
|
1204
|
+
* cannot disagree about what a seat takes.
|
|
1205
|
+
*
|
|
1206
|
+
* Why: GPT Image takes five of the union's ratios. A 4:5 or 21:9 ask passed,
|
|
1207
|
+
* was quoted at the 16:9 key, and the desktop's size table rendered a 16:9
|
|
1208
|
+
* frame for it and billed it (2026-11-24). An off-ladder rung built a cost key
|
|
1209
|
+
* the registry lacks and failed as "Unknown model", or, on Seedream, quoted the
|
|
1210
|
+
* default rung's price for a rung generation then refused.
|
|
1211
|
+
*/
|
|
1212
|
+
export declare function assertImageCapabilities(input: {
|
|
1213
|
+
model: string;
|
|
1214
|
+
aspectRatio?: string;
|
|
1215
|
+
resolution?: string;
|
|
1216
|
+
}, field?: {
|
|
1217
|
+
resolution: string;
|
|
1218
|
+
}): Clarification | null;
|
|
1181
1219
|
export declare function imageCostKey(model: ImageModelId, resolution: '1k' | '2k' | '3k' | '4k', quality?: GptQualityId, aspectRatio?: string, referenceCount?: number): string;
|
|
1182
1220
|
export declare const generateImage: Operation<{
|
|
1183
1221
|
prompt: string;
|
|
@@ -1193,8 +1231,27 @@ export declare const generateImage: Operation<{
|
|
|
1193
1231
|
background?: boolean;
|
|
1194
1232
|
confirm?: boolean;
|
|
1195
1233
|
approvedCredits?: number;
|
|
1234
|
+
requestId?: string;
|
|
1196
1235
|
folderId?: string | null;
|
|
1197
1236
|
}>;
|
|
1237
|
+
/**
|
|
1238
|
+
* Wait for a headless proxy job. The job is submitted and its credits held
|
|
1239
|
+
* before this runs, so every way out but `completed` and `failed` names the
|
|
1240
|
+
* job and tells the caller not to start another: a retry is a second paid job.
|
|
1241
|
+
* It used to swallow every poll error for five minutes and then throw a bare
|
|
1242
|
+
* timeout with no job id (2026-11-24).
|
|
1243
|
+
*/
|
|
1244
|
+
export declare function pollProxyJob(cloud: {
|
|
1245
|
+
get<T>(path: string): Promise<T>;
|
|
1246
|
+
}, jobId: string, options?: {
|
|
1247
|
+
intervalMs?: number;
|
|
1248
|
+
timeoutMs?: number;
|
|
1249
|
+
signal?: AbortSignal;
|
|
1250
|
+
}): Promise<{
|
|
1251
|
+
images?: Array<{
|
|
1252
|
+
url?: string;
|
|
1253
|
+
}>;
|
|
1254
|
+
}>;
|
|
1198
1255
|
export declare const editImage: Operation<{
|
|
1199
1256
|
projectId: string;
|
|
1200
1257
|
sourceAssetId: string;
|
|
@@ -1238,9 +1295,11 @@ export declare function videoCostKey(input: {
|
|
|
1238
1295
|
sound?: boolean;
|
|
1239
1296
|
seedanceFace?: boolean;
|
|
1240
1297
|
seedanceRealFace?: boolean;
|
|
1241
|
-
/**
|
|
1242
|
-
*
|
|
1243
|
-
*
|
|
1298
|
+
/** Each reference video's measured length. Seedance and Wan 3.0 bill the vref
|
|
1299
|
+
* key on `billed` (each clip rounded up) plus the output; H3 Max prices
|
|
1300
|
+
* `actual` seconds as tokens. The server re-derives both by probing. */
|
|
1301
|
+
videoReferenceSecondsEach?: readonly number[];
|
|
1302
|
+
/** DEPRECATED: one reference video's length, read as a single clip. */
|
|
1244
1303
|
videoRefSeconds?: number;
|
|
1245
1304
|
/** MiniMax H3 base only: how many reference IMAGES the request carries. Past
|
|
1246
1305
|
* the fifth, fal charges per image, so it is a KEY DIMENSION — omit it on a
|
|
@@ -1303,6 +1362,7 @@ export declare const generateVideo: Operation<{
|
|
|
1303
1362
|
negativePrompt?: string;
|
|
1304
1363
|
background?: boolean;
|
|
1305
1364
|
confirm?: boolean;
|
|
1365
|
+
approvedCredits?: number;
|
|
1306
1366
|
folderId?: string | null;
|
|
1307
1367
|
}>;
|
|
1308
1368
|
/**
|
|
@@ -1351,6 +1411,7 @@ export declare const generateLipSync: Operation<{
|
|
|
1351
1411
|
avatarModel?: 'avatar-standard' | 'avatar-pro';
|
|
1352
1412
|
background?: boolean;
|
|
1353
1413
|
confirm?: boolean;
|
|
1414
|
+
approvedCredits?: number;
|
|
1354
1415
|
}>;
|
|
1355
1416
|
export declare const generateMotionTransfer: Operation<{
|
|
1356
1417
|
projectId: string;
|
|
@@ -1361,6 +1422,7 @@ export declare const generateMotionTransfer: Operation<{
|
|
|
1361
1422
|
prompt?: string;
|
|
1362
1423
|
background?: boolean;
|
|
1363
1424
|
confirm?: boolean;
|
|
1425
|
+
approvedCredits?: number;
|
|
1364
1426
|
}>;
|
|
1365
1427
|
export declare const editVideo: Operation<{
|
|
1366
1428
|
projectId: string;
|
|
@@ -1920,7 +1982,7 @@ declare const reframeReportInput: z.ZodObject<{
|
|
|
1920
1982
|
clipId?: string | undefined;
|
|
1921
1983
|
}>;
|
|
1922
1984
|
export declare const getReframeReport: Operation<z.infer<typeof reframeReportInput>>;
|
|
1923
|
-
declare const reframeClipInput: z.ZodObject<{
|
|
1985
|
+
declare const reframeClipInput: z.ZodEffects<z.ZodObject<{
|
|
1924
1986
|
projectId: z.ZodString;
|
|
1925
1987
|
timelineId: z.ZodString;
|
|
1926
1988
|
aspect: z.ZodString;
|
|
@@ -1977,6 +2039,34 @@ declare const reframeClipInput: z.ZodObject<{
|
|
|
1977
2039
|
follow?: "face" | "off" | {
|
|
1978
2040
|
maskId: string;
|
|
1979
2041
|
} | undefined;
|
|
2042
|
+
}>, {
|
|
2043
|
+
projectId: string;
|
|
2044
|
+
timelineId: string;
|
|
2045
|
+
clipId: string;
|
|
2046
|
+
aspect: string;
|
|
2047
|
+
framing?: {
|
|
2048
|
+
mode?: "fill" | "fit" | undefined;
|
|
2049
|
+
focusX?: number | undefined;
|
|
2050
|
+
focusY?: number | undefined;
|
|
2051
|
+
zoom?: number | undefined;
|
|
2052
|
+
} | null | undefined;
|
|
2053
|
+
follow?: "face" | "off" | {
|
|
2054
|
+
maskId: string;
|
|
2055
|
+
} | undefined;
|
|
2056
|
+
}, {
|
|
2057
|
+
projectId: string;
|
|
2058
|
+
timelineId: string;
|
|
2059
|
+
clipId: string;
|
|
2060
|
+
aspect: string;
|
|
2061
|
+
framing?: {
|
|
2062
|
+
mode?: "fill" | "fit" | undefined;
|
|
2063
|
+
focusX?: number | undefined;
|
|
2064
|
+
focusY?: number | undefined;
|
|
2065
|
+
zoom?: number | undefined;
|
|
2066
|
+
} | null | undefined;
|
|
2067
|
+
follow?: "face" | "off" | {
|
|
2068
|
+
maskId: string;
|
|
2069
|
+
} | undefined;
|
|
1980
2070
|
}>;
|
|
1981
2071
|
export declare const reframeClip: Operation<z.infer<typeof reframeClipInput>>;
|
|
1982
2072
|
export declare const freezeFrame: Operation<{
|
|
@@ -2084,6 +2174,15 @@ export declare const resolveReviewNote: Operation<{
|
|
|
2084
2174
|
assetIds?: string[];
|
|
2085
2175
|
}>;
|
|
2086
2176
|
}>;
|
|
2177
|
+
type ClientAdReportInput = {
|
|
2178
|
+
platform: 'google' | 'tiktok';
|
|
2179
|
+
accountId?: string;
|
|
2180
|
+
managerId?: string;
|
|
2181
|
+
since?: string;
|
|
2182
|
+
until?: string;
|
|
2183
|
+
projectId?: string;
|
|
2184
|
+
};
|
|
2185
|
+
export declare const getClientAdReport: Operation<ClientAdReportInput>;
|
|
2087
2186
|
export declare const getAdWinners: Operation<{
|
|
2088
2187
|
projectId?: string;
|
|
2089
2188
|
}>;
|
|
@@ -3280,6 +3379,7 @@ export declare const updateShot: Operation<ShotOpRefs & ShotOpScript & {
|
|
|
3280
3379
|
}>;
|
|
3281
3380
|
export declare const duplicateShot: Operation<{
|
|
3282
3381
|
shotId: string;
|
|
3382
|
+
projectId?: string;
|
|
3283
3383
|
name?: string;
|
|
3284
3384
|
prompt?: string;
|
|
3285
3385
|
model?: string;
|
|
@@ -3293,6 +3393,7 @@ export declare const listShots: Operation<{
|
|
|
3293
3393
|
}>;
|
|
3294
3394
|
export declare const getShot: Operation<{
|
|
3295
3395
|
shotId: string;
|
|
3396
|
+
projectId?: string;
|
|
3296
3397
|
}>;
|
|
3297
3398
|
/**
|
|
3298
3399
|
* The Board's "Use pictures as first frames": each video Shot with a picture and no first frame starts its
|
|
@@ -3320,6 +3421,7 @@ export declare const usePicturesAsFirstFrames: Operation<{
|
|
|
3320
3421
|
*/
|
|
3321
3422
|
export declare const splitShot: Operation<{
|
|
3322
3423
|
shotId: string;
|
|
3424
|
+
projectId?: string;
|
|
3323
3425
|
caret?: number;
|
|
3324
3426
|
}>;
|
|
3325
3427
|
export declare const splitTake: Operation<{
|
|
@@ -3337,6 +3439,7 @@ export declare const refileTake: Operation<{
|
|
|
3337
3439
|
export declare const mergeShots: Operation<{
|
|
3338
3440
|
firstId: string;
|
|
3339
3441
|
secondId: string;
|
|
3442
|
+
projectId?: string;
|
|
3340
3443
|
}>;
|
|
3341
3444
|
export declare const getScript: Operation<{
|
|
3342
3445
|
sceneId: string;
|
|
@@ -3885,6 +3988,7 @@ export declare const pasteScript: Operation<{
|
|
|
3885
3988
|
}>;
|
|
3886
3989
|
export declare const generateFromShots: Operation<{
|
|
3887
3990
|
shotIds: string[];
|
|
3991
|
+
projectId?: string;
|
|
3888
3992
|
confirm?: boolean;
|
|
3889
3993
|
fingerprint?: string;
|
|
3890
3994
|
draft?: {
|