@nodaro/prompts 1.20.0 → 1.23.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 +8214 -7143
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +213 -61
- package/dist/index.d.ts +213 -61
- package/dist/index.js +8206 -7145
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/adult-only-ratchet.test.ts +9 -1
- package/src/__tests__/catalog-packs.test.ts +13 -0
- package/src/__tests__/character-motion-audit.test.ts +77 -0
- package/src/__tests__/character-motion-exit-visibility.test.ts +183 -0
- package/src/__tests__/character-motion-partner-referent.test.ts +225 -0
- package/src/__tests__/character-motion.test.ts +11 -4
- package/src/__tests__/factory-presets.test.ts +28 -3
- package/src/__tests__/fixtures/parameter-hint-golden.json +22 -6
- package/src/__tests__/frame-delivery.test.ts +93 -0
- package/src/__tests__/graph-composed-unwired-identity.test.ts +166 -0
- package/src/__tests__/node-prompt-fields.test.ts +2 -2
- package/src/__tests__/parameter-prompt-hint.test.ts +9 -3
- package/src/__tests__/transitions-instant.test.ts +112 -0
- package/src/ad-creative-analysis.ts +99 -0
- package/src/catalog-packs.ts +13 -2
- package/src/character-motion/animals-pets.ts +112 -85
- package/src/character-motion/athletic-stunts.ts +155 -214
- package/src/character-motion/camera-interaction.ts +92 -133
- package/src/character-motion/combat-weapons.ts +143 -202
- package/src/character-motion/dance.ts +121 -169
- package/src/character-motion/entrances-exits.ts +88 -109
- package/src/character-motion/evasive-falls.ts +88 -130
- package/src/character-motion/everyday-actions.ts +233 -274
- package/src/character-motion/face-expression.ts +125 -178
- package/src/character-motion/gestures.ts +211 -304
- package/src/character-motion/head-gestures.ts +66 -94
- package/src/character-motion/idle-ambient.ts +85 -124
- package/src/character-motion/posture-shifts.ts +116 -139
- package/src/character-motion/runway.ts +73 -97
- package/src/character-motion/stage-performance.ts +92 -127
- package/src/character-motion/turns-looks.ts +86 -112
- package/src/character-motion/two-person.ts +241 -229
- package/src/character-motion/types.ts +4 -1
- package/src/character-motion/unnatural-horror.ts +53 -91
- package/src/character-motion/vehicles-mounts.ts +101 -97
- package/src/character-motion/walks-runs.ts +93 -121
- package/src/character-motion-diagnostics.ts +49 -0
- package/src/character-motion.ts +89 -13
- package/src/factory-presets/generate-video.ts +22 -0
- package/src/frame-delivery.ts +106 -0
- package/src/index.ts +7 -0
- package/src/node-prompt-fields.ts +4 -0
- package/src/parameter-prompt-hint.ts +23 -17
- package/src/picker-catalogs.ts +23 -2
- package/src/ref-binding.ts +19 -0
- package/src/transitions.ts +47 -10
- package/src/video-reference-resolver.ts +1 -1
|
@@ -1,125 +1,97 @@
|
|
|
1
1
|
import type { CharacterMotion } from "./types.js"
|
|
2
2
|
|
|
3
|
-
/**
|
|
3
|
+
/** walks-runs — authored motion fragments. Stable ids survive copy revisions. */
|
|
4
4
|
export const WALKS_RUNS_MOTIONS: ReadonlyArray<CharacterMotion> = [
|
|
5
|
-
{ id: "stroll-casually", label: "Casual
|
|
6
|
-
promptHint: "the subject strolls forward with short relaxed steps, weight rolling easily heel to toe, arms swinging loosely at the sides, shoulders down and head drifting to look around",
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
{ id: "
|
|
12
|
-
promptHint: "the subject
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
{ id: "
|
|
18
|
-
promptHint: "the subject
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
{ id: "
|
|
24
|
-
promptHint: "the subject
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
{ id: "
|
|
30
|
-
promptHint: "the subject
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
{ id: "
|
|
36
|
-
promptHint: "the subject
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
term: "
|
|
41
|
-
{ id: "
|
|
42
|
-
promptHint: "the subject
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
term: "
|
|
47
|
-
{ id: "
|
|
48
|
-
promptHint: "the subject
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
{ id: "
|
|
54
|
-
promptHint: "the subject
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
{ id: "
|
|
60
|
-
promptHint: "the subject
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
{ id: "
|
|
66
|
-
promptHint: "the subject
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
term: "
|
|
71
|
-
{ id: "
|
|
72
|
-
promptHint: "the subject
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
{ id: "
|
|
78
|
-
promptHint: "the subject
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
{ id: "
|
|
84
|
-
promptHint: "the subject
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
term: "shoulders through the crowd" },
|
|
98
|
-
{ id: "sidle-along-wall", label: "Sidle Along Wall", category: "walks-runs", description: "Back and palms flat to the wall, side-stepping",
|
|
99
|
-
promptHint: "the subject sidles along the wall with back and palms pressed flat against it, stepping sideways one foot after the other, knees soft, head turned to watch the direction of travel",
|
|
100
|
-
term: "sidles along the wall, back pressed" },
|
|
101
|
-
{ id: "stomp-off-angrily", label: "Stomp Off", category: "walks-runs", description: "Storms away, flat heavy stamps, fists clenched",
|
|
102
|
-
promptHint: "the subject turns sharply and stomps off, each foot slamming down flat and heavy, fists clenched and arms swinging stiffly, shoulders squared and head held rigidly forward without looking back",
|
|
103
|
-
term: "stomps off, fists clenched" },
|
|
104
|
-
{ id: "zombie-shamble", label: "Zombie Shamble", category: "walks-runs", description: "Stiff outstretched arms, pitched torso, one foot dragging",
|
|
105
|
-
promptHint: "the subject shambles forward with both arms held stiffly outstretched, torso pitched forward off balance, one leg dragging behind as the other lurches ahead, head hanging to one side and jaw slack",
|
|
106
|
-
term: "shambles, arms stiffly outstretched" },
|
|
107
|
-
{ id: "sleepwalk-forward", label: "Sleepwalk", category: "walks-runs", description: "Eyes half-closed, arms out ahead, flat-footed drift",
|
|
108
|
-
promptHint: "the subject sleepwalks forward with eyes half-closed and face slack, both arms extended straight ahead, flat-footed steps drifting in a straight line, the body upright and not reacting to anything around it",
|
|
109
|
-
term: "sleepwalks, arms held out ahead" },
|
|
110
|
-
{ id: "run-in-circles", label: "Run in Circles", category: "walks-runs", description: "Tight looping run, body leaning into the turn",
|
|
111
|
-
promptHint: "the subject runs in tight circles, body leaning into the turn, inside foot pivoting on each stride while the outside leg pushes wide, arms held out and head whipping around to keep looking ahead",
|
|
112
|
-
term: "runs in tight circles" },
|
|
113
|
-
{ id: "brace-against-wind", label: "Brace Against Wind", category: "walks-runs", description: "Torso pitched forward, forearm shielding the face",
|
|
114
|
-
promptHint: "the subject leans hard into the wind, torso pitched forward with one shoulder dropped, forearm raised to shield the face, feet planting wide in short braced steps that fight for every stride",
|
|
115
|
-
term: "leans into the wind, forearm up" },
|
|
116
|
-
{ id: "walk-with-cane", label: "Walk with Cane", category: "walks-runs", description: "Cane plants in time with the opposite foot",
|
|
117
|
-
promptHint: "the subject walks forward with a cane, planting its tip ahead in time with the opposite foot, weight leaning briefly onto the cane hand as the other leg swings through, steps short and even",
|
|
118
|
-
term: "walks with a cane" },
|
|
119
|
-
{ id: "roll-forward-in-wheelchair", label: "Wheelchair Roll", category: "walks-runs", description: "Both hands drive the push rims in matched strokes",
|
|
120
|
-
promptHint: "the subject rolls forward in a wheelchair, both hands gripping the push rims and driving them forward in matched strokes, shoulders rounding on each push and releasing on the return, chin up and looking ahead",
|
|
121
|
-
term: "rolls forward in a wheelchair" },
|
|
122
|
-
{ id: "pull-rolling-suitcase", label: "Pull Rolling Suitcase", category: "walks-runs", description: "One arm trailing back on the handle, case on its wheels",
|
|
123
|
-
promptHint: "the subject walks forward pulling a rolling suitcase, one arm trailing straight back to the extended handle, the case tilted onto its wheels behind, torso angled slightly toward the free side and the other arm swinging",
|
|
124
|
-
term: "walks pulling a rolling suitcase" },
|
|
5
|
+
{ "id": "stroll-casually", "label": "Casual stroll", "category": "walks-runs", "description": "Relaxed unhurried walk, loose arms, easy steps",
|
|
6
|
+
"promptHint": "the subject strolls forward with short relaxed steps, weight rolling easily heel to toe, arms swinging loosely at the sides, shoulders down and head drifting to look around", "term": "strolls casually, arms loose" },
|
|
7
|
+
{ "id": "walk-briskly", "label": "Brisk walk", "category": "walks-runs", "description": "Purposeful clipped steps, arms swinging",
|
|
8
|
+
"promptHint": "the subject walks briskly with clipped purposeful steps, heels striking firmly, arms swinging in a tight rhythm, torso upright and eyes fixed on a point ahead", "term": "walks briskly with purpose" },
|
|
9
|
+
{ "id": "power-walk", "label": "Power walk", "category": "walks-runs", "description": "Fitness walk, elbows bent, arms pumping hard",
|
|
10
|
+
"promptHint": "the subject power-walks with elbows bent at ninety degrees and arms pumping hard, pelvis driving each long stride, heels planting and toes pushing off with visible effort", "term": "power-walks, arms pumping" },
|
|
11
|
+
{ "id": "stride-confidently", "label": "Confident stride", "category": "walks-runs", "description": "Long even strides, chest up, shoulders back",
|
|
12
|
+
"promptHint": "the subject strides forward with long even steps, chest lifted and shoulders back, arms swinging in a full relaxed arc, each foot landing squarely with the weight committed", "term": "strides forward confidently" },
|
|
13
|
+
{ "id": "jog-forward", "label": "Jog", "category": "walks-runs", "description": "Light steady run, elbows bent, gentle bounce",
|
|
14
|
+
"promptHint": "the subject jogs forward, elbows bent and hands loose near the waist, short strides landing midfoot, a gentle bounce in each step and breathing even", "term": "jogs forward, elbows bent" },
|
|
15
|
+
{ "id": "sprint-flat-out", "label": "Sprint", "category": "walks-runs", "description": "All-out run, knees driving, arms pumping",
|
|
16
|
+
"promptHint": "the subject sprints flat out, torso leaning forward, knees driving high, arms pumping in sharp opposition, feet striking on the balls and pushing off hard behind", "term": "sprints flat out" },
|
|
17
|
+
{ "id": "tiptoe-forward", "label": "Tiptoe", "category": "walks-runs", "description": "Heels lifted, small careful steps on the toes",
|
|
18
|
+
"promptHint": "the subject rises onto the balls of the feet and tiptoes forward with heels lifted, small careful steps, arms held slightly out for balance and shoulders raised", "term": "tiptoes forward, heels lifted" },
|
|
19
|
+
{ "id": "sneak-forward", "label": "Sneak", "category": "walks-runs", "description": "Low crouch, soft toe-first steps, eyes scanning",
|
|
20
|
+
"promptHint": "the subject sneaks forward in a low crouch, knees bent, placing each foot down softly toe first, arms drawn in close to the body, head turning to check both sides", "term": "sneaks forward in a crouch" },
|
|
21
|
+
{ "id": "stagger-unsteadily", "label": "Stagger", "category": "walks-runs", "description": "Weaving unsteady walk, arms out for balance",
|
|
22
|
+
"promptHint": "the subject staggers forward unsteadily, weight lurching from one foot to the other, path weaving side to side, arms floating out to catch balance and head lolling", "term": "staggers unsteadily, weaving" },
|
|
23
|
+
{ "id": "limp-forward", "label": "Limp", "category": "walks-runs", "description": "Favoring one leg, uneven dipping gait",
|
|
24
|
+
"promptHint": "the subject limps forward favoring one leg, the stiff leg taking a short guarded step while the other swings through, the body dipping on each weighted step", "term": "limps, favoring one leg" },
|
|
25
|
+
{ "id": "march-in-cadence", "label": "March", "category": "walks-runs", "description": "Military cadence, high knees, stiff arm swing",
|
|
26
|
+
"promptHint": "the subject marches forward in strict military cadence, knees lifting high, legs snapping straight, arms swinging stiffly shoulder-high in opposition, spine rigid and chin level", "term": "marches in military cadence" },
|
|
27
|
+
{ "id": "walk-backwards", "label": "Walk backwards", "category": "walks-runs", "description": "Stepping backward, glancing over one shoulder",
|
|
28
|
+
"promptHint": "the subject walks backwards, each foot reaching behind and landing toe first before the heel settles, weight shifting carefully, glancing over one shoulder to check the path", "term": "walks backwards" },
|
|
29
|
+
{ "id": "skip-along", "label": "Skip", "category": "walks-runs", "description": "Step-hop bounce on alternating feet",
|
|
30
|
+
"promptHint": "the subject skips forward in a step-hop rhythm, alternating feet, bouncing up off each hop with arms swinging freely and a light springy lift through the whole body", "term": "skips along" },
|
|
31
|
+
{ "id": "hop-on-one-foot", "label": "Hop", "category": "walks-runs", "description": "Bounding forward on one foot",
|
|
32
|
+
"promptHint": "the subject hops forward on one foot, the other leg bent and lifted, arms pumping with each push-off, landing and springing again in a chain of small bounds", "term": "hops on one foot" },
|
|
33
|
+
{ "id": "crawl-on-all-fours", "label": "Crawl", "category": "walks-runs", "description": "Hands and knees, opposite limbs advancing",
|
|
34
|
+
"promptHint": "the subject crawls forward on hands and knees, opposite hand and knee advancing together, back level, head lifted to look ahead as the weight rocks from limb to limb", "term": "crawls on hands and knees" },
|
|
35
|
+
{ "id": "army-crawl-forward", "label": "Army crawl", "category": "walks-runs", "description": "Flat on the belly, pulling forward on elbows",
|
|
36
|
+
"promptHint": "the subject drops flat and army-crawls forward on the belly, dragging the body along with alternating elbows and knees, head kept low and chest pressed to the ground", "term": "army-crawls on the belly" },
|
|
37
|
+
{ "id": "wade-through-water", "label": "Wade", "category": "walks-runs", "description": "High deliberate steps against the water's drag",
|
|
38
|
+
"promptHint": "the subject wades forward through the water, lifting each knee high and pushing it through against the drag, arms raised clear of the surface, torso leaning slightly into each step as the weight commits late", "term": "wades through water" },
|
|
39
|
+
{ "id": "shuffle-forward", "label": "Shuffle", "category": "walks-runs", "description": "Feet barely leaving the ground, slumped",
|
|
40
|
+
"promptHint": "the subject shuffles forward with feet barely leaving the ground, short scuffing steps, shoulders slumped, arms hanging still and the head bowed", "term": "shuffles, feet scuffing the ground" },
|
|
41
|
+
{ "id": "scurry-forward", "label": "Scurry", "category": "walks-runs", "description": "Hurried tiny steps, hunched and leaning ahead",
|
|
42
|
+
"promptHint": "the subject scurries forward in hurried tiny steps, shoulders hunched, elbows tucked, upper body leaning ahead of the feet as if late, eyes darting", "term": "scurries with tiny hunched steps" },
|
|
43
|
+
{ "id": "stroll-hands-in-pockets", "label": "Hands in pockets stroll", "category": "walks-runs", "description": "Elbows out, loose rolling steps, slight forward lean",
|
|
44
|
+
"promptHint": "the subject strolls forward with both hands tucked into pockets, elbows angled out, shoulders relaxed, loose rolling steps and a slight forward lean of the head", "term": "strolls with hands in pockets" },
|
|
45
|
+
{ "id": "walk-while-talking", "label": "Walk & talk", "category": "walks-runs", "description": "Steady walk with hands gesturing mid-speech",
|
|
46
|
+
"promptHint": "the subject walks while talking, steps steady and unbroken, mouth moving in speech, hands gesturing in time with the words, head turning aside mid-sentence and back to the path ahead", "term": "walks and talks, gesturing" },
|
|
47
|
+
{ "id": "trudge-wearily", "label": "Trudge", "category": "walks-runs", "description": "Heavy weary steps, head down, feet dragging",
|
|
48
|
+
"promptHint": "the subject trudges forward with heavy weary steps, feet dragging and landing flat, shoulders sagging under the effort, head down and arms hanging limp at the sides", "term": "trudges wearily" },
|
|
49
|
+
{ "id": "prance-forward", "label": "Prance", "category": "walks-runs", "description": "Springy high-knee steps, toes pointed",
|
|
50
|
+
"promptHint": "the subject prances forward with springy high-knee steps, toes pointed on each lift, chest up and arms held out lightly, bouncing playfully off the balls of the feet", "term": "prances with high knees" },
|
|
51
|
+
{ "id": "strut-boldly", "label": "Strut", "category": "walks-runs", "description": "Chest out, exaggerated arm swing, bold stamps",
|
|
52
|
+
"promptHint": "the subject struts forward with chest pushed out, chin raised, exaggerated arm swing and long bold steps that land with a deliberate stamp, shoulders squared", "term": "struts, chest out" },
|
|
53
|
+
{ "id": "swagger-forward", "label": "Swagger", "category": "walks-runs", "description": "Wide lazy stride, shoulders rolling",
|
|
54
|
+
"promptHint": "the subject swaggers forward with a wide lazy stride, shoulders rolling side to side with each step, arms swinging loose and low, weight sinking into every landing", "term": "swaggers, shoulders rolling" },
|
|
55
|
+
{ "id": "sashay-forward", "label": "Sashay", "category": "walks-runs", "description": "Hip-swaying walk, feet crossing on one line",
|
|
56
|
+
"promptHint": "the subject sashays forward with hips swaying side to side, each foot crossing in front of the other along a single line, shoulders back and one hand trailing at the hip", "term": "sashays with swaying hips" },
|
|
57
|
+
{ "id": "run-in-panic", "label": "Panicked run", "category": "walks-runs", "description": "Frantic escape run, glancing back",
|
|
58
|
+
"promptHint": "the subject runs in panic, arms flailing loosely, strides uneven and frantic, torso twisting to glance back over a shoulder before facing forward and pushing harder", "term": "runs in panic, glancing back" },
|
|
59
|
+
{ "id": "run-crouched", "label": "Crouched run", "category": "walks-runs", "description": "Low tactical run, knees bent, head ducked",
|
|
60
|
+
"promptHint": "the subject runs low in a crouch, knees deeply bent and torso folded forward, head ducked, arms tucked in, feet moving in short driving steps that keep the body down", "term": "runs low in a crouch" },
|
|
61
|
+
{ "id": "climb-stairs", "label": "Climb stairs", "category": "walks-runs", "description": "Knee lifts to each step, hand sliding up the rail",
|
|
62
|
+
"promptHint": "the subject climbs a flight of stairs, lifting each knee to plant the whole foot on the next step, weight driving up through the leading leg, one hand sliding along the rail and torso tipped slightly forward", "term": "climbs the stairs" },
|
|
63
|
+
{ "id": "descend-stairs", "label": "Descend stairs", "category": "walks-runs", "description": "Toe-first steps down, weight lowered under control",
|
|
64
|
+
"promptHint": "the subject descends a flight of stairs, each foot reaching down to the next step toe first before the heel settles, weight lowering under control, chin level and one hand trailing on the rail", "term": "descends the stairs" },
|
|
65
|
+
{ "id": "push-through-crowd", "label": "Push through crowd", "category": "walks-runs", "description": "Shoulder wedged forward, forearm parting the way",
|
|
66
|
+
"promptHint": "the subject pushes through the crowd, turning one shoulder forward to wedge between bodies, forearm raised to part the way, pelvis twisting sideways and short driving steps forcing a path ahead", "term": "shoulders through the crowd" },
|
|
67
|
+
{ "id": "sidle-along-wall", "label": "Sidle along wall", "category": "walks-runs", "description": "Back and palms flat to the wall, side-stepping",
|
|
68
|
+
"promptHint": "the subject sidles along the wall with back and palms pressed flat against it, stepping sideways one foot after the other, knees soft, head turned to watch the direction of travel", "term": "sidles along the wall, back pressed" },
|
|
69
|
+
{ "id": "stomp-off-angrily", "label": "Stomp off", "category": "walks-runs", "description": "Storms away, flat heavy stamps, fists clenched",
|
|
70
|
+
"promptHint": "the subject turns sharply and stomps off, each foot slamming down flat and heavy, fists clenched and arms swinging stiffly, shoulders squared and head held rigidly forward without looking back", "term": "stomps off, fists clenched" },
|
|
71
|
+
{ "id": "zombie-shamble", "label": "Zombie shamble", "category": "walks-runs", "description": "Stiff outstretched arms, pitched torso, one foot dragging",
|
|
72
|
+
"promptHint": "the subject shambles forward with both arms held stiffly outstretched, torso pitched forward off balance, one leg dragging behind as the other lurches ahead, head hanging to one side and jaw slack", "term": "shambles, arms stiffly outstretched" },
|
|
73
|
+
{ "id": "sleepwalk-forward", "label": "Sleepwalk", "category": "walks-runs", "description": "Eyes half-closed, arms out ahead, flat-footed drift",
|
|
74
|
+
"promptHint": "the subject sleepwalks forward with eyes half-closed and face slack, both arms extended straight ahead, flat-footed steps drifting in a straight line, the body upright and not reacting to anything around it", "term": "sleepwalks, arms held out ahead" },
|
|
75
|
+
{ "id": "run-in-circles", "label": "Run in circles", "category": "walks-runs", "description": "Tight looping run, body leaning into the turn",
|
|
76
|
+
"promptHint": "the subject runs in tight circles, body leaning into the turn, inside foot pivoting on each stride while the outside leg pushes wide, arms held out and head whipping around to keep looking ahead", "term": "runs in tight circles" },
|
|
77
|
+
{ "id": "brace-against-wind", "label": "Brace against wind", "category": "walks-runs", "description": "Torso pitched forward, forearm shielding the face",
|
|
78
|
+
"promptHint": "the subject leans hard into the wind, torso pitched forward with one shoulder dropped, forearm raised to shield the face, feet planting wide in short braced steps that fight for every stride", "term": "leans into the wind, forearm up" },
|
|
79
|
+
{ "id": "walk-with-cane", "label": "Walk with cane", "category": "walks-runs", "description": "Cane plants in time with the opposite foot",
|
|
80
|
+
"promptHint": "the subject walks forward with a cane, planting its tip ahead in time with the opposite foot, weight leaning briefly onto the cane hand as the other leg swings through, steps short and even", "term": "walks with a cane" },
|
|
81
|
+
{ "id": "roll-forward-in-wheelchair", "label": "Wheelchair roll", "category": "walks-runs", "description": "Both hands drive the push rims in matched strokes",
|
|
82
|
+
"promptHint": "the subject rolls forward in a wheelchair, both hands gripping the push rims and driving them forward in matched strokes, shoulders rounding on each push and releasing on the return, chin up and looking ahead", "term": "rolls forward in a wheelchair" },
|
|
83
|
+
{ "id": "pull-rolling-suitcase", "label": "Pull rolling suitcase", "category": "walks-runs", "description": "One arm trailing back on the handle, case on its wheels",
|
|
84
|
+
"promptHint": "the subject walks forward pulling a rolling suitcase, one arm trailing straight back to the extended handle, the case tilted onto its wheels behind, torso angled slightly toward the free side and the other arm swinging", "term": "walks pulling a rolling suitcase" },
|
|
85
|
+
{ "id": "step-left", "label": "Step to subject’s left", "category": "walks-runs", "description": "Step to subject’s left.",
|
|
86
|
+
"term": "takes one step to their own left", "promptHint": "the subject takes one lateral step to the subject’s left and stops",
|
|
87
|
+
"startPose": "standing", "endPose": "standing", "aliases": ["sidestep left"] },
|
|
88
|
+
{ "id": "step-right", "label": "Step to subject’s right", "category": "walks-runs", "description": "Step to subject’s right.",
|
|
89
|
+
"term": "takes one step to their own right", "promptHint": "the subject takes one lateral step to the subject’s right and stops",
|
|
90
|
+
"startPose": "standing", "endPose": "standing", "aliases": ["sidestep right"] },
|
|
91
|
+
{ "id": "walk-with-crutches", "label": "Walk with crutches", "category": "walks-runs", "description": "Walk with crutches.",
|
|
92
|
+
"term": "advances with a pair of crutches", "promptHint": "the subject places both crutches ahead, shifts weight through the handles and advances using the established supported gait",
|
|
93
|
+
"requires": ["crutches"], "startPose": "standing", "endPose": "standing", "aliases": ["mobility aid"] },
|
|
94
|
+
{ "id": "walk-with-walker", "label": "Walk with walker", "category": "walks-runs", "description": "Walk with walker.",
|
|
95
|
+
"term": "advances with a walker", "promptHint": "the subject moves the walker a short distance ahead and takes small supported steps into it, repeating steadily",
|
|
96
|
+
"requires": ["walker"], "startPose": "standing", "endPose": "standing", "aliases": ["mobility aid"] },
|
|
125
97
|
]
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { getCharacterMotion, CHARACTER_MOTION_MAX_PICKS, type CharacterMotionTiming } from "./character-motion.js"
|
|
2
|
+
|
|
3
|
+
export interface CharacterMotionDiagnostic {
|
|
4
|
+
readonly code: "unknown" | "omitted" | "retired" | "pose" | "visibility" | "hands" | "pace" | "requirements" | "compound" | "capacity" | "multiple-targets" | "roles"
|
|
5
|
+
readonly severity: "error" | "warning" | "info"
|
|
6
|
+
readonly ids: readonly string[]
|
|
7
|
+
readonly message: string
|
|
8
|
+
}
|
|
9
|
+
export interface CharacterMotionBindings {
|
|
10
|
+
readonly selfPairing?: boolean
|
|
11
|
+
readonly subjectMinor?: boolean
|
|
12
|
+
readonly partnerNames?: readonly string[]
|
|
13
|
+
readonly targetNames?: readonly string[]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Shared by editor, API clients and local review. Missing metadata means
|
|
17
|
+
* unknown; this never certifies a sequence or predicts clip duration. */
|
|
18
|
+
export function getCharacterMotionDiagnostics(
|
|
19
|
+
value: string | readonly string[] | null | undefined,
|
|
20
|
+
timing?: CharacterMotionTiming,
|
|
21
|
+
bindings: CharacterMotionBindings = {},
|
|
22
|
+
): readonly CharacterMotionDiagnostic[] {
|
|
23
|
+
const requested = typeof value === "string" ? [value] : Array.isArray(value) ? [...new Set(value)] : []
|
|
24
|
+
const result: CharacterMotionDiagnostic[] = []
|
|
25
|
+
const add = (code: CharacterMotionDiagnostic["code"], severity: CharacterMotionDiagnostic["severity"], ids: readonly string[], message: string) => result.push({ code, severity, ids, message })
|
|
26
|
+
if (requested.length > CHARACTER_MOTION_MAX_PICKS) add("capacity", "warning", requested, "Only the first three selections contribute. Remove extra selections.")
|
|
27
|
+
const picks = requested.slice(0, CHARACTER_MOTION_MAX_PICKS)
|
|
28
|
+
for (const id of picks) if (!getCharacterMotion(id)) add("unknown", "error", [id], `Motion “${id}” is unavailable and contributes no fragment. Remove or replace it.`)
|
|
29
|
+
const entries = picks.flatMap(id => { const entry = getCharacterMotion(id); return entry?.promptHint ? [entry] : [] })
|
|
30
|
+
const active = entries.filter(e => !bindings.subjectMinor || !e.adultOnly)
|
|
31
|
+
if (bindings.selfPairing && active.some(e => e.twoPerson || e.counterpart)) add("roles", "error", active.filter(e => e.twoPerson || e.counterpart).map(e => e.id), "The same reference is connected as Target and Partner. Connect distinct participants before running this interaction.")
|
|
32
|
+
const omitted = entries.filter(e => bindings.subjectMinor && e.adultOnly)
|
|
33
|
+
if (omitted.length) add("omitted", active.length ? "warning" : "error", omitted.map(e => e.id), `${omitted.map(e => e.label).join(", ")} omitted for a connected minor. ${active.length ? "Replace these selections." : "No selected motion contributes a fragment."}`)
|
|
34
|
+
if ((bindings.targetNames?.length ?? 0) > 1) add("multiple-targets", "warning", picks, "Each target performs a separate copy of the sequence. Use separate motion nodes for coordinated choreography.")
|
|
35
|
+
for (const entry of active) {
|
|
36
|
+
if (entry.deprecated) add("retired", "warning", [entry.id], `${entry.label} is retired from new choices but still resolves in saved workflows.${entry.replacementId ? ` Use ${getCharacterMotion(entry.replacementId)?.label ?? entry.replacementId}.` : ""}`)
|
|
37
|
+
if (entry.fixedPace && timing?.pace && timing.pace !== "auto") add("pace", "warning", [entry.id], `${entry.label} sets its own timing. Set Pace to Auto or replace the motion.`)
|
|
38
|
+
if (entry.requires?.length) add("requirements", "info", [entry.id], `${entry.label} requires: ${entry.requires.join(", ")}.${entry.twoPerson || entry.counterpart ? bindings.partnerNames?.length ? ` Partner reference: ${bindings.partnerNames.join(", ")}; confirm it matches the required recipient.` : " Connect a Partner reference to identify the recipient; otherwise the model chooses it." : " Establish these in the scene or prompt; the fragment does not supply reference media."}`)
|
|
39
|
+
}
|
|
40
|
+
for (let i = 1; i < active.length; i++) {
|
|
41
|
+
const before = active[i - 1]!, after = active[i]!, ids = [before.id, after.id]
|
|
42
|
+
if (before.endVisibility === "out-of-frame") add("visibility", "warning", ids, `${before.label} ends out of view before ${after.label}. Reorder or add an entrance.`)
|
|
43
|
+
if (before.endPose && after.startPose && before.endPose !== "any" && after.startPose !== "any" && before.endPose !== after.startPose) add("pose", "warning", ids, `${before.label} ends ${before.endPose}; ${after.label} starts ${after.startPose}. Add a transition or replace a motion.`)
|
|
44
|
+
if (before.handsAfter && before.handsAfter !== "free" && after.needsFreeHands) add("hands", "warning", ids, `${before.label} leaves hands occupied; ${after.label} needs free hands. Add a release first.`)
|
|
45
|
+
}
|
|
46
|
+
const compound = active.filter(e => e.kind === "compound")
|
|
47
|
+
if (compound.length) add("compound", "warning", compound.map(e => e.id), `${compound.length} selection${compound.length === 1 ? " is" : "s are"} compound choreography. Short clips may not fit every phase; test the sequence before adding more actions.`)
|
|
48
|
+
return result
|
|
49
|
+
}
|
package/src/character-motion.ts
CHANGED
|
@@ -16,7 +16,14 @@
|
|
|
16
16
|
* Every non-empty `promptHint` references "the subject" at least once — the
|
|
17
17
|
* composer does a global regex replace of "the subject" with the wired target's
|
|
18
18
|
* display name. Two-person moves ALSO contain the literal words "the partner",
|
|
19
|
-
* replaced with the wired partner's name
|
|
19
|
+
* replaced with the wired partner's name on every occurrence. With nothing
|
|
20
|
+
* wired to the partner handle, the fallback "another person" INTRODUCES the
|
|
21
|
+
* referent at its first occurrence in THAT TARGET's clauses and every later
|
|
22
|
+
* occurrence of that target reads "that same person" — a hint that names the
|
|
23
|
+
* partner five times still describes one person, and a sequence of picks keeps
|
|
24
|
+
* that one person throughout. Multiple wired targets each perform a separate
|
|
25
|
+
* copy of the sequence, so each copy introduces its own partner rather than
|
|
26
|
+
* sharing one between two performers. See `referenceTo` in the composer.
|
|
20
27
|
*
|
|
21
28
|
* Multi-pick is an ORDERED SEQUENCE: value field accepts `string | string[]`
|
|
22
29
|
* (cap 3), joined with ", then " in BOTH hint modes (a movement happens after
|
|
@@ -30,7 +37,7 @@
|
|
|
30
37
|
|
|
31
38
|
import { resolveTerm, type PickerHintMode } from "./term.js"
|
|
32
39
|
import { overlayEntry } from "./catalog-overlay.js"
|
|
33
|
-
export type { CharacterMotion, CharacterMotionCategory } from "./character-motion/types.js"
|
|
40
|
+
export type { CharacterMotion, CharacterMotionCategory, CharacterMotionMetadata } from "./character-motion/types.js"
|
|
34
41
|
import type { CharacterMotion, CharacterMotionCategory } from "./character-motion/types.js"
|
|
35
42
|
import { ENTRANCES_EXITS_MOTIONS } from "./character-motion/entrances-exits.js"
|
|
36
43
|
import { TURNS_LOOKS_MOTIONS } from "./character-motion/turns-looks.js"
|
|
@@ -101,7 +108,7 @@ export const CHARACTER_MOTION_CATEGORY_LABELS: Readonly<Record<CharacterMotionCa
|
|
|
101
108
|
|
|
102
109
|
/**
|
|
103
110
|
* The catalog: two no-op heads + every category array, in category order.
|
|
104
|
-
*
|
|
111
|
+
* Authored injecting entries across 20 categories.
|
|
105
112
|
*/
|
|
106
113
|
export const CHARACTER_MOTIONS: ReadonlyArray<CharacterMotion> = [
|
|
107
114
|
// Defaults — both inject nothing (empty promptHint ⇒ empty term).
|
|
@@ -225,6 +232,29 @@ void _timingIdsStayNarrow
|
|
|
225
232
|
// ---------------------------------------------------------------------------
|
|
226
233
|
|
|
227
234
|
const PARTNER_FALLBACK = "another person"
|
|
235
|
+
/** Last-resort recipient for a `counterpart` token whose entry authored no noun. */
|
|
236
|
+
const COUNTERPART_FALLBACK = "the other participant"
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* How an unwired partner / counterpart reads on its SECOND and later mention.
|
|
240
|
+
*
|
|
241
|
+
* Only an INDEFINITE noun phrase is rewritten. "another person" and "a horse"
|
|
242
|
+
* introduce a fresh referent every time they repeat, so a hint that mentions
|
|
243
|
+
* the partner five times would otherwise describe up to five different people.
|
|
244
|
+
* A DEFINITE phrase — "the held object", "the ducks", "the other participant" —
|
|
245
|
+
* already picks out one referent on every repetition, so it repeats verbatim:
|
|
246
|
+
* rewriting it would buy nothing and would mangle a plural ("that same ducks").
|
|
247
|
+
* That exemption is invisible on today's data (every counterpart noun mentioned
|
|
248
|
+
* more than once is indefinite) and exists so a future definite or plural noun
|
|
249
|
+
* cannot produce broken English here.
|
|
250
|
+
*
|
|
251
|
+
* A pronoun is deliberately NOT the fix: with two actors in the clause,
|
|
252
|
+
* "they" / "their" can attach to either one.
|
|
253
|
+
*/
|
|
254
|
+
function laterReferenceTo(phrase: string): string {
|
|
255
|
+
const indefinite = /^(?:another|an|a) (.+)$/.exec(phrase)
|
|
256
|
+
return indefinite ? `that same ${indefinite[1]}` : phrase
|
|
257
|
+
}
|
|
228
258
|
|
|
229
259
|
/** What the caller knows about the wired target. `subjectMinor: true` drops
|
|
230
260
|
* every `adultOnly` pick after the cap; otherwise the output is unchanged. */
|
|
@@ -238,9 +268,10 @@ export interface CharacterMotionFloor {
|
|
|
238
268
|
* optional Position / Pace timing.
|
|
239
269
|
*
|
|
240
270
|
* Full mode: each hint has "the subject" rewritten to the target name(s) (only
|
|
241
|
-
* when a target is wired) and "the partner" rewritten to the partner name
|
|
242
|
-
*
|
|
243
|
-
*
|
|
271
|
+
* when a target is wired) and "the partner" rewritten to the partner name, or —
|
|
272
|
+
* when nothing is wired to that handle — to "another person" on that target's
|
|
273
|
+
* first mention and "that same person" after; ALWAYS, so the literal words
|
|
274
|
+
* "the partner" never ship. Both BEFORE the ", then " join. Compact mode: terms joined with ", then ",
|
|
244
275
|
* prefixed `"{target}: "` when a target is wired. A term never contains "the
|
|
245
276
|
* subject" (the prefix names the target) but a two-person term always contains
|
|
246
277
|
* "the partner", which is substituted exactly as in full mode.
|
|
@@ -266,19 +297,64 @@ export function composeCharacterMotionHintFromConnections(
|
|
|
266
297
|
const entries = ids.map((id) => ({ id, base: resolveBase(id) })).filter((e) => e.base.length > 0)
|
|
267
298
|
if (entries.length === 0) return ""
|
|
268
299
|
|
|
269
|
-
const
|
|
300
|
+
const targets = [...new Set(targetHints.filter((h) => h && h.length > 0))]
|
|
301
|
+
const targetClause = targets.join(" and ")
|
|
270
302
|
const partnerClause = partnerHints.filter((h) => h && h.length > 0).join(" and ")
|
|
271
303
|
const partnerName = partnerClause || PARTNER_FALLBACK
|
|
272
304
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
305
|
+
/**
|
|
306
|
+
* One introduction PER TARGET. Within one target's clauses the partner handle
|
|
307
|
+
* names a single participant, so the first occurrence introduces it and every
|
|
308
|
+
* later occurrence refers back. The scope decisions, stated:
|
|
309
|
+
* - ACROSS THE SEQUENCE (up to 3 picks): SHARED. Pick 2 reading "that same
|
|
310
|
+
* person" refers to the person pick 1 introduced — one target doing two
|
|
311
|
+
* moves does them to one partner.
|
|
312
|
+
* - ACROSS MULTIPLE TARGETS: NOT SHARED. Each target performs a SEPARATE
|
|
313
|
+
* COPY of the sequence — what the `multiple-targets` diagnostic promises —
|
|
314
|
+
* so each copy introduces its own partner. Sharing one referent across the
|
|
315
|
+
* "; separately, " clauses instead described one person being hugged,
|
|
316
|
+
* dipped or bridal-carried by two people at once.
|
|
317
|
+
* - COMPACT MODE: same rule, same scope, same helper. Its terms are shorter,
|
|
318
|
+
* but a 3-pick compact sequence repeats the referent just as a full one
|
|
319
|
+
* does, so it needs the same treatment.
|
|
320
|
+
* - A WIRED NAME IS NEVER REWRITTEN: repeating "Theo" is already unambiguous,
|
|
321
|
+
* which also keeps wired output byte-identical to the pre-fix composer.
|
|
322
|
+
* Each target's state is keyed by the resolved phrase rather than by one flag,
|
|
323
|
+
* because two picks can carry DIFFERENT counterpart nouns ("a dog", then
|
|
324
|
+
* "a horse") — two referents, each owed its own introduction.
|
|
325
|
+
*
|
|
326
|
+
* Call order is output order: `entries.map` runs in sequence order and, inside
|
|
327
|
+
* it, `targets.map` runs in the order those clauses are joined. A target's
|
|
328
|
+
* state therefore spans that target's picks and ignores the clauses of the
|
|
329
|
+
* other targets interleaved between them.
|
|
330
|
+
*/
|
|
331
|
+
const introducedByTarget = new Map<string, Set<string>>()
|
|
332
|
+
const referenceTo = (target: string, phrase: string): string => {
|
|
333
|
+
if (partnerClause) return phrase
|
|
334
|
+
let introduced = introducedByTarget.get(target)
|
|
335
|
+
if (!introduced) introducedByTarget.set(target, (introduced = new Set<string>()))
|
|
336
|
+
if (introduced.has(phrase)) return laterReferenceTo(phrase)
|
|
337
|
+
introduced.add(phrase)
|
|
338
|
+
return phrase
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
const substituted = entries.map(({ id, base }) => {
|
|
342
|
+
// One pass with a callback: names are literal data, never replacement
|
|
343
|
+
// syntax ($&, $`, $') or a second set of template tokens to reprocess.
|
|
344
|
+
const substitute = (target: string) => base.replace(/\bthe (subject|partner|counterpart)\b/g, (token, role: string) => {
|
|
345
|
+
if (role === "subject") return mode !== "compact" && target ? target : token
|
|
346
|
+
if (role === "partner") return referenceTo(target, partnerName)
|
|
347
|
+
return referenceTo(target, partnerClause || getCharacterMotion(id)?.counterpart || COUNTERPART_FALLBACK)
|
|
348
|
+
})
|
|
349
|
+
// Each actor receives a grammatical singular clause. Do not invent a
|
|
350
|
+
// plural choreography or attach a singular verb to a joined name list.
|
|
351
|
+
return targets.length > 1
|
|
352
|
+
? targets.map(target => mode === "compact" ? `${target}: ${substitute(target)}` : substitute(target)).join("; separately, ")
|
|
353
|
+
: substitute(targetClause)
|
|
278
354
|
})
|
|
279
355
|
|
|
280
356
|
const joined = substituted.join(", then ")
|
|
281
|
-
const combinedBase = mode === "compact" &&
|
|
357
|
+
const combinedBase = mode === "compact" && targets.length === 1 ? `${targetClause}: ${joined}` : joined
|
|
282
358
|
const parts: string[] = [combinedBase]
|
|
283
359
|
if (timing?.position && timing.position !== "auto") parts.push(POSITION_CLAUSES[timing.position])
|
|
284
360
|
if (timing?.pace && timing.pace !== "auto") parts.push(PACE_CLAUSES[timing.pace])
|
|
@@ -1113,4 +1113,26 @@ export const GENERATE_VIDEO_PRESETS: readonly FactoryPreset[] = [
|
|
|
1113
1113
|
"{creature || A monstrous yeti with the physique and bone structure of a giant silverback gorilla}, {texture || thick matted white fur with snow crusted on the shoulders}, charges forward and smashes both fists into the ground. Low-angle ground shot looking up to emphasize its scale, heavy camera shake on impact, snow and debris bursting toward the lens. Overcast mountain light, volumetric breath mist around its muzzle. <deep guttural roar, the crunch of impact, debris scattering>(low ominous brass drone)Biologically accurate anatomy, epic cinematic scale. HD, sharp micro-details, stable picture, keep it subtitle-free, do not generate a watermark.",
|
|
1114
1114
|
},
|
|
1115
1115
|
},
|
|
1116
|
+
// ── Video Editing ─────────────────────────────────────────────────────────
|
|
1117
|
+
// Seedance 2.5 EDITS a wired reference clip when the prompt reads as an edit
|
|
1118
|
+
// instruction. Edit mode takes the source clip's own ratio and length, so the
|
|
1119
|
+
// preset ships the exact shape the provider requires — Adaptive + Auto
|
|
1120
|
+
// (duration -1) — and the run goes through on the first submit. The user's
|
|
1121
|
+
// own sentence is the whole prompt: the preset only supplies the pre & post
|
|
1122
|
+
// text, with the clip bound as {video:1} (wire it into Video Refs).
|
|
1123
|
+
{
|
|
1124
|
+
id: "generate-video/edit-video",
|
|
1125
|
+
name: "Edit Video",
|
|
1126
|
+
description: "Change a wired clip by instruction — keeps its length, ratio and everything you don't mention.",
|
|
1127
|
+
group: "Video Editing",
|
|
1128
|
+
data: {
|
|
1129
|
+
provider: "seedance-2-5",
|
|
1130
|
+
aspectRatio: "adaptive",
|
|
1131
|
+
duration: -1,
|
|
1132
|
+
generateAudio: true,
|
|
1133
|
+
promptPrefix: "edit {video:1} as follows:\n",
|
|
1134
|
+
promptSuffix:
|
|
1135
|
+
"Keep everything else in the clip unchanged: the same people, motion, framing and timing. Keep it subtitle-free, do not generate a watermark.",
|
|
1136
|
+
},
|
|
1137
|
+
},
|
|
1116
1138
|
]
|