@melite/estate-queue 0.1.5-pre-alpha → 0.2.2-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.
Files changed (82) hide show
  1. package/LICENSE +561 -457
  2. package/README.md +0 -5
  3. package/lib/cardsArmError.d.ts +52 -3
  4. package/lib/cardsArmError.js +7 -1
  5. package/lib/cardsCompose.d.ts +31 -0
  6. package/lib/cardsCompose.js +98 -7
  7. package/lib/cardsFacts.d.ts +16 -0
  8. package/lib/cardsFacts.js +25 -1
  9. package/lib/cardsLanes.d.ts +51 -3
  10. package/lib/cardsLanes.js +337 -13
  11. package/lib/cardsLanesCopy.d.ts +21 -0
  12. package/lib/cardsLanesCopy.js +22 -0
  13. package/lib/cardsRegistry.d.ts +105 -5
  14. package/lib/cardsRegistry.js +826 -46
  15. package/lib/cardsVariant.d.ts +12 -7
  16. package/lib/cardsVariant.js +196 -58
  17. package/lib/discloseRegistry.d.ts +41 -6
  18. package/lib/discloseRegistry.js +155 -17
  19. package/lib/filmLead.js +5 -3
  20. package/lib/flowsData.d.ts +77 -21
  21. package/lib/flowsData.js +159 -21
  22. package/lib/flowsFamilyCompose.js +12 -1
  23. package/lib/flowsRegistryRows.d.ts +0 -3
  24. package/lib/flowsRegistryRows.js +166 -222
  25. package/lib/index.d.ts +1 -1
  26. package/lib/index.js +6 -4
  27. package/lib/loadPlane.d.ts +46 -4
  28. package/lib/loadPlane.js +116 -7
  29. package/lib/loadRegistry.js +9 -2
  30. package/lib/manageOps.js +2 -1
  31. package/lib/managePlane.d.ts +16 -1
  32. package/lib/managePlane.js +955 -65
  33. package/lib/managePreflight.d.ts +26 -0
  34. package/lib/managePreflight.js +211 -0
  35. package/lib/manageProbe.d.ts +52 -0
  36. package/lib/manageProbe.js +171 -1
  37. package/lib/queueCore.d.ts +14 -1
  38. package/lib/queueCore.js +13 -0
  39. package/lib/queueLock.js +19 -10
  40. package/lib/queueResurrect.d.ts +7 -5
  41. package/lib/queueResurrect.js +25 -9
  42. package/lib/queueRetry.d.ts +12 -10
  43. package/lib/queueRetry.js +2 -4
  44. package/lib/queueSidecar.d.ts +122 -1
  45. package/lib/queueSidecar.js +192 -7
  46. package/lib/queueSubmit.d.ts +70 -4
  47. package/lib/queueSubmit.js +159 -7
  48. package/lib/runsErrorCodes.js +5 -3
  49. package/lib/runsExecute.d.ts +16 -1
  50. package/lib/runsExecute.js +97 -39
  51. package/lib/runsGates.d.ts +16 -4
  52. package/lib/runsGates.js +17 -5
  53. package/lib/runsList.d.ts +100 -4
  54. package/lib/runsList.js +364 -63
  55. package/lib/runsRefusalVoices.js +50 -1
  56. package/lib/runsRegistry.d.ts +142 -9
  57. package/lib/runsRegistry.js +960 -163
  58. package/lib/runsStart.d.ts +30 -7
  59. package/lib/runsStart.js +136 -14
  60. package/lib/runsTypes.d.ts +46 -3
  61. package/lib/runsTypes.js +63 -9
  62. package/lib/runsValidate.d.ts +1 -0
  63. package/lib/runsValidate.js +5 -0
  64. package/lib/runsValidateArms.js +25 -0
  65. package/lib/runsValidateServe.js +25 -12
  66. package/lib/runsValidateShared.d.ts +8 -1
  67. package/lib/runsValidateShared.js +44 -4
  68. package/lib/runsValidateStages.d.ts +1 -1
  69. package/lib/runsValidateStages.js +107 -55
  70. package/lib/runtimeProvision.d.ts +119 -0
  71. package/lib/runtimeProvision.js +243 -0
  72. package/lib/skillAuthored.d.ts +50 -0
  73. package/lib/skillAuthored.js +178 -0
  74. package/lib/skillPlane.d.ts +40 -2
  75. package/lib/skillPlane.js +63 -13
  76. package/lib/skillRegistry.d.ts +24 -1
  77. package/lib/skillRegistry.js +69 -5
  78. package/lib/skillRows.d.ts +13 -3
  79. package/lib/skillRows.js +49 -5
  80. package/package.json +33 -23
  81. package/lib/resurrect.d.ts +0 -6
  82. package/lib/resurrect.js +0 -18
package/lib/runsList.d.ts CHANGED
@@ -1,8 +1,13 @@
1
+ import { type DraftId } from "@melite/contracts/benchStage";
1
2
  /** Leading-int read (sidecar tails): optional space, optional
2
3
  * sign, then digits; 0 when no digits lead. */
3
4
  export declare function parseLeadingInt(s: string): number;
4
5
  /** sidecar_num: first `"key":`, strtol the tail, default when the key is absent. */
5
6
  export declare function sidecarNum(text: string, key: string, dflt: number): number;
7
+ /** sidecar_bool: first `"key":`, skip spaces/tabs, expect the
8
+ * `true`/`false` literal — default when the key is absent or
9
+ * non-boolean (never guessed; a torn write reads the default). */
10
+ export declare function sidecarBool(text: string, key: string, dflt: boolean): boolean;
6
11
  /** sidecar_str: BYTE-wise exact — first `"key":`, skip spaces/tabs, expect `"`, decode \\n \\r \\t \" \\ (any other escape lands literally — \u stays "u"), stop at cap-1 BYTES. Operates on the UTF-8 bytes (D5). */
7
12
  export declare function sidecarStr(raw: Uint8Array, key: string, cap: number): string;
8
13
  /** _sidecar_str_impl found-ness: only the runs-list status site reads it — a present-but-empty "status" serves "" (the gate then skips the row), while an absent/non-string key serves "unknown". */
@@ -17,7 +22,32 @@ export declare function mediaCandidates(runDir: string): MediaCand[];
17
22
  /** run_artifacts: image/video/audio/model rows (image capped at _MAX_IMGS — counted but unlisted past it), everything else skipped; the {truncated,listed,total} marker when entries went unlisted. */
18
23
  /** path keeps the "./output/<run>/" literal. */
19
24
  export declare function runArtifacts(runDir: string, outDirLiteral: string): Record<string, unknown>[];
20
- /** _run_thumbnail: cached poster wins, else the first image candidate (same one-level rule, so nested-only runs still get a poster). */
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+ export declare function runArchivedArtifacts(runDir: string, outDirLiteral: string): Record<string, unknown>[];
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
21
51
  export declare function runThumbnail(runDir: string, runId: string): string;
22
52
  /** _run_dir_has_media: the media-FIRST sort key — top-level names, then one level down. */
23
53
  /** NOTE the absences: NO `_` skip (a lone `_poster.jpg` counts), NO inner isdir check (a nested DIR named x.mp4 counts) — probed live, mirrored exactly. */
@@ -48,6 +78,32 @@ export declare function runRowOrNull(row: {
48
78
  * engine-reported minted .qvoice absolute path; older sidecars
49
79
  * predate it, load lanes stamp nothing. */
50
80
  export_path?: string;
81
+
82
+
83
+
84
+
85
+
86
+ bench_epoch?: string;
87
+
88
+
89
+
90
+
91
+ truncated?: {
92
+ listed: number;
93
+ total: number;
94
+ };
95
+
96
+
97
+
98
+
99
+ archived?: Record<string, unknown>[];
100
+
101
+
102
+
103
+
104
+
105
+
106
+ test?: boolean;
51
107
  }): Record<string, unknown> | null;
52
108
  /** Strict int parse: surrounding whitespace stripped, one optional
53
109
  * sign, ASCII digits with single internal underscores ("1_0" ->
@@ -57,9 +113,44 @@ export declare function parseIntOrNull(s: string): number | null;
57
113
  * value wins; the shared ctx parseQuery keeps blanks, so the
58
114
  * filter lives here (parse_qs default). */
59
115
  export declare function firstQuery(qs: Record<string, string[]>, name: string, dflt: string): string;
60
- /** The runs-list envelope (the restore port): the output-root scan, media-first + newest sort, the limit parse (raw STRING — the lane/remote pass the raw text; underscores parse, non-ints refuse), refused cards SKIPPED but counted. */
116
+
117
+
118
+
119
+
120
+
121
+ export interface RunsListFilter {
122
+ /** Exact match against the SERVED row's `draft_id` — the row's
123
+ * own claim is the truth (the orphan overlay's cleared link
124
+ * matches nothing, per applyDraftOverlay's law). */
125
+ draftId?: string;
126
+ /** Membership in the row's `stage_ids` digest — the CSV sidecar
127
+ * seat spells the bench address FIRST (queueSidecar.ts stage_ids:
128
+ * bench_stage_id before the skeleton id), so a bench stage's
129
+ * takes are the rows that name it. */
130
+ benchStageId?: string;
131
+ }
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+ export declare function noteRunTreeChanged(mutatedPath: string): void;
151
+ /** The runs-list envelope (the restore port): the BOTH-SEATS scan per root (visible-bench law), media-first + newest sort, the limit sliced off the merged order, the limit parsed (raw STRING — the lane/remote pass the raw text; underscores parse, non-ints refuse), refused cards SKIPPED but counted. */
61
152
  /** url/thumbnail are run-RELATIVE (the /v1/assets prefix died with the app — the header's law). */
62
- export declare function listRuns(stateRoot: string, limit: number, hasDraft: (draftId: string) => Promise<boolean>): Promise<{
153
+ export declare function listRuns(stateRoot: string, limit: number, hasDraft: (draftId: DraftId) => Promise<boolean>, filter?: RunsListFilter): Promise<{
63
154
  count: number;
64
155
  runs: Record<string, unknown>[];
65
156
  }>;
@@ -70,7 +161,12 @@ export declare function listRuns(stateRoot: string, limit: number, hasDraft: (dr
70
161
 
71
162
 
72
163
 
73
- export declare function listRunsAcross(roots: string[], limit: number, hasDraft: (draftId: string) => Promise<boolean>): Promise<{
164
+
165
+
166
+
167
+
168
+
169
+ export declare function listRunsAcross(roots: string[], limit: number, hasDraft: (draftId: DraftId) => Promise<boolean>, filter?: RunsListFilter): Promise<{
74
170
  count: number;
75
171
  runs: Record<string, unknown>[];
76
172
  }>;