@melite/estate-queue 0.0.0-stage → 0.1.4-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/LICENSE +557 -0
- package/lib/bakeParams.d.ts +17 -0
- package/lib/bakeParams.js +182 -0
- package/lib/bench.d.ts +24 -0
- package/lib/bench.js +121 -0
- package/lib/cardsArmError.d.ts +18 -0
- package/lib/cardsArmError.js +33 -0
- package/lib/cardsCompose.d.ts +41 -0
- package/lib/cardsCompose.js +247 -0
- package/lib/cardsDangling.d.ts +16 -0
- package/lib/cardsDangling.js +168 -0
- package/lib/cardsFacts.d.ts +74 -0
- package/lib/cardsFacts.js +64 -0
- package/lib/cardsLanes.d.ts +33 -0
- package/lib/cardsLanes.js +115 -0
- package/lib/cardsRegistry.d.ts +316 -0
- package/lib/cardsRegistry.js +1274 -0
- package/lib/cardsVariant.d.ts +28 -0
- package/lib/cardsVariant.js +190 -0
- package/lib/discloseRegistry.d.ts +94 -0
- package/lib/discloseRegistry.js +154 -0
- package/lib/filmLead.d.ts +4 -0
- package/lib/filmLead.js +17 -0
- package/lib/filmMemoryWarn.d.ts +27 -0
- package/lib/filmMemoryWarn.js +99 -0
- package/lib/flowsData.d.ts +179 -0
- package/lib/flowsData.js +547 -0
- package/lib/flowsFamilyCompose.d.ts +48 -0
- package/lib/flowsFamilyCompose.js +191 -0
- package/lib/flowsRegistryRows.d.ts +10 -0
- package/lib/flowsRegistryRows.js +378 -0
- package/lib/index.d.ts +50 -0
- package/lib/index.js +66 -0
- package/lib/ledgerTail.d.ts +20 -0
- package/lib/ledgerTail.js +123 -0
- package/lib/loadPlane.d.ts +93 -0
- package/lib/loadPlane.js +553 -0
- package/lib/loadRegistry.d.ts +22 -0
- package/lib/loadRegistry.js +55 -0
- package/lib/manageOps.d.ts +21 -0
- package/lib/manageOps.js +142 -0
- package/lib/managePlane.d.ts +120 -0
- package/lib/managePlane.js +1515 -0
- package/lib/manageProbe.d.ts +57 -0
- package/lib/manageProbe.js +154 -0
- package/lib/manageRegistry.d.ts +28 -0
- package/lib/manageRegistry.js +75 -0
- package/lib/managerRail.d.ts +33 -0
- package/lib/managerRail.js +91 -0
- package/lib/mediaKinds.d.ts +3 -0
- package/lib/mediaKinds.js +2 -0
- package/lib/queue.d.ts +9 -0
- package/lib/queue.js +76 -0
- package/lib/queueCore.d.ts +69 -0
- package/lib/queueCore.js +124 -0
- package/lib/queueLifecycle.d.ts +26 -0
- package/lib/queueLifecycle.js +65 -0
- package/lib/queueLock.d.ts +54 -0
- package/lib/queueLock.js +195 -0
- package/lib/queueResurrect.d.ts +59 -0
- package/lib/queueResurrect.js +249 -0
- package/lib/queueRetry.d.ts +36 -0
- package/lib/queueRetry.js +24 -0
- package/lib/queueSidecar.d.ts +145 -0
- package/lib/queueSidecar.js +182 -0
- package/lib/queueSubmit.d.ts +31 -0
- package/lib/queueSubmit.js +117 -0
- package/lib/queueSweep.d.ts +30 -0
- package/lib/queueSweep.js +121 -0
- package/lib/resurrect.d.ts +6 -0
- package/lib/resurrect.js +18 -0
- package/lib/rootsManifest.d.ts +11 -0
- package/lib/rootsManifest.js +11 -0
- package/lib/runStatus.d.ts +7 -0
- package/lib/runStatus.js +21 -0
- package/lib/runsChange.d.ts +53 -0
- package/lib/runsChange.js +63 -0
- package/lib/runsErrorCodes.d.ts +2 -0
- package/lib/runsErrorCodes.js +15 -0
- package/lib/runsExecute.d.ts +26 -0
- package/lib/runsExecute.js +356 -0
- package/lib/runsGates.d.ts +161 -0
- package/lib/runsGates.js +306 -0
- package/lib/runsList.d.ts +78 -0
- package/lib/runsList.js +580 -0
- package/lib/runsRefusalVoices.d.ts +9 -0
- package/lib/runsRefusalVoices.js +44 -0
- package/lib/runsRegistry.d.ts +253 -0
- package/lib/runsRegistry.js +1750 -0
- package/lib/runsSourceEcho.d.ts +54 -0
- package/lib/runsSourceEcho.js +275 -0
- package/lib/runsStart.d.ts +121 -0
- package/lib/runsStart.js +528 -0
- package/lib/runsTypes.d.ts +183 -0
- package/lib/runsTypes.js +282 -0
- package/lib/runsValidate.d.ts +5 -0
- package/lib/runsValidate.js +31 -0
- package/lib/runsValidateArms.d.ts +7 -0
- package/lib/runsValidateArms.js +285 -0
- package/lib/runsValidateInline.d.ts +6 -0
- package/lib/runsValidateInline.js +82 -0
- package/lib/runsValidateRefusals.d.ts +7 -0
- package/lib/runsValidateRefusals.js +18 -0
- package/lib/runsValidateServe.d.ts +15 -0
- package/lib/runsValidateServe.js +254 -0
- package/lib/runsValidateShared.d.ts +84 -0
- package/lib/runsValidateShared.js +88 -0
- package/lib/runsValidateStages.d.ts +25 -0
- package/lib/runsValidateStages.js +491 -0
- package/lib/runsValidateSweeps.d.ts +6 -0
- package/lib/runsValidateSweeps.js +143 -0
- package/lib/service.d.ts +45 -0
- package/lib/service.js +81 -0
- package/lib/skillFrontmatter.d.ts +11 -0
- package/lib/skillFrontmatter.js +46 -0
- package/lib/skillFs.d.ts +19 -0
- package/lib/skillFs.js +80 -0
- package/lib/skillPlane.d.ts +98 -0
- package/lib/skillPlane.js +263 -0
- package/lib/skillRegistry.d.ts +23 -0
- package/lib/skillRegistry.js +55 -0
- package/lib/skillRows.d.ts +126 -0
- package/lib/skillRows.js +466 -0
- package/lib/toolProjection.d.ts +30 -0
- package/lib/toolProjection.js +142 -0
- package/lib/vocab.d.ts +6 -0
- package/lib/vocab.js +18 -0
- package/package.json +47 -4
- package/README.md +0 -3
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
// flowsFamilyCompose.ts — the family-action stage interpreter (the
|
|
2
|
+
// atom vocabulary, stroke 4 — the flow plane's estimator half). A
|
|
3
|
+
// registry stage that names a FAMILY plus one of its declared
|
|
4
|
+
// actions composes HERE, at expansion time: the flow row owns
|
|
5
|
+
// routing only, the family's DECL owns the nodes — the same
|
|
6
|
+
// hierarchy a card stage rides (the card dispatches
|
|
7
|
+
// ACTION_BINDINGS; the flow dispatches family+action directly, no
|
|
8
|
+
// card face — the SubActionMod law: a verb's knobs never join any
|
|
9
|
+
// card schema; they ride the family's own action declaration).
|
|
10
|
+
//
|
|
11
|
+
// WIRE PARITY: the composed stage lands as the exact envelope a
|
|
12
|
+
// raw `workflow:` stage landed — params.workflow carries the
|
|
13
|
+
// serialized graph, $-refs ride verbatim (the inline compile and
|
|
14
|
+
// the merged worker own their resolution, exactly as for raw
|
|
15
|
+
// graphs), outputs derive from the ACTION's declared outputs (the
|
|
16
|
+
// derivation law: the row never hand-mirrors what the declaration
|
|
17
|
+
// already owns; a contradicting hand-write refuses LOUD).
|
|
18
|
+
import { declaredAction, instantiateAction } from "@melite/comfyui-card-kit";
|
|
19
|
+
import { GraphBuilder } from "@melite/comfyui-card-kit/graph";
|
|
20
|
+
import { modelsService } from "@melite/comfyui-cordis";
|
|
21
|
+
/** The live family declarations, and how the seat answered. A flow
|
|
22
|
+
* WITH a family stage refuses LOUD on an unanswering seat inside
|
|
23
|
+
* composeOne, in the seat's own voice.
|
|
24
|
+
* @param modelsSeat the context's models service when mounted
|
|
25
|
+
* (the injectable read); the booted singleton otherwise
|
|
26
|
+
* @returns the declarations (empty on an unanswering seat) and the
|
|
27
|
+
* state that produced them */
|
|
28
|
+
export function liveFamilySeat(modelsSeat) {
|
|
29
|
+
if (modelsSeat !== undefined && modelsSeat !== null) {
|
|
30
|
+
const decls = modelsSeat.allDecls();
|
|
31
|
+
return { decls, state: decls.length === 0 ? "bare" : "seated" };
|
|
32
|
+
}
|
|
33
|
+
try {
|
|
34
|
+
const decls = modelsService().allDecls();
|
|
35
|
+
return { decls, state: decls.length === 0 ? "bare" : "seated" };
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return { decls: [], state: "absent" };
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/** The live family declarations, for the callers that only need the
|
|
42
|
+
* rows. A refusal composed from these alone cannot tell an absent
|
|
43
|
+
* seat from an unregistered family — use {@link liveFamilySeat}.
|
|
44
|
+
* @param modelsSeat the context's models service when mounted
|
|
45
|
+
* @returns the family declarations, or [] when no seat answers */
|
|
46
|
+
export function liveFamilyDecls(modelsSeat) {
|
|
47
|
+
return liveFamilySeat(modelsSeat).decls;
|
|
48
|
+
}
|
|
49
|
+
/** One family stage's resolved form: the workflow envelope plus the
|
|
50
|
+
* derived outputs. Null = not a family stage (passthrough). */
|
|
51
|
+
function composeOne(flowId, st, decls, seatState) {
|
|
52
|
+
if (st.family === "")
|
|
53
|
+
return st;
|
|
54
|
+
// Either/or is the row contract (flowsData's RegistryStage): a
|
|
55
|
+
// stage naming BOTH would compose a graph the card gate then
|
|
56
|
+
// judges — refuse the contradiction at admission.
|
|
57
|
+
if (st.card !== "") {
|
|
58
|
+
throw new Error("flow '" + flowId + "' stage '" + st.id + "' names card '" + st.card +
|
|
59
|
+
"' AND family '" + st.family + "' — a stage routes through one plane, never both");
|
|
60
|
+
}
|
|
61
|
+
const decl = decls.find((d) => d.id === st.family);
|
|
62
|
+
if (decl === undefined) {
|
|
63
|
+
const registered = decls.map((d) => d.id).sort().join(", ") || "none";
|
|
64
|
+
const where = "flow '" + flowId + "' stage '" + st.id + "' naming family '" + st.family + "'";
|
|
65
|
+
// THE SEAT'S OWN VOICE PER CONDITION. An absent seat and a bare
|
|
66
|
+
// mount are environment facts and each has its own repair; only
|
|
67
|
+
// the third — a seated table without this family — is a
|
|
68
|
+
// registration fact. Collapsing all three into "no such family"
|
|
69
|
+
// named a typo where the lane had no table to ask.
|
|
70
|
+
if (seatState === "absent") {
|
|
71
|
+
throw new Error("[models] no ModelsService for " + where +
|
|
72
|
+
" — doors inject 'models' and pass ctx.models " +
|
|
73
|
+
"(the manifest's engine-model-catalog row provides at boot)");
|
|
74
|
+
}
|
|
75
|
+
if (seatState === "bare") {
|
|
76
|
+
throw new Error(where + " — the models seat is mounted with ZERO families " +
|
|
77
|
+
"(registered: none): this lane mounted the bare catalog " +
|
|
78
|
+
"provider without the families row, so no family can resolve");
|
|
79
|
+
}
|
|
80
|
+
throw new Error("flow '" + flowId + "' stage '" + st.id + "' names family '" + st.family +
|
|
81
|
+
"' — no such family in the models seat (registered: " + registered + ")");
|
|
82
|
+
}
|
|
83
|
+
let action;
|
|
84
|
+
try {
|
|
85
|
+
action = declaredAction(decl, st.action);
|
|
86
|
+
}
|
|
87
|
+
catch (e) {
|
|
88
|
+
// The kit's voice is card-plane ("the card's binding refused at
|
|
89
|
+
// boarding"); re-voice for the flow door, keeping its declared
|
|
90
|
+
// list in the parenthetical. (declaredAction throws Error only —
|
|
91
|
+
// the String arm is the never-fired defensive half.)
|
|
92
|
+
throw new Error("flow '" + flowId + "' stage '" + st.id + "' names action '" + st.action +
|
|
93
|
+
"' the family '" + st.family + "' does not declare (" +
|
|
94
|
+
(e instanceof Error ? e.message : /* v8 ignore next */ String(e)) + ")");
|
|
95
|
+
}
|
|
96
|
+
// LANE-INDEPENDENCE (the admission under the derivation): a flow
|
|
97
|
+
// row composes against the model-less facts shape, so the action
|
|
98
|
+
// must read nothing off a lane — a lane-bound action named by a
|
|
99
|
+
// flow would compose a WRONG graph silently (its facts door
|
|
100
|
+
// degrades or blames lane_inputs it never receives).
|
|
101
|
+
if (action.laneIndependent !== true) {
|
|
102
|
+
throw new Error("flow '" + flowId + "' stage '" + st.id + "' names action '" + st.family +
|
|
103
|
+
"." + st.action + "' — the action is lane-bound (its facts door reads a " +
|
|
104
|
+
"resolved model row); only lane-independent actions compose from a flow row");
|
|
105
|
+
}
|
|
106
|
+
// THE ADMISSION CONTRACT (the lowest level, one voice): every
|
|
107
|
+
// params key must be a declared action param — the same class of
|
|
108
|
+
// refusal the card plane speaks ("unknown param(s) on the
|
|
109
|
+
// image-gen card: out_dir"), fired BEFORE any node composes.
|
|
110
|
+
const declared = new Set(action.params.map((p) => p.name));
|
|
111
|
+
const unknown = Object.keys(st.params).filter((k) => !declared.has(k));
|
|
112
|
+
if (unknown.length > 0) {
|
|
113
|
+
throw new Error("unknown param(s) on the " + st.family + "." + st.action + " action: " +
|
|
114
|
+
unknown.sort().join(", "));
|
|
115
|
+
}
|
|
116
|
+
// THE DERIVATION LAW (roadmap §12, the family half): outputs
|
|
117
|
+
// derive from the action's own declaration; a hand-write that
|
|
118
|
+
// contradicts it refuses LOUD — never two spellings of one truth.
|
|
119
|
+
const derived = {};
|
|
120
|
+
for (const o of action.outputs)
|
|
121
|
+
derived[o.name] = o.kind;
|
|
122
|
+
for (const [name, kind] of Object.entries(st.outputs)) {
|
|
123
|
+
if (derived[name] !== kind) {
|
|
124
|
+
throw new Error("flow '" + flowId + "' stage '" + st.id + "' hand-writes output '" + name +
|
|
125
|
+
"' as '" + kind + "' but the " + st.family + "." + st.action +
|
|
126
|
+
" action declares '" + String(derived[name]) + "' — the row routes, the declaration owns the truth");
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
// The family's facts row for the interpreter: the estimator-class
|
|
130
|
+
// actions declare vacuous doors (no checkpoint, no encoder), so
|
|
131
|
+
// the weightless row IS the honest shape — the same field set the
|
|
132
|
+
// engine's own model-less compose arm passes (service.ts:871) —
|
|
133
|
+
// and the action's facts parser is the gate, refusing nothing
|
|
134
|
+
// here by design.
|
|
135
|
+
const g = new GraphBuilder();
|
|
136
|
+
const handle = instantiateAction(action, st.params, {
|
|
137
|
+
id: st.family,
|
|
138
|
+
card: "",
|
|
139
|
+
family: st.family,
|
|
140
|
+
defaults: {},
|
|
141
|
+
lane_inputs: {},
|
|
142
|
+
variants: [],
|
|
143
|
+
variant_groups: [],
|
|
144
|
+
outputs: [],
|
|
145
|
+
mods: [],
|
|
146
|
+
}, g, "");
|
|
147
|
+
// THE PRODUCER IS THE ACTION'S OWN HANDLE (the multi-save law).
|
|
148
|
+
// The merge resolves a stage's channels to producer nodes two ways:
|
|
149
|
+
// a declared output_nodes row, or — failing that — a single Save
|
|
150
|
+
// node, which refuses outright when the graph saves more than once.
|
|
151
|
+
// An action that writes several artifacts (the turnaround sheet, the
|
|
152
|
+
// albedo/normal/sidecar trio) hit that refusal every time, because
|
|
153
|
+
// the composition declared no producer at all. The handle build()
|
|
154
|
+
// returns IS the producer for the action's FIRST declared output,
|
|
155
|
+
// named by the action's own declaration — never guessed from node
|
|
156
|
+
// order. The declared path wins in the merge, so single-save
|
|
157
|
+
// actions keep their behavior: they also declare, and declaration
|
|
158
|
+
// won there too.
|
|
159
|
+
const producer = {};
|
|
160
|
+
const firstOutput = action.outputs[0];
|
|
161
|
+
if (firstOutput !== undefined) {
|
|
162
|
+
producer[firstOutput.name] = handle.nodeId;
|
|
163
|
+
}
|
|
164
|
+
return {
|
|
165
|
+
...st,
|
|
166
|
+
family: "",
|
|
167
|
+
action: "",
|
|
168
|
+
outputs: derived,
|
|
169
|
+
params: { workflow: g.toJSON(), output_nodes: producer },
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
/** Compose every family-action stage of an expanded flow into its
|
|
173
|
+
* workflow envelope. Flows with no family stage pass through
|
|
174
|
+
* byte-identical (zero lookups, zero overhead).
|
|
175
|
+
* @param flow the EXPANDED registry flow (fromFlow links resolved)
|
|
176
|
+
* @param decls the families seat's declarations (allDecls())
|
|
177
|
+
* @param seatState how the seat answered, so a refusal names the
|
|
178
|
+
* condition it found (see {@link liveFamilySeat})
|
|
179
|
+
* @returns the flow with every family stage composed
|
|
180
|
+
* @throws when the seat cannot answer, a family is unregistered, an
|
|
181
|
+
* action undeclared, a param unadmitted, or a hand-written output
|
|
182
|
+
* contradicts the action's declaration */
|
|
183
|
+
export function composeFamilyStages(flow, decls, seatState = "seated") {
|
|
184
|
+
if (!flow.stages.some((st) => st.family !== ""))
|
|
185
|
+
return flow;
|
|
186
|
+
return {
|
|
187
|
+
...flow,
|
|
188
|
+
stages: flow.stages.map((st) => composeOne(flow.id, st, decls, seatState)),
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
//# sourceMappingURL=flowsFamilyCompose.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { RegistryFlow } from "./flowsData.js";
|
|
2
|
+
export declare const ANNY_HMR_COMMERCIAL: RegistryFlow;
|
|
3
|
+
export declare const ANNY_PARAMS: RegistryFlow;
|
|
4
|
+
export declare const AUDIO_NATIVE_TTS: RegistryFlow;
|
|
5
|
+
export declare const BODY_TO_SOMAX: RegistryFlow;
|
|
6
|
+
export declare const FIT_SEAT: RegistryFlow;
|
|
7
|
+
export declare const IMAGE_UPSCALE: RegistryFlow;
|
|
8
|
+
export declare const MUSIC_NATIVE: RegistryFlow;
|
|
9
|
+
export declare const CRAFT_LOOP: RegistryFlow;
|
|
10
|
+
//# sourceMappingURL=flowsRegistryRows.d.ts.map
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
// flowsRegistryRows.ts — the flow declarations (the SSOT rows).
|
|
2
|
+
|
|
3
|
+
// module of declarations, one line per flow; flowsData.ts keeps the
|
|
4
|
+
// types, the helpers, and the assembled REGISTRY.
|
|
5
|
+
import { CARD_PLANE_ENGINE } from '@melite/contracts/benchStage';
|
|
6
|
+
import { plainStage, initial, fromStage } from "./flowsData.js";
|
|
7
|
+
export const ANNY_HMR_COMMERCIAL = {
|
|
8
|
+
id: "anny-hmr-commercial",
|
|
9
|
+
description: "The commercial photo→Anny chain: " +
|
|
10
|
+
"SAM 3D Body → MHR → SOMA → anny — every link license-cleared for sale " +
|
|
11
|
+
"(SAM License operator-accepted; the rest Apache 2.0). Emits a grounded " +
|
|
12
|
+
"bind-pose body GLB + anny phenotype/local-change params.",
|
|
13
|
+
stages: [
|
|
14
|
+
plainStage({
|
|
15
|
+
id: "estimate",
|
|
16
|
+
engine: CARD_PLANE_ENGINE,
|
|
17
|
+
// the commercial engine of the same verb — family DECL owns
|
|
18
|
+
// the nodes (SAM 3D Body → grounded anny), person_index FIXED
|
|
19
|
+
// at the loudest detection (the verb's chip owns the picker)
|
|
20
|
+
family: "anny",
|
|
21
|
+
action: "estimate_commercial",
|
|
22
|
+
description: "SAM 3D Body commercial chain → grounded anny GLB",
|
|
23
|
+
inputs: { photo: initial("photo") },
|
|
24
|
+
expected: { photo: "image" },
|
|
25
|
+
params: { photo: "$photo" },
|
|
26
|
+
}),
|
|
27
|
+
],
|
|
28
|
+
initialValidators: { photo: "photo" },
|
|
29
|
+
tool: null,
|
|
30
|
+
skillRefs: [],
|
|
31
|
+
};
|
|
32
|
+
export const ANNY_PARAMS = {
|
|
33
|
+
id: "anny-params",
|
|
34
|
+
description: "Preset params → grounded " +
|
|
35
|
+
"Anny body GLB (authored 11-dim rows + verbatim estimated runs " +
|
|
36
|
+
"re-instantiate bit-exact) — the preset-load verb's flow template; the " +
|
|
37
|
+
"anny card's preset picker runs this through the queue and hydrates " +
|
|
38
|
+
"body_glb from its artifacts.",
|
|
39
|
+
stages: [
|
|
40
|
+
plainStage({
|
|
41
|
+
id: "instantiate",
|
|
42
|
+
engine: CARD_PLANE_ENGINE,
|
|
43
|
+
// the preset-load verb's backend — the verbatim bake the
|
|
44
|
+
// family declares (params_json rides verbatim; the bake
|
|
45
|
+
// validator judged the json at the initial gate)
|
|
46
|
+
family: "anny",
|
|
47
|
+
action: "bake",
|
|
48
|
+
description: "Preset params → grounded anny GLB",
|
|
49
|
+
inputs: { params_json: initial("params_json") },
|
|
50
|
+
expected: { params_json: "text" },
|
|
51
|
+
params: { params_json: "$params_json" },
|
|
52
|
+
}),
|
|
53
|
+
],
|
|
54
|
+
initialValidators: { params_json: "bake_params" },
|
|
55
|
+
tool: null,
|
|
56
|
+
skillRefs: [],
|
|
57
|
+
};
|
|
58
|
+
export const AUDIO_NATIVE_TTS = {
|
|
59
|
+
id: "audio-native-tts",
|
|
60
|
+
description: "Phase 1b gate: Qwen3-TTS 12Hz CustomVoice via the live melite-audio-nodes " +
|
|
61
|
+
"island pack in the serving ComfyUI container (pure-ComfyUI audio lane; " +
|
|
62
|
+
"retires the C audio engine for TTS). RUNS on the {flow:} door " +
|
|
63
|
+
"(2026-10-04: the VALIDATE-ONLY stamp is GONE — the start door " +
|
|
64
|
+
"composes the row's card stages through the card plane); the {model:} " +
|
|
65
|
+
"door drives the same card directly.",
|
|
66
|
+
stages: [
|
|
67
|
+
plainStage({
|
|
68
|
+
id: "tts",
|
|
69
|
+
engine: CARD_PLANE_ENGINE,
|
|
70
|
+
card: "tts",
|
|
71
|
+
description: "Qwen3-TTS text to speech via the tts card",
|
|
72
|
+
|
|
73
|
+
// merge-hole cure): the wiring law spells every wired channel
|
|
74
|
+
// `$<channel>`, and the merge resolves a $spell against links ∪
|
|
75
|
+
// request INITIALS — so a channel `text` fed by initial("prompt")
|
|
76
|
+
// spelled `$text` resolved against neither and the run died at
|
|
77
|
+
// the merge. anny-hmr names all three the same (photo/photo/
|
|
78
|
+
// $photo); so does this row now.
|
|
79
|
+
inputs: { text: initial("text") },
|
|
80
|
+
// every wired input needs its expected Kind (kindsOk's own
|
|
81
|
+
// law) — this row shipped without it and only the LIVE
|
|
82
|
+
// /v1/flows/validate path tripped it; completed at the
|
|
83
|
+
|
|
84
|
+
// the class (kindsOk over every registry flow)
|
|
85
|
+
expected: { text: "text" },
|
|
86
|
+
outputs: { wav: "audio" },
|
|
87
|
+
cardIo: { wav: "audio" },
|
|
88
|
+
params: { model: "qwen3-tts", text: "$text", seed: 42 },
|
|
89
|
+
}),
|
|
90
|
+
],
|
|
91
|
+
initialValidators: { text: "text" },
|
|
92
|
+
tool: {
|
|
93
|
+
name: "speak",
|
|
94
|
+
version: 1,
|
|
95
|
+
description: "Qwen3-TTS 12Hz CustomVoice speech in one call — text in, wav out " +
|
|
96
|
+
"(pure-ComfyUI audio lane).",
|
|
97
|
+
properties: {
|
|
98
|
+
|
|
99
|
+
// lifts declared validators only, so a `prompt` property over a
|
|
100
|
+
// `text` initial would advertise a key the door never reads.
|
|
101
|
+
text: {
|
|
102
|
+
ptype: "string",
|
|
103
|
+
description: "what to say",
|
|
104
|
+
default: null,
|
|
105
|
+
hasDefault: false,
|
|
106
|
+
minimum: null,
|
|
107
|
+
maximum: null,
|
|
108
|
+
enum: null,
|
|
109
|
+
},
|
|
110
|
+
seed: {
|
|
111
|
+
ptype: "integer",
|
|
112
|
+
description: "voice sampler seed",
|
|
113
|
+
default: 42,
|
|
114
|
+
hasDefault: true,
|
|
115
|
+
minimum: 0,
|
|
116
|
+
maximum: 2147483647,
|
|
117
|
+
enum: null,
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
required: ["text"],
|
|
121
|
+
overlays: [{ param: "seed", stage: "tts", path: ["seed"], choices: null }],
|
|
122
|
+
},
|
|
123
|
+
skillRefs: [],
|
|
124
|
+
};
|
|
125
|
+
export const BODY_TO_SOMAX = {
|
|
126
|
+
id: "body-to-somax",
|
|
127
|
+
description: "Bare body GLB → SOMAX-rigged GLB: the anny→kimodo bridge (the baked " +
|
|
128
|
+
"SOMA-77 template weight transfer, standalone-rig mode — no Blender). The " +
|
|
129
|
+
"motion studio posts this behind the scenes when a wired body isn't SOMAX; " +
|
|
130
|
+
"any bare human mesh (anny bake, TRELLIS, upload) rides the same door. " +
|
|
131
|
+
"RUNS on the {flow:} door (2026-10-04: the VALIDATE-ONLY stamp is " +
|
|
132
|
+
"GONE — the start door composes the row's card stages through the " +
|
|
133
|
+
"card plane); drive the rig card " +
|
|
134
|
+
"through the bench or {model:}.",
|
|
135
|
+
stages: [
|
|
136
|
+
plainStage({
|
|
137
|
+
id: "rig",
|
|
138
|
+
engine: CARD_PLANE_ENGINE,
|
|
139
|
+
card: "rig",
|
|
140
|
+
description: "SOMA-77 template weight transfer (barycentric, the autorig pack's " +
|
|
141
|
+
"baked function) via the rig card's auto mode — the gem_soma " +
|
|
142
|
+
"family's declared rig action composes the KimodoExportFBX segment",
|
|
143
|
+
inputs: { glb: initial("glb") },
|
|
144
|
+
expected: { glb: "mesh" },
|
|
145
|
+
outputs: { body: "mesh" },
|
|
146
|
+
cardIo: { body: "mesh" },
|
|
147
|
+
// THE LANE IS THE FAMILY'S (the atom vocabulary, stroke 3): this
|
|
148
|
+
// stage hand-wired the KimodoExportFBX node in the flow plane —
|
|
149
|
+
// a second copy of the gem_soma rig lane. It names the card +
|
|
150
|
+
// mode; the family's declared action composes the graph.
|
|
151
|
+
// (out_dir/timeout_s are RAW-stage knobs — a card stage's
|
|
152
|
+
// params are card-admitted knobs only; the compose door owns
|
|
153
|
+
// the run dir and the card's own contract the timeout.)
|
|
154
|
+
params: {
|
|
155
|
+
mesh_glb: "$glb",
|
|
156
|
+
mode: "auto",
|
|
157
|
+
preserve_texture: true,
|
|
158
|
+
decimate_ratio: 0,
|
|
159
|
+
},
|
|
160
|
+
}),
|
|
161
|
+
],
|
|
162
|
+
initialValidators: { glb: "glb" },
|
|
163
|
+
tool: null,
|
|
164
|
+
skillRefs: [],
|
|
165
|
+
};
|
|
166
|
+
export const FIT_SEAT = {
|
|
167
|
+
id: "fit-seat",
|
|
168
|
+
description: "Seat a static prop onto a SOMAX body under the meld fit laws (the " +
|
|
169
|
+
"dress/prop verb engine): the meld row assembles in-pack from the verb's " +
|
|
170
|
+
"own vocabulary, and the request MUST carry `bone` (the bone that " +
|
|
171
|
+
"carries the prop — the door refuses without it), " +
|
|
172
|
+
"FitProp grafts, the turnaround proves.",
|
|
173
|
+
stages: [
|
|
174
|
+
plainStage({
|
|
175
|
+
id: "seat",
|
|
176
|
+
engine: CARD_PLANE_ENGINE,
|
|
177
|
+
description: "FitRow (knobs -> meld row) -> FitProp (graft) -> proof views",
|
|
178
|
+
// THE TWO FILES AND THE BONE (the rest of the fit row is the
|
|
179
|
+
// verb's own vocabulary inside the action — stroke-89's law).
|
|
180
|
+
// The bone is a BARE NAME, so it rides the text initial kind,
|
|
181
|
+
// and it is REQUIRED: the vendor's row gate refuses an empty
|
|
182
|
+
// one, so a request without it must learn that at the door.
|
|
183
|
+
inputs: { body: initial("body"), prop: initial("prop"), bone: initial("bone") },
|
|
184
|
+
expected: { body: "mesh", prop: "mesh", bone: "text" },
|
|
185
|
+
// THE VERB'S BACKEND IS A DECLARED ACTION (the atom
|
|
186
|
+
// vocabulary, stroke 4): the fit-seat verb's nodes compose
|
|
187
|
+
// from the fit family's DECL — every knob rides verbatim, the
|
|
188
|
+
// proof framing is FIXED in the action build. The row routes;
|
|
189
|
+
// the declaration owns the graph (SubActionMod law — the
|
|
190
|
+
|
|
191
|
+
// the sanctioned seam, not a revival).
|
|
192
|
+
family: "fit",
|
|
193
|
+
action: "seat",
|
|
194
|
+
// THE TWO FILES AND THE BONE ARE THE REQUEST (the door's own
|
|
195
|
+
// type now admits a text initial, so a bone rides like any
|
|
196
|
+
// other value); THE FIT ROW IS THE VERB'S (stroke-89's law —
|
|
197
|
+
// the merged worker refused an unlinkable `$fit_ratio`).
|
|
198
|
+
params: { body: "$body", prop: "$prop", bone: "$bone" },
|
|
199
|
+
}),
|
|
200
|
+
],
|
|
201
|
+
initialValidators: { body: "glb", prop: "glb", bone: "text" },
|
|
202
|
+
requiredInitials: ["bone"],
|
|
203
|
+
tool: null,
|
|
204
|
+
skillRefs: [],
|
|
205
|
+
};
|
|
206
|
+
export const IMAGE_UPSCALE = {
|
|
207
|
+
id: "image-upscale",
|
|
208
|
+
description: "Prompt → image → 1080p SeedVR2 upscale, one card per stroke (the first " +
|
|
209
|
+
"two-card flow: image-gen + upscale-tools card= stages; image_model picks " +
|
|
210
|
+
"the generator). RUNS on the {flow:} door (2026-10-04: the VALIDATE-ONLY " +
|
|
211
|
+
"stamp is GONE — both card stages compose through the card plane and " +
|
|
212
|
+
"submit as one merged run); the {model:} door drives a single card.",
|
|
213
|
+
stages: [
|
|
214
|
+
plainStage({
|
|
215
|
+
id: "make",
|
|
216
|
+
engine: CARD_PLANE_ENGINE,
|
|
217
|
+
card: "image-gen",
|
|
218
|
+
description: "T2I via the image-gen card (the named model's own generate_t2i.json)",
|
|
219
|
+
inputs: { prompt: initial("prompt") },
|
|
220
|
+
|
|
221
|
+
expected: { prompt: "text" },
|
|
222
|
+
cardIo: { image: "image" },
|
|
223
|
+
params: { model: "krea-2", prompt: "$prompt", seed: 42 },
|
|
224
|
+
}),
|
|
225
|
+
plainStage({
|
|
226
|
+
id: "polish",
|
|
227
|
+
engine: CARD_PLANE_ENGINE,
|
|
228
|
+
card: "upscale-tools",
|
|
229
|
+
description: "SeedVR2 1080p upscale via the upscale-tools card",
|
|
230
|
+
inputs: { image: fromStage("make", "image") },
|
|
231
|
+
expected: { image: "image" },
|
|
232
|
+
cardIo: { image: "image" },
|
|
233
|
+
params: {
|
|
234
|
+
model: "seedvr2_ema",
|
|
235
|
+
input_image: "$image",
|
|
236
|
+
filename_prefix: "image-upscale",
|
|
237
|
+
seed: 42,
|
|
238
|
+
},
|
|
239
|
+
}),
|
|
240
|
+
],
|
|
241
|
+
initialValidators: { prompt: "text" },
|
|
242
|
+
tool: {
|
|
243
|
+
name: "image_upscale",
|
|
244
|
+
version: 1,
|
|
245
|
+
description: "Generate an image from a prompt and upscale it to 1080p in one call " +
|
|
246
|
+
"(krea-2 or z-image generator, SeedVR2 upscale always on). One POST runs " +
|
|
247
|
+
"the whole flow.",
|
|
248
|
+
properties: {
|
|
249
|
+
image_model: {
|
|
250
|
+
ptype: "string",
|
|
251
|
+
description: "the generator family (no default: pick one)",
|
|
252
|
+
default: null,
|
|
253
|
+
hasDefault: false,
|
|
254
|
+
minimum: null,
|
|
255
|
+
maximum: null,
|
|
256
|
+
enum: ["krea-2", "z-image"],
|
|
257
|
+
},
|
|
258
|
+
prompt: {
|
|
259
|
+
ptype: "string",
|
|
260
|
+
description: "what to generate (up to 4000 chars)",
|
|
261
|
+
default: null,
|
|
262
|
+
hasDefault: false,
|
|
263
|
+
minimum: null,
|
|
264
|
+
maximum: null,
|
|
265
|
+
enum: null,
|
|
266
|
+
},
|
|
267
|
+
seed: {
|
|
268
|
+
ptype: "integer",
|
|
269
|
+
description: "sampler seed",
|
|
270
|
+
default: 42,
|
|
271
|
+
hasDefault: true,
|
|
272
|
+
minimum: 0,
|
|
273
|
+
maximum: 2147483647,
|
|
274
|
+
enum: null,
|
|
275
|
+
},
|
|
276
|
+
},
|
|
277
|
+
required: ["image_model", "prompt"],
|
|
278
|
+
overlays: [
|
|
279
|
+
{
|
|
280
|
+
param: "image_model",
|
|
281
|
+
stage: "make",
|
|
282
|
+
path: ["model"],
|
|
283
|
+
choices: { "krea-2": "krea-2", "z-image": "z-image" },
|
|
284
|
+
},
|
|
285
|
+
{ param: "seed", stage: "make", path: ["seed"], choices: null },
|
|
286
|
+
{ param: "seed", stage: "polish", path: ["seed"], choices: null },
|
|
287
|
+
],
|
|
288
|
+
},
|
|
289
|
+
skillRefs: [
|
|
290
|
+
"card:image-gen",
|
|
291
|
+
"card:upscale-tools",
|
|
292
|
+
"model:krea-2",
|
|
293
|
+
"model:krea-2:prompt-enhance",
|
|
294
|
+
"model:z-image:prompt-enhance",
|
|
295
|
+
],
|
|
296
|
+
};
|
|
297
|
+
export const MUSIC_NATIVE = {
|
|
298
|
+
id: "music-native",
|
|
299
|
+
description: "Music generation as a CARD stage — prompt in, audio out via the music " +
|
|
300
|
+
"card (MiniMax Music 3, the boarded row; see GET /v1/models). Repointed " +
|
|
301
|
+
"at the mono-engine law by the wiring wall 2026-09-20: the row still " +
|
|
302
|
+
"named the retired audio_cpp tier and a card id that no longer exists — " +
|
|
303
|
+
"a fossil only the live validate path ever tripped. RUNS on the " +
|
|
304
|
+
"{flow:} door (2026-10-04: the VALIDATE-ONLY stamp is GONE — the " +
|
|
305
|
+
"start door composes the row's card stages through the card plane); " +
|
|
306
|
+
"the {model:} door drives the same card directly.",
|
|
307
|
+
stages: [
|
|
308
|
+
plainStage({
|
|
309
|
+
id: "music",
|
|
310
|
+
engine: CARD_PLANE_ENGINE,
|
|
311
|
+
card: "music",
|
|
312
|
+
description: "MiniMax Music 3 via the music card — the lane composes the doc " +
|
|
313
|
+
"into the ComfyUI graph (UNET/CLIP/VAE loaders + the music sampler)",
|
|
314
|
+
inputs: { prompt: initial("prompt") },
|
|
315
|
+
expected: { prompt: "text" },
|
|
316
|
+
cardIo: { default: "audio" },
|
|
317
|
+
params: {
|
|
318
|
+
prompt: "$prompt",
|
|
319
|
+
model: "music3",
|
|
320
|
+
duration: 120,
|
|
321
|
+
seed: -1,
|
|
322
|
+
},
|
|
323
|
+
}),
|
|
324
|
+
],
|
|
325
|
+
initialValidators: { prompt: "text" },
|
|
326
|
+
tool: {
|
|
327
|
+
name: "compose_music",
|
|
328
|
+
version: 1,
|
|
329
|
+
description: "Music generation in one call (MiniMax Music 3 via the music card) — " +
|
|
330
|
+
"prompt in, audio out.",
|
|
331
|
+
properties: {
|
|
332
|
+
prompt: {
|
|
333
|
+
ptype: "string",
|
|
334
|
+
description: "what to play",
|
|
335
|
+
default: null,
|
|
336
|
+
hasDefault: false,
|
|
337
|
+
minimum: null,
|
|
338
|
+
maximum: null,
|
|
339
|
+
enum: null,
|
|
340
|
+
},
|
|
341
|
+
duration: {
|
|
342
|
+
ptype: "integer",
|
|
343
|
+
description: "seconds of music (the card caps 5..360)",
|
|
344
|
+
default: 120,
|
|
345
|
+
hasDefault: true,
|
|
346
|
+
minimum: 5,
|
|
347
|
+
maximum: 360,
|
|
348
|
+
enum: null,
|
|
349
|
+
},
|
|
350
|
+
},
|
|
351
|
+
required: ["prompt"],
|
|
352
|
+
overlays: [{ param: "duration", stage: "music", path: ["duration"], choices: null }],
|
|
353
|
+
},
|
|
354
|
+
skillRefs: [],
|
|
355
|
+
};
|
|
356
|
+
export const CRAFT_LOOP = {
|
|
357
|
+
id: "craft-loop",
|
|
358
|
+
description: "The agentic craft loop: a named image-capable model route critiques " +
|
|
359
|
+
"each capture and decides the next act command until done (or the " +
|
|
360
|
+
"iteration cap). The act leg rides ANY registered engine (comfyui " +
|
|
361
|
+
"graphs, mcp:blender tool calls); captures land in the run dir and " +
|
|
362
|
+
"attach to the critique. Driven by the runs door with engine " +
|
|
363
|
+
"'craft' stages — see flows/craft-loop/agents/AGENT.md.",
|
|
364
|
+
stages: [
|
|
365
|
+
plainStage({
|
|
366
|
+
id: "loop",
|
|
367
|
+
engine: "craft",
|
|
368
|
+
description: "act → capture → critique → decide (the loop engine)",
|
|
369
|
+
inputs: {},
|
|
370
|
+
outputs: { default: "image" },
|
|
371
|
+
params: {},
|
|
372
|
+
}),
|
|
373
|
+
],
|
|
374
|
+
initialValidators: {},
|
|
375
|
+
tool: null,
|
|
376
|
+
skillRefs: [],
|
|
377
|
+
};
|
|
378
|
+
//# sourceMappingURL=flowsRegistryRows.js.map
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Context, Plugin } from "@deepseek-ai/cordis";
|
|
2
|
+
import type { QueueConfig } from "./service.js";
|
|
3
|
+
export { QueueService } from "./service.js";
|
|
4
|
+
export { RunsRuntimeService } from "./runsRegistry.js";
|
|
5
|
+
export { ManageGatewayService } from "./manageRegistry.js";
|
|
6
|
+
export type { QueueConfig } from "./service.js";
|
|
7
|
+
export * from "./vocab.js";
|
|
8
|
+
export * from "./queue.js";
|
|
9
|
+
export * from "./runStatus.js";
|
|
10
|
+
export { bootSweep } from "./resurrect.js";
|
|
11
|
+
export declare const name = "estate-queue";
|
|
12
|
+
export declare const inject: string[];
|
|
13
|
+
export declare function apply(ctx: Context, config?: QueueConfig): void;
|
|
14
|
+
declare const plugin: Plugin;
|
|
15
|
+
export default plugin;
|
|
16
|
+
export * from "./runsGates.js";
|
|
17
|
+
export { findSkill, disclosureRoot } from "./skillPlane.js";
|
|
18
|
+
export type { FamilyModelsSeat } from "./flowsFamilyCompose.js";
|
|
19
|
+
export { benchPicks, benchFingerprint, benchBootMs, benchDir } from "./bench.js";
|
|
20
|
+
export type { StagePick } from "./bench.js";
|
|
21
|
+
export * from "./runsList.js";
|
|
22
|
+
export * from "./mediaKinds.js";
|
|
23
|
+
export * from "./runsTypes.js";
|
|
24
|
+
export * from "./runsStart.js";
|
|
25
|
+
export * from "./rootsManifest.js";
|
|
26
|
+
export * from "./discloseRegistry.js";
|
|
27
|
+
export * from "./skillPlane.js";
|
|
28
|
+
export * from "./skillRegistry.js";
|
|
29
|
+
export * from "./loadPlane.js";
|
|
30
|
+
export * from "./loadRegistry.js";
|
|
31
|
+
export * from "./toolProjection.js";
|
|
32
|
+
export * from "./ledgerTail.js";
|
|
33
|
+
export * from "./managePlane.js";
|
|
34
|
+
export * from "./manageRegistry.js";
|
|
35
|
+
export * from "./flowsData.js";
|
|
36
|
+
export * from "./runsValidate.js";
|
|
37
|
+
export * from "./cardsRegistry.js";
|
|
38
|
+
export { factsPath } from "./cardsFacts.js";
|
|
39
|
+
/** The runs registry row: mounts the live-run service (REBUILD-6).
|
|
40
|
+
* Inject gates on the queue + drafts + card-registry seats (the
|
|
41
|
+
* fiber's read contract — loader-mounted fibers enforce the
|
|
42
|
+
* tutorial's inject law on property reads; the service class's own
|
|
43
|
+
* static inject lists the same three); the estate-runs adapters
|
|
44
|
+
* (Typert) ride after this row. */
|
|
45
|
+
export declare const runsRegistryPlugin: {
|
|
46
|
+
name: string;
|
|
47
|
+
inject: readonly ["queue", "draftsRemote", "cardRegistry"];
|
|
48
|
+
apply(ctx: Context): void;
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=index.d.ts.map
|