@nodaro/prompts 1.2.0 → 1.2.1
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.2.
|
|
3
|
+
"version": "1.2.1",
|
|
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",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
import { describe, it, expect } from "vitest"
|
|
25
|
-
import { PARAMETER_NODE_TYPES, getParameterValue } from "@nodaro/shared"
|
|
25
|
+
import { PARAMETER_NODE_TYPES, HINT_EXEMPT_PARAMETER_TYPES, getParameterValue } from "@nodaro/shared"
|
|
26
26
|
import { getParameterPromptHint } from "../parameter-prompt-hint.js"
|
|
27
27
|
|
|
28
28
|
// Catalog-driven types need real ids — the prompt-hint builders look them up.
|
|
@@ -155,16 +155,11 @@ const SAMPLE_DATA_BY_TYPE: Record<string, Record<string, unknown>> = {
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
// Types that intentionally do NOT inject a prompt hint via
|
|
158
|
-
// getParameterPromptHint.
|
|
159
|
-
//
|
|
160
|
-
//
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
"style-guide",
|
|
164
|
-
"scene-count",
|
|
165
|
-
"duration",
|
|
166
|
-
"aspect-ratio",
|
|
167
|
-
])
|
|
158
|
+
// getParameterPromptHint. Canonical set lives in @nodaro/shared next to
|
|
159
|
+
// PARAMETER_NODE_TYPES — Test 4 below keeps it honest by asserting each
|
|
160
|
+
// member REALLY returns "" (so a type can't be quietly exempted to dodge a
|
|
161
|
+
// missing-case failure).
|
|
162
|
+
const HINT_EXEMPT = HINT_EXEMPT_PARAMETER_TYPES
|
|
168
163
|
|
|
169
164
|
// =============================================================================
|
|
170
165
|
// Test 1 — every type in the set has a sample (forces the developer who adds
|
|
@@ -273,6 +273,12 @@ export function getParameterPromptHint(
|
|
|
273
273
|
|
|
274
274
|
case "tone":
|
|
275
275
|
return asStr(data.tone).trim()
|
|
276
|
+
case "style-guide":
|
|
277
|
+
// The node's whole purpose is injecting its style text into consumer
|
|
278
|
+
// prompts; without this case, {Style Guide} refs stayed as literal
|
|
279
|
+
// brace text and direct wires injected nothing (only fieldMappings
|
|
280
|
+
// worked, via getParameterValue).
|
|
281
|
+
return asStr(data.text).trim()
|
|
276
282
|
case "text-prompt":
|
|
277
283
|
return asStr(data.text).trim()
|
|
278
284
|
default:
|