@nodaro/prompts 1.39.0 → 1.40.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/dist/{chunk-XIWWDGT5.cjs → chunk-2EW5B7ZV.cjs} +7 -7
- package/dist/{chunk-XIWWDGT5.cjs.map → chunk-2EW5B7ZV.cjs.map} +1 -1
- package/dist/{chunk-22KZOAGL.cjs → chunk-C3NHNECH.cjs} +86 -48
- package/dist/chunk-C3NHNECH.cjs.map +1 -0
- package/dist/{chunk-XRLOMTBZ.js → chunk-C46256GZ.js} +43 -5
- package/dist/chunk-C46256GZ.js.map +1 -0
- package/dist/{chunk-NMWKXAYA.cjs → chunk-DQFQJECU.cjs} +43 -5
- package/dist/chunk-DQFQJECU.cjs.map +1 -0
- package/dist/{chunk-XU54YJXQ.js → chunk-HQTHDTHN.js} +85 -49
- package/dist/chunk-HQTHDTHN.js.map +1 -0
- package/dist/{chunk-KUBZVWME.cjs → chunk-LXPKTI2K.cjs} +12 -5
- package/dist/chunk-LXPKTI2K.cjs.map +1 -0
- package/dist/{chunk-3INXNDV7.cjs → chunk-LZ53F5BN.cjs} +8 -8
- package/dist/chunk-LZ53F5BN.cjs.map +1 -0
- package/dist/{chunk-7XMTVYS5.js → chunk-N6VMPG5S.js} +12 -6
- package/dist/chunk-N6VMPG5S.js.map +1 -0
- package/dist/{chunk-6MPZHFIS.js → chunk-RB2F5JQF.js} +5 -5
- package/dist/chunk-RB2F5JQF.js.map +1 -0
- package/dist/{chunk-Z3SZXWRU.js → chunk-YS6HOWMW.js} +3 -3
- package/dist/{chunk-Z3SZXWRU.js.map → chunk-YS6HOWMW.js.map} +1 -1
- package/dist/entries/assembly.cjs +30 -22
- package/dist/entries/assembly.d.cts +90 -34
- package/dist/entries/assembly.d.ts +90 -34
- package/dist/entries/assembly.js +1 -1
- package/dist/entries/doctrine.cjs +46 -46
- package/dist/entries/doctrine.js +1 -1
- package/dist/entries/presets.cjs +32 -32
- package/dist/entries/presets.d.cts +2 -0
- package/dist/entries/presets.d.ts +2 -0
- package/dist/entries/presets.js +2 -2
- package/dist/entries/prompt-fields.cjs +26 -26
- package/dist/entries/prompt-fields.d.cts +2 -1
- package/dist/entries/prompt-fields.d.ts +2 -1
- package/dist/entries/prompt-fields.js +2 -2
- package/dist/index.cjs +133 -125
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/package.json +2 -2
- package/src/__tests__/factory-presets-prototype-keys.test.ts +43 -0
- package/src/__tests__/frame-reference-slots.test.ts +43 -0
- package/src/__tests__/gemini-omni-inputs.test.ts +12 -10
- package/src/__tests__/provider-prompt-doctrine.test.ts +14 -0
- package/src/__tests__/veo-i2v-inputs.test.ts +16 -11
- package/src/entries/assembly.ts +1 -0
- package/src/factory-presets/index.ts +4 -1
- package/src/factory-presets/references.ts +2 -1
- package/src/frame-reference-slots.ts +92 -0
- package/src/gemini-omni-inputs.ts +23 -22
- package/src/node-prompt-fields.ts +5 -3
- package/src/own-entry.ts +11 -0
- package/src/prompt-wizard-categories.ts +2 -0
- package/src/provider-prompt-doctrine.ts +45 -3
- package/src/ref-binding.ts +28 -3
- package/src/resolve-prompt.ts +2 -1
- package/src/seedance-2-inputs.ts +15 -40
- package/src/veo-i2v-inputs.ts +24 -17
- package/src/video-reference-resolver.ts +1 -1
- package/dist/chunk-22KZOAGL.cjs.map +0 -1
- package/dist/chunk-3INXNDV7.cjs.map +0 -1
- package/dist/chunk-6MPZHFIS.js.map +0 -1
- package/dist/chunk-7XMTVYS5.js.map +0 -1
- package/dist/chunk-KUBZVWME.cjs.map +0 -1
- package/dist/chunk-NMWKXAYA.cjs.map +0 -1
- package/dist/chunk-XRLOMTBZ.js.map +0 -1
- package/dist/chunk-XU54YJXQ.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computeNodePrompt, computeScriptTopic, computeLlmChatFields } from './chunk-
|
|
1
|
+
import { computeNodePrompt, computeScriptTopic, computeLlmChatFields } from './chunk-N6VMPG5S.js';
|
|
2
2
|
import { resolveNodeRefs } from '@nodaro/shared/workflow';
|
|
3
3
|
import { SOCIAL_POST_NODE_TYPES } from '@nodaro/shared/social';
|
|
4
4
|
|
|
@@ -76,5 +76,5 @@ function computeNodeSendText(nodeType, data, args) {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
export { TEXT_REQUIRED_NODE_TYPES, WIRED_OUTPUT_NODE_TYPES, computeAiWriterInput, computeNodeSendText, stripAudioTags };
|
|
79
|
-
//# sourceMappingURL=chunk-
|
|
80
|
-
//# sourceMappingURL=chunk-
|
|
79
|
+
//# sourceMappingURL=chunk-YS6HOWMW.js.map
|
|
80
|
+
//# sourceMappingURL=chunk-YS6HOWMW.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/audio-tags.ts","../src/node-send-text.ts"],"names":[],"mappings":";;;;;AAcA,SAAS,kBAAkB,IAAA,EAAsB;AAC/C,EAAA,IAAI,GAAA,GAAM,EAAA;AACV,EAAA,IAAI,IAAA,GAAO,CAAA;AACX,EAAA,IAAI,IAAA,GAAO,IAAA,CAAK,OAAA,CAAQ,GAAG,CAAA;AAC3B,EAAA,OAAO,SAAS,EAAA,EAAI;AAClB,IAAA,MAAM,KAAA,GAAQ,IAAA,CAAK,OAAA,CAAQ,GAAA,EAAK,OAAO,CAAC,CAAA;AACxC,IAAA,IAAI,UAAU,EAAA,EAAI;AAClB,IAAA,IAAI,KAAA,KAAU,OAAO,CAAA,EAAG;AAEtB,MAAA,IAAA,GAAO,IAAA,CAAK,OAAA,CAAQ,GAAA,EAAK,IAAA,GAAO,CAAC,CAAA;AACjC,MAAA;AAAA,IACF;AACA,IAAA,GAAA,IAAO,IAAA,CAAK,KAAA,CAAM,IAAA,EAAM,IAAI,CAAA;AAC5B,IAAA,IAAA,GAAO,KAAA,GAAQ,CAAA;AACf,IAAA,IAAA,GAAO,IAAA,CAAK,OAAA,CAAQ,GA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M,CAAA,GAAI,CAAE,CAAA,CACxE,IAAA,CAAK,CAAC,CAAA,KAAmB,OAAA,CAAQ,CAAuB,CAAC,CAAA;AAC5D,MAAA,OAAO,CAAC,KAAK,QAAA,EAAU,IAAA,CAAK,OAAO,KAAK,CAAA,CAAE,IAAA,CAAK,OAAO,CAAA,IAAK,EAAA;AAAA,IAC7D;AAAA,IACA;AACE,MAAA,OAAO,MAAA;AAAA;AAEb","file":"chunk-Z3SZXWRU.js","sourcesContent":["/**\n * Remove inline `[audio tags]` from speech text, for a model that does not\n * perform them (it would read them aloud). Pure, dependency-free: the\n * backend's credit counter (lib/speech-credits.ts), its payload builder and\n * the editor's estimate (frontend/src/lib/speech-estimate.ts) all read it, so\n * the two engines count exactly the same characters.\n *\n * A tag is `[`, one or more characters that are not `]`, then `]` — what\n * `/\\[[^\\]]+\\]/g` matches. That pattern is quadratic on an unclosed run of `[`\n * (every `[` rescans to the end of the text), and the credit counter runs this\n * on raw request text on the API and orchestrator event loops, so the scan is\n * written by hand: one `indexOf` per `[`, and when no `]` is left no later `[`\n * can match either, so the rest of the text is kept in one slice.\n */\nfunction removeBracketTags(text: string): string {\n let out = \"\"\n let from = 0\n let open = text.indexOf(\"[\")\n while (open !== -1) {\n const close = text.indexOf(\"]\", open + 1)\n if (close === -1) break\n if (close === open + 1) {\n // \"[]\" is not a tag (needs 1+ characters); the \"[\" stays and the scan moves on.\n open = text.indexOf(\"[\", open + 1)\n continue\n }\n out += text.slice(from, open)\n from = close + 1\n open = text.indexOf(\"[\", from)\n }\n return out + text.slice(from)\n}\n\nexport function stripAudioTags(text: string): string {\n return removeBracketTags(text).replace(/\\s{2,}/g, \" \").trim()\n}\n","import { resolveNodeRefs } from \"@nodaro/shared/workflow\"\nimport { SOCIAL_POST_NODE_TYPES } from \"@nodaro/shared/social\"\nimport { computeLlmChatFields, computeNodePrompt, computeScriptTopic } from \"./resolve-prompt.js\"\n\n/**\n * Output nodes that send exactly what is WIRED into them — a webhook's\n * parameters, a social post's caption and media. When every wire produced\n * nothing in this run (a Filter List that kept no row, a node that was itself\n * skipped), there is nothing to send: the node is skipped with\n * `skipReason: \"empty_input\"` instead of posting an empty payload (a site that\n * validates its input answers 400 and alerts its owner) or failing the run\n * (a publish route refuses a post with no text and no media). A typed caption\n * with no wire at all is the author's choice and still runs, as before. ONE\n * list, read by the orchestrator's skip rule (`empty-input-skips.ts`).\n */\nexport const WIRED_OUTPUT_NODE_TYPES: ReadonlySet<string> = new Set([\"webhook-output\", ...SOCIAL_POST_NODE_TYPES])\n\n/**\n * Node types that send TEXT to a model or a voice and fail on an empty one —\n * `userInput: Too small` (llm-chat), \"no text found\" (text-to-speech) — so a\n * run with nothing upstream can skip them instead of failing. Never an image\n * or video node (an empty prompt is a legal request there) and never a social\n * post (an empty caption is the author's choice). ONE list, read by the\n * orchestrator's skip rule (`empty-input-skips.ts`); the engine never names a\n * type on its own.\n */\nexport const TEXT_REQUIRED_NODE_TYPES: ReadonlySet<string> = new Set([\n \"llm-chat\",\n \"ai-writer\",\n \"generate-script\",\n \"text-to-speech\",\n \"generate-music\",\n \"text-to-audio\",\n // Save to Collection refuses an empty record (\"nothing to save\"): a feed\n // with nothing new wired straight into it must skip it, not fail the run.\n \"collection-write\",\n // Generate Image: an empty prompt is a legal request in general (references\n // alone), but when the text it was WIRED produced nothing this run — the skip\n // rule's precondition — an empty prompt is a paid picture of nothing.\n \"generate-image\",\n])\n\n/**\n * The node's data without its prompt pre/post text: the skip decision is about\n * the CORE text. A prefix alone (\"Write a news item about:\") is not something\n * to send — with the affixes applied, an empty core read as non-empty and an\n * idle tick paid for a model call on the prefix.\n */\nconst withoutAffixes = (data: Record<string, unknown>): Record<string, unknown> => ({ ...data, promptPrefix: undefined, promptSuffix: undefined })\n\nexport interface NodeSendTextArgs {\n /** A list fan-out item (highest precedence). */\n override?: string\n /** The text wired into the node's main text input. */\n wired?: string\n /** llm-chat only: the text wired into `system-prompt`. */\n wiredSystemPrompt?: string\n refMap: ReadonlyMap<string, string>\n}\n\nconst present = (s?: string): s is string => typeof s === \"string\" && s.trim().length > 0\n\n/**\n * ai-writer's user input — the rule its sync-HTTP body applies: a fan-out\n * item, else the wired text, else the typed `userInput`, else the legacy\n * `prompt`. (ai-writer is renamed to llm-chat on load; saved graphs that\n * never reloaded still run it.)\n */\nexport function computeAiWriterInput(\n data: Record<string, unknown>,\n { override, wired }: Pick<NodeSendTextArgs, \"override\" | \"wired\">,\n): string {\n return [override, wired, data.userInput as string | undefined, data.prompt as string | undefined].find(present) ?? \"\"\n}\n\n/**\n * The text a text-requiring node would send, by the SAME rule its executor\n * uses (`computeLlmChatFields`, `computeScriptTopic`, `computeNodePrompt`,\n * `computeAiWriterInput`) — so \"would this node run on nothing?\" is answered\n * by the function that decides what it sends, not by a second reading of it.\n * Undefined for any other node type.\n */\nexport function computeNodeSendText(\n nodeType: string,\n data: Record<string, unknown>,\n args: NodeSendTextArgs,\n): string | undefined {\n const bare = withoutAffixes(data)\n switch (nodeType) {\n case \"llm-chat\":\n return computeLlmChatFields(bare, {\n override: args.override,\n wiredUserInput: args.wired,\n wiredSystemPrompt: args.wiredSystemPrompt,\n refMap: args.refMap,\n }).userInput\n case \"ai-writer\":\n return computeAiWriterInput(bare, args)\n case \"generate-script\":\n return computeScriptTopic(bare, { override: args.override, wired: args.wired, refMap: args.refMap })\n case \"generate-music\": {\n // A music node sings typed lyrics with no prompt; only both empty is nothing to send.\n const prompt = computeNodePrompt(nodeType, bare, { override: args.override, wired: args.wired, refMap: args.refMap })\n return present(prompt) ? prompt : present(data.lyrics as string | undefined) ? (data.lyrics as string) : \"\"\n }\n case \"text-to-speech\":\n case \"text-to-audio\":\n case \"generate-image\":\n return computeNodePrompt(nodeType, bare, { override: args.override, wired: args.wired, refMap: args.refMap })\n case \"collection-write\": {\n // The record's content: the item (a fan-out row, else what reached `in`),\n // else a title, text or link typed on the node. A picture alone is a\n // record too, but it never starves the node: only a wired TEXT input that\n // produced nothing can (the skip rule's precondition).\n // A typed field counts as the engines send it, its `{Node}` references\n // resolved: `{Feed || }` over a feed with nothing new is empty, so the\n // node skips instead of failing with an empty record (#1890).\n const typed = [data.title, data.text, data.link]\n .map((v) => (typeof v === \"string\" ? resolveNodeRefs(v, args.refMap) : v))\n .find((v): v is string => present(v as string | undefined))\n return [args.override, args.wired, typed].find(present) ?? \"\"\n }\n default:\n return undefined\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/audio-tags.ts","../src/node-send-text.ts"],"names":[],"mappings":";;;;;AAcA,SAAS,kBAAkB,IAAA,EAAsB;AAC/C,EAAA,IAAI,GAAA,GAAM,EAAA;AACV,EAAA,IAAI,IAAA,GAAO,CAAA;AACX,EAAA,IAAI,IAAA,GAAO,IAAA,CAAK,OAAA,CAAQ,GAAG,CAAA;AAC3B,EAAA,OAAO,SAAS,EAAA,EAAI;AAClB,IAAA,MAAM,KAAA,GAAQ,IAAA,CAAK,OAAA,CAAQ,GAAA,EAAK,OAAO,CAAC,CAAA;AACxC,IAAA,IAAI,UAAU,EAAA,EAAI;AAClB,IAAA,IAAI,KAAA,KAAU,OAAO,CAAA,EAAG;AAEtB,MAAA,IAAA,GAAO,IAAA,CAAK,OAAA,CAAQ,GAAA,EAAK,IAAA,GAAO,CAAC,CAAA;AACjC,MAAA;AAAA,IACF;AACA,IAAA,GAAA,IAAO,IAAA,CAAK,KAAA,CAAM,IAAA,EAAM,IAAI,CAAA;AAC5B,IAAA,IAAA,GAAO,KAAA,GAAQ,CAAA;AACf,IAAA,IAAA,GAAO,IAAA,CAAK,OAAA,CAAQ,GAAA,EAAK,IAAI,CAAA;AAAA,EAC/B;AACA,EAAA,OAAO,GAAA,GAAM,IAAA,CAAK,KAAA,CAAM,IAAI,CAAA;AAC9B;AAEO,SAAS,eAAe,IAAA,EAAsB;AACnD,EAAA,OAAO,kBAAkB,IAAI,CAAA,CAAE,QAAQ,SAAA,EAAW,GAAG,EAAE,IAAA,EAAK;AAC9D;ACpBO,IAAM,0CAA+C,IAAI,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AA;AAEb","file":"chunk-YS6HOWMW.js","sourcesContent":["/**\n * Remove inline `[audio tags]` from speech text, for a model that does not\n * perform them (it would read them aloud). Pure, dependency-free: the\n * backend's credit counter (lib/speech-credits.ts), its payload builder and\n * the editor's estimate (frontend/src/lib/speech-estimate.ts) all read it, so\n * the two engines count exactly the same characters.\n *\n * A tag is `[`, one or more characters that are not `]`, then `]` — what\n * `/\\[[^\\]]+\\]/g` matches. That pattern is quadratic on an unclosed run of `[`\n * (every `[` rescans to the end of the text), and the credit counter runs this\n * on raw request text on the API and orchestrator event loops, so the scan is\n * written by hand: one `indexOf` per `[`, and when no `]` is left no later `[`\n * can match either, so the rest of the text is kept in one slice.\n */\nfunction removeBracketTags(text: string): string {\n let out = \"\"\n let from = 0\n let open = text.indexOf(\"[\")\n while (open !== -1) {\n const close = text.indexOf(\"]\", open + 1)\n if (close === -1) break\n if (close === open + 1) {\n // \"[]\" is not a tag (needs 1+ characters); the \"[\" stays and the scan moves on.\n open = text.indexOf(\"[\", open + 1)\n continue\n }\n out += text.slice(from, open)\n from = close + 1\n open = text.indexOf(\"[\", from)\n }\n return out + text.slice(from)\n}\n\nexport function stripAudioTags(text: string): string {\n return removeBracketTags(text).replace(/\\s{2,}/g, \" \").trim()\n}\n","import { resolveNodeRefs } from \"@nodaro/shared/workflow\"\nimport { SOCIAL_POST_NODE_TYPES } from \"@nodaro/shared/social\"\nimport { computeLlmChatFields, computeNodePrompt, computeScriptTopic } from \"./resolve-prompt.js\"\n\n/**\n * Output nodes that send exactly what is WIRED into them — a webhook's\n * parameters, a social post's caption and media. When every wire produced\n * nothing in this run (a Filter List that kept no row, a node that was itself\n * skipped), there is nothing to send: the node is skipped with\n * `skipReason: \"empty_input\"` instead of posting an empty payload (a site that\n * validates its input answers 400 and alerts its owner) or failing the run\n * (a publish route refuses a post with no text and no media). A typed caption\n * with no wire at all is the author's choice and still runs, as before. ONE\n * list, read by the orchestrator's skip rule (`empty-input-skips.ts`).\n */\nexport const WIRED_OUTPUT_NODE_TYPES: ReadonlySet<string> = new Set([\"webhook-output\", ...SOCIAL_POST_NODE_TYPES])\n\n/**\n * Node types that send TEXT to a model or a voice and fail on an empty one —\n * `userInput: Too small` (llm-chat), \"no text found\" (text-to-speech) — so a\n * run with nothing upstream can skip them instead of failing. Never an image\n * or video node (an empty prompt is a legal request there) and never a social\n * post (an empty caption is the author's choice). ONE list, read by the\n * orchestrator's skip rule (`empty-input-skips.ts`); the engine never names a\n * type on its own.\n */\nexport const TEXT_REQUIRED_NODE_TYPES: ReadonlySet<string> = new Set([\n \"llm-chat\",\n \"ai-writer\",\n \"generate-script\",\n \"text-to-speech\",\n \"generate-music\",\n \"text-to-audio\",\n // Save to Collection refuses an empty record (\"nothing to save\"): a feed\n // with nothing new wired straight into it must skip it, not fail the run.\n \"collection-write\",\n // Generate Image: an empty prompt is a legal request in general (references\n // alone), but when the text it was WIRED produced nothing this run — the skip\n // rule's precondition — an empty prompt is a paid picture of nothing.\n \"generate-image\",\n])\n\n/**\n * The node's data without its prompt pre/post text: the skip decision is about\n * the CORE text. A prefix alone (\"Write a news item about:\") is not something\n * to send — with the affixes applied, an empty core read as non-empty and an\n * idle tick paid for a model call on the prefix.\n */\nconst withoutAffixes = (data: Record<string, unknown>): Record<string, unknown> => ({ ...data, promptPrefix: undefined, promptSuffix: undefined })\n\nexport interface NodeSendTextArgs {\n /** A list fan-out item (highest precedence). */\n override?: string\n /** The text wired into the node's main text input. */\n wired?: string\n /** llm-chat only: the text wired into `system-prompt`. */\n wiredSystemPrompt?: string\n refMap: ReadonlyMap<string, string>\n}\n\nconst present = (s?: string): s is string => typeof s === \"string\" && s.trim().length > 0\n\n/**\n * ai-writer's user input — the rule its sync-HTTP body applies: a fan-out\n * item, else the wired text, else the typed `userInput`, else the legacy\n * `prompt`. (ai-writer is renamed to llm-chat on load; saved graphs that\n * never reloaded still run it.)\n */\nexport function computeAiWriterInput(\n data: Record<string, unknown>,\n { override, wired }: Pick<NodeSendTextArgs, \"override\" | \"wired\">,\n): string {\n return [override, wired, data.userInput as string | undefined, data.prompt as string | undefined].find(present) ?? \"\"\n}\n\n/**\n * The text a text-requiring node would send, by the SAME rule its executor\n * uses (`computeLlmChatFields`, `computeScriptTopic`, `computeNodePrompt`,\n * `computeAiWriterInput`) — so \"would this node run on nothing?\" is answered\n * by the function that decides what it sends, not by a second reading of it.\n * Undefined for any other node type.\n */\nexport function computeNodeSendText(\n nodeType: string,\n data: Record<string, unknown>,\n args: NodeSendTextArgs,\n): string | undefined {\n const bare = withoutAffixes(data)\n switch (nodeType) {\n case \"llm-chat\":\n return computeLlmChatFields(bare, {\n override: args.override,\n wiredUserInput: args.wired,\n wiredSystemPrompt: args.wiredSystemPrompt,\n refMap: args.refMap,\n }).userInput\n case \"ai-writer\":\n return computeAiWriterInput(bare, args)\n case \"generate-script\":\n return computeScriptTopic(bare, { override: args.override, wired: args.wired, refMap: args.refMap })\n case \"generate-music\": {\n // A music node sings typed lyrics with no prompt; only both empty is nothing to send.\n const prompt = computeNodePrompt(nodeType, bare, { override: args.override, wired: args.wired, refMap: args.refMap })\n return present(prompt) ? prompt : present(data.lyrics as string | undefined) ? (data.lyrics as string) : \"\"\n }\n case \"text-to-speech\":\n case \"text-to-audio\":\n case \"generate-image\":\n return computeNodePrompt(nodeType, bare, { override: args.override, wired: args.wired, refMap: args.refMap })\n case \"collection-write\": {\n // The record's content: the item (a fan-out row, else what reached `in`),\n // else a title, text or link typed on the node. A picture alone is a\n // record too, but it never starves the node: only a wired TEXT input that\n // produced nothing can (the skip rule's precondition).\n // A typed field counts as the engines send it, its `{Node}` references\n // resolved: `{Feed || }` over a feed with nothing new is empty, so the\n // node skips instead of failing with an empty record (#1890).\n const typed = [data.title, data.text, data.link]\n .map((v) => (typeof v === \"string\" ? resolveNodeRefs(v, args.refMap) : v))\n .find((v): v is string => present(v as string | undefined))\n return [args.override, args.wired, typed].find(present) ?? \"\"\n }\n default:\n return undefined\n }\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkC3NHNECH_cjs = require('../chunk-C3NHNECH.cjs');
|
|
4
4
|
require('../chunk-WRM52ZBN.cjs');
|
|
5
5
|
require('../chunk-4GKTOVFM.cjs');
|
|
6
6
|
require('../chunk-XUZXBY75.cjs');
|
|
@@ -19,87 +19,95 @@ require('../chunk-Q7SFCCGT.cjs');
|
|
|
19
19
|
|
|
20
20
|
Object.defineProperty(exports, "REF_BINDING", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkC3NHNECH_cjs.REF_BINDING; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "SEEDANCE_VIDEO_EDIT_PREFIX", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkC3NHNECH_cjs.SEEDANCE_VIDEO_EDIT_PREFIX; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "appendField", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkC3NHNECH_cjs.appendField; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "appendMusicMeta", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkC3NHNECH_cjs.appendMusicMeta; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "assembleImageInput", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkC3NHNECH_cjs.assembleImageInput; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "assembleSunoInput", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkC3NHNECH_cjs.assembleSunoInput; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "buildSeedanceVideoEditPrompt", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkC3NHNECH_cjs.buildSeedanceVideoEditPrompt; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "buildSurroundFillPrompt", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkC3NHNECH_cjs.buildSurroundFillPrompt; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "composeSoundHintFromConnections", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkC3NHNECH_cjs.composeSoundHintFromConnections; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "composeVideoPromptText", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkC3NHNECH_cjs.composeVideoPromptText; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "getEffectiveSunoCustomMode", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkC3NHNECH_cjs.getEffectiveSunoCustomMode; }
|
|
63
63
|
});
|
|
64
64
|
Object.defineProperty(exports, "identityRefsSentence", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkC3NHNECH_cjs.identityRefsSentence; }
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, "imageBindingFor", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function () { return chunkC3NHNECH_cjs.imageBindingFor; }
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "placeFramesAfterReferences", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () { return chunkC3NHNECH_cjs.placeFramesAfterReferences; }
|
|
67
75
|
});
|
|
68
76
|
Object.defineProperty(exports, "planFrameDelivery", {
|
|
69
77
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkC3NHNECH_cjs.planFrameDelivery; }
|
|
71
79
|
});
|
|
72
80
|
Object.defineProperty(exports, "promptBindsFirstFrame", {
|
|
73
81
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkC3NHNECH_cjs.promptBindsFirstFrame; }
|
|
75
83
|
});
|
|
76
84
|
Object.defineProperty(exports, "resolveGeminiOmniI2vInputs", {
|
|
77
85
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkC3NHNECH_cjs.resolveGeminiOmniI2vInputs; }
|
|
79
87
|
});
|
|
80
88
|
Object.defineProperty(exports, "resolveRefIdTokens", {
|
|
81
89
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkC3NHNECH_cjs.resolveRefIdTokens; }
|
|
83
91
|
});
|
|
84
92
|
Object.defineProperty(exports, "resolveReferenceTokens", {
|
|
85
93
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkC3NHNECH_cjs.resolveReferenceTokens; }
|
|
87
95
|
});
|
|
88
96
|
Object.defineProperty(exports, "resolveSeedance2Inputs", {
|
|
89
97
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunkC3NHNECH_cjs.resolveSeedance2Inputs; }
|
|
91
99
|
});
|
|
92
100
|
Object.defineProperty(exports, "resolveVeoI2vInputs", {
|
|
93
101
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
102
|
+
get: function () { return chunkC3NHNECH_cjs.resolveVeoI2vInputs; }
|
|
95
103
|
});
|
|
96
104
|
Object.defineProperty(exports, "resolveVideoReferenceCore", {
|
|
97
105
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
106
|
+
get: function () { return chunkC3NHNECH_cjs.resolveVideoReferenceCore; }
|
|
99
107
|
});
|
|
100
108
|
Object.defineProperty(exports, "truncateForField", {
|
|
101
109
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
110
|
+
get: function () { return chunkC3NHNECH_cjs.truncateForField; }
|
|
103
111
|
});
|
|
104
112
|
//# sourceMappingURL=assembly.cjs.map
|
|
105
113
|
//# sourceMappingURL=assembly.cjs.map
|
|
@@ -34,7 +34,7 @@ import '../transitions-BLFfAJUH.cjs';
|
|
|
34
34
|
* says the two things a multimodal model needs to hear — match exactly, and
|
|
35
35
|
* these are not frames. One spelling; both resolvers ride it.
|
|
36
36
|
*/
|
|
37
|
-
declare function identityRefsSentence(firstOrdinal: number, lastOrdinal: number): string;
|
|
37
|
+
declare function identityRefsSentence(firstOrdinal: number, lastOrdinal: number, ordinal?: (n: number) => string): string;
|
|
38
38
|
declare const REF_BINDING: {
|
|
39
39
|
readonly image: (label: string, n: number) => string;
|
|
40
40
|
readonly video: (label: string, n: number) => string;
|
|
@@ -43,6 +43,18 @@ declare const REF_BINDING: {
|
|
|
43
43
|
readonly ordinal: (n: number) => string;
|
|
44
44
|
readonly frame: (n: number, role: "opening" | "closing") => string;
|
|
45
45
|
};
|
|
46
|
+
/** A binding sentence's ordinal + frame directive in one provider syntax. */
|
|
47
|
+
interface ImageBinding {
|
|
48
|
+
ordinal: (n: number) => string;
|
|
49
|
+
frame: (n: number, role: "opening" | "closing") => string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The image binding in a provider's OWN reference syntax
|
|
53
|
+
* (`videoProviderReferenceSyntax` in @nodaro/shared). `@image_N` IS
|
|
54
|
+
* {@link REF_BINDING} — the platform swap point, byte for byte; the other two
|
|
55
|
+
* spell the same sentence in the form the provider documents.
|
|
56
|
+
*/
|
|
57
|
+
declare function imageBindingFor(syntax: "@image_N" | "@image(n)" | "[Image N]"): ImageBinding;
|
|
46
58
|
/**
|
|
47
59
|
* The instruction that makes Seedance EDIT a wired clip rather than use it as a
|
|
48
60
|
* style reference — the Video to Video node's Seedance lane prepends it to the
|
|
@@ -846,6 +858,59 @@ declare function composeVideoPromptText(userPrompt: string | undefined, directio
|
|
|
846
858
|
readonly subjectHintMode?: SubjectHintMode;
|
|
847
859
|
} & VideoPromptCapOptions): string | undefined;
|
|
848
860
|
|
|
861
|
+
/**
|
|
862
|
+
* WHERE A START / END FRAME GOES WHEN IT SHARES A MODEL'S REFERENCE LIST — the
|
|
863
|
+
* one platform convention (2026-10-18), for every video model whose frames and
|
|
864
|
+
* reference images travel in a single image array (`videoProviderAppendsFrames`
|
|
865
|
+
* in @nodaro/shared):
|
|
866
|
+
*
|
|
867
|
+
* - the caller's own reference images come FIRST, in their order, so the
|
|
868
|
+
* caller's image token N (`{image:N}`, `{ref:<id>}`, a typed ordinal)
|
|
869
|
+
* always means their Nth reference;
|
|
870
|
+
* - the frames are appended AFTER them (start, then end) and named in the
|
|
871
|
+
* prompt as the opening / closing frame, in the provider's own syntax;
|
|
872
|
+
* - at the image cap the frames are KEPT — they are explicit intent — and
|
|
873
|
+
* trailing caller references are dropped and reported.
|
|
874
|
+
*
|
|
875
|
+
* `bindIdentities` adds the identity sentence the flat-image-list models carry
|
|
876
|
+
* (Gemini Omni, VEO, Grok, HappyHorse: nothing in their payload says which
|
|
877
|
+
* entries are identities, so the prompt says it). The Seedance-family resolver
|
|
878
|
+
* calls this without it — byte for byte what it always emitted.
|
|
879
|
+
*/
|
|
880
|
+
interface FrameReferenceSlotsArgs {
|
|
881
|
+
/** Consulted only to skip a duplicate opening-frame sentence. */
|
|
882
|
+
prompt?: string;
|
|
883
|
+
firstFrameUrl?: string;
|
|
884
|
+
lastFrameUrl?: string;
|
|
885
|
+
/** The caller's own reference images, in priority order. */
|
|
886
|
+
refImageUrls?: readonly (string | undefined)[];
|
|
887
|
+
/** The provider's image cap — frames and references together. */
|
|
888
|
+
imageCap: number;
|
|
889
|
+
/** The provider's reference syntax (`videoProviderReferenceSyntax`). */
|
|
890
|
+
syntax?: "@image_N" | "@image(n)" | "[Image N]";
|
|
891
|
+
bindIdentities?: boolean;
|
|
892
|
+
}
|
|
893
|
+
interface FrameReferenceSlotsResult {
|
|
894
|
+
/** `[...keptRefs, start?, end?]` — never longer than `imageCap` (bar the frames themselves). */
|
|
895
|
+
imageUrls: string[];
|
|
896
|
+
promptSuffix: string;
|
|
897
|
+
/** Trailing caller references dropped to keep the frames. */
|
|
898
|
+
droppedRefImages: number;
|
|
899
|
+
/** 1-based seats of the frames in `imageUrls`; 0 when absent. */
|
|
900
|
+
firstFrameOrdinal: number;
|
|
901
|
+
lastFrameOrdinal: number;
|
|
902
|
+
}
|
|
903
|
+
declare function placeFramesAfterReferences(args: FrameReferenceSlotsArgs): FrameReferenceSlotsResult;
|
|
904
|
+
/** True when the prompt ALREADY binds an image as the first/opening frame —
|
|
905
|
+
* e.g. the gvp overlap transport's colon-position directive ("use @image_1
|
|
906
|
+
* as the first frame, it is the last keyframe of @video_1"). Field finding
|
|
907
|
+
* (2026-07-20): the first-frame directive only works adjacent to the extend
|
|
908
|
+
* colon; a duplicate sentence at the END of the prompt (this resolver's
|
|
909
|
+
* default position) dilutes it back into coin-flip behavior — so when the
|
|
910
|
+
* prompt carries its own binding, the suffix is suppressed (the frame image
|
|
911
|
+
* itself still rides the reference list). */
|
|
912
|
+
declare function promptBindsFirstFrame(prompt: string | undefined): boolean;
|
|
913
|
+
|
|
849
914
|
type Seedance2Mode = "first-frame" | "first-last-frame" | "reference";
|
|
850
915
|
interface Seedance2InputsArgs {
|
|
851
916
|
/** The generation prompt — used ONLY to detect an existing first-frame
|
|
@@ -877,23 +942,7 @@ interface Seedance2InputsResult {
|
|
|
877
942
|
promptSuffix: string;
|
|
878
943
|
droppedRefImages: number;
|
|
879
944
|
}
|
|
880
|
-
|
|
881
|
-
* Single source of truth for how Seedance 2's three mutually-exclusive KIE input
|
|
882
|
-
* modes are selected from connected inputs. Strict first/last-frame mode is used
|
|
883
|
-
* only when nothing but frames is connected; any reference (image, video, OR
|
|
884
|
-
* audio) switches to multimodal Reference mode, where the frames are appended to
|
|
885
|
-
* reference_image_urls (after the user's own images, so their @Image ordinals do
|
|
886
|
-
* not shift) and named in a doctrine-compliant prompt suffix.
|
|
887
|
-
*/
|
|
888
|
-
/** True when the prompt ALREADY binds an image as the first/opening frame —
|
|
889
|
-
* e.g. the gvp overlap transport's colon-position directive ("use @image_1
|
|
890
|
-
* as the first frame, it is the last keyframe of @video_1"). Field finding
|
|
891
|
-
* (2026-07-20): the first-frame directive only works adjacent to the extend
|
|
892
|
-
* colon; a duplicate sentence at the END of the prompt (this resolver's
|
|
893
|
-
* default position) dilutes it back into coin-flip behavior — so when the
|
|
894
|
-
* prompt carries its own binding, the suffix is suppressed (the frame image
|
|
895
|
-
* itself still rides the reference list). */
|
|
896
|
-
declare function promptBindsFirstFrame(prompt: string | undefined): boolean;
|
|
945
|
+
|
|
897
946
|
declare function resolveSeedance2Inputs(args: Seedance2InputsArgs): Seedance2InputsResult;
|
|
898
947
|
|
|
899
948
|
/**
|
|
@@ -901,23 +950,27 @@ declare function resolveSeedance2Inputs(args: Seedance2InputsArgs): Seedance2Inp
|
|
|
901
950
|
* `resolveSeedance2Inputs` for a model whose multimodal channel is ONE flat
|
|
902
951
|
* `image_urls` list.
|
|
903
952
|
*
|
|
953
|
+
* THE PLATFORM CONVENTION (2026-10-18, `placeFramesAfterReferences`): the
|
|
954
|
+
* caller's identity references come first, so their image token N is their Nth
|
|
955
|
+
* reference, and the start frame is appended after them. Until then the frame
|
|
956
|
+
* led the list, so a caller's `@image_1` landed on the frame.
|
|
957
|
+
*
|
|
904
958
|
* WHY BINDING IS LOAD-BEARING: Gemini Omni receives the start frame and the
|
|
905
959
|
* identity references in the same array, with nothing in the payload marking
|
|
906
960
|
* which is which. A multimodal model treats unbound images as loose context —
|
|
907
961
|
* field finding (recast keyframes run, 2026-08-14): the identity references
|
|
908
962
|
* rode every call and the cast still drifted part to part, because the prompt
|
|
909
963
|
* never said the images WERE identities to keep. So the resolver names the
|
|
910
|
-
* roles in a prompt suffix
|
|
911
|
-
*
|
|
912
|
-
* identity references, explicitly not frames.
|
|
964
|
+
* roles in a prompt suffix: the references are identity references, explicitly
|
|
965
|
+
* not frames, and the last image is the opening frame.
|
|
913
966
|
*
|
|
914
967
|
* BUDGETED, NEVER REJECTED, for the list this resolver assembles: KIE's quota
|
|
915
968
|
* is `images + 2×videos ≤ 7`, and `runGeminiOmni` hard-rejects overflow. That
|
|
916
969
|
* reject is right for a caller-assembled list (the user's own images should
|
|
917
970
|
* not silently thin out) and wrong for THIS merge, where the overflow is our
|
|
918
971
|
* own construction — so trailing references are dropped to fit, the start
|
|
919
|
-
* frame always kept
|
|
920
|
-
*
|
|
972
|
+
* frame always kept (the convention's tie-break), and the drop count is
|
|
973
|
+
* reported for the caller to log.
|
|
921
974
|
*
|
|
922
975
|
* BYTE-IDENTICAL when there is nothing to bind: no references ⇒ no suffix and
|
|
923
976
|
* a single-image list — exactly what every plain gemini-omni i2v call has
|
|
@@ -926,7 +979,7 @@ declare function resolveSeedance2Inputs(args: Seedance2InputsArgs): Seedance2Inp
|
|
|
926
979
|
interface GeminiOmniI2vInputsArgs {
|
|
927
980
|
/** The composed prompt, used only to detect an existing first-frame binding. */
|
|
928
981
|
prompt?: string;
|
|
929
|
-
/** The start frame — always kept,
|
|
982
|
+
/** The start frame — always kept, appended after the references. */
|
|
930
983
|
firstFrameUrl: string;
|
|
931
984
|
/** Identity references, in priority order (trailing ones drop first). */
|
|
932
985
|
refImageUrls?: Array<string | undefined>;
|
|
@@ -939,7 +992,7 @@ interface GeminiOmniI2vInputsArgs {
|
|
|
939
992
|
provider?: string;
|
|
940
993
|
}
|
|
941
994
|
interface GeminiOmniI2vInputsResult {
|
|
942
|
-
/** `[
|
|
995
|
+
/** `[...keptRefs, firstFrameUrl]` — the `image_urls` payload, quota-fitted. */
|
|
943
996
|
imageUrls: string[];
|
|
944
997
|
/** The role-binding sentences; empty when no reference survived the budget. */
|
|
945
998
|
promptSuffix: string;
|
|
@@ -955,13 +1008,15 @@ declare function resolveGeminiOmniI2vInputs(args: GeminiOmniI2vInputsArgs): Gemi
|
|
|
955
1008
|
* [first(, last)] frames; REFERENCE_2_VIDEO reads every entry as a
|
|
956
1009
|
* reference ingredient. Frames and identities cannot ride separate
|
|
957
1010
|
* channels, so an anchored call that must carry identity references moves
|
|
958
|
-
* to REFERENCE_2_VIDEO with the
|
|
959
|
-
*
|
|
960
|
-
* same as seedance-2's reference mode).
|
|
1011
|
+
* to REFERENCE_2_VIDEO with the frames bound in prose (requested, not
|
|
1012
|
+
* pixel-guaranteed — the accepted trade, same as seedance-2's reference mode).
|
|
961
1013
|
*
|
|
962
|
-
*
|
|
963
|
-
*
|
|
964
|
-
*
|
|
1014
|
+
* THE PLATFORM CONVENTION (2026-10-18, `placeFramesAfterReferences`): the
|
|
1015
|
+
* caller's references take the first seats, so their image token N is their
|
|
1016
|
+
* Nth reference; the start frame — and the end frame, VEO takes one — follow
|
|
1017
|
+
* them, bound as the opening / closing frame. At the 3-ingredient cap the
|
|
1018
|
+
* frames are kept (explicit intent) and trailing references drop, reported.
|
|
1019
|
+
* (Until then the anchor took seat 1 and an end frame was surrendered.)
|
|
965
1020
|
*
|
|
966
1021
|
* BYTE-IDENTICAL with no references: plain frame mode, frames kept, no
|
|
967
1022
|
* generationType, no suffix — exactly what every veo i2v call has always
|
|
@@ -975,14 +1030,15 @@ interface VeoI2vInputsArgs {
|
|
|
975
1030
|
refImageUrls?: Array<string | undefined>;
|
|
976
1031
|
}
|
|
977
1032
|
interface VeoI2vInputsResult {
|
|
978
|
-
/** The `imageUrls` payload: frames in plain mode, [
|
|
1033
|
+
/** The `imageUrls` payload: frames in plain mode, [...refs, start, end?] in
|
|
979
1034
|
* reference mode — never more than VEO's 3-ingredient cap. */
|
|
980
1035
|
imageUrls: string[];
|
|
981
1036
|
/** Present (REFERENCE_2_VIDEO) exactly when references ride. */
|
|
982
1037
|
generationType?: "REFERENCE_2_VIDEO";
|
|
983
1038
|
promptSuffix: string;
|
|
984
1039
|
droppedRefImages: number;
|
|
985
|
-
/**
|
|
1040
|
+
/** Always false since the frames-after-references convention: an end frame
|
|
1041
|
+
* is kept in reference mode. Kept for callers that log it. */
|
|
986
1042
|
droppedEndFrame: boolean;
|
|
987
1043
|
}
|
|
988
1044
|
declare function resolveVeoI2vInputs(args: VeoI2vInputsArgs): VeoI2vInputsResult;
|
|
@@ -1048,4 +1104,4 @@ interface FrameDeliveryPlan {
|
|
|
1048
1104
|
*/
|
|
1049
1105
|
declare function planFrameDelivery(args: FrameDeliveryPlanArgs): FrameDeliveryPlan;
|
|
1050
1106
|
|
|
1051
|
-
export { type AssembleImageInput, type AssembleImageResult, type AssembleSunoInput, type AssembleSunoResult, type CharacterMeta, DirectionFields, type FrameDeliveryPlan, type FrameDeliveryPlanArgs, type GeminiOmniI2vInputsArgs, type GeminiOmniI2vInputsResult, REF_BINDING, type RefIdTokenContext, type ReferenceCounts, type ResolveVideoReferenceCoreArgs, SEEDANCE_VIDEO_EDIT_PREFIX, type Seedance2InputsArgs, type Seedance2InputsResult, type Seedance2Mode, type SoundComposition, type SoundCompositionFields, type SoundConsumerType, SubjectFields, type VeoI2vInputsArgs, type VeoI2vInputsResult, type VideoExtraRef, type VideoPromptCapOptions, appendField, appendMusicMeta, assembleImageInput, assembleSunoInput, buildSeedanceVideoEditPrompt, buildSurroundFillPrompt, composeSoundHintFromConnections, composeVideoPromptText, getEffectiveSunoCustomMode, identityRefsSentence, planFrameDelivery, promptBindsFirstFrame, resolveGeminiOmniI2vInputs, resolveRefIdTokens, resolveReferenceTokens, resolveSeedance2Inputs, resolveVeoI2vInputs, resolveVideoReferenceCore, truncateForField };
|
|
1107
|
+
export { type AssembleImageInput, type AssembleImageResult, type AssembleSunoInput, type AssembleSunoResult, type CharacterMeta, DirectionFields, type FrameDeliveryPlan, type FrameDeliveryPlanArgs, type FrameReferenceSlotsArgs, type FrameReferenceSlotsResult, type GeminiOmniI2vInputsArgs, type GeminiOmniI2vInputsResult, type ImageBinding, REF_BINDING, type RefIdTokenContext, type ReferenceCounts, type ResolveVideoReferenceCoreArgs, SEEDANCE_VIDEO_EDIT_PREFIX, type Seedance2InputsArgs, type Seedance2InputsResult, type Seedance2Mode, type SoundComposition, type SoundCompositionFields, type SoundConsumerType, SubjectFields, type VeoI2vInputsArgs, type VeoI2vInputsResult, type VideoExtraRef, type VideoPromptCapOptions, appendField, appendMusicMeta, assembleImageInput, assembleSunoInput, buildSeedanceVideoEditPrompt, buildSurroundFillPrompt, composeSoundHintFromConnections, composeVideoPromptText, getEffectiveSunoCustomMode, identityRefsSentence, imageBindingFor, placeFramesAfterReferences, planFrameDelivery, promptBindsFirstFrame, resolveGeminiOmniI2vInputs, resolveRefIdTokens, resolveReferenceTokens, resolveSeedance2Inputs, resolveVeoI2vInputs, resolveVideoReferenceCore, truncateForField };
|
|
@@ -34,7 +34,7 @@ import '../transitions-BgwWM37i.js';
|
|
|
34
34
|
* says the two things a multimodal model needs to hear — match exactly, and
|
|
35
35
|
* these are not frames. One spelling; both resolvers ride it.
|
|
36
36
|
*/
|
|
37
|
-
declare function identityRefsSentence(firstOrdinal: number, lastOrdinal: number): string;
|
|
37
|
+
declare function identityRefsSentence(firstOrdinal: number, lastOrdinal: number, ordinal?: (n: number) => string): string;
|
|
38
38
|
declare const REF_BINDING: {
|
|
39
39
|
readonly image: (label: string, n: number) => string;
|
|
40
40
|
readonly video: (label: string, n: number) => string;
|
|
@@ -43,6 +43,18 @@ declare const REF_BINDING: {
|
|
|
43
43
|
readonly ordinal: (n: number) => string;
|
|
44
44
|
readonly frame: (n: number, role: "opening" | "closing") => string;
|
|
45
45
|
};
|
|
46
|
+
/** A binding sentence's ordinal + frame directive in one provider syntax. */
|
|
47
|
+
interface ImageBinding {
|
|
48
|
+
ordinal: (n: number) => string;
|
|
49
|
+
frame: (n: number, role: "opening" | "closing") => string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The image binding in a provider's OWN reference syntax
|
|
53
|
+
* (`videoProviderReferenceSyntax` in @nodaro/shared). `@image_N` IS
|
|
54
|
+
* {@link REF_BINDING} — the platform swap point, byte for byte; the other two
|
|
55
|
+
* spell the same sentence in the form the provider documents.
|
|
56
|
+
*/
|
|
57
|
+
declare function imageBindingFor(syntax: "@image_N" | "@image(n)" | "[Image N]"): ImageBinding;
|
|
46
58
|
/**
|
|
47
59
|
* The instruction that makes Seedance EDIT a wired clip rather than use it as a
|
|
48
60
|
* style reference — the Video to Video node's Seedance lane prepends it to the
|
|
@@ -846,6 +858,59 @@ declare function composeVideoPromptText(userPrompt: string | undefined, directio
|
|
|
846
858
|
readonly subjectHintMode?: SubjectHintMode;
|
|
847
859
|
} & VideoPromptCapOptions): string | undefined;
|
|
848
860
|
|
|
861
|
+
/**
|
|
862
|
+
* WHERE A START / END FRAME GOES WHEN IT SHARES A MODEL'S REFERENCE LIST — the
|
|
863
|
+
* one platform convention (2026-10-18), for every video model whose frames and
|
|
864
|
+
* reference images travel in a single image array (`videoProviderAppendsFrames`
|
|
865
|
+
* in @nodaro/shared):
|
|
866
|
+
*
|
|
867
|
+
* - the caller's own reference images come FIRST, in their order, so the
|
|
868
|
+
* caller's image token N (`{image:N}`, `{ref:<id>}`, a typed ordinal)
|
|
869
|
+
* always means their Nth reference;
|
|
870
|
+
* - the frames are appended AFTER them (start, then end) and named in the
|
|
871
|
+
* prompt as the opening / closing frame, in the provider's own syntax;
|
|
872
|
+
* - at the image cap the frames are KEPT — they are explicit intent — and
|
|
873
|
+
* trailing caller references are dropped and reported.
|
|
874
|
+
*
|
|
875
|
+
* `bindIdentities` adds the identity sentence the flat-image-list models carry
|
|
876
|
+
* (Gemini Omni, VEO, Grok, HappyHorse: nothing in their payload says which
|
|
877
|
+
* entries are identities, so the prompt says it). The Seedance-family resolver
|
|
878
|
+
* calls this without it — byte for byte what it always emitted.
|
|
879
|
+
*/
|
|
880
|
+
interface FrameReferenceSlotsArgs {
|
|
881
|
+
/** Consulted only to skip a duplicate opening-frame sentence. */
|
|
882
|
+
prompt?: string;
|
|
883
|
+
firstFrameUrl?: string;
|
|
884
|
+
lastFrameUrl?: string;
|
|
885
|
+
/** The caller's own reference images, in priority order. */
|
|
886
|
+
refImageUrls?: readonly (string | undefined)[];
|
|
887
|
+
/** The provider's image cap — frames and references together. */
|
|
888
|
+
imageCap: number;
|
|
889
|
+
/** The provider's reference syntax (`videoProviderReferenceSyntax`). */
|
|
890
|
+
syntax?: "@image_N" | "@image(n)" | "[Image N]";
|
|
891
|
+
bindIdentities?: boolean;
|
|
892
|
+
}
|
|
893
|
+
interface FrameReferenceSlotsResult {
|
|
894
|
+
/** `[...keptRefs, start?, end?]` — never longer than `imageCap` (bar the frames themselves). */
|
|
895
|
+
imageUrls: string[];
|
|
896
|
+
promptSuffix: string;
|
|
897
|
+
/** Trailing caller references dropped to keep the frames. */
|
|
898
|
+
droppedRefImages: number;
|
|
899
|
+
/** 1-based seats of the frames in `imageUrls`; 0 when absent. */
|
|
900
|
+
firstFrameOrdinal: number;
|
|
901
|
+
lastFrameOrdinal: number;
|
|
902
|
+
}
|
|
903
|
+
declare function placeFramesAfterReferences(args: FrameReferenceSlotsArgs): FrameReferenceSlotsResult;
|
|
904
|
+
/** True when the prompt ALREADY binds an image as the first/opening frame —
|
|
905
|
+
* e.g. the gvp overlap transport's colon-position directive ("use @image_1
|
|
906
|
+
* as the first frame, it is the last keyframe of @video_1"). Field finding
|
|
907
|
+
* (2026-07-20): the first-frame directive only works adjacent to the extend
|
|
908
|
+
* colon; a duplicate sentence at the END of the prompt (this resolver's
|
|
909
|
+
* default position) dilutes it back into coin-flip behavior — so when the
|
|
910
|
+
* prompt carries its own binding, the suffix is suppressed (the frame image
|
|
911
|
+
* itself still rides the reference list). */
|
|
912
|
+
declare function promptBindsFirstFrame(prompt: string | undefined): boolean;
|
|
913
|
+
|
|
849
914
|
type Seedance2Mode = "first-frame" | "first-last-frame" | "reference";
|
|
850
915
|
interface Seedance2InputsArgs {
|
|
851
916
|
/** The generation prompt — used ONLY to detect an existing first-frame
|
|
@@ -877,23 +942,7 @@ interface Seedance2InputsResult {
|
|
|
877
942
|
promptSuffix: string;
|
|
878
943
|
droppedRefImages: number;
|
|
879
944
|
}
|
|
880
|
-
|
|
881
|
-
* Single source of truth for how Seedance 2's three mutually-exclusive KIE input
|
|
882
|
-
* modes are selected from connected inputs. Strict first/last-frame mode is used
|
|
883
|
-
* only when nothing but frames is connected; any reference (image, video, OR
|
|
884
|
-
* audio) switches to multimodal Reference mode, where the frames are appended to
|
|
885
|
-
* reference_image_urls (after the user's own images, so their @Image ordinals do
|
|
886
|
-
* not shift) and named in a doctrine-compliant prompt suffix.
|
|
887
|
-
*/
|
|
888
|
-
/** True when the prompt ALREADY binds an image as the first/opening frame —
|
|
889
|
-
* e.g. the gvp overlap transport's colon-position directive ("use @image_1
|
|
890
|
-
* as the first frame, it is the last keyframe of @video_1"). Field finding
|
|
891
|
-
* (2026-07-20): the first-frame directive only works adjacent to the extend
|
|
892
|
-
* colon; a duplicate sentence at the END of the prompt (this resolver's
|
|
893
|
-
* default position) dilutes it back into coin-flip behavior — so when the
|
|
894
|
-
* prompt carries its own binding, the suffix is suppressed (the frame image
|
|
895
|
-
* itself still rides the reference list). */
|
|
896
|
-
declare function promptBindsFirstFrame(prompt: string | undefined): boolean;
|
|
945
|
+
|
|
897
946
|
declare function resolveSeedance2Inputs(args: Seedance2InputsArgs): Seedance2InputsResult;
|
|
898
947
|
|
|
899
948
|
/**
|
|
@@ -901,23 +950,27 @@ declare function resolveSeedance2Inputs(args: Seedance2InputsArgs): Seedance2Inp
|
|
|
901
950
|
* `resolveSeedance2Inputs` for a model whose multimodal channel is ONE flat
|
|
902
951
|
* `image_urls` list.
|
|
903
952
|
*
|
|
953
|
+
* THE PLATFORM CONVENTION (2026-10-18, `placeFramesAfterReferences`): the
|
|
954
|
+
* caller's identity references come first, so their image token N is their Nth
|
|
955
|
+
* reference, and the start frame is appended after them. Until then the frame
|
|
956
|
+
* led the list, so a caller's `@image_1` landed on the frame.
|
|
957
|
+
*
|
|
904
958
|
* WHY BINDING IS LOAD-BEARING: Gemini Omni receives the start frame and the
|
|
905
959
|
* identity references in the same array, with nothing in the payload marking
|
|
906
960
|
* which is which. A multimodal model treats unbound images as loose context —
|
|
907
961
|
* field finding (recast keyframes run, 2026-08-14): the identity references
|
|
908
962
|
* rode every call and the cast still drifted part to part, because the prompt
|
|
909
963
|
* never said the images WERE identities to keep. So the resolver names the
|
|
910
|
-
* roles in a prompt suffix
|
|
911
|
-
*
|
|
912
|
-
* identity references, explicitly not frames.
|
|
964
|
+
* roles in a prompt suffix: the references are identity references, explicitly
|
|
965
|
+
* not frames, and the last image is the opening frame.
|
|
913
966
|
*
|
|
914
967
|
* BUDGETED, NEVER REJECTED, for the list this resolver assembles: KIE's quota
|
|
915
968
|
* is `images + 2×videos ≤ 7`, and `runGeminiOmni` hard-rejects overflow. That
|
|
916
969
|
* reject is right for a caller-assembled list (the user's own images should
|
|
917
970
|
* not silently thin out) and wrong for THIS merge, where the overflow is our
|
|
918
971
|
* own construction — so trailing references are dropped to fit, the start
|
|
919
|
-
* frame always kept
|
|
920
|
-
*
|
|
972
|
+
* frame always kept (the convention's tie-break), and the drop count is
|
|
973
|
+
* reported for the caller to log.
|
|
921
974
|
*
|
|
922
975
|
* BYTE-IDENTICAL when there is nothing to bind: no references ⇒ no suffix and
|
|
923
976
|
* a single-image list — exactly what every plain gemini-omni i2v call has
|
|
@@ -926,7 +979,7 @@ declare function resolveSeedance2Inputs(args: Seedance2InputsArgs): Seedance2Inp
|
|
|
926
979
|
interface GeminiOmniI2vInputsArgs {
|
|
927
980
|
/** The composed prompt, used only to detect an existing first-frame binding. */
|
|
928
981
|
prompt?: string;
|
|
929
|
-
/** The start frame — always kept,
|
|
982
|
+
/** The start frame — always kept, appended after the references. */
|
|
930
983
|
firstFrameUrl: string;
|
|
931
984
|
/** Identity references, in priority order (trailing ones drop first). */
|
|
932
985
|
refImageUrls?: Array<string | undefined>;
|
|
@@ -939,7 +992,7 @@ interface GeminiOmniI2vInputsArgs {
|
|
|
939
992
|
provider?: string;
|
|
940
993
|
}
|
|
941
994
|
interface GeminiOmniI2vInputsResult {
|
|
942
|
-
/** `[
|
|
995
|
+
/** `[...keptRefs, firstFrameUrl]` — the `image_urls` payload, quota-fitted. */
|
|
943
996
|
imageUrls: string[];
|
|
944
997
|
/** The role-binding sentences; empty when no reference survived the budget. */
|
|
945
998
|
promptSuffix: string;
|
|
@@ -955,13 +1008,15 @@ declare function resolveGeminiOmniI2vInputs(args: GeminiOmniI2vInputsArgs): Gemi
|
|
|
955
1008
|
* [first(, last)] frames; REFERENCE_2_VIDEO reads every entry as a
|
|
956
1009
|
* reference ingredient. Frames and identities cannot ride separate
|
|
957
1010
|
* channels, so an anchored call that must carry identity references moves
|
|
958
|
-
* to REFERENCE_2_VIDEO with the
|
|
959
|
-
*
|
|
960
|
-
* same as seedance-2's reference mode).
|
|
1011
|
+
* to REFERENCE_2_VIDEO with the frames bound in prose (requested, not
|
|
1012
|
+
* pixel-guaranteed — the accepted trade, same as seedance-2's reference mode).
|
|
961
1013
|
*
|
|
962
|
-
*
|
|
963
|
-
*
|
|
964
|
-
*
|
|
1014
|
+
* THE PLATFORM CONVENTION (2026-10-18, `placeFramesAfterReferences`): the
|
|
1015
|
+
* caller's references take the first seats, so their image token N is their
|
|
1016
|
+
* Nth reference; the start frame — and the end frame, VEO takes one — follow
|
|
1017
|
+
* them, bound as the opening / closing frame. At the 3-ingredient cap the
|
|
1018
|
+
* frames are kept (explicit intent) and trailing references drop, reported.
|
|
1019
|
+
* (Until then the anchor took seat 1 and an end frame was surrendered.)
|
|
965
1020
|
*
|
|
966
1021
|
* BYTE-IDENTICAL with no references: plain frame mode, frames kept, no
|
|
967
1022
|
* generationType, no suffix — exactly what every veo i2v call has always
|
|
@@ -975,14 +1030,15 @@ interface VeoI2vInputsArgs {
|
|
|
975
1030
|
refImageUrls?: Array<string | undefined>;
|
|
976
1031
|
}
|
|
977
1032
|
interface VeoI2vInputsResult {
|
|
978
|
-
/** The `imageUrls` payload: frames in plain mode, [
|
|
1033
|
+
/** The `imageUrls` payload: frames in plain mode, [...refs, start, end?] in
|
|
979
1034
|
* reference mode — never more than VEO's 3-ingredient cap. */
|
|
980
1035
|
imageUrls: string[];
|
|
981
1036
|
/** Present (REFERENCE_2_VIDEO) exactly when references ride. */
|
|
982
1037
|
generationType?: "REFERENCE_2_VIDEO";
|
|
983
1038
|
promptSuffix: string;
|
|
984
1039
|
droppedRefImages: number;
|
|
985
|
-
/**
|
|
1040
|
+
/** Always false since the frames-after-references convention: an end frame
|
|
1041
|
+
* is kept in reference mode. Kept for callers that log it. */
|
|
986
1042
|
droppedEndFrame: boolean;
|
|
987
1043
|
}
|
|
988
1044
|
declare function resolveVeoI2vInputs(args: VeoI2vInputsArgs): VeoI2vInputsResult;
|
|
@@ -1048,4 +1104,4 @@ interface FrameDeliveryPlan {
|
|
|
1048
1104
|
*/
|
|
1049
1105
|
declare function planFrameDelivery(args: FrameDeliveryPlanArgs): FrameDeliveryPlan;
|
|
1050
1106
|
|
|
1051
|
-
export { type AssembleImageInput, type AssembleImageResult, type AssembleSunoInput, type AssembleSunoResult, type CharacterMeta, DirectionFields, type FrameDeliveryPlan, type FrameDeliveryPlanArgs, type GeminiOmniI2vInputsArgs, type GeminiOmniI2vInputsResult, REF_BINDING, type RefIdTokenContext, type ReferenceCounts, type ResolveVideoReferenceCoreArgs, SEEDANCE_VIDEO_EDIT_PREFIX, type Seedance2InputsArgs, type Seedance2InputsResult, type Seedance2Mode, type SoundComposition, type SoundCompositionFields, type SoundConsumerType, SubjectFields, type VeoI2vInputsArgs, type VeoI2vInputsResult, type VideoExtraRef, type VideoPromptCapOptions, appendField, appendMusicMeta, assembleImageInput, assembleSunoInput, buildSeedanceVideoEditPrompt, buildSurroundFillPrompt, composeSoundHintFromConnections, composeVideoPromptText, getEffectiveSunoCustomMode, identityRefsSentence, planFrameDelivery, promptBindsFirstFrame, resolveGeminiOmniI2vInputs, resolveRefIdTokens, resolveReferenceTokens, resolveSeedance2Inputs, resolveVeoI2vInputs, resolveVideoReferenceCore, truncateForField };
|
|
1107
|
+
export { type AssembleImageInput, type AssembleImageResult, type AssembleSunoInput, type AssembleSunoResult, type CharacterMeta, DirectionFields, type FrameDeliveryPlan, type FrameDeliveryPlanArgs, type FrameReferenceSlotsArgs, type FrameReferenceSlotsResult, type GeminiOmniI2vInputsArgs, type GeminiOmniI2vInputsResult, type ImageBinding, REF_BINDING, type RefIdTokenContext, type ReferenceCounts, type ResolveVideoReferenceCoreArgs, SEEDANCE_VIDEO_EDIT_PREFIX, type Seedance2InputsArgs, type Seedance2InputsResult, type Seedance2Mode, type SoundComposition, type SoundCompositionFields, type SoundConsumerType, SubjectFields, type VeoI2vInputsArgs, type VeoI2vInputsResult, type VideoExtraRef, type VideoPromptCapOptions, appendField, appendMusicMeta, assembleImageInput, assembleSunoInput, buildSeedanceVideoEditPrompt, buildSurroundFillPrompt, composeSoundHintFromConnections, composeVideoPromptText, getEffectiveSunoCustomMode, identityRefsSentence, imageBindingFor, placeFramesAfterReferences, planFrameDelivery, promptBindsFirstFrame, resolveGeminiOmniI2vInputs, resolveRefIdTokens, resolveReferenceTokens, resolveSeedance2Inputs, resolveVeoI2vInputs, resolveVideoReferenceCore, truncateForField };
|
package/dist/entries/assembly.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { REF_BINDING, SEEDANCE_VIDEO_EDIT_PREFIX, appendField, appendMusicMeta, assembleImageInput, assembleSunoInput, buildSeedanceVideoEditPrompt, buildSurroundFillPrompt, composeSoundHintFromConnections, composeVideoPromptText, getEffectiveSunoCustomMode, identityRefsSentence, planFrameDelivery, promptBindsFirstFrame, resolveGeminiOmniI2vInputs, resolveRefIdTokens, resolveReferenceTokens, resolveSeedance2Inputs, resolveVeoI2vInputs, resolveVideoReferenceCore, truncateForField } from '../chunk-
|
|
1
|
+
export { REF_BINDING, SEEDANCE_VIDEO_EDIT_PREFIX, appendField, appendMusicMeta, assembleImageInput, assembleSunoInput, buildSeedanceVideoEditPrompt, buildSurroundFillPrompt, composeSoundHintFromConnections, composeVideoPromptText, getEffectiveSunoCustomMode, identityRefsSentence, imageBindingFor, placeFramesAfterReferences, planFrameDelivery, promptBindsFirstFrame, resolveGeminiOmniI2vInputs, resolveRefIdTokens, resolveReferenceTokens, resolveSeedance2Inputs, resolveVeoI2vInputs, resolveVideoReferenceCore, truncateForField } from '../chunk-HQTHDTHN.js';
|
|
2
2
|
import '../chunk-DUXX6CBX.js';
|
|
3
3
|
import '../chunk-GILUVQQJ.js';
|
|
4
4
|
import '../chunk-JZOPMVGY.js';
|