@nodaro/shared 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +32 -0
- package/dist/index.cjs +12506 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +12269 -0
- package/dist/index.d.ts +12269 -0
- package/dist/index.js +11831 -0
- package/dist/index.js.map +1 -0
- package/package.json +54 -0
- package/src/__tests__/__snapshots__/prompt-builder-segments.test.ts.snap +65 -0
- package/src/__tests__/ai-avatar-pricing.test.ts +321 -0
- package/src/__tests__/apply-video-negative-prompt.test.ts +76 -0
- package/src/__tests__/attach-columns.test.ts +28 -0
- package/src/__tests__/audio-crossfade-curves.test.ts +33 -0
- package/src/__tests__/build-model-menu.test.ts +58 -0
- package/src/__tests__/character-aspect-defaults.test.ts +142 -0
- package/src/__tests__/character-mention-slug.test.ts +199 -0
- package/src/__tests__/character-reference-photo-kinds.test.ts +32 -0
- package/src/__tests__/character-usage-mode.test.ts +147 -0
- package/src/__tests__/character-variant-assets.test.ts +142 -0
- package/src/__tests__/character-voice.test.ts +130 -0
- package/src/__tests__/cinematic-avatar-pricing.test.ts +119 -0
- package/src/__tests__/combine-transitions.test.ts +137 -0
- package/src/__tests__/component-types.test.ts +87 -0
- package/src/__tests__/condition-variables.test.ts +98 -0
- package/src/__tests__/credit-identifiers.test.ts +811 -0
- package/src/__tests__/default-video-provider.test.ts +63 -0
- package/src/__tests__/entity-image-handle.test.ts +43 -0
- package/src/__tests__/entity-variants.test.ts +33 -0
- package/src/__tests__/fal-lip-sync-sets.test.ts +31 -0
- package/src/__tests__/featured-entities.test.ts +33 -0
- package/src/__tests__/film-pricing.test.ts +64 -0
- package/src/__tests__/filter-condition.test.ts +285 -0
- package/src/__tests__/freecut-protocol.test.ts +35 -0
- package/src/__tests__/generate-text-items.test.ts +19 -0
- package/src/__tests__/generated-results.test.ts +50 -0
- package/src/__tests__/graph-utils.test.ts +618 -0
- package/src/__tests__/group-aggregation.test.ts +83 -0
- package/src/__tests__/i18n-locale-completeness.test.ts +156 -0
- package/src/__tests__/image-critic-node.test.ts +86 -0
- package/src/__tests__/image-mask-mode.test.ts +16 -0
- package/src/__tests__/image-ref-limit.test.ts +78 -0
- package/src/__tests__/inpaint-region.test.ts +24 -0
- package/src/__tests__/input-field-map-parity.test.ts +30 -0
- package/src/__tests__/json-evaluator.test.ts +289 -0
- package/src/__tests__/json-path.test.ts +64 -0
- package/src/__tests__/lip-sync-pricing.test.ts +142 -0
- package/src/__tests__/list-merge.test.ts +96 -0
- package/src/__tests__/list-sort.test.ts +134 -0
- package/src/__tests__/llm-models.test.ts +445 -0
- package/src/__tests__/location-mention-slug.test.ts +246 -0
- package/src/__tests__/locations-coverage-critic-schema.test.ts +92 -0
- package/src/__tests__/loop-delimiter.test.ts +39 -0
- package/src/__tests__/lottie-slots.test.ts +245 -0
- package/src/__tests__/model-catalog-flux2-resolutions.test.ts +21 -0
- package/src/__tests__/model-constants-location.test.ts +20 -0
- package/src/__tests__/model-constants.test.ts +122 -0
- package/src/__tests__/model-tree.test.ts +86 -0
- package/src/__tests__/no-internal-imports.test.ts +25 -0
- package/src/__tests__/node-default-mappings.test.ts +175 -0
- package/src/__tests__/node-mappable-fields.test.ts +7 -0
- package/src/__tests__/node-preset-export.test.ts +46 -0
- package/src/__tests__/node-preset-extract.test.ts +166 -0
- package/src/__tests__/node-refs-canonical.test.ts +54 -0
- package/src/__tests__/node-refs-combine.test.ts +54 -0
- package/src/__tests__/node-refs.test.ts +187 -0
- package/src/__tests__/node-runtime-keys.test.ts +99 -0
- package/src/__tests__/object-aspect-defaults.test.ts +59 -0
- package/src/__tests__/parameter-node-value.test.ts +137 -0
- package/src/__tests__/pinterest-url.test.ts +35 -0
- package/src/__tests__/pipeline-chat.test.ts +110 -0
- package/src/__tests__/pipeline-validation.test.ts +98 -0
- package/src/__tests__/presentation-utils.test.ts +1137 -0
- package/src/__tests__/producer-types.test.ts +47 -0
- package/src/__tests__/prompt-length-limits.test.ts +156 -0
- package/src/__tests__/provider-directive-defaults.test.ts +46 -0
- package/src/__tests__/reduce-strategy-registry.test.ts +43 -0
- package/src/__tests__/reference-board-templates.test.ts +33 -0
- package/src/__tests__/reference-roles.test.ts +36 -0
- package/src/__tests__/resolve-field-mappings.test.ts +110 -0
- package/src/__tests__/resolve-pipeline-model.test.ts +76 -0
- package/src/__tests__/scene-node-types.test.ts +80 -0
- package/src/__tests__/scraper-actors.test.ts +67 -0
- package/src/__tests__/seedance-2-catalog.test.ts +18 -0
- package/src/__tests__/seedance-2-credit-id.test.ts +23 -0
- package/src/__tests__/seedance-aspects.test.ts +52 -0
- package/src/__tests__/selector.test.ts +1151 -0
- package/src/__tests__/settled-with-limit.test.ts +214 -0
- package/src/__tests__/social-media-specs.test.ts +129 -0
- package/src/__tests__/sub-workflow-validation.test.ts +88 -0
- package/src/__tests__/switchx-pricing.test.ts +28 -0
- package/src/__tests__/to-connected-references.test.ts +153 -0
- package/src/__tests__/utilities.test.ts +541 -0
- package/src/__tests__/video-analysis-pricing.test.ts +58 -0
- package/src/__tests__/video-analysis.test.ts +63 -0
- package/src/__tests__/video-audio-capability.test.ts +204 -0
- package/src/__tests__/video-gen-providers.test.ts +28 -0
- package/src/__tests__/video-mode-aliases.test.ts +150 -0
- package/src/__tests__/video-ref-limits.test.ts +72 -0
- package/src/__tests__/video-utils.test.ts +303 -0
- package/src/__tests__/voice-changer-models.test.ts +33 -0
- package/src/__tests__/workflow-export-strip.test.ts +46 -0
- package/src/ai-avatar-pricing.ts +213 -0
- package/src/ancestor-refs.ts +48 -0
- package/src/animals.ts +231 -0
- package/src/audio-crossfade-curves.ts +73 -0
- package/src/audio-fx-presets.ts +64 -0
- package/src/avatar-payload-validators.ts +214 -0
- package/src/caption-styles.ts +31 -0
- package/src/character-aspect-defaults.ts +102 -0
- package/src/character-facets.ts +37 -0
- package/src/character-mention-slug.ts +166 -0
- package/src/character-usage-mode.ts +109 -0
- package/src/character-variant-assets.ts +121 -0
- package/src/character-voice.ts +151 -0
- package/src/cinematic-avatar-pricing.ts +111 -0
- package/src/clone-utils.ts +46 -0
- package/src/combine-transitions.ts +482 -0
- package/src/community.ts +112 -0
- package/src/component-types.ts +127 -0
- package/src/condition-variables.ts +65 -0
- package/src/credit-estimators/index.ts +15 -0
- package/src/credit-estimators/video-utils.ts +165 -0
- package/src/credit-identifiers.ts +304 -0
- package/src/entity-approval-types.ts +31 -0
- package/src/entity-aspect-defaults.ts +82 -0
- package/src/entity-asset-types.ts +296 -0
- package/src/entity-image-handle.ts +36 -0
- package/src/extra-refs.ts +139 -0
- package/src/featured-entities.ts +136 -0
- package/src/film-pricing.ts +117 -0
- package/src/filter-condition.ts +250 -0
- package/src/flux2-pricing.ts +18 -0
- package/src/freecut-protocol.ts +52 -0
- package/src/furniture.ts +167 -0
- package/src/generate-text-items.ts +15 -0
- package/src/generated-results.ts +63 -0
- package/src/group-aggregation.ts +75 -0
- package/src/hint-graph-types.ts +18 -0
- package/src/i18n/action-fx.ar.ts +89 -0
- package/src/i18n/action-fx.de.ts +89 -0
- package/src/i18n/action-fx.es.ts +89 -0
- package/src/i18n/action-fx.fr.ts +89 -0
- package/src/i18n/action-fx.he.ts +89 -0
- package/src/i18n/action-fx.hi.ts +89 -0
- package/src/i18n/action-fx.ja.ts +89 -0
- package/src/i18n/action-fx.ko.ts +89 -0
- package/src/i18n/action-fx.pt-BR.ts +89 -0
- package/src/i18n/action-fx.ru.ts +89 -0
- package/src/i18n/action-fx.zh-CN.ts +89 -0
- package/src/i18n/aesthetic.ar.ts +170 -0
- package/src/i18n/aesthetic.de.ts +48 -0
- package/src/i18n/aesthetic.es.ts +169 -0
- package/src/i18n/aesthetic.fr.ts +52 -0
- package/src/i18n/aesthetic.he.ts +169 -0
- package/src/i18n/aesthetic.hi.ts +55 -0
- package/src/i18n/aesthetic.ja.ts +165 -0
- package/src/i18n/aesthetic.ko.ts +169 -0
- package/src/i18n/aesthetic.pt-BR.ts +148 -0
- package/src/i18n/aesthetic.ru.ts +155 -0
- package/src/i18n/aesthetic.zh-CN.ts +172 -0
- package/src/i18n/animals.ar.ts +145 -0
- package/src/i18n/animals.de.ts +144 -0
- package/src/i18n/animals.es.ts +158 -0
- package/src/i18n/animals.fr.ts +144 -0
- package/src/i18n/animals.he.ts +155 -0
- package/src/i18n/animals.hi.ts +157 -0
- package/src/i18n/animals.ja.ts +159 -0
- package/src/i18n/animals.ko.ts +159 -0
- package/src/i18n/animals.pt-BR.ts +157 -0
- package/src/i18n/animals.ru.ts +155 -0
- package/src/i18n/animals.zh-CN.ts +155 -0
- package/src/i18n/atmosphere.ar.ts +49 -0
- package/src/i18n/atmosphere.de.ts +47 -0
- package/src/i18n/atmosphere.es.ts +50 -0
- package/src/i18n/atmosphere.fr.ts +47 -0
- package/src/i18n/atmosphere.he.ts +47 -0
- package/src/i18n/atmosphere.hi.ts +49 -0
- package/src/i18n/atmosphere.ja.ts +49 -0
- package/src/i18n/atmosphere.ko.ts +49 -0
- package/src/i18n/atmosphere.pt-BR.ts +49 -0
- package/src/i18n/atmosphere.ru.ts +47 -0
- package/src/i18n/atmosphere.zh-CN.ts +152 -0
- package/src/i18n/backdrop.ar.ts +53 -0
- package/src/i18n/backdrop.de.ts +46 -0
- package/src/i18n/backdrop.es.ts +54 -0
- package/src/i18n/backdrop.fr.ts +52 -0
- package/src/i18n/backdrop.he.ts +51 -0
- package/src/i18n/backdrop.hi.ts +59 -0
- package/src/i18n/backdrop.ja.ts +61 -0
- package/src/i18n/backdrop.ko.ts +59 -0
- package/src/i18n/backdrop.pt-BR.ts +59 -0
- package/src/i18n/backdrop.ru.ts +57 -0
- package/src/i18n/backdrop.zh-CN.ts +57 -0
- package/src/i18n/camera-format.ar.ts +40 -0
- package/src/i18n/camera-format.de.ts +37 -0
- package/src/i18n/camera-format.es.ts +41 -0
- package/src/i18n/camera-format.fr.ts +37 -0
- package/src/i18n/camera-format.he.ts +37 -0
- package/src/i18n/camera-format.hi.ts +42 -0
- package/src/i18n/camera-format.ja.ts +37 -0
- package/src/i18n/camera-format.ko.ts +37 -0
- package/src/i18n/camera-format.pt-BR.ts +46 -0
- package/src/i18n/camera-format.ru.ts +42 -0
- package/src/i18n/camera-format.zh-CN.ts +42 -0
- package/src/i18n/camera-motions.ar.ts +86 -0
- package/src/i18n/camera-motions.de.ts +74 -0
- package/src/i18n/camera-motions.es.ts +86 -0
- package/src/i18n/camera-motions.fr.ts +86 -0
- package/src/i18n/camera-motions.he.ts +86 -0
- package/src/i18n/camera-motions.hi.ts +99 -0
- package/src/i18n/camera-motions.ja.ts +99 -0
- package/src/i18n/camera-motions.ko.ts +99 -0
- package/src/i18n/camera-motions.pt-BR.ts +99 -0
- package/src/i18n/camera-motions.ru.ts +99 -0
- package/src/i18n/camera-motions.zh-CN.ts +99 -0
- package/src/i18n/character-fx.ar.ts +72 -0
- package/src/i18n/character-fx.de.ts +72 -0
- package/src/i18n/character-fx.es.ts +72 -0
- package/src/i18n/character-fx.fr.ts +72 -0
- package/src/i18n/character-fx.he.ts +72 -0
- package/src/i18n/character-fx.hi.ts +72 -0
- package/src/i18n/character-fx.ja.ts +72 -0
- package/src/i18n/character-fx.ko.ts +72 -0
- package/src/i18n/character-fx.pt-BR.ts +72 -0
- package/src/i18n/character-fx.ru.ts +72 -0
- package/src/i18n/character-fx.zh-CN.ts +72 -0
- package/src/i18n/color-look.ar.ts +50 -0
- package/src/i18n/color-look.de.ts +47 -0
- package/src/i18n/color-look.es.ts +50 -0
- package/src/i18n/color-look.fr.ts +50 -0
- package/src/i18n/color-look.he.ts +49 -0
- package/src/i18n/color-look.hi.ts +52 -0
- package/src/i18n/color-look.ja.ts +54 -0
- package/src/i18n/color-look.ko.ts +54 -0
- package/src/i18n/color-look.pt-BR.ts +54 -0
- package/src/i18n/color-look.ru.ts +52 -0
- package/src/i18n/color-look.zh-CN.ts +53 -0
- package/src/i18n/composition-effects.ar.ts +26 -0
- package/src/i18n/composition-effects.de.ts +25 -0
- package/src/i18n/composition-effects.es.ts +27 -0
- package/src/i18n/composition-effects.fr.ts +25 -0
- package/src/i18n/composition-effects.he.ts +25 -0
- package/src/i18n/composition-effects.hi.ts +27 -0
- package/src/i18n/composition-effects.ja.ts +27 -0
- package/src/i18n/composition-effects.ko.ts +27 -0
- package/src/i18n/composition-effects.pt-BR.ts +25 -0
- package/src/i18n/composition-effects.ru.ts +82 -0
- package/src/i18n/composition-effects.zh-CN.ts +25 -0
- package/src/i18n/era.ar.ts +37 -0
- package/src/i18n/era.de.ts +34 -0
- package/src/i18n/era.es.ts +37 -0
- package/src/i18n/era.fr.ts +37 -0
- package/src/i18n/era.he.ts +36 -0
- package/src/i18n/era.hi.ts +39 -0
- package/src/i18n/era.ja.ts +41 -0
- package/src/i18n/era.ko.ts +39 -0
- package/src/i18n/era.pt-BR.ts +41 -0
- package/src/i18n/era.ru.ts +121 -0
- package/src/i18n/era.zh-CN.ts +39 -0
- package/src/i18n/exposure-settings.ar.ts +28 -0
- package/src/i18n/exposure-settings.de.ts +26 -0
- package/src/i18n/exposure-settings.es.ts +28 -0
- package/src/i18n/exposure-settings.fr.ts +29 -0
- package/src/i18n/exposure-settings.he.ts +28 -0
- package/src/i18n/exposure-settings.hi.ts +31 -0
- package/src/i18n/exposure-settings.ja.ts +31 -0
- package/src/i18n/exposure-settings.ko.ts +31 -0
- package/src/i18n/exposure-settings.pt-BR.ts +31 -0
- package/src/i18n/exposure-settings.ru.ts +31 -0
- package/src/i18n/exposure-settings.zh-CN.ts +31 -0
- package/src/i18n/framing.ar.ts +78 -0
- package/src/i18n/framing.de.ts +73 -0
- package/src/i18n/framing.es.ts +78 -0
- package/src/i18n/framing.fr.ts +78 -0
- package/src/i18n/framing.he.ts +77 -0
- package/src/i18n/framing.hi.ts +82 -0
- package/src/i18n/framing.ja.ts +84 -0
- package/src/i18n/framing.ko.ts +82 -0
- package/src/i18n/framing.pt-BR.ts +84 -0
- package/src/i18n/framing.ru.ts +82 -0
- package/src/i18n/framing.zh-CN.ts +82 -0
- package/src/i18n/furniture.ar.ts +92 -0
- package/src/i18n/furniture.de.ts +93 -0
- package/src/i18n/furniture.es.ts +101 -0
- package/src/i18n/furniture.fr.ts +93 -0
- package/src/i18n/furniture.he.ts +101 -0
- package/src/i18n/furniture.hi.ts +101 -0
- package/src/i18n/furniture.ja.ts +101 -0
- package/src/i18n/furniture.ko.ts +101 -0
- package/src/i18n/furniture.pt-BR.ts +101 -0
- package/src/i18n/furniture.ru.ts +101 -0
- package/src/i18n/furniture.zh-CN.ts +101 -0
- package/src/i18n/held-prop.ar.ts +74 -0
- package/src/i18n/held-prop.de.ts +65 -0
- package/src/i18n/held-prop.es.ts +83 -0
- package/src/i18n/held-prop.fr.ts +74 -0
- package/src/i18n/held-prop.he.ts +73 -0
- package/src/i18n/held-prop.hi.ts +82 -0
- package/src/i18n/held-prop.ja.ts +84 -0
- package/src/i18n/held-prop.ko.ts +84 -0
- package/src/i18n/held-prop.pt-BR.ts +84 -0
- package/src/i18n/held-prop.ru.ts +82 -0
- package/src/i18n/held-prop.zh-CN.ts +82 -0
- package/src/i18n/index.ts +208 -0
- package/src/i18n/instrumentation.ar.ts +195 -0
- package/src/i18n/instrumentation.de.ts +195 -0
- package/src/i18n/instrumentation.es.ts +195 -0
- package/src/i18n/instrumentation.fr.ts +195 -0
- package/src/i18n/instrumentation.he.ts +195 -0
- package/src/i18n/instrumentation.hi.ts +195 -0
- package/src/i18n/instrumentation.ja.ts +195 -0
- package/src/i18n/instrumentation.ko.ts +195 -0
- package/src/i18n/instrumentation.pt-BR.ts +195 -0
- package/src/i18n/instrumentation.ru.ts +195 -0
- package/src/i18n/instrumentation.zh-CN.ts +195 -0
- package/src/i18n/lens.ar.ts +24 -0
- package/src/i18n/lens.de.ts +24 -0
- package/src/i18n/lens.es.ts +24 -0
- package/src/i18n/lens.fr.ts +24 -0
- package/src/i18n/lens.he.ts +24 -0
- package/src/i18n/lens.hi.ts +24 -0
- package/src/i18n/lens.ja.ts +24 -0
- package/src/i18n/lens.ko.ts +24 -0
- package/src/i18n/lens.pt-BR.ts +24 -0
- package/src/i18n/lens.ru.ts +25 -0
- package/src/i18n/lens.zh-CN.ts +24 -0
- package/src/i18n/lighting.ar.ts +86 -0
- package/src/i18n/lighting.de.ts +84 -0
- package/src/i18n/lighting.es.ts +89 -0
- package/src/i18n/lighting.fr.ts +84 -0
- package/src/i18n/lighting.he.ts +88 -0
- package/src/i18n/lighting.hi.ts +90 -0
- package/src/i18n/lighting.ja.ts +90 -0
- package/src/i18n/lighting.ko.ts +90 -0
- package/src/i18n/lighting.pt-BR.ts +90 -0
- package/src/i18n/lighting.ru.ts +88 -0
- package/src/i18n/lighting.zh-CN.ts +92 -0
- package/src/i18n/loop-subject.ar.ts +39 -0
- package/src/i18n/loop-subject.de.ts +39 -0
- package/src/i18n/loop-subject.es.ts +39 -0
- package/src/i18n/loop-subject.fr.ts +39 -0
- package/src/i18n/loop-subject.he.ts +39 -0
- package/src/i18n/loop-subject.hi.ts +39 -0
- package/src/i18n/loop-subject.ja.ts +39 -0
- package/src/i18n/loop-subject.ko.ts +39 -0
- package/src/i18n/loop-subject.pt-BR.ts +39 -0
- package/src/i18n/loop-subject.ru.ts +39 -0
- package/src/i18n/loop-subject.zh-CN.ts +39 -0
- package/src/i18n/materials.ar.ts +80 -0
- package/src/i18n/materials.de.ts +80 -0
- package/src/i18n/materials.es.ts +87 -0
- package/src/i18n/materials.fr.ts +80 -0
- package/src/i18n/materials.he.ts +86 -0
- package/src/i18n/materials.hi.ts +86 -0
- package/src/i18n/materials.ja.ts +88 -0
- package/src/i18n/materials.ko.ts +88 -0
- package/src/i18n/materials.pt-BR.ts +88 -0
- package/src/i18n/materials.ru.ts +86 -0
- package/src/i18n/materials.zh-CN.ts +86 -0
- package/src/i18n/mood.ar.ts +61 -0
- package/src/i18n/mood.de.ts +61 -0
- package/src/i18n/mood.es.ts +66 -0
- package/src/i18n/mood.fr.ts +61 -0
- package/src/i18n/mood.he.ts +64 -0
- package/src/i18n/mood.hi.ts +66 -0
- package/src/i18n/mood.ja.ts +66 -0
- package/src/i18n/mood.ko.ts +66 -0
- package/src/i18n/mood.pt-BR.ts +64 -0
- package/src/i18n/mood.ru.ts +64 -0
- package/src/i18n/mood.zh-CN.ts +64 -0
- package/src/i18n/music-genre.ar.ts +302 -0
- package/src/i18n/music-genre.de.ts +302 -0
- package/src/i18n/music-genre.es.ts +302 -0
- package/src/i18n/music-genre.fr.ts +302 -0
- package/src/i18n/music-genre.he.ts +302 -0
- package/src/i18n/music-genre.hi.ts +302 -0
- package/src/i18n/music-genre.ja.ts +302 -0
- package/src/i18n/music-genre.ko.ts +302 -0
- package/src/i18n/music-genre.pt-BR.ts +302 -0
- package/src/i18n/music-genre.ru.ts +302 -0
- package/src/i18n/music-genre.zh-CN.ts +302 -0
- package/src/i18n/music-mood.ar.ts +75 -0
- package/src/i18n/music-mood.de.ts +75 -0
- package/src/i18n/music-mood.es.ts +75 -0
- package/src/i18n/music-mood.fr.ts +75 -0
- package/src/i18n/music-mood.he.ts +75 -0
- package/src/i18n/music-mood.hi.ts +75 -0
- package/src/i18n/music-mood.ja.ts +75 -0
- package/src/i18n/music-mood.ko.ts +75 -0
- package/src/i18n/music-mood.pt-BR.ts +75 -0
- package/src/i18n/music-mood.ru.ts +75 -0
- package/src/i18n/music-mood.zh-CN.ts +75 -0
- package/src/i18n/person.ar.ts +638 -0
- package/src/i18n/person.de.ts +629 -0
- package/src/i18n/person.es.ts +645 -0
- package/src/i18n/person.fr.ts +621 -0
- package/src/i18n/person.he.ts +656 -0
- package/src/i18n/person.hi.ts +654 -0
- package/src/i18n/person.ja.ts +662 -0
- package/src/i18n/person.ko.ts +662 -0
- package/src/i18n/person.pt-BR.ts +656 -0
- package/src/i18n/person.ru.ts +656 -0
- package/src/i18n/person.zh-CN.ts +656 -0
- package/src/i18n/photo-genre.ar.ts +58 -0
- package/src/i18n/photo-genre.de.ts +52 -0
- package/src/i18n/photo-genre.es.ts +64 -0
- package/src/i18n/photo-genre.fr.ts +58 -0
- package/src/i18n/photo-genre.he.ts +62 -0
- package/src/i18n/photo-genre.hi.ts +63 -0
- package/src/i18n/photo-genre.ja.ts +65 -0
- package/src/i18n/photo-genre.ko.ts +63 -0
- package/src/i18n/photo-genre.pt-BR.ts +65 -0
- package/src/i18n/photo-genre.ru.ts +63 -0
- package/src/i18n/photo-genre.zh-CN.ts +63 -0
- package/src/i18n/photographer.ar.ts +75 -0
- package/src/i18n/photographer.de.ts +74 -0
- package/src/i18n/photographer.es.ts +77 -0
- package/src/i18n/photographer.fr.ts +77 -0
- package/src/i18n/photographer.he.ts +78 -0
- package/src/i18n/photographer.hi.ts +80 -0
- package/src/i18n/photographer.ja.ts +84 -0
- package/src/i18n/photographer.ko.ts +84 -0
- package/src/i18n/photographer.pt-BR.ts +83 -0
- package/src/i18n/photographer.ru.ts +78 -0
- package/src/i18n/photographer.zh-CN.ts +78 -0
- package/src/i18n/pose.ar.ts +95 -0
- package/src/i18n/pose.de.ts +96 -0
- package/src/i18n/pose.es.ts +104 -0
- package/src/i18n/pose.fr.ts +96 -0
- package/src/i18n/pose.he.ts +104 -0
- package/src/i18n/pose.hi.ts +104 -0
- package/src/i18n/pose.ja.ts +104 -0
- package/src/i18n/pose.ko.ts +104 -0
- package/src/i18n/pose.pt-BR.ts +104 -0
- package/src/i18n/pose.ru.ts +104 -0
- package/src/i18n/pose.zh-CN.ts +104 -0
- package/src/i18n/post-process-effects.ar.ts +25 -0
- package/src/i18n/post-process-effects.de.ts +24 -0
- package/src/i18n/post-process-effects.es.ts +26 -0
- package/src/i18n/post-process-effects.fr.ts +24 -0
- package/src/i18n/post-process-effects.he.ts +24 -0
- package/src/i18n/post-process-effects.hi.ts +26 -0
- package/src/i18n/post-process-effects.ja.ts +26 -0
- package/src/i18n/post-process-effects.ko.ts +26 -0
- package/src/i18n/post-process-effects.pt-BR.ts +24 -0
- package/src/i18n/post-process-effects.ru.ts +24 -0
- package/src/i18n/post-process-effects.zh-CN.ts +24 -0
- package/src/i18n/render-quality.ar.ts +34 -0
- package/src/i18n/render-quality.de.ts +30 -0
- package/src/i18n/render-quality.es.ts +35 -0
- package/src/i18n/render-quality.fr.ts +34 -0
- package/src/i18n/render-quality.he.ts +33 -0
- package/src/i18n/render-quality.hi.ts +39 -0
- package/src/i18n/render-quality.ja.ts +39 -0
- package/src/i18n/render-quality.ko.ts +39 -0
- package/src/i18n/render-quality.pt-BR.ts +37 -0
- package/src/i18n/render-quality.ru.ts +37 -0
- package/src/i18n/render-quality.zh-CN.ts +37 -0
- package/src/i18n/seasons.ar.ts +10 -0
- package/src/i18n/seasons.de.ts +10 -0
- package/src/i18n/seasons.es.ts +10 -0
- package/src/i18n/seasons.fr.ts +10 -0
- package/src/i18n/seasons.he.ts +10 -0
- package/src/i18n/seasons.hi.ts +10 -0
- package/src/i18n/seasons.ja.ts +10 -0
- package/src/i18n/seasons.ko.ts +10 -0
- package/src/i18n/seasons.pt-BR.ts +10 -0
- package/src/i18n/seasons.ru.ts +10 -0
- package/src/i18n/seasons.zh-CN.ts +10 -0
- package/src/i18n/setting.ar.ts +73 -0
- package/src/i18n/setting.de.ts +73 -0
- package/src/i18n/setting.es.ts +77 -0
- package/src/i18n/setting.fr.ts +73 -0
- package/src/i18n/setting.he.ts +76 -0
- package/src/i18n/setting.hi.ts +76 -0
- package/src/i18n/setting.ja.ts +78 -0
- package/src/i18n/setting.ko.ts +76 -0
- package/src/i18n/setting.pt-BR.ts +78 -0
- package/src/i18n/setting.ru.ts +76 -0
- package/src/i18n/setting.zh-CN.ts +76 -0
- package/src/i18n/style.ar.ts +55 -0
- package/src/i18n/style.de.ts +54 -0
- package/src/i18n/style.es.ts +54 -0
- package/src/i18n/style.fr.ts +54 -0
- package/src/i18n/style.he.ts +54 -0
- package/src/i18n/style.hi.ts +54 -0
- package/src/i18n/style.ja.ts +54 -0
- package/src/i18n/style.ko.ts +54 -0
- package/src/i18n/style.pt-BR.ts +56 -0
- package/src/i18n/style.ru.ts +54 -0
- package/src/i18n/style.zh-CN.ts +54 -0
- package/src/i18n/styling.ar.ts +295 -0
- package/src/i18n/styling.de.ts +285 -0
- package/src/i18n/styling.es.ts +317 -0
- package/src/i18n/styling.fr.ts +285 -0
- package/src/i18n/styling.he.ts +307 -0
- package/src/i18n/styling.hi.ts +323 -0
- package/src/i18n/styling.ja.ts +317 -0
- package/src/i18n/styling.ko.ts +311 -0
- package/src/i18n/styling.pt-BR.ts +301 -0
- package/src/i18n/styling.ru.ts +301 -0
- package/src/i18n/styling.zh-CN.ts +307 -0
- package/src/i18n/temporal.ar.ts +31 -0
- package/src/i18n/temporal.de.ts +24 -0
- package/src/i18n/temporal.es.ts +27 -0
- package/src/i18n/temporal.fr.ts +28 -0
- package/src/i18n/temporal.he.ts +31 -0
- package/src/i18n/temporal.hi.ts +31 -0
- package/src/i18n/temporal.ja.ts +31 -0
- package/src/i18n/temporal.ko.ts +31 -0
- package/src/i18n/temporal.pt-BR.ts +31 -0
- package/src/i18n/temporal.ru.ts +31 -0
- package/src/i18n/temporal.zh-CN.ts +31 -0
- package/src/i18n/transitions.ar.ts +97 -0
- package/src/i18n/transitions.de.ts +97 -0
- package/src/i18n/transitions.es.ts +97 -0
- package/src/i18n/transitions.fr.ts +97 -0
- package/src/i18n/transitions.he.ts +97 -0
- package/src/i18n/transitions.hi.ts +97 -0
- package/src/i18n/transitions.ja.ts +97 -0
- package/src/i18n/transitions.ko.ts +97 -0
- package/src/i18n/transitions.pt-BR.ts +97 -0
- package/src/i18n/transitions.ru.ts +97 -0
- package/src/i18n/transitions.zh-CN.ts +97 -0
- package/src/i18n/types.ts +158 -0
- package/src/i18n/vehicles.ar.ts +137 -0
- package/src/i18n/vehicles.de.ts +125 -0
- package/src/i18n/vehicles.es.ts +138 -0
- package/src/i18n/vehicles.fr.ts +125 -0
- package/src/i18n/vehicles.he.ts +136 -0
- package/src/i18n/vehicles.hi.ts +138 -0
- package/src/i18n/vehicles.ja.ts +138 -0
- package/src/i18n/vehicles.ko.ts +138 -0
- package/src/i18n/vehicles.pt-BR.ts +136 -0
- package/src/i18n/vehicles.ru.ts +136 -0
- package/src/i18n/vehicles.zh-CN.ts +136 -0
- package/src/i18n/voice-character.ar.ts +126 -0
- package/src/i18n/voice-character.de.ts +126 -0
- package/src/i18n/voice-character.es.ts +126 -0
- package/src/i18n/voice-character.fr.ts +126 -0
- package/src/i18n/voice-character.he.ts +126 -0
- package/src/i18n/voice-character.hi.ts +126 -0
- package/src/i18n/voice-character.ja.ts +126 -0
- package/src/i18n/voice-character.ko.ts +126 -0
- package/src/i18n/voice-character.pt-BR.ts +126 -0
- package/src/i18n/voice-character.ru.ts +126 -0
- package/src/i18n/voice-character.zh-CN.ts +126 -0
- package/src/i18n/voice-delivery.ar.ts +77 -0
- package/src/i18n/voice-delivery.de.ts +77 -0
- package/src/i18n/voice-delivery.es.ts +77 -0
- package/src/i18n/voice-delivery.fr.ts +77 -0
- package/src/i18n/voice-delivery.he.ts +77 -0
- package/src/i18n/voice-delivery.hi.ts +77 -0
- package/src/i18n/voice-delivery.ja.ts +77 -0
- package/src/i18n/voice-delivery.ko.ts +77 -0
- package/src/i18n/voice-delivery.pt-BR.ts +77 -0
- package/src/i18n/voice-delivery.ru.ts +77 -0
- package/src/i18n/voice-delivery.zh-CN.ts +77 -0
- package/src/i18n/weapons.ar.ts +115 -0
- package/src/i18n/weapons.de.ts +114 -0
- package/src/i18n/weapons.es.ts +116 -0
- package/src/i18n/weapons.fr.ts +103 -0
- package/src/i18n/weapons.he.ts +114 -0
- package/src/i18n/weapons.hi.ts +116 -0
- package/src/i18n/weapons.ja.ts +116 -0
- package/src/i18n/weapons.ko.ts +116 -0
- package/src/i18n/weapons.pt-BR.ts +114 -0
- package/src/i18n/weapons.ru.ts +114 -0
- package/src/i18n/weapons.zh-CN.ts +114 -0
- package/src/image-critic-node.ts +61 -0
- package/src/image-critic-types.ts +40 -0
- package/src/index.ts +866 -0
- package/src/inject-upstream.ts +15 -0
- package/src/inpaint-region.ts +51 -0
- package/src/json-evaluator.ts +732 -0
- package/src/json-path.ts +52 -0
- package/src/lip-sync-pricing.ts +90 -0
- package/src/list-merge.ts +40 -0
- package/src/list-sort.ts +122 -0
- package/src/list-source-resolver.ts +50 -0
- package/src/llm-models.ts +245 -0
- package/src/location-mention-slug.ts +291 -0
- package/src/location-preset-catalog-map.ts +128 -0
- package/src/loop-delimiter.ts +73 -0
- package/src/lora-routing.ts +95 -0
- package/src/lottie-overlay-catalog.ts +175 -0
- package/src/lottie-slots.ts +309 -0
- package/src/model-catalog.ts +2386 -0
- package/src/model-constants.ts +1910 -0
- package/src/model-tree.ts +120 -0
- package/src/monetization.ts +15 -0
- package/src/multi-pick.ts +42 -0
- package/src/node-default-mappings.ts +262 -0
- package/src/node-mappable-fields.ts +70 -0
- package/src/node-preset-export.ts +56 -0
- package/src/node-preset-extract.ts +147 -0
- package/src/node-refs.ts +253 -0
- package/src/node-runtime-keys.ts +117 -0
- package/src/object-aspect-defaults.ts +72 -0
- package/src/object-picker-types.ts +22 -0
- package/src/parameter-node-value.ts +284 -0
- package/src/pinterest-url.ts +28 -0
- package/src/pipeline-chat.ts +72 -0
- package/src/pipeline-defaults.ts +318 -0
- package/src/pipeline-events.ts +162 -0
- package/src/pipeline-state-types.ts +196 -0
- package/src/pipeline-types.ts +647 -0
- package/src/pipeline-validation.ts +87 -0
- package/src/presentation-types.ts +23 -0
- package/src/presentation-utils.ts +397 -0
- package/src/producer-types.ts +188 -0
- package/src/progress-curve.ts +99 -0
- package/src/provider-directive-defaults.ts +69 -0
- package/src/reduce-strategy-registry.ts +121 -0
- package/src/reference-board-templates.ts +81 -0
- package/src/reference-roles.ts +153 -0
- package/src/reference-sheet/__tests__/board-to-column.test.ts +20 -0
- package/src/reference-sheet/__tests__/catalog.test.ts +50 -0
- package/src/reference-sheet/__tests__/cost.test.ts +38 -0
- package/src/reference-sheet/__tests__/no-drift.test.ts +28 -0
- package/src/reference-sheet/__tests__/panel-plan.test.ts +61 -0
- package/src/reference-sheet/__tests__/panel-prompts.test.ts +17 -0
- package/src/reference-sheet/__tests__/plan-generation.test.ts +72 -0
- package/src/reference-sheet/__tests__/presets.test.ts +54 -0
- package/src/reference-sheet/__tests__/types.test.ts +24 -0
- package/src/reference-sheet/catalog.ts +144 -0
- package/src/reference-sheet/cost.ts +37 -0
- package/src/reference-sheet/credit-id.ts +7 -0
- package/src/reference-sheet/index.ts +8 -0
- package/src/reference-sheet/panel-plan.ts +65 -0
- package/src/reference-sheet/panel-prompts.ts +14 -0
- package/src/reference-sheet/plan-generation.ts +79 -0
- package/src/reference-sheet/presets.ts +77 -0
- package/src/reference-sheet/types.ts +92 -0
- package/src/repeat-types.ts +97 -0
- package/src/resolve-field-mappings.ts +119 -0
- package/src/route-filter.ts +80 -0
- package/src/scene-helper-types.ts +249 -0
- package/src/scene-node-types.ts +281 -0
- package/src/scraper-actors.ts +57 -0
- package/src/scraper-output-schemas.ts +25 -0
- package/src/seasons.ts +45 -0
- package/src/selector.ts +864 -0
- package/src/settled-with-limit.ts +42 -0
- package/src/shot-element.ts +43 -0
- package/src/social-media-specs.ts +121 -0
- package/src/social-post.ts +24 -0
- package/src/sub-workflow-validation.ts +78 -0
- package/src/supported-fonts.ts +40 -0
- package/src/surround.ts +113 -0
- package/src/switchx-pricing.ts +33 -0
- package/src/text-separators.ts +59 -0
- package/src/to-connected-references.ts +77 -0
- package/src/types.ts +272 -0
- package/src/variant-job-id.ts +17 -0
- package/src/vehicles.ts +213 -0
- package/src/video-analysis-pricing.ts +74 -0
- package/src/video-analysis.ts +127 -0
- package/src/video-duration.ts +25 -0
- package/src/voice-changer-models.ts +36 -0
- package/src/voice-matcher-types.ts +37 -0
- package/src/voices.ts +92 -0
- package/src/weapons.ts +190 -0
- package/src/workflow-export.ts +153 -0
package/src/types.ts
ADDED
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic node/edge interfaces for structural subtyping.
|
|
3
|
+
* Both frontend WorkflowNode and backend SimpleNode satisfy these.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { UsageMode } from "./character-usage-mode.js"
|
|
7
|
+
import type { LocationReferencePhotoKind } from "./entity-asset-types.js"
|
|
8
|
+
|
|
9
|
+
export interface GenericNode {
|
|
10
|
+
id: string
|
|
11
|
+
type: string
|
|
12
|
+
/**
|
|
13
|
+
* Canvas (React-Flow) position. The editor needs it to lay the node out —
|
|
14
|
+
* without it React-Flow stacks every node at (0,0). Optional so non-canvas
|
|
15
|
+
* callers (pure graph data) need not supply it.
|
|
16
|
+
*/
|
|
17
|
+
position?: { x: number; y: number }
|
|
18
|
+
/** Fixed canvas width the editor applies (e.g. 220 for generate-image/-video). */
|
|
19
|
+
width?: number
|
|
20
|
+
data: Record<string, unknown>
|
|
21
|
+
hidden?: boolean
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface GenericEdge {
|
|
25
|
+
/** Stable edge id — React-Flow requires one to render the connection. */
|
|
26
|
+
id?: string
|
|
27
|
+
source: string
|
|
28
|
+
target: string
|
|
29
|
+
sourceHandle?: string | null
|
|
30
|
+
targetHandle?: string | null
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface CharacterDef {
|
|
34
|
+
id: string
|
|
35
|
+
name: string
|
|
36
|
+
type: "reference" | "description"
|
|
37
|
+
category?: string
|
|
38
|
+
referenceImageUrl?: string
|
|
39
|
+
description?: string
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// ---------------------------------------------------------------------------
|
|
43
|
+
// Reference image metadata.
|
|
44
|
+
//
|
|
45
|
+
// An "identity" = (imageIndex, label) — what role this image plays at a given
|
|
46
|
+
// mention. The same image can appear under multiple identities (e.g. image 1
|
|
47
|
+
// used both as `:dragon` and as `:background`). Tokens in the prompt are
|
|
48
|
+
// `{image:N:label}`, with `{image:N}` as a backward-compat positional ref.
|
|
49
|
+
// ---------------------------------------------------------------------------
|
|
50
|
+
|
|
51
|
+
export type IdentityFidelity = "strict" | "balanced" | "loose" | "custom"
|
|
52
|
+
|
|
53
|
+
export type ReferenceSource =
|
|
54
|
+
| "manual"
|
|
55
|
+
| "wired-image"
|
|
56
|
+
| "wired-character"
|
|
57
|
+
| "wired-face"
|
|
58
|
+
| "wired-object"
|
|
59
|
+
| "wired-creature"
|
|
60
|
+
| "wired-location"
|
|
61
|
+
|
|
62
|
+
/** Per-identity user override stored on the consumer node. */
|
|
63
|
+
export interface IdentityMeta {
|
|
64
|
+
/** 1-based position of the source image. */
|
|
65
|
+
imageIndex: number
|
|
66
|
+
/** Role label this entry covers (e.g. "object", "background", "person"). */
|
|
67
|
+
label: string
|
|
68
|
+
fidelity?: IdentityFidelity
|
|
69
|
+
/** Free-text directive used when fidelity === "custom" (replaces the preset). */
|
|
70
|
+
customText?: string
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** Computed view of a single connected reference, ready for the prompt builder. */
|
|
74
|
+
export interface ConnectedReference {
|
|
75
|
+
id: string
|
|
76
|
+
defaultName: string
|
|
77
|
+
source: ReferenceSource
|
|
78
|
+
/** Optional rich text from upstream char/face/object/location node. */
|
|
79
|
+
description?: string
|
|
80
|
+
url: string
|
|
81
|
+
/** Slug of the source character (e.g. "kira") when this entry came from a character node. */
|
|
82
|
+
readonly characterSlug?: string
|
|
83
|
+
/** Variant slug (e.g. "smile"). undefined = canonical/default. */
|
|
84
|
+
readonly variantSlug?: string
|
|
85
|
+
/** Character's canonical_description. Set on every entry from the same character (used for dedup). */
|
|
86
|
+
readonly characterCanonicalDescription?: string | null
|
|
87
|
+
/**
|
|
88
|
+
* Resolved prompt-fragment for the elements (held-prop / styling / text /
|
|
89
|
+
* pickers) wired into the SOURCE character node's Assets/Prompt handle. A
|
|
90
|
+
* mode-INDEPENDENT sibling of `characterCanonicalDescription`: where the
|
|
91
|
+
* canonical description is only emitted for identity-locking modes, this is
|
|
92
|
+
* scene composition ("holding a smartphone…") and rides the character's
|
|
93
|
+
* identity bullet in EVERY mode that emits one (only `none` — which emits no
|
|
94
|
+
* bullet — drops it). Resolved at assembly time from the wiring (never stored
|
|
95
|
+
* on the character record). Stamped onto every entry of the same character so
|
|
96
|
+
* whichever entry produces the primary bullet carries it. Absent/empty →
|
|
97
|
+
* byte-identical to the pre-elementInjection output.
|
|
98
|
+
*/
|
|
99
|
+
readonly elementInjection?: string | null
|
|
100
|
+
/**
|
|
101
|
+
* Location's canonical_description. Set on every entry derived from a wired
|
|
102
|
+
* Location node (canonical image + future per-variant entries from Phase 2 #2
|
|
103
|
+
* @location:1:variant mention syntax). Mirrors `characterCanonicalDescription`
|
|
104
|
+
* — the directive builder appends this to the `wired-location` ref's subject
|
|
105
|
+
* line when the location's slug isn't in `suppressedCanonicalLocationIds`.
|
|
106
|
+
*/
|
|
107
|
+
readonly locationCanonicalDescription?: string | null
|
|
108
|
+
/** Slug of the source location (e.g. "old-library") when this entry came from a location node. Used by `suppressedCanonicalLocationIds` filtering. */
|
|
109
|
+
readonly locationSlug?: string
|
|
110
|
+
/**
|
|
111
|
+
* Variant bucket for per-variant location entries (Phase 2 #2). One of the
|
|
112
|
+
* 6 location asset buckets — "timeOfDay" / "weather" / "seasons" / "angles"
|
|
113
|
+
* / "lighting" / "atmosphereMotions". `undefined` for the canonical
|
|
114
|
+
* main-image entry.
|
|
115
|
+
*
|
|
116
|
+
* Used by `resolveLocationMentions` to find the entry matching a
|
|
117
|
+
* `@oldlibrary:1:weather/rain` mention token (lookup key is
|
|
118
|
+
* `${locationSlug}:${locationVariantBucket}/${locationVariantSlug}`).
|
|
119
|
+
*/
|
|
120
|
+
readonly locationVariantBucket?: string
|
|
121
|
+
/**
|
|
122
|
+
* Variant slug for per-variant location entries (e.g. "rain", "neon"). The
|
|
123
|
+
* raw variant `name` from the location node's bucket array, slugified via
|
|
124
|
+
* `locationMentionSlug` so the resolver match is case-insensitive and
|
|
125
|
+
* whitespace-tolerant (`"light rain"` ↔ `"light-rain"`). `undefined` for
|
|
126
|
+
* the canonical main-image entry.
|
|
127
|
+
*/
|
|
128
|
+
readonly locationVariantSlug?: string
|
|
129
|
+
/** Display name for the variant in autocomplete UI (e.g. "rain", "canonical"). */
|
|
130
|
+
readonly locationVariantDisplayName?: string
|
|
131
|
+
/**
|
|
132
|
+
* For user-uploaded reference photos on wired locations, the photo's
|
|
133
|
+
* `kind` — one of the 6 `LocationReferencePhotoKind` values. Drives the
|
|
134
|
+
* prompt-builder's subject-line annotation so the model knows the role
|
|
135
|
+
* (wide-angle establishing shot vs. interior detail vs. mood-board
|
|
136
|
+
* context). Mirrors `locationVariantBucket` but for user-uploaded refs
|
|
137
|
+
* instead of generated per-variant assets.
|
|
138
|
+
*
|
|
139
|
+
* Reference-photo entries have THIS field set but `locationVariantBucket`
|
|
140
|
+
* unset — that's how the connectedReferences filter at
|
|
141
|
+
* `prompt-builder.ts` lines ~1011-1016 distinguishes them from
|
|
142
|
+
* mention-only variant entries. Reference photos AUTO-ATTACH (they're
|
|
143
|
+
* not gated by `@-mention`), so the filter must NOT drop them.
|
|
144
|
+
*/
|
|
145
|
+
readonly locationReferencePhotoKind?: LocationReferencePhotoKind
|
|
146
|
+
/** The asset's own description (per-variant). null for canonical entries. */
|
|
147
|
+
readonly variantDescription?: string | null
|
|
148
|
+
/** Display name for the variant in autocomplete UI (e.g. "smile", "canonical"). */
|
|
149
|
+
readonly variantDisplayName?: string
|
|
150
|
+
/**
|
|
151
|
+
* Character node's `defaultUsageMode` propagated into every entry derived
|
|
152
|
+
* from that node. Used by `resolveCharacterMentions` as the fallback when
|
|
153
|
+
* the per-mention slug doesn't carry an explicit mode override. Absent for
|
|
154
|
+
* non-character refs and for character entries built without a node context
|
|
155
|
+
* (e.g. character-definition-only entries in legacy paths).
|
|
156
|
+
*/
|
|
157
|
+
readonly defaultUsageMode?: UsageMode
|
|
158
|
+
/**
|
|
159
|
+
* Character node's HYBRID `defaultRole` (the role-dropdown pick: a
|
|
160
|
+
* `REFERENCE_ROLE_PRESETS["wired-character"]` value or a sanitized Custom
|
|
161
|
+
* slug) propagated into every entry derived from that node. Read via
|
|
162
|
+
* `resolveDefaultRole(defaultRole, defaultUsageMode, source)` at the hybrid
|
|
163
|
+
* resolver sites — it takes precedence over `defaultUsageMode`. Absent for
|
|
164
|
+
* non-character refs and for nodes that never set a role (fall back to the
|
|
165
|
+
* `defaultUsageMode`-derived role, then the source default).
|
|
166
|
+
*/
|
|
167
|
+
readonly defaultRole?: string
|
|
168
|
+
/**
|
|
169
|
+
* Marks an entry as a user-attached "extra reference image" (see the
|
|
170
|
+
* `extraRefs` field on Generate/Modify/Image-to-Video/Text-to-Video/Video-to-Video
|
|
171
|
+
* node data types in the frontend). Extras are auto-attached to the worker
|
|
172
|
+
* `referenceImageUrls` AND get a dedicated directive line in the assembled
|
|
173
|
+
* prompt:
|
|
174
|
+
* - character-sourced extras of an already-emitted character →
|
|
175
|
+
* "Image N is the same subject as Image M, <description>."
|
|
176
|
+
* - character-sourced extras of a previously-unseen character →
|
|
177
|
+
* a canonical-style directive using the description as the descriptor
|
|
178
|
+
* - manual-sourced extras →
|
|
179
|
+
* "Image N (reference): <description>."
|
|
180
|
+
*
|
|
181
|
+
* The `description` field carries the per-ref free-text the user typed.
|
|
182
|
+
* Without this marker, character refs with a variantSlug are treated as
|
|
183
|
+
* autocomplete-only (the legacy behavior — unmentioned variants don't
|
|
184
|
+
* auto-attach), which is exactly what we DON'T want for explicit extras.
|
|
185
|
+
*/
|
|
186
|
+
readonly isExtraRef?: boolean
|
|
187
|
+
// ─── Character LoRA training (Cloud edition) ──────────────────────────────
|
|
188
|
+
// Propagated from CharacterNodeData on the upstream character node. Used
|
|
189
|
+
// by selectLoraRoutingForMentions (`@nodaro/shared` + backend mirror) to
|
|
190
|
+
// decide whether to route generate-image through `flux-lora-character`
|
|
191
|
+
// instead of reference-image injection.
|
|
192
|
+
readonly loraReplicateVersion?: string | null
|
|
193
|
+
readonly loraTriggerWord?: string | null
|
|
194
|
+
readonly loraTrainingStatus?: string | null
|
|
195
|
+
/**
|
|
196
|
+
* Optional, opt-in identity-lock for this reference. When `enabled === true`,
|
|
197
|
+
* a short fidelity line is prepended so the model preserves the subject's
|
|
198
|
+
* exact identity. `text` overrides the built-in default (use `{ref}` as the
|
|
199
|
+
* placeholder for the reference's binding, e.g. "reference image A"). Default
|
|
200
|
+
* is OFF for EVERY source: absent or `enabled === false` emits no lock line.
|
|
201
|
+
* The single new structured-shape field for external (API/MCP/SDK) parity.
|
|
202
|
+
*/
|
|
203
|
+
readonly identityLock?: { enabled: boolean; text?: string }
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/** Default label per source — used by `@` autocomplete and inventory fallback. */
|
|
207
|
+
export const DEFAULT_LABEL_BY_SOURCE: Record<ReferenceSource, string> = {
|
|
208
|
+
"manual": "object",
|
|
209
|
+
"wired-image": "object",
|
|
210
|
+
"wired-character": "person",
|
|
211
|
+
"wired-face": "face",
|
|
212
|
+
"wired-object": "object",
|
|
213
|
+
// A bound Creature (animal/beast/monster) — its directive reads as a living
|
|
214
|
+
// subject ("match anatomy, markings…"), not a prop. See CREATURE_LABELS in
|
|
215
|
+
// prompt-builder.ts.
|
|
216
|
+
"wired-creature": "creature",
|
|
217
|
+
"wired-location": "background",
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// ---------------------------------------------------------------------------
|
|
221
|
+
// Scene node data — minimal interface for buildScenePrompt.
|
|
222
|
+
// Frontend SceneNodeDataType satisfies this via structural subtyping.
|
|
223
|
+
// Backend casts Record<string, unknown> node data to this.
|
|
224
|
+
// ---------------------------------------------------------------------------
|
|
225
|
+
|
|
226
|
+
export interface SceneCharacterEntry {
|
|
227
|
+
readonly assetId: string
|
|
228
|
+
readonly mood: string
|
|
229
|
+
readonly action: string
|
|
230
|
+
readonly positionInFrame?: "left" | "center" | "right" | "foreground" | "background"
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export interface SceneLocationEntry {
|
|
234
|
+
readonly assetId: string
|
|
235
|
+
readonly name?: string
|
|
236
|
+
readonly isPrimary?: boolean
|
|
237
|
+
readonly timeOfDay?: string
|
|
238
|
+
readonly weather?: string
|
|
239
|
+
readonly lighting?: string
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export interface SceneObjectEntry {
|
|
243
|
+
readonly assetId: string
|
|
244
|
+
readonly description?: string
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export interface SceneDialogueEntry {
|
|
248
|
+
readonly characterName: string
|
|
249
|
+
readonly text: string
|
|
250
|
+
readonly emotion?: string
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export interface SceneData {
|
|
254
|
+
readonly shotType: string
|
|
255
|
+
readonly cameraAngle: string
|
|
256
|
+
readonly aspectRatio: string
|
|
257
|
+
readonly characters: readonly SceneCharacterEntry[]
|
|
258
|
+
readonly locations?: readonly SceneLocationEntry[]
|
|
259
|
+
readonly objects: readonly SceneObjectEntry[]
|
|
260
|
+
readonly mood: readonly string[]
|
|
261
|
+
readonly visualStyle: string
|
|
262
|
+
readonly depthOfField: string
|
|
263
|
+
readonly lensType: string
|
|
264
|
+
readonly cameraMovement: string
|
|
265
|
+
readonly colorPalette: readonly string[]
|
|
266
|
+
readonly summary: string
|
|
267
|
+
readonly dialogue?: readonly SceneDialogueEntry[]
|
|
268
|
+
readonly directorNotes?: string
|
|
269
|
+
readonly timeOfDay: string
|
|
270
|
+
readonly weather: string
|
|
271
|
+
readonly lighting: string
|
|
272
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* R2-key + result-id suffix for multi-variant jobs. Provider returns multiple
|
|
3
|
+
* URLs from a single task (Grok = up to 6 images, Suno = 2 tracks); each
|
|
4
|
+
* variant gets a deterministic suffix-keyed ID so primary stays at the original
|
|
5
|
+
* jobId for backwards compat and extras land under `${jobId}-v1`, `${jobId}-v2`, …
|
|
6
|
+
*
|
|
7
|
+
* Used by:
|
|
8
|
+
* - backend `uploadImageVariantsMaybeWatermark` (R2 key)
|
|
9
|
+
* - backend Suno `uploadAllSunoTracks` (R2 key)
|
|
10
|
+
* - frontend `poll-job.ts handleJobCompleted` (GeneratedResult.jobId)
|
|
11
|
+
* - frontend `run-handlers.ts` orchestrator poll loop (GeneratedResult.jobId)
|
|
12
|
+
*
|
|
13
|
+
* Changing the suffix scheme requires updating every caller, hence the shared helper.
|
|
14
|
+
*/
|
|
15
|
+
export function variantJobId(baseJobId: string, index: number): string {
|
|
16
|
+
return index === 0 ? baseJobId : `${baseJobId}-v${index}`
|
|
17
|
+
}
|
package/src/vehicles.ts
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical catalog of vehicle presets for the Object entity node.
|
|
3
|
+
*
|
|
4
|
+
* When the Object category is "vehicle", users pick a specific vehicle from
|
|
5
|
+
* this catalog. The picker auto-fills the object's `objectName` and
|
|
6
|
+
* `description` so the existing `buildObjectPrompt` pipeline just works — no
|
|
7
|
+
* backend prompt changes needed.
|
|
8
|
+
*
|
|
9
|
+
* Organized into everyday sub-categories: classic cars, everyday cars,
|
|
10
|
+
* performance cars, motorcycles, bicycles (human-powered), trucks, transit
|
|
11
|
+
* (buses + rail + horse-drawn), aircraft, watercraft, military, construction,
|
|
12
|
+
* and sci-fi.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
export type VehicleSubcategory =
|
|
16
|
+
| "cars-classic"
|
|
17
|
+
| "cars-everyday"
|
|
18
|
+
| "cars-performance"
|
|
19
|
+
| "motorcycles"
|
|
20
|
+
| "bicycles"
|
|
21
|
+
| "trucks"
|
|
22
|
+
| "transit"
|
|
23
|
+
| "aircraft"
|
|
24
|
+
| "watercraft"
|
|
25
|
+
| "military"
|
|
26
|
+
| "construction"
|
|
27
|
+
| "sci-fi"
|
|
28
|
+
|
|
29
|
+
export interface Vehicle {
|
|
30
|
+
readonly id: string
|
|
31
|
+
readonly label: string
|
|
32
|
+
readonly subcategory: VehicleSubcategory
|
|
33
|
+
readonly description: string
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const VEHICLES: ReadonlyArray<Vehicle> = [
|
|
37
|
+
// -------------------- Classic Cars --------------------
|
|
38
|
+
{ id: "muscle-car", label: "Muscle Car", subcategory: "cars-classic", description: "Aggressive American muscle car with a long hood, wide stance, dual chrome exhausts and a deep throaty V8 presence" },
|
|
39
|
+
{ id: "car-57-chevy", label: "'57 Chevy", subcategory: "cars-classic", description: "Iconic 1957 Chevrolet Bel Air with tail fins, chrome bumpers, two-tone paint and whitewall tires" },
|
|
40
|
+
{ id: "hot-rod", label: "Hot Rod", subcategory: "cars-classic", description: "Chopped and channeled hot rod with flame paint job, exposed chrome engine, fat rear tires and skinny fronts" },
|
|
41
|
+
{ id: "vintage-roadster", label: "Vintage Roadster", subcategory: "cars-classic", description: "Pre-war open-top roadster with sweeping fenders, running boards, wire-spoke wheels and a long polished hood" },
|
|
42
|
+
{ id: "model-t", label: "Ford Model T", subcategory: "cars-classic", description: "Early 20th-century black Model T with boxy upright body, brass headlamps, spoked wheels and a cranked engine" },
|
|
43
|
+
{ id: "vw-beetle", label: "VW Beetle", subcategory: "cars-classic", description: "Rounded pastel-colored Volkswagen Beetle with a curved hood, air-cooled rear engine and cheerful bug-like face" },
|
|
44
|
+
{ id: "checker-cab", label: "Checker Cab", subcategory: "cars-classic", description: "Classic yellow New York checker taxi with a boxy body, black-and-white checker band and roof light" },
|
|
45
|
+
{ id: "woody-wagon", label: "Woody Wagon", subcategory: "cars-classic", description: "Surf-era station wagon with wood-paneled side doors, chrome bumpers and a long tailgate" },
|
|
46
|
+
{ id: "lowrider", label: "Lowrider", subcategory: "cars-classic", description: "Candy-painted lowrider with hydraulic suspension, chrome spoke wheels, whitewall tires and airbrushed murals" },
|
|
47
|
+
|
|
48
|
+
// -------------------- Everyday Cars --------------------
|
|
49
|
+
{ id: "sedan", label: "Sedan", subcategory: "cars-everyday", description: "Four-door midsize sedan with a streamlined silhouette, chrome accents and modern LED headlights" },
|
|
50
|
+
{ id: "suv", label: "SUV", subcategory: "cars-everyday", description: "Large sport utility vehicle with a tall stance, roof rails, big alloy wheels and a muscular squared-off body" },
|
|
51
|
+
{ id: "hatchback", label: "Hatchback", subcategory: "cars-everyday", description: "Compact hatchback with a short rear, lift-up tailgate, nimble proportions and bright paint" },
|
|
52
|
+
{ id: "minivan", label: "Minivan", subcategory: "cars-everyday", description: "Family minivan with sliding side doors, a tall spacious cabin, tinted rear windows and a roomy rear hatch" },
|
|
53
|
+
{ id: "station-wagon", label: "Station Wagon", subcategory: "cars-everyday", description: "Long-roof station wagon with extended cargo area, rear quarter windows and a family-oriented silhouette" },
|
|
54
|
+
{ id: "crossover", label: "Crossover", subcategory: "cars-everyday", description: "Mid-sized crossover SUV with a raised ride height, car-like styling and aerodynamic LED accents" },
|
|
55
|
+
{ id: "electric-car", label: "Electric Car", subcategory: "cars-everyday", description: "Sleek modern electric car with a smooth grille-less front, flush door handles and aerodynamic clean lines" },
|
|
56
|
+
{ id: "hatchback-econobox", label: "Econobox", subcategory: "cars-everyday", description: "Tiny affordable two-door city car with a stubby hood, small wheels and simple compact styling" },
|
|
57
|
+
{ id: "police-car", label: "Police Car", subcategory: "cars-everyday", description: "Black-and-white patrol car with a roof-mounted light bar flashing red and blue, push bar on the front bumper, agency decals on the doors and antenna whips on the trunk" },
|
|
58
|
+
|
|
59
|
+
// -------------------- Performance / Exotic --------------------
|
|
60
|
+
{ id: "sports-car", label: "Sports Car", subcategory: "cars-performance", description: "Low-slung two-door sports car with a wide aggressive stance, aerodynamic bodywork and bright glossy paint" },
|
|
61
|
+
{ id: "supercar", label: "Supercar", subcategory: "cars-performance", description: "Exotic mid-engined supercar with scissor doors, an ultra-low hood, huge rear intakes and a carbon-fiber rear wing" },
|
|
62
|
+
{ id: "convertible", label: "Convertible", subcategory: "cars-performance", description: "Two-seat convertible with the soft top down, a long sculpted hood and wind streaming past low-cut doors" },
|
|
63
|
+
{ id: "grand-tourer", label: "Grand Tourer", subcategory: "cars-performance", description: "Elegant grand-touring coupe with a long flowing hood, four exhausts and luxurious proportions" },
|
|
64
|
+
{ id: "roadster", label: "Roadster", subcategory: "cars-performance", description: "Compact two-seat roadster with a wraparound windshield, soft top tucked away and classic top-down silhouette" },
|
|
65
|
+
{ id: "racing-car", label: "Racing Car", subcategory: "cars-performance", description: "Open-wheel formula racing car with slick tires, a large rear wing, halo cockpit and aerodynamic sidepods covered in sponsor logos" },
|
|
66
|
+
{ id: "rally-car", label: "Rally Car", subcategory: "cars-performance", description: "Dirt-splattered rally hatchback with knobby tires, huge mud flaps, roof-mounted lights and race liveries" },
|
|
67
|
+
{ id: "drift-car", label: "Drift Car", subcategory: "cars-performance", description: "Aggressive drift-tuned coupe with a wide body kit, oversized rear wing, neon underglow and tire smoke trailing behind" },
|
|
68
|
+
|
|
69
|
+
// -------------------- Motorcycles --------------------
|
|
70
|
+
{ id: "sportbike", label: "Sportbike", subcategory: "motorcycles", description: "Aerodynamic sport motorcycle with a crouched riding stance, full fairings, sticky tires and bright race-style graphics" },
|
|
71
|
+
{ id: "cruiser", label: "Cruiser", subcategory: "motorcycles", description: "Low-slung cruiser motorcycle with a long teardrop tank, swept-back handlebars, chrome exhausts and fat rear tire" },
|
|
72
|
+
{ id: "chopper", label: "Chopper", subcategory: "motorcycles", description: "Stretched custom chopper with a raked-out front end, tall ape-hanger handlebars, skinny front wheel and chrome everywhere" },
|
|
73
|
+
{ id: "dirt-bike", label: "Dirt Bike", subcategory: "motorcycles", description: "Off-road dirt bike with knobby tires, tall suspension, plastic fairings in bright colors and high handlebars" },
|
|
74
|
+
{ id: "scooter", label: "Scooter", subcategory: "motorcycles", description: "Compact step-through scooter with a smooth body shell, small wheels, a flat footrest and an under-seat storage bump" },
|
|
75
|
+
{ id: "moped", label: "Moped", subcategory: "motorcycles", description: "Small pedal-start moped with a simple steel frame, basket up front and a tiny gas engine under the seat" },
|
|
76
|
+
{ id: "cafe-racer", label: "Cafe Racer", subcategory: "motorcycles", description: "Stripped-down cafe racer motorcycle with clip-on bars, a humped solo seat, exposed frame and minimalist tank" },
|
|
77
|
+
|
|
78
|
+
// -------------------- Bicycles & Human-Powered --------------------
|
|
79
|
+
{ id: "road-bike", label: "Road Bike", subcategory: "bicycles", description: "Lightweight road bike with drop handlebars, skinny high-pressure tires and an aerodynamic carbon frame" },
|
|
80
|
+
{ id: "mountain-bike", label: "Mountain Bike", subcategory: "bicycles", description: "Rugged mountain bike with knobby tires, front suspension fork, flat handlebars and a mud-splattered frame" },
|
|
81
|
+
{ id: "bmx", label: "BMX Bike", subcategory: "bicycles", description: "Stunt BMX bike with a small frame, pegs on the axles, chunky tires and a cross-brace handlebar" },
|
|
82
|
+
{ id: "cruiser-bike", label: "Beach Cruiser", subcategory: "bicycles", description: "Relaxed beach cruiser bicycle with a curved frame, swept-back handlebars, wide seat and balloon tires" },
|
|
83
|
+
{ id: "penny-farthing", label: "Penny Farthing", subcategory: "bicycles", description: "Victorian penny-farthing bicycle with an enormous front wheel, tiny rear wheel and a perched leather saddle high above" },
|
|
84
|
+
{ id: "unicycle", label: "Unicycle", subcategory: "bicycles", description: "Single-wheeled unicycle with a tall seat post, simple pedals on the hub and a minimalist circus look" },
|
|
85
|
+
{ id: "skateboard", label: "Skateboard", subcategory: "bicycles", description: "Wooden skateboard deck with grip tape on top, four polyurethane wheels and colorful graphic art on the underside" },
|
|
86
|
+
{ id: "kick-scooter", label: "Kick Scooter", subcategory: "bicycles", description: "Two-wheeled kick scooter with a tall T-handle, narrow deck and small hard wheels" },
|
|
87
|
+
|
|
88
|
+
// -------------------- Trucks --------------------
|
|
89
|
+
{ id: "pickup-truck", label: "Pickup Truck", subcategory: "trucks", description: "Full-size pickup truck with a tall crew cab, open rear bed, chrome grille and aggressive off-road tires" },
|
|
90
|
+
{ id: "semi-truck", label: "Semi Truck", subcategory: "trucks", description: "Long-haul semi truck with a sleeper cab, tall chrome exhaust stacks and a massive articulated trailer behind" },
|
|
91
|
+
{ id: "dump-truck", label: "Dump Truck", subcategory: "trucks", description: "Heavy-duty dump truck with a raised tipping bed, massive off-road tires and yellow construction livery" },
|
|
92
|
+
{ id: "tow-truck", label: "Tow Truck", subcategory: "trucks", description: "Tow truck with a hydraulic boom, hook and flat recovery bed, rotating amber warning lights and bold signage" },
|
|
93
|
+
{ id: "delivery-van", label: "Delivery Van", subcategory: "trucks", description: "White delivery van with a boxy cargo hold, sliding side door, roof racks and corporate livery decals" },
|
|
94
|
+
{ id: "ice-cream-truck", label: "Ice Cream Truck", subcategory: "trucks", description: "Cheerful ice cream truck with pastel paint, a window counter displaying treats, colorful decals and a cone-shaped rooftop ornament" },
|
|
95
|
+
{ id: "food-truck", label: "Food Truck", subcategory: "trucks", description: "Stylized food truck with a folding service window, chalkboard menu, string lights and a bright custom wrap" },
|
|
96
|
+
{ id: "box-truck", label: "Box Truck", subcategory: "trucks", description: "Medium box truck with a plain rectangular cargo box, roll-up rear door and a forward cab" },
|
|
97
|
+
{ id: "ambulance", label: "Ambulance", subcategory: "trucks", description: "Emergency medical ambulance with a tall white box body, red cross and EMS livery, flashing red-and-blue lightbar, side warning lights and a high-visibility chevron pattern across the rear doors" },
|
|
98
|
+
|
|
99
|
+
// -------------------- Transit (Bus / Rail / Horse-Drawn) --------------------
|
|
100
|
+
{ id: "city-bus", label: "City Bus", subcategory: "transit", description: "Modern articulated city bus with a low floor, sliding doors, destination sign up front and an advertising wrap" },
|
|
101
|
+
{ id: "school-bus", label: "School Bus", subcategory: "transit", description: "Classic yellow American school bus with black trim, flashing red stop signs, stop-arm out and black stenciled numbers" },
|
|
102
|
+
{ id: "double-decker", label: "Double-Decker Bus", subcategory: "transit", description: "Iconic red double-decker bus with a rounded roof, open staircase inside and destination scroll up front" },
|
|
103
|
+
{ id: "coach-bus", label: "Coach Bus", subcategory: "transit", description: "Long-distance coach bus with tinted panoramic windows, luggage bays underneath and streamlined bodywork" },
|
|
104
|
+
{ id: "train", label: "Train", subcategory: "transit", description: "Modern passenger train with a sleek streamlined nose, panoramic windows and a line of gleaming cars" },
|
|
105
|
+
{ id: "steam-locomotive", label: "Steam Locomotive", subcategory: "transit", description: "Black steam locomotive with a tall smokestack puffing steam, a boiler, connecting rods and a coal tender behind" },
|
|
106
|
+
{ id: "bullet-train", label: "Bullet Train", subcategory: "transit", description: "High-speed bullet train with an aerodynamic pointed nose, smooth white-and-blue livery and narrow windows" },
|
|
107
|
+
{ id: "subway", label: "Subway Train", subcategory: "transit", description: "Stainless-steel subway car with graffiti-resistant panels, sliding doors and rows of fluorescent lights inside" },
|
|
108
|
+
{ id: "tram", label: "Tram", subcategory: "transit", description: "Classic city tram car with a boxy wooden-framed body, overhead pantograph and rails running beneath" },
|
|
109
|
+
{ id: "stagecoach", label: "Stagecoach", subcategory: "transit", description: "Wild-west stagecoach with a wooden body, leaf-spring suspension, roof luggage rack and a team of horses harnessed in front" },
|
|
110
|
+
{ id: "horse-carriage", label: "Horse-Drawn Carriage", subcategory: "transit", description: "Ornate horse-drawn carriage with polished wood panels, large spoked wheels and a velvet-upholstered cabin" },
|
|
111
|
+
|
|
112
|
+
// -------------------- Aircraft --------------------
|
|
113
|
+
{ id: "airliner", label: "Airliner", subcategory: "aircraft", description: "Wide-body commercial airliner with twin jet engines under swept wings, rows of oval windows and a tall swept tail fin" },
|
|
114
|
+
{ id: "biplane", label: "Biplane", subcategory: "aircraft", description: "Vintage biplane with two stacked wings connected by struts and wire bracing, an open cockpit and a wooden propeller" },
|
|
115
|
+
{ id: "propeller-plane", label: "Propeller Plane", subcategory: "aircraft", description: "Small single-engine propeller plane with a spinning nose prop, high wings, fixed landing gear and a bubble cockpit" },
|
|
116
|
+
{ id: "helicopter", label: "Helicopter", subcategory: "aircraft", description: "Utility helicopter with a large main rotor on top, a slim tail boom, skids underneath and a bubble-front cockpit" },
|
|
117
|
+
{ id: "seaplane", label: "Seaplane", subcategory: "aircraft", description: "Seaplane with twin pontoon floats instead of wheels, high wings and a propeller, resting on calm water" },
|
|
118
|
+
{ id: "hot-air-balloon", label: "Hot Air Balloon", subcategory: "aircraft", description: "Giant hot-air balloon with a colorful rainbow-striped fabric envelope, a roaring flame burner flaring upward into the mouth and a wicker passenger basket suspended below by braided cables" },
|
|
119
|
+
{ id: "blimp", label: "Blimp", subcategory: "aircraft", description: "Sausage-shaped blimp airship with a sleek silver envelope, small rear fins and a slung gondola beneath" },
|
|
120
|
+
{ id: "airship", label: "Airship / Dirigible", subcategory: "aircraft", description: "Massive rigid lighter-than-air dirigible with a long cigar-shaped fabric-covered metal frame, large rear stabilizer fins, multiple slung engine gondolas and a long passenger cabin running underneath the hull" },
|
|
121
|
+
{ id: "glider", label: "Glider", subcategory: "aircraft", description: "Elegant sailplane glider with ultra-long narrow wings, no engine and a teardrop cockpit pod" },
|
|
122
|
+
{ id: "paraglider", label: "Paraglider", subcategory: "aircraft", description: "Foot-launched paraglider with a wide elliptical soft-fabric ram-air wing arched overhead, dozens of slender suspension lines converging into a tandem harness with a seated pilot" },
|
|
123
|
+
{ id: "microlight", label: "Microlight Aircraft", subcategory: "aircraft", description: "Lightweight single-pilot microlight aircraft with an exposed tubular metal frame, fabric-covered high wings, a small pusher propeller engine behind the open seat and tricycle landing gear" },
|
|
124
|
+
{ id: "drone", label: "Drone", subcategory: "aircraft", description: "Quadcopter camera drone with four spinning rotors on slim arms, a central body and a gimbaled camera underneath" },
|
|
125
|
+
|
|
126
|
+
// -------------------- Watercraft --------------------
|
|
127
|
+
{ id: "yacht", label: "Yacht", subcategory: "watercraft", description: "Sleek luxury motor yacht with multiple decks, tinted windows, a radar mast and glossy white hull cutting through blue water" },
|
|
128
|
+
{ id: "sailboat", label: "Sailboat", subcategory: "watercraft", description: "Graceful sailboat with a tall mast, taut white sails catching the wind and a narrow fiberglass hull" },
|
|
129
|
+
{ id: "speedboat", label: "Speedboat", subcategory: "watercraft", description: "Fast powerboat with a pointed deep-V hull, low windshield and a roaring outboard motor kicking up a wake" },
|
|
130
|
+
{ id: "cruise-ship", label: "Cruise Ship", subcategory: "watercraft", description: "Massive cruise ship with multiple towering decks, rows of balconies, bright funnels and a pointed bow" },
|
|
131
|
+
{ id: "cargo-ship", label: "Cargo Ship", subcategory: "watercraft", description: "Giant container cargo ship stacked high with rainbow-colored shipping containers, a bridge tower at the stern" },
|
|
132
|
+
{ id: "canoe", label: "Canoe", subcategory: "watercraft", description: "Classic wooden canoe with a pointed bow and stern, a cedar-ribbed interior and a single paddle resting inside" },
|
|
133
|
+
{ id: "kayak", label: "Kayak", subcategory: "watercraft", description: "Slim plastic kayak with a low profile, enclosed cockpit opening and a double-bladed paddle" },
|
|
134
|
+
{ id: "rowboat", label: "Rowboat", subcategory: "watercraft", description: "Small wooden rowboat with flat-bottom planks, oarlocks on the gunwales and two wooden oars" },
|
|
135
|
+
{ id: "jet-ski", label: "Jet Ski", subcategory: "watercraft", description: "Stand-up personal watercraft with an aggressive fairing, handlebars, a single seat and a jet-propulsion nozzle" },
|
|
136
|
+
{ id: "submarine", label: "Submarine", subcategory: "watercraft", description: "Military submarine with a long cylindrical hull, a conning tower with periscopes and a bulbous bow diving through deep water" },
|
|
137
|
+
{ id: "pirate-ship", label: "Pirate Ship", subcategory: "watercraft", description: "Wooden pirate galleon with tall masts, square sails, a figurehead on the bow, cannons along the hull and a tattered black flag" },
|
|
138
|
+
{ id: "hovercraft", label: "Hovercraft", subcategory: "watercraft", description: "Air-cushion hovercraft riding on a thick inflated rubber skirt billowing outward, large rear ducted fans for propulsion, a flat boxy passenger cabin on top and capable of skimming over both water and land" },
|
|
139
|
+
|
|
140
|
+
// -------------------- Military --------------------
|
|
141
|
+
{ id: "tank", label: "Tank", subcategory: "military", description: "Heavy battle tank with a long cannon barrel, rotating turret, thick sloped armor and wide continuous tracks" },
|
|
142
|
+
{ id: "humvee", label: "Humvee", subcategory: "military", description: "Military Humvee with a wide stance, armored angular bodywork, off-road tires and a roof-mounted turret" },
|
|
143
|
+
{ id: "armored-personnel-carrier", label: "Armored Personnel Carrier", subcategory: "military", description: "Tracked armored personnel carrier with a boxy hull, rear ramp and a small turret up top" },
|
|
144
|
+
{ id: "fighter-jet", label: "Fighter Jet", subcategory: "military", description: "Supersonic fighter jet with swept delta wings, a sharp pointed nose, twin tail fins and missiles on wing pylons" },
|
|
145
|
+
{ id: "stealth-bomber", label: "Stealth Bomber", subcategory: "military", description: "Flying-wing stealth bomber with a matte black triangular silhouette, no tail fins and faceted radar-absorbing surfaces" },
|
|
146
|
+
{ id: "destroyer", label: "Destroyer", subcategory: "military", description: "Sleek naval destroyer with a long grey hull, gun turrets, missile launchers and a radar-bristling superstructure" },
|
|
147
|
+
{ id: "aircraft-carrier", label: "Aircraft Carrier", subcategory: "military", description: "Massive aircraft carrier with a flat-top flight deck, island tower with radar arrays and fighter jets parked in rows" },
|
|
148
|
+
|
|
149
|
+
// -------------------- Construction --------------------
|
|
150
|
+
{ id: "bulldozer", label: "Bulldozer", subcategory: "construction", description: "Yellow construction bulldozer with a huge push blade up front, heavy tracks and a tall exhaust stack" },
|
|
151
|
+
{ id: "excavator", label: "Excavator", subcategory: "construction", description: "Hydraulic excavator with an articulated arm, toothed bucket, rotating cab and heavy tracked base" },
|
|
152
|
+
{ id: "crane-truck", label: "Crane Truck", subcategory: "construction", description: "Mobile crane truck with a massive telescoping boom extended upward, stabilizer outriggers and a heavy counterweight" },
|
|
153
|
+
{ id: "cement-mixer", label: "Cement Mixer", subcategory: "construction", description: "Cement mixer truck with a large rotating drum, chute at the rear and a boxy cab" },
|
|
154
|
+
{ id: "forklift", label: "Forklift", subcategory: "construction", description: "Warehouse forklift with twin steel fork tines raised in front, a roll cage over the driver and a compact counterweight rear" },
|
|
155
|
+
{ id: "backhoe", label: "Backhoe", subcategory: "construction", description: "Backhoe loader with a front bucket for scooping and a rear articulated arm with a toothed digging bucket" },
|
|
156
|
+
{ id: "tractor", label: "Tractor", subcategory: "construction", description: "Farm tractor with large knobby rear tires, smaller front tires, a roof canopy and a towing hitch at the back" },
|
|
157
|
+
|
|
158
|
+
// -------------------- Sci-Fi / Fantasy --------------------
|
|
159
|
+
{ id: "spaceship", label: "Spaceship", subcategory: "sci-fi", description: "Sleek interstellar spaceship with curved fuselage, glowing engine nozzles, antenna arrays and a command bridge window" },
|
|
160
|
+
{ id: "starfighter", label: "Starfighter", subcategory: "sci-fi", description: "Agile single-pilot starfighter with swept wings, laser cannons on the wingtips, a bubble cockpit and glowing thrusters" },
|
|
161
|
+
{ id: "hovercar", label: "Hovercar", subcategory: "sci-fi", description: "Futuristic hovercar floating above the ground with no wheels, glowing underside thrusters, seamless bodywork and a curved canopy" },
|
|
162
|
+
{ id: "mech", label: "Mech", subcategory: "sci-fi", description: "Giant bipedal mech robot with armored plating, hydraulic pistons, a cockpit in the torso and heavy weapons mounted on the arms" },
|
|
163
|
+
{ id: "flying-saucer", label: "Flying Saucer", subcategory: "sci-fi", description: "Classic UFO flying saucer with a metallic disc body, glowing porthole lights around the rim and a domed cockpit on top" },
|
|
164
|
+
{ id: "space-shuttle", label: "Space Shuttle", subcategory: "sci-fi", description: "Space shuttle orbiter with white delta wings, a black heat-shield underbelly and huge rocket nozzles at the rear" },
|
|
165
|
+
{ id: "rocket", label: "Rocket", subcategory: "sci-fi", description: "Tall cylindrical rocket with pointed nose cone, tail fins, booster stages and flames roaring from the engines on launch" },
|
|
166
|
+
{ id: "hoverboard", label: "Hoverboard", subcategory: "sci-fi", description: "Futuristic hoverboard floating inches above the ground with glowing underside jets and a sleek single-plank body" },
|
|
167
|
+
] as const
|
|
168
|
+
|
|
169
|
+
const vehicleById = new Map<string, Vehicle>(VEHICLES.map((v) => [v.id, v]))
|
|
170
|
+
|
|
171
|
+
export function getVehicle(id: string | undefined | null): Vehicle | undefined {
|
|
172
|
+
if (!id) return undefined
|
|
173
|
+
return vehicleById.get(id)
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export function getVehicleLabel(id: string | undefined | null, fallback?: string): string {
|
|
177
|
+
const v = getVehicle(id)
|
|
178
|
+
if (v) return v.label
|
|
179
|
+
if (fallback !== undefined) return fallback
|
|
180
|
+
return (id ?? "").replace(/-/g, " ").replace(/\b\w/g, (c) => c.toUpperCase())
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export const VEHICLE_IDS: ReadonlyArray<string> = VEHICLES.map((v) => v.id)
|
|
184
|
+
|
|
185
|
+
export const VEHICLE_SUBCATEGORY_LABELS: Readonly<Record<VehicleSubcategory, string>> = {
|
|
186
|
+
"cars-classic": "Classic Cars",
|
|
187
|
+
"cars-everyday": "Everyday Cars",
|
|
188
|
+
"cars-performance": "Performance Cars",
|
|
189
|
+
motorcycles: "Motorcycles",
|
|
190
|
+
bicycles: "Bicycles & Human-Powered",
|
|
191
|
+
trucks: "Trucks",
|
|
192
|
+
transit: "Bus / Rail / Carriage",
|
|
193
|
+
aircraft: "Aircraft",
|
|
194
|
+
watercraft: "Watercraft",
|
|
195
|
+
military: "Military",
|
|
196
|
+
construction: "Construction",
|
|
197
|
+
"sci-fi": "Sci-Fi",
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export const VEHICLE_SUBCATEGORY_ORDER: ReadonlyArray<VehicleSubcategory> = [
|
|
201
|
+
"cars-classic",
|
|
202
|
+
"cars-everyday",
|
|
203
|
+
"cars-performance",
|
|
204
|
+
"motorcycles",
|
|
205
|
+
"bicycles",
|
|
206
|
+
"trucks",
|
|
207
|
+
"transit",
|
|
208
|
+
"aircraft",
|
|
209
|
+
"watercraft",
|
|
210
|
+
"military",
|
|
211
|
+
"construction",
|
|
212
|
+
"sci-fi",
|
|
213
|
+
]
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Video-analysis pricing — shared duration-bucket credit model.
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for the video-analysis node's NON-monetary credit
|
|
5
|
+
* math: duration bucketing, the window-batching constants (also consumed by
|
|
6
|
+
* the backend workers for real chunking, not just pricing), and the
|
|
7
|
+
* composite credit-id builder. The route (charge at generate-time), the
|
|
8
|
+
* worker (re-check + settle), and the frontend node UI (via
|
|
9
|
+
* `buildVideoAnalysisCreditId` + `/v1/credits/model-cost`) all derive from
|
|
10
|
+
* these.
|
|
11
|
+
*
|
|
12
|
+
* The measured-rate constants and the $-derived `videoAnalysisBucketCredits`
|
|
13
|
+
* formula live in `backend/src/lib/pricing/video-analysis-cost.ts` (core,
|
|
14
|
+
* not ee/ — the MCP tool description builder needs them regardless of
|
|
15
|
+
* edition). They were moved out of this package (published Apache-2.0 on
|
|
16
|
+
* npm — an irrevocable grant) per the 2026-07-06 public-flip IP audit, S5.
|
|
17
|
+
*
|
|
18
|
+
* `VIDEO_ANALYSIS_BUCKET_CREDITS` below is the precomputed OUTPUT of that
|
|
19
|
+
* backend formula for every (model × bucket) combination — a plain credit
|
|
20
|
+
* lookup table, not a formula, mirroring the same wire-contract pattern
|
|
21
|
+
* `VIDEO_CLIP_CREDITS` uses in `film-pricing.ts`. It is what the frontend's
|
|
22
|
+
* client-side cost preview (`estimateNodeCredits` in
|
|
23
|
+
* workflow-editor/types.ts) reads instead of calling the formula directly.
|
|
24
|
+
* A backend test (`video-analysis-cost.test.ts`) cross-checks this table
|
|
25
|
+
* against the live formula so it can't silently drift.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
export const VIDEO_ANALYSIS_DURATION_BUCKETS = [60, 180, 360, 600] as const
|
|
29
|
+
/** Worker re-check grace: route metadata is integer-rounded, provider durations nominal;
|
|
30
|
+
* ffprobe floats run 0.05–2 s over. Zero tolerance fails legit videos at 1:00/3:00/6:00/10:00. */
|
|
31
|
+
export const VIDEO_ANALYSIS_DURATION_TOLERANCE_SEC = 3
|
|
32
|
+
export const VIDEO_ANALYSIS_MAX_DURATION_SEC = 600
|
|
33
|
+
const WINDOW_LEN = 150, WINDOW_STRIDE = 145, WINDOW_OVERLAP = 5
|
|
34
|
+
export const VIDEO_ANALYSIS_WINDOW = { LEN: WINDOW_LEN, STRIDE: WINDOW_STRIDE, OVERLAP: WINDOW_OVERLAP, SINGLE_MAX: 180 } as const
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Precomputed credit cost per (model, bucket) — the OUTPUT of the backend's
|
|
38
|
+
* `videoAnalysisBucketCredits` formula, not a formula itself. Regenerate by
|
|
39
|
+
* running that function for every `VIDEO_ANALYSIS_LLM_MODELS` × duration
|
|
40
|
+
* bucket combination whenever the underlying rate/token constants change
|
|
41
|
+
* (backend test guards drift). Keep in sync with
|
|
42
|
+
* `docs/nodes/processing-video/video-analysis.md`.
|
|
43
|
+
*/
|
|
44
|
+
export const VIDEO_ANALYSIS_BUCKET_CREDITS: Record<string, number> = {
|
|
45
|
+
"video-analysis:gemini-3-flash:60s": 1,
|
|
46
|
+
"video-analysis:gemini-3-flash:180s": 1,
|
|
47
|
+
"video-analysis:gemini-3-flash:360s": 2,
|
|
48
|
+
"video-analysis:gemini-3-flash:600s": 3,
|
|
49
|
+
"video-analysis:gemini-3.1-pro:60s": 2,
|
|
50
|
+
"video-analysis:gemini-3.1-pro:180s": 3,
|
|
51
|
+
"video-analysis:gemini-3.1-pro:360s": 7,
|
|
52
|
+
"video-analysis:gemini-3.1-pro:600s": 11,
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function pickVideoAnalysisBucket(durationSec: number): number {
|
|
56
|
+
for (const b of VIDEO_ANALYSIS_DURATION_BUCKETS) if (durationSec <= b) return b
|
|
57
|
+
return VIDEO_ANALYSIS_MAX_DURATION_SEC
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function buildVideoAnalysisCreditId(model: string, durationSec?: number): string {
|
|
61
|
+
const bucket = durationSec !== undefined && durationSec > 0
|
|
62
|
+
? pickVideoAnalysisBucket(Math.min(durationSec, VIDEO_ANALYSIS_MAX_DURATION_SEC))
|
|
63
|
+
: VIDEO_ANALYSIS_MAX_DURATION_SEC // unknown → ceiling composite (the ONLY silent-ceiling path)
|
|
64
|
+
return `video-analysis:${model}:${bucket}s`
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function bucketSecondsFromCreditId(creditId: string): number | null {
|
|
68
|
+
const m = /^video-analysis:.+:(\d+)s$/.exec(creditId)
|
|
69
|
+
return m ? Number(m[1]) : null
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function videoAnalysisNumWindows(bucketSec: number): number {
|
|
73
|
+
return bucketSec <= VIDEO_ANALYSIS_WINDOW.SINGLE_MAX ? 1 : 1 + Math.ceil((bucketSec - WINDOW_LEN) / WINDOW_STRIDE)
|
|
74
|
+
}
|