@nodaro/shared 3.54.1 → 3.56.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 (195) hide show
  1. package/dist/{chunk-3CHOZ573.js → chunk-2AR3OXAA.js} +276 -17
  2. package/dist/chunk-2AR3OXAA.js.map +1 -0
  3. package/dist/{chunk-ZKHQSG76.js → chunk-2J6NTA5I.js} +4 -4
  4. package/dist/{chunk-ZKHQSG76.js.map → chunk-2J6NTA5I.js.map} +1 -1
  5. package/dist/{chunk-AGTCHDG5.cjs → chunk-33P5FI2U.cjs} +6 -6
  6. package/dist/{chunk-AGTCHDG5.cjs.map → chunk-33P5FI2U.cjs.map} +1 -1
  7. package/dist/{chunk-HG3KKCJJ.js → chunk-4JODLC2N.js} +3 -3
  8. package/dist/{chunk-HG3KKCJJ.js.map → chunk-4JODLC2N.js.map} +1 -1
  9. package/dist/{chunk-N3WL6IOJ.js → chunk-4O5STV7N.js} +55 -5
  10. package/dist/chunk-4O5STV7N.js.map +1 -0
  11. package/dist/chunk-4ONS6QRT.js +42 -0
  12. package/dist/chunk-4ONS6QRT.js.map +1 -0
  13. package/dist/{chunk-E4YES25K.js → chunk-55FQBILM.js} +4 -4
  14. package/dist/{chunk-E4YES25K.js.map → chunk-55FQBILM.js.map} +1 -1
  15. package/dist/{chunk-ZWB3NG4M.js → chunk-62ZQQA7L.js} +3 -3
  16. package/dist/{chunk-ZWB3NG4M.js.map → chunk-62ZQQA7L.js.map} +1 -1
  17. package/dist/{chunk-HEF4BIMA.js → chunk-6GGHM33Z.js} +4 -4
  18. package/dist/{chunk-HEF4BIMA.js.map → chunk-6GGHM33Z.js.map} +1 -1
  19. package/dist/{chunk-KMSEU6FK.js → chunk-7DGJDISO.js} +3 -3
  20. package/dist/{chunk-KMSEU6FK.js.map → chunk-7DGJDISO.js.map} +1 -1
  21. package/dist/{chunk-2OYV6K7D.cjs → chunk-7JM5EZF3.cjs} +13 -13
  22. package/dist/{chunk-2OYV6K7D.cjs.map → chunk-7JM5EZF3.cjs.map} +1 -1
  23. package/dist/{chunk-QP5JLSCJ.cjs → chunk-AFQFGZN7.cjs} +30 -3
  24. package/dist/chunk-AFQFGZN7.cjs.map +1 -0
  25. package/dist/chunk-AKDJKMAL.cjs +48 -0
  26. package/dist/chunk-AKDJKMAL.cjs.map +1 -0
  27. package/dist/{chunk-HZL7QMXK.js → chunk-AWS4BWEC.js} +7 -3
  28. package/dist/chunk-AWS4BWEC.js.map +1 -0
  29. package/dist/{chunk-5DVDHL7Y.js → chunk-AZDVL7IM.js} +20 -6
  30. package/dist/chunk-AZDVL7IM.js.map +1 -0
  31. package/dist/{chunk-2R74OU76.cjs → chunk-CGZLENU4.cjs} +276 -16
  32. package/dist/chunk-CGZLENU4.cjs.map +1 -0
  33. package/dist/{chunk-G7IUQKRU.cjs → chunk-CLKU3ZIU.cjs} +51 -51
  34. package/dist/{chunk-G7IUQKRU.cjs.map → chunk-CLKU3ZIU.cjs.map} +1 -1
  35. package/dist/{chunk-MCIBQ5BF.js → chunk-DURFRWAW.js} +9 -9
  36. package/dist/{chunk-MCIBQ5BF.js.map → chunk-DURFRWAW.js.map} +1 -1
  37. package/dist/{chunk-C5S75476.js → chunk-EAKO7PGC.js} +8 -4
  38. package/dist/{chunk-C5S75476.js.map → chunk-EAKO7PGC.js.map} +1 -1
  39. package/dist/{chunk-IPCWYKX5.cjs → chunk-EWARI452.cjs} +60 -46
  40. package/dist/chunk-EWARI452.cjs.map +1 -0
  41. package/dist/{chunk-C6IQCKJT.cjs → chunk-FCQYMPUQ.cjs} +4 -4
  42. package/dist/{chunk-C6IQCKJT.cjs.map → chunk-FCQYMPUQ.cjs.map} +1 -1
  43. package/dist/{chunk-CZCOL3M5.js → chunk-G4XWVWRI.js} +25 -4
  44. package/dist/chunk-G4XWVWRI.js.map +1 -0
  45. package/dist/{chunk-WVACGZYV.cjs → chunk-H7VMJBNZ.cjs} +8 -8
  46. package/dist/{chunk-WVACGZYV.cjs.map → chunk-H7VMJBNZ.cjs.map} +1 -1
  47. package/dist/{chunk-SEEQ3H22.cjs → chunk-HWJE4FNS.cjs} +59 -6
  48. package/dist/chunk-HWJE4FNS.cjs.map +1 -0
  49. package/dist/{chunk-3633VD2M.cjs → chunk-IKP4GOWZ.cjs} +8 -8
  50. package/dist/{chunk-3633VD2M.cjs.map → chunk-IKP4GOWZ.cjs.map} +1 -1
  51. package/dist/{chunk-5R6LTKE5.cjs → chunk-ILMHITHK.cjs} +5 -5
  52. package/dist/{chunk-5R6LTKE5.cjs.map → chunk-ILMHITHK.cjs.map} +1 -1
  53. package/dist/chunk-IOET54EV.js +39 -0
  54. package/dist/chunk-IOET54EV.js.map +1 -0
  55. package/dist/{chunk-ZAK276QF.js → chunk-JHTYULY2.js} +4 -4
  56. package/dist/{chunk-ZAK276QF.js.map → chunk-JHTYULY2.js.map} +1 -1
  57. package/dist/{chunk-OVIIJVXH.cjs → chunk-JO3XSUO2.cjs} +21 -21
  58. package/dist/{chunk-OVIIJVXH.cjs.map → chunk-JO3XSUO2.cjs.map} +1 -1
  59. package/dist/{chunk-UWMXMLMV.js → chunk-MROKQP4U.js} +3 -3
  60. package/dist/{chunk-UWMXMLMV.js.map → chunk-MROKQP4U.js.map} +1 -1
  61. package/dist/{chunk-J4CVGAAV.cjs → chunk-NZRG5CXQ.cjs} +7 -2
  62. package/dist/chunk-NZRG5CXQ.cjs.map +1 -0
  63. package/dist/{chunk-KM35K2M5.cjs → chunk-O7DXNX5J.cjs} +92 -25
  64. package/dist/chunk-O7DXNX5J.cjs.map +1 -0
  65. package/dist/chunk-OWNPYQSH.cjs +283 -0
  66. package/dist/chunk-OWNPYQSH.cjs.map +1 -0
  67. package/dist/{chunk-FIYVKW7F.cjs → chunk-PFXPAWPQ.cjs} +12 -12
  68. package/dist/{chunk-FIYVKW7F.cjs.map → chunk-PFXPAWPQ.cjs.map} +1 -1
  69. package/dist/chunk-QSWUSXRL.cjs +53 -0
  70. package/dist/chunk-QSWUSXRL.cjs.map +1 -0
  71. package/dist/{chunk-MGJR5OXO.js → chunk-RX7WII6I.js} +5 -5
  72. package/dist/{chunk-MGJR5OXO.js.map → chunk-RX7WII6I.js.map} +1 -1
  73. package/dist/chunk-S7FCFQ6X.js +255 -0
  74. package/dist/chunk-S7FCFQ6X.js.map +1 -0
  75. package/dist/{chunk-YBZQXZ6A.js → chunk-ST4WQ6ND.js} +68 -8
  76. package/dist/chunk-ST4WQ6ND.js.map +1 -0
  77. package/dist/{chunk-LKCPFD5X.js → chunk-SWVGHAYO.js} +5 -3
  78. package/dist/chunk-SWVGHAYO.js.map +1 -0
  79. package/dist/{chunk-MTUNORQB.cjs → chunk-TSKYEREJ.cjs} +11 -11
  80. package/dist/{chunk-MTUNORQB.cjs.map → chunk-TSKYEREJ.cjs.map} +1 -1
  81. package/dist/{chunk-LYWJAXPT.js → chunk-UMPZR56R.js} +3 -3
  82. package/dist/{chunk-LYWJAXPT.js.map → chunk-UMPZR56R.js.map} +1 -1
  83. package/dist/{chunk-6HUWQLF2.cjs → chunk-WKCFTWLO.cjs} +6 -6
  84. package/dist/{chunk-6HUWQLF2.cjs.map → chunk-WKCFTWLO.cjs.map} +1 -1
  85. package/dist/chunk-XPUGMYAJ.cjs +27 -0
  86. package/dist/{chunk-HD45Y7QU.cjs.map → chunk-XPUGMYAJ.cjs.map} +1 -1
  87. package/dist/{chunk-G5NTNQ7W.cjs → chunk-XROE3CAS.cjs} +5 -3
  88. package/dist/chunk-XROE3CAS.cjs.map +1 -0
  89. package/dist/{chunk-SZUDEFX2.cjs → chunk-ZXDH3L3P.cjs} +43 -39
  90. package/dist/{chunk-SZUDEFX2.cjs.map → chunk-ZXDH3L3P.cjs.map} +1 -1
  91. package/dist/{chunk-25KAGSPT.js → chunk-ZYITB47P.js} +3 -3
  92. package/dist/{chunk-25KAGSPT.js.map → chunk-ZYITB47P.js.map} +1 -1
  93. package/dist/entries/apps.cjs +43 -42
  94. package/dist/entries/apps.js +8 -7
  95. package/dist/entries/credits.cjs +151 -150
  96. package/dist/entries/credits.d.cts +4 -1
  97. package/dist/entries/credits.d.ts +4 -1
  98. package/dist/entries/credits.js +8 -7
  99. package/dist/entries/entities.cjs +125 -125
  100. package/dist/entries/entities.d.cts +1 -1
  101. package/dist/entries/entities.d.ts +1 -1
  102. package/dist/entries/entities.js +1 -1
  103. package/dist/entries/llm-models.d.cts +1 -1
  104. package/dist/entries/llm-models.d.ts +1 -1
  105. package/dist/entries/media.cjs +80 -56
  106. package/dist/entries/media.d.cts +49 -3
  107. package/dist/entries/media.d.ts +49 -3
  108. package/dist/entries/media.js +1 -1
  109. package/dist/entries/model-catalog.cjs +127 -66
  110. package/dist/entries/model-catalog.d.cts +61 -9
  111. package/dist/entries/model-catalog.d.ts +61 -9
  112. package/dist/entries/model-catalog.js +5 -4
  113. package/dist/entries/models.cjs +304 -276
  114. package/dist/entries/models.d.cts +3 -3
  115. package/dist/entries/models.d.ts +3 -3
  116. package/dist/entries/models.js +4 -4
  117. package/dist/entries/nodes.cjs +208 -207
  118. package/dist/entries/nodes.d.cts +1 -1
  119. package/dist/entries/nodes.d.ts +1 -1
  120. package/dist/entries/nodes.js +10 -9
  121. package/dist/entries/organizations.d.cts +9 -1
  122. package/dist/entries/organizations.d.ts +9 -1
  123. package/dist/entries/pipeline.cjs +161 -149
  124. package/dist/entries/pipeline.d.cts +165 -26
  125. package/dist/entries/pipeline.d.ts +165 -26
  126. package/dist/entries/pipeline.js +3 -3
  127. package/dist/entries/runtime-config.cjs +116 -0
  128. package/dist/entries/runtime-config.cjs.map +1 -0
  129. package/dist/entries/runtime-config.d.cts +308 -0
  130. package/dist/entries/runtime-config.d.ts +308 -0
  131. package/dist/entries/runtime-config.js +3 -0
  132. package/dist/entries/runtime-config.js.map +1 -0
  133. package/dist/entries/ugc.cjs +71 -71
  134. package/dist/entries/ugc.js +4 -4
  135. package/dist/entries/video.cjs +117 -117
  136. package/dist/entries/video.js +4 -4
  137. package/dist/entries/workflow.cjs +150 -146
  138. package/dist/entries/workflow.d.cts +8 -1
  139. package/dist/entries/workflow.d.ts +8 -1
  140. package/dist/entries/workflow.js +2 -2
  141. package/dist/index.cjs +3169 -2931
  142. package/dist/index.d.cts +7 -6
  143. package/dist/index.d.ts +7 -6
  144. package/dist/index.js +24 -22
  145. package/dist/{model-catalog-Dm2UiwUe.d.ts → model-catalog-vQ3NWn24.d.cts} +33 -2
  146. package/dist/{model-catalog-Dm2UiwUe.d.cts → model-catalog-vQ3NWn24.d.ts} +33 -2
  147. package/dist/{model-constants-DZUGVDOw.d.ts → model-constants-QZVHZX25.d.cts} +35 -6
  148. package/dist/{model-constants-DZUGVDOw.d.cts → model-constants-QZVHZX25.d.ts} +35 -6
  149. package/package.json +6 -1
  150. package/src/__tests__/fixtures/root-exports.baseline.json +2 -0
  151. package/src/__tests__/gpt-image-2-6.test.ts +277 -0
  152. package/src/__tests__/image-model-roles.test.ts +28 -9
  153. package/src/__tests__/runtime-config.test.ts +398 -0
  154. package/src/__tests__/video-face-mesh.test.ts +45 -2
  155. package/src/__tests__/voice-library-values.test.ts +24 -0
  156. package/src/credit-identifiers.ts +42 -0
  157. package/src/entries/model-catalog.ts +17 -0
  158. package/src/entries/models.ts +9 -0
  159. package/src/entries/runtime-config.ts +51 -0
  160. package/src/entries/workflow.ts +1 -1
  161. package/src/gpt-image-2-6.ts +104 -0
  162. package/src/i18n/style.ko.ts +2 -2
  163. package/src/i18n/style.pt-BR.ts +14 -14
  164. package/src/image-model-roles.ts +31 -10
  165. package/src/index.ts +1 -0
  166. package/src/model-catalog.ts +302 -14
  167. package/src/model-constants.ts +84 -3
  168. package/src/node-default-mappings.ts +4 -0
  169. package/src/node-refs.ts +11 -0
  170. package/src/organizations/views.ts +9 -1
  171. package/src/pipeline-types.ts +2 -0
  172. package/src/reference-board-templates.ts +2 -0
  173. package/src/runtime-config/contract.ts +492 -0
  174. package/src/runtime-config/worlds.ts +77 -0
  175. package/src/video-face-mesh.ts +72 -4
  176. package/src/voices.ts +175 -2
  177. package/dist/chunk-2R74OU76.cjs.map +0 -1
  178. package/dist/chunk-3CHOZ573.js.map +0 -1
  179. package/dist/chunk-5DVDHL7Y.js.map +0 -1
  180. package/dist/chunk-ATWLKUAI.cjs +0 -34
  181. package/dist/chunk-ATWLKUAI.cjs.map +0 -1
  182. package/dist/chunk-CZCOL3M5.js.map +0 -1
  183. package/dist/chunk-DUL5ZLTJ.js +0 -29
  184. package/dist/chunk-DUL5ZLTJ.js.map +0 -1
  185. package/dist/chunk-G5NTNQ7W.cjs.map +0 -1
  186. package/dist/chunk-HD45Y7QU.cjs +0 -27
  187. package/dist/chunk-HZL7QMXK.js.map +0 -1
  188. package/dist/chunk-IPCWYKX5.cjs.map +0 -1
  189. package/dist/chunk-J4CVGAAV.cjs.map +0 -1
  190. package/dist/chunk-KM35K2M5.cjs.map +0 -1
  191. package/dist/chunk-LKCPFD5X.js.map +0 -1
  192. package/dist/chunk-N3WL6IOJ.js.map +0 -1
  193. package/dist/chunk-QP5JLSCJ.cjs.map +0 -1
  194. package/dist/chunk-SEEQ3H22.cjs.map +0 -1
  195. package/dist/chunk-YBZQXZ6A.js.map +0 -1
@@ -0,0 +1,51 @@
1
+ /**
2
+ * `@nodaro/shared/runtime-config` — The deployment runtime config contract: `/config.js`'s keys and their shapes, a lenient parser, and the worlds a deployment can offer.
3
+ *
4
+ * One of the package's subpath entries (see `src/index.ts`). The root
5
+ * re-exports every entry, so each name here is also importable from
6
+ * `@nodaro/shared`.
7
+ */
8
+ export {
9
+ WORLD_IDS,
10
+ WORLD_REQUIRED_NODE_TYPES,
11
+ isWorldId,
12
+ worldAllowed,
13
+ orderWorlds,
14
+ type WorldId,
15
+ type SurfaceWorlds,
16
+ } from "../runtime-config/worlds.js"
17
+ export {
18
+ RUNTIME_CONFIG_GLOBAL,
19
+ RUNTIME_CONFIG_KEYS,
20
+ SURFACE_HEADER_MODES,
21
+ SURFACE_CATALOG_IMAGES,
22
+ RUNTIME_SURFACE_DEFAULT,
23
+ UI_STRING_PRODUCTS,
24
+ isSsoOnly,
25
+ surfaceRequiresSignIn,
26
+ isBrandLogoRef,
27
+ isSameSitePath,
28
+ isHttpsOrigin,
29
+ resolveRuntimeApiBase,
30
+ resolveRuntimeSupabaseUrl,
31
+ parseRuntimeSurface,
32
+ parseRuntimeStrings,
33
+ parseRuntimeConfig,
34
+ readRuntimeConfig,
35
+ surfaceStringOverride,
36
+ surfaceUnitLabel,
37
+ uiStringManifestFile,
38
+ uiStringPlaceholders,
39
+ buildUiStringManifest,
40
+ type UiStringManifest,
41
+ type RuntimeConfigKey,
42
+ type SurfaceHeaderMode,
43
+ type SurfaceCatalogImages,
44
+ type RuntimeSurfaceSibling,
45
+ type RuntimeSurfaceBrand,
46
+ type RuntimeSurfaceBilling,
47
+ type RuntimeSurfaceStrings,
48
+ type RuntimeSurface,
49
+ type UiStringProduct,
50
+ type NodaroRuntimeConfig,
51
+ } from "../runtime-config/contract.js"
@@ -142,7 +142,7 @@ export {
142
142
  export { VARIABLES_HANDLE_ID, buildConditionVariables } from "../condition-variables.js"
143
143
  export { extractAllGeneratedResults, extractGeneratedJsonAsList, spreadJsonArrayIfSingleton } from "../generated-results.js"
144
144
  export { resolveFieldMappings, resolveLocationFields, type FieldEdgeSource } from "../resolve-field-mappings.js"
145
- export { resolveNodeRefs, parseNodeRef, canonicalVarName, NODE_REF_PATTERN, RESERVED_TEMPLATE_VARS, extractReferencedLabels, combineSameLabelRefs, refHandleCategory, REF_HANDLE_CATEGORY, REFERENCE_HANDLE_MAP, referenceModalityForHandle, FRAME_TARGET_HANDLES, countRefModalityEdges, REF_TOKEN_NAMESPACE_PREFIXES, classifyRefToken, unresolvedRefTokens } from "../node-refs.js"
145
+ export { resolveNodeRefs, parseNodeRef, canonicalVarName, NODE_REF_PATTERN, RESERVED_TEMPLATE_VARS, extractReferencedLabels, combineSameLabelRefs, refHandleCategory, REF_HANDLE_CATEGORY, REFERENCE_HANDLE_MAP, referenceModalityForHandle, FRAME_TARGET_HANDLES, countImageInputEdges, countRefModalityEdges, REF_TOKEN_NAMESPACE_PREFIXES, classifyRefToken, unresolvedRefTokens } from "../node-refs.js"
146
146
  export type { RefCandidate, ReferenceModality, RefModalityEdge, RefTokenKind } from "../node-refs.js"
147
147
  export { resolveSourceThroughConnectedList } from "../list-source-resolver.js"
148
148
  export { zipMergeLists } from "../list-merge.js"
@@ -0,0 +1,104 @@
1
+ /**
2
+ * What makes GPT Image 2.6 Flare and Sunburst price differently from every
3
+ * other image model: a quality setting AND a size, and on an edit the number of
4
+ * input images as well. Economy is a flat price and is not listed here.
5
+ *
6
+ * Only the ids and levers live in this published package. The rates and the
7
+ * formula are `backend/src/ee/billing/gpt-image-2-6-pricing.ts`.
8
+ */
9
+
10
+ export const GPT_IMAGE_2_6_TIERED_T2I = ["gpt-image-2-6-flare", "gpt-image-2-6-sunburst"] as const
11
+ export const GPT_IMAGE_2_6_TIERED_I2I = ["gpt-image-2-6-flare-i2i", "gpt-image-2-6-sunburst-i2i"] as const
12
+ export type GptImage26TieredModel =
13
+ | (typeof GPT_IMAGE_2_6_TIERED_T2I)[number]
14
+ | (typeof GPT_IMAGE_2_6_TIERED_I2I)[number]
15
+
16
+ export const GPT_IMAGE_2_6_QUALITIES = ["auto", "low", "medium", "high", "xhigh", "max"] as const
17
+ export type GptImage26Quality = (typeof GPT_IMAGE_2_6_QUALITIES)[number]
18
+ /**
19
+ * The quality whose price is known only after the run: KIE picks the level. It
20
+ * is reserved at the Max row and settled on what KIE really billed; every other
21
+ * quality keeps its fixed row.
22
+ */
23
+ export const GPT_IMAGE_2_6_METERED_QUALITY: GptImage26Quality = "auto"
24
+ export const GPT_IMAGE_2_6_RESOLUTIONS = ["1K", "2K", "4K"] as const
25
+ export type GptImage26Resolution = (typeof GPT_IMAGE_2_6_RESOLUTIONS)[number]
26
+
27
+ export const GPT_IMAGE_2_6_DEFAULT_QUALITY: GptImage26Quality = "medium"
28
+ export const GPT_IMAGE_2_6_DEFAULT_RESOLUTION: GptImage26Resolution = "1K"
29
+ /** The most input images an edit is priced for (`REF_IMAGE_MAX_LIMITS`). */
30
+ export const GPT_IMAGE_2_6_MAX_INPUT_IMAGES = 16
31
+
32
+ export function isGptImage26I2i(model: string): boolean {
33
+ return (GPT_IMAGE_2_6_TIERED_I2I as readonly string[]).includes(model)
34
+ }
35
+
36
+ export function isGptImage26Tiered(model: string): model is GptImage26TieredModel {
37
+ return isGptImage26I2i(model) || (GPT_IMAGE_2_6_TIERED_T2I as readonly string[]).includes(model)
38
+ }
39
+
40
+ /** True for a run whose charge is settled on KIE's own bill: Flare or Sunburst at quality Auto. */
41
+ export function isGptImage26AutoRun(provider: unknown, quality: unknown): boolean {
42
+ return typeof provider === "string" && isGptImage26Tiered(provider) && quality === GPT_IMAGE_2_6_METERED_QUALITY
43
+ }
44
+
45
+ /**
46
+ * The images a Generate Image run sends to KIE on GPT Image 2.6: its references
47
+ * and, when it edits a base image, that image too (the worker puts it first,
48
+ * unless it is already one of the references). Any other model is priced on its
49
+ * references alone.
50
+ */
51
+ export function gptImage26SentImages(
52
+ provider: string | undefined,
53
+ references: readonly string[],
54
+ baseImageUrl: unknown,
55
+ ): number {
56
+ const countsBase =
57
+ provider !== undefined &&
58
+ isGptImage26Tiered(provider) &&
59
+ typeof baseImageUrl === "string" &&
60
+ baseImageUrl.length > 0 &&
61
+ !references.includes(baseImageUrl)
62
+ return references.length + (countsBase ? 1 : 0)
63
+ }
64
+
65
+ /**
66
+ * The most pictures a saved moodboard holds. A run sends them as references in
67
+ * the seats the node's own images leave free. An estimate cannot read the
68
+ * moodboard, so it counts this many.
69
+ */
70
+ export const GPT_IMAGE_2_6_MOODBOARD_MAX_IMAGES = 12
71
+
72
+ function namesMoodboard(direction: unknown): boolean {
73
+ if (direction === null || typeof direction !== "object") return false
74
+ const style = (direction as Record<string, unknown>).style
75
+ return (Array.isArray(style) ? style : [style]).some(
76
+ (value) => typeof value === "string" && value.startsWith("moodboard:"),
77
+ )
78
+ }
79
+
80
+ /**
81
+ * The input images a workflow estimate counts for one node on a model priced
82
+ * per input image: every list on the node, its source or base image, what is
83
+ * wired in, a moodboard its direction names, and an image-to-image model's own
84
+ * source. An estimate may over-quote, never under.
85
+ */
86
+ export function gptImage26EstimatedImages(
87
+ model: string,
88
+ data: Record<string, unknown>,
89
+ wiredImages: number,
90
+ ): number {
91
+ const listed = (v: unknown) => (Array.isArray(v) ? v.length : 0)
92
+ const single = (v: unknown) => (typeof v === "string" && v.length > 0 ? 1 : 0)
93
+ return (
94
+ listed(data.referenceImageUrls) +
95
+ listed(data.characterDefinitionIds) +
96
+ listed(data.extraRefs) +
97
+ single(data.referenceImageUrl) +
98
+ single(data.baseImageUrl) +
99
+ single(data.sourceImageUrl) +
100
+ wiredImages +
101
+ (namesMoodboard(data.direction) ? GPT_IMAGE_2_6_MOODBOARD_MAX_IMAGES : 0) +
102
+ (isGptImage26I2i(model) ? 1 : 0)
103
+ )
104
+ }
@@ -27,11 +27,11 @@ const map: LocaleCatalogMap = {
27
27
  "ink-wash": { label: "수묵화", description: "동아시아의 수묵화 붓 기법" },
28
28
  "isometric": { label: "아이소메트릭", description: "3/4 등각 투영 뷰" },
29
29
  "flat-vector": { label: "플랫 벡터", description: "모던한 플랫 일러스트레이션" },
30
- "ukiyo-e": { description: "일본 목판화 양식" },
30
+ "ukiyo-e": { label: "우키요에", description: "일본 목판화 양식" },
31
31
  "graffiti": { label: "그래피티", description: "스트리트 아트 스프레이 페인트" },
32
32
  "claymation": { label: "클레이메이션", description: "촉각적인 스톱모션 클레이" },
33
33
  "glitch-art": { label: "글리치 아트", description: "디지털 손상과 데이터모쉬" },
34
- "ascii-art": { description: "흑백 터미널 문자 아트" },
34
+ "ascii-art": { label: "아스키 아트", description: "흑백 터미널 문자 아트" },
35
35
  "blueprint": { label: "블루프린트", description: "푸른 바탕의 기술 도면" },
36
36
  "stained-glass": { label: "스테인드 글라스", description: "납으로 이은 색유리 모자이크" },
37
37
  "chalkboard": { label: "칠판", description: "칠판 위에 흰 분필로 그린 그림" },
@@ -2,37 +2,37 @@ import type { LocaleCatalogMap } from "./types.js"
2
2
 
3
3
  const map: LocaleCatalogMap = {
4
4
  "3d-render": { label: "Renderização 3D", description: "Renderização CGI moderna com sombreamento limpo" },
5
- "anime": { description: "Visual da animação japonesa" },
5
+ "anime": { label: "Anime", description: "Visual da animação japonesa" },
6
6
  "children-book": { label: "Livro infantil", description: "Livro de histórias ilustrado e aconchegante" },
7
7
  "cinematic": { label: "Cinematográfico", description: "Imagem dramática em qualidade de cinema" },
8
8
  "comic-book": { label: "Quadrinhos", description: "Quadros arte-finalizados com cores chapadas" },
9
9
  "digital-art": { label: "Arte digital", description: "Ilustração digital polida" },
10
10
  "fantasy": { label: "Fantasia", description: "Ilustração épica de alta fantasia" },
11
11
  "minimalist": { label: "Minimalista", description: "Formas simples, muito espaço em branco" },
12
- "noir": { description: "P&B noir de alto contraste" },
12
+ "noir": { label: "Noir", description: "P&B noir de alto contraste" },
13
13
  "oil-painting": { label: "Pintura a óleo", description: "Pinceladas grossas, tela clássica" },
14
14
  "pencil-sketch": { label: "Desenho a lápis", description: "Desenho a grafite feito à mão" },
15
15
  "photorealistic": { label: "Fotorrealista", description: "Indistinguível de uma fotografia" },
16
- "pixel-art": { description: "Grade de pixels retrô estilo videogame" },
17
- "pop-art": { description: "Cores ousadas, Warhol/Lichtenstein" },
16
+ "pixel-art": { label: "Pixel art", description: "Grade de pixels retrô estilo videogame" },
17
+ "pop-art": { label: "Pop art", description: "Cores ousadas, Warhol/Lichtenstein" },
18
18
  "retro-vintage": { label: "Retrô / vintage", description: "Look de filme nostálgico desbotado" },
19
19
  "watercolor": { label: "Aquarela", description: "Aguadas suaves e transparentes" },
20
- "concept-art": { description: "Pintura de pré-produção para cinema/jogos" },
20
+ "concept-art": { label: "Concept art", description: "Pintura de pré-produção para cinema/jogos" },
21
21
  "impressionism": { label: "Impressionismo", description: "Pinceladas estilo Monet" },
22
22
  "surrealism": { label: "Surrealismo", description: "Onírico, inspirado em Dalí" },
23
- "cyberpunk": { description: "Futuro distópico iluminado por neon" },
24
- "steampunk": { description: "Latão e maquinário vitorianos" },
25
- "vaporwave": { description: "Retrô digital pastel anos 80" },
26
- "low-poly": { description: "3D geométrico facetado" },
23
+ "cyberpunk": { label: "Cyberpunk", description: "Futuro distópico iluminado por neon" },
24
+ "steampunk": { label: "Steampunk", description: "Latão e maquinário vitorianos" },
25
+ "vaporwave": { label: "Vaporwave", description: "Retrô digital pastel anos 80" },
26
+ "low-poly": { label: "Low poly", description: "3D geométrico facetado" },
27
27
  "ink-wash": { label: "Aguada de nanquim", description: "Pincel sumi-e do Leste Asiático" },
28
28
  "isometric": { label: "Isométrico", description: "Vista 3/4 axonométrica" },
29
29
  "flat-vector": { label: "Vetor flat", description: "Ilustração flat moderna" },
30
- "ukiyo-e": { description: "Xilogravura tradicional japonesa" },
30
+ "ukiyo-e": { label: "Ukiyo-e", description: "Xilogravura tradicional japonesa" },
31
31
  "graffiti": { label: "Grafite", description: "Spray de arte de rua" },
32
- "claymation": { description: "Stop-motion tátil em massinha" },
33
- "glitch-art": { description: "Corrupção digital + datamosh" },
34
- "ascii-art": { description: "Caracteres monocromáticos de terminal" },
35
- "blueprint": { description: "Desenho técnico em fundo azul" },
32
+ "claymation": { label: "Animação em massinha", description: "Stop-motion tátil em massinha" },
33
+ "glitch-art": { label: "Glitch art", description: "Corrupção digital + datamosh" },
34
+ "ascii-art": { label: "Arte ASCII", description: "Caracteres monocromáticos de terminal" },
35
+ "blueprint": { label: "Planta técnica", description: "Desenho técnico em fundo azul" },
36
36
  "stained-glass": { label: "Vitral", description: "Mosaico de vidro colorido com chumbo" },
37
37
  "chalkboard": { label: "Quadro de giz", description: "Giz branco em ardósia" },
38
38
  "paper-cutout": { label: "Recorte de papel", description: "Papel recortado em camadas + sombras" },
@@ -12,19 +12,20 @@ import { MODEL_CATALOG } from "./model-catalog.js"
12
12
  * Decided on 2026-10-08 from a blind five-model comparison, quality
13
13
  * first and price second:
14
14
  * - characters, general text-to-image and video anchors on GPT Image 2;
15
- * - edits on GPT Image 2.5 Flare.
15
+ * - edits on the current GPT Image Flare (2.6 since 2026-11-09), which renders
16
+ * at its default Medium when a run names no quality.
16
17
  * With reference images attached, GPT Image 2 runs as its i2i sibling (the
17
18
  * provider swaps it), so `character` covers identity-from-reference too.
18
19
  *
19
20
  * Nano Banana Pro is no longer a default. It remains a FALLBACK only: last in
20
- * the ratio chain below (it is the one model here that draws 4:5 and 5:4), the
21
- * GPT-family safety-block retry, and the swimwear dressing model.
21
+ * the ratio chain below, the GPT-family safety-block retry, and the swimwear
22
+ * dressing model.
22
23
  */
23
24
  export const IMAGE_MODEL_ROLE_DEFAULTS = {
24
25
  character: "gpt-image-2",
25
26
  general: "gpt-image-2",
26
27
  anchor: "gpt-image-2",
27
- edit: "gpt-image-2-5-flare-i2i",
28
+ edit: "gpt-image-2-6-flare-i2i",
28
29
  } as const
29
30
 
30
31
  export type ImageModelRole = keyof typeof IMAGE_MODEL_ROLE_DEFAULTS
@@ -32,14 +33,15 @@ export type ImageModelRole = keyof typeof IMAGE_MODEL_ROLE_DEFAULTS
32
33
  /**
33
34
  * Where a role's model goes when it cannot draw the requested aspect ratio.
34
35
  * GPT Image 2 draws only auto / 1:1 / 16:9 / 9:16 / 4:3 / 3:4, so 21:9, 3:2,
35
- * 2:3 and the other wide or in-between ratios move to GPT Image 2.5 Sunburst,
36
- * and 4:5 / 5:4 (which neither GPT generation draws) to Nano Banana Pro.
36
+ * 2:3, 4:5, 5:4 and the other wide or in-between ratios move to GPT Image 2.6
37
+ * Sunburst. GPT Image 2.5 Sunburst stays behind it for the ratios only 2.5
38
+ * draws, and Nano Banana Pro comes last.
37
39
  */
38
40
  export const IMAGE_MODEL_RATIO_FALLBACKS: Readonly<Record<ImageModelRole, readonly string[]>> = {
39
- character: ["gpt-image-2-5-sunburst", "nano-banana-pro"],
40
- general: ["gpt-image-2-5-sunburst", "nano-banana-pro"],
41
- anchor: ["gpt-image-2-5-sunburst", "nano-banana-pro"],
42
- edit: ["gpt-image-2-5-sunburst-i2i", "nano-banana-pro"],
41
+ character: ["gpt-image-2-6-sunburst", "gpt-image-2-5-sunburst", "nano-banana-pro"],
42
+ general: ["gpt-image-2-6-sunburst", "gpt-image-2-5-sunburst", "nano-banana-pro"],
43
+ anchor: ["gpt-image-2-6-sunburst", "gpt-image-2-5-sunburst", "nano-banana-pro"],
44
+ edit: ["gpt-image-2-6-sunburst-i2i", "gpt-image-2-5-sunburst-i2i", "nano-banana-pro"],
43
45
  }
44
46
 
45
47
  /** True when the model's catalog entry lists the ratio (or no ratio was asked for). */
@@ -60,3 +62,22 @@ export function defaultImageModel(role: ImageModelRole, aspectRatio?: string | n
60
62
  if (imageModelDrawsRatio(primary, aspectRatio)) return primary
61
63
  return IMAGE_MODEL_RATIO_FALLBACKS[role].find((id) => imageModelDrawsRatio(id, aspectRatio)) ?? primary
62
64
  }
65
+
66
+ /**
67
+ * The model an image node that names none runs on, by node type: the same
68
+ * default its route and its workflow branch apply. For the node types that
69
+ * have one; undefined for any other.
70
+ */
71
+ export function defaultImageModelForNode(nodeType: string, aspectRatio?: string | null): string | undefined {
72
+ switch (nodeType) {
73
+ case "generate-image":
74
+ return defaultImageModel("general", aspectRatio)
75
+ case "image-to-image":
76
+ case "modify-image":
77
+ return defaultImageModel("edit", aspectRatio)
78
+ case "reference-board":
79
+ return defaultImageModel("character", aspectRatio)
80
+ default:
81
+ return undefined
82
+ }
83
+ }
package/src/index.ts CHANGED
@@ -17,6 +17,7 @@ export * from "./entries/models.js"
17
17
  export * from "./entries/nodes.js"
18
18
  export * from "./entries/organizations.js"
19
19
  export * from "./entries/pipeline.js"
20
+ export * from "./entries/runtime-config.js"
20
21
  export * from "./entries/scene3d.js"
21
22
  export * from "./entries/social.js"
22
23
  export * from "./entries/types.js"