@nodaro/prompts 1.11.0 → 1.13.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 +627 -177
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +726 -33
- package/dist/index.d.ts +726 -33
- package/dist/index.js +598 -179
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/__snapshots__/entity-convergence-image.test.ts.snap +19 -0
- package/src/__tests__/animal-getters-parity.test.ts +82 -0
- package/src/__tests__/assemble-image-input-cap.test.ts +236 -0
- package/src/__tests__/assemble-image-input.test.ts +100 -19
- package/src/__tests__/assemble-video-input-cap.test.ts +442 -0
- package/src/__tests__/assemble-video-input.test.ts +167 -33
- package/src/__tests__/direction-hint-token-safety.test.ts +21 -0
- package/src/__tests__/entity-convergence-image.test.ts +374 -0
- package/src/__tests__/location-convergence-image.test.ts +29 -1
- package/src/__tests__/location-default-role-image.test.ts +166 -0
- package/src/__tests__/mention-splice-spacing.test.ts +257 -0
- package/src/__tests__/prompt-style-section.test.ts +345 -0
- package/src/__tests__/read-node-subject.test.ts +140 -0
- package/src/__tests__/style-section-boundary.test.ts +179 -0
- package/src/__tests__/subject-fold.test.ts +251 -0
- package/src/__tests__/subject-registry.test.ts +312 -0
- package/src/assemble-image-input.ts +169 -41
- package/src/assemble-video-input.ts +200 -25
- package/src/direction-registry.ts +116 -28
- package/src/hint-shedding.ts +87 -0
- package/src/index.ts +3 -0
- package/src/parameter-prompt-hint.ts +8 -7
- package/src/picker-catalogs.ts +14 -7
- package/src/prompt-builder.ts +628 -88
- package/src/prompt-hint-join.ts +9 -0
- package/src/prompt-style-section.ts +256 -0
- package/src/read-node-direction.ts +60 -1
- package/src/subject-registry.ts +464 -0
- package/src/video-reference-resolver.ts +5 -2
package/dist/index.d.ts
CHANGED
|
@@ -896,6 +896,28 @@ interface BuildImagePromptSegmentsResult extends BuildImagePromptResult {
|
|
|
896
896
|
* origin-tagged decomposition.
|
|
897
897
|
*/
|
|
898
898
|
declare function buildImagePrompt(config: BuildImagePromptConfig): BuildImagePromptResult;
|
|
899
|
+
/** {@link buildImagePrompt} plus `overflowChars`. */
|
|
900
|
+
interface BuildImagePromptOverflowResult extends BuildImagePromptResult {
|
|
901
|
+
/**
|
|
902
|
+
* Characters the provider's prompt cap forced off the tail — `0` when the
|
|
903
|
+
* assembled prompt fit. This is the amount of text that must LEAVE the body
|
|
904
|
+
* for the prompt to fit without a tail cut, so a caller can shed exactly
|
|
905
|
+
* enough of its own droppable text and re-assemble.
|
|
906
|
+
*/
|
|
907
|
+
overflowChars: number;
|
|
908
|
+
}
|
|
909
|
+
/**
|
|
910
|
+
* `buildImagePrompt` plus the size of the cap overflow it had to clamp away.
|
|
911
|
+
*
|
|
912
|
+
* The prompt (and every other field) is BYTE-IDENTICAL to `buildImagePrompt` —
|
|
913
|
+
* the marks channel only observes. Exists because the tail clamp is ORDER-BLIND:
|
|
914
|
+
* it cuts whatever happens to be last, which on a low-cap provider can sever a
|
|
915
|
+
* reference directive or the user's own prose while a decorative hint clause
|
|
916
|
+
* survives. `assembleImageInput` uses this to drop its lowest-value text
|
|
917
|
+
* (direction-folded hint clauses) FIRST and re-assemble; the clamp then stays
|
|
918
|
+
* the last-resort fallback for a body that overflows on prose alone.
|
|
919
|
+
*/
|
|
920
|
+
declare function buildImagePromptWithOverflow(config: BuildImagePromptConfig): BuildImagePromptOverflowResult;
|
|
899
921
|
/**
|
|
900
922
|
* `buildImagePrompt` plus an origin-tagged decomposition of the assembled
|
|
901
923
|
* `prompt`. The string output (and all other fields) is byte-identical to
|
|
@@ -1039,7 +1061,8 @@ declare function renderStructuredFields(fields: StructuredPromptFields): string;
|
|
|
1039
1061
|
* token, not a bare id. A single-id channel cannot carry it.
|
|
1040
1062
|
* - Subject / Styling / prop dimensions (`animal`, `heldProp`, `material`,
|
|
1041
1063
|
* Person, Styling) — a separate `subject` channel, deliberately out of scope
|
|
1042
|
-
* here.
|
|
1064
|
+
* here. It now exists: `subject-registry.ts`, same table-driven shape, its
|
|
1065
|
+
* key set DISJOINT from this one (pinned by a test) so nothing folds twice.
|
|
1043
1066
|
*
|
|
1044
1067
|
* PACK BLINDNESS (parity, not a regression): `get*PromptHint` reads the frozen
|
|
1045
1068
|
* base arrays, so ids added by a deployment-registered catalog pack resolve to
|
|
@@ -1050,8 +1073,23 @@ declare function renderStructuredFields(fields: StructuredPromptFields): string;
|
|
|
1050
1073
|
|
|
1051
1074
|
/** Which generation stages fold a dimension. */
|
|
1052
1075
|
type DirectionSurface = "image" | "video" | "both";
|
|
1053
|
-
/**
|
|
1076
|
+
/**
|
|
1077
|
+
* Verbosity family — the video policy folds `motion` compact, `look` full.
|
|
1078
|
+
*
|
|
1079
|
+
* It is ALSO the body/section split (`prompt-style-section.ts`): `motion` stays
|
|
1080
|
+
* in the prompt body as shot prose, `look` moves to the `[style]` section. The
|
|
1081
|
+
* two meanings are deliberately the same column: camera motion is part of the
|
|
1082
|
+
* shot, not part of the look, on both axes, and a second column would let the
|
|
1083
|
+
* verbosity policy and the section boundary drift apart one row at a time.
|
|
1084
|
+
*/
|
|
1054
1085
|
type DirectionFamily = "look" | "motion";
|
|
1086
|
+
/**
|
|
1087
|
+
* Which `[style]` line a LOOK row renders on. `"film"` = the four dimensions
|
|
1088
|
+
* that describe the CAPTURE (stock, grade, style, era) plus the legacy camera
|
|
1089
|
+
* format key; every other look row falls to the scene line. Absent on `motion`
|
|
1090
|
+
* rows, which never reach the section at all.
|
|
1091
|
+
*/
|
|
1092
|
+
type DirectionStyleGroup = "film";
|
|
1055
1093
|
interface DirectionFieldSpec {
|
|
1056
1094
|
/**
|
|
1057
1095
|
* Wire key — also the `DirectionFields` property name and the canvas
|
|
@@ -1066,6 +1104,12 @@ interface DirectionFieldSpec {
|
|
|
1066
1104
|
readonly surface: DirectionSurface;
|
|
1067
1105
|
/** Verbosity family. The video policy folds `motion` compact, `look` full. */
|
|
1068
1106
|
readonly family: DirectionFamily;
|
|
1107
|
+
/**
|
|
1108
|
+
* `[style]`-section line for a `look` row. Omitted = the scene line. Meaningless
|
|
1109
|
+
* on a `motion` row (those stay in the body), which is why it is optional
|
|
1110
|
+
* rather than a required column with a null member.
|
|
1111
|
+
*/
|
|
1112
|
+
readonly styleGroup?: DirectionStyleGroup;
|
|
1069
1113
|
/** Ids honored per dimension. Extras are SLICED at render, never a 400. */
|
|
1070
1114
|
readonly maxPicks: number;
|
|
1071
1115
|
/**
|
|
@@ -1090,6 +1134,26 @@ interface DirectionFieldSpec {
|
|
|
1090
1134
|
* so they are NOT aliases of `shotSize` / `lightingStyle`, and an alias table
|
|
1091
1135
|
* would wrongly suppress a legal second selection. Overlap is handled instead
|
|
1092
1136
|
* by the exact-string dedupe in `renderDirectionHints`.
|
|
1137
|
+
*
|
|
1138
|
+
* SECOND MEANING OF POSITION — SURVIVAL, NOT STRING POSITION: BOTH cap-aware
|
|
1139
|
+
* assemblers — `assembleImageInput` (stills) and `composeVideoPromptText`
|
|
1140
|
+
* (video) — shed hint clauses from the TAIL of this order when a provider's
|
|
1141
|
+
* prompt cap overflows, through the one shared arithmetic in
|
|
1142
|
+
* `hint-shedding.ts`. So a row's position is its survival order under the cap on
|
|
1143
|
+
* EVERY surface: reordering rows for one surface silently changes what the other
|
|
1144
|
+
* drops first, and the row a video-surface reorder would most likely touch
|
|
1145
|
+
* (`cameraMotion`) leads the fold. What position is NOT any more is the clause's
|
|
1146
|
+
* place in the assembled STRING: every `look` row is lifted out of the body into
|
|
1147
|
+
* the trailing `[style]` section (`prompt-style-section.ts`), so a look clause
|
|
1148
|
+
* reads after every motion clause however early it folds. That is a consequence
|
|
1149
|
+
* of reusing the fold order, not a ranking — this table stays a compatibility
|
|
1150
|
+
* order; anything that needs a real importance ranking should add an explicit
|
|
1151
|
+
* priority column rather than reorder these rows.
|
|
1152
|
+
*
|
|
1153
|
+
* WHERE THIS TABLE SITS IN THE COMBINED ORDER: both assemblers fold the SUBJECT
|
|
1154
|
+
* channel (`subject-registry.ts`) BEFORE this one and shed the combined list
|
|
1155
|
+
* tail-first, so every direction row here is dropped before any subject clause.
|
|
1156
|
+
* Deliberate — see `hint-shedding.ts` for the argument.
|
|
1093
1157
|
*/
|
|
1094
1158
|
declare const DIRECTION_FIELDS: readonly [{
|
|
1095
1159
|
readonly key: "cameraMotion";
|
|
@@ -1143,6 +1207,7 @@ declare const DIRECTION_FIELDS: readonly [{
|
|
|
1143
1207
|
readonly key: "cameraFormat";
|
|
1144
1208
|
readonly surface: "both";
|
|
1145
1209
|
readonly family: "look";
|
|
1210
|
+
readonly styleGroup: "film";
|
|
1146
1211
|
readonly maxPicks: 1;
|
|
1147
1212
|
readonly render: (ids: readonly string[], mode: PickerHintMode) => string[];
|
|
1148
1213
|
}, {
|
|
@@ -1203,6 +1268,7 @@ declare const DIRECTION_FIELDS: readonly [{
|
|
|
1203
1268
|
readonly key: "colorLook";
|
|
1204
1269
|
readonly surface: "both";
|
|
1205
1270
|
readonly family: "look";
|
|
1271
|
+
readonly styleGroup: "film";
|
|
1206
1272
|
readonly maxPicks: 1;
|
|
1207
1273
|
readonly render: (ids: readonly string[], mode: PickerHintMode) => string[];
|
|
1208
1274
|
}, {
|
|
@@ -1221,6 +1287,7 @@ declare const DIRECTION_FIELDS: readonly [{
|
|
|
1221
1287
|
readonly key: "style";
|
|
1222
1288
|
readonly surface: "both";
|
|
1223
1289
|
readonly family: "look";
|
|
1290
|
+
readonly styleGroup: "film";
|
|
1224
1291
|
readonly maxPicks: 1;
|
|
1225
1292
|
readonly render: (ids: readonly string[], mode: PickerHintMode) => string[];
|
|
1226
1293
|
}, {
|
|
@@ -1263,6 +1330,7 @@ declare const DIRECTION_FIELDS: readonly [{
|
|
|
1263
1330
|
readonly key: "era";
|
|
1264
1331
|
readonly surface: "both";
|
|
1265
1332
|
readonly family: "look";
|
|
1333
|
+
readonly styleGroup: "film";
|
|
1266
1334
|
readonly maxPicks: 1;
|
|
1267
1335
|
readonly render: (ids: readonly string[], mode: PickerHintMode) => string[];
|
|
1268
1336
|
}, {
|
|
@@ -1341,6 +1409,7 @@ declare const DIRECTION_FIELDS: readonly [{
|
|
|
1341
1409
|
readonly key: "cameraFormatId";
|
|
1342
1410
|
readonly surface: "both";
|
|
1343
1411
|
readonly family: "look";
|
|
1412
|
+
readonly styleGroup: "film";
|
|
1344
1413
|
readonly maxPicks: 1;
|
|
1345
1414
|
readonly render: (ids: readonly string[], mode: PickerHintMode) => string[];
|
|
1346
1415
|
}];
|
|
@@ -1369,6 +1438,13 @@ type DirectionFields = {
|
|
|
1369
1438
|
* re-deriving one.
|
|
1370
1439
|
*/
|
|
1371
1440
|
declare const DIRECTION_KEYS: ReadonlyArray<DirectionKey>;
|
|
1441
|
+
/**
|
|
1442
|
+
* The rows that render on the `[style]` section's FILM line, in table order —
|
|
1443
|
+
* derived from the table's `styleGroup` column so the grouping has exactly one
|
|
1444
|
+
* definition. Exported for clients that render the section themselves; the
|
|
1445
|
+
* platform's own renderer reads the column, not this list.
|
|
1446
|
+
*/
|
|
1447
|
+
declare const FILM_STYLE_KEYS: ReadonlyArray<DirectionKey>;
|
|
1372
1448
|
/** Verbosity for a whole fold, or split per family. */
|
|
1373
1449
|
type DirectionHintMode = PickerHintMode | {
|
|
1374
1450
|
readonly look: PickerHintMode;
|
|
@@ -1398,6 +1474,23 @@ declare const DIRECTION_ARRAY_CEILING = 8;
|
|
|
1398
1474
|
declare const DIRECTION_ID_MAX_CHARS = 100;
|
|
1399
1475
|
/** The rows a given generation stage folds, in table order. */
|
|
1400
1476
|
declare function directionFieldsForSurface(surface: "image" | "video"): ReadonlyArray<DirectionFieldSpec>;
|
|
1477
|
+
/** One rendered clause, still carrying the table attributes it came from. */
|
|
1478
|
+
interface DirectionHintClause {
|
|
1479
|
+
readonly key: DirectionKey;
|
|
1480
|
+
readonly family: DirectionFamily;
|
|
1481
|
+
readonly styleGroup?: DirectionStyleGroup;
|
|
1482
|
+
readonly text: string;
|
|
1483
|
+
}
|
|
1484
|
+
/**
|
|
1485
|
+
* `renderDirectionHints` with the row each clause came from still attached —
|
|
1486
|
+
* what the `[style]` section needs to decide which line a clause belongs on
|
|
1487
|
+
* without a second table. Same order, same surface filter, same dedupe; the
|
|
1488
|
+
* plain renderer is this one's `.text` projection, so the two cannot drift.
|
|
1489
|
+
*/
|
|
1490
|
+
declare function renderDirectionHintClauses(direction: DirectionFields | undefined, opts: {
|
|
1491
|
+
surface: "image" | "video";
|
|
1492
|
+
mode?: DirectionHintMode;
|
|
1493
|
+
}): DirectionHintClause[];
|
|
1401
1494
|
/**
|
|
1402
1495
|
* Every clause the `direction` channel injects, in canonical table order.
|
|
1403
1496
|
*
|
|
@@ -1417,13 +1510,282 @@ declare function directionFieldsForSurface(surface: "image" | "video"): Readonly
|
|
|
1417
1510
|
* exactly as two wired picker nodes of one family behave today.
|
|
1418
1511
|
*
|
|
1419
1512
|
* Exported so a client's "will inject into prompt" preview renders the exact
|
|
1420
|
-
* server
|
|
1513
|
+
* clauses the server does instead of re-implementing the fold. A preview of the
|
|
1514
|
+
* assembled STRING needs `prompt-style-section.ts` on top: the look clauses in
|
|
1515
|
+
* this list do not read in this position any more.
|
|
1421
1516
|
*/
|
|
1422
1517
|
declare function renderDirectionHints(direction: DirectionFields | undefined, opts: {
|
|
1423
1518
|
surface: "image" | "video";
|
|
1424
1519
|
mode?: DirectionHintMode;
|
|
1425
1520
|
}): string[];
|
|
1426
1521
|
|
|
1522
|
+
/**
|
|
1523
|
+
* THE SUBJECT REGISTRY — the ordered table of every SUBJECT dimension the flat
|
|
1524
|
+
* `subject` channel carries (who is in the shot: Person, Styling, and the three
|
|
1525
|
+
* prop catalogs), plus the one renderer that folds it into prompt text.
|
|
1526
|
+
*
|
|
1527
|
+
* WHY A SECOND CHANNEL, NOT `StructuredPromptFields`: that type is FREE TEXT
|
|
1528
|
+
* (`person.hair?: string` → "with {hair} hair"), its reader is a hand-authored
|
|
1529
|
+
* field table whose totality is compile-time enforced by mapped types, its
|
|
1530
|
+
* values are bounded as prose (200 chars), and it renders as headed sentences
|
|
1531
|
+
* ("Subject: …. Style: …."). None of those survive contact with ~50 CATALOG IDS
|
|
1532
|
+
* plus deployment-registered pack dimensions unknown at compile time, whose
|
|
1533
|
+
* hints are authored as comma-joinable compound clauses. `direction-registry.ts`
|
|
1534
|
+
* already has the four properties this channel needs — a platform-owned fold
|
|
1535
|
+
* order exported for client preview parity, a DERIVED wire schema and node
|
|
1536
|
+
* reader, unknown-key/unknown-id inertness, and shared bounds across both doors
|
|
1537
|
+
* — so this module mirrors it. `direction-registry.ts` hands this scope off by
|
|
1538
|
+
* name in its own header.
|
|
1539
|
+
*
|
|
1540
|
+
* WIRE VOCABULARY: the keys are the platform's OWN node-data field names — the
|
|
1541
|
+
* ones `PERSON_FIELD_BY_DIMENSION` / `STYLING_FIELD_BY_DIMENSION` and the prop
|
|
1542
|
+
* pickers' `valueField` already use (`hairBase`, `lipState`, `wardrobeState`,
|
|
1543
|
+
* `heldProp`, `material`, `animal`, …). A canvas person/styling node stores
|
|
1544
|
+
* exactly these, and every `build*Hints` already consumes them.
|
|
1545
|
+
*
|
|
1546
|
+
* THE WIRE IS A FLAT BAG, AND THE FLATNESS IS LOAD-BEARING (not a shortcut):
|
|
1547
|
+
* `collectStylingFragments` reads `data.lipState` — a PERSON field — to skip
|
|
1548
|
+
* `makeup-bold-lips` when `lip-state-bold-red` is already selected. That dedupe
|
|
1549
|
+
* only fires for a consumer folding both pickers off ONE shared value map,
|
|
1550
|
+
* which is precisely what this channel is. Nesting `person` / `styling` as
|
|
1551
|
+
* sub-records would hand the styling builder a bag with no `lipState` in it and
|
|
1552
|
+
* the lipstick clause would silently double. Hence: flat wire, and the group
|
|
1553
|
+
* rows below receive the WHOLE normalized bag rather than a slice of it.
|
|
1554
|
+
*
|
|
1555
|
+
* PRE/POST FREE TEXT IS DELIBERATELY OFF THE WIRE (v1): `PersonValue` and
|
|
1556
|
+
* `StylingValue` BOTH declare `preText`/`postText` and both `collect*Fragments`
|
|
1557
|
+
* read them, so a shared flat bag would emit the same prose twice. They are the
|
|
1558
|
+
* only genuine key collision in the set and are simply not `SUBJECT_KEYS`, so
|
|
1559
|
+
* the normalizer drops them. Per-subject free text is the one future need that
|
|
1560
|
+
* would force either nesting or suffixed keys (`personPreText` / …).
|
|
1561
|
+
*
|
|
1562
|
+
* IMPORT RULE (hard, inherited from the direction registry): this module
|
|
1563
|
+
* imports only `get*PromptHint` / `get*Term` / `build*Hints` FUNCTIONS and the
|
|
1564
|
+
* `*_FIELD_BY_DIMENSION` / `*_DIMENSION_ORDER` maps — never a raw UPPERCASE
|
|
1565
|
+
* catalog array (`PEOPLE`, `STYLINGS`, `ANIMALS`). `catalog-funnel-ratchet.test.ts`
|
|
1566
|
+
* derives its watch set from `picker-catalogs.ts`'s uppercase value imports and
|
|
1567
|
+
* can only SHRINK, so a raw array import here would be a new offender — which
|
|
1568
|
+
* is exactly why the animal getters live in `@nodaro/shared`. Nothing here
|
|
1569
|
+
* reads an environment variable either (`content-free-contract.test.ts`):
|
|
1570
|
+
* verbosity and surface are threaded parameters, never deployment state.
|
|
1571
|
+
*
|
|
1572
|
+
* DISJOINT FROM `direction` BY CONTRACT: `SUBJECT_KEYS ∩ DIRECTION_KEYS = ∅`,
|
|
1573
|
+
* pinned by a test. `pose` rides `direction` even though the picker wiring files
|
|
1574
|
+
* it under "Subject / Object"; keeping the two key sets disjoint is what stops
|
|
1575
|
+
* one selection emitting two clauses.
|
|
1576
|
+
*/
|
|
1577
|
+
|
|
1578
|
+
/** Which generation stages fold a dimension (mirrors `DirectionSurface`). */
|
|
1579
|
+
type SubjectSurface = "image" | "video" | "both";
|
|
1580
|
+
/**
|
|
1581
|
+
* Flat subject ids — the wire shape and the canvas node-data shape.
|
|
1582
|
+
*
|
|
1583
|
+
* Keys are the platform's own field names; a value is one id, a list of ids, or
|
|
1584
|
+
* (for `customAge` alone) a number. Absent ≠ empty: a missing key means "no
|
|
1585
|
+
* hint", never a default.
|
|
1586
|
+
*/
|
|
1587
|
+
type SubjectFields = Readonly<Record<string, string | readonly string[] | number>>;
|
|
1588
|
+
/**
|
|
1589
|
+
* A fold row whose render consumes the WHOLE normalized bag and returns ONE
|
|
1590
|
+
* already-joined clause.
|
|
1591
|
+
*
|
|
1592
|
+
* Two reasons this kind exists rather than one row per person/styling field:
|
|
1593
|
+
* 1. the cross-catalog dedupe described in the module header needs the whole
|
|
1594
|
+
* bag in one call;
|
|
1595
|
+
* 2. these builders emit FRAGMENTS, not clauses — 30 person fragments handed
|
|
1596
|
+
* to the `". "` prompt-hint join read as "a beautiful woman. in her 30s.
|
|
1597
|
+
* East Asian." The catalogs' own grammar is a comma-joined compound clause,
|
|
1598
|
+
* so the row joins with ", " and hands back a single piece.
|
|
1599
|
+
*/
|
|
1600
|
+
interface SubjectGroupFieldSpec {
|
|
1601
|
+
/** Fold-row id. NOT a wire key — a group row reads many of them. */
|
|
1602
|
+
readonly key: string;
|
|
1603
|
+
readonly kind: "group";
|
|
1604
|
+
readonly surface: SubjectSurface;
|
|
1605
|
+
/** The whole normalized bag in, one joined clause out (`[]` when empty). */
|
|
1606
|
+
readonly render: (subject: SubjectFields, mode: PickerHintMode) => string[];
|
|
1607
|
+
}
|
|
1608
|
+
/** A fold row that reads ONE wire key holding catalog ids (the prop catalogs). */
|
|
1609
|
+
interface SubjectIdsFieldSpec {
|
|
1610
|
+
/** Wire key AND fold-row id — these rows are one key each. */
|
|
1611
|
+
readonly key: string;
|
|
1612
|
+
readonly kind: "ids";
|
|
1613
|
+
readonly surface: SubjectSurface;
|
|
1614
|
+
/** Ids honored. Extras are SLICED by the normalizer, never a 400. */
|
|
1615
|
+
readonly maxPicks: number;
|
|
1616
|
+
readonly render: (ids: readonly string[], mode: PickerHintMode) => string[];
|
|
1617
|
+
}
|
|
1618
|
+
type SubjectFieldSpec = SubjectGroupFieldSpec | SubjectIdsFieldSpec;
|
|
1619
|
+
/**
|
|
1620
|
+
* THE TABLE. Declaration order IS fold order (`SUBJECT_FOLD_KEYS`), pinned by
|
|
1621
|
+
* `__tests__/subject-registry.test.ts`.
|
|
1622
|
+
*
|
|
1623
|
+
* Person leads (who), then how they are styled, then what they hold, what it is
|
|
1624
|
+
* made of, and finally the animal in frame. Both group rows run over the SAME
|
|
1625
|
+
* normalized bag, in this order, which is what keeps the styling builder's
|
|
1626
|
+
* `lipState` dedupe alive.
|
|
1627
|
+
*
|
|
1628
|
+
* SECOND MEANING OF POSITION (same as `DIRECTION_FIELDS`): both cap-aware
|
|
1629
|
+
* assemblers fold this table AHEAD of the direction table into ONE sheddable
|
|
1630
|
+
* list and shed it TAIL-FIRST through `hint-shedding.ts`, so a row's position
|
|
1631
|
+
* here is also its survival order under a provider's prompt cap — subject
|
|
1632
|
+
* clauses outlive every direction clause, and within this block `animal` leaves
|
|
1633
|
+
* before `person`. A compatibility order, not a ranking; anything needing a
|
|
1634
|
+
* real ranking adds an explicit priority column rather than reordering rows.
|
|
1635
|
+
*/
|
|
1636
|
+
declare const SUBJECT_FIELDS: readonly [{
|
|
1637
|
+
readonly key: "person";
|
|
1638
|
+
readonly kind: "group";
|
|
1639
|
+
readonly surface: "both";
|
|
1640
|
+
readonly render: (subject: SubjectFields, mode: PickerHintMode) => string[];
|
|
1641
|
+
}, {
|
|
1642
|
+
readonly key: "styling";
|
|
1643
|
+
readonly kind: "group";
|
|
1644
|
+
readonly surface: "both";
|
|
1645
|
+
readonly render: (subject: SubjectFields, mode: PickerHintMode) => string[];
|
|
1646
|
+
}, {
|
|
1647
|
+
readonly key: "heldProp";
|
|
1648
|
+
readonly kind: "ids";
|
|
1649
|
+
readonly surface: "both";
|
|
1650
|
+
readonly maxPicks: 2;
|
|
1651
|
+
readonly render: (ids: readonly string[], mode: PickerHintMode) => string[];
|
|
1652
|
+
}, {
|
|
1653
|
+
readonly key: "material";
|
|
1654
|
+
readonly kind: "ids";
|
|
1655
|
+
readonly surface: "both";
|
|
1656
|
+
readonly maxPicks: 2;
|
|
1657
|
+
readonly render: (ids: readonly string[], mode: PickerHintMode) => string[];
|
|
1658
|
+
}, {
|
|
1659
|
+
readonly key: "animal";
|
|
1660
|
+
readonly kind: "ids";
|
|
1661
|
+
readonly surface: "both";
|
|
1662
|
+
readonly maxPicks: 1;
|
|
1663
|
+
readonly render: (ids: readonly string[], mode: PickerHintMode) => string[];
|
|
1664
|
+
}];
|
|
1665
|
+
type SubjectFieldRow = (typeof SUBJECT_FIELDS)[number];
|
|
1666
|
+
/**
|
|
1667
|
+
* Table order — THE canonical fold order, over ROWS (not wire keys). Exported
|
|
1668
|
+
* so a client's "will inject into prompt" preview folds in the exact order the
|
|
1669
|
+
* server does, the way `DIRECTION_KEYS` does for direction.
|
|
1670
|
+
*/
|
|
1671
|
+
declare const SUBJECT_FOLD_KEYS: ReadonlyArray<string>;
|
|
1672
|
+
/**
|
|
1673
|
+
* The one person field that is a NUMBER, not ids: the literal age in years,
|
|
1674
|
+
* consulted only when `age === "age-custom"` (`buildAgeFragment`). It has no
|
|
1675
|
+
* styling twin, so it rides the flat bag without collision.
|
|
1676
|
+
*/
|
|
1677
|
+
declare const SUBJECT_CUSTOM_AGE_KEY = "customAge";
|
|
1678
|
+
/**
|
|
1679
|
+
* THE WIRE KEY SET, derived — every person field, `customAge`, every styling
|
|
1680
|
+
* field, then the prop rows, in fold order. Never hand-listed: a dimension
|
|
1681
|
+
* added to either catalog joins the channel by construction.
|
|
1682
|
+
*
|
|
1683
|
+
* BASE ONLY, deliberately: a deployment-registered person pack adds dimensions
|
|
1684
|
+
* at RUNTIME, so the pack-aware set is computed per call inside
|
|
1685
|
+
* `normalizeSubjectFields` (and inside `readSubjectFields`). This constant is
|
|
1686
|
+
* what a client enumerates to build its projection; a pack dimension it cannot
|
|
1687
|
+
* know about still rides the wire and still folds.
|
|
1688
|
+
*
|
|
1689
|
+
* ONE CONSEQUENCE, noted rather than fixed: the person builder's legacy `lips`
|
|
1690
|
+
* fallback field is not a dimension and so is not here, making it unreachable
|
|
1691
|
+
* through this channel. Intended — the wire speaks the current vocabulary; the
|
|
1692
|
+
* fallback stays for node blobs written before the split.
|
|
1693
|
+
*/
|
|
1694
|
+
declare const SUBJECT_KEYS: ReadonlyArray<string>;
|
|
1695
|
+
/**
|
|
1696
|
+
* `SUBJECT_KEYS` plus whatever a deployment-registered person pack added — the
|
|
1697
|
+
* set the DOORS accept (`readSubjectFields`, and any route-side normalize).
|
|
1698
|
+
*
|
|
1699
|
+
* Rebuilt per call because pack registration happens at boot, after this module
|
|
1700
|
+
* is imported. With no packs registered it is `SUBJECT_KEYS` exactly, pinned by
|
|
1701
|
+
* a test.
|
|
1702
|
+
*/
|
|
1703
|
+
declare function getRegisteredSubjectKeys(): ReadonlyArray<string>;
|
|
1704
|
+
/** Verbosity for a whole subject fold. No family split — subject is one family. */
|
|
1705
|
+
type SubjectHintMode = PickerHintMode;
|
|
1706
|
+
/** Image policy: the full mechanism clause for every dimension. */
|
|
1707
|
+
declare const SUBJECT_IMAGE_HINT_MODE_DEFAULT: SubjectHintMode;
|
|
1708
|
+
/**
|
|
1709
|
+
* Video policy: the compact professional term.
|
|
1710
|
+
*
|
|
1711
|
+
* A fully specified person at `"full"` is ~30 paragraph clauses, and on the
|
|
1712
|
+
* video stage the start frame already carries the subject's identity — the
|
|
1713
|
+
* clip's prompt needs the subject NAMED, not re-described. (The image stage,
|
|
1714
|
+
* which is where the subject is actually being built, keeps `"full"`.)
|
|
1715
|
+
*/
|
|
1716
|
+
declare const SUBJECT_VIDEO_HINT_MODE_DEFAULT: SubjectHintMode;
|
|
1717
|
+
/**
|
|
1718
|
+
* Wire tolerance ceiling for an array-valued subject key, and the ceiling for
|
|
1719
|
+
* one id's length. DEFINED AS the direction constants rather than re-typed, so
|
|
1720
|
+
* ONE literal governs both channels and both doors (the route schema and the
|
|
1721
|
+
* persisted-node reader) — the wire and the canvas cannot start disagreeing
|
|
1722
|
+
* about which strings are ids at all.
|
|
1723
|
+
*/
|
|
1724
|
+
declare const SUBJECT_ARRAY_CEILING = 8;
|
|
1725
|
+
declare const SUBJECT_ID_MAX_CHARS = 100;
|
|
1726
|
+
/**
|
|
1727
|
+
* Bound on the NUMBER of keys in a subject bag. `SUBJECT_KEYS` is 54 today;
|
|
1728
|
+
* this leaves generous headroom for deployment-registered pack dimensions while
|
|
1729
|
+
* still closing an otherwise unbounded record that lands verbatim in
|
|
1730
|
+
* `jobs.input_data`. Unknown keys are inert (the renderer never reads them), so
|
|
1731
|
+
* this is storage hygiene, not validation.
|
|
1732
|
+
*/
|
|
1733
|
+
declare const MAX_SUBJECT_KEYS = 128;
|
|
1734
|
+
/** Bound on the LENGTH of one wire key. Field names are short identifiers. */
|
|
1735
|
+
declare const SUBJECT_KEY_MAX_CHARS = 64;
|
|
1736
|
+
/**
|
|
1737
|
+
* THE NORMALIZER — a known-key, per-dimension-capped copy of a subject bag.
|
|
1738
|
+
*
|
|
1739
|
+
* WHY IT EXISTS (and why the fold is unusable without it): the subject builders
|
|
1740
|
+
* do NOT cap. `collectPersonFragments` / `collectStylingFragments` /
|
|
1741
|
+
* `emitIndependentFragments` emit EVERY id they are handed; `normalizePickIds`
|
|
1742
|
+
* and `pickHeldPropIds` dedupe but never slice; only `buildMaterialHints` caps,
|
|
1743
|
+
* and only structurally at 2. `MAX_SELECTED_BY_DIMENSION`'s own doc names its
|
|
1744
|
+
* consumers as the picker UI, the analyzer schema and the Zod validator — NOT
|
|
1745
|
+
* the builders. Straight off the wire, then, a bag is a clause amplifier: 8 ids
|
|
1746
|
+
* (the array ceiling) on each of ~50 dimensions. This is where the per-dimension
|
|
1747
|
+
* cap actually gets enforced.
|
|
1748
|
+
*
|
|
1749
|
+
* It also:
|
|
1750
|
+
* - DROPS UNKNOWN KEYS, so `jobs.input_data` stays the platform's vocabulary
|
|
1751
|
+
* (unknown IDS stay inert instead — every getter resolves a miss to `""`);
|
|
1752
|
+
* - UNWRAPS a single-id array to a bare string. Load-bearing:
|
|
1753
|
+
* `collectPersonFragments` reads a single-pick dimension with
|
|
1754
|
+
* `typeof raw === "string"`, so a legitimate `["hair-base-long"]` from a
|
|
1755
|
+
* client's array-shaped store would otherwise contribute NOTHING;
|
|
1756
|
+
* - clamps `customAge` to a whole `0..120`, mirroring `buildAgeFragment`.
|
|
1757
|
+
*
|
|
1758
|
+
* Copy-on-write: the caller's object is never mutated. Idempotent, so calling it
|
|
1759
|
+
* at a door AND inside the renderer is free.
|
|
1760
|
+
*/
|
|
1761
|
+
declare function normalizeSubjectFields(subject: SubjectFields | undefined): SubjectFields | undefined;
|
|
1762
|
+
/** The rows a given generation stage folds, in table order. */
|
|
1763
|
+
declare function subjectFieldsForSurface(surface: "image" | "video"): ReadonlyArray<SubjectFieldSpec>;
|
|
1764
|
+
/**
|
|
1765
|
+
* Every clause the `subject` channel injects, in canonical table order.
|
|
1766
|
+
*
|
|
1767
|
+
* NORMALIZES ONCE, at the top, and hands THE SAME bag to both group rows — that
|
|
1768
|
+
* single shared bag is the mechanism behind the styling builder's cross-catalog
|
|
1769
|
+
* `lipState` dedupe, and it must not depend on a door having normalized first
|
|
1770
|
+
* (the normalizer is idempotent, so a door may do it too).
|
|
1771
|
+
*
|
|
1772
|
+
* Iterates the TABLE, never the caller's object: unknown wire keys contribute
|
|
1773
|
+
* nothing, the order is platform-owned, and an off-surface row is inert.
|
|
1774
|
+
* Unknown IDS are skipped too — every `get*PromptHint` returns `""` on a miss,
|
|
1775
|
+
* so a retired or pack-only id costs no clause rather than a 400.
|
|
1776
|
+
*
|
|
1777
|
+
* DEDUPE by exact clause string, FIRST OCCURRENCE WINS (order-preserving),
|
|
1778
|
+
* matching `renderDirectionHints`.
|
|
1779
|
+
*
|
|
1780
|
+
* Exported so a client's "will inject into prompt" preview renders the exact
|
|
1781
|
+
* server output — called on the very object the client sends — instead of
|
|
1782
|
+
* re-implementing the fold.
|
|
1783
|
+
*/
|
|
1784
|
+
declare function renderSubjectHints(subject: SubjectFields | undefined, opts: {
|
|
1785
|
+
surface: "image" | "video";
|
|
1786
|
+
mode?: SubjectHintMode;
|
|
1787
|
+
}): string[];
|
|
1788
|
+
|
|
1427
1789
|
/**
|
|
1428
1790
|
* The measured hint join, shared by the image (`composePromptText`) and video
|
|
1429
1791
|
* (`composeVideoPromptText`) composers so the two can never drift.
|
|
@@ -1436,6 +1798,15 @@ declare function renderDirectionHints(direction: DirectionFields | undefined, op
|
|
|
1436
1798
|
* ("prompt. hint", not "prompt . hint"), and drop a blank body so the result
|
|
1437
1799
|
* never starts with ". ".
|
|
1438
1800
|
*
|
|
1801
|
+
* WHAT THIS JOIN COVERS NOW: the prompt BODY only. A LOOK clause no longer
|
|
1802
|
+
* reaches this function from either composer — it lifts into the trailing
|
|
1803
|
+
* `[style]` section (`prompt-style-section.ts`), which is `". "`-joined WITHIN a
|
|
1804
|
+
* line but hung off the body by a blank line. So "every folded clause is one
|
|
1805
|
+
* `". "` further along the same string" stopped being true for a look-carrying
|
|
1806
|
+
* call, deliberately; `composeSectionedPrompt` is the whole-prompt shape and
|
|
1807
|
+
* this is the piece of it that assembles the body. The zero-hint no-op branch is
|
|
1808
|
+
* untouched and still the thing the routes' `composed !== prompt` guard reads.
|
|
1809
|
+
*
|
|
1439
1810
|
* Never mutates its inputs.
|
|
1440
1811
|
*/
|
|
1441
1812
|
/** The measured separator between the user's prompt and each folded hint. */
|
|
@@ -1450,6 +1821,168 @@ declare const PROMPT_HINT_SEPARATOR = ". ";
|
|
|
1450
1821
|
*/
|
|
1451
1822
|
declare function joinPromptHints(userPrompt: string, hints: readonly string[]): string;
|
|
1452
1823
|
|
|
1824
|
+
/**
|
|
1825
|
+
* The section header, verbatim. Lowercase and bracketed so it reads as
|
|
1826
|
+
* structure rather than as a sentence — and so it can be found again by
|
|
1827
|
+
* `buildImagePrompt`'s hybrid line-capitalizer, which must stop here
|
|
1828
|
+
* (`[Style]:` would be a different token, and capitalized clause lines would
|
|
1829
|
+
* corrupt the lowercase catalog wording).
|
|
1830
|
+
*/
|
|
1831
|
+
declare const STYLE_SECTION_HEADER = "[style]:";
|
|
1832
|
+
/** The blank line between the body and the section. Omitted for an empty body. */
|
|
1833
|
+
declare const STYLE_SECTION_GAP = "\n\n";
|
|
1834
|
+
/**
|
|
1835
|
+
* Split a composed prompt into the BODY and the `[style]` section it ends with
|
|
1836
|
+
* (`section: ""` when it carries none, the body then being the whole string;
|
|
1837
|
+
* the section comes back WITHOUT the gap).
|
|
1838
|
+
*
|
|
1839
|
+
* Matched from the RIGHT: the composer always emits the section last, and a
|
|
1840
|
+
* user's own prose is free to contain the same characters. A blank body drops
|
|
1841
|
+
* the gap with it, so the section-only form is matched on its own.
|
|
1842
|
+
*/
|
|
1843
|
+
declare function splitStyleSection(prompt: string): {
|
|
1844
|
+
body: string;
|
|
1845
|
+
section: string;
|
|
1846
|
+
};
|
|
1847
|
+
/**
|
|
1848
|
+
* Extend a composed prompt's BODY with more lines, AHEAD of the `[style]`
|
|
1849
|
+
* section — what every assembler downstream of the composer needs, because the
|
|
1850
|
+
* section has no terminator: a plain append lands under the header and reads as
|
|
1851
|
+
* one more look clause. Reference bindings, element directives and character
|
|
1852
|
+
* descriptions are scene content that belongs with the prose, and leaving the
|
|
1853
|
+
* look clauses last is where a look tail was measured to cost nothing.
|
|
1854
|
+
*
|
|
1855
|
+
* With no section this IS the plain `"\n"` join every caller emitted before —
|
|
1856
|
+
* the byte-parity path, down to the leading newline an empty prompt produces.
|
|
1857
|
+
*/
|
|
1858
|
+
declare function insertBeforeStyleSection(prompt: string, lines: readonly string[]): string;
|
|
1859
|
+
/**
|
|
1860
|
+
* True when `prompt` ends INSIDE the section — its last `\n\n`-delimited block
|
|
1861
|
+
* opens with the header. What the self-labeling control lines (`Style:`,
|
|
1862
|
+
* `Avoid:`) read: they stay at the END of the prompt by design, so a blank line
|
|
1863
|
+
* of their own is the only thing that can close the header's scope ahead of
|
|
1864
|
+
* them.
|
|
1865
|
+
*/
|
|
1866
|
+
declare function endsInsideStyleSection(prompt: string): boolean;
|
|
1867
|
+
/** Where a rendered clause reads in the assembled prompt. */
|
|
1868
|
+
type PromptClauseSlot = "body" | "film" | "scene";
|
|
1869
|
+
/** A rendered clause plus the line it belongs on. */
|
|
1870
|
+
interface SlottedPromptClause {
|
|
1871
|
+
readonly text: string;
|
|
1872
|
+
readonly slot: PromptClauseSlot;
|
|
1873
|
+
}
|
|
1874
|
+
/**
|
|
1875
|
+
* The slot a direction row's clause takes: motion stays in the body, the five
|
|
1876
|
+
* `styleGroup: "film"` rows lead the section, every other look row follows on
|
|
1877
|
+
* the scene line.
|
|
1878
|
+
*/
|
|
1879
|
+
declare function styleSlotFor(row: {
|
|
1880
|
+
readonly family: DirectionFamily;
|
|
1881
|
+
readonly styleGroup?: DirectionStyleGroup;
|
|
1882
|
+
}): PromptClauseSlot;
|
|
1883
|
+
/**
|
|
1884
|
+
* The SUBJECT channel's clauses: always body. Who is in the shot is the noun
|
|
1885
|
+
* phrase the look modifies, not part of the look.
|
|
1886
|
+
*/
|
|
1887
|
+
declare function asBodyClauses(texts: readonly string[]): SlottedPromptClause[];
|
|
1888
|
+
/**
|
|
1889
|
+
* Fold a direction bag and tag each clause with its slot, in registry table
|
|
1890
|
+
* order. The ORDER is the fold/survival order, not the string order — the
|
|
1891
|
+
* composers slice this list from the tail when a cap forces a shed, and only
|
|
1892
|
+
* then hand the surviving prefix to `composeSectionedPrompt`.
|
|
1893
|
+
*/
|
|
1894
|
+
declare function partitionStyleClauses(direction: DirectionFields | undefined, opts: {
|
|
1895
|
+
surface: "image" | "video";
|
|
1896
|
+
mode?: DirectionHintMode;
|
|
1897
|
+
}): SlottedPromptClause[];
|
|
1898
|
+
/**
|
|
1899
|
+
* The section block for a set of clauses — `""` when none of them is a look
|
|
1900
|
+
* clause. Each line is omitted entirely when its half of the split is empty, so
|
|
1901
|
+
* a scene-only fold never emits a blank film line.
|
|
1902
|
+
*/
|
|
1903
|
+
declare function styleSectionFromClauses(clauses: readonly SlottedPromptClause[]): string;
|
|
1904
|
+
/**
|
|
1905
|
+
* The section for a raw direction bag — the entry point a client renders its
|
|
1906
|
+
* preview through, so the preview and the server emit the same bytes.
|
|
1907
|
+
*/
|
|
1908
|
+
declare function renderStyleSection(direction: DirectionFields | undefined, opts: {
|
|
1909
|
+
surface: "image" | "video";
|
|
1910
|
+
mode?: DirectionHintMode;
|
|
1911
|
+
}): string;
|
|
1912
|
+
/**
|
|
1913
|
+
* The assembled prompt for a set of clauses: body clauses `". "`-joined onto the
|
|
1914
|
+
* user's prompt, the structured fragment last in the body, then the section.
|
|
1915
|
+
*
|
|
1916
|
+
* TRIMMING follows `joinPromptHints`: the prompt is trimmed whenever ANYTHING
|
|
1917
|
+
* folded — a section counts, so a look-only fold trims too, or the blank line
|
|
1918
|
+
* would inherit the prompt's trailing whitespace. With nothing folded at all the
|
|
1919
|
+
* prompt is returned VERBATIM AND UNTRIMMED (`undefined` passes straight
|
|
1920
|
+
* through), which is the byte-parity contract every existing caller rests on.
|
|
1921
|
+
*
|
|
1922
|
+
* A blank body drops the gap with it, so the result never opens on a newline —
|
|
1923
|
+
* the same reason `joinPromptHints` filters a blank prompt out of its join.
|
|
1924
|
+
*/
|
|
1925
|
+
declare function composeSectionedPrompt<T extends string | undefined>(userPrompt: T, clauses: readonly SlottedPromptClause[], structuredFragment: string): string | T;
|
|
1926
|
+
/**
|
|
1927
|
+
* What each clause costs the assembled prompt, as the EXACT composed-length
|
|
1928
|
+
* delta of adding it to the prefix below it. Feeds `keepableDirectionHints`,
|
|
1929
|
+
* which walks the list tail-first.
|
|
1930
|
+
*
|
|
1931
|
+
* Exact deltas rather than "clause + separator" because the section's own bytes
|
|
1932
|
+
* are not evenly distributed: the FIRST look clause carries the whole
|
|
1933
|
+
* `"\n\n[style]:\n"` header (11 characters that only come back when the section
|
|
1934
|
+
* disappears), the second look clause of a line carries a `". "`, the first of
|
|
1935
|
+
* the scene line carries a `"\n"`. Flat costs would under-price the header, so
|
|
1936
|
+
* the walk would cover a deficit with more clauses than it needs and over-shed
|
|
1937
|
+
* — visible as a fold that drops two clauses where one would have fit. The
|
|
1938
|
+
* deltas do not change between shed iterations (the walk only ever shortens the
|
|
1939
|
+
* prefix), so they are computed once, before the loop.
|
|
1940
|
+
*/
|
|
1941
|
+
declare function sectionedClauseCosts(userPrompt: string | undefined, clauses: readonly SlottedPromptClause[], structuredFragment: string): number[];
|
|
1942
|
+
|
|
1943
|
+
/**
|
|
1944
|
+
* How many of the first `kept` hint clauses may STAY if `deficit`
|
|
1945
|
+
* characters have to leave the body. Walks the fold order from the TAIL,
|
|
1946
|
+
* subtracting each clause plus the separator it brought, and stops as soon as
|
|
1947
|
+
* enough has been reclaimed.
|
|
1948
|
+
*
|
|
1949
|
+
* The name is historical (direction was the first and for a while the only
|
|
1950
|
+
* channel); the list both callers pass is now the COMBINED fold —
|
|
1951
|
+
* `[...subject, ...direction]` on both surfaces — so the shed order is that
|
|
1952
|
+
* combined order REVERSED: the direction block empties first, then the subject
|
|
1953
|
+
* block. Deliberate, and the reason the two folds share one list: a fully
|
|
1954
|
+
* specified person renders ~30 clauses, so a subject fold left unsheddable
|
|
1955
|
+
* would be the single biggest way to push an overflow into the order-blind
|
|
1956
|
+
* clamp, while a decorative grade or ISO value survives.
|
|
1957
|
+
*
|
|
1958
|
+
* Within the direction block the order is `DIRECTION_FIELDS` order REVERSED
|
|
1959
|
+
* (and within the subject block, `SUBJECT_FIELDS` reversed). Note what that
|
|
1960
|
+
* is and is not: each table's order is a COMPATIBILITY order (grouped by family,
|
|
1961
|
+
* with the legacy `DirectionFields` block pinned last so every pre-registry
|
|
1962
|
+
* caller's fold stays byte-identical) — it is NOT a ranking of how load-bearing
|
|
1963
|
+
* a dimension is, and this function does not claim one. Tail-first is chosen
|
|
1964
|
+
* because it is deterministic, matches the fold order the API documents, and
|
|
1965
|
+
* needs no second ordering to drift out of sync with the table. A caller mixing
|
|
1966
|
+
* legacy keys with the newer ones can therefore lose e.g. `lightingId` before a
|
|
1967
|
+
* decorative `isoValue` clause; if that ever matters, the fix is an explicit
|
|
1968
|
+
* priority column on `DIRECTION_FIELDS`, not a second hand-kept list here.
|
|
1969
|
+
*
|
|
1970
|
+
* `clauseCosts[i]` is what clause `i` really adds to the assembled prompt.
|
|
1971
|
+
* Without it each clause is charged its text plus one separator, which is what
|
|
1972
|
+
* a clause folded inline costs — but a clause that lands in the `[style]`
|
|
1973
|
+
* section carries section bytes too (the first one carries the whole header),
|
|
1974
|
+
* and under-charging it makes this walk cover the deficit with MORE clauses
|
|
1975
|
+
* than it needs. Both in-package callers pass exact composed-length deltas
|
|
1976
|
+
* (`sectionedClauseCosts`); the default keeps the pre-section arithmetic for
|
|
1977
|
+
* anyone else.
|
|
1978
|
+
*
|
|
1979
|
+
* Still deliberately approximate (assembly is not perfectly additive — a
|
|
1980
|
+
* downstream frame can grow or shrink around the body); the caller re-assembles
|
|
1981
|
+
* and re-checks, and this function strictly decreases `kept` whenever
|
|
1982
|
+
* `deficit > 0`, so that loop terminates however the costs are priced.
|
|
1983
|
+
*/
|
|
1984
|
+
declare function keepableDirectionHints(hintClauses: readonly string[], kept: number, deficit: number, clauseCosts?: readonly number[]): number;
|
|
1985
|
+
|
|
1453
1986
|
/**
|
|
1454
1987
|
* The reference-binding surface string — `@image_N` / `@video_N` / `@audio_N`
|
|
1455
1988
|
* — and the one identity sentence built on it. Split out of
|
|
@@ -1905,17 +2438,17 @@ declare function assembleSunoInput(input: AssembleSunoInput): AssembleSunoResult
|
|
|
1905
2438
|
* This wrapper collapses them into one.
|
|
1906
2439
|
*
|
|
1907
2440
|
* THE NO-OP CONTRACT (load-bearing — the platform-caller parity relies on it):
|
|
1908
|
-
* a node that carries NO stored `direction` / `structured` (every
|
|
1909
|
-
* authored before the canvas honored them) still reaches here with
|
|
1910
|
-
* and `composePromptText` MUST return the caller's `userPrompt`
|
|
1911
|
-
* unchanged, so the wrapper degenerates to exactly the
|
|
1912
|
-
* call those sites made before. The platform callers
|
|
1913
|
-
* `payload-builder`) compose their prompt from the canvas GRAPH themselves and
|
|
1914
|
-
* ALSO forward a node's STORED `direction` / `structured` when it
|
|
1915
|
-
* (`
|
|
1916
|
-
*
|
|
1917
|
-
*
|
|
1918
|
-
*
|
|
2441
|
+
* a node that carries NO stored `subject` / `direction` / `structured` (every
|
|
2442
|
+
* workflow authored before the canvas honored them) still reaches here with all
|
|
2443
|
+
* three absent, and `composePromptText` MUST return the caller's `userPrompt`
|
|
2444
|
+
* byte-for-byte unchanged, so the wrapper degenerates to exactly the
|
|
2445
|
+
* `buildImagePrompt(...)` call those sites made before. The platform callers
|
|
2446
|
+
* (`execute-node` / `payload-builder`) compose their prompt from the canvas GRAPH themselves and
|
|
2447
|
+
* ALSO forward a node's STORED `subject` / `direction` / `structured` when it
|
|
2448
|
+
* carries them (`readSubjectFields` / `readDirectionFields` /
|
|
2449
|
+
* `readStructuredFields`); those nodes get the id-hint composition on top,
|
|
2450
|
+
* ADDITIVE to the graph-wired cinematography hints the caller already folded
|
|
2451
|
+
* into `userPrompt`. Studio and the MCP route supply the levers directly.
|
|
1919
2452
|
*
|
|
1920
2453
|
* THE EMPTY-CHECK FLAG (also load-bearing for parity): `execute-node` rejects a
|
|
1921
2454
|
* truly-empty assembled prompt (its "type one, mention a character, or connect
|
|
@@ -1949,6 +2482,13 @@ interface AssembleImageInput {
|
|
|
1949
2482
|
* is a no-op for it and the result is byte-identical to today).
|
|
1950
2483
|
*/
|
|
1951
2484
|
direction?: DirectionFields;
|
|
2485
|
+
/**
|
|
2486
|
+
* Flat subject ids (Person / Styling / props) → folded into the prompt AHEAD
|
|
2487
|
+
* of the direction clauses: the subject is the noun phrase the cinematography
|
|
2488
|
+
* then modifies. Same provenance as `direction` — Studio / MCP-route, or the
|
|
2489
|
+
* platform callers' narrow-read of a node's STORED `data.subject`.
|
|
2490
|
+
*/
|
|
2491
|
+
subject?: SubjectFields;
|
|
1952
2492
|
/** Path-1 structured fields → composed fragment appended to the prompt. */
|
|
1953
2493
|
structured?: StructuredPromptFields;
|
|
1954
2494
|
/**
|
|
@@ -2008,9 +2548,24 @@ interface AssembleImageInput {
|
|
|
2008
2548
|
* Assemble a node's image-generation inputs into a `BuildImagePromptResult`
|
|
2009
2549
|
* (`{ prompt, nativeNegativePrompt, referenceImageUrls }`).
|
|
2010
2550
|
*
|
|
2011
|
-
* Order: (1) compose the prompt text (no-op when no direction/structured),
|
|
2551
|
+
* Order: (1) compose the prompt text (no-op when no subject/direction/structured),
|
|
2012
2552
|
* (2) `buildImagePrompt(...)` — exactly the call the three sites make today,
|
|
2013
|
-
* (3)
|
|
2553
|
+
* (3) shed hint clauses and re-assemble while the provider cap overflows,
|
|
2554
|
+
* (4) optional post-assembly empty-prompt throw (gated by `throwOnEmpty`).
|
|
2555
|
+
*
|
|
2556
|
+
* TRUNCATION ORDERING (step 3): `buildImagePrompt`'s cap clamp cuts the TAIL,
|
|
2557
|
+
* which is ORDER-BLIND — on a low-cap provider (seedream = 3000) a maximal
|
|
2558
|
+
* direction fold renders ~3.3K characters of clauses and the cut can sever a
|
|
2559
|
+
* reference directive, mention-resolved text or the user's own prose while a
|
|
2560
|
+
* decorative clause survives. So the ASSEMBLER decides instead: it knows which
|
|
2561
|
+
* clauses are hints because it just built them, and drops them last-folded
|
|
2562
|
+
* first until the prompt fits. Everything else — references, prose, the
|
|
2563
|
+
* structured fragment, the Style/Avoid suffixes — outranks a hint. A body that
|
|
2564
|
+
* still overflows with ZERO hints (long prose or many directives on its own)
|
|
2565
|
+
* falls back to the builder's clamp, unchanged.
|
|
2566
|
+
*
|
|
2567
|
+
* UNDER-CAP PARITY: the first pass folds every hint, so a prompt that fits is
|
|
2568
|
+
* byte-identical to before — the retry only ever runs on an over-cap assembly.
|
|
2014
2569
|
*/
|
|
2015
2570
|
declare function assembleImageInput(input: AssembleImageInput): BuildImagePromptResult;
|
|
2016
2571
|
|
|
@@ -2027,20 +2582,40 @@ declare function assembleImageInput(input: AssembleImageInput): BuildImagePrompt
|
|
|
2027
2582
|
*
|
|
2028
2583
|
* WHERE IT RUNS (load-bearing): on the prompt BODY, BEFORE
|
|
2029
2584
|
* `resolveVideoReferenceCore`. That resolver FRAMES the body — legacy prepends
|
|
2030
|
-
* its `Use these characters:` block, hybrid prepends the lock lines and
|
|
2031
|
-
* the canonical role phrases and extras
|
|
2585
|
+
* its `Use these characters:` block, hybrid prepends the lock lines and extends
|
|
2586
|
+
* the body's END with the canonical role phrases and extras (spliced in ahead of
|
|
2587
|
+
* the `[style]` section, which stays last). Folding afterwards would push the
|
|
2032
2588
|
* scene/look description PAST the identity directives, a worse version of the
|
|
2033
2589
|
* bug this channel exists to fix. The image side is structurally identical
|
|
2034
2590
|
* (`assembleImageInput` = `composePromptText` → `buildImagePrompt`).
|
|
2035
2591
|
*
|
|
2592
|
+
* That ordering is also why cap-aware shedding here takes a `frame` callback
|
|
2593
|
+
* rather than a provider id: the shed must run at the FOLD site (before the
|
|
2594
|
+
* resolver) but be decided on the RESOLVED length (after it), so the binding
|
|
2595
|
+
* text the resolver adds is inside the budget and can never be the thing that
|
|
2596
|
+
* gets dropped. See {@link VideoPromptCapOptions}. Both catalog channels —
|
|
2597
|
+
* SUBJECT and direction — fold into the one sheddable list that budget walks.
|
|
2598
|
+
*
|
|
2599
|
+
* THE SHAPE IT EMITS: the body (prose, subject fold, MOTION clauses, structured
|
|
2600
|
+
* fragment) and then a trailing `[style]` section carrying every LOOK clause —
|
|
2601
|
+
* `prompt-style-section.ts` owns those bytes. Camera motion is shot prose, not
|
|
2602
|
+
* style, so the whole motion family stays in the body; the boundary is the
|
|
2603
|
+
* registry's `family` column, deliberately the same column the verbosity policy
|
|
2604
|
+
* below splits on.
|
|
2605
|
+
*
|
|
2036
2606
|
* THE VERBOSITY POLICY LIVES HERE, NOT IN THE CLIENT: motion dimensions render
|
|
2037
2607
|
* their compact professional term, look dimensions their full clause
|
|
2038
|
-
* (`VIDEO_HINT_MODE_DEFAULT`, resolved per row's `family` by the registry).
|
|
2608
|
+
* (`VIDEO_HINT_MODE_DEFAULT`, resolved per row's `family` by the registry). The
|
|
2609
|
+
* SUBJECT fold has its own policy — compact on video
|
|
2610
|
+
* (`SUBJECT_VIDEO_HINT_MODE_DEFAULT`), because a fully specified person at full
|
|
2611
|
+
* verbosity is ~30 paragraph clauses and the start frame already carries the
|
|
2612
|
+
* subject's identity into the clip.
|
|
2039
2613
|
* It is a threaded PARAMETER with a pure default — never deployment state:
|
|
2040
2614
|
* `__tests__/content-free-contract.test.ts` hard-fails any environment read
|
|
2041
2615
|
* under `packages/prompts/src`, and this module has nothing to read anyway.
|
|
2042
2616
|
*
|
|
2043
|
-
* EXACT NO-OP CONTRACT: with no direction and no structured fields
|
|
2617
|
+
* EXACT NO-OP CONTRACT: with no subject, no direction and no structured fields
|
|
2618
|
+
* the caller's
|
|
2044
2619
|
* `userPrompt` comes back VERBATIM AND UNTRIMMED — `undefined` included, since
|
|
2045
2620
|
* a video prompt is optional on the route. That is what keeps every existing
|
|
2046
2621
|
* caller byte-identical (the "backward-compatible: no connectedReferences →
|
|
@@ -2049,19 +2624,108 @@ declare function assembleImageInput(input: AssembleImageInput): BuildImagePrompt
|
|
|
2049
2624
|
* `__tests__/assemble-video-input.test.ts`).
|
|
2050
2625
|
*
|
|
2051
2626
|
* WHAT IS DELIBERATELY NOT HERE: the dimension table, the fold order, the
|
|
2052
|
-
* dedupe and the surface filter all live in `direction-registry.ts`
|
|
2053
|
-
*
|
|
2627
|
+
* dedupe and the surface filter all live in `direction-registry.ts` (and
|
|
2628
|
+
* `subject-registry.ts` for the subject channel) — ONE renderer per channel
|
|
2629
|
+
* serves both surfaces, so the image and video folds cannot drift.
|
|
2054
2630
|
* Clients render their "will inject into prompt" preview by importing
|
|
2055
|
-
* `
|
|
2631
|
+
* `renderSubjectHints` + `partitionStyleClauses` + `composeSectionedPrompt`
|
|
2632
|
+
* directly (or `renderStyleSection` for the section alone).
|
|
2056
2633
|
*/
|
|
2057
2634
|
|
|
2058
2635
|
/**
|
|
2059
|
-
*
|
|
2060
|
-
*
|
|
2061
|
-
*
|
|
2062
|
-
*
|
|
2063
|
-
*
|
|
2064
|
-
*
|
|
2636
|
+
* Cap-aware shedding, opt-in. Absent → the composer is exactly what it always
|
|
2637
|
+
* was (every existing caller stays byte-identical, and the no-op path below is
|
|
2638
|
+
* never even reached differently).
|
|
2639
|
+
*
|
|
2640
|
+
* WHY A NUMBER AND A CALLBACK, NOT A PROVIDER ID — the two halves of the video
|
|
2641
|
+
* surface's problem, which the image half did not have:
|
|
2642
|
+
*
|
|
2643
|
+
* - `cap` is the caller's EFFECTIVE ceiling, not `getMaxVideoPromptChars` read
|
|
2644
|
+
* here. The routes compute it with `effectiveVideoPromptCeiling`, which
|
|
2645
|
+
* mirrors `applyVideoNegativePrompt`'s reservation of the `"\nAvoid: …"`
|
|
2646
|
+
* suffix for a provider with no native negative param. Re-deriving the cap
|
|
2647
|
+
* inside this package would put a second copy of that reservation one
|
|
2648
|
+
* refactor away from drifting from the clamp it is supposed to predict.
|
|
2649
|
+
*
|
|
2650
|
+
* - `frame` is the REFERENCE RESOLVER, and it is what makes the shed correct
|
|
2651
|
+
* end-to-end. The fold runs BEFORE `resolveVideoReferenceCore` (see the
|
|
2652
|
+
* module header — folding afterwards strands the scene description past the
|
|
2653
|
+
* identity directives). The resolver then ADDS binding text: legacy's
|
|
2654
|
+
* "Use these characters:" block, hybrid's lock lines and the canonical role
|
|
2655
|
+
* phrases that end its body. None of it is sheddable and all of it is inside
|
|
2656
|
+
* what the clamp measures, so a budget blind to it under-sheds and hands the
|
|
2657
|
+
* remainder to the order-blind cut. Measuring THROUGH the caller's framing
|
|
2658
|
+
* gives both properties at once:
|
|
2659
|
+
* the shed decision sees the final length, while the only thing it can drop
|
|
2660
|
+
* is a hint clause it rendered itself.
|
|
2661
|
+
*
|
|
2662
|
+
* Re-framing a SUBSET of the hints is sound because a hint can never change how
|
|
2663
|
+
* the resolver reads the rest of the body: no registered catalog hint, term or
|
|
2664
|
+
* label contains a `{image:N}` / `{ref:` / `@slug:N` shape
|
|
2665
|
+
* (`__tests__/direction-hint-token-safety.test.ts` pins that for every catalog),
|
|
2666
|
+
* so dropping one cannot renumber or unbind a reference.
|
|
2667
|
+
*/
|
|
2668
|
+
interface VideoPromptCapOptions {
|
|
2669
|
+
/**
|
|
2670
|
+
* The maximum length the FRAMED prompt may reach. Sheds only while the framed
|
|
2671
|
+
* body exceeds it; `undefined` (the default) disables shedding entirely.
|
|
2672
|
+
*/
|
|
2673
|
+
readonly cap?: number;
|
|
2674
|
+
/**
|
|
2675
|
+
* The downstream framing the cap is measured through — the caller's reference
|
|
2676
|
+
* assembly. Identity when omitted (a caller with a cap but no references).
|
|
2677
|
+
* Must be PURE: it is called once per shed iteration, and the caller re-runs
|
|
2678
|
+
* its own real assembly on the returned body afterwards.
|
|
2679
|
+
*/
|
|
2680
|
+
readonly frame?: (body: string | undefined) => string | undefined;
|
|
2681
|
+
}
|
|
2682
|
+
/**
|
|
2683
|
+
* Fold a video run's subject and cinematic-direction ids (and optional
|
|
2684
|
+
* structured fields) into its prompt body.
|
|
2685
|
+
*
|
|
2686
|
+
* IN THE BODY: the SUBJECT hints first (who is in the shot — the noun phrase the
|
|
2687
|
+
* cinematography modifies), then the MOTION direction hints in the registry's
|
|
2688
|
+
* canonical table order (camera motion leads), then the structured fragment —
|
|
2689
|
+
* the same ordering `composePromptText` uses for stills. The LOOK hints leave
|
|
2690
|
+
* the body for the `[style]` section that follows it.
|
|
2691
|
+
*
|
|
2692
|
+
* `subject` rides `opts` rather than a fourth positional parameter on purpose:
|
|
2693
|
+
* every existing caller passes `(prompt, direction)` or
|
|
2694
|
+
* `(prompt, direction, structured)` positionally, and a new positional would
|
|
2695
|
+
* have made the two levers' order a memorization test.
|
|
2696
|
+
*
|
|
2697
|
+
* TRUNCATION ORDERING (opt-in via `opts.cap`): the provider clamp
|
|
2698
|
+
* (`applyVideoNegativePrompt`) slices the prompt TAIL, which is ORDER-BLIND —
|
|
2699
|
+
* on a low-cap provider (kling = 1000) a broad direction renders more than the
|
|
2700
|
+
* whole ceiling and the cut severs reference bindings and the end of the user's
|
|
2701
|
+
* prose while decorative clauses survive. With a cap the composer decides
|
|
2702
|
+
* instead: it knows which clauses are hints because it just rendered them, and
|
|
2703
|
+
* drops them LAST-FOLDED FIRST until the framed prompt fits. Everything else —
|
|
2704
|
+
* the user's prose, the structured fragment (user CONTENT, never a garnish) and
|
|
2705
|
+
* every byte the resolver's framing adds — outranks a hint.
|
|
2706
|
+
*
|
|
2707
|
+
* SUBJECT CLAUSES ARE SHED CANDIDATES TOO, and they shed AFTER the direction
|
|
2708
|
+
* clauses. Both folds are catalog decoration of the same class — ids the
|
|
2709
|
+
* platform rendered into wording — so exempting one would just move the
|
|
2710
|
+
* overflow into the order-blind clamp, which is the bug this machinery exists
|
|
2711
|
+
* to prevent. They ride the SAME `hintClauses` list the shed already walks
|
|
2712
|
+
* (subject first, direction second, tail-first shedding), so there is exactly
|
|
2713
|
+
* one shed arithmetic (`hint-shedding.ts`) across both channels and both
|
|
2714
|
+
* surfaces. Neither channel ever sheds before the prose, the references or the
|
|
2715
|
+
* structured fragment.
|
|
2716
|
+
*
|
|
2717
|
+
* WHAT THE BUDGET DELIBERATELY EXCLUDES: the route's later opt-in identity
|
|
2718
|
+
* injection (an async DB read that appends a canonical description) and any
|
|
2719
|
+
* registered `applyPromptPolicies` transform both run AFTER the reference
|
|
2720
|
+
* assembly and are not modelled here. Pricing them in would mean folding an
|
|
2721
|
+
* await into this pure composer; instead the provider clamp stays their last
|
|
2722
|
+
* resort, exactly as today. Same for a body that still overflows with ZERO
|
|
2723
|
+
* hints left — long prose, or many bound references on their own.
|
|
2724
|
+
*
|
|
2725
|
+
* UNDER-CAP PARITY: the first pass folds every hint, so a prompt that fits is
|
|
2726
|
+
* byte-identical to a capless call, and a caller with no
|
|
2727
|
+
* `subject`/`direction`/`structured` takes the same exact no-op path it always
|
|
2728
|
+
* did.
|
|
2065
2729
|
*
|
|
2066
2730
|
* @param userPrompt The user's prompt. Optional: an image-to-video run may
|
|
2067
2731
|
* legitimately have none, and it is returned as-is when nothing folds.
|
|
@@ -2070,17 +2734,24 @@ declare function assembleImageInput(input: AssembleImageInput): BuildImagePrompt
|
|
|
2070
2734
|
* nothing — never a throw.
|
|
2071
2735
|
* @param structured Path-1 structured fields. Not a `/v1/generate-video` wire
|
|
2072
2736
|
* field today; the canvas orchestrator passes it directly.
|
|
2073
|
-
* @param opts.hintMode Override the verbosity policy (a whole-fold
|
|
2737
|
+
* @param opts.hintMode Override the direction verbosity policy (a whole-fold
|
|
2074
2738
|
* `PickerHintMode`, or a `{ look, motion }` split).
|
|
2739
|
+
* @param opts.subject Flat subject ids (Person / Styling / props), same
|
|
2740
|
+
* inertness contract as `direction`.
|
|
2741
|
+
* @param opts.subjectHintMode Override the subject verbosity policy.
|
|
2742
|
+
* @param opts.cap / `opts.frame` See {@link VideoPromptCapOptions}.
|
|
2075
2743
|
*/
|
|
2076
2744
|
declare function composeVideoPromptText(userPrompt: string | undefined, direction: DirectionFields | undefined, structured?: StructuredPromptFields, opts?: {
|
|
2077
2745
|
readonly hintMode?: DirectionHintMode;
|
|
2078
|
-
|
|
2746
|
+
readonly subject?: SubjectFields;
|
|
2747
|
+
readonly subjectHintMode?: SubjectHintMode;
|
|
2748
|
+
} & VideoPromptCapOptions): string | undefined;
|
|
2079
2749
|
|
|
2080
2750
|
/**
|
|
2081
2751
|
* Narrow readers turning UNTRUSTED persisted node data (`workflows.nodes`
|
|
2082
2752
|
* JSONB — import, MCP write, node preset, a Studio-emitted graph) into the
|
|
2083
|
-
* typed `direction` / `structured` levers `assembleImageInput`
|
|
2753
|
+
* typed `subject` / `direction` / `structured` levers `assembleImageInput`
|
|
2754
|
+
* accepts.
|
|
2084
2755
|
* `buildPayload` has no zod and workflow writes are
|
|
2085
2756
|
* `z.record(z.string(), z.unknown())`, so this blob may have been written years
|
|
2086
2757
|
* ago by any client.
|
|
@@ -2138,6 +2809,28 @@ declare function composeVideoPromptText(userPrompt: string | undefined, directio
|
|
|
2138
2809
|
* entries survive rather than being crowded out by them.
|
|
2139
2810
|
*/
|
|
2140
2811
|
declare function readDirectionFields(value: unknown): DirectionFields | undefined;
|
|
2812
|
+
/**
|
|
2813
|
+
* Read a node's stored SUBJECT ids — the flat Person / Styling / prop bag the
|
|
2814
|
+
* `subject` channel carries. Same three contracts as `readDirectionFields`:
|
|
2815
|
+
* drop-never-throw, `undefined` never `{}`, and bounds shared with the wire
|
|
2816
|
+
* door by CONSTANT (`SUBJECT_ID_MAX_CHARS` / `SUBJECT_ARRAY_CEILING`, which are
|
|
2817
|
+
* defined AS the direction constants) so a body the route accepts and the same
|
|
2818
|
+
* node re-run from the canvas cannot disagree about which strings are ids.
|
|
2819
|
+
*
|
|
2820
|
+
* DERIVED from `getRegisteredSubjectKeys()`, never a hand-authored field list —
|
|
2821
|
+
* that is the whole lesson of `readStructuredFields` below, whose hand table is
|
|
2822
|
+
* only viable because `StructuredPromptFields` is a small hand-authored type.
|
|
2823
|
+
* The subject vocabulary is ~54 catalog-derived fields PLUS deployment-registered
|
|
2824
|
+
* pack dimensions unknown at compile time, so it is read from the registry at
|
|
2825
|
+
* call time. Iterating the KEY SET (never `Object.keys(value)`) is also what
|
|
2826
|
+
* keeps an adversarial blob's key count off the hot path.
|
|
2827
|
+
*
|
|
2828
|
+
* The SEMANTIC per-dimension cap stays the renderer's job
|
|
2829
|
+
* (`normalizeSubjectFields`), exactly as `maxPicks` does for direction: this
|
|
2830
|
+
* reader bounds cardinality only. `customAge` is the one number on the wire and
|
|
2831
|
+
* is passed through finite-only — the renderer clamps it.
|
|
2832
|
+
*/
|
|
2833
|
+
declare function readSubjectFields(value: unknown): SubjectFields | undefined;
|
|
2141
2834
|
/** Read a node's stored Path-1 structured prompt fields. Same drop-never-throw
|
|
2142
2835
|
* and `undefined`-never-`{}` contract as `readDirectionFields`. */
|
|
2143
2836
|
declare function readStructuredFields(value: unknown): StructuredPromptFields | undefined;
|
|
@@ -6493,4 +7186,4 @@ declare function getPickerWiring(nodeType: string | undefined | null): PickerWir
|
|
|
6493
7186
|
*/
|
|
6494
7187
|
declare function buildSurroundFillPrompt(direction: SurroundDirection, userPrompt?: string): string;
|
|
6495
7188
|
|
|
6496
|
-
export { ACTION_FX, ACTION_FX_CATEGORY_LABELS, ACTION_FX_CATEGORY_ORDER, ACTION_FX_IDS, AESTHETICS, AESTHETIC_CATEGORY_LABELS, AESTHETIC_CATEGORY_ORDER, AESTHETIC_IDS, ALL_PICKER_WIRING, ANALYZABLE_PICKER_TYPES, ANGLE_LABELS, ASPECT_RATIO_LABELS, ATMOSPHERES, ATMOSPHERE_IDS, AUDIO_WIZARD_CATEGORIES, type ActionFx, type ActionFxCategory, type Aesthetic, type AestheticCategory, type AssembleImageInput, type AssembleSunoInput, type AssembleSunoResult, type Atmosphere, BACKDROPS, BACKDROP_CATEGORY_LABELS, BACKDROP_CATEGORY_ORDER, BACKDROP_IDS, BRAND_PRESETS, BRAND_PRESET_IDS, BRAND_PRESET_META, type Backdrop, type BackdropCategory, type BrandCasing, type BrandFonts, type BrandLogo, type BrandPalette, type BrandPresetId, type BrandPresetMeta, type BrandTokens, type BrandTypeSpec, type BuildImagePromptConfig, type BuildImagePromptResult, type BuildImagePromptSegmentsResult, CAMERA_FORMATS, CAMERA_FORMAT_IDS, CAMERA_MOTIONS, CAMERA_MOTION_CATEGORY_LABELS, CAMERA_MOTION_CATEGORY_ORDER, CAMERA_MOTION_IDS, CHARACTER_FX, CHARACTER_FX_CATEGORY_LABELS, CHARACTER_FX_CATEGORY_ORDER, CHARACTER_FX_DURATIONS, CHARACTER_FX_IDS, CHARACTER_FX_INTENSITIES, CHARACTER_FX_POSITIONS, CINEMATIC_LOOK_TAIL, COLOR_LOOKS, COLOR_LOOK_CATEGORY_LABELS, COLOR_LOOK_CATEGORY_ORDER, COLOR_LOOK_IDS, COMPOSITION_EFFECTS, COMPOSITION_EFFECT_IDS, type CameraFormat, type CameraMotion, type CameraMotionCategory, type CatalogPack, type CatalogPackMode, type CategorizedInstrument, type CharacterFx, type CharacterFxCategory, type CharacterFxDuration, type CharacterFxIntensity, type CharacterFxPosition, type CharacterFxTiming, type CharacterFxTimingOption, type CharacterMeta, type CharacterMotionPromptInput, type CharacterPromptInput, type ColorLook, type ColorLookCategory, type CompositionEffect, type ComputeNodePromptArgs, type CreaturePromptInput, DEFAULT_IDENTITY_LOCK, DEFAULT_TEMPLATES, DIRECTION_ARRAY_CEILING, DIRECTION_FIELDS, DIRECTION_ID_MAX_CHARS, DIRECTION_KEYS, type DirectionFamily, type DirectionFieldRow, type DirectionFieldSpec, type DirectionFields, type DirectionHintMode, type DirectionKey, type DirectionSurface, ERAS, ERA_CATEGORY_LABELS, ERA_CATEGORY_ORDER, ERA_IDS, EXPOSURE_CATEGORY_LABELS, EXPOSURE_CATEGORY_ORDER, EXPOSURE_FIELD_BY_CATEGORY, EXPOSURE_IDS, EXPOSURE_SETTINGS, type Era, type EraCategory, type ExposureCategory, type ExposureSettings, type ExposureValue, FACTORY_PRESETS, FACTORY_SNIPPETS, FILM_STILL_PREFIX, FRAMINGS, FRAMING_CATEGORY_LABELS, FRAMING_CATEGORY_ORDER, FRAMING_FIELD_BY_CATEGORY, FRAMING_IDS, type FacePromptInput, type FactoryPreset, type FactoryPresetGroup, type FactorySnippet, type Framing, type FramingCategory, type FramingValue, GAPS_SCHEMA, type GeminiOmniI2vInputsArgs, type GeminiOmniI2vInputsResult, HELD_PROPS, HELD_PROP_CATEGORY_LABELS, HELD_PROP_CATEGORY_ORDER, HELD_PROP_IDS, type HeldProp, type HeldPropCategory, IMAGE_HINT_MODE_DEFAULT, IMAGE_REFERENCE_PROMPT_DOCTRINE, IMAGE_WIZARD_CATEGORIES, INSTRUMENTATION_DEFAULT_DATA, INSTRUMENTS, INSTRUMENT_CATEGORY_LABELS, INSTRUMENT_CATEGORY_ORDER, type IdentityLockMode, type ImageDirectionKey, type ImageReferenceDoctrine, type InstrumentCategory, type InstrumentationEntry, LENSES, LENS_IDS, LIGHTINGS, LIGHTING_CATEGORY_LABELS, LIGHTING_CATEGORY_ORDER, LIGHTING_FIELD_BY_CATEGORY, LIGHTING_IDS, LLM_CHAT_WIZARD_CATEGORIES, LOOP_SUBJECTS, LOOP_SUBJECT_CATEGORY_LABELS, LOOP_SUBJECT_CATEGORY_ORDER, type Lens, type Lighting, type LightingCategory, type LightingValue, type LlmChatFieldArgs, type LocationMotionPromptInput, type LocationPromptInput, type LocationRefinePromptInput, type LoopSubject, type LoopSubjectCategory, MATERIALS, MATERIAL_CATEGORY_LABELS, MATERIAL_CATEGORY_ORDER, MATERIAL_IDS, MAX_SELECTED_BY_DIMENSION, MAX_SELECTED_BY_FRAMING_CATEGORY, MAX_SELECTED_BY_STYLING_DIMENSION, MOODS, MOOD_CATEGORY_LABELS, MOOD_CATEGORY_ORDER, MOOD_IDS, MOVEMENT_LABELS, MULTI_PICKER_WIRING, MUSIC_EMOTIONS, MUSIC_ENERGIES, MUSIC_ERAS, MUSIC_GENRES, MUSIC_GENRE_CATEGORY_LABELS, MUSIC_GENRE_CATEGORY_ORDER, MUSIC_GENRE_DEFAULT_DATA, MUSIC_MOOD_DEFAULT_DATA, MUSIC_VIBES, MUSIC_WIZARD_CATEGORIES, type Material, type MaterialCategory, type ModelChange, type Mood, type MoodCategory, type MoodValue, type MultiDimPickerWiring, type MultiPickerAnalyzerSpec, type MusicEra, type MusicGenre, type MusicGenreCategory, type MusicMoodData, type MusicMoodEntry, type MusicSubgenre, NODE_PROMPT_CANDIDATE_FIELDS, NODE_PROMPT_FIELDS, OBJECT_ANGLE_PRESETS, OBJECT_ANGLE_PROMPTS, OBJECT_ASSET_PRESETS, OBJECT_ASSET_PROMPTS, OBJECT_MATERIAL_PRESETS, OBJECT_MATERIAL_PROMPTS, OBJECT_VARIATION_PRESETS, OBJECT_VARIATION_PROMPTS, type ObjectMotionPromptInput, type ObjectPresetAssetType, type ObjectPromptInput, PEOPLE, PERSON_DIMENSION_LABELS, PERSON_DIMENSION_ORDER, PERSON_DIMENSION_SECTIONS, PERSON_FIELD_BY_DIMENSION, PERSON_IDS, PHOTOGRAPHERS, PHOTOGRAPHER_CATEGORY_LABELS, PHOTOGRAPHER_CATEGORY_ORDER, PHOTOGRAPHER_IDS, PHOTO_GENRES, PHOTO_GENRE_CATEGORY_LABELS, PHOTO_GENRE_CATEGORY_ORDER, PHOTO_GENRE_IDS, PICKER_ANALYZER_FAMILIES, PICKER_ANALYZER_REGISTRY, PICKER_CATALOGS, PICKER_TYPES, POSES, POSE_CATEGORY_LABELS, POSE_CATEGORY_ORDER, POSE_IDS, POST_PROCESS_EFFECTS, POST_PROCESS_EFFECT_IDS, PRODUCTION_STYLES, PROMPT_AFFIX_CORE_FIELD_OVERRIDES, PROMPT_AFFIX_NODE_TYPES, PROMPT_HINT_SEPARATOR, PROVIDER_CAPABILITIES, PROVIDER_PROMPT_DOCTRINES, type Person, type PersonDimension, type PersonDimensionSection, type PersonPack, type PersonValue, type PhotoGenre, type PhotoGenreCategory, type Photographer, type PhotographerCategory, type PickerAnalyzer, type PickerAnalyzerDescriptor, type PickerAnalyzerSpec, type PickerApplyMode, type PickerCatalog, type PickerCatalogDetail, type PickerCatalogInput, type PickerCatalogSummary, type PickerDimension, type PickerDimensionInput, type PickerDimensionSpec, type PickerGaps, type PickerHintMode, type PickerOption, type PickerOptionInput, type PickerType, type PickerWiring, type PickerWiringEntry, type Pose, type PoseCategory, type PoseValue, type PostProcessEffect, type ProjectPickerCatalogOptions, type ProjectedPickerCatalog, type ProjectedPickerDimension, type ProjectedPickerOption, type PromptFieldSpec, type PromptIconKind, type PromptSegment, type PromptSegmentOrigin, type ProviderPromptDoctrine, REFERENCE_IMAGE_ROLES, REFERENCE_RULES, REFERENCE_RULES_MULTI_PERSON, REF_BINDING, RENDER_QUALITIES, RENDER_QUALITY_IDS, type RecommendedModel, type RefIdTokenContext, type ReferenceCounts, type RegisteredPersonEntry, type RenderQuality, type ResolveCharacterMentionsResult, type ResolveLocationMentionsResult, type ResolvePromptArgs, type ResolveVideoReferenceCoreArgs, SCENE_FRAME_RULE, SCENE_PROMPT_MAX_LENGTH, SETTINGS, SETTING_CATEGORY_LABELS, SETTING_IDS, SHOT_LABELS, SINGING_STYLES, SINGLE_PICKER_WIRING, SNIPPET_MEDIA_VALUES, STYLES, STYLE_IDS, STYLE_PRESETS, STYLINGS, STYLING_DIMENSION_LABELS, STYLING_DIMENSION_ORDER, STYLING_FIELD_BY_DIMENSION, STYLING_IDS, type Seedance2InputsArgs, type Seedance2InputsResult, type Seedance2Mode, type Setting, type SettingCategory, type SidecarCoverageReport, type SingleDimPickerWiring, type SnippetMedia, type SnippetTarget, type SoundComposition, type SoundCompositionFields, type SoundConsumerType, type StructuredPromptFields, type Style, type StylePreset, type Styling, type StylingDimension, type StylingValue, type SuspiciousTermOptions, TEMPORALS, TEMPORAL_CATEGORY_LABELS, TEMPORAL_CATEGORY_ORDER, TEMPORAL_FIELD_BY_CATEGORY, TEMPORAL_IDS, TERM_MAX_CHARS, TEXT_WIZARD_CATEGORIES, TRANSITIONS, TRANSITION_CATEGORY_LABELS, TRANSITION_CATEGORY_ORDER, TRANSITION_DURATIONS, TRANSITION_IDS, TRANSITION_INTENSITIES, TRANSITION_POSITIONS, type Temporal, type TemporalCategory, type TemporalValue, type TermCarrier, type Transition, type TransitionCategory, type TransitionDuration, type TransitionIntensity, type TransitionPosition, type TransitionTiming, type TransitionTimingOption, VIDEO_HINT_MODE_DEFAULT, VIDEO_WIZARD_CATEGORIES, VOCAL_PRESENCE, VOCAL_PRESENCE_INSTRUMENTAL_ID, VOICE_ACCENTS, VOICE_AGES, VOICE_ARCHETYPES, VOICE_CHARACTER_DEFAULT_DATA, VOICE_DELIVERY_DEFAULT_DATA, VOICE_EMOTIONS, VOICE_GENDERS, VOICE_LANGUAGES, VOICE_PACES, VOICE_TIMBRES, type VeoI2vInputsArgs, type VeoI2vInputsResult, type VideoDirectionKey, type VideoExtraRef, type VoiceCharacterEntry, type VoiceDeliveryEntry, WARDROBE, WARDROBE_CATEGORY_LABELS, WARDROBE_DIMENSION_ORDER, WARDROBE_FIELD_BY_DIMENSION, type WardrobeDimension, type WardrobeEntry, type WardrobeValue, type WizardCategory, type WizardNodeContext, type WizardOption, type WizardQuestion, type WizardSelection, appendField, appendMusicMeta, applyPickerJson, applyPromptAffixes, applyReferenceOrderToVideo, applyTemplate, assembleImageInput, assembleSunoInput, buildActionFxHints, buildActionFxTerms, buildAestheticHints, buildAestheticTerms, buildAgeHint, buildAtmosphereHints, buildAtmosphereTerms, buildCharacterPrompt, buildCreaturePrompt, buildExposureHints, buildExposureTerms, buildFaceTemplateInputs, buildFramingHints, buildFramingTerms, buildHeldPropHints, buildHeldPropTerms, buildIdentityDirectives, buildIdentityLockLine, buildImagePrompt, buildImagePromptSegments, buildInstrumentationHints, buildInstrumentationTerms, buildLightingHints, buildLightingTerms, buildLocationMotionPrompt, buildLocationPrompt, buildLocationRefinePrompt, buildMaterialHints, buildMaterialTerms, buildMoodHints, buildMoodTerms, buildMotionPrompt, buildMultiPickerAnalyzerSpec, buildMusicGenreHints, buildMusicGenreTerms, buildMusicMoodHints, buildMusicMoodTerms, buildObjectMotionPrompt, buildObjectPrompt, buildPersonHints, buildPersonTerms, buildPhotographerHints, buildPhotographerTerms, buildPickerAnalyzerSpec, buildPickerLegend, buildPickerZodSchema, buildPoseHints, buildPoseTerms, buildPostProcessHints, buildPostProcessTerms, buildReferenceBlocks, buildScenePrompt, buildStylingHints, buildStylingTerms, buildSurroundFillPrompt, buildTemporalHints, buildTemporalTerms, buildVoiceCharacterHints, buildVoiceCharacterTerms, buildVoiceDeliveryHints, buildVoiceDeliveryTerms, buildWardrobeHints, catalogPacksVersion, characterLockToRefLock, collectIdentityLockClause, composeCameraMotionHintFromConnections, composeCameraMotionTermFromConnections, composeCharacterFxHintFromConnections, composeNegative, composePickerCatalogs, composeSoundHintFromConnections, composeTransitionHintFromConnections, composeVideoPromptText, computeLlmChatFields, computeNodePrompt, computePackSidecarCoverage, deriveTerm, directionFieldsForSurface, expandImagePositionRefs, expandImageRefTokens, filmStillPrefix, getActionFx, getActionFxLabel, getActionFxPromptHint, getActionFxTerm, getAesthetic, getAestheticLabel, getAestheticPromptHint, getAestheticTerm, getAtmosphere, getAtmosphereLabel, getAtmospherePromptHint, getAtmosphereTerm, getBackdrop, getBackdropLabel, getBackdropPromptHint, getBackdropTerm, getCameraFormat, getCameraFormatLabel, getCameraFormatPromptHint, getCameraFormatTerm, getCameraMotion, getCameraMotionLabel, getCameraMotionPromptHint, getCameraMotionTerm, getCategoriesForNodeType, getCharacterFx, getCharacterFxLabel, getCharacterFxPromptHint, getCharacterFxTerm, getColorLook, getColorLookLabel, getColorLookPromptHint, getColorLookTerm, getCompositionEffect, getCompositionEffectLabel, getCompositionEffectPromptHint, getCompositionEffectTerm, getEffectiveSunoCustomMode, getEra, getEraLabel, getEraPromptHint, getEraTerm, getExposure, getExposureLabel, getExposurePromptHint, getExposureTerm, getFactoryPresets, getFactorySnippets, getFraming, getFramingCategoryLimit, getFramingLabel, getFramingPromptHint, getFramingTerm, getHeldProp, getHeldPropLabel, getHeldPropPromptHint, getHeldPropTerm, getIdentityLockClause, getInstrument, getInstrumentTerm, getLens, getLensLabel, getLensPromptHint, getLensTerm, getLighting, getLightingLabel, getLightingPromptHint, getLightingTerm, getLoopSubject, getLoopSubjectLabel, getLoopSubjectPromptHint, getLoopSubjectTerm, getMaterial, getMaterialLabel, getMaterialPromptHint, getMaterialTerm, getMood, getMoodLabel, getMoodPromptHint, getMoodTerm, getMusicEmotion, getMusicEmotionTerm, getMusicEnergy, getMusicEnergyTerm, getMusicEra, getMusicEraTerm, getMusicGenre, getMusicGenreLabel, getMusicGenreTerm, getMusicSubgenre, getMusicSubgenreTerm, getMusicVibe, getMusicVibeTerm, getParameterPromptHint, getPerson, getPersonDimensionLimit, getPersonLabel, getPersonPromptHint, getPersonTerm, getPhotoGenre, getPhotoGenreLabel, getPhotoGenrePromptHint, getPhotoGenreTerm, getPhotographer, getPhotographerLabel, getPhotographerPromptHint, getPhotographerTerm, getPickerAnalyzer, getPickerCatalog, getPickerWiring, getPose, getPoseLabel, getPosePromptHint, getPoseTerm, getPostProcessEffect, getPostProcessEffectLabel, getPostProcessEffectPromptHint, getPostProcessEffectTerm, getProductionStyle, getProductionStyleTerm, getPromptDoctrine, getPromptFields, getPromptTips, getRegisteredCatalogPacks, getRegisteredPeople, getRegisteredPersonDimensionLabels, getRegisteredPersonDimensionOrder, getRegisteredPersonFieldByDimension, getRegisteredPickerCatalogs, getRenderQuality, getRenderQualityLabel, getRenderQualityPromptHint, getRenderQualityTerm, getSetting, getSettingLabel, getSettingPromptHint, getSettingTerm, getSingingStyle, getSingingStyleTerm, getSnippetMedia, getStyle, getStyleLabel, getStylePreset, getStylePromptHint, getStyleTerm, getStyling, getStylingDimensionLimit, getStylingLabel, getStylingPromptHint, getStylingTerm, getTemporal, getTemporalLabel, getTemporalPromptHint, getTemporalTerm, getTransition, getTransitionLabel, getTransitionPromptHint, getTransitionTerm, getVocalPresence, getVocalPresenceTerm, getVoiceAccent, getVoiceAccentTerm, getVoiceAge, getVoiceAgeTerm, getVoiceArchetype, getVoiceArchetypeTerm, getVoiceEmotion, getVoiceEmotionTerm, getVoiceGender, getVoiceGenderTerm, getVoiceLanguage, getVoiceLanguageTerm, getVoicePace, getVoicePaceTerm, getVoiceTimbre, getVoiceTimbreTerm, getWardrobeEntriesByDimension, getWardrobeEntry, getWardrobePromptHint, groupFactoryPresets, hasUpstreamCharacter, identityRefsSentence, isAnalyzablePicker, isInstrumentalVocal, isSuspiciousDerivedTerm, isVantageFraming, isWizardSupported, joinPromptHints, joinPromptParts, listPickerCatalogs, migratePersonValue, modeForFamily, nodeHasInlinePrompt, nodeHasPromptField, nodeSupportsPromptAffixes, personPacksVersion, pickerFanoutTargets, projectAllCatalogs, projectPickerCatalog, promptAffixCoreField, promptBindsFirstFrame, promptFieldCarriesAffixes, promptPartSeparator, readDirectionFields, readStructuredFields, referenceRulesBlock, registerCatalogPack, registerPersonPack, renderDirectionHints, renderStructuredFields, resetCatalogPacks, resetPersonPacks, resolveBrandInput, resolveCharacterMentions, resolveGeminiOmniI2vInputs, resolveLocationMentions, resolvePrompt, resolveRefIdTokens, resolveReferenceTokens, resolveSeedance2Inputs, resolveTemplate, resolveTerm, resolveVeoI2vInputs, resolveVideoReferenceCore, summarizePickerCatalogs, toIdentityLockMode, truncateForField, truncateText, withForcedIdentityLock };
|
|
7189
|
+
export { ACTION_FX, ACTION_FX_CATEGORY_LABELS, ACTION_FX_CATEGORY_ORDER, ACTION_FX_IDS, AESTHETICS, AESTHETIC_CATEGORY_LABELS, AESTHETIC_CATEGORY_ORDER, AESTHETIC_IDS, ALL_PICKER_WIRING, ANALYZABLE_PICKER_TYPES, ANGLE_LABELS, ASPECT_RATIO_LABELS, ATMOSPHERES, ATMOSPHERE_IDS, AUDIO_WIZARD_CATEGORIES, type ActionFx, type ActionFxCategory, type Aesthetic, type AestheticCategory, type AssembleImageInput, type AssembleSunoInput, type AssembleSunoResult, type Atmosphere, BACKDROPS, BACKDROP_CATEGORY_LABELS, BACKDROP_CATEGORY_ORDER, BACKDROP_IDS, BRAND_PRESETS, BRAND_PRESET_IDS, BRAND_PRESET_META, type Backdrop, type BackdropCategory, type BrandCasing, type BrandFonts, type BrandLogo, type BrandPalette, type BrandPresetId, type BrandPresetMeta, type BrandTokens, type BrandTypeSpec, type BuildImagePromptConfig, type BuildImagePromptOverflowResult, type BuildImagePromptResult, type BuildImagePromptSegmentsResult, CAMERA_FORMATS, CAMERA_FORMAT_IDS, CAMERA_MOTIONS, CAMERA_MOTION_CATEGORY_LABELS, CAMERA_MOTION_CATEGORY_ORDER, CAMERA_MOTION_IDS, CHARACTER_FX, CHARACTER_FX_CATEGORY_LABELS, CHARACTER_FX_CATEGORY_ORDER, CHARACTER_FX_DURATIONS, CHARACTER_FX_IDS, CHARACTER_FX_INTENSITIES, CHARACTER_FX_POSITIONS, CINEMATIC_LOOK_TAIL, COLOR_LOOKS, COLOR_LOOK_CATEGORY_LABELS, COLOR_LOOK_CATEGORY_ORDER, COLOR_LOOK_IDS, COMPOSITION_EFFECTS, COMPOSITION_EFFECT_IDS, type CameraFormat, type CameraMotion, type CameraMotionCategory, type CatalogPack, type CatalogPackMode, type CategorizedInstrument, type CharacterFx, type CharacterFxCategory, type CharacterFxDuration, type CharacterFxIntensity, type CharacterFxPosition, type CharacterFxTiming, type CharacterFxTimingOption, type CharacterMeta, type CharacterMotionPromptInput, type CharacterPromptInput, type ColorLook, type ColorLookCategory, type CompositionEffect, type ComputeNodePromptArgs, type CreaturePromptInput, DEFAULT_IDENTITY_LOCK, DEFAULT_TEMPLATES, DIRECTION_ARRAY_CEILING, DIRECTION_FIELDS, DIRECTION_ID_MAX_CHARS, DIRECTION_KEYS, type DirectionFamily, type DirectionFieldRow, type DirectionFieldSpec, type DirectionFields, type DirectionHintClause, type DirectionHintMode, type DirectionKey, type DirectionStyleGroup, type DirectionSurface, ERAS, ERA_CATEGORY_LABELS, ERA_CATEGORY_ORDER, ERA_IDS, EXPOSURE_CATEGORY_LABELS, EXPOSURE_CATEGORY_ORDER, EXPOSURE_FIELD_BY_CATEGORY, EXPOSURE_IDS, EXPOSURE_SETTINGS, type Era, type EraCategory, type ExposureCategory, type ExposureSettings, type ExposureValue, FACTORY_PRESETS, FACTORY_SNIPPETS, FILM_STILL_PREFIX, FILM_STYLE_KEYS, FRAMINGS, FRAMING_CATEGORY_LABELS, FRAMING_CATEGORY_ORDER, FRAMING_FIELD_BY_CATEGORY, FRAMING_IDS, type FacePromptInput, type FactoryPreset, type FactoryPresetGroup, type FactorySnippet, type Framing, type FramingCategory, type FramingValue, GAPS_SCHEMA, type GeminiOmniI2vInputsArgs, type GeminiOmniI2vInputsResult, HELD_PROPS, HELD_PROP_CATEGORY_LABELS, HELD_PROP_CATEGORY_ORDER, HELD_PROP_IDS, type HeldProp, type HeldPropCategory, IMAGE_HINT_MODE_DEFAULT, IMAGE_REFERENCE_PROMPT_DOCTRINE, IMAGE_WIZARD_CATEGORIES, INSTRUMENTATION_DEFAULT_DATA, INSTRUMENTS, INSTRUMENT_CATEGORY_LABELS, INSTRUMENT_CATEGORY_ORDER, type IdentityLockMode, type ImageDirectionKey, type ImageReferenceDoctrine, type InstrumentCategory, type InstrumentationEntry, LENSES, LENS_IDS, LIGHTINGS, LIGHTING_CATEGORY_LABELS, LIGHTING_CATEGORY_ORDER, LIGHTING_FIELD_BY_CATEGORY, LIGHTING_IDS, LLM_CHAT_WIZARD_CATEGORIES, LOOP_SUBJECTS, LOOP_SUBJECT_CATEGORY_LABELS, LOOP_SUBJECT_CATEGORY_ORDER, type Lens, type Lighting, type LightingCategory, type LightingValue, type LlmChatFieldArgs, type LocationMotionPromptInput, type LocationPromptInput, type LocationRefinePromptInput, type LoopSubject, type LoopSubjectCategory, MATERIALS, MATERIAL_CATEGORY_LABELS, MATERIAL_CATEGORY_ORDER, MATERIAL_IDS, MAX_SELECTED_BY_DIMENSION, MAX_SELECTED_BY_FRAMING_CATEGORY, MAX_SELECTED_BY_STYLING_DIMENSION, MAX_SUBJECT_KEYS, MOODS, MOOD_CATEGORY_LABELS, MOOD_CATEGORY_ORDER, MOOD_IDS, MOVEMENT_LABELS, MULTI_PICKER_WIRING, MUSIC_EMOTIONS, MUSIC_ENERGIES, MUSIC_ERAS, MUSIC_GENRES, MUSIC_GENRE_CATEGORY_LABELS, MUSIC_GENRE_CATEGORY_ORDER, MUSIC_GENRE_DEFAULT_DATA, MUSIC_MOOD_DEFAULT_DATA, MUSIC_VIBES, MUSIC_WIZARD_CATEGORIES, type Material, type MaterialCategory, type ModelChange, type Mood, type MoodCategory, type MoodValue, type MultiDimPickerWiring, type MultiPickerAnalyzerSpec, type MusicEra, type MusicGenre, type MusicGenreCategory, type MusicMoodData, type MusicMoodEntry, type MusicSubgenre, NODE_PROMPT_CANDIDATE_FIELDS, NODE_PROMPT_FIELDS, OBJECT_ANGLE_PRESETS, OBJECT_ANGLE_PROMPTS, OBJECT_ASSET_PRESETS, OBJECT_ASSET_PROMPTS, OBJECT_MATERIAL_PRESETS, OBJECT_MATERIAL_PROMPTS, OBJECT_VARIATION_PRESETS, OBJECT_VARIATION_PROMPTS, type ObjectMotionPromptInput, type ObjectPresetAssetType, type ObjectPromptInput, PEOPLE, PERSON_DIMENSION_LABELS, PERSON_DIMENSION_ORDER, PERSON_DIMENSION_SECTIONS, PERSON_FIELD_BY_DIMENSION, PERSON_IDS, PHOTOGRAPHERS, PHOTOGRAPHER_CATEGORY_LABELS, PHOTOGRAPHER_CATEGORY_ORDER, PHOTOGRAPHER_IDS, PHOTO_GENRES, PHOTO_GENRE_CATEGORY_LABELS, PHOTO_GENRE_CATEGORY_ORDER, PHOTO_GENRE_IDS, PICKER_ANALYZER_FAMILIES, PICKER_ANALYZER_REGISTRY, PICKER_CATALOGS, PICKER_TYPES, POSES, POSE_CATEGORY_LABELS, POSE_CATEGORY_ORDER, POSE_IDS, POST_PROCESS_EFFECTS, POST_PROCESS_EFFECT_IDS, PRODUCTION_STYLES, PROMPT_AFFIX_CORE_FIELD_OVERRIDES, PROMPT_AFFIX_NODE_TYPES, PROMPT_HINT_SEPARATOR, PROVIDER_CAPABILITIES, PROVIDER_PROMPT_DOCTRINES, type Person, type PersonDimension, type PersonDimensionSection, type PersonPack, type PersonValue, type PhotoGenre, type PhotoGenreCategory, type Photographer, type PhotographerCategory, type PickerAnalyzer, type PickerAnalyzerDescriptor, type PickerAnalyzerSpec, type PickerApplyMode, type PickerCatalog, type PickerCatalogDetail, type PickerCatalogInput, type PickerCatalogSummary, type PickerDimension, type PickerDimensionInput, type PickerDimensionSpec, type PickerGaps, type PickerHintMode, type PickerOption, type PickerOptionInput, type PickerType, type PickerWiring, type PickerWiringEntry, type Pose, type PoseCategory, type PoseValue, type PostProcessEffect, type ProjectPickerCatalogOptions, type ProjectedPickerCatalog, type ProjectedPickerDimension, type ProjectedPickerOption, type PromptClauseSlot, type PromptFieldSpec, type PromptIconKind, type PromptSegment, type PromptSegmentOrigin, type ProviderPromptDoctrine, REFERENCE_IMAGE_ROLES, REFERENCE_RULES, REFERENCE_RULES_MULTI_PERSON, REF_BINDING, RENDER_QUALITIES, RENDER_QUALITY_IDS, type RecommendedModel, type RefIdTokenContext, type ReferenceCounts, type RegisteredPersonEntry, type RenderQuality, type ResolveCharacterMentionsResult, type ResolveLocationMentionsResult, type ResolvePromptArgs, type ResolveVideoReferenceCoreArgs, SCENE_FRAME_RULE, SCENE_PROMPT_MAX_LENGTH, SETTINGS, SETTING_CATEGORY_LABELS, SETTING_IDS, SHOT_LABELS, SINGING_STYLES, SINGLE_PICKER_WIRING, SNIPPET_MEDIA_VALUES, STYLES, STYLE_IDS, STYLE_PRESETS, STYLE_SECTION_GAP, STYLE_SECTION_HEADER, STYLINGS, STYLING_DIMENSION_LABELS, STYLING_DIMENSION_ORDER, STYLING_FIELD_BY_DIMENSION, STYLING_IDS, SUBJECT_ARRAY_CEILING, SUBJECT_CUSTOM_AGE_KEY, SUBJECT_FIELDS, SUBJECT_FOLD_KEYS, SUBJECT_ID_MAX_CHARS, SUBJECT_IMAGE_HINT_MODE_DEFAULT, SUBJECT_KEYS, SUBJECT_KEY_MAX_CHARS, SUBJECT_VIDEO_HINT_MODE_DEFAULT, type Seedance2InputsArgs, type Seedance2InputsResult, type Seedance2Mode, type Setting, type SettingCategory, type SidecarCoverageReport, type SingleDimPickerWiring, type SlottedPromptClause, type SnippetMedia, type SnippetTarget, type SoundComposition, type SoundCompositionFields, type SoundConsumerType, type StructuredPromptFields, type Style, type StylePreset, type Styling, type StylingDimension, type StylingValue, type SubjectFieldRow, type SubjectFieldSpec, type SubjectFields, type SubjectGroupFieldSpec, type SubjectHintMode, type SubjectIdsFieldSpec, type SubjectSurface, type SuspiciousTermOptions, TEMPORALS, TEMPORAL_CATEGORY_LABELS, TEMPORAL_CATEGORY_ORDER, TEMPORAL_FIELD_BY_CATEGORY, TEMPORAL_IDS, TERM_MAX_CHARS, TEXT_WIZARD_CATEGORIES, TRANSITIONS, TRANSITION_CATEGORY_LABELS, TRANSITION_CATEGORY_ORDER, TRANSITION_DURATIONS, TRANSITION_IDS, TRANSITION_INTENSITIES, TRANSITION_POSITIONS, type Temporal, type TemporalCategory, type TemporalValue, type TermCarrier, type Transition, type TransitionCategory, type TransitionDuration, type TransitionIntensity, type TransitionPosition, type TransitionTiming, type TransitionTimingOption, VIDEO_HINT_MODE_DEFAULT, VIDEO_WIZARD_CATEGORIES, VOCAL_PRESENCE, VOCAL_PRESENCE_INSTRUMENTAL_ID, VOICE_ACCENTS, VOICE_AGES, VOICE_ARCHETYPES, VOICE_CHARACTER_DEFAULT_DATA, VOICE_DELIVERY_DEFAULT_DATA, VOICE_EMOTIONS, VOICE_GENDERS, VOICE_LANGUAGES, VOICE_PACES, VOICE_TIMBRES, type VeoI2vInputsArgs, type VeoI2vInputsResult, type VideoDirectionKey, type VideoExtraRef, type VideoPromptCapOptions, type VoiceCharacterEntry, type VoiceDeliveryEntry, WARDROBE, WARDROBE_CATEGORY_LABELS, WARDROBE_DIMENSION_ORDER, WARDROBE_FIELD_BY_DIMENSION, type WardrobeDimension, type WardrobeEntry, type WardrobeValue, type WizardCategory, type WizardNodeContext, type WizardOption, type WizardQuestion, type WizardSelection, appendField, appendMusicMeta, applyPickerJson, applyPromptAffixes, applyReferenceOrderToVideo, applyTemplate, asBodyClauses, assembleImageInput, assembleSunoInput, buildActionFxHints, buildActionFxTerms, buildAestheticHints, buildAestheticTerms, buildAgeHint, buildAtmosphereHints, buildAtmosphereTerms, buildCharacterPrompt, buildCreaturePrompt, buildExposureHints, buildExposureTerms, buildFaceTemplateInputs, buildFramingHints, buildFramingTerms, buildHeldPropHints, buildHeldPropTerms, buildIdentityDirectives, buildIdentityLockLine, buildImagePrompt, buildImagePromptSegments, buildImagePromptWithOverflow, buildInstrumentationHints, buildInstrumentationTerms, buildLightingHints, buildLightingTerms, buildLocationMotionPrompt, buildLocationPrompt, buildLocationRefinePrompt, buildMaterialHints, buildMaterialTerms, buildMoodHints, buildMoodTerms, buildMotionPrompt, buildMultiPickerAnalyzerSpec, buildMusicGenreHints, buildMusicGenreTerms, buildMusicMoodHints, buildMusicMoodTerms, buildObjectMotionPrompt, buildObjectPrompt, buildPersonHints, buildPersonTerms, buildPhotographerHints, buildPhotographerTerms, buildPickerAnalyzerSpec, buildPickerLegend, buildPickerZodSchema, buildPoseHints, buildPoseTerms, buildPostProcessHints, buildPostProcessTerms, buildReferenceBlocks, buildScenePrompt, buildStylingHints, buildStylingTerms, buildSurroundFillPrompt, buildTemporalHints, buildTemporalTerms, buildVoiceCharacterHints, buildVoiceCharacterTerms, buildVoiceDeliveryHints, buildVoiceDeliveryTerms, buildWardrobeHints, catalogPacksVersion, characterLockToRefLock, collectIdentityLockClause, composeCameraMotionHintFromConnections, composeCameraMotionTermFromConnections, composeCharacterFxHintFromConnections, composeNegative, composePickerCatalogs, composeSectionedPrompt, composeSoundHintFromConnections, composeTransitionHintFromConnections, composeVideoPromptText, computeLlmChatFields, computeNodePrompt, computePackSidecarCoverage, deriveTerm, directionFieldsForSurface, endsInsideStyleSection, expandImagePositionRefs, expandImageRefTokens, filmStillPrefix, getActionFx, getActionFxLabel, getActionFxPromptHint, getActionFxTerm, getAesthetic, getAestheticLabel, getAestheticPromptHint, getAestheticTerm, getAtmosphere, getAtmosphereLabel, getAtmospherePromptHint, getAtmosphereTerm, getBackdrop, getBackdropLabel, getBackdropPromptHint, getBackdropTerm, getCameraFormat, getCameraFormatLabel, getCameraFormatPromptHint, getCameraFormatTerm, getCameraMotion, getCameraMotionLabel, getCameraMotionPromptHint, getCameraMotionTerm, getCategoriesForNodeType, getCharacterFx, getCharacterFxLabel, getCharacterFxPromptHint, getCharacterFxTerm, getColorLook, getColorLookLabel, getColorLookPromptHint, getColorLookTerm, getCompositionEffect, getCompositionEffectLabel, getCompositionEffectPromptHint, getCompositionEffectTerm, getEffectiveSunoCustomMode, getEra, getEraLabel, getEraPromptHint, getEraTerm, getExposure, getExposureLabel, getExposurePromptHint, getExposureTerm, getFactoryPresets, getFactorySnippets, getFraming, getFramingCategoryLimit, getFramingLabel, getFramingPromptHint, getFramingTerm, getHeldProp, getHeldPropLabel, getHeldPropPromptHint, getHeldPropTerm, getIdentityLockClause, getInstrument, getInstrumentTerm, getLens, getLensLabel, getLensPromptHint, getLensTerm, getLighting, getLightingLabel, getLightingPromptHint, getLightingTerm, getLoopSubject, getLoopSubjectLabel, getLoopSubjectPromptHint, getLoopSubjectTerm, getMaterial, getMaterialLabel, getMaterialPromptHint, getMaterialTerm, getMood, getMoodLabel, getMoodPromptHint, getMoodTerm, getMusicEmotion, getMusicEmotionTerm, getMusicEnergy, getMusicEnergyTerm, getMusicEra, getMusicEraTerm, getMusicGenre, getMusicGenreLabel, getMusicGenreTerm, getMusicSubgenre, getMusicSubgenreTerm, getMusicVibe, getMusicVibeTerm, getParameterPromptHint, getPerson, getPersonDimensionLimit, getPersonLabel, getPersonPromptHint, getPersonTerm, getPhotoGenre, getPhotoGenreLabel, getPhotoGenrePromptHint, getPhotoGenreTerm, getPhotographer, getPhotographerLabel, getPhotographerPromptHint, getPhotographerTerm, getPickerAnalyzer, getPickerCatalog, getPickerWiring, getPose, getPoseLabel, getPosePromptHint, getPoseTerm, getPostProcessEffect, getPostProcessEffectLabel, getPostProcessEffectPromptHint, getPostProcessEffectTerm, getProductionStyle, getProductionStyleTerm, getPromptDoctrine, getPromptFields, getPromptTips, getRegisteredCatalogPacks, getRegisteredPeople, getRegisteredPersonDimensionLabels, getRegisteredPersonDimensionOrder, getRegisteredPersonFieldByDimension, getRegisteredPickerCatalogs, getRegisteredSubjectKeys, getRenderQuality, getRenderQualityLabel, getRenderQualityPromptHint, getRenderQualityTerm, getSetting, getSettingLabel, getSettingPromptHint, getSettingTerm, getSingingStyle, getSingingStyleTerm, getSnippetMedia, getStyle, getStyleLabel, getStylePreset, getStylePromptHint, getStyleTerm, getStyling, getStylingDimensionLimit, getStylingLabel, getStylingPromptHint, getStylingTerm, getTemporal, getTemporalLabel, getTemporalPromptHint, getTemporalTerm, getTransition, getTransitionLabel, getTransitionPromptHint, getTransitionTerm, getVocalPresence, getVocalPresenceTerm, getVoiceAccent, getVoiceAccentTerm, getVoiceAge, getVoiceAgeTerm, getVoiceArchetype, getVoiceArchetypeTerm, getVoiceEmotion, getVoiceEmotionTerm, getVoiceGender, getVoiceGenderTerm, getVoiceLanguage, getVoiceLanguageTerm, getVoicePace, getVoicePaceTerm, getVoiceTimbre, getVoiceTimbreTerm, getWardrobeEntriesByDimension, getWardrobeEntry, getWardrobePromptHint, groupFactoryPresets, hasUpstreamCharacter, identityRefsSentence, insertBeforeStyleSection, isAnalyzablePicker, isInstrumentalVocal, isSuspiciousDerivedTerm, isVantageFraming, isWizardSupported, joinPromptHints, joinPromptParts, keepableDirectionHints, listPickerCatalogs, migratePersonValue, modeForFamily, nodeHasInlinePrompt, nodeHasPromptField, nodeSupportsPromptAffixes, normalizeSubjectFields, partitionStyleClauses, personPacksVersion, pickerFanoutTargets, projectAllCatalogs, projectPickerCatalog, promptAffixCoreField, promptBindsFirstFrame, promptFieldCarriesAffixes, promptPartSeparator, readDirectionFields, readStructuredFields, readSubjectFields, referenceRulesBlock, registerCatalogPack, registerPersonPack, renderDirectionHintClauses, renderDirectionHints, renderStructuredFields, renderStyleSection, renderSubjectHints, resetCatalogPacks, resetPersonPacks, resolveBrandInput, resolveCharacterMentions, resolveGeminiOmniI2vInputs, resolveLocationMentions, resolvePrompt, resolveRefIdTokens, resolveReferenceTokens, resolveSeedance2Inputs, resolveTemplate, resolveTerm, resolveVeoI2vInputs, resolveVideoReferenceCore, sectionedClauseCosts, splitStyleSection, styleSectionFromClauses, styleSlotFor, subjectFieldsForSurface, summarizePickerCatalogs, toIdentityLockMode, truncateForField, truncateText, withForcedIdentityLock };
|