@nodaro/shared 2.21.1 → 2.22.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodaro/shared",
3
- "version": "2.21.1",
3
+ "version": "2.22.0",
4
4
  "description": "Shared types, model catalog, wire contracts, and structural vocabularies for the Nodaro platform and SDK.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
package/src/index.ts CHANGED
@@ -112,6 +112,7 @@ export {
112
112
  checkRefVideoDurations,
113
113
  VIDEO_PROVIDERS_REQUIRING_IMAGE,
114
114
  videoProviderRequiresImage,
115
+ videoProviderFoldsLoneEndFrame,
115
116
  VIDEO_MODE_ALIASES,
116
117
  VIDEO_GEN_COLLAPSED_T2V_IDS,
117
118
  resolveVideoProviderForMode,
@@ -2105,6 +2105,29 @@ export function videoProviderRequiresImage(provider: string | undefined): boolea
2105
2105
  return !!provider && VIDEO_PROVIDERS_REQUIRING_IMAGE.has(provider)
2106
2106
  }
2107
2107
 
2108
+ /**
2109
+ * True when the provider's image-to-video path FOLDS a lone closing frame into
2110
+ * its reference images — i.e. an end frame with no start frame is a reference
2111
+ * the model actually receives, not a half-formed frame pair.
2112
+ *
2113
+ * The Seedance 2.x, MiniMax Hailuo 3 and Wan 3 families all assemble their KIE
2114
+ * input through the shared `resolveSeedance2Inputs` (`@nodaro/prompts`), whose
2115
+ * reference mode takes a lone last frame as the sole reference image plus a
2116
+ * closing-frame prompt hint. NOTHING else does: VEO ships `[imageUrl,
2117
+ * endFrameUrl]` verbatim (a lone end frame would reach KIE as `[null, url]`),
2118
+ * the Gemini Omni branch drops the frame when there is no start frame, and the
2119
+ * generic KIE path sends `end_frame` with no image param at all. So the
2120
+ * exemption is keyed to the FOLD, not to "carries image references" — the
2121
+ * catalog has no capability for it, and these three family predicates are the
2122
+ * same membership the provider layer itself branches on (the backend's
2123
+ * `kie/video.ts::applySeedance2Params` / `applyMinimaxH3Params` / `runWan3`).
2124
+ * A ref-capable provider that grows the fold gets the exemption by joining a
2125
+ * family here; one that does not keeps the honest `image_required` 400.
2126
+ */
2127
+ export function videoProviderFoldsLoneEndFrame(provider: string): boolean {
2128
+ return isSeedance2Provider(provider) || isMinimaxH3Provider(provider) || isWan3Provider(provider)
2129
+ }
2130
+
2108
2131
  /**
2109
2132
  * Video models where enabling audio/sound incurs an additional cost.
2110
2133
  * The audio addon is expressed as a separate composite identifier suffix.