@slatesvideo/shared 0.5.9 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -0
- package/dist/operations/index.d.ts +34 -13
- package/dist/operations/index.js +426 -77
- package/dist/prompts/index.d.ts +1 -0
- package/dist/prompts/index.js +4 -0
- package/dist/prompts/model-capabilities.d.ts +124 -0
- package/dist/prompts/model-capabilities.js +624 -0
- package/dist/prompts/model-facts.d.ts +11 -3
- package/dist/prompts/model-facts.js +87 -51
- package/dist/prompts/prompting-tips.d.ts +1 -1
- package/dist/prompts/prompting-tips.js +64 -2
- package/dist/skills/content.js +8 -6
- package/exports/slates-prompt-builder/generated/SKILL.md +1 -1
- package/exports/slates-prompt-builder/generated/slates-prompt-builder-manifest.json +5 -5
- package/exports/slates-prompt-builder/generated/slates-prompt-builder.skill +0 -0
- package/package.json +5 -1
- package/skills/slates-direct-response-ad.md +2 -0
- package/skills/slates-model-selection.md +17 -11
- package/skills/slates-one-prompt-film.md +3 -2
- package/skills/slates-prompting-gpt-image-2.md +70 -40
- package/skills/slates-prompting-minimax-h3.md +287 -0
- package/skills/slates-prompting-seedance-2-5.md +23 -17
- package/skills/slates-prompting-veo-3.md +2 -2
- package/skills/slates-ugc-influencer-ad.md +307 -0
package/dist/index.d.ts
CHANGED
|
@@ -5,5 +5,6 @@ export { SKILLS } from './skills/content.js';
|
|
|
5
5
|
export * as operations from './operations/index.js';
|
|
6
6
|
export { ALL_OPERATIONS, VIDEO_MODELS, AUDIO_MODELS, defaultContext, type Operation, type OperationContext, type OperationResult } from './operations/index.js';
|
|
7
7
|
export { MODEL_FACTS, getModelFact, multimodalRefSummary, multimodalRefModels, SEEDANCE_TASK_INTENT_WORDS, seedanceTaskIntentWords, type ModelFact, } from './prompts/model-facts.js';
|
|
8
|
+
export { MODEL_CAPABILITIES, ALL_ASPECT_RATIOS, AGENT_ROUTE_PROVIDER, getModelCapability, aspectRatiosFor, videoResolutionsFor, defaultVideoResolutionFor, durationsFor, durationValuesFor, aspectRatioUnion, videoResolutionUnion, durationBounds, checkAspectRatio, checkVideoResolution, checkDuration, describeAspectRatios, describeVideoResolutions, describeDurations, describeReferenceImageCaps, type AspectRatio, type VideoResolution, type ModelCapability, type DurationCapability, type VideoResolutionCapability, } from './prompts/model-capabilities.js';
|
|
8
9
|
export { PROMPTING_TIPS, getPromptingTips, type PromptingTipsEntry, type PromptingTipCard, type PromptingTipsKey } from './prompts/prompting-tips.js';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -11,6 +11,12 @@ export { MODEL_FACTS, getModelFact, multimodalRefSummary, multimodalRefModels,
|
|
|
11
11
|
// Mirrored in slate/src/shared/pricing.ts — see the constant's own header for
|
|
12
12
|
// why the mirror exists and why it must never drive a prompt rewrite.
|
|
13
13
|
SEEDANCE_TASK_INTENT_WORDS, seedanceTaskIntentWords, } from './prompts/model-facts.js';
|
|
14
|
+
// Model CAPABILITY SSOT — what each model will ACCEPT (aspect ratios incl.
|
|
15
|
+
// per-provider overrides, video resolutions, duration windows, reference caps).
|
|
16
|
+
// `slate/src/shared/pricing.ts` spreads these into every MODEL_REGISTRY entry;
|
|
17
|
+
// the op surface validates against them and GENERATES its `.describe()` prose
|
|
18
|
+
// from them. Never hand-type a capability fact an LLM will read.
|
|
19
|
+
export { MODEL_CAPABILITIES, ALL_ASPECT_RATIOS, AGENT_ROUTE_PROVIDER, getModelCapability, aspectRatiosFor, videoResolutionsFor, defaultVideoResolutionFor, durationsFor, durationValuesFor, aspectRatioUnion, videoResolutionUnion, durationBounds, checkAspectRatio, checkVideoResolution, checkDuration, describeAspectRatios, describeVideoResolutions, describeDurations, describeReferenceImageCaps, } from './prompts/model-capabilities.js';
|
|
14
20
|
// Per-model prompting tips — the SSOT for the desktop "See prompting tips"
|
|
15
21
|
// modals. The desktop renders these; it never hand-writes tips content.
|
|
16
22
|
export { PROMPTING_TIPS, getPromptingTips } from './prompts/prompting-tips.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { SlatesCloudClient } from '../clients/cloud.js';
|
|
3
3
|
import { SlatesDesktopClient } from '../clients/desktop.js';
|
|
4
|
+
import { type AspectRatio, type VideoResolution } from '../prompts/model-capabilities.js';
|
|
4
5
|
export interface OperationContext {
|
|
5
6
|
cloud: () => SlatesCloudClient;
|
|
6
7
|
desktop: () => SlatesDesktopClient;
|
|
@@ -28,16 +29,25 @@ export declare const getCreditBalance: Operation<Record<string, never>>;
|
|
|
28
29
|
export declare const listAvailableModels: Operation<{
|
|
29
30
|
filter?: string;
|
|
30
31
|
}>;
|
|
32
|
+
export declare const VIDEO_MODELS: readonly ["kling-v3.0-std", "kling-v3.0-pro", "kling-v3.0-omni", "veo-3.1-fast", "veo-3.1-standard", "seedance-2", "seedance-2.5", "omni-flash", "minimax-h3", "minimax-h3-max"];
|
|
33
|
+
type VideoModel = (typeof VIDEO_MODELS)[number];
|
|
34
|
+
/** The exact `model` ids `slates_edit_video` accepts. Edit rows are deliberately
|
|
35
|
+
* NOT in VIDEO_MODELS — they take a source clip, not frames. */
|
|
36
|
+
export declare const EDIT_VIDEO_MODELS: readonly ["kling-v3.0-omni-edit", "kling-v3.0-omni-pro-edit", "omni-flash-edit", "seedance-2.5-edit"];
|
|
37
|
+
type EditVideoModel = (typeof EDIT_VIDEO_MODELS)[number];
|
|
31
38
|
export declare const estimateGenerationCost: Operation<{
|
|
32
39
|
model: string;
|
|
33
40
|
quantity?: number;
|
|
34
41
|
duration?: number;
|
|
35
|
-
|
|
42
|
+
/** The FULL union — the runtime Zod enum is generated from MODEL_CAPABILITIES
|
|
43
|
+
* and `assertVideoCapabilities` is the per-model narrowing authority. */
|
|
44
|
+
videoResolution?: VideoResolution;
|
|
36
45
|
resolution?: '1k' | '2k' | '3k' | '4k';
|
|
37
46
|
quality?: 'medium' | 'high';
|
|
38
47
|
sound?: boolean;
|
|
39
48
|
seedanceFace?: boolean;
|
|
40
49
|
seedanceRealFace?: boolean;
|
|
50
|
+
referenceImages?: number;
|
|
41
51
|
}>;
|
|
42
52
|
export declare const listProjects: Operation<Record<string, never>>;
|
|
43
53
|
export declare const createProject: Operation<{
|
|
@@ -156,12 +166,14 @@ export declare const addFrame: Operation<{
|
|
|
156
166
|
position?: number;
|
|
157
167
|
}>;
|
|
158
168
|
export type ImageModelId = 'nano-banana-2' | 'nano-banana-2-lite' | 'nano-banana-pro' | 'gpt-image-2' | 'flux-2-max' | 'seedream-5-lite';
|
|
169
|
+
/** The exact `model` ids `slates_generate_image` accepts. */
|
|
170
|
+
export declare const IMAGE_MODELS: readonly ["nano-banana-2", "nano-banana-2-lite", "nano-banana-pro", "gpt-image-2", "flux-2-max", "seedream-5-lite"];
|
|
159
171
|
export declare const generateImage: Operation<{
|
|
160
172
|
prompt: string;
|
|
161
173
|
model?: ImageModelId;
|
|
162
174
|
projectId?: string;
|
|
163
175
|
resolution?: '1k' | '2k' | '3k' | '4k';
|
|
164
|
-
aspectRatio?:
|
|
176
|
+
aspectRatio?: AspectRatio;
|
|
165
177
|
quality?: 'medium' | 'high';
|
|
166
178
|
count?: number;
|
|
167
179
|
referenceImageUrls?: string[];
|
|
@@ -181,12 +193,12 @@ export declare const editImage: Operation<{
|
|
|
181
193
|
confirm?: boolean;
|
|
182
194
|
background?: boolean;
|
|
183
195
|
}>;
|
|
184
|
-
export declare const VIDEO_MODELS: readonly ["kling-v3.0-std", "kling-v3.0-pro", "kling-v3.0-omni", "veo-3.1-fast", "veo-3.1-standard", "seedance-2", "seedance-2.5", "omni-flash"];
|
|
185
|
-
type VideoModel = (typeof VIDEO_MODELS)[number];
|
|
186
196
|
export declare function videoCostKey(input: {
|
|
187
197
|
model: VideoModel;
|
|
188
198
|
duration: number;
|
|
189
|
-
|
|
199
|
+
/** Widened to the full union because the Zod enum is GENERATED from
|
|
200
|
+
* MODEL_CAPABILITIES; the runtime schema is the narrowing authority. */
|
|
201
|
+
videoResolution?: VideoResolution;
|
|
190
202
|
sound?: boolean;
|
|
191
203
|
seedanceFace?: boolean;
|
|
192
204
|
seedanceRealFace?: boolean;
|
|
@@ -194,15 +206,24 @@ export declare function videoCostKey(input: {
|
|
|
194
206
|
* transfer / lip-sync on video / relocate). >0 bills the vref key on TOTAL
|
|
195
207
|
* (input+output) seconds — the server re-derives this by probing the refs. */
|
|
196
208
|
videoRefSeconds?: number;
|
|
209
|
+
/** MiniMax H3 base only: how many reference IMAGES the request carries. Past
|
|
210
|
+
* the fifth, fal charges per image, so it is a KEY DIMENSION — omit it on a
|
|
211
|
+
* reference-heavy call and the quote under-reports what the proxy bills
|
|
212
|
+
* (which it re-derives from the request itself). */
|
|
213
|
+
referenceImages?: number;
|
|
197
214
|
}): string;
|
|
198
215
|
export declare function klingEditCostKey(model: 'kling-v3.0-omni-edit' | 'kling-v3.0-omni-pro-edit', duration: number): string;
|
|
199
216
|
export declare function omniFlashEditCostKey(duration: number): string;
|
|
200
|
-
/** Seedance 2.5 source-clip bounds for the edit task type
|
|
201
|
-
|
|
202
|
-
|
|
217
|
+
/** Seedance 2.5 source-clip bounds for the edit task type — READ from the
|
|
218
|
+
* capability SSOT, not typed. Kept as named exports because published builds
|
|
219
|
+
* import them. */
|
|
220
|
+
export declare const SEEDANCE_25_EDIT_MIN_SECONDS: number;
|
|
221
|
+
export declare const SEEDANCE_25_EDIT_MAX_SECONDS: number;
|
|
203
222
|
export declare function seedanceEditCostKey(input: {
|
|
204
223
|
duration: number;
|
|
205
|
-
|
|
224
|
+
/** Widened to the full union because the Zod enum is GENERATED from
|
|
225
|
+
* MODEL_CAPABILITIES; the runtime schema is the narrowing authority. */
|
|
226
|
+
videoResolution?: VideoResolution;
|
|
206
227
|
seedanceFace?: boolean;
|
|
207
228
|
seedanceRealFace?: boolean;
|
|
208
229
|
}): string;
|
|
@@ -241,9 +262,9 @@ export declare const generateVideo: Operation<{
|
|
|
241
262
|
prompt: string;
|
|
242
263
|
model: string;
|
|
243
264
|
projectId?: string;
|
|
244
|
-
aspectRatio?:
|
|
265
|
+
aspectRatio?: AspectRatio;
|
|
245
266
|
duration?: number;
|
|
246
|
-
videoResolution?:
|
|
267
|
+
videoResolution?: VideoResolution;
|
|
247
268
|
firstFrameAssetId?: string;
|
|
248
269
|
lastFrameAssetId?: string;
|
|
249
270
|
ingredientAssetIds?: string[];
|
|
@@ -313,11 +334,11 @@ export declare const editVideo: Operation<{
|
|
|
313
334
|
projectId: string;
|
|
314
335
|
sourceVideoAssetId: string;
|
|
315
336
|
prompt: string;
|
|
316
|
-
model?:
|
|
337
|
+
model?: EditVideoModel;
|
|
317
338
|
characterAssetIds?: string[];
|
|
318
339
|
styleAssetIds?: string[];
|
|
319
340
|
keepAudio?: boolean;
|
|
320
|
-
videoResolution?:
|
|
341
|
+
videoResolution?: VideoResolution;
|
|
321
342
|
seedanceFace?: boolean;
|
|
322
343
|
background?: boolean;
|
|
323
344
|
confirm?: boolean;
|