@nodaro/prompts 1.32.0 → 1.34.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/index.cjs +8 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -7
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/factory-presets.test.ts +4 -4
- package/src/__tests__/node-send-text.test.ts +9 -0
- package/src/factory-presets/generate-image.ts +6 -5
- package/src/node-send-text.ts +7 -2
- package/src/prompt-wizard-categories.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nodaro/prompts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.34.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",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"test": "vitest run"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@nodaro/shared": "^3.
|
|
23
|
+
"@nodaro/shared": "^3.25.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"tsup": "^8.5.0",
|
|
@@ -234,20 +234,20 @@ describe("generate-image factory preset data validity", () => {
|
|
|
234
234
|
}
|
|
235
235
|
})
|
|
236
236
|
|
|
237
|
-
it("includes the Cast & Consistency grids on nano-banana-2", () => {
|
|
238
|
-
// Grids are FED BACK as identity references — they ride
|
|
237
|
+
it("includes the Cast & Consistency grids on nano-banana-2-1", () => {
|
|
238
|
+
// Grids are FED BACK as identity references — they ride Nano Banana 2.1
|
|
239
239
|
// (cheap, consistency-strong) at 4K so reused panel faces stay sharp.
|
|
240
240
|
for (const id of ["generate-image/character-reference-grid", "generate-image/cast-mega-grid"]) {
|
|
241
241
|
const g = presets.find((p) => p.id === id)
|
|
242
242
|
expect(g, `${id} missing`).toBeTruthy()
|
|
243
243
|
expect(g!.group).toBe("Cast & Consistency")
|
|
244
|
-
expect(g!.data.provider).toBe("nano-banana-2")
|
|
244
|
+
expect(g!.data.provider).toBe("nano-banana-2-1")
|
|
245
245
|
expect(g!.data.aspectRatio).toBe("3:4")
|
|
246
246
|
expect(g!.data.resolution).toBe("4K")
|
|
247
247
|
}
|
|
248
248
|
const scene = presets.find((p) => p.id === "generate-image/cast-scene")
|
|
249
249
|
expect(scene?.group).toBe("Cast & Consistency")
|
|
250
|
-
expect(scene?.data.provider).toBe("nano-banana-2")
|
|
250
|
+
expect(scene?.data.provider).toBe("nano-banana-2-1")
|
|
251
251
|
})
|
|
252
252
|
|
|
253
253
|
it("ships the Handmade & Stop-Motion family with the in-prompt NOT-digital-CG clause", () => {
|
|
@@ -64,6 +64,15 @@ describe("computeNodeSendText", () => {
|
|
|
64
64
|
expect(computeNodeSendText("collection-write", {}, { override: "row 3", wired: "the wire", refMap })).toBe("row 3")
|
|
65
65
|
})
|
|
66
66
|
|
|
67
|
+
it("collection-write: a typed field counts with its {Node} references resolved, as the engines send it (#1890)", () => {
|
|
68
|
+
const empty = new Map<string, string>()
|
|
69
|
+
// A feed with nothing new: an empty fallback is nothing to save, so the node skips.
|
|
70
|
+
expect(computeNodeSendText("collection-write", { title: "{Feed || }" }, { wired: "", refMap: empty })).toBe("")
|
|
71
|
+
expect(computeNodeSendText("collection-write", { title: "{Feed || untitled}" }, { wired: "", refMap: empty })).toBe("untitled")
|
|
72
|
+
expect(computeNodeSendText("collection-write", { title: "Breaking: {Feed}" }, { wired: "", refMap: new Map([["feed", "Telegram turns ten"]]) }))
|
|
73
|
+
.toBe("Breaking: Telegram turns ten")
|
|
74
|
+
})
|
|
75
|
+
|
|
67
76
|
it("prompt pre/post text never counts as something to send: an empty core with a prefix is nothing", () => {
|
|
68
77
|
const refMap = new Map<string, string>()
|
|
69
78
|
const affixed = { userInput: "", promptPrefix: "Write a news item about:", promptSuffix: "Keep it short." }
|
|
@@ -171,15 +171,16 @@ export const GENERATE_IMAGE_PRESETS: readonly FactoryPreset[] = [
|
|
|
171
171
|
// ── Cast & Consistency (clean grids per the multi-character workflow:
|
|
172
172
|
// sterile neutral-background reference grids built to be FED BACK as identity
|
|
173
173
|
// anchors — unlike the editorial boards above, decoration here is noise.
|
|
174
|
-
//
|
|
175
|
-
//
|
|
174
|
+
// Nano Banana 2.1 (decided 2026-10-08 — it replaced Nano Banana 2, which the
|
|
175
|
+
// source guide recommended: cheaper/faster per attempt with strong practical
|
|
176
|
+
// consistency); 4K so panel faces stay sharp when reused as refs.) ──
|
|
176
177
|
{
|
|
177
178
|
id: "generate-image/character-reference-grid",
|
|
178
179
|
name: "Character Reference Grid",
|
|
179
180
|
description: "Connect a photo → clean 4-angle identity grid (no decorations) — the strongest consistency anchor.",
|
|
180
181
|
group: "Cast & Consistency",
|
|
181
182
|
data: {
|
|
182
|
-
provider: "nano-banana-2",
|
|
183
|
+
provider: "nano-banana-2-1",
|
|
183
184
|
aspectRatio: "3:4",
|
|
184
185
|
resolution: "4K",
|
|
185
186
|
promptPrefix: `Create a clean character reference grid using the attached photo of the person as the single source of truth for face, hair, eyes, skin tone, build and outfit. Four equal panels arranged in a tidy two-by-two grid on a single seamless neutral light-grey studio background: a tight front-facing portrait close-up, a 3/4-view portrait, a full-body shot from the front in a relaxed neutral stance, and a full-body shot from the back. The SAME person in every panel — identical age, features, hairstyle and outfit from the attached photo. Identical soft, even studio lighting in all four panels with no dramatic shadows. No decorations, no background props, no text, no UI elements — a sterile, production-neutral reference sheet built to be reused as an identity reference in later generations.`,
|
|
@@ -194,7 +195,7 @@ export const GENERATE_IMAGE_PRESETS: readonly FactoryPreset[] = [
|
|
|
194
195
|
description: "Connect 2–4 character refs → one labeled cast sheet; then reference cast members by name in scenes.",
|
|
195
196
|
group: "Cast & Consistency",
|
|
196
197
|
data: {
|
|
197
|
-
provider: "nano-banana-2",
|
|
198
|
+
provider: "nano-banana-2-1",
|
|
198
199
|
aspectRatio: "3:4",
|
|
199
200
|
resolution: "4K",
|
|
200
201
|
prompt: `Create a clean multi-character cast reference sheet composed as horizontal strips stacked vertically in one image — one strip per character from the attached reference images, in the order they are attached, using exactly as many strips as there are attached characters. Each strip shows that character in four aligned studio panels: tight front portrait close-up · 3/4 portrait · full body front · full body back, all in a relaxed neutral stance. Label each strip on the left edge with the character's name in clean bold lettering: {character names || ALEX · MAYA · SAM}. Every character must match their attached reference exactly — same face, hair, skin tone, build and outfit — with no identity blending between rows. Single seamless neutral light-grey studio background across the whole sheet, identical soft even lighting in every panel, consistent panel sizing and alignment. No decorations, no props, no UI elements beyond the row name labels. A sterile production casting sheet built to be reused as the single identity reference for this cast in later generations. Photorealistic, sharp focus, natural skin texture, true-to-life color.`,
|
|
@@ -208,7 +209,7 @@ export const GENERATE_IMAGE_PRESETS: readonly FactoryPreset[] = [
|
|
|
208
209
|
description: "Connect a cast grid → stage a scene naming the characters; never re-describe their looks.",
|
|
209
210
|
group: "Cast & Consistency",
|
|
210
211
|
data: {
|
|
211
|
-
provider: "nano-banana-2",
|
|
212
|
+
provider: "nano-banana-2-1",
|
|
212
213
|
aspectRatio: "16:9",
|
|
213
214
|
resolution: "2K",
|
|
214
215
|
prompt: `Using the attached character reference sheet as the single source of truth for every named character's face, hair, build and outfit, generate one photorealistic scene: {scene || ALEX and MAYA share a quiet laugh at the counter of a sunlit ramen bar while SAM studies the menu}. Refer to the characters ONLY by the names labeled on the reference sheet and keep each one perfectly consistent with their reference row — do not invent new physical traits, do not blend identities, and do not alter outfits unless the scene says so. Stage them naturally in the environment with believable eye-lines, interactions and spacing. Cinematic photography, 35mm lens look with gentle depth of field, soft motivated lighting that matches the location, cohesive filmic color grade, natural skin texture, sharp detail on every character.`,
|
package/src/node-send-text.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SOCIAL_POST_NODE_TYPES } from "@nodaro/shared"
|
|
1
|
+
import { resolveNodeRefs, SOCIAL_POST_NODE_TYPES } from "@nodaro/shared"
|
|
2
2
|
import { computeLlmChatFields, computeNodePrompt, computeScriptTopic } from "./resolve-prompt.js"
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -111,7 +111,12 @@ export function computeNodeSendText(
|
|
|
111
111
|
// else a title, text or link typed on the node. A picture alone is a
|
|
112
112
|
// record too, but it never starves the node: only a wired TEXT input that
|
|
113
113
|
// produced nothing can (the skip rule's precondition).
|
|
114
|
-
|
|
114
|
+
// A typed field counts as the engines send it, its `{Node}` references
|
|
115
|
+
// resolved: `{Feed || }` over a feed with nothing new is empty, so the
|
|
116
|
+
// node skips instead of failing with an empty record (#1890).
|
|
117
|
+
const typed = [data.title, data.text, data.link]
|
|
118
|
+
.map((v) => (typeof v === "string" ? resolveNodeRefs(v, args.refMap) : v))
|
|
119
|
+
.find((v): v is string => present(v as string | undefined))
|
|
115
120
|
return [args.override, args.wired, typed].find(present) ?? ""
|
|
116
121
|
}
|
|
117
122
|
default:
|
|
@@ -162,6 +162,7 @@ export const PROVIDER_CAPABILITIES: Record<string, Record<string, string>> = {
|
|
|
162
162
|
"nano-banana": "Fast generation, style flexibility, reference image support",
|
|
163
163
|
"nano-banana-pro": "Higher quality Nano Banana with better detail",
|
|
164
164
|
"nano-banana-2": "Latest Nano Banana with resolution options (1K/2K/4K)",
|
|
165
|
+
"nano-banana-2-1": "Nano Banana 2.1 — sharper quality, prompt adherence, character consistency and text rendering, 1K/2K/4K",
|
|
165
166
|
"nano-banana-2-lite": "Fast, low-cost 1K generation for drafts and iteration",
|
|
166
167
|
"gpt-image": "Creative concepts, illustration, variable quality tiers",
|
|
167
168
|
"gpt-image-2": "Latest GPT Image — sharp text, photorealism, 1K/2K/4K resolution",
|