@melite/estate-queue 0.2.0-alpha → 0.2.3-rc.4

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.
Files changed (87) hide show
  1. package/README.md +0 -5
  2. package/lib/bench.js +30 -3
  3. package/lib/cardsCompose.d.ts +31 -0
  4. package/lib/cardsCompose.js +65 -1
  5. package/lib/cardsDangling.js +17 -7
  6. package/lib/cardsDroppable.d.ts +11 -0
  7. package/lib/cardsDroppable.js +50 -0
  8. package/lib/cardsFacts.d.ts +37 -0
  9. package/lib/cardsFacts.js +47 -1
  10. package/lib/cardsLanes.d.ts +18 -0
  11. package/lib/cardsLanes.js +2 -1
  12. package/lib/cardsRegistry.d.ts +12 -20
  13. package/lib/cardsRegistry.js +288 -96
  14. package/lib/discloseRegistry.d.ts +5 -0
  15. package/lib/discloseRegistry.js +3 -3
  16. package/lib/filmLead.js +9 -1
  17. package/lib/filmMemoryWarn.js +1 -0
  18. package/lib/flowsData.d.ts +110 -21
  19. package/lib/flowsData.js +201 -23
  20. package/lib/flowsFamilyCompose.js +1 -0
  21. package/lib/flowsParamsOverlay.d.ts +8 -1
  22. package/lib/flowsParamsOverlay.js +47 -2
  23. package/lib/flowsRegistryRows.d.ts +0 -4
  24. package/lib/flowsRegistryRows.js +177 -371
  25. package/lib/index.d.ts +0 -1
  26. package/lib/index.js +0 -4
  27. package/lib/ledgerTail.js +1 -0
  28. package/lib/loadPlane.d.ts +46 -4
  29. package/lib/loadPlane.js +109 -7
  30. package/lib/loadRegistry.js +9 -2
  31. package/lib/managePlane.d.ts +5 -0
  32. package/lib/managePlane.js +412 -51
  33. package/lib/managePreflight.js +38 -6
  34. package/lib/manageProbe.d.ts +35 -0
  35. package/lib/manageProbe.js +141 -2
  36. package/lib/manageRegistry.d.ts +10 -0
  37. package/lib/manageRegistry.js +7 -1
  38. package/lib/managerRail.js +1 -0
  39. package/lib/queueCore.js +3 -1
  40. package/lib/queueLock.js +22 -10
  41. package/lib/queueResurrect.d.ts +0 -3
  42. package/lib/queueResurrect.js +5 -3
  43. package/lib/queueRetry.d.ts +12 -10
  44. package/lib/queueRetry.js +2 -4
  45. package/lib/queueSidecar.d.ts +36 -1
  46. package/lib/queueSidecar.js +30 -2
  47. package/lib/queueSubmit.d.ts +4 -1
  48. package/lib/queueSubmit.js +28 -5
  49. package/lib/queueSweep.d.ts +38 -11
  50. package/lib/queueSweep.js +73 -16
  51. package/lib/runsChange.d.ts +5 -4
  52. package/lib/runsExecute.d.ts +16 -1
  53. package/lib/runsExecute.js +102 -50
  54. package/lib/runsGates.d.ts +11 -3
  55. package/lib/runsGates.js +12 -3
  56. package/lib/runsList.d.ts +59 -3
  57. package/lib/runsList.js +228 -36
  58. package/lib/runsRegistry.d.ts +87 -6
  59. package/lib/runsRegistry.js +664 -98
  60. package/lib/runsSourceEcho.js +9 -3
  61. package/lib/runsStart.d.ts +6 -4
  62. package/lib/runsStart.js +32 -25
  63. package/lib/runsTypes.d.ts +54 -1
  64. package/lib/runsTypes.js +82 -3
  65. package/lib/runsValidate.d.ts +1 -0
  66. package/lib/runsValidate.js +5 -0
  67. package/lib/runsValidateArms.js +48 -2
  68. package/lib/runsValidateServe.js +15 -12
  69. package/lib/runsValidateShared.d.ts +8 -10
  70. package/lib/runsValidateShared.js +41 -15
  71. package/lib/runsValidateStages.d.ts +1 -1
  72. package/lib/runsValidateStages.js +90 -50
  73. package/lib/runtimeProvision.js +10 -2
  74. package/lib/skillAuthored.d.ts +50 -0
  75. package/lib/skillAuthored.js +178 -0
  76. package/lib/skillFs.js +3 -0
  77. package/lib/skillPlane.d.ts +40 -2
  78. package/lib/skillPlane.js +63 -13
  79. package/lib/skillRegistry.d.ts +24 -1
  80. package/lib/skillRegistry.js +69 -5
  81. package/lib/skillRows.d.ts +13 -3
  82. package/lib/skillRows.js +52 -9
  83. package/lib/vocab.d.ts +29 -0
  84. package/lib/vocab.js +78 -0
  85. package/package.json +24 -14
  86. package/lib/resurrect.d.ts +0 -6
  87. package/lib/resurrect.js +0 -18
@@ -18,17 +18,22 @@ export const ANNY_HMR_ESTIMATOR = {
18
18
  id: "estimate",
19
19
  engine: CARD_PLANE_ENGINE,
20
20
  // the estimator engine of the same verb — family DECL owns
21
- // the nodes (SAM 3D Body → grounded anny), person_index FIXED
22
- // at the loudest detection (the verb's chip owns the picker)
21
+ // the nodes (SAM 3D Body → grounded anny). The person picker
22
+ // rides the person_index INITIAL (required: its $spell rides
23
+ // the composed graph on every press, and the merge resolves
24
+ // it against the run's initials — the door teaches an absent
25
+ // one BEFORE the run registers; the verb's chip owns the
26
+ // pick, the flow owns the lane).
23
27
  family: "anny",
24
28
  action: "estimate_photo",
25
29
  description: "SAM 3D Body estimator → grounded anny GLB",
26
- inputs: { photo: initial("photo") },
27
- expected: { photo: "image" },
28
- params: { photo: "$photo" },
30
+ inputs: { photo: initial("photo"), person_index: initial("person_index") },
31
+ expected: { photo: "image", person_index: "num" },
32
+ params: { photo: "$photo", person_index: "$person_index" },
29
33
  }),
30
34
  ],
31
- initialValidators: { photo: "photo" },
35
+ initialValidators: { photo: "photo", person_index: "number" },
36
+ requiredInitials: ["photo", "person_index"],
32
37
  tool: null,
33
38
  skillRefs: [],
34
39
  };
@@ -58,137 +63,18 @@ export const ANNY_PARAMS = {
58
63
  tool: null,
59
64
  skillRefs: [],
60
65
  };
61
- export const AUDIO_NATIVE_TTS = {
62
- id: "audio-native-tts",
63
- description: "Phase 1b gate: Qwen3-TTS 12Hz CustomVoice via the live melite-audio-nodes " +
64
- "island pack in the serving ComfyUI container (pure-ComfyUI audio lane; " +
65
- "retires the C audio engine for TTS). RUNS on the {flow:} door " +
66
- "(2026-10-04: the VALIDATE-ONLY stamp is GONE — the start door " +
67
- "composes the row's card stages through the card plane); the {model:} " +
68
- "door drives the same card directly.",
69
- stages: [
70
- plainStage({
71
- id: "tts",
72
- engine: CARD_PLANE_ENGINE,
73
- card: "tts",
74
- description: "Qwen3-TTS text to speech via the tts card",
75
-
76
- // merge-hole cure): the wiring law spells every wired channel
77
- // `$<channel>`, and the merge resolves a $spell against links ∪
78
- // request INITIALS — so a channel `text` fed by initial("prompt")
79
- // spelled `$text` resolved against neither and the run died at
80
- // the merge. anny-hmr names all three the same (photo/photo/
81
- // $photo); so does this row now.
82
- inputs: { text: initial("text") },
83
- // every wired input needs its expected Kind (kindsOk's own
84
- // law) — this row shipped without it and only the LIVE
85
- // /v1/flows/validate path tripped it; completed at the
86
-
87
- // the class (kindsOk over every registry flow)
88
- expected: { text: "text" },
89
- outputs: { wav: "audio" },
90
- cardIo: { wav: "audio" },
91
- // ONE HOME FOR FLOW DEFAULTS (audit 015 C2): no seed stamp —
92
- // the tts card's own default (-1, random) rules at compose and
93
- // the seed-sentinel gate mints a fresh take per run, the same
94
- // take-freshness a GUI card stage gets. A stated seed rides the
95
- // declared overlay; the stamp that stood here (seed 42) was a
96
- // second default-write that locked every flow take to 42.
97
- params: { model: "qwen3-tts", text: "$text" },
98
- }),
99
- ],
100
- initialValidators: { text: "text" },
101
- tool: {
102
- name: "speak",
103
- version: 1,
104
- description: "Qwen3-TTS 12Hz CustomVoice speech in one call — text in, wav out " +
105
- "(pure-ComfyUI audio lane).",
106
- properties: {
107
-
108
- // lifts declared validators only, so a `prompt` property over a
109
- // `text` initial would advertise a key the door never reads.
110
- text: {
111
- ptype: "string",
112
- description: "what to say",
113
- default: null,
114
- hasDefault: false,
115
- minimum: null,
116
- maximum: null,
117
- enum: null,
118
- },
119
- // ONE HOME FOR FLOW DEFAULTS (audit 015 C2): the tool publishes
120
- // no seed default — the tts card's own default (-1, fresh mint)
121
- // rules when the caller omits the seed, so a published number
122
- // here would advertise a take-lock the run never composes. The
123
- // overlay stays: a stated seed pins the take.
124
- seed: {
125
- ptype: "integer",
126
- description: "voice sampler seed (omit for a fresh take — the card mints one)",
127
- default: null,
128
- hasDefault: false,
129
- minimum: 0,
130
- maximum: 2147483647,
131
- enum: null,
132
- },
133
- },
134
- required: ["text"],
135
- overlays: [{ param: "seed", stage: "tts", path: ["seed"], choices: null }],
136
- },
137
- skillRefs: [],
138
- };
139
- export const BODY_TO_SOMAX = {
140
- id: "body-to-somax",
141
- description: "Bare body GLB → SOMAX-rigged GLB: the anny→kimodo bridge (the baked " +
142
- "SOMA-77 template weight transfer, standalone-rig mode — no Blender). The " +
143
- "motion studio posts this behind the scenes when a wired body isn't SOMAX; " +
144
- "any bare human mesh (anny bake, TRELLIS, upload) rides the same door. " +
145
- "RUNS on the {flow:} door (2026-10-04: the VALIDATE-ONLY stamp is " +
146
- "GONE — the start door composes the row's card stages through the " +
147
- "card plane); drive the rig card " +
148
- "through the bench or {model:}.",
149
- stages: [
150
- plainStage({
151
- id: "rig",
152
- engine: CARD_PLANE_ENGINE,
153
- card: "rig",
154
- description: "SOMA-77 template weight transfer (barycentric, the autorig pack's " +
155
- "baked function) via the rig card's auto mode — the gem-soma " +
156
- "family's declared rig action composes the KimodoExportFBX segment",
157
- inputs: { glb: initial("glb") },
158
- expected: { glb: "mesh" },
159
- outputs: { body: "mesh" },
160
- cardIo: { body: "mesh" },
161
- // THE LANE IS THE FAMILY'S (the atom vocabulary, stroke 3): this
162
- // stage hand-wired the KimodoExportFBX node in the flow plane —
163
- // a second copy of the gem-soma rig lane. It names the card +
164
- // mode; the family's declared action composes the graph.
165
- // (out_dir/timeout_s are RAW-stage knobs — a card stage's
166
- // params are card-admitted knobs only; the compose door owns
167
- // the run dir and the card's own contract the timeout.)
168
- params: {
169
- mesh_glb: "$glb",
170
- mode: "auto",
171
- preserve_texture: true,
172
- decimate_ratio: 0,
173
- },
174
- }),
175
- ],
176
- initialValidators: { glb: "glb" },
177
- tool: null,
178
- skillRefs: [],
179
- };
180
66
  export const FIT_SEAT = {
181
67
  id: "fit-seat",
182
68
  description: "Seat a static prop onto a SOMAX body under the meld fit laws (the " +
183
69
  "dress/prop verb engine): the meld row assembles in-pack from the verb's " +
184
70
  "own vocabulary, and the request MUST carry `bone` (the bone that " +
185
71
  "carries the prop — the door refuses without it), " +
186
- "FitProp grafts, the turnaround proves.",
72
+ "FitProp grafts — the seated GLB is the verb's output.",
187
73
  stages: [
188
74
  plainStage({
189
75
  id: "seat",
190
76
  engine: CARD_PLANE_ENGINE,
191
- description: "FitRow (knobs -> meld row) -> FitProp (graft) -> proof views",
77
+ description: "FitRow (knobs -> meld row) -> FitProp (graft) — the seated GLB out",
192
78
  // THE TWO FILES AND THE BONE (the rest of the fit row is the
193
79
  // verb's own vocabulary inside the action — stroke-89's law).
194
80
  // The bone is a BARE NAME, so it rides the text initial kind,
@@ -198,8 +84,8 @@ export const FIT_SEAT = {
198
84
  expected: { body: "mesh", prop: "mesh", bone: "text" },
199
85
  // THE VERB'S BACKEND IS A DECLARED ACTION (the atom
200
86
  // vocabulary, stroke 4): the fit-seat verb's nodes compose
201
- // from the fit family's DECL — every knob rides verbatim, the
202
- // proof framing is FIXED in the action build. The row routes;
87
+ // from the fit family's DECL — every knob rides verbatim. The
88
+ // row routes;
203
89
  // the declaration owns the graph (SubActionMod law — the
204
90
 
205
91
  // the sanctioned seam, not a revival).
@@ -220,8 +106,8 @@ export const FIT_SEAT = {
220
106
  export const IMAGE_UPSCALE = {
221
107
  id: "image-upscale",
222
108
  description: "Prompt → image → 1080p SeedVR2 upscale, one card per stroke (the first " +
223
- "two-card flow: image-gen + upscale-tools card= stages; image_model picks " +
224
- "the generator). RUNS on the {flow:} door (2026-10-04: the VALIDATE-ONLY " +
109
+ "two-card flow: image-gen + upscale-tools card= stages; the make stage " +
110
+ "FIXES the generator at krea-2 — no model seat exists on this row). RUNS on the {flow:} door (2026-10-04: the VALIDATE-ONLY " +
225
111
  "stamp is GONE — both card stages compose through the card plane and " +
226
112
  "submit as one merged run); the {model:} door drives a single card.",
227
113
  stages: [
@@ -233,6 +119,11 @@ export const IMAGE_UPSCALE = {
233
119
  inputs: { prompt: initial("prompt") },
234
120
 
235
121
  expected: { prompt: "text" },
122
+ // THE ROW RENAMES THE CARD'S CHANNEL (the object-forge concept
123
+ // precedent): the image-gen card binds `default` on its
124
+ // flowOutputBindings row; this row renames it to the flow-plane
125
+ // `image` the polish stage wires — kind-matched, one-to-one.
126
+ outputs: { image: "image" },
236
127
  cardIo: { image: "image" },
237
128
  // ONE HOME FOR FLOW DEFAULTS (audit 015 C2): no seed stamp on
238
129
  // either stage — the image-gen and upscale-tools cards both
@@ -266,18 +157,18 @@ export const IMAGE_UPSCALE = {
266
157
  name: "image_upscale",
267
158
  version: 1,
268
159
  description: "Generate an image from a prompt and upscale it to 1080p in one call " +
269
- "(krea-2 or z-image generator, SeedVR2 upscale always on). One POST runs " +
160
+ "(krea-2 generator, FIXED by the row's make stage — no image_model " +
161
+ "seat exists and one stated anywhere is a dead letter (audit " +
162
+ "2026-11-14 FL-7); SeedVR2 upscale always on). One POST runs " +
270
163
  "the whole flow.",
271
164
  properties: {
272
- image_model: {
273
- ptype: "string",
274
- description: "the generator family (no default: pick one)",
275
- default: null,
276
- hasDefault: false,
277
- minimum: null,
278
- maximum: null,
279
- enum: ["krea-2", "z-image"],
280
- },
165
+
166
+ // face: the runtime reads it nowhere — the make stage pins
167
+ // model "krea-2" and cardAdmission has no image-gen seat for
168
+ // the key, so a stated value refused or dead-lettered. Re-seat
169
+ // it only by wiring a real admission seat (an initial that
170
+ // overrides the make stage's model), never by re-publishing
171
+ // the knob.
281
172
  prompt: {
282
173
  ptype: "string",
283
174
  description: "what to generate (up to 4000 chars)",
@@ -301,6 +192,42 @@ export const IMAGE_UPSCALE = {
301
192
  maximum: 2147483647,
302
193
  enum: null,
303
194
  },
195
+
196
+ // row published no make-size or polish-resolution face, so
197
+ // every press rode the cards' defaults — the make at
198
+ // krea-2's 1024×1024, the polish at the FHD rail (1080 short
199
+ // side) — the burn's "never doubles": a 2x press needs the
200
+ // make at the operator's class (e.g. 1344×768) and the polish
201
+ // resolution at twice that short side (1536). Declared the
202
+ // seed-overlay way (the twin-stage pattern), bounds the cards'
203
+ // own schemas already enforce.
204
+ width: {
205
+ ptype: "integer",
206
+ description: "make canvas width (16-step, 256–2048; state the operator's class, e.g. 1344)",
207
+ default: null,
208
+ hasDefault: false,
209
+ minimum: 256,
210
+ maximum: 2048,
211
+ enum: null,
212
+ },
213
+ height: {
214
+ ptype: "integer",
215
+ description: "make canvas height (16-step, 256–2048; e.g. 768)",
216
+ default: null,
217
+ hasDefault: false,
218
+ minimum: 256,
219
+ maximum: 2048,
220
+ enum: null,
221
+ },
222
+ resolution: {
223
+ ptype: "integer",
224
+ description: "SeedVR2 target short side (256–2160; 1080 = the FHD rail, state twice the make short side to double, e.g. 1536)",
225
+ default: null,
226
+ hasDefault: false,
227
+ minimum: 256,
228
+ maximum: 2160,
229
+ enum: null,
230
+ },
304
231
  },
305
232
  required: ["image_model", "prompt"],
306
233
  overlays: [
@@ -312,6 +239,9 @@ export const IMAGE_UPSCALE = {
312
239
  },
313
240
  { param: "seed", stage: "make", path: ["seed"], choices: null },
314
241
  { param: "seed", stage: "polish", path: ["seed"], choices: null },
242
+ { param: "width", stage: "make", path: ["width"], choices: null },
243
+ { param: "height", stage: "make", path: ["height"], choices: null },
244
+ { param: "resolution", stage: "polish", path: ["resolution"], choices: null },
315
245
  ],
316
246
  },
317
247
  skillRefs: [
@@ -322,209 +252,13 @@ export const IMAGE_UPSCALE = {
322
252
  "model:z-image:prompt-enhance",
323
253
  ],
324
254
  };
325
- export const VIDEO_EXTEND = {
326
- id: "extend-video",
327
- description: "More seconds of coherent motion appended to a prior clip — the " +
328
- "extend-video flow (report dev_docs/audits/features/" +
329
- "extend-video-flow-2026-11-12.md): ONE card= stage on h3-timeline " +
330
- "whose extend arm renders a fresh continuation anchored on the prior " +
331
- "clip's LAST FRAME (negative batch index, in-graph), at full denoise " +
332
- "under an all-white mask, then joins prior + new through the film " +
333
- "tail's own file law (both parts save at SaveVideo prefixes; " +
334
- "MeliteConcatVideos decodes them back strictly after every save). " +
335
- "RUNS on the {flow:} door (the 2026-10-04 card-stage cure — the row " +
336
- "composes through the card plane as one merged run); the {model:} " +
337
- "door drives the same card with the extend mod armed on the bench.",
338
- stages: [
339
- plainStage({
340
- id: "extend",
341
- engine: CARD_PLANE_ENGINE,
342
- card: "h3-timeline",
343
- description: "The continuation window via the h3-timeline card's extend arm — " +
344
- "prior clip in (VHS force_rate 24), last-frame anchor, fresh " +
345
- "denoise-1 window, joined film out",
346
- inputs: {
347
- source_clip: initial("source_clip"),
348
- extend_prompt: initial("extend_prompt"),
349
- },
350
- // hand-written ONLY because the card's flowKinds declares
351
- // none of these slots (the derivation law's exception clause:
352
- // the row names what the card cannot know about its own
353
- // initials). The numeric seats (extend_seconds, seed) ride NO
354
- // initial — the initial kinds are the closed five
355
- // (photo/video/glb/bake_params/text, flowsData.ts:74) and a
356
- // number refuses every one; worse, a $spell ALWAYS resolves
357
- // to its normalized STRING at the merge, so a numeric spell
358
- // would land "2.33" in the bag and the renderer's typed read
359
- // would silently snap to the default — the exact silent snap
360
- // the grid door exists to kill. Numbers state through the
361
- // WHOLE-BAG params override (applyFlowParamsOverlay: the
362
- // array value replaces the bag raw, JSON numbers intact).
363
- expected: { source_clip: "video", extend_prompt: "text" },
364
- cardIo: { default: "video" },
365
- params: {
366
- model: "h3-timeline",
367
- // THE MOD BAG (params-emit's law: entries ride as an array
368
- // under params.<param_key>, never flattened): the two string
369
- // seats are $spells resolved at the merge against this
370
- // stage's wired initials — both REQUIRED, so every spell
371
- // always resolves (an optional spell would refuse mid-run;
372
- // the requiredInitials door guarantees the body carries
373
- // both). The numeric seats (extend_seconds, seed) ride the
374
- // renderer's own defaults (2.33s / seed 0); a caller pinning
375
- // one passes params: {extend: [{…full bag…}]} and the
376
- // override replaces this stamp wholesale with raw values.
377
- extend: [
378
- {
379
- source_clip: "$source_clip",
380
- extend_prompt: "$extend_prompt",
381
- },
382
- ],
383
- },
384
- }),
385
- ],
386
- initialValidators: { source_clip: "video", extend_prompt: "text" },
387
- requiredInitials: ["source_clip", "extend_prompt"],
388
- tool: {
389
- name: "extend_video",
390
- version: 1,
391
- description: "Append fresh seconds to a prior clip (one call: the prior clip + " +
392
- "a continuation prompt in, the joined extended film out — the prior " +
393
- "plays first, new motion and sound follow). The prior clip is a " +
394
- "stageable video (mp4/webm/mkv/mov/m4v/avi — a /melite-media/runs/ " +
395
- "artifact URL from an earlier run lands) and rides the flow body's " +
396
- "source_clip key. The prompt states MOTION and SOUND picking up " +
397
- "where the clip ends. extend_seconds (default 2.33) must land on " +
398
- "the engine grid (frames become seconds at the schema fps " +
399
- "default: 2.33s = 56f, 3.75s = 90f, 5.17s = 124f, 15.08s = 362f " +
400
- "the largest single window — beyond it the door composes N " +
401
- "uniform windows under the 39f overlap, exact delivery or a " +
402
- "loud refusal; off-grid values refuse at the compose door) and " +
403
- "states " +
404
- "through params: {extend: [{extend_seconds: …, seed: …}]} — " +
405
- "numbers ride the bag, never the flow body.",
406
- properties: {
407
- source_clip: {
408
- ptype: "string",
409
- description: "the prior clip — a stageable video path (a /melite-media/" +
410
- "runs/<run_id>/<file>.mp4 artifact URL from an earlier run " +
411
- "lands; a browser-local blob/data URL refuses — upload first)",
412
- default: null,
413
- hasDefault: false,
414
- minimum: null,
415
- maximum: null,
416
- enum: null,
417
- },
418
- extend_prompt: {
419
- ptype: "string",
420
- description: "the continuation text — MOTION and SOUND for the appended " +
421
- "seconds, picking up exactly where the clip ends",
422
- default: null,
423
- hasDefault: false,
424
- minimum: null,
425
- maximum: null,
426
- enum: null,
427
- },
428
- },
429
- required: ["source_clip", "extend_prompt"],
430
- overlays: [],
431
- },
432
- skillRefs: ["card:h3-timeline"],
433
- };
434
- export const MUSIC_NATIVE = {
435
- id: "music-native",
436
- description: "Music generation as a CARD stage — prompt in, audio out via the music " +
437
- "card (MiniMax Music 3, the boarded row; see GET /v1/models). Repointed " +
438
- "at the mono-engine law by the wiring wall 2026-09-20: the row still " +
439
- "named the retired audio_cpp tier and a card id that no longer exists — " +
440
- "a fossil only the live validate path ever tripped. RUNS on the " +
441
- "{flow:} door (2026-10-04: the VALIDATE-ONLY stamp is GONE — the " +
442
- "start door composes the row's card stages through the card plane); " +
443
- "the {model:} door drives the same card directly.",
444
- stages: [
445
- plainStage({
446
- id: "music",
447
- engine: CARD_PLANE_ENGINE,
448
- card: "music",
449
- description: "MiniMax Music 3 via the music card — the lane composes the doc " +
450
- "into the ComfyUI graph (UNET/CLIP/VAE loaders + the music sampler)",
451
- inputs: { prompt: initial("prompt") },
452
- expected: { prompt: "text" },
453
- cardIo: { default: "audio" },
454
- params: {
455
- prompt: "$prompt",
456
-
457
- // instrumental default — the card bakes an absent/empty lyric
458
- // as "" (MiniMax's instrumental convention), never an absent
459
- // ref, so the seat stays a plain literal (a "$lyrics" spell
460
- // would refuse unresolved on instrumental calls) and the
461
- // stated lyric rides the declared overlay.
462
- lyrics: "",
463
- model: "music3",
464
- // ONE HOME FOR FLOW DEFAULTS (audit 015 C2): no duration
465
- // stamp — the music card's own default (30) rules, the same
466
- // length a GUI card stage gets; the stamp that stood here
467
- // (120) was a second default-write that made agent music
468
- // 120 s while human card music stayed 30 s. A stated duration
469
- // rides the declared overlay.
470
- seed: -1,
471
- },
472
- }),
473
- ],
474
- initialValidators: { prompt: "text" },
475
- tool: {
476
- name: "compose_music",
477
- version: 1,
478
- description: "Music generation in one call (MiniMax Music 3 via the music card) — " +
479
- "prompt in, audio out; state lyrics for sung verses (omit for instrumental).",
480
- properties: {
481
- prompt: {
482
- ptype: "string",
483
- description: "what to play",
484
- default: null,
485
- hasDefault: false,
486
- minimum: null,
487
- maximum: null,
488
- enum: null,
489
- },
490
- // ONE HOME FOR FLOW DEFAULTS (audit 015 C2): the tool publishes
491
- // no duration default — the music card's own default (30)
492
- // rules when the caller omits it, so a published 120 advertised
493
- // a length the run never composes. The bounds stay (the card's
494
- // own declared cap, pointed at, not restated as a default).
495
- duration: {
496
- ptype: "integer",
497
- description: "seconds of music (the card caps 5..360; omit for the card's own default)",
498
- default: null,
499
- hasDefault: false,
500
- minimum: 5,
501
- maximum: 360,
502
- enum: null,
503
- },
504
- lyrics: {
505
- ptype: "string",
506
- description: "song lyrics (verse-form text sung by the music); omit for instrumental",
507
- default: null,
508
- hasDefault: false,
509
- minimum: null,
510
- maximum: null,
511
- enum: null,
512
- },
513
- },
514
- required: ["prompt"],
515
- overlays: [
516
- { param: "duration", stage: "music", path: ["duration"], choices: null },
517
- { param: "lyrics", stage: "music", path: ["lyrics"], choices: null },
518
- ],
519
- },
520
- skillRefs: [],
521
- };
522
255
  export const CRAFT_LOOP = {
523
256
  id: "craft-loop",
524
257
  description: "The agentic craft loop: a named image-capable model route critiques " +
525
258
  "each capture and decides the next act command until done (or the " +
526
259
  "iteration cap). The act leg rides ANY registered engine (comfyui " +
527
- "graphs, mcp:blender tool calls); captures land in the run dir and " +
260
+ "graphs, MCP tool calls on the DSH-profile seats); captures land " +
261
+ "in the run dir and " +
528
262
  "attach to the critique. Driven by the runs door with engine " +
529
263
  "'craft' stages — see flows/craft-loop/agents/AGENT.md.",
530
264
  stages: [
@@ -532,47 +266,97 @@ export const CRAFT_LOOP = {
532
266
  id: "loop",
533
267
  engine: "craft",
534
268
  description: "act → capture → critique → decide (the loop engine)",
535
- inputs: {},
269
+ // THE CHANNEL LAW (the merge-hole cure, born on the retired
270
+ // audio-native-tts wrapper): a $spell in params must name a channel the stage
271
+ // WIRES — the compose judge's pool is inputNames ∪ initial
272
+ // edges, so the three dials ride as initial("…") edges of the
273
+ // same name (agent_prompt/agent_prompt/$agent_prompt, the
274
+ // anny-hmr naming law). The craft executor consumes them
275
+ // through its own $spell fold against the run's request
276
+ // initials (the executor contract's fifth argument) — the
277
+ // edges are the channel truth, the fold the value truth.
278
+ inputs: {
279
+ agent_prompt: initial("agent_prompt"),
280
+ command: initial("command"),
281
+ max_iterations: initial("max_iterations"),
282
+ },
283
+ // hand-written (the derivation law is for card= stages; this
284
+ // is an engine-verb row): brief prose is TEXT, the command
285
+ // object is DATA, the bound is NUM — the closed Kind
286
+ // vocabulary's own words.
287
+ expected: { agent_prompt: "text", command: "data", max_iterations: "num" },
536
288
  outputs: { default: "image" },
537
- params: {},
289
+
290
+ // $spells against the run's request initials — the brief as
291
+ // PROSE (the door's `brief` kind: no path law, the critic
292
+ // reads it as data), the command as a JSON OBJECT (the `json`
293
+ // kind: the {engine, params} row the craft gate owns — NOT
294
+ // the {engine, comfyui, workflow} shape FAILURES pressed),
295
+ // and max_iterations as a NUMBER (digit-strings refuse at the
296
+ // door; the typed value rides the merge unchanged). An
297
+ // omitted max_iterations omits the key — the engine's own
298
+ // default law. `model` stays a LANE DEFAULT this wave (the
299
+ // loop's route id, not a flow initial — documented in
300
+ // flows/craft-loop/agents/AGENT.md).
301
+ params: {
302
+ agent_prompt: "$agent_prompt",
303
+ command: "$command",
304
+ max_iterations: "$max_iterations",
305
+ },
538
306
  }),
539
307
  ],
540
- initialValidators: {},
308
+ // requiredInitials (fit-seat's GOOD shape): the door refuses an
309
+ // absent brief or command BEFORE the run registers — not sixty
310
+ // seconds in at the engine gate. max_iterations is optional (the
311
+ // engine defaults it).
312
+ initialValidators: {
313
+ agent_prompt: "brief",
314
+ command: "json",
315
+ max_iterations: "number",
316
+ },
317
+ requiredInitials: ["agent_prompt", "command"],
541
318
  tool: null,
542
319
  skillRefs: [],
543
320
  };
544
321
  export const CHARACTER_FACTORY = {
545
322
  id: "character-factory",
546
- description: "Photo → clothed character → rigged → animated (the AssetFurnace-shape " +
547
- "chain, estate-native): img-to-mesh lift with the repair knobs ON, rig " +
548
- "auto (SOMA-77, BODY_TO_SOMAX's lane chained), kimodo text→motion " +
549
- "skinned onto the rigged mesh (somax bake in-graph). Multi-stage: " +
550
- "named registry flows DRIVE at start (the curated-lane lift, " +
551
- "runsRegistry's own law — the refusal is hand-authored inline " +
552
- "only); stages also drive one card at a time — see " +
553
- "flows/character-factory/agents/AGENT.md. Creature motion rides the " +
554
- "MOTION phase instead (unimate dataset clip → rig copy bridge, " +
555
- "game-profile MCPs) — documented in the leaf, never a registry " +
556
- "stage (unimate is an MCP, not melite).",
323
+ description: "Supplied body → rigged → animated, one merged run (the character " +
324
+ "factory's rig→motion leg): the body GLB path rides the `mesh` " +
325
+ "initial — the rig lane's own feed, any bare human mesh " +
326
+ "(an anny bake, a TRELLIS lift, an estimator body) — the rig stage " +
327
+ "composes SOMA-77 auto (KimodoExportFBX), and the motion stage " +
328
+ "skins kimodo text→motion onto the rigged mesh in-graph " +
329
+ "(RaySomaxBake; the rigged-path link is STRING→STRING, the one " +
330
+ "hop the served engine carries). THE LIFT HOP IS NOT A STAGE " +
331
+ "(2026-11-01, the rig-hop dead ref, GPU live-receipt C9): the " +
332
+ "photo→mesh lift's served producer (img-to-mesh's Save3DAdvanced) " +
333
+ "is a terminal FILE_3D save — no served node consumes FILE_3D and " +
334
+ "the merge's slot-0 link is the only in-graph transport — so the " +
335
+ "lift rides the img-to-mesh card door or the object-forge row, and " +
336
+ "its artifact path feeds THIS row's `mesh` initial (the run-chain; " +
337
+ "the C6→D8 receipt shape). Multi-stage: named registry flows " +
338
+ "DRIVE at start (the curated-lane lift, runsRegistry's own law — " +
339
+ "the refusal is hand-authored inline only); stages also drive one " +
340
+ "card at a time — see flows/character-factory/agents/AGENT.md. " +
341
+ "Creature motion rides the MOTION phase instead (unimate dataset " +
342
+ "clip → rig copy bridge, game-profile MCPs) — documented in the " +
343
+ "leaf, never a registry stage (unimate is an MCP, not melite).",
557
344
  stages: [
558
- plainStage({
559
- id: "lift",
560
- engine: CARD_PLANE_ENGINE,
561
- card: "img-to-mesh",
562
- description: "Photo → textured mesh via the img-to-mesh card (repair knobs ON)",
563
- inputs: { photo: initial("photo") },
564
-
565
- expected: { photo: "image" },
566
- outputs: { mesh: "mesh" },
567
- cardIo: { mesh: "mesh" },
568
- params: { model: "pixal3d", input_image: "$photo" },
569
- }),
570
345
  plainStage({
571
346
  id: "rig",
572
347
  engine: CARD_PLANE_ENGINE,
573
348
  card: "rig",
574
- description: "SOMA-77 auto-rig via the rig card (BODY_TO_SOMAX's lane, chained)",
575
- inputs: { mesh: fromStage("lift", "mesh") },
349
+ // THE SEAT IS THE INITIAL (the re-aim): the rig hop's mesh
350
+ // rides a GLB path initial, exactly the lane the retired
351
+ // body-to-somax wrapper served live — an initial substitutes as a STRING value at
352
+ // the merge, so the carrier (PrimitiveString) is type-clean.
353
+ // The old in-graph `mesh: fromStage("lift", "mesh")` wire is
354
+ // the dead ref: the lift's bound producer slot is FILE_3D,
355
+ // and the engine refuses the STRING carrier input loud
356
+ // (silently dropping the downstream KimodoExportFBX +
357
+ // RaySomaxBake outputs — the C9 class).
358
+ description: "SOMA-77 auto-rig via the rig card (BODY_TO_SOMAX's lane, on the supplied body)",
359
+ inputs: { mesh: initial("mesh") },
576
360
  expected: { mesh: "mesh" },
577
361
  outputs: { body: "mesh" },
578
362
  cardIo: { body: "mesh" },
@@ -594,8 +378,8 @@ export const CHARACTER_FACTORY = {
594
378
  params: { model: "kimodo", prompt: "$prompt", preview_glb: "$preview" },
595
379
  }),
596
380
  ],
597
- initialValidators: { photo: "photo", prompt: "text" },
598
- requiredInitials: ["photo", "prompt"],
381
+ initialValidators: { mesh: "glb", prompt: "text" },
382
+ requiredInitials: ["mesh", "prompt"],
599
383
  tool: null,
600
384
  skillRefs: [],
601
385
  };
@@ -618,6 +402,13 @@ export const OBJECT_FORGE = {
618
402
  inputs: { prompt: initial("prompt") },
619
403
 
620
404
  expected: { prompt: "text" },
405
+ // THE ROW RENAMES THE CARD'S CHANNEL (the character-factory
406
+ // lift/rig precedent): the image-gen card binds `default` on its
407
+ // flowOutputBindings row (the producer-law declaration door);
408
+ // this row renames it to the flow-plane `image` the lift wires —
409
+ // kind-matched, one-to-one, so output_nodes follow the rename
410
+ // and `concept.image` resolves in the producer table.
411
+ outputs: { image: "image" },
621
412
  cardIo: { image: "image" },
622
413
  params: { model: "z-image", prompt: "$prompt" },
623
414
  }),
@@ -626,11 +417,26 @@ export const OBJECT_FORGE = {
626
417
  engine: CARD_PLANE_ENGINE,
627
418
  card: "img-to-mesh",
628
419
  description: "Image → textured mesh via the img-to-mesh card (trellis2-native, " +
629
- "no pack; repair knobs ride the card's own defaults)",
420
+ "no pack; the lift stamps the high recipe's own knobs — the " +
421
+ "same stamps every UI birth carries, Recipe default high)",
630
422
  inputs: { concept: fromStage("concept", "image") },
631
423
  expected: { concept: "image" },
632
424
  cardIo: { mesh: "mesh" },
633
- params: { model: "trellis2-native", input_image: "$concept" },
425
+
426
+ // birth lands stamped with the declared default Recipe "high"
427
+ // (resolution 1536, remesh 1024, 1M faces — wire_defaults,
428
+ // applied client-side at birth only), while a bare {flow:}
429
+ // press composed at the family floor (1024) — the same lift
430
+ // produced different meshes by door. The stamps below are the
431
+ // high row's wire_defaults verbatim, and 1536 is the official
432
+ // template's own upsample default
433
+ // (3d_pixal3d_trellis2_image_to_model.json [94]). Compose
434
+ // never applies recipe wire_defaults server-side; the stage's
435
+ // own params are the flow plane's one seat.
436
+ params: {
437
+ model: "trellis2-native", input_image: "$concept",
438
+ resolution: "1536", remesh_resolution: 1024, decimate_faces: 1000000,
439
+ },
634
440
  }),
635
441
  ],
636
442
  initialValidators: { prompt: "text" },