@nodaro/prompts 1.52.0 → 1.53.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.
@@ -42,18 +42,33 @@ declare const REF_BINDING: {
42
42
  readonly ordinal: (n: number) => string;
43
43
  readonly frame: (n: number, role: "opening" | "closing") => string;
44
44
  };
45
- /** A binding sentence's ordinal + frame directive in one provider syntax. */
45
+ /** How a video provider addresses its images in the prompt, by array order
46
+ * (`VideoReferenceSyntax` in @nodaro/shared). */
47
+ type ImageReferenceSyntax = "@image_N" | "@image(n)" | "[Image N]" | "image N";
48
+ /** The binding sentences — frames and identity references — in one provider syntax. */
46
49
  interface ImageBinding {
47
50
  ordinal: (n: number) => string;
51
+ /** One frame: the opening or the closing one. */
48
52
  frame: (n: number, role: "opening" | "closing") => string;
53
+ /** A start and an end frame together. */
54
+ frames: (first: number, last: number) => string;
55
+ /** Seats `first`..`last` are references, not frames. */
56
+ identities: (first: number, last: number) => string;
49
57
  }
50
58
  /**
51
59
  * The image binding in a provider's OWN reference syntax
52
60
  * (`videoProviderReferenceSyntax` in @nodaro/shared). `@image_N` IS
53
- * {@link REF_BINDING} — the platform swap point, byte for byte; the other two
54
- * spell the same sentence in the form the provider documents.
61
+ * {@link REF_BINDING} — the platform swap point, byte for byte; `@image(n)` and
62
+ * `[Image N]` spell the same sentences in the form the provider documents.
63
+ *
64
+ * `image N` (Gemini Omni Flash 1.2) is plain words, each sentence stating what
65
+ * an image IS: "image 3 is the opening (first) frame of the video. image 1 and
66
+ * image 2 are references for the subject; they are not frames." It is the form
67
+ * KIE's own example uses. In staging runs neither wording made 1.2 open on the
68
+ * frame: beside references the frame is one more reference, so the sentence
69
+ * guides the clip and never makes the frame exact.
55
70
  */
56
- declare function imageBindingFor(syntax: "@image_N" | "@image(n)" | "[Image N]"): ImageBinding;
71
+ declare function imageBindingFor(syntax: ImageReferenceSyntax): ImageBinding;
57
72
  /**
58
73
  * The instruction that makes Seedance EDIT a wired clip rather than use it as a
59
74
  * style reference — the Video to Video node's Seedance lane prepends it to the
@@ -886,7 +901,7 @@ interface FrameReferenceSlotsArgs {
886
901
  /** The provider's image cap — frames and references together. */
887
902
  imageCap: number;
888
903
  /** The provider's reference syntax (`videoProviderReferenceSyntax`). */
889
- syntax?: "@image_N" | "@image(n)" | "[Image N]";
904
+ syntax?: ImageReferenceSyntax;
890
905
  bindIdentities?: boolean;
891
906
  }
892
907
  interface FrameReferenceSlotsResult {
@@ -1103,4 +1118,4 @@ interface FrameDeliveryPlan {
1103
1118
  */
1104
1119
  declare function planFrameDelivery(args: FrameDeliveryPlanArgs): FrameDeliveryPlan;
1105
1120
 
1106
- export { type AssembleImageInput, type AssembleImageResult, type AssembleSunoInput, type AssembleSunoResult, type CharacterMeta, DirectionFields, type FrameDeliveryPlan, type FrameDeliveryPlanArgs, type FrameReferenceSlotsArgs, type FrameReferenceSlotsResult, type GeminiOmniI2vInputsArgs, type GeminiOmniI2vInputsResult, type ImageBinding, REF_BINDING, type RefIdTokenContext, type ReferenceCounts, type ResolveVideoReferenceCoreArgs, SEEDANCE_VIDEO_EDIT_PREFIX, type Seedance2InputsArgs, type Seedance2InputsResult, type Seedance2Mode, type SoundComposition, type SoundCompositionFields, type SoundConsumerType, SubjectFields, type VeoI2vInputsArgs, type VeoI2vInputsResult, type VideoExtraRef, type VideoPromptCapOptions, appendField, appendMusicMeta, assembleImageInput, assembleSunoInput, buildSeedanceVideoEditPrompt, buildSurroundFillPrompt, composeSoundHintFromConnections, composeVideoPromptText, getEffectiveSunoCustomMode, identityRefsSentence, imageBindingFor, placeFramesAfterReferences, planFrameDelivery, promptBindsFirstFrame, resolveGeminiOmniI2vInputs, resolveRefIdTokens, resolveReferenceTokens, resolveSeedance2Inputs, resolveVeoI2vInputs, resolveVideoReferenceCore, truncateForField };
1121
+ export { type AssembleImageInput, type AssembleImageResult, type AssembleSunoInput, type AssembleSunoResult, type CharacterMeta, DirectionFields, type FrameDeliveryPlan, type FrameDeliveryPlanArgs, type FrameReferenceSlotsArgs, type FrameReferenceSlotsResult, type GeminiOmniI2vInputsArgs, type GeminiOmniI2vInputsResult, type ImageBinding, type ImageReferenceSyntax, REF_BINDING, type RefIdTokenContext, type ReferenceCounts, type ResolveVideoReferenceCoreArgs, SEEDANCE_VIDEO_EDIT_PREFIX, type Seedance2InputsArgs, type Seedance2InputsResult, type Seedance2Mode, type SoundComposition, type SoundCompositionFields, type SoundConsumerType, SubjectFields, type VeoI2vInputsArgs, type VeoI2vInputsResult, type VideoExtraRef, type VideoPromptCapOptions, appendField, appendMusicMeta, assembleImageInput, assembleSunoInput, buildSeedanceVideoEditPrompt, buildSurroundFillPrompt, composeSoundHintFromConnections, composeVideoPromptText, getEffectiveSunoCustomMode, identityRefsSentence, imageBindingFor, placeFramesAfterReferences, planFrameDelivery, promptBindsFirstFrame, resolveGeminiOmniI2vInputs, resolveRefIdTokens, resolveReferenceTokens, resolveSeedance2Inputs, resolveVeoI2vInputs, resolveVideoReferenceCore, truncateForField };
@@ -42,18 +42,33 @@ declare const REF_BINDING: {
42
42
  readonly ordinal: (n: number) => string;
43
43
  readonly frame: (n: number, role: "opening" | "closing") => string;
44
44
  };
45
- /** A binding sentence's ordinal + frame directive in one provider syntax. */
45
+ /** How a video provider addresses its images in the prompt, by array order
46
+ * (`VideoReferenceSyntax` in @nodaro/shared). */
47
+ type ImageReferenceSyntax = "@image_N" | "@image(n)" | "[Image N]" | "image N";
48
+ /** The binding sentences — frames and identity references — in one provider syntax. */
46
49
  interface ImageBinding {
47
50
  ordinal: (n: number) => string;
51
+ /** One frame: the opening or the closing one. */
48
52
  frame: (n: number, role: "opening" | "closing") => string;
53
+ /** A start and an end frame together. */
54
+ frames: (first: number, last: number) => string;
55
+ /** Seats `first`..`last` are references, not frames. */
56
+ identities: (first: number, last: number) => string;
49
57
  }
50
58
  /**
51
59
  * The image binding in a provider's OWN reference syntax
52
60
  * (`videoProviderReferenceSyntax` in @nodaro/shared). `@image_N` IS
53
- * {@link REF_BINDING} — the platform swap point, byte for byte; the other two
54
- * spell the same sentence in the form the provider documents.
61
+ * {@link REF_BINDING} — the platform swap point, byte for byte; `@image(n)` and
62
+ * `[Image N]` spell the same sentences in the form the provider documents.
63
+ *
64
+ * `image N` (Gemini Omni Flash 1.2) is plain words, each sentence stating what
65
+ * an image IS: "image 3 is the opening (first) frame of the video. image 1 and
66
+ * image 2 are references for the subject; they are not frames." It is the form
67
+ * KIE's own example uses. In staging runs neither wording made 1.2 open on the
68
+ * frame: beside references the frame is one more reference, so the sentence
69
+ * guides the clip and never makes the frame exact.
55
70
  */
56
- declare function imageBindingFor(syntax: "@image_N" | "@image(n)" | "[Image N]"): ImageBinding;
71
+ declare function imageBindingFor(syntax: ImageReferenceSyntax): ImageBinding;
57
72
  /**
58
73
  * The instruction that makes Seedance EDIT a wired clip rather than use it as a
59
74
  * style reference — the Video to Video node's Seedance lane prepends it to the
@@ -886,7 +901,7 @@ interface FrameReferenceSlotsArgs {
886
901
  /** The provider's image cap — frames and references together. */
887
902
  imageCap: number;
888
903
  /** The provider's reference syntax (`videoProviderReferenceSyntax`). */
889
- syntax?: "@image_N" | "@image(n)" | "[Image N]";
904
+ syntax?: ImageReferenceSyntax;
890
905
  bindIdentities?: boolean;
891
906
  }
892
907
  interface FrameReferenceSlotsResult {
@@ -1103,4 +1118,4 @@ interface FrameDeliveryPlan {
1103
1118
  */
1104
1119
  declare function planFrameDelivery(args: FrameDeliveryPlanArgs): FrameDeliveryPlan;
1105
1120
 
1106
- export { type AssembleImageInput, type AssembleImageResult, type AssembleSunoInput, type AssembleSunoResult, type CharacterMeta, DirectionFields, type FrameDeliveryPlan, type FrameDeliveryPlanArgs, type FrameReferenceSlotsArgs, type FrameReferenceSlotsResult, type GeminiOmniI2vInputsArgs, type GeminiOmniI2vInputsResult, type ImageBinding, REF_BINDING, type RefIdTokenContext, type ReferenceCounts, type ResolveVideoReferenceCoreArgs, SEEDANCE_VIDEO_EDIT_PREFIX, type Seedance2InputsArgs, type Seedance2InputsResult, type Seedance2Mode, type SoundComposition, type SoundCompositionFields, type SoundConsumerType, SubjectFields, type VeoI2vInputsArgs, type VeoI2vInputsResult, type VideoExtraRef, type VideoPromptCapOptions, appendField, appendMusicMeta, assembleImageInput, assembleSunoInput, buildSeedanceVideoEditPrompt, buildSurroundFillPrompt, composeSoundHintFromConnections, composeVideoPromptText, getEffectiveSunoCustomMode, identityRefsSentence, imageBindingFor, placeFramesAfterReferences, planFrameDelivery, promptBindsFirstFrame, resolveGeminiOmniI2vInputs, resolveRefIdTokens, resolveReferenceTokens, resolveSeedance2Inputs, resolveVeoI2vInputs, resolveVideoReferenceCore, truncateForField };
1121
+ export { type AssembleImageInput, type AssembleImageResult, type AssembleSunoInput, type AssembleSunoResult, type CharacterMeta, DirectionFields, type FrameDeliveryPlan, type FrameDeliveryPlanArgs, type FrameReferenceSlotsArgs, type FrameReferenceSlotsResult, type GeminiOmniI2vInputsArgs, type GeminiOmniI2vInputsResult, type ImageBinding, type ImageReferenceSyntax, REF_BINDING, type RefIdTokenContext, type ReferenceCounts, type ResolveVideoReferenceCoreArgs, SEEDANCE_VIDEO_EDIT_PREFIX, type Seedance2InputsArgs, type Seedance2InputsResult, type Seedance2Mode, type SoundComposition, type SoundCompositionFields, type SoundConsumerType, SubjectFields, type VeoI2vInputsArgs, type VeoI2vInputsResult, type VideoExtraRef, type VideoPromptCapOptions, appendField, appendMusicMeta, assembleImageInput, assembleSunoInput, buildSeedanceVideoEditPrompt, buildSurroundFillPrompt, composeSoundHintFromConnections, composeVideoPromptText, getEffectiveSunoCustomMode, identityRefsSentence, imageBindingFor, placeFramesAfterReferences, planFrameDelivery, promptBindsFirstFrame, resolveGeminiOmniI2vInputs, resolveRefIdTokens, resolveReferenceTokens, resolveSeedance2Inputs, resolveVeoI2vInputs, resolveVideoReferenceCore, truncateForField };
@@ -1,4 +1,4 @@
1
- export { REF_BINDING, SEEDANCE_VIDEO_EDIT_PREFIX, appendField, appendMusicMeta, assembleImageInput, assembleSunoInput, buildSeedanceVideoEditPrompt, buildSurroundFillPrompt, composeSoundHintFromConnections, composeVideoPromptText, getEffectiveSunoCustomMode, identityRefsSentence, imageBindingFor, placeFramesAfterReferences, planFrameDelivery, promptBindsFirstFrame, resolveGeminiOmniI2vInputs, resolveRefIdTokens, resolveReferenceTokens, resolveSeedance2Inputs, resolveVeoI2vInputs, resolveVideoReferenceCore, truncateForField } from '../chunk-HETYHGGW.js';
1
+ export { REF_BINDING, SEEDANCE_VIDEO_EDIT_PREFIX, appendField, appendMusicMeta, assembleImageInput, assembleSunoInput, buildSeedanceVideoEditPrompt, buildSurroundFillPrompt, composeSoundHintFromConnections, composeVideoPromptText, getEffectiveSunoCustomMode, identityRefsSentence, imageBindingFor, placeFramesAfterReferences, planFrameDelivery, promptBindsFirstFrame, resolveGeminiOmniI2vInputs, resolveRefIdTokens, resolveReferenceTokens, resolveSeedance2Inputs, resolveVeoI2vInputs, resolveVideoReferenceCore, truncateForField } from '../chunk-XR7RAHZI.js';
2
2
  import '../chunk-YAIPYPMM.js';
3
3
  import '../chunk-GILUVQQJ.js';
4
4
  import '../chunk-JZOPMVGY.js';
package/dist/index.cjs CHANGED
@@ -4,7 +4,7 @@ var chunkGRSKB3P7_cjs = require('./chunk-GRSKB3P7.cjs');
4
4
  var chunkP4BXE4OA_cjs = require('./chunk-P4BXE4OA.cjs');
5
5
  var chunk2EW5B7ZV_cjs = require('./chunk-2EW5B7ZV.cjs');
6
6
  var chunkLXPKTI2K_cjs = require('./chunk-LXPKTI2K.cjs');
7
- var chunkM6EXNY42_cjs = require('./chunk-M6EXNY42.cjs');
7
+ var chunkEKRO42T3_cjs = require('./chunk-EKRO42T3.cjs');
8
8
  var chunkPWYASBX2_cjs = require('./chunk-PWYASBX2.cjs');
9
9
  require('./chunk-4GKTOVFM.cjs');
10
10
  var chunkXUZXBY75_cjs = require('./chunk-XUZXBY75.cjs');
@@ -274,95 +274,95 @@ Object.defineProperty(exports, "resolvePrompt", {
274
274
  });
275
275
  Object.defineProperty(exports, "REF_BINDING", {
276
276
  enumerable: true,
277
- get: function () { return chunkM6EXNY42_cjs.REF_BINDING; }
277
+ get: function () { return chunkEKRO42T3_cjs.REF_BINDING; }
278
278
  });
279
279
  Object.defineProperty(exports, "SEEDANCE_VIDEO_EDIT_PREFIX", {
280
280
  enumerable: true,
281
- get: function () { return chunkM6EXNY42_cjs.SEEDANCE_VIDEO_EDIT_PREFIX; }
281
+ get: function () { return chunkEKRO42T3_cjs.SEEDANCE_VIDEO_EDIT_PREFIX; }
282
282
  });
283
283
  Object.defineProperty(exports, "appendField", {
284
284
  enumerable: true,
285
- get: function () { return chunkM6EXNY42_cjs.appendField; }
285
+ get: function () { return chunkEKRO42T3_cjs.appendField; }
286
286
  });
287
287
  Object.defineProperty(exports, "appendMusicMeta", {
288
288
  enumerable: true,
289
- get: function () { return chunkM6EXNY42_cjs.appendMusicMeta; }
289
+ get: function () { return chunkEKRO42T3_cjs.appendMusicMeta; }
290
290
  });
291
291
  Object.defineProperty(exports, "assembleImageInput", {
292
292
  enumerable: true,
293
- get: function () { return chunkM6EXNY42_cjs.assembleImageInput; }
293
+ get: function () { return chunkEKRO42T3_cjs.assembleImageInput; }
294
294
  });
295
295
  Object.defineProperty(exports, "assembleSunoInput", {
296
296
  enumerable: true,
297
- get: function () { return chunkM6EXNY42_cjs.assembleSunoInput; }
297
+ get: function () { return chunkEKRO42T3_cjs.assembleSunoInput; }
298
298
  });
299
299
  Object.defineProperty(exports, "buildSeedanceVideoEditPrompt", {
300
300
  enumerable: true,
301
- get: function () { return chunkM6EXNY42_cjs.buildSeedanceVideoEditPrompt; }
301
+ get: function () { return chunkEKRO42T3_cjs.buildSeedanceVideoEditPrompt; }
302
302
  });
303
303
  Object.defineProperty(exports, "buildSurroundFillPrompt", {
304
304
  enumerable: true,
305
- get: function () { return chunkM6EXNY42_cjs.buildSurroundFillPrompt; }
305
+ get: function () { return chunkEKRO42T3_cjs.buildSurroundFillPrompt; }
306
306
  });
307
307
  Object.defineProperty(exports, "composeSoundHintFromConnections", {
308
308
  enumerable: true,
309
- get: function () { return chunkM6EXNY42_cjs.composeSoundHintFromConnections; }
309
+ get: function () { return chunkEKRO42T3_cjs.composeSoundHintFromConnections; }
310
310
  });
311
311
  Object.defineProperty(exports, "composeVideoPromptText", {
312
312
  enumerable: true,
313
- get: function () { return chunkM6EXNY42_cjs.composeVideoPromptText; }
313
+ get: function () { return chunkEKRO42T3_cjs.composeVideoPromptText; }
314
314
  });
315
315
  Object.defineProperty(exports, "getEffectiveSunoCustomMode", {
316
316
  enumerable: true,
317
- get: function () { return chunkM6EXNY42_cjs.getEffectiveSunoCustomMode; }
317
+ get: function () { return chunkEKRO42T3_cjs.getEffectiveSunoCustomMode; }
318
318
  });
319
319
  Object.defineProperty(exports, "identityRefsSentence", {
320
320
  enumerable: true,
321
- get: function () { return chunkM6EXNY42_cjs.identityRefsSentence; }
321
+ get: function () { return chunkEKRO42T3_cjs.identityRefsSentence; }
322
322
  });
323
323
  Object.defineProperty(exports, "imageBindingFor", {
324
324
  enumerable: true,
325
- get: function () { return chunkM6EXNY42_cjs.imageBindingFor; }
325
+ get: function () { return chunkEKRO42T3_cjs.imageBindingFor; }
326
326
  });
327
327
  Object.defineProperty(exports, "placeFramesAfterReferences", {
328
328
  enumerable: true,
329
- get: function () { return chunkM6EXNY42_cjs.placeFramesAfterReferences; }
329
+ get: function () { return chunkEKRO42T3_cjs.placeFramesAfterReferences; }
330
330
  });
331
331
  Object.defineProperty(exports, "planFrameDelivery", {
332
332
  enumerable: true,
333
- get: function () { return chunkM6EXNY42_cjs.planFrameDelivery; }
333
+ get: function () { return chunkEKRO42T3_cjs.planFrameDelivery; }
334
334
  });
335
335
  Object.defineProperty(exports, "promptBindsFirstFrame", {
336
336
  enumerable: true,
337
- get: function () { return chunkM6EXNY42_cjs.promptBindsFirstFrame; }
337
+ get: function () { return chunkEKRO42T3_cjs.promptBindsFirstFrame; }
338
338
  });
339
339
  Object.defineProperty(exports, "resolveGeminiOmniI2vInputs", {
340
340
  enumerable: true,
341
- get: function () { return chunkM6EXNY42_cjs.resolveGeminiOmniI2vInputs; }
341
+ get: function () { return chunkEKRO42T3_cjs.resolveGeminiOmniI2vInputs; }
342
342
  });
343
343
  Object.defineProperty(exports, "resolveRefIdTokens", {
344
344
  enumerable: true,
345
- get: function () { return chunkM6EXNY42_cjs.resolveRefIdTokens; }
345
+ get: function () { return chunkEKRO42T3_cjs.resolveRefIdTokens; }
346
346
  });
347
347
  Object.defineProperty(exports, "resolveReferenceTokens", {
348
348
  enumerable: true,
349
- get: function () { return chunkM6EXNY42_cjs.resolveReferenceTokens; }
349
+ get: function () { return chunkEKRO42T3_cjs.resolveReferenceTokens; }
350
350
  });
351
351
  Object.defineProperty(exports, "resolveSeedance2Inputs", {
352
352
  enumerable: true,
353
- get: function () { return chunkM6EXNY42_cjs.resolveSeedance2Inputs; }
353
+ get: function () { return chunkEKRO42T3_cjs.resolveSeedance2Inputs; }
354
354
  });
355
355
  Object.defineProperty(exports, "resolveVeoI2vInputs", {
356
356
  enumerable: true,
357
- get: function () { return chunkM6EXNY42_cjs.resolveVeoI2vInputs; }
357
+ get: function () { return chunkEKRO42T3_cjs.resolveVeoI2vInputs; }
358
358
  });
359
359
  Object.defineProperty(exports, "resolveVideoReferenceCore", {
360
360
  enumerable: true,
361
- get: function () { return chunkM6EXNY42_cjs.resolveVideoReferenceCore; }
361
+ get: function () { return chunkEKRO42T3_cjs.resolveVideoReferenceCore; }
362
362
  });
363
363
  Object.defineProperty(exports, "truncateForField", {
364
364
  enumerable: true,
365
- get: function () { return chunkM6EXNY42_cjs.truncateForField; }
365
+ get: function () { return chunkEKRO42T3_cjs.truncateForField; }
366
366
  });
367
367
  Object.defineProperty(exports, "ANGLE_LABELS", {
368
368
  enumerable: true,
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { P as PICKER_CATALOGS, a as PickerCatalog, b as PickerCatalogDetail, c as PickerCatalogSummary, d as PickerDimension, e as PickerOption, f as ProjectPickerCatalogOptions, g as ProjectedPickerCatalog, h as ProjectedPickerDimension, i as ProjectedPickerOption, j as getPickerCatalog, k as getRegisteredPickerCatalogs, l as listPickerCatalogs, p as projectAllCatalogs, m as projectPickerCatalog, s as summarizePickerCatalogs } from './picker-catalogs-DzLCu6qQ.cjs';
2
- export { AssembleImageInput, AssembleImageResult, AssembleSunoInput, AssembleSunoResult, CharacterMeta, FrameDeliveryPlan, FrameDeliveryPlanArgs, FrameReferenceSlotsArgs, FrameReferenceSlotsResult, GeminiOmniI2vInputsArgs, GeminiOmniI2vInputsResult, ImageBinding, REF_BINDING, RefIdTokenContext, ReferenceCounts, ResolveVideoReferenceCoreArgs, SEEDANCE_VIDEO_EDIT_PREFIX, Seedance2InputsArgs, Seedance2InputsResult, Seedance2Mode, SoundComposition, SoundCompositionFields, SoundConsumerType, VeoI2vInputsArgs, VeoI2vInputsResult, VideoExtraRef, VideoPromptCapOptions, appendField, appendMusicMeta, assembleImageInput, assembleSunoInput, buildSeedanceVideoEditPrompt, buildSurroundFillPrompt, composeSoundHintFromConnections, composeVideoPromptText, getEffectiveSunoCustomMode, identityRefsSentence, imageBindingFor, placeFramesAfterReferences, planFrameDelivery, promptBindsFirstFrame, resolveGeminiOmniI2vInputs, resolveRefIdTokens, resolveReferenceTokens, resolveSeedance2Inputs, resolveVeoI2vInputs, resolveVideoReferenceCore, truncateForField } from './entries/assembly.cjs';
2
+ export { AssembleImageInput, AssembleImageResult, AssembleSunoInput, AssembleSunoResult, CharacterMeta, FrameDeliveryPlan, FrameDeliveryPlanArgs, FrameReferenceSlotsArgs, FrameReferenceSlotsResult, GeminiOmniI2vInputsArgs, GeminiOmniI2vInputsResult, ImageBinding, ImageReferenceSyntax, REF_BINDING, RefIdTokenContext, ReferenceCounts, ResolveVideoReferenceCoreArgs, SEEDANCE_VIDEO_EDIT_PREFIX, Seedance2InputsArgs, Seedance2InputsResult, Seedance2Mode, SoundComposition, SoundCompositionFields, SoundConsumerType, VeoI2vInputsArgs, VeoI2vInputsResult, VideoExtraRef, VideoPromptCapOptions, appendField, appendMusicMeta, assembleImageInput, assembleSunoInput, buildSeedanceVideoEditPrompt, buildSurroundFillPrompt, composeSoundHintFromConnections, composeVideoPromptText, getEffectiveSunoCustomMode, identityRefsSentence, imageBindingFor, placeFramesAfterReferences, planFrameDelivery, promptBindsFirstFrame, resolveGeminiOmniI2vInputs, resolveRefIdTokens, resolveReferenceTokens, resolveSeedance2Inputs, resolveVeoI2vInputs, resolveVideoReferenceCore, truncateForField } from './entries/assembly.cjs';
3
3
  export { P as PickerHintMode, S as SuspiciousTermOptions, T as TERM_MAX_CHARS, a as TermCarrier, d as deriveTerm, i as isSuspiciousDerivedTerm, r as resolveTerm } from './term-C01_g6s1.cjs';
4
4
  export { C as CatalogPack, a as CatalogPackMode, P as PickerCatalogInput, b as PickerDimensionInput, c as PickerOptionInput, d as catalogPacksVersion, e as composePickerCatalogs, g as getRegisteredCatalogPacks, h as hasCatalogPacksFor, r as registerCatalogPack, f as resetCatalogPacks, s as subscribeCatalogPacks } from './catalog-packs-DeMcSVCR.cjs';
5
5
  export { SidecarCoverageReport, computePackSidecarCoverage } from './entries/catalog-packs.cjs';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { P as PICKER_CATALOGS, a as PickerCatalog, b as PickerCatalogDetail, c as PickerCatalogSummary, d as PickerDimension, e as PickerOption, f as ProjectPickerCatalogOptions, g as ProjectedPickerCatalog, h as ProjectedPickerDimension, i as ProjectedPickerOption, j as getPickerCatalog, k as getRegisteredPickerCatalogs, l as listPickerCatalogs, p as projectAllCatalogs, m as projectPickerCatalog, s as summarizePickerCatalogs } from './picker-catalogs-SDSWrufc.js';
2
- export { AssembleImageInput, AssembleImageResult, AssembleSunoInput, AssembleSunoResult, CharacterMeta, FrameDeliveryPlan, FrameDeliveryPlanArgs, FrameReferenceSlotsArgs, FrameReferenceSlotsResult, GeminiOmniI2vInputsArgs, GeminiOmniI2vInputsResult, ImageBinding, REF_BINDING, RefIdTokenContext, ReferenceCounts, ResolveVideoReferenceCoreArgs, SEEDANCE_VIDEO_EDIT_PREFIX, Seedance2InputsArgs, Seedance2InputsResult, Seedance2Mode, SoundComposition, SoundCompositionFields, SoundConsumerType, VeoI2vInputsArgs, VeoI2vInputsResult, VideoExtraRef, VideoPromptCapOptions, appendField, appendMusicMeta, assembleImageInput, assembleSunoInput, buildSeedanceVideoEditPrompt, buildSurroundFillPrompt, composeSoundHintFromConnections, composeVideoPromptText, getEffectiveSunoCustomMode, identityRefsSentence, imageBindingFor, placeFramesAfterReferences, planFrameDelivery, promptBindsFirstFrame, resolveGeminiOmniI2vInputs, resolveRefIdTokens, resolveReferenceTokens, resolveSeedance2Inputs, resolveVeoI2vInputs, resolveVideoReferenceCore, truncateForField } from './entries/assembly.js';
2
+ export { AssembleImageInput, AssembleImageResult, AssembleSunoInput, AssembleSunoResult, CharacterMeta, FrameDeliveryPlan, FrameDeliveryPlanArgs, FrameReferenceSlotsArgs, FrameReferenceSlotsResult, GeminiOmniI2vInputsArgs, GeminiOmniI2vInputsResult, ImageBinding, ImageReferenceSyntax, REF_BINDING, RefIdTokenContext, ReferenceCounts, ResolveVideoReferenceCoreArgs, SEEDANCE_VIDEO_EDIT_PREFIX, Seedance2InputsArgs, Seedance2InputsResult, Seedance2Mode, SoundComposition, SoundCompositionFields, SoundConsumerType, VeoI2vInputsArgs, VeoI2vInputsResult, VideoExtraRef, VideoPromptCapOptions, appendField, appendMusicMeta, assembleImageInput, assembleSunoInput, buildSeedanceVideoEditPrompt, buildSurroundFillPrompt, composeSoundHintFromConnections, composeVideoPromptText, getEffectiveSunoCustomMode, identityRefsSentence, imageBindingFor, placeFramesAfterReferences, planFrameDelivery, promptBindsFirstFrame, resolveGeminiOmniI2vInputs, resolveRefIdTokens, resolveReferenceTokens, resolveSeedance2Inputs, resolveVeoI2vInputs, resolveVideoReferenceCore, truncateForField } from './entries/assembly.js';
3
3
  export { P as PickerHintMode, S as SuspiciousTermOptions, T as TERM_MAX_CHARS, a as TermCarrier, d as deriveTerm, i as isSuspiciousDerivedTerm, r as resolveTerm } from './term-C01_g6s1.js';
4
4
  export { C as CatalogPack, a as CatalogPackMode, P as PickerCatalogInput, b as PickerDimensionInput, c as PickerOptionInput, d as catalogPacksVersion, e as composePickerCatalogs, g as getRegisteredCatalogPacks, h as hasCatalogPacksFor, r as registerCatalogPack, f as resetCatalogPacks, s as subscribeCatalogPacks } from './catalog-packs-DjqvicAR.js';
5
5
  export { SidecarCoverageReport, computePackSidecarCoverage } from './entries/catalog-packs.js';
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ export { BODY_CAPTIONS_PRESET_ID, BRAND_PRESETS, BRAND_PRESET_IDS, BRAND_PRESET_
2
2
  export { readDirectionFields, readStructuredFields, readSubjectFields } from './chunk-ZRORO6OM.js';
3
3
  export { TEXT_REQUIRED_NODE_TYPES, WIRED_OUTPUT_NODE_TYPES, computeAiWriterInput, computeNodeSendText, stripAudioTags } from './chunk-YS6HOWMW.js';
4
4
  export { NODE_PROMPT_CANDIDATE_FIELDS, NODE_PROMPT_FIELDS, PROMPT_AFFIX_CORE_FIELD_OVERRIDES, PROMPT_AFFIX_NODE_TYPES, applyPromptAffixes, composeNegative, computeLlmChatFields, computeNodePrompt, computeScriptTopic, getPromptFields, getSnippetMedia, joinPromptParts, nodeHasInlinePrompt, nodeHasPromptField, nodeSupportsPromptAffixes, promptAffixCoreField, promptFieldCarriesAffixes, promptPartSeparator, resolvePrompt } from './chunk-N6VMPG5S.js';
5
- export { REF_BINDING, SEEDANCE_VIDEO_EDIT_PREFIX, appendField, appendMusicMeta, assembleImageInput, assembleSunoInput, buildSeedanceVideoEditPrompt, buildSurroundFillPrompt, composeSoundHintFromConnections, composeVideoPromptText, getEffectiveSunoCustomMode, identityRefsSentence, imageBindingFor, placeFramesAfterReferences, planFrameDelivery, promptBindsFirstFrame, resolveGeminiOmniI2vInputs, resolveRefIdTokens, resolveReferenceTokens, resolveSeedance2Inputs, resolveVeoI2vInputs, resolveVideoReferenceCore, truncateForField } from './chunk-HETYHGGW.js';
5
+ export { REF_BINDING, SEEDANCE_VIDEO_EDIT_PREFIX, appendField, appendMusicMeta, assembleImageInput, assembleSunoInput, buildSeedanceVideoEditPrompt, buildSurroundFillPrompt, composeSoundHintFromConnections, composeVideoPromptText, getEffectiveSunoCustomMode, identityRefsSentence, imageBindingFor, placeFramesAfterReferences, planFrameDelivery, promptBindsFirstFrame, resolveGeminiOmniI2vInputs, resolveRefIdTokens, resolveReferenceTokens, resolveSeedance2Inputs, resolveVeoI2vInputs, resolveVideoReferenceCore, truncateForField } from './chunk-XR7RAHZI.js';
6
6
  export { ANGLE_LABELS, ASPECT_RATIO_LABELS, MAX_SUBJECT_KEYS, MOVEMENT_LABELS, SCENE_PROMPT_MAX_LENGTH, SHOT_LABELS, STYLE_SECTION_GAP, STYLE_SECTION_HEADER, SUBJECT_ARRAY_CEILING, SUBJECT_CUSTOM_AGE_KEY, SUBJECT_FIELDS, SUBJECT_FOLD_KEYS, SUBJECT_ID_MAX_CHARS, SUBJECT_IMAGE_HINT_MODE_DEFAULT, SUBJECT_KEYS, SUBJECT_KEY_MAX_CHARS, SUBJECT_VIDEO_HINT_MODE_DEFAULT, appendReferenceLines, applyReferenceOrderToVideo, asBodyClauses, buildIdentityDirectives, buildImagePrompt, buildImagePromptSegments, buildImagePromptWithOverflow, buildReferenceBlocks, buildScenePrompt, composeSectionedPrompt, endsInsideStyleSection, expandImagePositionRefs, expandImageRefTokens, getRegisteredSubjectKeys, insertBeforeStyleSection, normalizeSubjectFields, partitionStyleClauses, referenceDescriptionLine, renderDescribedReferenceLines, renderReferenceCaptionLines, renderStructuredFields, renderStyleSection, renderSubjectHints, resolveCharacterMentions, resolveLocationMentions, sectionedClauseCosts, splitStyleSection, styleSectionFromClauses, styleSlotFor, subjectFieldsForSurface, truncateText } from './chunk-YAIPYPMM.js';
7
7
  import './chunk-GILUVQQJ.js';
8
8
  export { keepableDirectionHints } from './chunk-JZOPMVGY.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodaro/prompts",
3
- "version": "1.52.0",
3
+ "version": "1.53.0",
4
4
  "description": "Nodaro's prompt-engineering layer — person/picker catalogs with prompt hints, identity-lock clauses, entity prompt builders, brand presets, and prompt/reference assembly shared by the Nodaro platform and SDK.",
5
5
  "type": "module",
6
6
  "license": "FSL-1.1-Apache-2.0",
@@ -70,7 +70,7 @@
70
70
  "test": "vitest run"
71
71
  },
72
72
  "dependencies": {
73
- "@nodaro/shared": "^3.57.0"
73
+ "@nodaro/shared": "^3.58.0"
74
74
  },
75
75
  "devDependencies": {
76
76
  "tsup": "^8.5.0",
@@ -30,6 +30,22 @@ describe("placeFramesAfterReferences", () => {
30
30
  )
31
31
  })
32
32
 
33
+ it("writes plain `image N` sentences that say what each image is", () => {
34
+ const start = placeFramesAfterReferences({ firstFrameUrl: "F", refImageUrls: R(2), imageCap: 6, syntax: "image N", bindIdentities: true })
35
+ expect(start.promptSuffix).toBe(
36
+ "image 3 is the opening (first) frame of the video. image 1 and image 2 are references for the subject; they are not frames.",
37
+ )
38
+ const both = placeFramesAfterReferences({ firstFrameUrl: "F", lastFrameUrl: "L", refImageUrls: R(3), imageCap: 6, syntax: "image N", bindIdentities: true })
39
+ expect(both.promptSuffix).toBe(
40
+ "image 4 is the opening (first) frame and image 5 is the closing (last) frame of the video. image 1, image 2 and image 3 are references for the subject; they are not frames.",
41
+ )
42
+ const one = placeFramesAfterReferences({ lastFrameUrl: "L", refImageUrls: R(1), imageCap: 6, syntax: "image N", bindIdentities: true })
43
+ expect(one.promptSuffix).toBe("image 2 is the closing (last) frame of the video. image 1 is a reference for the subject; it is not a frame.")
44
+ // Never the platform's `@image_N` duplicate check: a prompt carrying it is not this syntax's binding.
45
+ const prompted = placeFramesAfterReferences({ prompt: "use @image_2 as the first frame", firstFrameUrl: "F", refImageUrls: R(1), imageCap: 6, syntax: "image N" })
46
+ expect(prompted.promptSuffix).toBe("image 2 is the opening (first) frame of the video.")
47
+ })
48
+
33
49
  it("skips the opening sentence when the prompt already binds it (@image_N form)", () => {
34
50
  const r = placeFramesAfterReferences({ prompt: "use @image_2 as the first frame", firstFrameUrl: "F", refImageUrls: R(1), imageCap: 9 })
35
51
  expect(r.promptSuffix).toBe("")
@@ -1,4 +1,4 @@
1
- import { identityRefsSentence, imageBindingFor } from "./ref-binding.js"
1
+ import { imageBindingFor, type ImageReferenceSyntax } from "./ref-binding.js"
2
2
 
3
3
  /**
4
4
  * WHERE A START / END FRAME GOES WHEN IT SHARES A MODEL'S REFERENCE LIST — the
@@ -29,7 +29,7 @@ export interface FrameReferenceSlotsArgs {
29
29
  /** The provider's image cap — frames and references together. */
30
30
  imageCap: number
31
31
  /** The provider's reference syntax (`videoProviderReferenceSyntax`). */
32
- syntax?: "@image_N" | "@image(n)" | "[Image N]"
32
+ syntax?: ImageReferenceSyntax
33
33
  bindIdentities?: boolean
34
34
  }
35
35
 
@@ -65,14 +65,14 @@ export function placeFramesAfterReferences(args: FrameReferenceSlotsArgs): Frame
65
65
  if (promptBindsStart && firstFrameOrdinal > 0 && lastFrameOrdinal === 0) {
66
66
  // The prompt already binds the first frame at its own (working) position.
67
67
  } else if (firstFrameOrdinal > 0 && lastFrameOrdinal > 0) {
68
- frameSentence = `Use ${binding.ordinal(firstFrameOrdinal)} as the opening (first) frame and ${binding.ordinal(lastFrameOrdinal)} as the closing (last) frame of the video.`
68
+ frameSentence = binding.frames(firstFrameOrdinal, lastFrameOrdinal)
69
69
  } else if (firstFrameOrdinal > 0) {
70
70
  frameSentence = binding.frame(firstFrameOrdinal, "opening")
71
71
  } else if (lastFrameOrdinal > 0) {
72
72
  frameSentence = binding.frame(lastFrameOrdinal, "closing")
73
73
  }
74
74
  const identitySentence = args.bindIdentities && kept.length > 0 && frameCount > 0
75
- ? identityRefsSentence(1, kept.length, binding.ordinal)
75
+ ? binding.identities(1, kept.length)
76
76
  : ""
77
77
  const promptSuffix = [frameSentence, identitySentence].filter(Boolean).join(" ")
78
78
  return { imageUrls, promptSuffix, droppedRefImages, firstFrameOrdinal, lastFrameOrdinal }
@@ -48,24 +48,61 @@ export const REF_BINDING = {
48
48
  `Use @image_${n} as the ${role} (${role === "opening" ? "first" : "last"}) frame of the video.`,
49
49
  } as const
50
50
 
51
- /** A binding sentence's ordinal + frame directive in one provider syntax. */
51
+ /** How a video provider addresses its images in the prompt, by array order
52
+ * (`VideoReferenceSyntax` in @nodaro/shared). */
53
+ export type ImageReferenceSyntax = "@image_N" | "@image(n)" | "[Image N]" | "image N"
54
+
55
+ /** The binding sentences — frames and identity references — in one provider syntax. */
52
56
  export interface ImageBinding {
53
57
  ordinal: (n: number) => string
58
+ /** One frame: the opening or the closing one. */
54
59
  frame: (n: number, role: "opening" | "closing") => string
60
+ /** A start and an end frame together. */
61
+ frames: (first: number, last: number) => string
62
+ /** Seats `first`..`last` are references, not frames. */
63
+ identities: (first: number, last: number) => string
64
+ }
65
+
66
+ const roleWords = (role: "opening" | "closing") => `${role} (${role === "opening" ? "first" : "last"})`
67
+
68
+ /** "image 1", "image 1 and image 2", "image 1, image 2 and image 3". */
69
+ function plainList(first: number, last: number): string {
70
+ const names = Array.from({ length: last - first + 1 }, (_, i) => `image ${first + i}`)
71
+ return names.length === 1 ? names[0] : `${names.slice(0, -1).join(", ")} and ${names[names.length - 1]}`
55
72
  }
56
73
 
57
74
  /**
58
75
  * The image binding in a provider's OWN reference syntax
59
76
  * (`videoProviderReferenceSyntax` in @nodaro/shared). `@image_N` IS
60
- * {@link REF_BINDING} — the platform swap point, byte for byte; the other two
61
- * spell the same sentence in the form the provider documents.
77
+ * {@link REF_BINDING} — the platform swap point, byte for byte; `@image(n)` and
78
+ * `[Image N]` spell the same sentences in the form the provider documents.
79
+ *
80
+ * `image N` (Gemini Omni Flash 1.2) is plain words, each sentence stating what
81
+ * an image IS: "image 3 is the opening (first) frame of the video. image 1 and
82
+ * image 2 are references for the subject; they are not frames." It is the form
83
+ * KIE's own example uses. In staging runs neither wording made 1.2 open on the
84
+ * frame: beside references the frame is one more reference, so the sentence
85
+ * guides the clip and never makes the frame exact.
62
86
  */
63
- export function imageBindingFor(syntax: "@image_N" | "@image(n)" | "[Image N]"): ImageBinding {
64
- if (syntax === "@image_N") return { ordinal: REF_BINDING.ordinal, frame: REF_BINDING.frame }
65
- const ordinal = syntax === "@image(n)" ? (n: number) => `@image(${n})` : (n: number) => `[Image ${n}]`
87
+ export function imageBindingFor(syntax: ImageReferenceSyntax): ImageBinding {
88
+ if (syntax === "image N") {
89
+ return {
90
+ ordinal: (n) => `image ${n}`,
91
+ frame: (n, role) => `image ${n} is the ${roleWords(role)} frame of the video.`,
92
+ frames: (first, last) => `image ${first} is the ${roleWords("opening")} frame and image ${last} is the ${roleWords("closing")} frame of the video.`,
93
+ identities: (first, last) => first === last
94
+ ? `image ${first} is a reference for the subject; it is not a frame.`
95
+ : `${plainList(first, last)} are references for the subject; they are not frames.`,
96
+ }
97
+ }
98
+ const ordinal = syntax === "@image_N"
99
+ ? REF_BINDING.ordinal
100
+ : syntax === "@image(n)" ? (n: number) => `@image(${n})` : (n: number) => `[Image ${n}]`
66
101
  return {
67
102
  ordinal,
68
- frame: (n, role) => `Use ${ordinal(n)} as the ${role} (${role === "opening" ? "first" : "last"}) frame of the video.`,
103
+ frame: syntax === "@image_N" ? REF_BINDING.frame : (n, role) => `Use ${ordinal(n)} as the ${roleWords(role)} frame of the video.`,
104
+ frames: (first, last) => `Use ${ordinal(first)} as the ${roleWords("opening")} frame and ${ordinal(last)} as the ${roleWords("closing")} frame of the video.`,
105
+ identities: (first, last) => identityRefsSentence(first, last, ordinal),
69
106
  }
70
107
  }
71
108
 
@@ -54,7 +54,7 @@ import { tidyReferenceTokenGaps, unboundReferenceTokenText } from "./unbound-ref
54
54
  // The binding surface string and the id-addressed token resolver live in their
55
55
  // own modules (see them for the contracts); re-exported here so every existing
56
56
  // importer of this module — and the package index's `export *` — keeps working.
57
- export { REF_BINDING, identityRefsSentence, imageBindingFor, SEEDANCE_VIDEO_EDIT_PREFIX, buildSeedanceVideoEditPrompt, type ImageBinding } from "./ref-binding.js"
57
+ export { REF_BINDING, identityRefsSentence, imageBindingFor, SEEDANCE_VIDEO_EDIT_PREFIX, buildSeedanceVideoEditPrompt, type ImageBinding, type ImageReferenceSyntax } from "./ref-binding.js"
58
58
  export { resolveRefIdTokens, type RefIdTokenContext } from "./ref-id-tokens.js"
59
59
 
60
60