@nodaro/prompts 1.53.2 → 1.54.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.
Files changed (43) hide show
  1. package/dist/{chunk-GRSKB3P7.cjs → chunk-56HWABF5.cjs} +52 -2
  2. package/dist/chunk-56HWABF5.cjs.map +1 -0
  3. package/dist/{chunk-EKRO42T3.cjs → chunk-CDNW7O7H.cjs} +77 -5
  4. package/dist/chunk-CDNW7O7H.cjs.map +1 -0
  5. package/dist/{chunk-WQ7FWGZ2.js → chunk-IVRSNUYX.js} +50 -3
  6. package/dist/chunk-IVRSNUYX.js.map +1 -0
  7. package/dist/{chunk-XRCK3BCF.cjs → chunk-XUMEDRML.cjs} +52 -10
  8. package/dist/chunk-XUMEDRML.cjs.map +1 -0
  9. package/dist/{chunk-PHCYQWJP.js → chunk-YDG3KMCN.js} +52 -10
  10. package/dist/chunk-YDG3KMCN.js.map +1 -0
  11. package/dist/{chunk-XR7RAHZI.js → chunk-Z4KWM6DV.js} +77 -5
  12. package/dist/chunk-Z4KWM6DV.js.map +1 -0
  13. package/dist/entries/assembly.cjs +24 -24
  14. package/dist/entries/assembly.d.cts +9 -0
  15. package/dist/entries/assembly.d.ts +9 -0
  16. package/dist/entries/assembly.js +1 -1
  17. package/dist/entries/doctrine.cjs +46 -46
  18. package/dist/entries/doctrine.js +1 -1
  19. package/dist/entries/presets.cjs +47 -35
  20. package/dist/entries/presets.d.cts +17 -1
  21. package/dist/entries/presets.d.ts +17 -1
  22. package/dist/entries/presets.js +1 -1
  23. package/dist/index.cjs +117 -105
  24. package/dist/index.d.cts +1 -1
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.js +3 -3
  27. package/package.json +2 -2
  28. package/src/__tests__/factory-preset-shelves.test.ts +30 -0
  29. package/src/__tests__/seedance-extend.test.ts +24 -25
  30. package/src/__tests__/video-reference-features.test.ts +7 -5
  31. package/src/__tests__/video-reference-seatless-assets.test.ts +132 -0
  32. package/src/factory-presets/index.ts +2 -0
  33. package/src/factory-presets/shelves.ts +50 -0
  34. package/src/prompt-wizard-categories.ts +12 -3
  35. package/src/provider-prompt-doctrine.ts +44 -5
  36. package/src/seatless-assets.ts +141 -0
  37. package/src/video-reference-resolver.ts +31 -4
  38. package/dist/chunk-EKRO42T3.cjs.map +0 -1
  39. package/dist/chunk-GRSKB3P7.cjs.map +0 -1
  40. package/dist/chunk-PHCYQWJP.js.map +0 -1
  41. package/dist/chunk-WQ7FWGZ2.js.map +0 -1
  42. package/dist/chunk-XR7RAHZI.js.map +0 -1
  43. package/dist/chunk-XRCK3BCF.cjs.map +0 -1
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@ export { CHARACTER_ART_FAMILIES, CHARACTER_ART_FILES, CHARACTER_ART_PATH, Charac
9
9
  export { P as PickerImageOptions, a as PickerOptionImage, R as RENDER_WIDTH_LADDER, l as lookPreviewStillUrl, p as pickerOptionImage, b as pickerOptionImageUrl, c as pickerSectionImageUrl } from './images-ChAOLY5V.js';
10
10
  export { ADULT_AGE_IDS, ADULT_ONLY_FLAG, ADULT_SWEPT_CATALOG_IDS, ALL_PICKER_WIRING, ANALYZABLE_PICKER_TYPES, AdultOnlyEntry, FLOORED_PICKER_KEYS, ForeignCatalogId, GAPS_SCHEMA, MINOR_IMPLYING_TYPE_IDS, MULTI_PICKER_WIRING, MultiDimPickerWiring, MultiPickerAnalyzerSpec, PICKER_ANALYZER_FAMILIES, PICKER_ANALYZER_REGISTRY, PICKER_TYPES, ParameterHintOptions, PickerAnalyzer, PickerAnalyzerDescriptor, PickerAnalyzerSpec, PickerApplyMode, PickerDimensionSpec, PickerGaps, PickerType, PickerWiring, PickerWiringEntry, RETIRED_ADULT_ONLY_HINT_STRINGS, SINGLE_PICKER_WIRING, SingleDimPickerWiring, __resetCatalogIdGuardForTests, applyMinorAgeFloorToPickerValues, applyPickerJson, buildMultiPickerAnalyzerSpec, buildNeedleAlternationSource, buildPickerAnalyzerSpec, buildPickerLegend, buildPickerZodSchema, catalogGuardActive, composedHas, composedOption, composedOptionIndex, containsMinorAgeHint, curateEntries, curatedAnimalPromptHint, curatedAnimalTerm, curatedFurnitureText, curatedVehicleText, curatedWeaponText, findForeignCatalogIds, findForeignCatalogIdsInBody, foreignCatalogIdMessage, getAdultOnlyEntries, getAdultOnlyHintStrings, getAdultOnlyIds, getCharacterMotionBindings, getMinorAgeHintStrings, getParameterPromptHint, getPickerAnalyzer, getPickerWiring, isAnalyzablePicker, isMinorAge, overlayEntry, pickerFanoutTargets, setComposedCatalogResolver } from './entries/picker-catalogs.js';
11
11
  export { ACTION_FX, ACTION_FX_CATEGORY_LABELS, ACTION_FX_CATEGORY_ORDER, ACTION_FX_IDS, AESTHETICS, AESTHETIC_CATEGORY_LABELS, AESTHETIC_CATEGORY_ORDER, AESTHETIC_IDS, ATMOSPHERES, ATMOSPHERE_IDS, AURORA_SWEEP_STYLE, ActionFx, ActionFxCategory, Aesthetic, AestheticCategory, Atmosphere, BACKDROPS, BACKDROP_CATEGORY_LABELS, BACKDROP_CATEGORY_ORDER, BACKDROP_IDS, Backdrop, BackdropCategory, CAMERA_FORMATS, CAMERA_FORMAT_IDS, CAMERA_MOTIONS, CAMERA_MOTION_CATEGORY_LABELS, CAMERA_MOTION_CATEGORY_ORDER, CAMERA_MOTION_IDS, CHARACTER_FX, CHARACTER_FX_CATEGORY_LABELS, CHARACTER_FX_CATEGORY_ORDER, CHARACTER_FX_DURATIONS, CHARACTER_FX_IDS, CHARACTER_FX_INTENSITIES, CHARACTER_FX_POSITIONS, CHARACTER_MOTIONS, CHARACTER_MOTION_CATEGORY_LABELS, CHARACTER_MOTION_CATEGORY_ORDER, CHARACTER_MOTION_IDS, CHARACTER_MOTION_MAX_PICKS, CHARACTER_MOTION_PACES, CHARACTER_MOTION_POSITIONS, COLOR_LOOKS, COLOR_LOOK_CATEGORY_LABELS, COLOR_LOOK_CATEGORY_ORDER, COLOR_LOOK_IDS, COMPOSITION_EFFECTS, COMPOSITION_EFFECT_IDS, CameraFormat, CameraMotion, CameraMotionCategory, CategorizedInstrument, CharacterFx, CharacterFxCategory, CharacterFxDuration, CharacterFxIntensity, CharacterFxPosition, CharacterFxTiming, CharacterFxTimingOption, CharacterMotion, CharacterMotionBindings, CharacterMotionCategory, CharacterMotionDiagnostic, CharacterMotionFloor, CharacterMotionPace, CharacterMotionPosition, CharacterMotionTiming, CharacterMotionTimingOption, ColorLook, ColorLookCategory, CompositionEffect, DEBRIS_SHOWER_STYLE, ERAS, ERA_CATEGORY_LABELS, ERA_CATEGORY_ORDER, ERA_IDS, EXPOSURE_CATEGORY_LABELS, EXPOSURE_CATEGORY_ORDER, EXPOSURE_FIELD_BY_CATEGORY, EXPOSURE_IDS, EXPOSURE_SETTINGS, Era, EraCategory, ExposureCategory, ExposureSettings, ExposureValue, FRAMINGS, FRAMING_CATEGORY_LABELS, FRAMING_CATEGORY_ORDER, FRAMING_FIELD_BY_CATEGORY, FRAMING_IDS, Framing, FramingCategory, FramingValue, GARDEN_BLOOM_STYLE, HELD_PROPS, HELD_PROP_CATEGORY_LABELS, HELD_PROP_CATEGORY_ORDER, HELD_PROP_IDS, HeldProp, HeldPropCategory, INSTANT_CUT_CLAUSE, INSTRUMENTATION_DEFAULT_DATA, INSTRUMENTS, INSTRUMENT_CATEGORY_LABELS, INSTRUMENT_CATEGORY_ORDER, InstrumentCategory, InstrumentationEntry, LENSES, LENS_IDS, LIGHTINGS, LIGHTING_CATEGORY_LABELS, LIGHTING_CATEGORY_ORDER, LIGHTING_FIELD_BY_CATEGORY, LIGHTING_IDS, LOOP_SUBJECTS, LOOP_SUBJECT_CATEGORY_LABELS, LOOP_SUBJECT_CATEGORY_ORDER, Lens, Lighting, LightingCategory, LightingValue, LoopSubject, LoopSubjectCategory, MATERIALS, MATERIAL_CATEGORY_LABELS, MATERIAL_CATEGORY_ORDER, MATERIAL_IDS, MAX_SELECTED_BY_FRAMING_CATEGORY, MAX_SELECTED_BY_STYLING_DIMENSION, MOODS, MOOD_CATEGORY_LABELS, MOOD_CATEGORY_ORDER, MOOD_IDS, MUSIC_EMOTIONS, MUSIC_ENERGIES, MUSIC_ERAS, MUSIC_GENRES, MUSIC_GENRE_CATEGORY_LABELS, MUSIC_GENRE_CATEGORY_ORDER, MUSIC_GENRE_DEFAULT_DATA, MUSIC_MOOD_DEFAULT_DATA, MUSIC_VIBES, Material, MaterialCategory, Mood, MoodCategory, MoodValue, MusicEra, MusicGenre, MusicGenreCategory, MusicMoodData, MusicMoodEntry, MusicSubgenre, PHOTOGRAPHERS, PHOTOGRAPHER_CATEGORY_LABELS, PHOTOGRAPHER_CATEGORY_ORDER, PHOTOGRAPHER_IDS, PHOTO_GENRES, PHOTO_GENRE_CATEGORY_LABELS, PHOTO_GENRE_CATEGORY_ORDER, PHOTO_GENRE_IDS, POSES, POSE_CATEGORY_LABELS, POSE_CATEGORY_ORDER, POSE_IDS, POST_PROCESS_EFFECTS, POST_PROCESS_EFFECT_IDS, PRODUCTION_STYLES, PhotoGenre, PhotoGenreCategory, Photographer, PhotographerCategory, Pose, PoseCategory, PoseValue, PostProcessEffect, RENDER_QUALITIES, RENDER_QUALITY_IDS, RenderQuality, SAKURA_PETALS_STYLE, SAND_STORM_STYLE, SETTINGS, SETTING_CATEGORY_LABELS, SETTING_IDS, SINGING_STYLES, SMOKE_PUFF_STYLE, STYLES, STYLE_IDS, STYLE_MEDIA, STYLE_MEDIUMS, STYLINGS, STYLING_DIMENSION_LABELS, STYLING_DIMENSION_ORDER, STYLING_DIMENSION_SECTIONS, STYLING_FIELD_BY_DIMENSION, STYLING_IDS, Setting, SettingCategory, Style, StyleMedia, StyleMedium, StyleTones, Styling, StylingDimension, StylingDimensionSection, StylingValue, TEMPORALS, TEMPORAL_CATEGORY_LABELS, TEMPORAL_CATEGORY_ORDER, TEMPORAL_FIELD_BY_CATEGORY, TEMPORAL_IDS, TRANSITIONS, TRANSITION_CATEGORY_LABELS, TRANSITION_CATEGORY_ORDER, TRANSITION_DURATIONS, TRANSITION_IDS, TRANSITION_INTENSITIES, TRANSITION_OPTION_FIELDS, TRANSITION_POSITIONS, TRANSITION_STYLE_FIELD, Temporal, TemporalCategory, TemporalValue, Transition, TransitionCategory, TransitionDuration, TransitionHintOptions, TransitionHintScope, TransitionIntensity, TransitionOption, TransitionOptionChoice, TransitionOptionValues, TransitionPosition, TransitionTiming, TransitionTimingOption, VOCAL_PRESENCE, VOCAL_PRESENCE_INSTRUMENTAL_ID, VOICE_ACCENTS, VOICE_AGES, VOICE_ARCHETYPES, VOICE_CHARACTER_DEFAULT_DATA, VOICE_DELIVERY_DEFAULT_DATA, VOICE_EMOTIONS, VOICE_GENDERS, VOICE_LANGUAGES, VOICE_PACES, VOICE_TIMBRES, VoiceCharacterEntry, VoiceDeliveryEntry, WARDROBE, WARDROBE_CATEGORY_LABELS, WARDROBE_DIMENSION_ORDER, WARDROBE_FIELD_BY_DIMENSION, WHITE_FLASH_STYLE, WIPE_DIRECTION, WardrobeDimension, WardrobeEntry, WardrobeValue, blendedCutClause, buildActionFxHints, buildActionFxTerms, buildAestheticHints, buildAestheticTerms, buildAtmosphereHints, buildAtmosphereTerms, buildExposureHints, buildExposureTerms, buildFramingHints, buildFramingTerms, buildHeldPropHints, buildHeldPropTerms, buildInstrumentationHints, buildInstrumentationTerms, buildLightingHints, buildLightingTerms, buildMaterialHints, buildMaterialTerms, buildMoodHints, buildMoodTerms, buildMusicGenreHints, buildMusicGenreTerms, buildMusicMoodHints, buildMusicMoodTerms, buildPhotographerHints, buildPhotographerTerms, buildPoseHints, buildPoseTerms, buildPostProcessHints, buildPostProcessTerms, buildStylingHints, buildStylingTerms, buildTemporalHints, buildTemporalTerms, buildVoiceCharacterHints, buildVoiceCharacterTerms, buildVoiceDeliveryHints, buildVoiceDeliveryTerms, buildWardrobeHints, composeCameraMotionHintFromConnections, composeCameraMotionTermFromConnections, composeCharacterFxHintFromConnections, composeCharacterMotionHintFromConnections, composeTransitionHintFromConnections, getActionFx, getActionFxLabel, getActionFxPromptHint, getActionFxTerm, getAesthetic, getAestheticLabel, getAestheticPromptHint, getAestheticTerm, getAtmosphere, getAtmosphereLabel, getAtmospherePromptHint, getAtmosphereTerm, getBackdrop, getBackdropLabel, getBackdropPromptHint, getBackdropTerm, getCameraFormat, getCameraFormatLabel, getCameraFormatPromptHint, getCameraFormatTerm, getCameraMotion, getCameraMotionLabel, getCameraMotionPromptHint, getCameraMotionTerm, getCharacterFx, getCharacterFxLabel, getCharacterFxPromptHint, getCharacterFxTerm, getCharacterMotion, getCharacterMotionDiagnostics, getCharacterMotionLabel, getCharacterMotionPromptHint, getCharacterMotionTerm, getColorLook, getColorLookLabel, getColorLookPromptHint, getColorLookTerm, getCompositionEffect, getCompositionEffectLabel, getCompositionEffectPromptHint, getCompositionEffectTerm, getEra, getEraLabel, getEraPromptHint, getEraTerm, getExposure, getExposureLabel, getExposurePromptHint, getExposureTerm, getFraming, getFramingCategoryLimit, getFramingLabel, getFramingPromptHint, getFramingTerm, getHeldProp, getHeldPropLabel, getHeldPropPromptHint, getHeldPropTerm, getInstrument, getInstrumentTerm, getLens, getLensLabel, getLensPromptHint, getLensTerm, getLighting, getLightingLabel, getLightingPromptHint, getLightingTerm, getLoopSubject, getLoopSubjectLabel, getLoopSubjectPromptHint, getLoopSubjectTerm, getMaterial, getMaterialLabel, getMaterialPromptHint, getMaterialTerm, getMood, getMoodLabel, getMoodPromptHint, getMoodTerm, getMusicEmotion, getMusicEmotionTerm, getMusicEnergy, getMusicEnergyTerm, getMusicEra, getMusicEraTerm, getMusicGenre, getMusicGenreLabel, getMusicGenreTerm, getMusicSubgenre, getMusicSubgenreTerm, getMusicVibe, getMusicVibeTerm, getPhotoGenre, getPhotoGenreLabel, getPhotoGenrePromptHint, getPhotoGenreTerm, getPhotographer, getPhotographerLabel, getPhotographerPromptHint, getPhotographerTerm, getPose, getPoseLabel, getPosePromptHint, getPoseTerm, getPostProcessEffect, getPostProcessEffectLabel, getPostProcessEffectPromptHint, getPostProcessEffectTerm, getProductionStyle, getProductionStyleTerm, getRenderQuality, getRenderQualityLabel, getRenderQualityPromptHint, getRenderQualityTerm, getSetting, getSettingLabel, getSettingPromptHint, getSettingTerm, getSingingStyle, getSingingStyleTerm, getStyle, getStyleLabel, getStyleMedium, getStylePromptHint, getStyleTerm, getStyleTones, getStyleVideoPromptHint, getStyling, getStylingDimensionLimit, getStylingLabel, getStylingPromptHint, getStylingTerm, getTemporal, getTemporalLabel, getTemporalPromptHint, getTemporalTerm, getTransition, getTransitionLabel, getTransitionOptions, getTransitionPromptHint, getTransitionTerm, getVocalPresence, getVocalPresenceTerm, getVoiceAccent, getVoiceAccentTerm, getVoiceAge, getVoiceAgeTerm, getVoiceArchetype, getVoiceArchetypeTerm, getVoiceEmotion, getVoiceEmotionTerm, getVoiceGender, getVoiceGenderTerm, getVoiceLanguage, getVoiceLanguageTerm, getVoicePace, getVoicePaceTerm, getVoiceTimbre, getVoiceTimbreTerm, getWardrobeEntriesByDimension, getWardrobeEntry, getWardrobePromptHint, isBlendableTransition, isDeniedStyleId, isInstantTransition, isInstrumentalVocal, isVantageFraming, readTransitionOptionValues, renderTransitionBases, styleOffersMedia, styleOffersRestyle, stylesForMedia, stylesForRestyle } from './entries/pickers.js';
12
- export { BODY_CAPTIONS_PRESET_ID, BRAND_PRESETS, BRAND_PRESET_IDS, BRAND_PRESET_META, BrandCasing, BrandFonts, BrandLogo, BrandPalette, BrandPresetId, BrandPresetMeta, BrandTokens, BrandTypeSpec, CAPTION_LEVERS_BY_LANGUAGE, CAPTION_SEGMENT_LEVER_KEYS, CaptionLanguageLevers, CaptionSegmentRole, FACTORY_PRESETS, FACTORY_PRESET_PREVIEW_FILES, FACTORY_PRESET_PREVIEW_LARGE_FILES, FACTORY_SNIPPETS, FactoryPreset, FactoryPresetGroup, HOOK_PLATE_PRESET_ID, HookPlateSegmentsOptions, HookPlateSegmentsResult, MAX_PRESET_REFERENCES, OBJECT_ANGLE_PRESETS, OBJECT_ANGLE_PROMPTS, OBJECT_ASSET_PRESETS, OBJECT_ASSET_PROMPTS, OBJECT_MATERIAL_PRESETS, OBJECT_MATERIAL_PROMPTS, OBJECT_VARIATION_PRESETS, OBJECT_VARIATION_PROMPTS, ObjectPresetAssetType, PRESET_PREVIEW_LARGE_WIDTH, PRESET_PREVIEW_PATH, PRESET_PREVIEW_WIDTH, PresetPreviewLargeFile, STYLE_PRESETS, StylePreset, factoryPresetPreviewSrcSet, factoryPresetPreviewUrl, getFactoryPresets, getFactorySnippets, getStylePreset, groupFactoryPresets, hookPlateCaptionSegments, presetMinReferences, resolveBrandInput } from './entries/presets.js';
12
+ export { BODY_CAPTIONS_PRESET_ID, BRAND_PRESETS, BRAND_PRESET_IDS, BRAND_PRESET_META, BrandCasing, BrandFonts, BrandLogo, BrandPalette, BrandPresetId, BrandPresetMeta, BrandTokens, BrandTypeSpec, CAPTION_LEVERS_BY_LANGUAGE, CAPTION_SEGMENT_LEVER_KEYS, CaptionLanguageLevers, CaptionSegmentRole, FACTORY_PRESETS, FACTORY_PRESET_PREVIEW_FILES, FACTORY_PRESET_PREVIEW_LARGE_FILES, FACTORY_SNIPPETS, FactoryPreset, FactoryPresetGroup, HOOK_PLATE_PRESET_ID, HookPlateSegmentsOptions, HookPlateSegmentsResult, MAX_PRESET_REFERENCES, OBJECT_ANGLE_PRESETS, OBJECT_ANGLE_PROMPTS, OBJECT_ASSET_PRESETS, OBJECT_ASSET_PROMPTS, OBJECT_MATERIAL_PRESETS, OBJECT_MATERIAL_PROMPTS, OBJECT_VARIATION_PRESETS, OBJECT_VARIATION_PROMPTS, ObjectPresetAssetType, PRESET_PREVIEW_LARGE_WIDTH, PRESET_PREVIEW_PATH, PRESET_PREVIEW_WIDTH, PRESET_SHELF_ORDER, PresetPreviewLargeFile, PresetShelf, STYLE_PRESETS, StylePreset, factoryPresetPreviewSrcSet, factoryPresetPreviewUrl, getFactoryPresets, getFactorySnippets, getStylePreset, groupFactoryPresets, hookPlateCaptionSegments, presetMinReferences, presetShelf, presetShelfRank, resolveBrandInput } from './entries/presets.js';
13
13
  export { PromptClauseSlot, ReferenceLineFormat, STYLE_SECTION_GAP, STYLE_SECTION_HEADER, SlottedPromptClause, appendReferenceLines, asBodyClauses, composeSectionedPrompt, endsInsideStyleSection, insertBeforeStyleSection, nearestColorName, partitionStyleClauses, readDirectionFields, readStructuredFields, readSubjectFields, referenceDescriptionLine, renderDescribedReferenceLines, renderReferenceCaptionLines, renderStyleSection, sectionedClauseCosts, splitStyleSection, styleSectionFromClauses, styleSlotFor } from './entries/prompt-builder.js';
14
14
  export { A as ANGLE_LABELS, a as ASPECT_RATIO_LABELS, B as BuildImagePromptConfig, b as BuildImagePromptOverflowResult, c as BuildImagePromptResult, d as BuildImagePromptSegmentsResult, D as DIRECTION_ARRAY_CEILING, e as DIRECTION_FIELDS, f as DIRECTION_ID_MAX_CHARS, g as DIRECTION_KEYS, h as DirectionFamily, i as DirectionFieldRow, j as DirectionFieldSpec, k as DirectionFields, l as DirectionHintClause, m as DirectionHintMode, n as DirectionKey, o as DirectionRenderOptions, p as DirectionStyleGroup, q as DirectionSurface, F as FILM_STYLE_KEYS, I as IMAGE_HINT_MODE_DEFAULT, r as ImageDirectionKey, M as MAX_SUBJECT_KEYS, s as MOVEMENT_LABELS, P as PromptSegment, t as PromptSegmentOrigin, R as ResolveCharacterMentionsResult, u as ResolveLocationMentionsResult, S as SCENE_PROMPT_MAX_LENGTH, v as SHOT_LABELS, w as SUBJECT_ARRAY_CEILING, x as SUBJECT_CUSTOM_AGE_KEY, y as SUBJECT_FIELDS, z as SUBJECT_FOLD_KEYS, C as SUBJECT_ID_MAX_CHARS, E as SUBJECT_IMAGE_HINT_MODE_DEFAULT, G as SUBJECT_KEYS, H as SUBJECT_KEY_MAX_CHARS, J as SUBJECT_VIDEO_HINT_MODE_DEFAULT, K as StructuredPromptFields, L as StyleReferenceInput, N as SubjectFieldRow, O as SubjectFieldSpec, Q as SubjectFields, T as SubjectGroupFieldSpec, U as SubjectHintMode, V as SubjectIdsFieldSpec, W as SubjectSurface, X as USER_DIRECTION_REF_KINDS, Y as UserDirectionRef, Z as UserDirectionRefKind, _ as VIDEO_HINT_MODE_DEFAULT, $ as VideoDirectionKey, a0 as applyReferenceOrderToVideo, a1 as buildIdentityDirectives, a2 as buildImagePrompt, a3 as buildImagePromptSegments, a4 as buildImagePromptWithOverflow, a5 as buildReferenceBlocks, a6 as buildScenePrompt, a7 as directionFieldsForSurface, a8 as directionKeyForUserRef, a9 as expandImagePositionRefs, aa as expandImageRefTokens, ab as getRegisteredSubjectKeys, ac as modeForFamily, ad as normalizeSubjectFields, ae as parseUserDirectionRef, af as renderDirectionHintClauses, ag as renderDirectionHints, ah as renderMoodboardClause, ai as renderPaletteClause, aj as renderStructuredFields, ak as renderSubjectHints, al as resolveCharacterMentions, am as resolveLocationMentions, an as styleReferenceDescription, ao as subjectFieldsForSurface, ap as truncateText, aq as userDirectionRefValue, ar as userRefKindOfDirectionKey } from './subject-registry-Cf802LQ5.js';
15
15
  export { ComputeNodePromptArgs, LlmChatFieldArgs, NODE_PROMPT_CANDIDATE_FIELDS, NODE_PROMPT_FIELDS, NodeSendTextArgs, PROMPT_AFFIX_CORE_FIELD_OVERRIDES, PROMPT_AFFIX_NODE_TYPES, PROMPT_HINT_SEPARATOR, PromptFieldSpec, PromptIconKind, ResolvePromptArgs, TEXT_REQUIRED_NODE_TYPES, WIRED_OUTPUT_NODE_TYPES, appendPromptHints, applyPromptAffixes, composeNegative, computeAiWriterInput, computeLlmChatFields, computeNodePrompt, computeNodeSendText, computeScriptTopic, getPromptFields, getSnippetMedia, joinHintFragments, joinPromptHints, joinPromptParts, joinSentences, keepableDirectionHints, nodeHasInlinePrompt, nodeHasPromptField, nodeSupportsPromptAffixes, promptAffixCoreField, promptFieldCarriesAffixes, promptPartSeparator, resolvePrompt, stripAudioTags } from './entries/prompt-fields.js';
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- export { BODY_CAPTIONS_PRESET_ID, BRAND_PRESETS, BRAND_PRESET_IDS, BRAND_PRESET_META, CAPTION_LEVERS_BY_LANGUAGE, CAPTION_SEGMENT_LEVER_KEYS, FACTORY_PRESETS, FACTORY_PRESET_PREVIEW_FILES, FACTORY_PRESET_PREVIEW_LARGE_FILES, FACTORY_SNIPPETS, HOOK_PLATE_PRESET_ID, MAX_PRESET_REFERENCES, OBJECT_ANGLE_PRESETS, OBJECT_ANGLE_PROMPTS, OBJECT_ASSET_PRESETS, OBJECT_ASSET_PROMPTS, OBJECT_MATERIAL_PRESETS, OBJECT_MATERIAL_PROMPTS, OBJECT_VARIATION_PRESETS, OBJECT_VARIATION_PROMPTS, PRESET_PREVIEW_LARGE_WIDTH, PRESET_PREVIEW_PATH, PRESET_PREVIEW_WIDTH, SNIPPET_MEDIA_VALUES, STYLE_PRESETS, factoryPresetPreviewSrcSet, factoryPresetPreviewUrl, getFactoryPresets, getFactorySnippets, getStylePreset, groupFactoryPresets, hookPlateCaptionSegments, presetMinReferences, resolveBrandInput } from './chunk-WQ7FWGZ2.js';
1
+ export { BODY_CAPTIONS_PRESET_ID, BRAND_PRESETS, BRAND_PRESET_IDS, BRAND_PRESET_META, CAPTION_LEVERS_BY_LANGUAGE, CAPTION_SEGMENT_LEVER_KEYS, FACTORY_PRESETS, FACTORY_PRESET_PREVIEW_FILES, FACTORY_PRESET_PREVIEW_LARGE_FILES, FACTORY_SNIPPETS, HOOK_PLATE_PRESET_ID, MAX_PRESET_REFERENCES, OBJECT_ANGLE_PRESETS, OBJECT_ANGLE_PROMPTS, OBJECT_ASSET_PRESETS, OBJECT_ASSET_PROMPTS, OBJECT_MATERIAL_PRESETS, OBJECT_MATERIAL_PROMPTS, OBJECT_VARIATION_PRESETS, OBJECT_VARIATION_PROMPTS, PRESET_PREVIEW_LARGE_WIDTH, PRESET_PREVIEW_PATH, PRESET_PREVIEW_WIDTH, PRESET_SHELF_ORDER, SNIPPET_MEDIA_VALUES, STYLE_PRESETS, factoryPresetPreviewSrcSet, factoryPresetPreviewUrl, getFactoryPresets, getFactorySnippets, getStylePreset, groupFactoryPresets, hookPlateCaptionSegments, presetMinReferences, presetShelf, presetShelfRank, resolveBrandInput } from './chunk-IVRSNUYX.js';
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-XR7RAHZI.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-Z4KWM6DV.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';
9
9
  export { PROMPT_HINT_SEPARATOR, joinPromptHints } from './chunk-35UHMDGS.js';
10
10
  export { computePackSidecarCoverage } from './chunk-FDOG7BNB.js';
11
- export { AD_CREATIVE_ANALYSIS_FIELDS, AD_CREATIVE_ANALYSIS_SYSTEM_PROMPT, AUDIO_WIZARD_CATEGORIES, DEFAULT_OWN_MOTION, IMAGE_REFERENCE_PROMPT_DOCTRINE, IMAGE_WIZARD_CATEGORIES, LLM_CHAT_WIZARD_CATEGORIES, MUSIC_WIZARD_CATEGORIES, OWN_MOTION_NODE_TYPES, POST_CONTENT_ANALYSIS_SYSTEM_PROMPT, PROVIDER_CAPABILITIES, PROVIDER_PROMPT_DOCTRINES, REFERENCE_IMAGE_ROLES, SCENE3D_FIGURE_REFERENCE_RULE, SCENE3D_FREE_PLATE_SLOTS, SCENE3D_LAYOUT_REFERENCE_SCOPING_FIXTURE, SCENE3D_LAYOUT_REFERENCE_SCOPING_LINE, SCENE3D_LAYOUT_SCOPING_FOR, SCENE3D_LAYOUT_SCOPING_IGNORE, SCENE3D_LAYOUT_SCOPING_LOOK_SOURCE, SCENE3D_LAYOUT_SCOPING_MARKER, SCENE3D_UNREFERENCED_FIGURES_WARNING_CODE, TEXT_WIZARD_CATEGORIES, VIDEO_WIZARD_CATEGORIES, appendScene3DStillScopingLines, buildAdCreativeAnalysisUserText, buildCharacterPrompt, buildCreaturePrompt, buildFaceTemplateInputs, buildLocationMotionPrompt, buildLocationPrompt, buildLocationRefinePrompt, buildMotionPrompt, buildObjectMotionPrompt, buildObjectPrompt, buildScene3DLayoutScopingLine, buildScene3DUnreferencedFiguresWarning, getCategoriesForNodeType, getPromptDoctrine, getPromptTips, hasScene3DLayoutScopingLine, isWizardSupported, ownMotionHint, renderScene3DLayoutScopingLine, scene3DLayoutVideoCaptions } from './chunk-PHCYQWJP.js';
11
+ export { AD_CREATIVE_ANALYSIS_FIELDS, AD_CREATIVE_ANALYSIS_SYSTEM_PROMPT, AUDIO_WIZARD_CATEGORIES, DEFAULT_OWN_MOTION, IMAGE_REFERENCE_PROMPT_DOCTRINE, IMAGE_WIZARD_CATEGORIES, LLM_CHAT_WIZARD_CATEGORIES, MUSIC_WIZARD_CATEGORIES, OWN_MOTION_NODE_TYPES, POST_CONTENT_ANALYSIS_SYSTEM_PROMPT, PROVIDER_CAPABILITIES, PROVIDER_PROMPT_DOCTRINES, REFERENCE_IMAGE_ROLES, SCENE3D_FIGURE_REFERENCE_RULE, SCENE3D_FREE_PLATE_SLOTS, SCENE3D_LAYOUT_REFERENCE_SCOPING_FIXTURE, SCENE3D_LAYOUT_REFERENCE_SCOPING_LINE, SCENE3D_LAYOUT_SCOPING_FOR, SCENE3D_LAYOUT_SCOPING_IGNORE, SCENE3D_LAYOUT_SCOPING_LOOK_SOURCE, SCENE3D_LAYOUT_SCOPING_MARKER, SCENE3D_UNREFERENCED_FIGURES_WARNING_CODE, TEXT_WIZARD_CATEGORIES, VIDEO_WIZARD_CATEGORIES, appendScene3DStillScopingLines, buildAdCreativeAnalysisUserText, buildCharacterPrompt, buildCreaturePrompt, buildFaceTemplateInputs, buildLocationMotionPrompt, buildLocationPrompt, buildLocationRefinePrompt, buildMotionPrompt, buildObjectMotionPrompt, buildObjectPrompt, buildScene3DLayoutScopingLine, buildScene3DUnreferencedFiguresWarning, getCategoriesForNodeType, getPromptDoctrine, getPromptTips, hasScene3DLayoutScopingLine, isWizardSupported, ownMotionHint, renderScene3DLayoutScopingLine, scene3DLayoutVideoCaptions } from './chunk-YDG3KMCN.js';
12
12
  export { CINEMATIC_LOOK_TAIL, FILM_STILL_PREFIX, NEUTRAL_PERSON, REALISM_FINISH, REALISM_PASS_INSTRUCTION, REALISM_SKIN, REFERENCE_RULES, REFERENCE_RULES_MULTI_PERSON, SCENE_FRAME_RULE, filmStillPrefix, realismEmptyHands, realismViewpoint, referenceRulesBlock } from './chunk-T64D26P4.js';
13
13
  export { DEFAULT_IDENTITY_LOCK, DEFAULT_TEMPLATES, applyTemplate, buildIdentityLockLine, characterLockToRefLock, collectIdentityLockClause, getIdentityLockClause, hasUpstreamCharacter, resolveTemplate, toIdentityLockMode, withForcedIdentityLock } from './chunk-BQWIPLLR.js';
14
14
  import './chunk-ADMHDFHB.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodaro/prompts",
3
- "version": "1.53.2",
3
+ "version": "1.54.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.60.0"
73
+ "@nodaro/shared": "^3.62.0"
74
74
  },
75
75
  "devDependencies": {
76
76
  "tsup": "^8.5.0",
@@ -0,0 +1,30 @@
1
+ import { describe, expect, it } from "vitest"
2
+ import { PRESET_SHELF_ORDER, getFactoryPresets, presetShelf, presetShelfRank } from "../factory-presets.js"
3
+
4
+ describe("the image catalog's shelves", () => {
5
+ it("files every group of the generate-image catalog on a shelf a picker shows", () => {
6
+ const groups = [...new Set(getFactoryPresets("generate-image").map((preset) => preset.group ?? ""))]
7
+ expect(groups.length).toBeGreaterThan(0)
8
+ for (const group of groups) expect(PRESET_SHELF_ORDER).toContain(presetShelf(group))
9
+ })
10
+
11
+ it("puts the named groups on their shelves and the pro catalog's on Studio · Pro", () => {
12
+ expect(presetShelf("YouTube")).toBe("video")
13
+ expect(presetShelf("Social & Ads")).toBe("marketing")
14
+ expect(presetShelf("Personal Photos")).toBe("photos")
15
+ expect(presetShelf("Text")).toBe("creative")
16
+ expect(presetShelf("Family & Events")).toBe("life")
17
+ expect(presetShelf("Reference Sheet")).toBe("pro")
18
+ expect(presetShelf("Edits")).toBe("pro")
19
+ })
20
+
21
+ it("puts a group no shelf names on More, so a new group still shows", () => {
22
+ expect(presetShelf("A Group Added Later")).toBe("more")
23
+ expect(presetShelfRank("A Group Added Later")).toBe(-1)
24
+ })
25
+
26
+ it("ranks the named groups in the design's order", () => {
27
+ expect(presetShelfRank("YouTube")).toBeLessThan(presetShelfRank("Social & Ads"))
28
+ expect(presetShelfRank("Life & Events")).toBeLessThan(presetShelfRank("Family & Events"))
29
+ })
30
+ })
@@ -2,25 +2,30 @@ import { describe, it, expect } from "vitest"
2
2
  import { PROVIDER_CAPABILITIES } from "../index.js"
3
3
  import { EXTEND_VIDEO_PROVIDERS, SEEDANCE_2_EXTEND_STITCH } from "@nodaro/shared/models"
4
4
  import { MODEL_CATALOG } from "@nodaro/shared/model-catalog"
5
- import { buildVideoCreditModelIdentifier } from "@nodaro/shared/credits"
6
5
 
7
6
  /**
8
- * seedance-2-extend: extend ANY video by URL — bare-template continuation
9
- * generation + trim-stitch (spike-validated).
7
+ * Seedance Extend Video: extend ANY video by URL — bare-template continuation
8
+ * generation + trim-stitch (spike-validated). One provider per model:
9
+ * `seedance-2-5-extend` (Seedance 2.5) and `seedance-2-0-extend` (Seedance 2.0).
10
10
  */
11
- describe("seedance-2-extend shared wiring", () => {
12
- it("is a registered extend provider", () => {
13
- expect(EXTEND_VIDEO_PROVIDERS).toContain("seedance-2-extend")
11
+ describe("Seedance extend shared wiring", () => {
12
+ it("both Seedance models are registered extend providers", () => {
13
+ expect(EXTEND_VIDEO_PROVIDERS).toContain("seedance-2-5-extend")
14
+ expect(EXTEND_VIDEO_PROVIDERS).toContain("seedance-2-0-extend")
14
15
  })
15
16
 
16
- it("catalog entry drives the levers (extend mode, 4-15s, three resolutions)", () => {
17
- const m = MODEL_CATALOG["seedance-2-extend"]!
18
- expect(m.modes).toEqual(["extend"])
19
- expect(m.family).toBe("Bytedance")
20
- expect(m.durations).toEqual([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])
21
- expect(m.resolutions).toEqual(["480p", "720p", "1080p"])
22
- expect(m.pricing.length).toBeGreaterThanOrEqual(4)
23
- expect(m.pricing[0]!.identifier).toBe("seedance-2-extend")
17
+ it("catalog entries drive the levers (extend mode, each model's window, three resolutions)", () => {
18
+ const windows: Record<string, number[]> = {
19
+ "seedance-2-5-extend": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],
20
+ "seedance-2-0-extend": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
21
+ }
22
+ for (const [id, durations] of Object.entries(windows)) {
23
+ const m = MODEL_CATALOG[id]!
24
+ expect(m.modes).toEqual(["extend"])
25
+ expect(m.family).toBe("Bytedance")
26
+ expect(m.durations).toEqual(durations)
27
+ expect(m.resolutions).toEqual(["480p", "720p", "1080p"])
28
+ }
24
29
  })
25
30
 
26
31
  it("stitch constants match the spike-validated recipe (4 tail / 3 head / 0.15s fades / 2s ref tail)", () => {
@@ -32,16 +37,10 @@ describe("seedance-2-extend shared wiring", () => {
32
37
  })
33
38
  })
34
39
 
35
- it("is advertised to the wizard's extend-video capabilities", () => {
36
- expect(PROVIDER_CAPABILITIES["extend-video"]!["seedance-2-extend"]).toMatch(/ANY video/i)
37
- })
38
-
39
- it("credit identifiers snap to duration tiers with a :res suffix (no -ref dimension)", () => {
40
- expect(buildVideoCreditModelIdentifier("seedance-2-extend", 6, undefined, undefined, undefined, "480p"))
41
- .toBe("seedance-2-extend:8s:480p") // 6s snaps into the 8s tier
42
- expect(buildVideoCreditModelIdentifier("seedance-2-extend", 4, undefined, undefined, undefined, "720p"))
43
- .toBe("seedance-2-extend:4s:720p")
44
- expect(buildVideoCreditModelIdentifier("seedance-2-extend", 15, undefined, undefined, undefined, "1080p"))
45
- .toBe("seedance-2-extend:15s:1080p")
40
+ it("is advertised to the wizard's extend-video capabilities, once per model", () => {
41
+ const extend = PROVIDER_CAPABILITIES["extend-video"]!
42
+ expect(extend["seedance-2-5-extend"]).toMatch(/ANY video.*Seedance 2\.5/i)
43
+ expect(extend["seedance-2-0-extend"]).toMatch(/ANY video.*Seedance 2\.0/i)
44
+ expect(extend["seedance-2-extend"]).toBeUndefined()
46
45
  })
47
46
  })
@@ -9,11 +9,13 @@ import { modelsWithFeature } from "@nodaro/shared/model-catalog"
9
9
  describe("video reference-image capability (catalog)", () => {
10
10
  const refModels = modelsWithFeature("reference-image")
11
11
 
12
- // grok-imagine-video-1.5 takes a single image_url (the i2v start frame) at
13
- // KIE — there is no reference transport (no `maxRefImages`, no special path),
14
- // so it must NOT advertise the feature.
15
- it("excludes grok-imagine-video-1.5 (no reference transport)", () => {
16
- expect(refModels).not.toContain("grok-imagine-video-1.5")
12
+ // grok-imagine-video-1.5 advertised the feature with no transport behind it
13
+ // (the 2026-06-28 audit). It carries its Image References now, as in-between
14
+ // FRAMES (KIE `keyframes`, backend kie/grok-video-15.ts), so it declares
15
+ // `reference-image` together with `keyframes` — and never as loose references.
16
+ it("grok-imagine-video-1.5 advertises its Image References as in-between frames", () => {
17
+ expect(refModels).toContain("grok-imagine-video-1.5")
18
+ expect(modelsWithFeature("keyframes")).toContain("grok-imagine-video-1.5")
17
19
  })
18
20
 
19
21
  // The video models that genuinely forward references — verified against the
@@ -0,0 +1,132 @@
1
+ /**
2
+ * `assetsTakeNoSeat` — the reference walk for a model whose image references
3
+ * are its FRAMES (a `keyframes` video model, decided 2026-11-11). No asset is
4
+ * seated: nothing attaches a URL or numbers an `@image_N`. A wired character
5
+ * gives its name and description in BOTH reference formats (production renders
6
+ * hybrid), its mentions and `{ref:<id>}` read as its name, and a non-character
7
+ * extra adds nothing.
8
+ */
9
+ import { describe, it, expect } from "vitest"
10
+ import type { ConnectedReference } from "@nodaro/shared/types"
11
+ import { resolveVideoReferenceCore } from "../video-reference-resolver.js"
12
+
13
+ const F1 = "https://cdn/frame-1.png"
14
+ const F2 = "https://cdn/frame-2.png"
15
+ const MAYA = "https://cdn/maya.png"
16
+ const MAYA_SMILE = "https://cdn/maya-smile.png"
17
+ const CAR = "https://cdn/car.png"
18
+
19
+ const maya: ConnectedReference = {
20
+ id: "maya-ref",
21
+ defaultName: "Maya",
22
+ source: "wired-character",
23
+ url: MAYA,
24
+ characterSlug: "maya",
25
+ characterCanonicalDescription: "Short silver hair, green coat",
26
+ }
27
+ const mayaSmile: ConnectedReference = { ...maya, id: "maya-smile", url: MAYA_SMILE, variantSlug: "smile" }
28
+
29
+ for (const hybridRoles of [false, true]) {
30
+ const format = hybridRoles ? "hybrid" : "legacy"
31
+ describe(`resolveVideoReferenceCore — assetsTakeNoSeat (${format})`, () => {
32
+ it("a wired character gives its name and description; only the frames go out", () => {
33
+ const r = resolveVideoReferenceCore({
34
+ prompt: "she walks to the window",
35
+ wiredCharRefs: [maya],
36
+ ordinalOffset: 2,
37
+ hybridRoles,
38
+ assetsTakeNoSeat: true,
39
+ })
40
+ expect(r.additionalUrls).toEqual([])
41
+ expect(r.prompt).toContain("Maya — Short silver hair, green coat.")
42
+ expect(r.prompt).toContain("she walks to the window")
43
+ expect(r.prompt).not.toMatch(/@image|from @/)
44
+ })
45
+
46
+ it("leading frames come back untouched and nothing joins them", () => {
47
+ const r = resolveVideoReferenceCore({
48
+ prompt: "she walks",
49
+ wiredCharRefs: [maya, mayaSmile],
50
+ leadingRefUrls: [F1, F2],
51
+ extraRefs: [{ id: "car", url: CAR, description: "a red car" }],
52
+ hybridRoles,
53
+ assetsTakeNoSeat: true,
54
+ })
55
+ expect(r.additionalUrls).toEqual([F1, F2])
56
+ expect(r.prompt).not.toContain("a red car")
57
+ })
58
+
59
+ it("mentions, variant mentions and {ref:<id>} of the character read as its name", () => {
60
+ const r = resolveVideoReferenceCore({
61
+ prompt: "@maya:1 smiles at {ref:maya-ref}, then @maya:2:smile waves",
62
+ wiredCharRefs: [maya, mayaSmile],
63
+ ordinalOffset: 2,
64
+ hybridRoles,
65
+ assetsTakeNoSeat: true,
66
+ })
67
+ expect(r.prompt).toContain("Maya smiles at Maya, then Maya waves")
68
+ expect(r.prompt).toContain("Maya — Short silver hair, green coat.")
69
+ expect(r.prompt).not.toMatch(/@maya|@image|\{ref:/)
70
+ })
71
+
72
+ it("a character extra speaks for its character once, and its {ref:<id>} reads as the character", () => {
73
+ const r = resolveVideoReferenceCore({
74
+ prompt: "look at {ref:x1}",
75
+ wiredCharRefs: [maya],
76
+ extraRefs: [{ id: "x1", url: MAYA_SMILE, characterSlug: "maya", variantSlug: "smile", description: "smiling" }],
77
+ lookupCharacterBySlug: () => ({ characterName: "Maya", canonicalDescription: "Short silver hair, green coat" }),
78
+ ordinalOffset: 2,
79
+ hybridRoles,
80
+ assetsTakeNoSeat: true,
81
+ })
82
+ expect(r.prompt).toContain("look at Maya")
83
+ expect(r.prompt?.match(/Maya — /g)).toHaveLength(1)
84
+ expect(r.additionalUrls).toEqual([])
85
+ })
86
+
87
+ it("a hidden canonical fallback stays hidden unless the prompt mentions the character", () => {
88
+ const hidden = resolveVideoReferenceCore({
89
+ prompt: "an empty room",
90
+ wiredCharRefs: [maya],
91
+ suppressedCanonicalCharacterIds: ["maya"],
92
+ ordinalOffset: 1,
93
+ hybridRoles,
94
+ assetsTakeNoSeat: true,
95
+ })
96
+ expect(hidden.prompt).toBe("an empty room")
97
+ const mentioned = resolveVideoReferenceCore({
98
+ prompt: "@maya:1 in an empty room",
99
+ wiredCharRefs: [maya],
100
+ suppressedCanonicalCharacterIds: ["maya"],
101
+ ordinalOffset: 1,
102
+ hybridRoles,
103
+ assetsTakeNoSeat: true,
104
+ })
105
+ expect(mentioned.prompt).toContain("Maya in an empty room")
106
+ expect(mentioned.prompt).toContain("Maya — Short silver hair, green coat.")
107
+ })
108
+
109
+ it("an {image:N} past the frames keeps only its label", () => {
110
+ const r = resolveVideoReferenceCore({
111
+ prompt: "between {image:1:the door} and {image:3:Maya}",
112
+ wiredCharRefs: [maya],
113
+ ordinalOffset: 2,
114
+ hybridRoles,
115
+ assetsTakeNoSeat: true,
116
+ })
117
+ expect(r.prompt).toContain("the door from @image_1")
118
+ expect(r.prompt).not.toContain("@image_3")
119
+ })
120
+ })
121
+ }
122
+
123
+ it("without assetsTakeNoSeat the hybrid walk still seats the character after the frames", () => {
124
+ const r = resolveVideoReferenceCore({
125
+ prompt: "she walks",
126
+ wiredCharRefs: [maya],
127
+ leadingRefUrls: [F1, F2],
128
+ hybridRoles: true,
129
+ })
130
+ expect(r.additionalUrls).toEqual([F1, F2, MAYA])
131
+ expect(r.prompt).toMatch(/from @image_3/)
132
+ })
@@ -15,6 +15,8 @@ import { LOTTIE_OVERLAY_PRESETS } from "./lottie-overlay.js"
15
15
 
16
16
  export type { FactoryPreset, FactoryPresetGroup } from "./types.js"
17
17
  export { groupFactoryPresets } from "./types.js"
18
+ export type { PresetShelf } from "./shelves.js"
19
+ export { PRESET_SHELF_ORDER, presetShelf, presetShelfRank } from "./shelves.js"
18
20
  export { MAX_PRESET_REFERENCES, presetMinReferences } from "./references.js"
19
21
  export {
20
22
  FACTORY_PRESET_PREVIEW_FILES,
@@ -0,0 +1,50 @@
1
+ /**
2
+ * The shelves an image-preset picker files the catalog's groups under: Video,
3
+ * Marketing, Photos & products, Creative, Life, then the pro catalog's groups
4
+ * (Studio · Pro). A group no shelf names goes on "more", so a group added to
5
+ * the catalog still shows. One mapping for every picker that shelves the
6
+ * catalog (a client's preset window, a menu that lists the categories, the
7
+ * catalog's group summary `GET /v1/node-presets/factory/groups`).
8
+ */
9
+
10
+ export type PresetShelf = "video" | "marketing" | "photos" | "creative" | "life" | "more" | "pro"
11
+
12
+ /** The shelves in the order a picker shows them. */
13
+ export const PRESET_SHELF_ORDER: readonly PresetShelf[] = ["video", "marketing", "photos", "creative", "life", "more", "pro"]
14
+
15
+ /** The generate-image catalog's groups on the five named shelves, in the order they are shown. */
16
+ const NAMED_SHELVES: ReadonlyArray<readonly [string, PresetShelf]> = [
17
+ ["YouTube", "video"],
18
+ ["Shorts · TikTok", "video"],
19
+ ["Social & Ads", "marketing"],
20
+ ["Business", "marketing"],
21
+ ["Business & Marketing", "marketing"],
22
+ ["Personal Photos", "photos"],
23
+ ["Products & Fashion", "photos"],
24
+ ["Home & Spaces", "photos"],
25
+ ["Text", "creative"],
26
+ ["Content & Creative", "creative"],
27
+ ["Layout", "creative"],
28
+ ["Life & Events", "life"],
29
+ ["Family & Events", "life"],
30
+ ]
31
+
32
+ /** The pro catalog's groups (the canvas's and Studio's presets), on the Studio · Pro shelf. */
33
+ const PRO_GROUPS: ReadonlySet<string> = new Set([
34
+ "Reference Sheet", "Cast & Consistency", "Edit by Name", "Face Privacy", "Photography & Cinematic", "Characters", "Product & Commerce",
35
+ "Branding & Logos", "Marketing & Social", "Print & Posters", "Illustration & Art Styles", "Handmade & Stop-Motion", "Film & Storyboard",
36
+ "Architecture & Interiors", "Icons, Game Assets & Textures", "Diagrams & Infographics", "Portrait Transformations", "Stylized Subject", "Edits",
37
+ "Realism & Authentic",
38
+ ])
39
+
40
+ const SHELF_OF: ReadonlyMap<string, PresetShelf> = new Map(NAMED_SHELVES)
41
+
42
+ /** The shelf a group goes on. */
43
+ export function presetShelf(group: string): PresetShelf {
44
+ return SHELF_OF.get(group) ?? (PRO_GROUPS.has(group) ? "pro" : "more")
45
+ }
46
+
47
+ /** Where a group stands among the named shelves' groups (the design's order), or -1 for one no named shelf lists. */
48
+ export function presetShelfRank(group: string): number {
49
+ return NAMED_SHELVES.findIndex(([name]) => name === group)
50
+ }
@@ -182,6 +182,8 @@ export const PROVIDER_CAPABILITIES: Record<string, Record<string, string>> = {
182
182
  "seedream-5-lite": "Lighter Seedream, faster artistic generation",
183
183
  "seedream-5-pro": "Flagship Seedream — strongest instruction following, 2K via high quality",
184
184
  "seedream-5-flash": "Fast, low-cost Seedream 5 — quick drafts and iteration at 1K or 2K",
185
+ "minimax-h3-image": "MiniMax H3 — readable text in the picture, up to about 16 MP at 4K, same price at 1K and 2K",
186
+ "seedream-5-5": "Seedream 5.5 — natural light, materials and skin, dense small text, transparent backgrounds; 1K / 1.5K / 2K",
185
187
  "z-image": "Experimental, novel generation approaches",
186
188
  "wan-2.7": "Wan 2.7 T2I — 1K/2K/4K, up to 9 ref images",
187
189
  "wan-2.7-pro": "Wan 2.7 Pro T2I — higher quality, 1K/2K/4K",
@@ -210,6 +212,8 @@ export const PROVIDER_CAPABILITIES: Record<string, Record<string, string>> = {
210
212
  "seedream-5-lite-i2i": "Light artistic transformation",
211
213
  "seedream-5-pro-i2i": "Pro-grade instruction-based edits, multi-reference",
212
214
  "seedream-5-flash-i2i": "Fast, low-cost Seedream edits — up to 10 input images",
215
+ "minimax-h3-image-i2i": "MiniMax H3 edits — up to 16 reference images in one edit, readable text, up to 4K",
216
+ "seedream-5-5-i2i": "Seedream 5.5 edits — round after round, the rest of the picture untouched; up to 10 input images",
213
217
  "flux-kontext": "Character-consistent edits with reference awareness",
214
218
  "flux-kontext-max": "Premium character-consistent editing",
215
219
  "kontext-multi": "Multi-image Kontext via Replicate — up to 4 refs",
@@ -238,6 +242,8 @@ export const PROVIDER_CAPABILITIES: Record<string, Record<string, string>> = {
238
242
  "seedream-5-lite-i2i": "Light artistic transformation",
239
243
  "seedream-5-pro-i2i": "Pro-grade instruction-based edits, multi-reference",
240
244
  "seedream-5-flash-i2i": "Fast, low-cost Seedream edits — up to 10 input images",
245
+ "minimax-h3-image-i2i": "MiniMax H3 edits — up to 16 reference images in one edit, readable text, up to 4K",
246
+ "seedream-5-5-i2i": "Seedream 5.5 edits — round after round, the rest of the picture untouched; up to 10 input images",
241
247
  "flux-kontext": "Character-consistent edits with reference awareness",
242
248
  "flux-kontext-max": "Premium character-consistent editing",
243
249
  "kontext-multi": "Multi-image Kontext via Replicate — up to 4 refs",
@@ -279,7 +285,8 @@ export const PROVIDER_CAPABILITIES: Record<string, Record<string, string>> = {
279
285
  "vidu-q4": "Vidu Q4 — start frame or up to 15 reference images + 3 MP3 audio refs, native audio, 3–16s, 540p–4K (image required)",
280
286
  "kling-4": "Kling 4.0 — text, or up to 10 reference images / 5 videos / 7 characters / 3 voices; native audio, 3–30s, 720p/1080p",
281
287
  "kling-4-keyframes": "Kling 4.0 Keyframes — start frame, up to 8 in-between frames and an end frame; native audio, 3–30s, 720p/1080p",
282
- "grok-imagine-video-1.5": "Grok Imagine 1.5 — image-to-video only; requires an input image",
288
+ "kling-4-flash": "Kling 4.0 Flash — text, or up to 10 reference images / 5 videos / 7 characters (a voice clip per character); native audio, 3–20s, 720p",
289
+ "grok-imagine-video-1.5": "Grok Imagine 1.5 — image-to-video only; exact start and end frame (the same image loops), up to 4 in-between frames; requires an input image",
283
290
  },
284
291
  "image-to-video": {
285
292
  "minimax": "Versatile animation from still images",
@@ -318,7 +325,8 @@ export const PROVIDER_CAPABILITIES: Record<string, Record<string, string>> = {
318
325
  "vidu-q4": "Vidu Q4 — animate a start frame, or direct up to 15 reference images + 3 MP3 audio refs; native audio, 3–16s, 540p–4K",
319
326
  "kling-4": "Kling 4.0 — a start frame joins up to 10 reference images, 5 videos, 7 characters and 3 voices; native audio, 3–30s, 720p/1080p",
320
327
  "kling-4-keyframes": "Kling 4.0 Keyframes — start frame, up to 8 in-between frames and an end frame; native audio, 3–30s, 720p/1080p",
321
- "grok-imagine-video-1.5": "Grok Imagine 1.5 — stylized animation, 1–15s, 480p/720p (image required)",
328
+ "kling-4-flash": "Kling 4.0 Flash — a start frame alone is the exact opening frame; beside up to 10 reference images, 5 videos and 7 characters it joins them; native audio, 3–20s, 720p",
329
+ "grok-imagine-video-1.5": "Grok Imagine 1.5 — stylized animation, 1–15s, 480p/720p/1080p, start + up to 4 in-between + end frames (image required)",
322
330
  },
323
331
  "video-to-video": {
324
332
  "wan": "Style transfer and video transformation",
@@ -335,7 +343,8 @@ export const PROVIDER_CAPABILITIES: Record<string, Record<string, string>> = {
335
343
  "extend-video": {
336
344
  "veo-extend": "Extend VEO-generated videos",
337
345
  "runway-extend": "Extend Runway-generated videos",
338
- "seedance-2-extend": "Extend ANY video by URL — seamless trim-stitched continuation with audio (Seedance 2.0)",
346
+ "seedance-2-5-extend": "Extend ANY video by URL — seamless trim-stitched continuation with audio, 4–30s added (Seedance 2.5)",
347
+ "seedance-2-0-extend": "Extend ANY video by URL — seamless trim-stitched continuation with audio, 4–15s added (Seedance 2.0)",
339
348
  },
340
349
  "speech-to-video": {
341
350
  "wan-speech": "Wan 2.2 speech-driven video generation",
@@ -302,7 +302,7 @@ const GROK_IMAGINE_DOCTRINE: ProviderPromptDoctrine = {
302
302
  tips: [
303
303
  "Keep prompts simple and direct — Subject + Action + Setting + Camera + Mood. Grok expands the prompt itself; over-specification fights the expander.",
304
304
  "Image-to-video: the input image IS the first frame (composition, identity, and style are preserved) — describe the MOTION, don't re-describe the still.",
305
- "Video 1.5: 1-15s (default 8), 480p/720p/1080p, up to 7 input images (1080p allows only one). Native audio incl. music, SFX, and lip-synced dialogue — quote the line to have it spoken.",
305
+ "Video 1.5: 1-15s (default 8), 480p/720p/1080p; exact start and end frame (one image as both = seamless loop), up to 4 in-between frames. Native audio incl. dialogue — quote the line to have it spoken.",
306
306
  "Aspect ratio applies to text runs (1:1/16:9/9:16/3:2/2:3/auto); a single input image locks the output to the image's own aspect.",
307
307
  ],
308
308
  doctrine: `Prompt structure (xAI's guidance is minimal by design — the model auto-expands prompts):
@@ -311,18 +311,18 @@ descriptions of static/unchanged parts — spend the words on what MOVES.
311
311
 
312
312
  **Image-to-video (the primary mode)**
313
313
  - The input image is the FIRST FRAME, not a loose reference: composition, subject identity, and visual style carry over. Describe motion and camera only ("she turns toward the window as the camera slowly pushes in"); re-describing the still wastes adherence.
314
- - grok-imagine-video-1.5 accepts up to 7 images (identity/scene references beyond the first frame); at 1080p only ONE image is allowed.
314
+ - grok-imagine-video-1.5 takes frames, not loose references: the start frame is the exact FIRST frame, an end frame the exact LAST frame, and the same image wired as both makes a seamless loop. Its Image References are up to 4 IN-BETWEEN frames, in order, placed evenly over the clip at whole seconds (one per second inside it — a 3s clip takes 2); extra frames are left out. Describe the motion that carries the shot from one frame to the next; the frames cannot be named in the prompt, so refer to them in words ("by the midpoint she has reached the door").
315
315
  - grok-i2v with reference images: images are addressed \`@image(n)\` in array order. Your references come first (\`@image(1)\` is your first reference); a wired start frame is appended after them and the platform names it as the opening frame.
316
316
 
317
317
  **Audio (video-1.5)**
318
- - Native audio generates with the clip — background music, SFX, and lip-synced dialogue. Quote the spoken line; describe the music/SFX plainly. There is no audio toggle on the KIE contract — cue (or exclude) sound in the prompt text.
318
+ - Native audio generates with the clip — background music, SFX, and lip-synced dialogue. Quote the spoken line; describe the music/SFX plainly. The platform offers no audio toggle for it — cue (or exclude) sound in the prompt text.
319
319
 
320
320
  **Durations / tiers**
321
- - grok-i2v: 6 or 10 seconds. grok-imagine-video-1.5: 1-15 seconds in 1s steps (default 8), 480p (default) / 720p / 1080p. Prompt cap 4096 chars — but shorter is better here.
321
+ - grok-i2v: 6 or 10 seconds. grok-imagine-video-1.5: 1-15 seconds in 1s steps (default 8), 480p (default) / 720p / 1080p. At 1080p it takes the start frame ALONE — a run with an end frame, a loop or in-between frames is refused before any credits are held, so use 720p for those. Prompt cap 4096 chars — but shorter is better here.
322
322
 
323
323
  Sources: KIE Grok Imagine contracts (docs.kie.ai/market/grok-imagine/image-to-video,
324
324
  docs.kie.ai/market/grok-imagine/1-5-preview), xAI Grok Imagine 1.5 release notes
325
- (x.ai/news/grok-imagine-1-5). Captured 2026-08-09.`,
325
+ (x.ai/news/grok-imagine-1-5). Captured 2026-08-09; frames and in-between frames 2026-11-11.`,
326
326
  }
327
327
 
328
328
  const WAN_DOCTRINE: ProviderPromptDoctrine = {
@@ -494,6 +494,44 @@ Source: KIE Kling 4.0 market contracts (docs.kie.ai/market/kling/v4-reference-to
494
494
  docs.kie.ai/market/kling/v4-keyframe-to-video), live-probed 2026-10-23.`,
495
495
  }
496
496
 
497
+ // Kling 4.0 Flash — one id over KIE's two Flash endpoints, picked by what is
498
+ // wired (a start frame alone → keyframe endpoint; anything else → reference
499
+ // endpoint). KIE contract facts plus the platform-standard structure, as for
500
+ // Kling 4.0. The provider runner names subjects (`@Name`), binds each voice
501
+ // clip to a subject, and drops the `@` from any undeclared mention.
502
+ const KLING_4_FLASH_DOCTRINE: ProviderPromptDoctrine = {
503
+ providers: ["kling-4-flash"],
504
+ heading: "Kling 4.0 Flash (kling-4-flash)",
505
+ tips: [
506
+ "A start frame alone is the exact opening frame (@first_frame). Beside references it joins the reference images, like kling-4.",
507
+ "References: up to 10 images, 5 videos (2-20s together) and 7 characters (15 in all). Name each: @image_1, @video_1, a character's @Name.",
508
+ "No standalone voice: voice clip N is the voice of wired character N, if that character has 2-4 images (else the clip is dropped); write the character, never @audio_N.",
509
+ "3-20s (default 5), 720p only, native audio always on, no end frame. Prompt cap 8,000 chars. Aspect auto / 16:9 / 9:16 / 1:1 / 21:9 (a start frame alone sets its own shape).",
510
+ ],
511
+ doctrine: `Prompt structure (no public Kling 4.0 Flash prompt guide is captured — the KIE API contract is
512
+ the doctrine source; platform-standard structure applies):
513
+ subject → action → scene/environment → lighting → camera movement → style → constraints.
514
+
515
+ **One model, two endpoints (picked by what is connected)**
516
+ - A start frame with nothing else — no reference image, no reference video, no character — runs keyframe-to-video: the frame is the exact opening frame and the clip takes its shape. Name it @first_frame.
517
+ - Anything else — text only, reference images, reference videos, characters, or a start frame beside any of them — runs reference-to-video. A start frame there joins the reference images and is named as the opening frame, as on kling-4.
518
+
519
+ **Naming materials in the prompt**
520
+ - @image_1 … for reference images, @video_1 … for reference videos, a character by its own name (@Maya). Kling refuses a prompt that names a material the request does not carry; the platform removes the "@" from such a mention so the run still starts.
521
+ - There are no standalone voices. Reference audio clip N becomes the voice of character N, in the order the characters are wired. A character needs 2-4 images to carry a voice: a clip whose character has one image, and any clip past the last character, is dropped (the run still starts). Write who speaks by the character's name ("@Maya says…"), never @audio_1.
522
+
523
+ **Limits**
524
+ - Reference images 10, reference videos 5, characters 7 — 15 in all. Reference videos together must be 2-20 seconds; a longer set is refused before the run starts.
525
+ - No end frame and no in-between frames: describe how the shot ends in words.
526
+
527
+ **Duration, resolution, audio**
528
+ - 3-20 seconds (default 5); 720p only; aspect auto (follows the materials, 16:9 with none) / 16:9 / 9:16 / 1:1 / 21:9. Prompts up to 8,000 characters.
529
+ - Native audio is always generated; keep-original-sound keeps a reference video's own audio. Not yet verified for scripted lines here, so plan key dialogue as a TTS + lip-sync pass.
530
+
531
+ Source: KIE Kling 4.0 Flash market contracts (docs.kie.ai/market/kling/v4-flash-reference-to-video,
532
+ docs.kie.ai/market/kling/v4-flash-keyframe-to-video), read 2026-11-11.`,
533
+ }
534
+
497
535
  const HAPPYHORSE_DOCTRINE: ProviderPromptDoctrine = {
498
536
  providers: ["happyhorse", "happyhorse-i2v", "happyhorse-ref2v", "happyhorse-edit"],
499
537
  heading: "HappyHorse 1.1 (happyhorse, happyhorse-i2v, happyhorse-ref2v)",
@@ -555,6 +593,7 @@ export const PROVIDER_PROMPT_DOCTRINES: readonly ProviderPromptDoctrine[] = [
555
593
  WAN_3_DOCTRINE,
556
594
  VIDU_Q4_DOCTRINE,
557
595
  KLING_4_DOCTRINE,
596
+ KLING_4_FLASH_DOCTRINE,
558
597
  HAPPYHORSE_DOCTRINE,
559
598
  RUNWAY_KIE_DOCTRINE,
560
599
  ]