@melite/models-h3 0.1.5-pre-alpha → 0.2.0-alpha

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/lib/swap.js ADDED
@@ -0,0 +1,95 @@
1
+ import { loadVideo, renderMaskedEditChain } from './chainEdit.js';
2
+ /** The swap entry's required media + text seats (the reshoot idiom:
3
+ * an armed doc with an empty seat refuses loud naming the seat). */
4
+ const REQUIRED_SEATS = [
5
+ ['source_clip', 'the source video whose person is replaced — ONE staged leaf: the VHS slice loader + the core LoadVideo read it by staged name, and the timeline reads it back off the native VIDEO wire (its video_path string rides along staged but unread)'],
6
+ ['still', 'the replacement still (the R2V ref_images LoadImage + the plan picture_1)'],
7
+ ['mannequin', 'the mannequin video from the track-card run (the R2V ref_videos H3GreyMannequins output)'],
8
+ ['mask', 'ONE staged PNG from the track-card run — the pixel-max UNION of its grown per-frame masks is recommended (per-frame motion rides the mannequin; the edit-latent + masked-target mask, reference GrowMaskWithBlur expand 40)'],
9
+ ['swap_prompt', 'the swap action text (agent-composed, user-confirmed — the R2V prompt seat; the estate has no in-graph describers)'],
10
+ ];
11
+ const str = (p, k) => typeof p[k] === 'string' ? p[k] : '';
12
+ const num = (p, k, d) => typeof p[k] === 'number' ? p[k] : d;
13
+ /** The swap renderer: validates the bound entry, then composes the
14
+ * masked-edit chain per the reference map above. The film path
15
+ * never reaches here (the card branches ONLY on a non-empty replace
16
+ * bag, and refuses a bag under an armed reshoot — one door per doc).
17
+ * @param entry the replace mod's single bound entry
18
+ * @param p the walked doc params (the lora mod bag + SLA/shift knobs —
19
+ * the family plane this swap renders under)
20
+ * @param facts the family's lane facts (unet off the DECL row)
21
+ * @param g the run's graph builder
22
+ * @param runId the run tree's id (the assemble filename rides it) */
23
+ export function renderH3Swap(entry, p, facts, g, runId) {
24
+ for (const [seat, what] of REQUIRED_SEATS) {
25
+ const v = entry[seat];
26
+ if (typeof v !== 'string' || v.trim() === '') {
27
+ throw new Error(`h3-timeline replace: '${seat}' names no media — ${what}; a swap needs all five seats bound (source_clip, still, mannequin, mask, swap_prompt)`);
28
+ }
29
+ }
30
+ const keepAudio = entry.keep_audio !== false;
31
+ const seed = num(entry, 'seed', 0);
32
+ const steps = num(entry, 'steps', 6);
33
+ const clipSeconds = num(entry, 'clip_seconds', 6);
34
+ const resolution = str(entry, 'resolution') || '736p';
35
+ // ── the staged media (the R0 cards' artifacts: the source clip,
36
+ // the still, the track card's mannequin + grown mask) ──
37
+ const [srcFrames, srcAudio] = loadVideo(g, str(entry, 'source_clip'));
38
+ const stillImg = g.node('LoadImage', { image: str(entry, 'still') }).out(0);
39
+ const maskOf = g.node('ImageToMask', {
40
+ image: g.node('LoadImage', { image: str(entry, 'mask') }).out(0),
41
+ channel: 'red',
42
+ }).out(0);
43
+ const [mannequin] = loadVideo(g, str(entry, 'mannequin'));
44
+ renderMaskedEditChain(g, {
45
+ p, facts,
46
+ clipSeconds,
47
+ overlapFrames: num(entry, 'overlap_frames', 39),
48
+ resolution, seed, steps,
49
+ roles: str(entry, 'roles'),
50
+ sourceClip: str(entry, 'source_clip'),
51
+ windowStart: 0,
52
+ picture1: stillImg,
53
+ srcFrames, srcAudio,
54
+ // the ignored literal fallback — the plan node's SOURCE-SLICED
55
+ // shots ride plan_json_input (the swap's own semantics)
56
+ planJson: JSON.stringify({ shots: [{ id: 'swap', prompt: str(entry, 'swap_prompt') }] }),
57
+ planFromSource: true,
58
+ denoise: 1,
59
+ assemble: {
60
+ audioSource: keepAudio ? 'source' : 'generated',
61
+ filename: `${runId}/swap`,
62
+ },
63
+ body: ({ cur, clip, vaeVideo, vaeAudio, mutedChainAudio, sliceAudio }) => {
64
+ // ── the masked edit body: the still anchors identity, the
65
+ // mannequin carries motion, the staged PNG masks the edit ──
66
+ const r2v = g.node('MiniMaxH3ReferenceToVideo', {
67
+ prompt: str(entry, 'swap_prompt'),
68
+ width: cur.out(8), height: cur.out(9), length: cur.out(6),
69
+ ref_image_size: 'match',
70
+ clip, vae: vaeVideo, audio_vae: vaeAudio,
71
+ 'ref_images.ref_image_0': stillImg,
72
+ 'ref_videos.ref_video_0': mannequin,
73
+ 'ref_video_audios.ref_video_audio_0': mutedChainAudio,
74
+ });
75
+ const slice = g.node('H3SourceSlice', {
76
+ source_fps: 24, crop: 'center',
77
+ state: cur.out(0), latent: r2v.out(1),
78
+ audio_vae: vaeAudio, source_frames: srcFrames, source_audio: sliceAudio,
79
+ });
80
+ const edit = g.node('MiniMaxH3FantasticVideoEditLatent', {
81
+ grow: 0, keep_audio: keepAudio, megapixels: 0,
82
+ vae: vaeVideo, images: slice.out(0), mask: maskOf,
83
+ audio_vae: vaeAudio, audio: slice.out(1),
84
+ }).out(0);
85
+ const target = g.node('MiniMaxH3ContexMaskedTarget', {
86
+ mask_meaning: 'white = generate',
87
+ audio_mode: keepAudio ? 'preserve source audio' : 'generate all audio',
88
+ mask_conversion: 'H3 exact (causal/token max)',
89
+ target_latent: edit, mask: maskOf,
90
+ }).out(0);
91
+ return { conditioning: r2v.out(0), targetLatent: target };
92
+ },
93
+ });
94
+ }
95
+ //# sourceMappingURL=swap.js.map
@@ -20,7 +20,125 @@ export interface TimelineCallSpan {
20
20
  readonly end_frame: number;
21
21
  readonly transition?: string;
22
22
  }
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+ export declare function isMediaRef(v: string): boolean;
23
32
  export declare function transitionOverlap(transition?: string): number;
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+ export declare const DOC_FPS_DEFAULT: 24;
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+ export declare const T4_ONLY_KEYS: readonly ["sharpen_switch", "sharpen_method", "sharpen_strength", "sharpen_radius", "sharpen_threshold", "sharpen_iterations", "interp_switch", "interp_multiplier", "interp_model", "sr_switch", "sr_model", "sr_resolution", "second_pass_enabled", "sharpen_enabled", "interpolate_enabled", "attention_backend"];
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+ export declare const FILM_ONLY_KEYS: readonly ["duck_depth_db"];
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+ export declare const FAMILY_LAW: {
108
+ readonly lanes: readonly [{
109
+ readonly lane: "t4_chain";
110
+ readonly minCalls: 2;
111
+ }, {
112
+ readonly lane: "t4r";
113
+ readonly guideKeys: readonly ["keyframes", "last_frame", "ref_images", "ref_videos", "ref_audios", "image", "image_name", "ref_image"];
114
+ readonly callGuideKeys: readonly ["image", "ref_images", "ref_image", "image_name"];
115
+ }, {
116
+ readonly lane: "t4_open";
117
+ }];
118
+ readonly deadKeys: {
119
+ readonly t4r: readonly ["sharpen_switch", "sharpen_method", "sharpen_strength", "sharpen_radius", "sharpen_threshold", "sharpen_iterations", "interp_switch", "interp_multiplier", "interp_model", "sr_switch", "sr_model", "sr_resolution", "second_pass_enabled", "sharpen_enabled", "interpolate_enabled", "attention_backend"];
120
+ };
121
+ };
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+ export declare function deriveWindowFamily(raw: Record<string, unknown>): 't4r' | 't4_open' | 't4_chain';
24
142
  export declare function spanOverlap(span: TimelineSpan): number;
25
143
  export declare function spanStanzaFrames(span: TimelineSpan, carry?: number): number;
26
144
  export interface CarriedSpanGrid {
@@ -39,6 +157,36 @@ export declare function gridSnap(length: number): number;
39
157
  * drift into different laws. */
40
158
  export declare function isGridLength(length: number): boolean;
41
159
  export declare function assertGridLength(length: unknown, where: string): number;
160
+ /** The chain policy's masked_av context — the overlap every composed
161
+ * seam after the first carries (the swap's clip law, shared with the
162
+ * extend's window composition). */
163
+ export declare const CONTEXT_OVERLAP_FRAMES = 39;
164
+ /** The plan's scene cap (chain_nodes: a 32-scene cap refuses
165
+ * mis-authored loops) — the composition solver's window ceiling. */
166
+ export declare const MAX_COMPOSED_WINDOWS = 32;
167
+ /** One legal composition of a stated extension. */
168
+ export interface WindowComposition {
169
+ readonly windows: number;
170
+ readonly windowFrames: number;
171
+ readonly deliveredFrames: number;
172
+ }
173
+ /** THE COMPOSITION SOLVER (pure; the door's whole law beyond one
174
+ * window): across every legal window count, the grid lengths on
175
+ * both sides of the exact requirement — the smallest that delivers
176
+ * ≥ stated (ceil) and the largest that delivers ≤ stated (floor) —
177
+ * looking for an EXACT delivery; else a loud refusal naming the
178
+ * neighboring compositions (max under, min over).
179
+ *
180
+ * It lives HERE, on the client-safe contract face, because TWO
181
+ * consumers ask the same question: the extend renderer (what to
182
+ * compose) and the studio's commission rail (what to DRAW — the
183
+ * multiwindow unification audit's §9: the operator could not see
184
+ * the N windows an agent had strung together).
185
+ * @param totalFrames the stated extension, frames at the film clock
186
+ * @param where the refusal's voice ('h3-timeline extend')
187
+ * @param overlap the per-seam context overlap (the policy's 39)
188
+ * @returns the exact composition */
189
+ export declare function solveWindowComposition(totalFrames: number, where: string, overlap?: number): WindowComposition;
42
190
 
43
191
 
44
192
 
@@ -57,6 +205,21 @@ export declare function refGenreOf(name: string, url?: string): 'image' | 'video
57
205
  export declare const KNOB_ORDER: readonly ["steps", "denoise", "sampler_name", "sched_name", "shift_video", "shift_audio", "sla_sparsity", "sla_block_size", "sla_min_seq_len", "sla_dense_last_steps", "sla_protect_audio", "sla_stabilize_motion", "sla_reference_protection", "sla_dense_backend", "sla_dense_steps", "sla_disable_fp16_accum", "sharpen_enabled", "sharpen_method", "sharpen_strength", "sharpen_radius", "sharpen_threshold", "sharpen_iterations", "interpolate_enabled", "interp_model", "interp_multiplier", "length"];
58
206
  export type KnobKey = (typeof KNOB_ORDER)[number];
59
207
  export declare const CALL_KNOB_KEYS: ReadonlySet<string>;
208
+
209
+
210
+
211
+
212
+
213
+
214
+ export declare const SECOND_PASS_KNOBS: ReadonlySet<string>;
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
60
223
  export declare const CALL_KEYS: ReadonlySet<string>;
61
224
  export declare const LEGACY_KNOB_KEY: {
62
225
  readonly sampling_steps: "steps";
@@ -1,3 +1,4 @@
1
+ import { deriveFamilyLane } from '@melite/contracts/familyLane';
1
2
  export const SEAM_OVERLAP_FRAMES = 22;
2
3
  export const GRID_BASE_FRAMES = 22;
3
4
  export const GRID_STEP_FRAMES = 17;
@@ -13,9 +14,143 @@ export const REF_CAPS = {
13
14
  // the loader row the compose fills.
14
15
  refmods: 8,
15
16
  };
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+ export function isMediaRef(v) {
26
+ return v.startsWith('$') || v.startsWith('data:') || v.includes('/') || /\.[A-Za-z0-9]+$/.test(v);
27
+ }
16
28
  export function transitionOverlap(transition) {
17
29
  return transition === 'cut' ? 0 : SEAM_OVERLAP_FRAMES;
18
30
  }
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+ export const DOC_FPS_DEFAULT = 24;
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+ export const T4_ONLY_KEYS = [
69
+ 'sharpen_switch', 'sharpen_method', 'sharpen_strength', 'sharpen_radius',
70
+ 'sharpen_threshold', 'sharpen_iterations', 'interp_switch',
71
+ 'interp_multiplier', 'interp_model', 'sr_switch', 'sr_model', 'sr_resolution',
72
+ 'second_pass_enabled', 'sharpen_enabled', 'interpolate_enabled',
73
+ 'attention_backend',
74
+ ];
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+ export const FILM_ONLY_KEYS = ['duck_depth_db'];
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+ export const FAMILY_LAW = {
112
+ lanes: [
113
+ { lane: 't4_chain', minCalls: 2 },
114
+ {
115
+ lane: 't4r',
116
+ guideKeys: ['keyframes', 'last_frame', 'ref_images', 'ref_videos', 'ref_audios', 'image', 'image_name', 'ref_image'],
117
+ callGuideKeys: ['image', 'ref_images', 'ref_image', 'image_name'],
118
+ },
119
+ { lane: 't4_open' },
120
+ ],
121
+ deadKeys: { t4r: T4_ONLY_KEYS },
122
+ };
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+ export function deriveWindowFamily(raw) {
143
+
144
+ // the SHARED evaluator over the FAMILY_LAW data above — the same
145
+
146
+ // seat ride. The doc-level guide seats the walk reads (actions.ts
147
+ // guideImage = image ?? image_name; the render's guide0 = image,
148
+ // image_name, ref_image) are DECLARED in the law's guideKeys, so
149
+ // the private spelling below is dead — a seat missed in the data
150
+ // is now a seat every judge misses together, never a split family
151
+ // (the run-899a8448 disease).
152
+ return deriveFamilyLane(FAMILY_LAW, raw);
153
+ }
19
154
  export function spanOverlap(span) {
20
155
  return transitionOverlap(span.transition);
21
156
  }
@@ -80,6 +215,67 @@ export function assertGridLength(length, where) {
80
215
  }
81
216
  return length;
82
217
  }
218
+ /** The chain policy's masked_av context — the overlap every composed
219
+ * seam after the first carries (the swap's clip law, shared with the
220
+ * extend's window composition). */
221
+ export const CONTEXT_OVERLAP_FRAMES = 39;
222
+ /** The plan's scene cap (chain_nodes: a 32-scene cap refuses
223
+ * mis-authored loops) — the composition solver's window ceiling. */
224
+ export const MAX_COMPOSED_WINDOWS = 32;
225
+ /** The largest 22+17k grid length ≤ x (floored at 22, capped 362). */
226
+ const gridFloorFrames = (x) => Math.min(GRID_MAX_FRAMES, GRID_BASE_FRAMES + GRID_STEP_FRAMES * Math.floor((x - GRID_BASE_FRAMES) / GRID_STEP_FRAMES));
227
+ /** The smallest 22+17k grid length ≥ x (capped at 362); null when x
228
+ * exceeds the grid — that window count cannot carry the total. */
229
+ const gridCeilFrames = (x) => {
230
+ const k = Math.ceil((x - GRID_BASE_FRAMES) / GRID_STEP_FRAMES);
231
+ const length = Math.max(GRID_BASE_FRAMES, GRID_BASE_FRAMES + GRID_STEP_FRAMES * k);
232
+ return length > GRID_MAX_FRAMES ? null : length;
233
+ };
234
+ /** THE COMPOSITION SOLVER (pure; the door's whole law beyond one
235
+ * window): across every legal window count, the grid lengths on
236
+ * both sides of the exact requirement — the smallest that delivers
237
+ * ≥ stated (ceil) and the largest that delivers ≤ stated (floor) —
238
+ * looking for an EXACT delivery; else a loud refusal naming the
239
+ * neighboring compositions (max under, min over).
240
+ *
241
+ * It lives HERE, on the client-safe contract face, because TWO
242
+ * consumers ask the same question: the extend renderer (what to
243
+ * compose) and the studio's commission rail (what to DRAW — the
244
+ * multiwindow unification audit's §9: the operator could not see
245
+ * the N windows an agent had strung together).
246
+ * @param totalFrames the stated extension, frames at the film clock
247
+ * @param where the refusal's voice ('h3-timeline extend')
248
+ * @param overlap the per-seam context overlap (the policy's 39)
249
+ * @returns the exact composition */
250
+ export function solveWindowComposition(totalFrames, where, overlap = CONTEXT_OVERLAP_FRAMES) {
251
+ let bestUnder = null;
252
+ let bestOver = null;
253
+ for (let windows = 1; windows <= MAX_COMPOSED_WINDOWS; windows++) {
254
+ const exact = (totalFrames + (windows - 1) * overlap) / windows;
255
+ for (const windowFrames of [gridFloorFrames(exact), gridCeilFrames(exact)]) {
256
+ if (windowFrames === null)
257
+ continue;
258
+ const delivered = windows * windowFrames - (windows - 1) * overlap;
259
+ if (delivered === totalFrames)
260
+ return { windows, windowFrames, deliveredFrames: delivered };
261
+ const composition = { windows, windowFrames, deliveredFrames: delivered };
262
+ if (delivered < totalFrames) {
263
+ if (bestUnder === null || delivered > bestUnder.deliveredFrames)
264
+ bestUnder = composition;
265
+ }
266
+ else if (bestOver === null || delivered < bestOver.deliveredFrames) {
267
+ bestOver = composition;
268
+ }
269
+ }
270
+ }
271
+ const neighbor = (c) => c === null ? '' :
272
+ ` nearest: ${c.windows} windows of ${c.windowFrames}f deliver ${c.deliveredFrames}f (${(c.deliveredFrames / 24).toFixed(3)}s);`;
273
+ throw new Error(`${where}: stated ${totalFrames}f composes nowhere exactly — ` +
274
+ `N uniform 22+17k windows under the ${overlap}f context overlap compose exactly nowhere;` +
275
+ `${neighbor(bestUnder)}${neighbor(bestOver)}` +
276
+ ` re-state extend_seconds as a composition's delivered seconds ` +
277
+ `(D frames round-trips D/24 exactly; a single window keeps the 22+17k grid door)`);
278
+ }
83
279
 
84
280
 
85
281
 
@@ -187,8 +383,27 @@ export const KNOB_ORDER = [
187
383
  'length',
188
384
  ];
189
385
  export const CALL_KNOB_KEYS = new Set(KNOB_ORDER);
386
+
387
+
388
+
389
+
390
+
391
+
392
+ export const SECOND_PASS_KNOBS = new Set([
393
+ 'sharpen_enabled', 'sharpen_method', 'sharpen_strength',
394
+ 'sharpen_radius', 'sharpen_threshold', 'sharpen_iterations',
395
+ 'interpolate_enabled', 'interp_model', 'interp_multiplier',
396
+ ]);
397
+
398
+
399
+
400
+
401
+
402
+
403
+
404
+
190
405
  export const CALL_KEYS = new Set([
191
- 'text', 'start_frame', 'end_frame', 'image', 'clip', 'audio',
406
+ 'text', 'start_frame', 'end_frame', 'image',
192
407
  'transition', 'knobs', 'refs',
193
408
  'ref_image', 'image_name', 'ref_images', 'ref_videos', 'ref_audios',
194
409
  'beats', 'last_frame', 'first_frame_prev_sec', 'seam_carry',
@@ -0,0 +1,23 @@
1
+ export interface WindowSpecProjection {
2
+ /** the carrier's own key universe (paramSchema dict), sorted. */
3
+ readonly carrierKeys: readonly string[];
4
+ /** the UI-served envelope (the emission's properties), sorted. */
5
+ readonly envelope: readonly string[];
6
+ /** the family door's declared per-window rows, sorted. */
7
+ readonly filmRows: readonly string[];
8
+ /** carrierKeys − envelope: hidden by the carrier's own law, sorted. */
9
+ readonly carrierInternal: readonly string[];
10
+ /** envelope − filmRows: served with a named exemption, sorted. */
11
+ readonly undeclaredServed: readonly string[];
12
+ /** filmRows − envelope: declared wire/internal, sorted. */
13
+ readonly unservedDeclared: readonly string[];
14
+ }
15
+ /**
16
+ * Serve the h3 window's three-home surface as one projection: the
17
+ * carrier universe, the served envelope, and the family door's film
18
+ * rows, plus the three named difference sets the parity wall judges.
19
+ * Pure derivation — no hand lists; a row or knob added on any side
20
+ * shifts the sets and the wall names it.
21
+ */
22
+ export declare function serveWindowSpec(): WindowSpecProjection;
23
+ //# sourceMappingURL=windowSpec.d.ts.map
@@ -0,0 +1,49 @@
1
+ // windowSpec.ts — THE H3 WINDOW PROJECTION SEAM (Slice 0 of the P0
2
+
3
+ //
4
+ // The h3 window is function-served: the walk judges the window schema
5
+ // (schema.ts paramSchema + schema()), the family door judges the film
6
+ // action rows (actions.ts film.params), and the UI serves the carrier
7
+ // emission (emitParamsSchema over paramSchema). This module is the ONE
8
+ // serving projection of that three-home surface — a package export the
9
+ // walls (h3-window-parity.spec.ts) and the future hop census consume,
10
+ // never a test helper. Home is models/h3 (it owns both inputs and
11
+ // already depends on card-kit): the discovery.ts home the design
12
+ // sketches would hang a harness→family import, and the card-kit home
13
+ // would invert card-kit→family. New module, no cycle (schema/actions
14
+ // never import back).
15
+ import { emitParamsSchema } from "@melite/comfyui-card-kit/params-emit";
16
+ import { film } from "./actions.js";
17
+ import { paramSchema } from "./schema.js";
18
+ const sorted = (keys) => [...new Set(keys)].sort();
19
+ /**
20
+ * Serve the h3 window's three-home surface as one projection: the
21
+ * carrier universe, the served envelope, and the family door's film
22
+ * rows, plus the three named difference sets the parity wall judges.
23
+ * Pure derivation — no hand lists; a row or knob added on any side
24
+ * shifts the sets and the wall names it.
25
+ */
26
+ export function serveWindowSpec() {
27
+ const carrierKeys = sorted(Object.keys(paramSchema.dict ?? {}));
28
+ // The bridge rides the toolProjection.ts precedent in two steps:
29
+ // the schemastery object's Meta carries no string index, so the
30
+ // static types cannot prove its overlap with the emitter's minimal
31
+ // face — but the face's whole job is carrying .dict (card-definition
32
+ // Ledger row 23), which this object provably has. Claim only the
33
+ // dict, then take the face the same way the tool face does.
34
+ const carrier = paramSchema;
35
+ const emitted = emitParamsSchema(carrier, ["h3"]);
36
+ const envelope = sorted(Object.keys(emitted.properties ?? {}));
37
+ const filmRows = sorted(film.params.map((r) => r.name));
38
+ const inEnvelope = new Set(envelope);
39
+ const inFilm = new Set(filmRows);
40
+ return {
41
+ carrierKeys,
42
+ envelope,
43
+ filmRows,
44
+ carrierInternal: sorted(carrierKeys.filter((k) => !inEnvelope.has(k))),
45
+ undeclaredServed: sorted(envelope.filter((k) => !inFilm.has(k))),
46
+ unservedDeclared: sorted(filmRows.filter((k) => !inEnvelope.has(k))),
47
+ };
48
+ }
49
+ //# sourceMappingURL=windowSpec.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@melite/models-h3",
3
- "version": "0.1.5-pre-alpha",
4
- "license": "SSPL-1.0",
3
+ "version": "0.2.0-alpha",
4
+ "license": "AGPL-3.0-or-later",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
@@ -31,14 +31,14 @@
31
31
  }
32
32
  },
33
33
  "dependencies": {
34
- "@deepseek-ai/schemastery": "^3.18.4",
35
- "@melite/contracts": "0.1.5-pre-alpha",
36
- "@melite/comfyui-card-kit": "0.1.5-pre-alpha"
34
+ "@deepseek-ai/schemastery": "^3.18.5",
35
+ "@melite/contracts": "0.2.0-alpha",
36
+ "@melite/comfyui-card-kit": "0.2.0-alpha"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^22.20.0",
40
40
  "typescript": "^5.9.3",
41
- "@deepseek-ai/cordis": "^4.0.4",
41
+ "@deepseek-ai/cordis": "^4.0.5",
42
42
  "@deepseek-ai/cosmokit": "~1.8.5"
43
43
  },
44
44
  "files": [
@@ -47,7 +47,7 @@
47
47
  "lib/**/*.d.ts"
48
48
  ],
49
49
  "peerDependencies": {
50
- "@deepseek-ai/cordis": "^4.0.4",
50
+ "@deepseek-ai/cordis": "^4.0.5",
51
51
  "@deepseek-ai/cosmokit": "~1.8.5"
52
52
  },
53
53
  "scripts": {