@melite/estate-queue 0.1.4-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/LICENSE +561 -457
- package/README.md +55 -0
- package/lib/bench.d.ts +19 -11
- package/lib/bench.js +47 -57
- package/lib/cardsArmError.d.ts +94 -2
- package/lib/cardsArmError.js +34 -4
- package/lib/cardsCompose.d.ts +13 -1
- package/lib/cardsCompose.js +151 -67
- package/lib/cardsDangling.d.ts +2 -2
- package/lib/cardsDangling.js +82 -37
- package/lib/cardsFacts.d.ts +32 -3
- package/lib/cardsFacts.js +39 -1
- package/lib/cardsLanes.d.ts +62 -4
- package/lib/cardsLanes.js +407 -20
- package/lib/cardsLanesCopy.d.ts +21 -0
- package/lib/cardsLanesCopy.js +22 -0
- package/lib/cardsRegistry.d.ts +195 -10
- package/lib/cardsRegistry.js +959 -67
- package/lib/cardsVariant.d.ts +22 -8
- package/lib/cardsVariant.js +243 -52
- package/lib/discloseRegistry.d.ts +42 -11
- package/lib/discloseRegistry.js +163 -23
- package/lib/filmLead.js +5 -3
- package/lib/flowsData.d.ts +68 -13
- package/lib/flowsData.js +236 -107
- package/lib/flowsFamilyCompose.d.ts +5 -8
- package/lib/flowsFamilyCompose.js +25 -14
- package/lib/flowsParamsOverlay.d.ts +55 -0
- package/lib/flowsParamsOverlay.js +197 -0
- package/lib/flowsRegistryRows.d.ts +4 -1
- package/lib/flowsRegistryRows.js +325 -25
- package/lib/index.d.ts +1 -3
- package/lib/index.js +20 -5
- package/lib/lifecycleLatch.d.ts +16 -0
- package/lib/lifecycleLatch.js +42 -0
- package/lib/loadPlane.d.ts +3 -2
- package/lib/loadPlane.js +34 -8
- package/lib/loadRegistry.js +1 -1
- package/lib/manageOps.d.ts +8 -2
- package/lib/manageOps.js +28 -7
- package/lib/managePlane.d.ts +42 -1
- package/lib/managePlane.js +911 -101
- package/lib/managePreflight.d.ts +26 -0
- package/lib/managePreflight.js +179 -0
- package/lib/manageProbe.d.ts +15 -7
- package/lib/manageProbe.js +79 -8
- package/lib/manageRegistry.d.ts +42 -4
- package/lib/manageRegistry.js +45 -7
- package/lib/mediaKinds.d.ts +1 -1
- package/lib/mediaKinds.js +1 -1
- package/lib/queue.js +14 -10
- package/lib/queueCore.d.ts +21 -5
- package/lib/queueCore.js +22 -5
- package/lib/queueLifecycle.d.ts +0 -24
- package/lib/queueLifecycle.js +9 -63
- package/lib/queueLock.d.ts +8 -2
- package/lib/queueLock.js +9 -6
- package/lib/queueResurrect.d.ts +7 -2
- package/lib/queueResurrect.js +25 -6
- package/lib/queueSidecar.d.ts +114 -1
- package/lib/queueSidecar.js +178 -7
- package/lib/queueSubmit.d.ts +124 -10
- package/lib/queueSubmit.js +251 -48
- package/lib/queueSweep.js +13 -2
- package/lib/runsChange.d.ts +8 -0
- package/lib/runsChange.js +21 -5
- package/lib/runsErrorCodes.d.ts +1 -1
- package/lib/runsErrorCodes.js +35 -0
- package/lib/runsExecute.d.ts +26 -0
- package/lib/runsExecute.js +184 -6
- package/lib/runsGates.d.ts +5 -1
- package/lib/runsGates.js +10 -5
- package/lib/runsList.d.ts +43 -3
- package/lib/runsList.js +172 -58
- package/lib/runsRefusalVoices.js +101 -0
- package/lib/runsRegistry.d.ts +188 -12
- package/lib/runsRegistry.js +1233 -179
- package/lib/runsSourceEcho.d.ts +27 -0
- package/lib/runsSourceEcho.js +84 -18
- package/lib/runsStart.d.ts +80 -17
- package/lib/runsStart.js +303 -49
- package/lib/runsTypes.d.ts +62 -2
- package/lib/runsTypes.js +30 -6
- package/lib/runsValidateArms.js +61 -7
- package/lib/runsValidateServe.d.ts +2 -2
- package/lib/runsValidateServe.js +46 -14
- package/lib/runsValidateShared.d.ts +10 -1
- package/lib/runsValidateShared.js +14 -0
- package/lib/runsValidateStages.d.ts +10 -3
- package/lib/runsValidateStages.js +44 -12
- package/lib/runtimeProvision.d.ts +119 -0
- package/lib/runtimeProvision.js +243 -0
- package/lib/service.d.ts +24 -6
- package/lib/service.js +19 -11
- package/lib/skillFs.d.ts +9 -4
- package/lib/skillFs.js +12 -14
- package/lib/skillPlane.d.ts +3 -2
- package/lib/skillPlane.js +12 -6
- package/lib/skillRegistry.js +1 -1
- package/lib/skillRows.d.ts +4 -3
- package/lib/skillRows.js +21 -14
- package/lib/toolProjection.d.ts +1 -1
- package/lib/toolProjection.js +1 -1
- package/package.json +18 -17
- package/lib/runStatus.d.ts +0 -7
- package/lib/runStatus.js +0 -21
package/lib/cardsRegistry.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { Service } from "@deepseek-ai/cordis";
|
|
2
2
|
import type { Context } from "@deepseek-ai/cordis";
|
|
3
|
-
import type {
|
|
3
|
+
import type { FactsReads } from "@melite/comfyui-cordis";
|
|
4
|
+
import type { CardDefinition } from '@melite/comfyui-card-kit/card-definition';
|
|
5
|
+
import { RUNS_ERROR_CODES } from "./runsErrorCodes.js";
|
|
4
6
|
export { CardArmError } from "./cardsArmError.js";
|
|
5
7
|
import type { CardDeclRow, ModelFactsRow } from "./cardsFacts.js";
|
|
8
|
+
import { type FamilyLaw } from "@melite/contracts/familyLane";
|
|
6
9
|
export { selectCardVariant, stampCardOverlay, liftCardParams } from "./cardsVariant.js";
|
|
7
10
|
export type { VariantSelection } from "./cardsVariant.js";
|
|
8
|
-
export type { CardDeclRow, ModelFactsRow, VariantCellRow,
|
|
11
|
+
export type { CardDeclRow, ModelFactsRow, VariantCellRow, ResolvedVariantRow } from "./cardsFacts.js";
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
|
|
@@ -32,11 +35,59 @@ export declare const CARD_ENVELOPE_KEYS: readonly string[];
|
|
|
32
35
|
* Exported for the wall (both arms pin: the face serves, the
|
|
33
36
|
* unknown degrades to the id — never a throw into a serve). */
|
|
34
37
|
export declare function familyFace(fam: string): string;
|
|
38
|
+
/** THE OUTPUT-RESOLUTION SEAM (round-22 compose audit Q4a,
|
|
39
|
+
* VALIDATE-RESOLVES-OUTPUTS): phase 2's def lookup + output
|
|
40
|
+
* resolution with the run seat's exact voices, shared by the run
|
|
41
|
+
* seat (phase2Card, thrown as CardArmError) and the validate seat
|
|
42
|
+
* (composeValidateCard, folded to its verdict). Validate composed
|
|
43
|
+
* the graph and discarded it, so every phase-2 output refusal
|
|
44
|
+
* answered validate-green/start-refuse on the binding cards; the
|
|
45
|
+
* seat resolves over its phase-1 graph now — same overlaid
|
|
46
|
+
* params, same graph, same refusal. Cards without bindings
|
|
47
|
+
* resolve vacuously (the resolver returns {}), so their seats
|
|
48
|
+
* answer exactly as before.
|
|
49
|
+
* @param defs the card definitions table
|
|
50
|
+
* @param card the card id (prepare already admitted it)
|
|
51
|
+
* @param params the prepared params (the overlaid truth both doors hold)
|
|
52
|
+
* @param graph the composed graph
|
|
53
|
+
*/
|
|
54
|
+
export declare function resolveCardOutputsOrThrow(defs: ReadonlyMap<string, Pick<CardDefinition, "id" | "flowKinds" | "flowOutputBindings">>, card: string, params: Record<string, unknown>, graph: Record<string, unknown>): {
|
|
55
|
+
outputs: Record<string, string>;
|
|
56
|
+
outputNodes: Record<string, string>;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
export declare const FAMILY_RESEAT_CARVE: readonly string[];
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
export declare function familyLawDrift(laws: ReadonlyMap<string, FamilyLaw>): string[];
|
|
35
82
|
export declare class CardRegistryService extends Service {
|
|
83
|
+
static inject: string[];
|
|
36
84
|
/** The primed card definitions (null until prime()). */
|
|
37
85
|
private defs;
|
|
38
86
|
/** The frozen model facts (lazy — strict load, throws LOUD). */
|
|
39
87
|
private facts;
|
|
88
|
+
/** When the facts cache primed (HMR audit 009 F2 — the staleness
|
|
89
|
+
* signal's own clock; null until the first modelFacts()). */
|
|
90
|
+
private factsPrimedAt;
|
|
40
91
|
/** Route address → family owner from the registry-derived facts. */
|
|
41
92
|
private owners;
|
|
42
93
|
/** Registry reads for the row derivation (primed with the models boot). */
|
|
@@ -48,9 +99,18 @@ export declare class CardRegistryService extends Service {
|
|
|
48
99
|
* primeObjectInfo before any compose). null = not yet primed or
|
|
49
100
|
* the engine is unreachable. */
|
|
50
101
|
private oi;
|
|
102
|
+
/** The doc the process singleton was last armed with (the re-arm
|
|
103
|
+
* guard — auditor G's row: a weight landing changes the doc
|
|
104
|
+
* identity, and the singleton must follow it; an unchanged doc
|
|
105
|
+
* re-arms nothing). null = never armed (or a boot re-prime). */
|
|
106
|
+
private singletonArmedOi;
|
|
51
107
|
/** The catalog existence set (lazy — strict load, throws LOUD). */
|
|
52
108
|
private mids;
|
|
53
109
|
constructor(ctx: Context);
|
|
110
|
+
/** The §23 manifest for the compose gate's dangling sweep (the
|
|
111
|
+
* ComposeSeat seam): one law from the queue seat — config-named
|
|
112
|
+
* roots, never the retired env seam (J12). */
|
|
113
|
+
stateRoots(): readonly string[];
|
|
54
114
|
/** Prime the registry (service init — replaces the retired
|
|
55
115
|
* primeCardRegistry()): the registry loads async (dynamic
|
|
56
116
|
* card-module imports) but the validate/disclosure rims are sync,
|
|
@@ -61,6 +121,17 @@ export declare class CardRegistryService extends Service {
|
|
|
61
121
|
* stay). The provider's apply primes, and both main.ts boot
|
|
62
122
|
* sites re-prime belt-and-braces. */
|
|
63
123
|
prime(): Promise<void>;
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
private armSingletonFromDoc;
|
|
64
135
|
/** Test seam: drop all registry state (walls boot fresh processes;
|
|
65
136
|
* belt-and-braces for in-process reuse — the RunsService behavior). */
|
|
66
137
|
resetForTests(): void;
|
|
@@ -74,6 +145,21 @@ export declare class CardRegistryService extends Service {
|
|
|
74
145
|
/** Sync read of the primed registry reads (unprimed access throws LOUD). */
|
|
75
146
|
readsSync(): FactsReads;
|
|
76
147
|
modelFacts(): Record<string, ModelFactsRow>;
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
factsStaleness(): {
|
|
158
|
+
primed_at: string | null;
|
|
159
|
+
source: string;
|
|
160
|
+
source_mtime: string;
|
|
161
|
+
stale: boolean;
|
|
162
|
+
};
|
|
77
163
|
/** The decl projection — derived from defs + the strict facts, or
|
|
78
164
|
* from defs + caller-supplied facts (the validate door's
|
|
79
165
|
* degraded read; derived fresh, never cached over foreign facts). */
|
|
@@ -81,11 +167,20 @@ export declare class CardRegistryService extends Service {
|
|
|
81
167
|
/** The primed live doc (sync face for the sweeps/spec fakes).
|
|
82
168
|
* null = never primed, or the engine was unreachable at prime. */
|
|
83
169
|
objectInfo(): Record<string, unknown> | null;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
primeObjectInfo(boundMs?: number): Promise<boolean>;
|
|
89
184
|
|
|
90
185
|
|
|
91
186
|
|
|
@@ -104,6 +199,16 @@ export declare class CardRegistryService extends Service {
|
|
|
104
199
|
|
|
105
200
|
|
|
106
201
|
modelMids(): Set<string>;
|
|
202
|
+
/** THE LANDING RE-ARM (the cards-plane batch's weight-landing row):
|
|
203
|
+
* every presence face (cardFamilies' present flags, admitModel's
|
|
204
|
+
* downloaded list) reads this.mids, and the cache froze at boot —
|
|
205
|
+
* a weight landed mid-process (provision_model, download_model,
|
|
206
|
+
* acquire_weight) served present:false until a reboot. This drops
|
|
207
|
+
* the cache; the NEXT read re-derives from the live scan order.
|
|
208
|
+
* The manage plane calls it on every model landing under a living
|
|
209
|
+
* process. No truth outside mids changes: facts/owners/defs are
|
|
210
|
+
* DECL-derived, and a landing moves files, not declarations. */
|
|
211
|
+
rearmWeights(): void;
|
|
107
212
|
/** The owning family for mid: mid itself, or the facts model whose
|
|
108
213
|
* variant/cell route owns mid (mirrors _route_family;
|
|
109
214
|
* route-id-as-model is preserved — the graph is addressed by the
|
|
@@ -180,6 +285,84 @@ export declare class CardRegistryService extends Service {
|
|
|
180
285
|
|
|
181
286
|
|
|
182
287
|
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
admitStageFamily(card: string, params: Record<string, unknown>): {
|
|
297
|
+
ok: true;
|
|
298
|
+
} | {
|
|
299
|
+
ok: false;
|
|
300
|
+
error: string;
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
reseatStageFamily(card: string, params: Record<string, unknown>, priorParams: Record<string, unknown>): {
|
|
321
|
+
params: Record<string, unknown>;
|
|
322
|
+
dropped: readonly string[];
|
|
323
|
+
} | null;
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
laneMigrate(card: string, params: Record<string, unknown>, priorParams: Record<string, unknown>): Record<string, unknown>;
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
/** The lane verdict as its sentence (the write door's and the
|
|
356
|
+
* validate seat's currency — the class rides only where the run
|
|
357
|
+
* seat needs it, via laneVerdictDetailed). */
|
|
358
|
+
private laneVerdict;
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
private laneVerdictDetailed;
|
|
183
366
|
/** The draft (model-less) row's verdict: the words EVERY boarded
|
|
184
367
|
* declaring family states, judged over the raw params — the
|
|
185
368
|
* intersection law (see the model-less branch above). Bounds
|
|
@@ -188,7 +371,7 @@ export declare class CardRegistryService extends Service {
|
|
|
188
371
|
* verbatim. A card with no declaring family stays null (the
|
|
189
372
|
* familyless tolerance). */
|
|
190
373
|
private modellessDraftVerdict;
|
|
191
|
-
private
|
|
374
|
+
private laneVerdictCore;
|
|
192
375
|
|
|
193
376
|
|
|
194
377
|
|
|
@@ -231,9 +414,10 @@ export declare class CardRegistryService extends Service {
|
|
|
231
414
|
|
|
232
415
|
|
|
233
416
|
|
|
234
|
-
|
|
417
|
+
|
|
418
|
+
composeValidateCard(card: string, fam: string, params: Record<string, unknown>, mid?: string, rawBody?: Record<string, unknown>, factsArg?: Record<string, ModelFactsRow>): Promise<{
|
|
235
419
|
message: string;
|
|
236
|
-
code:
|
|
420
|
+
code: keyof typeof RUNS_ERROR_CODES;
|
|
237
421
|
} | null>;
|
|
238
422
|
/** Phase 1 (run_id ""): validates shape/admission/boarding before
|
|
239
423
|
* registration. The $spell branch composes NO graph (the pool
|
|
@@ -263,6 +447,7 @@ declare module "@deepseek-ai/cordis" {
|
|
|
263
447
|
* the app; this is what the estate composition mounts). */
|
|
264
448
|
export declare const cardRegistryProvider: {
|
|
265
449
|
name: string;
|
|
450
|
+
inject: string[];
|
|
266
451
|
apply(ctx: Context): Promise<void>;
|
|
267
452
|
};
|
|
268
453
|
/** Resolve the service for request-path helpers that take it as an
|