@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/runsRegistry.d.ts
CHANGED
|
@@ -4,6 +4,16 @@ import type { RunId } from "./queueCore.js";
|
|
|
4
4
|
export { toRemoteError } from "./runsRefusalVoices.js";
|
|
5
5
|
import type { FlowsValidateAnswer } from "./runsValidate.js";
|
|
6
6
|
import type { RunRecord } from "./runsTypes.js";
|
|
7
|
+
/** THE START SUMMARY (the door's answer face): what start() and the
|
|
8
|
+
* concurrent-press reservation both answer with. `sweep_runs` rides
|
|
9
|
+
* ONLY a seed-sweep press (friction #9): every run id the one
|
|
10
|
+
* press minted, first seed first — absent on every single run. */
|
|
11
|
+
interface PressStartSummary {
|
|
12
|
+
run_id: string;
|
|
13
|
+
status: string;
|
|
14
|
+
queue_position: number;
|
|
15
|
+
readonly sweep_runs?: readonly string[];
|
|
16
|
+
}
|
|
7
17
|
/** The runs Remote failure codes, merged into the protocol's ONE
|
|
8
18
|
* vocabulary (cookbook §2: declaration merging, next to the
|
|
9
19
|
* throws). The codes ride kebab-cased; the byte-pinned prose
|
|
@@ -15,6 +25,32 @@ export interface RunsRefusalDetails {
|
|
|
15
25
|
readonly expected?: string;
|
|
16
26
|
readonly got?: string;
|
|
17
27
|
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
export interface LaneInputMissingDetails extends RunsRefusalDetails {
|
|
33
|
+
readonly family: string;
|
|
34
|
+
readonly slot: string;
|
|
35
|
+
readonly missing: string;
|
|
36
|
+
readonly folders: readonly string[];
|
|
37
|
+
readonly fetch_url?: string;
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
readonly missing_all?: ReadonlyArray<{
|
|
43
|
+
readonly slot: string;
|
|
44
|
+
readonly name: string;
|
|
45
|
+
readonly folders: readonly string[];
|
|
46
|
+
readonly size_bytes?: number;
|
|
47
|
+
readonly fetch_url?: string;
|
|
48
|
+
}>;
|
|
49
|
+
/** "runtime" rides the tool-runtime leg (E2-2 Piece A) — the
|
|
50
|
+
* popup's runtime banner keys on the parsed prose, never on
|
|
51
|
+
* this row (there is no fetch_url for a provision command). */
|
|
52
|
+
readonly kind: "model" | "extension" | "runtime";
|
|
53
|
+
}
|
|
18
54
|
declare module "@deepseek-ai/dsh-typert-protocol" {
|
|
19
55
|
interface RemoteErrorDetailsMap {
|
|
20
56
|
/** The start body is not a JSON object (bad_envelope/body). */
|
|
@@ -37,15 +73,23 @@ declare module "@deepseek-ai/dsh-typert-protocol" {
|
|
|
37
73
|
"runs/workflow-pin": RunsRefusalDetails & {
|
|
38
74
|
readonly errors?: unknown;
|
|
39
75
|
};
|
|
40
|
-
"runs/card-compose": RunsRefusalDetails
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
76
|
+
"runs/card-compose": RunsRefusalDetails;
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
"runs/card-compose-incomplete": RunsRefusalDetails;
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
"runs/lane-input-missing": LaneInputMissingDetails;
|
|
45
89
|
|
|
46
90
|
|
|
47
91
|
|
|
48
|
-
"runs/
|
|
92
|
+
"runs/lifecycle-inflight": RunsRefusalDetails;
|
|
49
93
|
|
|
50
94
|
"runs/unknown-run": {
|
|
51
95
|
readonly runId: string;
|
|
@@ -54,6 +98,15 @@ declare module "@deepseek-ai/dsh-typert-protocol" {
|
|
|
54
98
|
"runs/run-unknown": {
|
|
55
99
|
readonly runId: string;
|
|
56
100
|
};
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
"runs/already-settled": {
|
|
107
|
+
readonly runId: string;
|
|
108
|
+
readonly status: string;
|
|
109
|
+
};
|
|
57
110
|
}
|
|
58
111
|
}
|
|
59
112
|
/** The refusal codes this remote serves, folded to the
|
|
@@ -88,6 +141,10 @@ export declare function benchWiring(benchDoc: Record<string, unknown>): {
|
|
|
88
141
|
self: string[];
|
|
89
142
|
};
|
|
90
143
|
export declare class RunsRuntimeService extends Service {
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
private static readonly PRESS_MEMORY_MAX;
|
|
91
148
|
static inject: string[];
|
|
92
149
|
/** The pump reentrancy guard (door-verbatim — a public field:
|
|
93
150
|
* cordis proxies services, and private #fields do not cross the
|
|
@@ -195,11 +252,52 @@ export declare class RunsRuntimeService extends Service {
|
|
|
195
252
|
* never passes this (two-arg wire calls only). */
|
|
196
253
|
reuse?: {
|
|
197
254
|
runId: RunId;
|
|
198
|
-
}): Promise<
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
255
|
+
}): Promise<PressStartSummary>;
|
|
256
|
+
/** THE SWEEP START (friction #9's fan-out): one press, N seeds —
|
|
257
|
+
* each seed its own run, all under one shared run-id prefix.
|
|
258
|
+
* Every per-run law rides startReserved unchanged (phase gates,
|
|
259
|
+
* spell gate, self-wire gate, the registration door); the press
|
|
260
|
+
* laws wrap the WHOLE family: one press_key answers the sweep
|
|
261
|
+
* (a replay re-mints NOTHING — the sweep mirror holds every id),
|
|
262
|
+
* the twin reservation settles once after the last run registers,
|
|
263
|
+
* and a refusal anywhere propagates with the runs already minted
|
|
264
|
+
* standing (registered runs never un-register — the registry's
|
|
265
|
+
* own law; the retry law is the stale-key law's).
|
|
266
|
+
* @param seeds the judged sweep (capped, integer, model-door).
|
|
267
|
+
* @param checked the envelope's ok face for the sweep press.
|
|
268
|
+
* @param signal the caller's abort. */
|
|
269
|
+
private startSweep;
|
|
270
|
+
/** The sweep's mint loop: N startReserved calls, one per seed —
|
|
271
|
+
* the seed stamped into its own body, the sweep's runId handed
|
|
272
|
+
* through the INTERNAL reuse seat (the deterministic-id seam, the
|
|
273
|
+
* same seat the boot-resurrect replay rides). The answer carries
|
|
274
|
+
* the first run's summary face plus sweep_runs (every id, seed
|
|
275
|
+
* order). @param pressKey undefined on the inner calls — the
|
|
276
|
+
* per-run press memory would clobber the family's one entry; this
|
|
277
|
+
* loop owns the memory after every run stands. */
|
|
278
|
+
private mintSweep;
|
|
279
|
+
/** THE SWEEP MIRROR (audit N-E1's sweep half): press_key -> every
|
|
280
|
+
* run id the sweep minted. A replay answers the family only while
|
|
281
|
+
* EVERY row still stands — one swept row is the stale-key law's
|
|
282
|
+
* (the whole sweep re-runs on retry, the same class as the single
|
|
283
|
+
* door). Capped beside the single mirror. */
|
|
284
|
+
private readonly sweepPresses;
|
|
285
|
+
private rememberSweepPress;
|
|
286
|
+
/** The sweep replay: the family's answer while every row stands,
|
|
287
|
+
* null when the key is unknown or stale (the mirror entry dies
|
|
288
|
+
* with the verdict). */
|
|
289
|
+
private sweepReplay;
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
private pressReplay;
|
|
296
|
+
/** THE START ARMS under a settled replay/reservation verdict: the
|
|
297
|
+
* bench-composed arm and the flow_inline arm, behavior-verbatim
|
|
298
|
+
* from before the concurrent-press cure split them behind the
|
|
299
|
+
* shell (the split's only edits are the two summary settles). */
|
|
300
|
+
private startReserved;
|
|
203
301
|
/** The list arm (REBUILD-7): the restore-port envelope over the
|
|
204
302
|
* output roots. The raw limit STRING rides from the lane (strict
|
|
205
303
|
* int() semantics: underscores parse, junk refuses). The drafts
|
|
@@ -226,6 +324,21 @@ export declare class RunsRuntimeService extends Service {
|
|
|
226
324
|
stop(runId: string, signal: AbortSignal): Promise<Record<string, unknown>>;
|
|
227
325
|
/** The live map (the queue seat's core registry — rich rows). */
|
|
228
326
|
private liveRun;
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
private resyncSettledTruth;
|
|
229
342
|
/** The durable record under the run tree (F-5's fallback read):
|
|
230
343
|
* the on-disk _flow.json for a run — the SAME file the maker
|
|
231
344
|
* verified byte-by-byte while status answered husks. The
|
|
@@ -236,7 +349,46 @@ export declare class RunsRuntimeService extends Service {
|
|
|
236
349
|
private diskRunRow;
|
|
237
350
|
/** The envelope walk with the AWAITED draft probe (door order
|
|
238
351
|
* preserved: the probe sits between malformed and unknown). */
|
|
239
|
-
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
private readonly presses;
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
private readonly pendingPresses;
|
|
367
|
+
/** The caller's verdict at the press gate: null when it becomes
|
|
368
|
+
* the minter (its entry is registered before this returns); the
|
|
369
|
+
* in-flight promise when a concurrent mint owns the key — the
|
|
370
|
+
* twin awaits and answers with the SAME summary or refusal. */
|
|
371
|
+
private reservePress;
|
|
372
|
+
/** The minter's summary settles the twin (no-op without a press —
|
|
373
|
+
* the door's return sites serve both keyed and keyless starts). */
|
|
374
|
+
private resolvePress;
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
private failPress;
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
private awaitTwin;
|
|
391
|
+
private rememberPress;
|
|
240
392
|
/** Kick the serial pump (door-verbatim guard). */
|
|
241
393
|
private kick;
|
|
242
394
|
/** The serial worker: claim the FIFO head, execute, settle —
|
|
@@ -250,4 +402,28 @@ export declare class RunsRuntimeService extends Service {
|
|
|
250
402
|
/** Terminal settle (queue core row + the settle persist). */
|
|
251
403
|
private settle;
|
|
252
404
|
}
|
|
405
|
+
/** THE SETTLE MIRROR (pure — the walls' seam, bench-trail/runs-remote
|
|
406
|
+
* W4–W8): per draft stage, the terminal outcome patch the runs seat
|
|
407
|
+
* mirrors into the draft doc at settle, with no browser tab alive.
|
|
408
|
+
*
|
|
409
|
+
* Identity: the DRAFT row id (benchStageId, the compose's stamp) —
|
|
410
|
+
* the run row's `id` may be the card skeleton's, a namespace the
|
|
411
|
+
* draft doc never heard of (draft.ts's own admission). Legacy rows
|
|
412
|
+
* without the stamp fall back to `id`.
|
|
413
|
+
*
|
|
414
|
+
* Words: the draft row's terminal vocabulary. completed→done (the
|
|
415
|
+
* client's word, cards-resource tileStatusFromVerdict),
|
|
416
|
+
* failed→failed, stopped→stopped; a STOPPED run's untouched
|
|
417
|
+
* (queued/pending/running) stage rows mirror the run's word — the
|
|
418
|
+
* queued-stop arm settles without stamping stages (the defect-hunt
|
|
419
|
+
* §1 P1: the closed-tab row would read running forever).
|
|
420
|
+
*
|
|
421
|
+
* The result face: run_id always; the run-relative media url of the
|
|
422
|
+
* stage's own output when one exists (the husk clobber's other
|
|
423
|
+
* half — a bookkeeping mirror never blanks a hero it can name); the
|
|
424
|
+
* error voice (stage's, else the run's) when the word is failed. */
|
|
425
|
+
export declare function settleMirrorPatches(run: RunRecord): Array<{
|
|
426
|
+
stageId: string;
|
|
427
|
+
patch: Record<string, unknown>;
|
|
428
|
+
}>;
|
|
253
429
|
//# sourceMappingURL=runsRegistry.d.ts.map
|