@nodaro/prompts 1.55.0 → 1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodaro/prompts",
3
- "version": "1.55.0",
3
+ "version": "1.56.0",
4
4
  "description": "Nodaro's prompt-engineering layer — person/picker catalogs with prompt hints, identity-lock clauses, entity prompt builders, brand presets, and prompt/reference assembly shared by the Nodaro platform and SDK.",
5
5
  "type": "module",
6
6
  "license": "FSL-1.1-Apache-2.0",
@@ -70,7 +70,7 @@
70
70
  "test": "vitest run"
71
71
  },
72
72
  "dependencies": {
73
- "@nodaro/shared": "^3.63.0"
73
+ "@nodaro/shared": "^3.64.0"
74
74
  },
75
75
  "devDependencies": {
76
76
  "tsup": "^8.5.0",
@@ -171,3 +171,27 @@ describe("styleReferences — fill the free seats, after the caller's own", () =
171
171
  expect(() => assembleImageInput({ userPrompt: "", provider: "nano-banana-pro", throwOnEmpty: true })).toThrow(/No prompt/)
172
172
  })
173
173
  })
174
+
175
+ describe("styleReferences — a seat another image of the run takes (`reservedImageSeats`)", () => {
176
+ it("fills one seat fewer when a base image takes one, so the run never goes past the model's limit", () => {
177
+ const cap = imageReferenceLimit("flux-3-klein")
178
+ const reserved = assembleImageInput({
179
+ userPrompt: "a cat",
180
+ provider: "flux-3-klein",
181
+ extraReferenceImageUrls: flat(2),
182
+ styleReferences: style(cap),
183
+ reservedImageSeats: 1,
184
+ })
185
+ expect(reserved.referenceImageUrls).toHaveLength(cap - 1)
186
+ expect(reserved.styleReferencesSent).toBe(cap - 3)
187
+ })
188
+
189
+ it("never removes the caller's own references, and 0 changes nothing", () => {
190
+ const cap = imageReferenceLimit("flux-3-klein")
191
+ const full = assembleImageInput({ userPrompt: "a cat", provider: "flux-3-klein", extraReferenceImageUrls: flat(cap), styleReferences: style(3), reservedImageSeats: 1 })
192
+ expect(full.referenceImageUrls).toEqual(flat(cap))
193
+ expect(full.styleReferencesSent).toBe(0)
194
+ const input = { userPrompt: "a cat", provider: "nano-banana-pro", extraReferenceImageUrls: flat(2), styleReferences: style(3) }
195
+ expect(assembleImageInput({ ...input, reservedImageSeats: 0 })).toEqual(assembleImageInput(input))
196
+ })
197
+ })
@@ -59,3 +59,34 @@ describe("Kling 4 extend shared wiring", () => {
59
59
  expect(PROVIDER_CAPABILITIES["extend-video"]!["kling-4-extend"]).toMatch(/ANY video.*Kling 4/i)
60
60
  })
61
61
  })
62
+
63
+ describe("PixVerse V6 extend shared wiring", () => {
64
+ it("is a registered extend provider with its own window and qualities", () => {
65
+ expect(EXTEND_VIDEO_PROVIDERS).toContain("pixverse-v6-extend")
66
+ const m = MODEL_CATALOG["pixverse-v6-extend"]!
67
+ expect(m.modes).toEqual(["extend"])
68
+ expect(m.family).toBe("PixVerse")
69
+ expect(m.durations).toEqual([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])
70
+ expect(m.resolutions).toEqual(["360p", "540p", "720p", "1080p"])
71
+ })
72
+
73
+ it("is advertised to the wizard's extend-video capabilities", () => {
74
+ expect(PROVIDER_CAPABILITIES["extend-video"]!["pixverse-v6-extend"]).toMatch(/ANY video.*PixVerse V6/i)
75
+ })
76
+ })
77
+
78
+ describe("Grok extend shared wiring", () => {
79
+ it("is a registered extend provider adding 6 or 10 s, with no resolution lever (the source's is used)", () => {
80
+ expect(EXTEND_VIDEO_PROVIDERS).toContain("grok-extend")
81
+ const m = MODEL_CATALOG["grok-extend"]!
82
+ expect(m.modes).toEqual(["extend"])
83
+ expect(m.family).toBe("xAI")
84
+ expect(m.durations).toEqual([6, 10])
85
+ expect(m.resolutions).toBeUndefined()
86
+ })
87
+
88
+ it("is advertised to the wizard's extend-video capabilities, as extending Grok Imagine videos only", () => {
89
+ expect(PROVIDER_CAPABILITIES["extend-video"]!["grok-extend"]).toMatch(/Grok Imagine video.*Grok/i)
90
+ expect(PROVIDER_CAPABILITIES["extend-video"]!["grok-extend"]).not.toMatch(/ANY video/i)
91
+ })
92
+ })
@@ -131,6 +131,14 @@ export interface AssembleImageInput {
131
131
  * many went. Each carries a short style line (`styleReferenceDescription`).
132
132
  */
133
133
  styleReferences?: readonly StyleReferenceInput[]
134
+ /**
135
+ * Seats of the model's reference limit that another image the run sends
136
+ * takes, outside this assembly: a base image the job sends first, on a model
137
+ * that counts it against the same limit (FLUX 3 Klein). Style references fill
138
+ * only the seats left after them, so the platform never adds an image the
139
+ * model cannot take. 0 (the default) changes nothing.
140
+ */
141
+ reservedImageSeats?: number
134
142
  /**
135
143
  * Flat subject ids (Person / Styling / props) → folded into the prompt AHEAD
136
144
  * of the direction clauses: the subject is the noun phrase the cinematography
@@ -367,7 +375,9 @@ function fillStyleReferences(
367
375
  ): AssembleImageResult {
368
376
  const base = assembleOnce(input)
369
377
  const own = base.referenceImageUrls ?? []
370
- const seats = imageReferenceLimit(input.provider) - own.length
378
+ const asked = Number(input.reservedImageSeats ?? 0)
379
+ const reserved = Number.isFinite(asked) ? Math.max(0, Math.trunc(asked)) : 0
380
+ const seats = imageReferenceLimit(input.provider) - own.length - reserved
371
381
  const seen = new Set(own)
372
382
  const candidates: StyleReferenceInput[] = []
373
383
  for (const s of style) {
@@ -188,6 +188,7 @@ export const PROVIDER_CAPABILITIES: Record<string, Record<string, string>> = {
188
188
  "wan-2.7": "Wan 2.7 T2I — 1K/2K/4K, up to 9 ref images",
189
189
  "wan-2.7-pro": "Wan 2.7 Pro T2I — higher quality, 1K/2K/4K",
190
190
  "flux-2-klein": "Open Flux 2 9B via Replicate — fast",
191
+ "flux-3-klein": "FLUX 3 Klein — the light FLUX 3 model: fast and low cost, 1K/2K/4K; edits from up to 10 references at the same price",
191
192
  "flux-2-pro": "BFL Flux 2 Pro via Replicate — flagship quality",
192
193
  "flux-2-max": "BFL Flux 2 Max via Replicate — even larger than Pro, up to 8 refs (variable pricing)",
193
194
  },
@@ -214,6 +215,7 @@ export const PROVIDER_CAPABILITIES: Record<string, Record<string, string>> = {
214
215
  "seedream-5-flash-i2i": "Fast, low-cost Seedream edits — up to 10 input images",
215
216
  "minimax-h3-image-i2i": "MiniMax H3 edits — up to 16 reference images in one edit, readable text, up to 4K",
216
217
  "seedream-5-5-i2i": "Seedream 5.5 edits — round after round, the rest of the picture untouched; up to 10 input images",
218
+ "flux-3-klein-i2i": "FLUX 3 Klein edits — fast, low-cost changes from up to 10 reference images, which cost nothing extra; 1K/2K/4K",
217
219
  "flux-kontext": "Character-consistent edits with reference awareness",
218
220
  "flux-kontext-max": "Premium character-consistent editing",
219
221
  "kontext-multi": "Multi-image Kontext via Replicate — up to 4 refs",
@@ -244,6 +246,7 @@ export const PROVIDER_CAPABILITIES: Record<string, Record<string, string>> = {
244
246
  "seedream-5-flash-i2i": "Fast, low-cost Seedream edits — up to 10 input images",
245
247
  "minimax-h3-image-i2i": "MiniMax H3 edits — up to 16 reference images in one edit, readable text, up to 4K",
246
248
  "seedream-5-5-i2i": "Seedream 5.5 edits — round after round, the rest of the picture untouched; up to 10 input images",
249
+ "flux-3-klein-i2i": "FLUX 3 Klein edits — fast, low-cost changes from up to 10 reference images, which cost nothing extra; 1K/2K/4K",
247
250
  "flux-kontext": "Character-consistent edits with reference awareness",
248
251
  "flux-kontext-max": "Premium character-consistent editing",
249
252
  "kontext-multi": "Multi-image Kontext via Replicate — up to 4 refs",
@@ -348,6 +351,8 @@ export const PROVIDER_CAPABILITIES: Record<string, Record<string, string>> = {
348
351
  "seedance-2-5-extend": "Extend ANY video by URL — seamless trim-stitched continuation with audio, 4–30s added (Seedance 2.5)",
349
352
  "seedance-2-0-extend": "Extend ANY video by URL — seamless trim-stitched continuation with audio, 4–15s added (Seedance 2.0)",
350
353
  "kling-4-extend": "Extend ANY video by URL — seamless trim-stitched continuation with audio, 3–30s added (Kling 4)",
354
+ "pixverse-v6-extend": "Extend ANY video by URL — native continuation with optional sound, 1–15s added at 360p–1080p, joined onto the original clip (PixVerse V6)",
355
+ "grok-extend": "Extend a Grok Imagine video made here (by its task id) — native continuation with sound, 6 or 10s added at the video's own resolution (Grok)",
351
356
  },
352
357
  "speech-to-video": {
353
358
  "wan-speech": "Wan 2.2 speech-driven video generation",