@slatesvideo/shared 0.5.5 → 0.5.7

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.
Files changed (29) hide show
  1. package/dist/index.d.ts +2 -2
  2. package/dist/index.js +6 -3
  3. package/dist/operations/index.d.ts +106 -19
  4. package/dist/operations/index.js +624 -172
  5. package/dist/prompts/character-sheet.d.ts +2 -1
  6. package/dist/prompts/character-sheet.js +82 -13
  7. package/dist/prompts/model-facts.d.ts +43 -1
  8. package/dist/prompts/model-facts.js +104 -2
  9. package/dist/prompts/prompting-tips.d.ts +1 -1
  10. package/dist/prompts/prompting-tips.js +208 -5
  11. package/dist/prompts/reference-composer.d.ts +21 -3
  12. package/dist/prompts/reference-composer.js +80 -10
  13. package/dist/prompts/reference-rules.d.ts +19 -2
  14. package/dist/prompts/reference-rules.js +18 -1
  15. package/dist/skills/content.js +8 -5
  16. package/exports/slates-prompt-builder/generated/SKILL.md +2 -2
  17. package/exports/slates-prompt-builder/generated/reference-character.md +9 -4
  18. package/exports/slates-prompt-builder/generated/reference-seedance.md +12 -1
  19. package/exports/slates-prompt-builder/generated/slates-prompt-builder-manifest.json +11 -11
  20. package/exports/slates-prompt-builder/generated/slates-prompt-builder.skill +0 -0
  21. package/package.json +1 -1
  22. package/skills/slates-character-identity.md +9 -4
  23. package/skills/slates-model-selection.md +39 -11
  24. package/skills/slates-prompting-elevenlabs.md +69 -0
  25. package/skills/slates-prompting-lip-sync.md +12 -14
  26. package/skills/slates-prompting-motion-transfer.md +18 -14
  27. package/skills/slates-prompting-seed-audio.md +110 -0
  28. package/skills/slates-prompting-seedance-2-5.md +215 -0
  29. package/skills/slates-prompting-seedance.md +17 -1
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ export { SlatesCloudClient, type SlatesUserInfo, type CreditsBalance, type Model
3
3
  export { SlatesDesktopClient, type DesktopHealth } from './clients/desktop.js';
4
4
  export { SKILLS } from './skills/content.js';
5
5
  export * as operations from './operations/index.js';
6
- export { ALL_OPERATIONS, VIDEO_MODELS, defaultContext, type Operation, type OperationContext, type OperationResult } from './operations/index.js';
7
- export { MODEL_FACTS, getModelFact, type ModelFact } from './prompts/model-facts.js';
6
+ export { ALL_OPERATIONS, VIDEO_MODELS, AUDIO_MODELS, defaultContext, type Operation, type OperationContext, type OperationResult } from './operations/index.js';
7
+ export { MODEL_FACTS, getModelFact, multimodalRefSummary, multimodalRefModels, SEEDANCE_TASK_INTENT_WORDS, seedanceTaskIntentWords, type ModelFact, } from './prompts/model-facts.js';
8
8
  export { PROMPTING_TIPS, getPromptingTips, type PromptingTipsEntry, type PromptingTipCard, type PromptingTipsKey } from './prompts/prompting-tips.js';
9
9
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -3,11 +3,14 @@ export { SlatesCloudClient } from './clients/cloud.js';
3
3
  export { SlatesDesktopClient } from './clients/desktop.js';
4
4
  export { SKILLS } from './skills/content.js';
5
5
  export * as operations from './operations/index.js';
6
- export { ALL_OPERATIONS, VIDEO_MODELS, defaultContext } from './operations/index.js';
6
+ export { ALL_OPERATIONS, VIDEO_MODELS, AUDIO_MODELS, defaultContext } from './operations/index.js';
7
7
  // Model routing/prompting facts — the SSOT the desktop Studio Agent system
8
- // prompt derives its MODEL ROUTING doctrine from (kind: image vs video,
8
+ // prompt derives its MODEL ROUTING doctrine from (kind: image | video | audio,
9
9
  // default/premium/niche notes). Edit model-facts.ts, never prose copies.
10
- export { MODEL_FACTS, getModelFact } from './prompts/model-facts.js';
10
+ export { MODEL_FACTS, getModelFact, multimodalRefSummary, multimodalRefModels,
11
+ // Mirrored in slate/src/shared/pricing.ts — see the constant's own header for
12
+ // why the mirror exists and why it must never drive a prompt rewrite.
13
+ SEEDANCE_TASK_INTENT_WORDS, seedanceTaskIntentWords, } from './prompts/model-facts.js';
11
14
  // Per-model prompting tips — the SSOT for the desktop "See prompting tips"
12
15
  // modals. The desktop renders these; it never hand-writes tips content.
13
16
  export { PROMPTING_TIPS, getPromptingTips } from './prompts/prompting-tips.js';
@@ -67,7 +67,7 @@ export declare const uploadReferenceImage: Operation<{
67
67
  projectId: string;
68
68
  filePath?: string;
69
69
  dataUrl?: string;
70
- type?: 'image' | 'video';
70
+ type?: 'image' | 'video' | 'audio';
71
71
  }>;
72
72
  export declare const listFolders: Operation<{
73
73
  projectId: string;
@@ -80,6 +80,21 @@ export declare const moveAssetsToFolder: Operation<{
80
80
  assetIds: string[];
81
81
  folderId: string | null;
82
82
  }>;
83
+ export declare const moveAssetsToProject: Operation<{
84
+ sourceProjectId: string;
85
+ assetIds: string[];
86
+ targetProjectId: string;
87
+ }>;
88
+ export declare const copyAssetsToProject: Operation<{
89
+ sourceProjectId: string;
90
+ assetIds: string[];
91
+ targetProjectId: string;
92
+ }>;
93
+ export declare const moveEntityToProject: Operation<{
94
+ kind: 'character' | 'environment' | 'style';
95
+ entityId: string;
96
+ targetProjectId: string;
97
+ }>;
83
98
  export declare const listCharacters: Operation<{
84
99
  projectId: string;
85
100
  }>;
@@ -166,7 +181,7 @@ export declare const editImage: Operation<{
166
181
  confirm?: boolean;
167
182
  background?: boolean;
168
183
  }>;
169
- 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", "omni-flash"];
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"];
170
185
  type VideoModel = (typeof VIDEO_MODELS)[number];
171
186
  export declare function videoCostKey(input: {
172
187
  model: VideoModel;
@@ -182,6 +197,46 @@ export declare function videoCostKey(input: {
182
197
  }): string;
183
198
  export declare function klingEditCostKey(model: 'kling-v3.0-omni-edit' | 'kling-v3.0-omni-pro-edit', duration: number): string;
184
199
  export declare function omniFlashEditCostKey(duration: number): string;
200
+ /** Seedance 2.5 source-clip bounds for the edit task type. */
201
+ export declare const SEEDANCE_25_EDIT_MIN_SECONDS = 4;
202
+ export declare const SEEDANCE_25_EDIT_MAX_SECONDS = 30;
203
+ export declare function seedanceEditCostKey(input: {
204
+ duration: number;
205
+ videoResolution?: '480p' | '720p';
206
+ seedanceFace?: boolean;
207
+ seedanceRealFace?: boolean;
208
+ }): string;
209
+ export declare const AUDIO_MODELS: readonly ["seed-audio", "eleven-sfx"];
210
+ export type AudioModel = (typeof AUDIO_MODELS)[number];
211
+ /**
212
+ * Per-surface bounds and defaults.
213
+ *
214
+ * 🚨 THESE FOUR NUMBERS PER SURFACE LIVE IN THREE REPOS. A change is a
215
+ * three-site edit, every time:
216
+ * 1. HERE (`audioCostKey`, the agent's pre-flight quote)
217
+ * 2. `slate/src/shared/pricing.ts` → MODEL_REGISTRY `audio.durationSeconds`
218
+ * (min/max/default), read by `clampAudioDuration` + `audioCreditKey`
219
+ * 3. `slates-api/src/lib/audio-keys.ts` → the server's fail-closed bounds
220
+ * `slates-api/scripts/pricing-consistency-check.mjs` §4 asserts 1 and 2 agree
221
+ * at EVERY value including out-of-range ones; the gate check covers 3.
222
+ *
223
+ * The MINs used to be missing here, and the clamp floor was a hardcoded 1. That
224
+ * made `slates_estimate_generation_cost({model:'seed-audio', duration:2})`
225
+ * quote a real `seed-audio-2s` price for a generation the desktop would bill as
226
+ * 3s and the proxy would REJECT outright. Same for an omitted duration, which
227
+ * quoted `seed-audio-1s` against the desktop's `seed-audio-15s`.
228
+ */
229
+ export declare const SEED_AUDIO_MIN_SECONDS = 3;
230
+ export declare const SEED_AUDIO_MAX_SECONDS = 120;
231
+ export declare const SEED_AUDIO_DEFAULT_SECONDS = 15;
232
+ export declare const ELEVEN_SFX_MIN_SECONDS = 1;
233
+ export declare const ELEVEN_SFX_MAX_SECONDS = 22;
234
+ export declare const ELEVEN_SFX_DEFAULT_SECONDS = 4;
235
+ export declare function audioCostKey(input: {
236
+ model: AudioModel;
237
+ /** seed-audio + eleven-sfx: the REQUESTED duration in seconds (ceiled). */
238
+ durationSeconds?: number;
239
+ }): string;
185
240
  export declare const generateVideo: Operation<{
186
241
  prompt: string;
187
242
  model: string;
@@ -198,6 +253,9 @@ export declare const generateVideo: Operation<{
198
253
  videoReferenceAssetId?: string;
199
254
  videoReferenceSeconds?: number;
200
255
  audioReferenceAssetId?: string;
256
+ videoReferenceAssetIds?: string[];
257
+ videoReferenceSecondsEach?: number[];
258
+ audioReferenceAssetIds?: string[];
201
259
  sound?: boolean;
202
260
  audioLanguage?: 'EN' | 'ZH' | 'JA' | 'KO' | 'ES';
203
261
  generateMusic?: boolean;
@@ -208,6 +266,23 @@ export declare const generateVideo: Operation<{
208
266
  background?: boolean;
209
267
  confirm?: boolean;
210
268
  }>;
269
+ export declare const generateAudio: Operation<{
270
+ projectId: string;
271
+ model: AudioModel;
272
+ prompt: string;
273
+ durationSeconds?: number;
274
+ voice?: string;
275
+ speed?: number;
276
+ volume?: number;
277
+ pitch?: number;
278
+ multilingual?: boolean;
279
+ loop?: boolean;
280
+ promptInfluence?: number;
281
+ audioReferenceAssetIds?: string[];
282
+ imageReferenceAssetId?: string;
283
+ background?: boolean;
284
+ confirm?: boolean;
285
+ }>;
211
286
  export declare const generateLipSync: Operation<{
212
287
  projectId: string;
213
288
  sourceAssetId: string;
@@ -220,14 +295,6 @@ export declare const generateLipSync: Operation<{
220
295
  audioFilePath?: string;
221
296
  avatarModel?: 'avatar-standard' | 'avatar-pro';
222
297
  klingProvider?: 'fal' | 'kling';
223
- engine?: 'kling' | 'seedance-2';
224
- videoResolution?: '480p' | '720p' | '1080p' | '4k';
225
- aspectRatio?: string;
226
- seedanceFace?: boolean;
227
- seedanceRealFace?: boolean;
228
- realFaceConsent?: boolean;
229
- sourceSeconds?: number;
230
- audioSeconds?: number;
231
298
  background?: boolean;
232
299
  confirm?: boolean;
233
300
  }>;
@@ -235,17 +302,10 @@ export declare const generateMotionTransfer: Operation<{
235
302
  projectId: string;
236
303
  sourceVideoAssetId: string;
237
304
  targetImageAssetId: string;
238
- motionModel?: 'kling-mc-std' | 'kling-mc-pro' | 'seedance-2';
305
+ motionModel?: 'kling-mc-std' | 'kling-mc-pro';
239
306
  characterOrientation?: 'video' | 'image';
240
307
  prompt?: string;
241
308
  klingProvider?: 'fal' | 'kling';
242
- duration?: number;
243
- videoResolution?: '480p' | '720p' | '1080p' | '4k';
244
- aspectRatio?: string;
245
- seedanceFace?: boolean;
246
- seedanceRealFace?: boolean;
247
- realFaceConsent?: boolean;
248
- sourceVideoSeconds?: number;
249
309
  background?: boolean;
250
310
  confirm?: boolean;
251
311
  }>;
@@ -253,10 +313,12 @@ export declare const editVideo: Operation<{
253
313
  projectId: string;
254
314
  sourceVideoAssetId: string;
255
315
  prompt: string;
256
- model?: 'kling-v3.0-omni-edit' | 'kling-v3.0-omni-pro-edit' | 'omni-flash-edit';
316
+ model?: 'kling-v3.0-omni-edit' | 'kling-v3.0-omni-pro-edit' | 'omni-flash-edit' | 'seedance-2.5-edit';
257
317
  characterAssetIds?: string[];
258
318
  styleAssetIds?: string[];
259
319
  keepAudio?: boolean;
320
+ videoResolution?: '480p' | '720p';
321
+ seedanceFace?: boolean;
260
322
  background?: boolean;
261
323
  confirm?: boolean;
262
324
  }>;
@@ -424,6 +486,31 @@ export declare const updateFrame: Operation<{
424
486
  frameType?: 'first' | 'last' | 'ingredient' | null;
425
487
  motionPrompt?: string | null;
426
488
  }>;
489
+ /**
490
+ * Batch form of `slates_update_frame`.
491
+ *
492
+ * Writing a scene's worth of frames — motion prompts, shot labels — is ONE
493
+ * logical edit. Doing it as N `slates_update_frame` calls costs N LLM
494
+ * round-trips and makes the desktop refetch the whole storyboard N times for a
495
+ * single intent. This is also where the storyboard's deleted "generate motion
496
+ * prompts" button's capability went: the agent can be told "redo scene 3,
497
+ * handheld", which that fixed-shape button never could.
498
+ *
499
+ * Hits `POST /agent/frames/batch-update`, which validates every id BEFORE the
500
+ * first write and emits one broadcast for the batch.
501
+ */
502
+ export declare const batchUpdateFrames: Operation<{
503
+ updates: {
504
+ frameId: string;
505
+ shotLabel?: string;
506
+ notes?: string;
507
+ assetId?: string | null;
508
+ sceneId?: string | null;
509
+ position?: number;
510
+ frameType?: 'first' | 'last' | 'ingredient' | null;
511
+ motionPrompt?: string | null;
512
+ }[];
513
+ }>;
427
514
  export declare const deleteFrame: Operation<{
428
515
  frameId: string;
429
516
  }>;