@slatesvideo/shared 0.5.4 → 0.5.6
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/README.md +13 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/operations/index.d.ts +84 -9
- package/dist/operations/index.js +455 -47
- package/dist/prompts/character-sheet.d.ts +11 -21
- package/dist/prompts/character-sheet.js +124 -59
- package/dist/prompts/model-facts.d.ts +1 -1
- package/dist/prompts/model-facts.js +32 -0
- package/dist/prompts/partials.generated.js +2 -2
- package/dist/prompts/prompting-tips.d.ts +1 -1
- package/dist/prompts/prompting-tips.js +196 -2
- package/dist/prompts/reference-composer.d.ts +1 -1
- package/dist/prompts/reference-composer.js +3 -4
- package/dist/prompts/reference-rules.d.ts +19 -2
- package/dist/prompts/reference-rules.js +21 -4
- package/dist/skills/content.js +14 -11
- package/exports/slates-prompt-builder/generated/SKILL.md +59 -0
- package/{skills/slates-character-turnaround.md → exports/slates-prompt-builder/generated/reference-character.md} +26 -33
- package/exports/slates-prompt-builder/generated/reference-content-policy.md +75 -0
- package/exports/slates-prompt-builder/generated/reference-kling.md +212 -0
- package/exports/slates-prompt-builder/generated/reference-nano-banana.md +182 -0
- package/exports/slates-prompt-builder/generated/reference-seedance.md +353 -0
- package/exports/slates-prompt-builder/generated/slates-prompt-builder-manifest.json +79 -0
- package/exports/slates-prompt-builder/generated/slates-prompt-builder.skill +0 -0
- package/package.json +7 -3
- package/skills/_partials/reference-rules-core.md +1 -1
- package/skills/_partials/reference-tips-short.md +1 -1
- package/skills/slates-character-identity.md +105 -0
- package/skills/slates-edit-and-iterate.md +1 -1
- package/skills/slates-model-selection.md +26 -0
- package/skills/slates-one-prompt-film.md +3 -3
- package/skills/slates-prompting-elevenlabs.md +131 -0
- package/skills/slates-prompting-flux-2-max.md +1 -1
- package/skills/slates-prompting-gpt-image-2.md +1 -1
- package/skills/slates-prompting-kling-v3.md +8 -6
- package/skills/slates-prompting-nano-banana-2.md +7 -5
- package/skills/slates-prompting-omni-flash.md +1 -1
- package/skills/slates-prompting-seed-audio.md +110 -0
- package/skills/slates-prompting-seedance.md +15 -9
- package/skills/slates-prompting-suno.md +110 -0
- package/skills/slates-prompting-veo-3.md +1 -1
package/README.md
CHANGED
|
@@ -21,3 +21,16 @@ Prompting doctrine that applies to more than one model lives **once**, in `skill
|
|
|
21
21
|
`npm run build` runs `sync-partials.mjs --check`, which fails with a diff if anything inside a marker block was hand-edited, if a skill references a partial that doesn't exist, if markers are unbalanced, or if a partial is referenced by nothing. Run `npm run sync-partials` to apply changes after editing a partial.
|
|
22
22
|
|
|
23
23
|
**To change shared prompting doctrine: edit the partial.** Never edit between markers, never edit `partials.generated.ts`, and never hand-copy a shared rule into a new skill — a copy is a fork with a delay fuse. Per-model levers (a vendor's own official consistency mechanism, its caps and transport quirks) stay hand-authored, below the injected block, under a `### For <model> specifically` heading.
|
|
24
|
+
|
|
25
|
+
## Portable Prompt Builder export
|
|
26
|
+
|
|
27
|
+
The downloadable Claude `.skill` is generated at `exports/slates-prompt-builder/generated/`. Its model, character, and content-policy references come directly from the resolved production files in `skills/`; its routing table derives from `MODEL_FACTS`; the portable wrapper owns only export-specific scope and output behavior.
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm run sync-prompt-builder # regenerate markdown, manifest, and deterministic .skill
|
|
31
|
+
npm run typecheck # fails if the committed export is stale
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`scripts/build-prompt-builder.mjs --check` validates generated text content (normalizing LF/CRLF), keeps the archive byte-exact, opens it to verify its exact entry set, and enforces the runtime character contract (one sheet, the canonical `IDENTITY_PLATE_HEX`, flat/shadowless light, and the three-panel builder). Never edit `exports/slates-prompt-builder/generated/` directly.
|
|
35
|
+
|
|
36
|
+
The repository verification workflow runs both typecheck and build on every pull request and push to `main`, so stale exports cannot merge through the normal GitHub path.
|
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';
|
|
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, 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,9 +3,9 @@ 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
|
|
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
10
|
export { MODEL_FACTS, getModelFact } from './prompts/model-facts.js';
|
|
11
11
|
// Per-model prompting tips — the SSOT for the desktop "See prompting tips"
|
|
@@ -32,6 +32,7 @@ export declare const estimateGenerationCost: Operation<{
|
|
|
32
32
|
model: string;
|
|
33
33
|
quantity?: number;
|
|
34
34
|
duration?: number;
|
|
35
|
+
characters?: number;
|
|
35
36
|
videoResolution?: '480p' | '720p' | '1080p' | '4k';
|
|
36
37
|
resolution?: '1k' | '2k' | '3k' | '4k';
|
|
37
38
|
quality?: 'medium' | 'high';
|
|
@@ -67,7 +68,7 @@ export declare const uploadReferenceImage: Operation<{
|
|
|
67
68
|
projectId: string;
|
|
68
69
|
filePath?: string;
|
|
69
70
|
dataUrl?: string;
|
|
70
|
-
type?: 'image' | 'video';
|
|
71
|
+
type?: 'image' | 'video' | 'audio';
|
|
71
72
|
}>;
|
|
72
73
|
export declare const listFolders: Operation<{
|
|
73
74
|
projectId: string;
|
|
@@ -80,6 +81,21 @@ export declare const moveAssetsToFolder: Operation<{
|
|
|
80
81
|
assetIds: string[];
|
|
81
82
|
folderId: string | null;
|
|
82
83
|
}>;
|
|
84
|
+
export declare const moveAssetsToProject: Operation<{
|
|
85
|
+
sourceProjectId: string;
|
|
86
|
+
assetIds: string[];
|
|
87
|
+
targetProjectId: string;
|
|
88
|
+
}>;
|
|
89
|
+
export declare const copyAssetsToProject: Operation<{
|
|
90
|
+
sourceProjectId: string;
|
|
91
|
+
assetIds: string[];
|
|
92
|
+
targetProjectId: string;
|
|
93
|
+
}>;
|
|
94
|
+
export declare const moveEntityToProject: Operation<{
|
|
95
|
+
kind: 'character' | 'environment' | 'style';
|
|
96
|
+
entityId: string;
|
|
97
|
+
targetProjectId: string;
|
|
98
|
+
}>;
|
|
83
99
|
export declare const listCharacters: Operation<{
|
|
84
100
|
projectId: string;
|
|
85
101
|
}>;
|
|
@@ -89,11 +105,7 @@ export declare const createCharacter: Operation<{
|
|
|
89
105
|
description?: string;
|
|
90
106
|
style?: string;
|
|
91
107
|
}>;
|
|
92
|
-
export declare const
|
|
93
|
-
characterId: string;
|
|
94
|
-
assetId: string | null;
|
|
95
|
-
}>;
|
|
96
|
-
export declare const setCharacterExpression: Operation<{
|
|
108
|
+
export declare const setCharacterIdentity: Operation<{
|
|
97
109
|
characterId: string;
|
|
98
110
|
assetId: string | null;
|
|
99
111
|
}>;
|
|
@@ -106,11 +118,10 @@ export declare const createEnvironment: Operation<{
|
|
|
106
118
|
description?: string;
|
|
107
119
|
style?: string;
|
|
108
120
|
}>;
|
|
109
|
-
export declare const
|
|
121
|
+
export declare const generateCharacterIdentity: Operation<{
|
|
110
122
|
characterId: string;
|
|
111
123
|
projectId: string;
|
|
112
124
|
baseAssetId: string;
|
|
113
|
-
sheetTypes?: ('turnaround' | 'expression')[];
|
|
114
125
|
userNotes?: string;
|
|
115
126
|
model?: 'nano-banana-2' | 'nano-banana-2-lite' | 'nano-banana-pro' | 'gpt-image-2';
|
|
116
127
|
}>;
|
|
@@ -187,6 +198,42 @@ export declare function videoCostKey(input: {
|
|
|
187
198
|
}): string;
|
|
188
199
|
export declare function klingEditCostKey(model: 'kling-v3.0-omni-edit' | 'kling-v3.0-omni-pro-edit', duration: number): string;
|
|
189
200
|
export declare function omniFlashEditCostKey(duration: number): string;
|
|
201
|
+
export declare const AUDIO_MODELS: readonly ["seed-audio", "eleven-v3", "eleven-sfx", "suno"];
|
|
202
|
+
export type AudioModel = (typeof AUDIO_MODELS)[number];
|
|
203
|
+
/**
|
|
204
|
+
* Per-surface bounds and defaults.
|
|
205
|
+
*
|
|
206
|
+
* 🚨 THESE FOUR NUMBERS PER SURFACE LIVE IN THREE REPOS. A change is a
|
|
207
|
+
* three-site edit, every time:
|
|
208
|
+
* 1. HERE (`audioCostKey`, the agent's pre-flight quote)
|
|
209
|
+
* 2. `slate/src/shared/pricing.ts` → MODEL_REGISTRY `audio.durationSeconds`
|
|
210
|
+
* (min/max/default), read by `clampAudioDuration` + `audioCreditKey`
|
|
211
|
+
* 3. `slates-api/src/lib/audio-keys.ts` → the server's fail-closed bounds
|
|
212
|
+
* `slates-api/scripts/pricing-consistency-check.mjs` §4 asserts 1 and 2 agree
|
|
213
|
+
* at EVERY value including out-of-range ones; the gate check covers 3.
|
|
214
|
+
*
|
|
215
|
+
* The MINs used to be missing here, and the clamp floor was a hardcoded 1. That
|
|
216
|
+
* made `slates_estimate_generation_cost({model:'seed-audio', duration:2})`
|
|
217
|
+
* quote a real `seed-audio-2s` price for a generation the desktop would bill as
|
|
218
|
+
* 3s and the proxy would REJECT outright. Same for an omitted duration, which
|
|
219
|
+
* quoted `seed-audio-1s` against the desktop's `seed-audio-15s`.
|
|
220
|
+
*/
|
|
221
|
+
export declare const SEED_AUDIO_MIN_SECONDS = 3;
|
|
222
|
+
export declare const SEED_AUDIO_MAX_SECONDS = 120;
|
|
223
|
+
export declare const SEED_AUDIO_DEFAULT_SECONDS = 15;
|
|
224
|
+
export declare const ELEVEN_SFX_MIN_SECONDS = 1;
|
|
225
|
+
export declare const ELEVEN_SFX_MAX_SECONDS = 22;
|
|
226
|
+
export declare const ELEVEN_SFX_DEFAULT_SECONDS = 4;
|
|
227
|
+
export declare const ELEVEN_V3_MAX_CHARACTERS = 5000;
|
|
228
|
+
export declare const SUNO_MIN_SECONDS = 10;
|
|
229
|
+
export declare const SUNO_MAX_SECONDS = 360;
|
|
230
|
+
export declare function audioCostKey(input: {
|
|
231
|
+
model: AudioModel;
|
|
232
|
+
/** seed-audio + eleven-sfx: the REQUESTED duration in seconds (ceiled). */
|
|
233
|
+
durationSeconds?: number;
|
|
234
|
+
/** eleven-v3: character count of the text to speak (ceiled to 100-char buckets). */
|
|
235
|
+
characters?: number;
|
|
236
|
+
}): string;
|
|
190
237
|
export declare const generateVideo: Operation<{
|
|
191
238
|
prompt: string;
|
|
192
239
|
model: string;
|
|
@@ -213,6 +260,34 @@ export declare const generateVideo: Operation<{
|
|
|
213
260
|
background?: boolean;
|
|
214
261
|
confirm?: boolean;
|
|
215
262
|
}>;
|
|
263
|
+
export declare const generateAudio: Operation<{
|
|
264
|
+
projectId: string;
|
|
265
|
+
model: AudioModel;
|
|
266
|
+
prompt: string;
|
|
267
|
+
durationSeconds?: number;
|
|
268
|
+
voice?: string;
|
|
269
|
+
stability?: number;
|
|
270
|
+
languageCode?: string;
|
|
271
|
+
speed?: number;
|
|
272
|
+
volume?: number;
|
|
273
|
+
pitch?: number;
|
|
274
|
+
multilingual?: boolean;
|
|
275
|
+
loop?: boolean;
|
|
276
|
+
promptInfluence?: number;
|
|
277
|
+
audioReferenceAssetIds?: string[];
|
|
278
|
+
imageReferenceAssetId?: string;
|
|
279
|
+
sunoModel?: 'V4' | 'V4_5' | 'V4_5PLUS' | 'V4_5ALL' | 'V5' | 'V5_5';
|
|
280
|
+
customMode?: boolean;
|
|
281
|
+
instrumental?: boolean;
|
|
282
|
+
style?: string;
|
|
283
|
+
title?: string;
|
|
284
|
+
negativeTags?: string;
|
|
285
|
+
vocalGender?: 'm' | 'f';
|
|
286
|
+
styleWeight?: number;
|
|
287
|
+
weirdnessConstraint?: number;
|
|
288
|
+
background?: boolean;
|
|
289
|
+
confirm?: boolean;
|
|
290
|
+
}>;
|
|
216
291
|
export declare const generateLipSync: Operation<{
|
|
217
292
|
projectId: string;
|
|
218
293
|
sourceAssetId: string;
|
|
@@ -377,7 +452,7 @@ export declare const updateEnvironment: Operation<{
|
|
|
377
452
|
name?: string;
|
|
378
453
|
description?: string;
|
|
379
454
|
style?: string;
|
|
380
|
-
|
|
455
|
+
referenceAssetId?: string | null;
|
|
381
456
|
}>;
|
|
382
457
|
export declare const deleteEnvironment: Operation<{
|
|
383
458
|
environmentId: string;
|