@nodaro/prompts 1.38.0 → 1.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/dist/{chunk-LVSH7K7R.cjs → chunk-22KZOAGL.cjs} +81 -42
  2. package/dist/chunk-22KZOAGL.cjs.map +1 -0
  3. package/dist/chunk-2P26SZX5.cjs +414 -0
  4. package/dist/chunk-2P26SZX5.cjs.map +1 -0
  5. package/dist/{chunk-CVPB2N3Z.cjs → chunk-3INXNDV7.cjs} +102 -4
  6. package/dist/chunk-3INXNDV7.cjs.map +1 -0
  7. package/dist/{chunk-7XKHDXCL.cjs → chunk-3U7X6JZN.cjs} +13 -12
  8. package/dist/chunk-3U7X6JZN.cjs.map +1 -0
  9. package/dist/chunk-4GKTOVFM.cjs +8 -0
  10. package/dist/chunk-4GKTOVFM.cjs.map +1 -0
  11. package/dist/{chunk-HRBBNODV.js → chunk-6GVFJLDL.js} +4 -3
  12. package/dist/chunk-6GVFJLDL.js.map +1 -0
  13. package/dist/{chunk-NO6XHX4R.js → chunk-6MPZHFIS.js} +99 -6
  14. package/dist/chunk-6MPZHFIS.js.map +1 -0
  15. package/dist/{chunk-4FDNVNJE.js → chunk-7XMTVYS5.js} +3 -76
  16. package/dist/chunk-7XMTVYS5.js.map +1 -0
  17. package/dist/{chunk-QDEWBBUR.js → chunk-DUXX6CBX.js} +12 -143
  18. package/dist/chunk-DUXX6CBX.js.map +1 -0
  19. package/dist/chunk-EAYEZXWT.js +388 -0
  20. package/dist/chunk-EAYEZXWT.js.map +1 -0
  21. package/dist/chunk-GILUVQQJ.js +6 -0
  22. package/dist/chunk-GILUVQQJ.js.map +1 -0
  23. package/dist/{chunk-KIYNOOPJ.js → chunk-GTDKDD7Y.js} +12 -6
  24. package/dist/chunk-GTDKDD7Y.js.map +1 -0
  25. package/dist/{chunk-TLVX5PXD.cjs → chunk-IUCNJAHW.cjs} +13 -7
  26. package/dist/chunk-IUCNJAHW.cjs.map +1 -0
  27. package/dist/{chunk-ZFIXQRBZ.cjs → chunk-KUBZVWME.cjs} +2 -80
  28. package/dist/chunk-KUBZVWME.cjs.map +1 -0
  29. package/dist/{chunk-JKCR6WRZ.cjs → chunk-NMWKXAYA.cjs} +2 -2
  30. package/dist/{chunk-JKCR6WRZ.cjs.map → chunk-NMWKXAYA.cjs.map} +1 -1
  31. package/dist/{chunk-LK2CZK5U.cjs → chunk-PWWM7Q3T.cjs} +7 -7
  32. package/dist/{chunk-LK2CZK5U.cjs.map → chunk-PWWM7Q3T.cjs.map} +1 -1
  33. package/dist/{chunk-N7TOWXDJ.js → chunk-QDUTMOF4.js} +3 -3
  34. package/dist/{chunk-N7TOWXDJ.js.map → chunk-QDUTMOF4.js.map} +1 -1
  35. package/dist/{chunk-MENBHEAY.cjs → chunk-WRM52ZBN.cjs} +19 -161
  36. package/dist/chunk-WRM52ZBN.cjs.map +1 -0
  37. package/dist/chunk-XIWWDGT5.cjs +86 -0
  38. package/dist/chunk-XIWWDGT5.cjs.map +1 -0
  39. package/dist/{chunk-CEPVQQVO.js → chunk-XRLOMTBZ.js} +2 -2
  40. package/dist/{chunk-CEPVQQVO.js.map → chunk-XRLOMTBZ.js.map} +1 -1
  41. package/dist/{chunk-QBEZMR2F.js → chunk-XU54YJXQ.js} +54 -15
  42. package/dist/chunk-XU54YJXQ.js.map +1 -0
  43. package/dist/chunk-Z3SZXWRU.js +80 -0
  44. package/dist/chunk-Z3SZXWRU.js.map +1 -0
  45. package/dist/entries/assembly.cjs +26 -25
  46. package/dist/entries/assembly.d.cts +32 -4
  47. package/dist/entries/assembly.d.ts +32 -4
  48. package/dist/entries/assembly.js +5 -4
  49. package/dist/entries/doctrine.cjs +46 -46
  50. package/dist/entries/doctrine.d.cts +3 -3
  51. package/dist/entries/doctrine.d.ts +3 -3
  52. package/dist/entries/doctrine.js +1 -1
  53. package/dist/entries/picker-catalogs.cjs +42 -42
  54. package/dist/entries/picker-catalogs.js +3 -3
  55. package/dist/entries/presets.cjs +49 -26
  56. package/dist/entries/presets.d.cts +51 -1
  57. package/dist/entries/presets.d.ts +51 -1
  58. package/dist/entries/presets.js +4 -1
  59. package/dist/entries/prompt-builder.cjs +135 -98
  60. package/dist/entries/prompt-builder.d.cts +22 -11
  61. package/dist/entries/prompt-builder.d.ts +22 -11
  62. package/dist/entries/prompt-builder.js +4 -3
  63. package/dist/entries/prompt-fields.cjs +41 -40
  64. package/dist/entries/prompt-fields.js +2 -1
  65. package/dist/index.cjs +331 -273
  66. package/dist/index.d.cts +4 -4
  67. package/dist/index.d.ts +4 -4
  68. package/dist/index.js +11 -9
  69. package/dist/{subject-registry-BUswuEVD.d.cts → subject-registry-CQi_CZfJ.d.cts} +78 -9
  70. package/dist/{subject-registry-D7V8PEG-.d.ts → subject-registry-DFiGx49v.d.ts} +78 -9
  71. package/package.json +2 -2
  72. package/src/__tests__/assemble-image-input-style-references.test.ts +173 -0
  73. package/src/__tests__/catalog-id-guard.test.ts +30 -0
  74. package/src/__tests__/factory-preset-previews.test.ts +123 -0
  75. package/src/__tests__/factory-preset-references.test.ts +222 -0
  76. package/src/__tests__/user-direction-refs.test.ts +180 -0
  77. package/src/assemble-image-input.ts +114 -13
  78. package/src/catalog-id-guard.ts +18 -2
  79. package/src/color-names.ts +192 -0
  80. package/src/direction-registry.ts +66 -5
  81. package/src/entries/prompt-builder.ts +2 -0
  82. package/src/factory-presets/generate-image.ts +29 -0
  83. package/src/factory-presets/index.ts +2 -0
  84. package/src/factory-presets/preview-files.generated.ts +4 -0
  85. package/src/factory-presets/previews.ts +40 -0
  86. package/src/factory-presets/references.ts +80 -0
  87. package/src/factory-presets/shared-image.ts +4 -0
  88. package/src/factory-presets/types.ts +8 -0
  89. package/src/image-reference-doctrine.ts +3 -3
  90. package/src/image-token-pattern.ts +13 -0
  91. package/src/prompt-builder.ts +4 -5
  92. package/src/prompt-style-section.ts +3 -3
  93. package/src/user-direction-refs.ts +110 -0
  94. package/dist/chunk-4FDNVNJE.js.map +0 -1
  95. package/dist/chunk-7XKHDXCL.cjs.map +0 -1
  96. package/dist/chunk-CVPB2N3Z.cjs.map +0 -1
  97. package/dist/chunk-HRBBNODV.js.map +0 -1
  98. package/dist/chunk-KIYNOOPJ.js.map +0 -1
  99. package/dist/chunk-LVSH7K7R.cjs.map +0 -1
  100. package/dist/chunk-MENBHEAY.cjs.map +0 -1
  101. package/dist/chunk-NO6XHX4R.js.map +0 -1
  102. package/dist/chunk-QBEZMR2F.js.map +0 -1
  103. package/dist/chunk-QDEWBBUR.js.map +0 -1
  104. package/dist/chunk-TLVX5PXD.cjs.map +0 -1
  105. package/dist/chunk-UJKFHPZ7.js +0 -37
  106. package/dist/chunk-UJKFHPZ7.js.map +0 -1
  107. package/dist/chunk-W5SCZIOB.cjs +0 -43
  108. package/dist/chunk-W5SCZIOB.cjs.map +0 -1
  109. package/dist/chunk-ZFIXQRBZ.cjs.map +0 -1
@@ -0,0 +1,80 @@
1
+ import { computeNodePrompt, computeScriptTopic, computeLlmChatFields } from './chunk-7XMTVYS5.js';
2
+ import { resolveNodeRefs } from '@nodaro/shared/workflow';
3
+ import { SOCIAL_POST_NODE_TYPES } from '@nodaro/shared/social';
4
+
5
+ // src/audio-tags.ts
6
+ function removeBracketTags(text) {
7
+ let out = "";
8
+ let from = 0;
9
+ let open = text.indexOf("[");
10
+ while (open !== -1) {
11
+ const close = text.indexOf("]", open + 1);
12
+ if (close === -1) break;
13
+ if (close === open + 1) {
14
+ open = text.indexOf("[", open + 1);
15
+ continue;
16
+ }
17
+ out += text.slice(from, open);
18
+ from = close + 1;
19
+ open = text.indexOf("[", from);
20
+ }
21
+ return out + text.slice(from);
22
+ }
23
+ function stripAudioTags(text) {
24
+ return removeBracketTags(text).replace(/\s{2,}/g, " ").trim();
25
+ }
26
+ var WIRED_OUTPUT_NODE_TYPES = /* @__PURE__ */ new Set(["webhook-output", ...SOCIAL_POST_NODE_TYPES]);
27
+ var TEXT_REQUIRED_NODE_TYPES = /* @__PURE__ */ new Set([
28
+ "llm-chat",
29
+ "ai-writer",
30
+ "generate-script",
31
+ "text-to-speech",
32
+ "generate-music",
33
+ "text-to-audio",
34
+ // Save to Collection refuses an empty record ("nothing to save"): a feed
35
+ // with nothing new wired straight into it must skip it, not fail the run.
36
+ "collection-write",
37
+ // Generate Image: an empty prompt is a legal request in general (references
38
+ // alone), but when the text it was WIRED produced nothing this run — the skip
39
+ // rule's precondition — an empty prompt is a paid picture of nothing.
40
+ "generate-image"
41
+ ]);
42
+ var withoutAffixes = (data) => ({ ...data, promptPrefix: void 0, promptSuffix: void 0 });
43
+ var present = (s) => typeof s === "string" && s.trim().length > 0;
44
+ function computeAiWriterInput(data, { override, wired }) {
45
+ return [override, wired, data.userInput, data.prompt].find(present) ?? "";
46
+ }
47
+ function computeNodeSendText(nodeType, data, args) {
48
+ const bare = withoutAffixes(data);
49
+ switch (nodeType) {
50
+ case "llm-chat":
51
+ return computeLlmChatFields(bare, {
52
+ override: args.override,
53
+ wiredUserInput: args.wired,
54
+ wiredSystemPrompt: args.wiredSystemPrompt,
55
+ refMap: args.refMap
56
+ }).userInput;
57
+ case "ai-writer":
58
+ return computeAiWriterInput(bare, args);
59
+ case "generate-script":
60
+ return computeScriptTopic(bare, { override: args.override, wired: args.wired, refMap: args.refMap });
61
+ case "generate-music": {
62
+ const prompt = computeNodePrompt(nodeType, bare, { override: args.override, wired: args.wired, refMap: args.refMap });
63
+ return present(prompt) ? prompt : present(data.lyrics) ? data.lyrics : "";
64
+ }
65
+ case "text-to-speech":
66
+ case "text-to-audio":
67
+ case "generate-image":
68
+ return computeNodePrompt(nodeType, bare, { override: args.override, wired: args.wired, refMap: args.refMap });
69
+ case "collection-write": {
70
+ const typed = [data.title, data.text, data.link].map((v) => typeof v === "string" ? resolveNodeRefs(v, args.refMap) : v).find((v) => present(v));
71
+ return [args.override, args.wired, typed].find(present) ?? "";
72
+ }
73
+ default:
74
+ return void 0;
75
+ }
76
+ }
77
+
78
+ export { TEXT_REQUIRED_NODE_TYPES, WIRED_OUTPUT_NODE_TYPES, computeAiWriterInput, computeNodeSendText, stripAudioTags };
79
+ //# sourceMappingURL=chunk-Z3SZXWRU.js.map
80
+ //# sourceMappingURL=chunk-Z3SZXWRU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/audio-tags.ts","../src/node-send-text.ts"],"names":[],"mappings":"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","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,12 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunkLVSH7K7R_cjs = require('../chunk-LVSH7K7R.cjs');
4
- require('../chunk-MENBHEAY.cjs');
3
+ var chunk22KZOAGL_cjs = require('../chunk-22KZOAGL.cjs');
4
+ require('../chunk-WRM52ZBN.cjs');
5
+ require('../chunk-4GKTOVFM.cjs');
5
6
  require('../chunk-XUZXBY75.cjs');
6
7
  require('../chunk-UXDKZVNN.cjs');
7
8
  require('../chunk-2NJTFCKQ.cjs');
8
- require('../chunk-LK2CZK5U.cjs');
9
- require('../chunk-W5SCZIOB.cjs');
9
+ require('../chunk-PWWM7Q3T.cjs');
10
+ require('../chunk-2P26SZX5.cjs');
10
11
  require('../chunk-MQEXFCNU.cjs');
11
12
  require('../chunk-3UEA3UHQ.cjs');
12
13
  require('../chunk-K6NT635Z.cjs');
@@ -18,87 +19,87 @@ require('../chunk-Q7SFCCGT.cjs');
18
19
 
19
20
  Object.defineProperty(exports, "REF_BINDING", {
20
21
  enumerable: true,
21
- get: function () { return chunkLVSH7K7R_cjs.REF_BINDING; }
22
+ get: function () { return chunk22KZOAGL_cjs.REF_BINDING; }
22
23
  });
23
24
  Object.defineProperty(exports, "SEEDANCE_VIDEO_EDIT_PREFIX", {
24
25
  enumerable: true,
25
- get: function () { return chunkLVSH7K7R_cjs.SEEDANCE_VIDEO_EDIT_PREFIX; }
26
+ get: function () { return chunk22KZOAGL_cjs.SEEDANCE_VIDEO_EDIT_PREFIX; }
26
27
  });
27
28
  Object.defineProperty(exports, "appendField", {
28
29
  enumerable: true,
29
- get: function () { return chunkLVSH7K7R_cjs.appendField; }
30
+ get: function () { return chunk22KZOAGL_cjs.appendField; }
30
31
  });
31
32
  Object.defineProperty(exports, "appendMusicMeta", {
32
33
  enumerable: true,
33
- get: function () { return chunkLVSH7K7R_cjs.appendMusicMeta; }
34
+ get: function () { return chunk22KZOAGL_cjs.appendMusicMeta; }
34
35
  });
35
36
  Object.defineProperty(exports, "assembleImageInput", {
36
37
  enumerable: true,
37
- get: function () { return chunkLVSH7K7R_cjs.assembleImageInput; }
38
+ get: function () { return chunk22KZOAGL_cjs.assembleImageInput; }
38
39
  });
39
40
  Object.defineProperty(exports, "assembleSunoInput", {
40
41
  enumerable: true,
41
- get: function () { return chunkLVSH7K7R_cjs.assembleSunoInput; }
42
+ get: function () { return chunk22KZOAGL_cjs.assembleSunoInput; }
42
43
  });
43
44
  Object.defineProperty(exports, "buildSeedanceVideoEditPrompt", {
44
45
  enumerable: true,
45
- get: function () { return chunkLVSH7K7R_cjs.buildSeedanceVideoEditPrompt; }
46
+ get: function () { return chunk22KZOAGL_cjs.buildSeedanceVideoEditPrompt; }
46
47
  });
47
48
  Object.defineProperty(exports, "buildSurroundFillPrompt", {
48
49
  enumerable: true,
49
- get: function () { return chunkLVSH7K7R_cjs.buildSurroundFillPrompt; }
50
+ get: function () { return chunk22KZOAGL_cjs.buildSurroundFillPrompt; }
50
51
  });
51
52
  Object.defineProperty(exports, "composeSoundHintFromConnections", {
52
53
  enumerable: true,
53
- get: function () { return chunkLVSH7K7R_cjs.composeSoundHintFromConnections; }
54
+ get: function () { return chunk22KZOAGL_cjs.composeSoundHintFromConnections; }
54
55
  });
55
56
  Object.defineProperty(exports, "composeVideoPromptText", {
56
57
  enumerable: true,
57
- get: function () { return chunkLVSH7K7R_cjs.composeVideoPromptText; }
58
+ get: function () { return chunk22KZOAGL_cjs.composeVideoPromptText; }
58
59
  });
59
60
  Object.defineProperty(exports, "getEffectiveSunoCustomMode", {
60
61
  enumerable: true,
61
- get: function () { return chunkLVSH7K7R_cjs.getEffectiveSunoCustomMode; }
62
+ get: function () { return chunk22KZOAGL_cjs.getEffectiveSunoCustomMode; }
62
63
  });
63
64
  Object.defineProperty(exports, "identityRefsSentence", {
64
65
  enumerable: true,
65
- get: function () { return chunkLVSH7K7R_cjs.identityRefsSentence; }
66
+ get: function () { return chunk22KZOAGL_cjs.identityRefsSentence; }
66
67
  });
67
68
  Object.defineProperty(exports, "planFrameDelivery", {
68
69
  enumerable: true,
69
- get: function () { return chunkLVSH7K7R_cjs.planFrameDelivery; }
70
+ get: function () { return chunk22KZOAGL_cjs.planFrameDelivery; }
70
71
  });
71
72
  Object.defineProperty(exports, "promptBindsFirstFrame", {
72
73
  enumerable: true,
73
- get: function () { return chunkLVSH7K7R_cjs.promptBindsFirstFrame; }
74
+ get: function () { return chunk22KZOAGL_cjs.promptBindsFirstFrame; }
74
75
  });
75
76
  Object.defineProperty(exports, "resolveGeminiOmniI2vInputs", {
76
77
  enumerable: true,
77
- get: function () { return chunkLVSH7K7R_cjs.resolveGeminiOmniI2vInputs; }
78
+ get: function () { return chunk22KZOAGL_cjs.resolveGeminiOmniI2vInputs; }
78
79
  });
79
80
  Object.defineProperty(exports, "resolveRefIdTokens", {
80
81
  enumerable: true,
81
- get: function () { return chunkLVSH7K7R_cjs.resolveRefIdTokens; }
82
+ get: function () { return chunk22KZOAGL_cjs.resolveRefIdTokens; }
82
83
  });
83
84
  Object.defineProperty(exports, "resolveReferenceTokens", {
84
85
  enumerable: true,
85
- get: function () { return chunkLVSH7K7R_cjs.resolveReferenceTokens; }
86
+ get: function () { return chunk22KZOAGL_cjs.resolveReferenceTokens; }
86
87
  });
87
88
  Object.defineProperty(exports, "resolveSeedance2Inputs", {
88
89
  enumerable: true,
89
- get: function () { return chunkLVSH7K7R_cjs.resolveSeedance2Inputs; }
90
+ get: function () { return chunk22KZOAGL_cjs.resolveSeedance2Inputs; }
90
91
  });
91
92
  Object.defineProperty(exports, "resolveVeoI2vInputs", {
92
93
  enumerable: true,
93
- get: function () { return chunkLVSH7K7R_cjs.resolveVeoI2vInputs; }
94
+ get: function () { return chunk22KZOAGL_cjs.resolveVeoI2vInputs; }
94
95
  });
95
96
  Object.defineProperty(exports, "resolveVideoReferenceCore", {
96
97
  enumerable: true,
97
- get: function () { return chunkLVSH7K7R_cjs.resolveVideoReferenceCore; }
98
+ get: function () { return chunk22KZOAGL_cjs.resolveVideoReferenceCore; }
98
99
  });
99
100
  Object.defineProperty(exports, "truncateForField", {
100
101
  enumerable: true,
101
- get: function () { return chunkLVSH7K7R_cjs.truncateForField; }
102
+ get: function () { return chunk22KZOAGL_cjs.truncateForField; }
102
103
  });
103
104
  //# sourceMappingURL=assembly.cjs.map
104
105
  //# sourceMappingURL=assembly.cjs.map
@@ -1,6 +1,6 @@
1
1
  import { UsageMode, SurroundDirection } from '@nodaro/shared/entities';
2
2
  import { ConnectedReference, DescribedReference, HintNodeLike, HintGraphContext, IdentityMeta, CharacterDef } from '@nodaro/shared/types';
3
- import { k as DirectionFields, N as SubjectFields, J as StructuredPromptFields, c as BuildImagePromptResult, m as DirectionHintMode, Q as SubjectHintMode } from '../subject-registry-BUswuEVD.cjs';
3
+ import { k as DirectionFields, L as StyleReferenceInput, Q as SubjectFields, K as StructuredPromptFields, c as BuildImagePromptResult, m as DirectionHintMode, U as SubjectHintMode } from '../subject-registry-CQi_CZfJ.cjs';
4
4
  import { FrameDelivery } from '@nodaro/shared/video';
5
5
  import '../term-C01_g6s1.cjs';
6
6
  import '../transitions-BLFfAJUH.cjs';
@@ -553,6 +553,23 @@ interface AssembleImageInput {
553
553
  * is a no-op for it and the result is byte-identical to today).
554
554
  */
555
555
  direction?: DirectionFields;
556
+ /**
557
+ * Rendered clauses for the caller's OWN saved resources named in `direction`
558
+ * (`colorLook: "palette:<id>"`, `style: "moodboard:<id>"`), keyed by the
559
+ * direction value. Resolving them is a database read, so the platform does it
560
+ * BEFORE this pure assembly and hands the clauses in; each one folds in its
561
+ * row's slot exactly like a catalog clause (the `[style]` film line), sheds
562
+ * like one, and a reference missing from the map folds nothing.
563
+ */
564
+ directionRefs?: ReadonlyMap<string, string>;
565
+ /**
566
+ * Style reference images (a moodboard's images). They only FILL the
567
+ * reference seats the caller's own references leave free — after them, never
568
+ * displacing, renumbering or evicting one — up to the model's reference
569
+ * limit; the rest are not sent. `styleReferencesSent` on the result says how
570
+ * many went. Each carries a short style line (`styleReferenceDescription`).
571
+ */
572
+ styleReferences?: readonly StyleReferenceInput[];
556
573
  /**
557
574
  * Flat subject ids (Person / Styling / props) → folded into the prompt AHEAD
558
575
  * of the direction clauses: the subject is the noun phrase the cinematography
@@ -622,7 +639,9 @@ interface AssembleImageInput {
622
639
  * Order: (1) compose the prompt text (no-op when no subject/direction/structured),
623
640
  * (2) `buildImagePrompt(...)` — exactly the call the three sites make today,
624
641
  * (3) shed hint clauses and re-assemble while the provider cap overflows,
625
- * (4) optional post-assembly empty-prompt throw (gated by `throwOnEmpty`).
642
+ * (4) with `styleReferences`, fill the free reference seats with them
643
+ * (`fillStyleReferences`; absent = this step does not run at all),
644
+ * (5) optional post-assembly empty-prompt throw (gated by `throwOnEmpty`).
626
645
  *
627
646
  * TRUNCATION ORDERING (step 3): `buildImagePrompt`'s cap clamp cuts the TAIL,
628
647
  * which is ORDER-BLIND — on a low-cap provider (seedream = 3000) a maximal
@@ -638,7 +657,16 @@ interface AssembleImageInput {
638
657
  * UNDER-CAP PARITY: the first pass folds every hint, so a prompt that fits is
639
658
  * byte-identical to before — the retry only ever runs on an over-cap assembly.
640
659
  */
641
- declare function assembleImageInput(input: AssembleImageInput): BuildImagePromptResult;
660
+ declare function assembleImageInput(input: AssembleImageInput): AssembleImageResult;
661
+ /** `assembleImageInput`'s result: the builder's, plus the style-reference count. */
662
+ interface AssembleImageResult extends BuildImagePromptResult {
663
+ /**
664
+ * How many of `styleReferences` were sent (they follow the caller's own
665
+ * references at the end of `referenceImageUrls`). Present only when
666
+ * `styleReferences` were given, so every other result is unchanged.
667
+ */
668
+ styleReferencesSent?: number;
669
+ }
642
670
 
643
671
  /**
644
672
  * `composeVideoPromptText` — the video twin of `assemble-image-input.ts`'s
@@ -1020,4 +1048,4 @@ interface FrameDeliveryPlan {
1020
1048
  */
1021
1049
  declare function planFrameDelivery(args: FrameDeliveryPlanArgs): FrameDeliveryPlan;
1022
1050
 
1023
- export { type AssembleImageInput, 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 };
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 };
@@ -1,6 +1,6 @@
1
1
  import { UsageMode, SurroundDirection } from '@nodaro/shared/entities';
2
2
  import { ConnectedReference, DescribedReference, HintNodeLike, HintGraphContext, IdentityMeta, CharacterDef } from '@nodaro/shared/types';
3
- import { k as DirectionFields, N as SubjectFields, J as StructuredPromptFields, c as BuildImagePromptResult, m as DirectionHintMode, Q as SubjectHintMode } from '../subject-registry-D7V8PEG-.js';
3
+ import { k as DirectionFields, L as StyleReferenceInput, Q as SubjectFields, K as StructuredPromptFields, c as BuildImagePromptResult, m as DirectionHintMode, U as SubjectHintMode } from '../subject-registry-DFiGx49v.js';
4
4
  import { FrameDelivery } from '@nodaro/shared/video';
5
5
  import '../term-C01_g6s1.js';
6
6
  import '../transitions-BgwWM37i.js';
@@ -553,6 +553,23 @@ interface AssembleImageInput {
553
553
  * is a no-op for it and the result is byte-identical to today).
554
554
  */
555
555
  direction?: DirectionFields;
556
+ /**
557
+ * Rendered clauses for the caller's OWN saved resources named in `direction`
558
+ * (`colorLook: "palette:<id>"`, `style: "moodboard:<id>"`), keyed by the
559
+ * direction value. Resolving them is a database read, so the platform does it
560
+ * BEFORE this pure assembly and hands the clauses in; each one folds in its
561
+ * row's slot exactly like a catalog clause (the `[style]` film line), sheds
562
+ * like one, and a reference missing from the map folds nothing.
563
+ */
564
+ directionRefs?: ReadonlyMap<string, string>;
565
+ /**
566
+ * Style reference images (a moodboard's images). They only FILL the
567
+ * reference seats the caller's own references leave free — after them, never
568
+ * displacing, renumbering or evicting one — up to the model's reference
569
+ * limit; the rest are not sent. `styleReferencesSent` on the result says how
570
+ * many went. Each carries a short style line (`styleReferenceDescription`).
571
+ */
572
+ styleReferences?: readonly StyleReferenceInput[];
556
573
  /**
557
574
  * Flat subject ids (Person / Styling / props) → folded into the prompt AHEAD
558
575
  * of the direction clauses: the subject is the noun phrase the cinematography
@@ -622,7 +639,9 @@ interface AssembleImageInput {
622
639
  * Order: (1) compose the prompt text (no-op when no subject/direction/structured),
623
640
  * (2) `buildImagePrompt(...)` — exactly the call the three sites make today,
624
641
  * (3) shed hint clauses and re-assemble while the provider cap overflows,
625
- * (4) optional post-assembly empty-prompt throw (gated by `throwOnEmpty`).
642
+ * (4) with `styleReferences`, fill the free reference seats with them
643
+ * (`fillStyleReferences`; absent = this step does not run at all),
644
+ * (5) optional post-assembly empty-prompt throw (gated by `throwOnEmpty`).
626
645
  *
627
646
  * TRUNCATION ORDERING (step 3): `buildImagePrompt`'s cap clamp cuts the TAIL,
628
647
  * which is ORDER-BLIND — on a low-cap provider (seedream = 3000) a maximal
@@ -638,7 +657,16 @@ interface AssembleImageInput {
638
657
  * UNDER-CAP PARITY: the first pass folds every hint, so a prompt that fits is
639
658
  * byte-identical to before — the retry only ever runs on an over-cap assembly.
640
659
  */
641
- declare function assembleImageInput(input: AssembleImageInput): BuildImagePromptResult;
660
+ declare function assembleImageInput(input: AssembleImageInput): AssembleImageResult;
661
+ /** `assembleImageInput`'s result: the builder's, plus the style-reference count. */
662
+ interface AssembleImageResult extends BuildImagePromptResult {
663
+ /**
664
+ * How many of `styleReferences` were sent (they follow the caller's own
665
+ * references at the end of `referenceImageUrls`). Present only when
666
+ * `styleReferences` were given, so every other result is unchanged.
667
+ */
668
+ styleReferencesSent?: number;
669
+ }
642
670
 
643
671
  /**
644
672
  * `composeVideoPromptText` — the video twin of `assemble-image-input.ts`'s
@@ -1020,4 +1048,4 @@ interface FrameDeliveryPlan {
1020
1048
  */
1021
1049
  declare function planFrameDelivery(args: FrameDeliveryPlanArgs): FrameDeliveryPlan;
1022
1050
 
1023
- export { type AssembleImageInput, 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 };
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 };
@@ -1,10 +1,11 @@
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-QBEZMR2F.js';
2
- import '../chunk-QDEWBBUR.js';
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-XU54YJXQ.js';
2
+ import '../chunk-DUXX6CBX.js';
3
+ import '../chunk-GILUVQQJ.js';
3
4
  import '../chunk-JZOPMVGY.js';
4
5
  import '../chunk-35UHMDGS.js';
5
6
  import '../chunk-BQWIPLLR.js';
6
- import '../chunk-N7TOWXDJ.js';
7
- import '../chunk-UJKFHPZ7.js';
7
+ import '../chunk-QDUTMOF4.js';
8
+ import '../chunk-EAYEZXWT.js';
8
9
  import '../chunk-SXXW4LCR.js';
9
10
  import '../chunk-DVP6ILDR.js';
10
11
  import '../chunk-TDZFXOTE.js';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkJKCR6WRZ_cjs = require('../chunk-JKCR6WRZ.cjs');
3
+ var chunkNMWKXAYA_cjs = require('../chunk-NMWKXAYA.cjs');
4
4
  var chunkNAFD6MGH_cjs = require('../chunk-NAFD6MGH.cjs');
5
5
  var chunk2NJTFCKQ_cjs = require('../chunk-2NJTFCKQ.cjs');
6
6
  require('../chunk-Q7SFCCGT.cjs');
@@ -9,183 +9,183 @@ require('../chunk-Q7SFCCGT.cjs');
9
9
 
10
10
  Object.defineProperty(exports, "AD_CREATIVE_ANALYSIS_FIELDS", {
11
11
  enumerable: true,
12
- get: function () { return chunkJKCR6WRZ_cjs.AD_CREATIVE_ANALYSIS_FIELDS; }
12
+ get: function () { return chunkNMWKXAYA_cjs.AD_CREATIVE_ANALYSIS_FIELDS; }
13
13
  });
14
14
  Object.defineProperty(exports, "AD_CREATIVE_ANALYSIS_SYSTEM_PROMPT", {
15
15
  enumerable: true,
16
- get: function () { return chunkJKCR6WRZ_cjs.AD_CREATIVE_ANALYSIS_SYSTEM_PROMPT; }
16
+ get: function () { return chunkNMWKXAYA_cjs.AD_CREATIVE_ANALYSIS_SYSTEM_PROMPT; }
17
17
  });
18
18
  Object.defineProperty(exports, "AUDIO_WIZARD_CATEGORIES", {
19
19
  enumerable: true,
20
- get: function () { return chunkJKCR6WRZ_cjs.AUDIO_WIZARD_CATEGORIES; }
20
+ get: function () { return chunkNMWKXAYA_cjs.AUDIO_WIZARD_CATEGORIES; }
21
21
  });
22
22
  Object.defineProperty(exports, "DEFAULT_OWN_MOTION", {
23
23
  enumerable: true,
24
- get: function () { return chunkJKCR6WRZ_cjs.DEFAULT_OWN_MOTION; }
24
+ get: function () { return chunkNMWKXAYA_cjs.DEFAULT_OWN_MOTION; }
25
25
  });
26
26
  Object.defineProperty(exports, "IMAGE_REFERENCE_PROMPT_DOCTRINE", {
27
27
  enumerable: true,
28
- get: function () { return chunkJKCR6WRZ_cjs.IMAGE_REFERENCE_PROMPT_DOCTRINE; }
28
+ get: function () { return chunkNMWKXAYA_cjs.IMAGE_REFERENCE_PROMPT_DOCTRINE; }
29
29
  });
30
30
  Object.defineProperty(exports, "IMAGE_WIZARD_CATEGORIES", {
31
31
  enumerable: true,
32
- get: function () { return chunkJKCR6WRZ_cjs.IMAGE_WIZARD_CATEGORIES; }
32
+ get: function () { return chunkNMWKXAYA_cjs.IMAGE_WIZARD_CATEGORIES; }
33
33
  });
34
34
  Object.defineProperty(exports, "LLM_CHAT_WIZARD_CATEGORIES", {
35
35
  enumerable: true,
36
- get: function () { return chunkJKCR6WRZ_cjs.LLM_CHAT_WIZARD_CATEGORIES; }
36
+ get: function () { return chunkNMWKXAYA_cjs.LLM_CHAT_WIZARD_CATEGORIES; }
37
37
  });
38
38
  Object.defineProperty(exports, "MUSIC_WIZARD_CATEGORIES", {
39
39
  enumerable: true,
40
- get: function () { return chunkJKCR6WRZ_cjs.MUSIC_WIZARD_CATEGORIES; }
40
+ get: function () { return chunkNMWKXAYA_cjs.MUSIC_WIZARD_CATEGORIES; }
41
41
  });
42
42
  Object.defineProperty(exports, "OWN_MOTION_NODE_TYPES", {
43
43
  enumerable: true,
44
- get: function () { return chunkJKCR6WRZ_cjs.OWN_MOTION_NODE_TYPES; }
44
+ get: function () { return chunkNMWKXAYA_cjs.OWN_MOTION_NODE_TYPES; }
45
45
  });
46
46
  Object.defineProperty(exports, "POST_CONTENT_ANALYSIS_SYSTEM_PROMPT", {
47
47
  enumerable: true,
48
- get: function () { return chunkJKCR6WRZ_cjs.POST_CONTENT_ANALYSIS_SYSTEM_PROMPT; }
48
+ get: function () { return chunkNMWKXAYA_cjs.POST_CONTENT_ANALYSIS_SYSTEM_PROMPT; }
49
49
  });
50
50
  Object.defineProperty(exports, "PROVIDER_CAPABILITIES", {
51
51
  enumerable: true,
52
- get: function () { return chunkJKCR6WRZ_cjs.PROVIDER_CAPABILITIES; }
52
+ get: function () { return chunkNMWKXAYA_cjs.PROVIDER_CAPABILITIES; }
53
53
  });
54
54
  Object.defineProperty(exports, "PROVIDER_PROMPT_DOCTRINES", {
55
55
  enumerable: true,
56
- get: function () { return chunkJKCR6WRZ_cjs.PROVIDER_PROMPT_DOCTRINES; }
56
+ get: function () { return chunkNMWKXAYA_cjs.PROVIDER_PROMPT_DOCTRINES; }
57
57
  });
58
58
  Object.defineProperty(exports, "REFERENCE_IMAGE_ROLES", {
59
59
  enumerable: true,
60
- get: function () { return chunkJKCR6WRZ_cjs.REFERENCE_IMAGE_ROLES; }
60
+ get: function () { return chunkNMWKXAYA_cjs.REFERENCE_IMAGE_ROLES; }
61
61
  });
62
62
  Object.defineProperty(exports, "SCENE3D_FIGURE_REFERENCE_RULE", {
63
63
  enumerable: true,
64
- get: function () { return chunkJKCR6WRZ_cjs.SCENE3D_FIGURE_REFERENCE_RULE; }
64
+ get: function () { return chunkNMWKXAYA_cjs.SCENE3D_FIGURE_REFERENCE_RULE; }
65
65
  });
66
66
  Object.defineProperty(exports, "SCENE3D_FREE_PLATE_SLOTS", {
67
67
  enumerable: true,
68
- get: function () { return chunkJKCR6WRZ_cjs.SCENE3D_FREE_PLATE_SLOTS; }
68
+ get: function () { return chunkNMWKXAYA_cjs.SCENE3D_FREE_PLATE_SLOTS; }
69
69
  });
70
70
  Object.defineProperty(exports, "SCENE3D_LAYOUT_REFERENCE_SCOPING_FIXTURE", {
71
71
  enumerable: true,
72
- get: function () { return chunkJKCR6WRZ_cjs.SCENE3D_LAYOUT_REFERENCE_SCOPING_FIXTURE; }
72
+ get: function () { return chunkNMWKXAYA_cjs.SCENE3D_LAYOUT_REFERENCE_SCOPING_FIXTURE; }
73
73
  });
74
74
  Object.defineProperty(exports, "SCENE3D_LAYOUT_REFERENCE_SCOPING_LINE", {
75
75
  enumerable: true,
76
- get: function () { return chunkJKCR6WRZ_cjs.SCENE3D_LAYOUT_REFERENCE_SCOPING_LINE; }
76
+ get: function () { return chunkNMWKXAYA_cjs.SCENE3D_LAYOUT_REFERENCE_SCOPING_LINE; }
77
77
  });
78
78
  Object.defineProperty(exports, "SCENE3D_LAYOUT_SCOPING_FOR", {
79
79
  enumerable: true,
80
- get: function () { return chunkJKCR6WRZ_cjs.SCENE3D_LAYOUT_SCOPING_FOR; }
80
+ get: function () { return chunkNMWKXAYA_cjs.SCENE3D_LAYOUT_SCOPING_FOR; }
81
81
  });
82
82
  Object.defineProperty(exports, "SCENE3D_LAYOUT_SCOPING_IGNORE", {
83
83
  enumerable: true,
84
- get: function () { return chunkJKCR6WRZ_cjs.SCENE3D_LAYOUT_SCOPING_IGNORE; }
84
+ get: function () { return chunkNMWKXAYA_cjs.SCENE3D_LAYOUT_SCOPING_IGNORE; }
85
85
  });
86
86
  Object.defineProperty(exports, "SCENE3D_LAYOUT_SCOPING_LOOK_SOURCE", {
87
87
  enumerable: true,
88
- get: function () { return chunkJKCR6WRZ_cjs.SCENE3D_LAYOUT_SCOPING_LOOK_SOURCE; }
88
+ get: function () { return chunkNMWKXAYA_cjs.SCENE3D_LAYOUT_SCOPING_LOOK_SOURCE; }
89
89
  });
90
90
  Object.defineProperty(exports, "SCENE3D_LAYOUT_SCOPING_MARKER", {
91
91
  enumerable: true,
92
- get: function () { return chunkJKCR6WRZ_cjs.SCENE3D_LAYOUT_SCOPING_MARKER; }
92
+ get: function () { return chunkNMWKXAYA_cjs.SCENE3D_LAYOUT_SCOPING_MARKER; }
93
93
  });
94
94
  Object.defineProperty(exports, "SCENE3D_UNREFERENCED_FIGURES_WARNING_CODE", {
95
95
  enumerable: true,
96
- get: function () { return chunkJKCR6WRZ_cjs.SCENE3D_UNREFERENCED_FIGURES_WARNING_CODE; }
96
+ get: function () { return chunkNMWKXAYA_cjs.SCENE3D_UNREFERENCED_FIGURES_WARNING_CODE; }
97
97
  });
98
98
  Object.defineProperty(exports, "TEXT_WIZARD_CATEGORIES", {
99
99
  enumerable: true,
100
- get: function () { return chunkJKCR6WRZ_cjs.TEXT_WIZARD_CATEGORIES; }
100
+ get: function () { return chunkNMWKXAYA_cjs.TEXT_WIZARD_CATEGORIES; }
101
101
  });
102
102
  Object.defineProperty(exports, "VIDEO_WIZARD_CATEGORIES", {
103
103
  enumerable: true,
104
- get: function () { return chunkJKCR6WRZ_cjs.VIDEO_WIZARD_CATEGORIES; }
104
+ get: function () { return chunkNMWKXAYA_cjs.VIDEO_WIZARD_CATEGORIES; }
105
105
  });
106
106
  Object.defineProperty(exports, "appendScene3DStillScopingLines", {
107
107
  enumerable: true,
108
- get: function () { return chunkJKCR6WRZ_cjs.appendScene3DStillScopingLines; }
108
+ get: function () { return chunkNMWKXAYA_cjs.appendScene3DStillScopingLines; }
109
109
  });
110
110
  Object.defineProperty(exports, "buildAdCreativeAnalysisUserText", {
111
111
  enumerable: true,
112
- get: function () { return chunkJKCR6WRZ_cjs.buildAdCreativeAnalysisUserText; }
112
+ get: function () { return chunkNMWKXAYA_cjs.buildAdCreativeAnalysisUserText; }
113
113
  });
114
114
  Object.defineProperty(exports, "buildCharacterPrompt", {
115
115
  enumerable: true,
116
- get: function () { return chunkJKCR6WRZ_cjs.buildCharacterPrompt; }
116
+ get: function () { return chunkNMWKXAYA_cjs.buildCharacterPrompt; }
117
117
  });
118
118
  Object.defineProperty(exports, "buildCreaturePrompt", {
119
119
  enumerable: true,
120
- get: function () { return chunkJKCR6WRZ_cjs.buildCreaturePrompt; }
120
+ get: function () { return chunkNMWKXAYA_cjs.buildCreaturePrompt; }
121
121
  });
122
122
  Object.defineProperty(exports, "buildFaceTemplateInputs", {
123
123
  enumerable: true,
124
- get: function () { return chunkJKCR6WRZ_cjs.buildFaceTemplateInputs; }
124
+ get: function () { return chunkNMWKXAYA_cjs.buildFaceTemplateInputs; }
125
125
  });
126
126
  Object.defineProperty(exports, "buildLocationMotionPrompt", {
127
127
  enumerable: true,
128
- get: function () { return chunkJKCR6WRZ_cjs.buildLocationMotionPrompt; }
128
+ get: function () { return chunkNMWKXAYA_cjs.buildLocationMotionPrompt; }
129
129
  });
130
130
  Object.defineProperty(exports, "buildLocationPrompt", {
131
131
  enumerable: true,
132
- get: function () { return chunkJKCR6WRZ_cjs.buildLocationPrompt; }
132
+ get: function () { return chunkNMWKXAYA_cjs.buildLocationPrompt; }
133
133
  });
134
134
  Object.defineProperty(exports, "buildLocationRefinePrompt", {
135
135
  enumerable: true,
136
- get: function () { return chunkJKCR6WRZ_cjs.buildLocationRefinePrompt; }
136
+ get: function () { return chunkNMWKXAYA_cjs.buildLocationRefinePrompt; }
137
137
  });
138
138
  Object.defineProperty(exports, "buildMotionPrompt", {
139
139
  enumerable: true,
140
- get: function () { return chunkJKCR6WRZ_cjs.buildMotionPrompt; }
140
+ get: function () { return chunkNMWKXAYA_cjs.buildMotionPrompt; }
141
141
  });
142
142
  Object.defineProperty(exports, "buildObjectMotionPrompt", {
143
143
  enumerable: true,
144
- get: function () { return chunkJKCR6WRZ_cjs.buildObjectMotionPrompt; }
144
+ get: function () { return chunkNMWKXAYA_cjs.buildObjectMotionPrompt; }
145
145
  });
146
146
  Object.defineProperty(exports, "buildObjectPrompt", {
147
147
  enumerable: true,
148
- get: function () { return chunkJKCR6WRZ_cjs.buildObjectPrompt; }
148
+ get: function () { return chunkNMWKXAYA_cjs.buildObjectPrompt; }
149
149
  });
150
150
  Object.defineProperty(exports, "buildScene3DLayoutScopingLine", {
151
151
  enumerable: true,
152
- get: function () { return chunkJKCR6WRZ_cjs.buildScene3DLayoutScopingLine; }
152
+ get: function () { return chunkNMWKXAYA_cjs.buildScene3DLayoutScopingLine; }
153
153
  });
154
154
  Object.defineProperty(exports, "buildScene3DUnreferencedFiguresWarning", {
155
155
  enumerable: true,
156
- get: function () { return chunkJKCR6WRZ_cjs.buildScene3DUnreferencedFiguresWarning; }
156
+ get: function () { return chunkNMWKXAYA_cjs.buildScene3DUnreferencedFiguresWarning; }
157
157
  });
158
158
  Object.defineProperty(exports, "getCategoriesForNodeType", {
159
159
  enumerable: true,
160
- get: function () { return chunkJKCR6WRZ_cjs.getCategoriesForNodeType; }
160
+ get: function () { return chunkNMWKXAYA_cjs.getCategoriesForNodeType; }
161
161
  });
162
162
  Object.defineProperty(exports, "getPromptDoctrine", {
163
163
  enumerable: true,
164
- get: function () { return chunkJKCR6WRZ_cjs.getPromptDoctrine; }
164
+ get: function () { return chunkNMWKXAYA_cjs.getPromptDoctrine; }
165
165
  });
166
166
  Object.defineProperty(exports, "getPromptTips", {
167
167
  enumerable: true,
168
- get: function () { return chunkJKCR6WRZ_cjs.getPromptTips; }
168
+ get: function () { return chunkNMWKXAYA_cjs.getPromptTips; }
169
169
  });
170
170
  Object.defineProperty(exports, "hasScene3DLayoutScopingLine", {
171
171
  enumerable: true,
172
- get: function () { return chunkJKCR6WRZ_cjs.hasScene3DLayoutScopingLine; }
172
+ get: function () { return chunkNMWKXAYA_cjs.hasScene3DLayoutScopingLine; }
173
173
  });
174
174
  Object.defineProperty(exports, "isWizardSupported", {
175
175
  enumerable: true,
176
- get: function () { return chunkJKCR6WRZ_cjs.isWizardSupported; }
176
+ get: function () { return chunkNMWKXAYA_cjs.isWizardSupported; }
177
177
  });
178
178
  Object.defineProperty(exports, "ownMotionHint", {
179
179
  enumerable: true,
180
- get: function () { return chunkJKCR6WRZ_cjs.ownMotionHint; }
180
+ get: function () { return chunkNMWKXAYA_cjs.ownMotionHint; }
181
181
  });
182
182
  Object.defineProperty(exports, "renderScene3DLayoutScopingLine", {
183
183
  enumerable: true,
184
- get: function () { return chunkJKCR6WRZ_cjs.renderScene3DLayoutScopingLine; }
184
+ get: function () { return chunkNMWKXAYA_cjs.renderScene3DLayoutScopingLine; }
185
185
  });
186
186
  Object.defineProperty(exports, "scene3DLayoutVideoCaptions", {
187
187
  enumerable: true,
188
- get: function () { return chunkJKCR6WRZ_cjs.scene3DLayoutVideoCaptions; }
188
+ get: function () { return chunkNMWKXAYA_cjs.scene3DLayoutVideoCaptions; }
189
189
  });
190
190
  Object.defineProperty(exports, "CINEMATIC_LOOK_TAIL", {
191
191
  enumerable: true,
@@ -529,9 +529,9 @@ declare function getPromptTips(providerId: string): readonly string[];
529
529
  * the video node skills.
530
530
  *
531
531
  * Unlike the per-provider video doctrines, this is a PLATFORM mechanism: the
532
- * token grammar and expansion are Nodaro's own (`prompt-builder.ts` —
533
- * `IMAGE_TOKEN_PATTERN`, `expandImageRefTokens`), so there is one doctrine,
534
- * not one per model family.
532
+ * token grammar and expansion are Nodaro's own (`image-token-pattern.ts` —
533
+ * `IMAGE_TOKEN_PATTERN`; `prompt-builder.ts` — `expandImageRefTokens`), so
534
+ * there is one doctrine, not one per model family.
535
535
  *
536
536
  * Source of truth for the semantics documented here (verified 2026-08-25):
537
537
  * - `IMAGE_TOKEN_PATTERN` = `/\{image:(\d+)(?::([^}\n]+))?\}/gi`