@melite/estate-queue 0.2.2-alpha → 0.3.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.
Files changed (52) hide show
  1. package/lib/bakeParams.d.ts +2 -1
  2. package/lib/bench.js +30 -3
  3. package/lib/cardsCompose.js +10 -1
  4. package/lib/cardsDangling.js +17 -7
  5. package/lib/cardsDroppable.d.ts +11 -0
  6. package/lib/cardsDroppable.js +50 -0
  7. package/lib/cardsFacts.d.ts +37 -0
  8. package/lib/cardsFacts.js +47 -1
  9. package/lib/cardsLanes.d.ts +18 -0
  10. package/lib/cardsLanes.js +2 -1
  11. package/lib/cardsRegistry.d.ts +7 -18
  12. package/lib/cardsRegistry.js +132 -93
  13. package/lib/filmLead.js +9 -1
  14. package/lib/filmMemoryWarn.js +1 -0
  15. package/lib/flowsData.d.ts +33 -0
  16. package/lib/flowsData.js +45 -2
  17. package/lib/flowsFamilyCompose.js +1 -0
  18. package/lib/flowsParamsOverlay.d.ts +8 -1
  19. package/lib/flowsParamsOverlay.js +47 -2
  20. package/lib/flowsRegistryRows.js +40 -20
  21. package/lib/ledgerTail.js +1 -0
  22. package/lib/loadPlane.js +2 -0
  23. package/lib/managePlane.js +53 -12
  24. package/lib/manageProbe.js +33 -4
  25. package/lib/manageRegistry.d.ts +10 -0
  26. package/lib/manageRegistry.js +7 -1
  27. package/lib/managerRail.js +1 -0
  28. package/lib/queueCore.js +3 -1
  29. package/lib/queueLock.js +3 -0
  30. package/lib/queueResurrect.js +5 -0
  31. package/lib/queueSidecar.d.ts +43 -3
  32. package/lib/queueSidecar.js +33 -4
  33. package/lib/queueSweep.d.ts +38 -11
  34. package/lib/queueSweep.js +73 -16
  35. package/lib/runsChange.d.ts +5 -4
  36. package/lib/runsExecute.js +98 -5
  37. package/lib/runsGates.js +1 -0
  38. package/lib/runsList.js +11 -0
  39. package/lib/runsRegistry.d.ts +29 -3
  40. package/lib/runsRegistry.js +187 -8
  41. package/lib/runsSourceEcho.d.ts +2 -1
  42. package/lib/runsSourceEcho.js +9 -3
  43. package/lib/runsTypes.d.ts +46 -0
  44. package/lib/runsTypes.js +44 -0
  45. package/lib/runsValidateArms.js +23 -2
  46. package/lib/runsValidateStages.js +18 -1
  47. package/lib/runtimeProvision.js +10 -2
  48. package/lib/skillFs.js +3 -0
  49. package/lib/skillRows.js +10 -6
  50. package/lib/vocab.d.ts +44 -0
  51. package/lib/vocab.js +96 -0
  52. package/package.json +15 -15
package/lib/skillFs.js CHANGED
@@ -37,6 +37,7 @@ export function disclosureRoot() {
37
37
  export function isDir(p) {
38
38
  try {
39
39
  return statSync(p).isDirectory();
40
+ // a missing or unreadable path is not a directory — false is the probe's whole answer
40
41
  }
41
42
  catch {
42
43
  return false;
@@ -45,6 +46,7 @@ export function isDir(p) {
45
46
  export function isFile(p) {
46
47
  try {
47
48
  return statSync(p).isFile();
49
+ // a missing or unreadable path is not a file — false is the probe's whole answer
48
50
  }
49
51
  catch {
50
52
  return false;
@@ -70,6 +72,7 @@ export function subdirs(parent) {
70
72
  export function readText(p) {
71
73
  try {
72
74
  return readFileSync(p, "utf8");
75
+ // a missing or unreadable file reads as null — the callers treat null as absent, so the failure is itself the answer
73
76
  }
74
77
  catch {
75
78
  return null;
package/lib/skillRows.js CHANGED
@@ -2,7 +2,7 @@
2
2
  // skillPlane.ts): tool properties, flow declarations, doc/spawn
3
3
  // rows, engine/model/card/flow rows — module truth over paths.
4
4
  import { readdirSync } from "node:fs";
5
- import { join } from "node:path";
5
+ import { basename, join } from "node:path";
6
6
  import { DIR_ID_ALIASES, isDir, isFile, subdirs, readText, stem } from "./skillFs.js";
7
7
  import { authoredSkillDoc } from "./skillAuthored.js";
8
8
  import { frontmatter, gateSkill } from "./skillFrontmatter.js";
@@ -116,8 +116,9 @@ export function readDoc(path, sid, scope, genre, card, model) {
116
116
  if (text === null)
117
117
  return null;
118
118
  const fm = frontmatter(text);
119
- // (split never yields [] — pop is always a string here)
120
- const leaf = path.split("/").pop();
119
+ // (basename: the doc path is a native fs path — a posix split
120
+ // pins the leaf wrong on win32, where the separator is "\")
121
+ const leaf = basename(path);
121
122
  const gated = gateSkill(sid, fm.name !== "" ? fm.name : stem(leaf),
122
123
 
123
124
  // long prompts and skills — that is intentional"): the authored
@@ -306,6 +307,7 @@ export function modelRows(engine, stateRoot) {
306
307
  let sks;
307
308
  try {
308
309
  sks = readdirSync(join(mdir, "agents", "skills")).sort();
310
+ // a model dir with no agents/skills subtree ships no skills of its own — the skip is the answer, its spawn rows already walked above
309
311
  }
310
312
  catch {
311
313
  continue;
@@ -378,9 +380,10 @@ export function cardUnitDirs(engine, repo) {
378
380
  // owner is comfyui-cordis (factsPath in cardsRegistry.ts hardcodes it;
379
381
  // packages/engines/comfyui/src/ holds only action_cards tenants, it is
380
382
  // never itself an engine entry).
381
- // (split never yields [] — pop is always a string here; dir names
382
- // are unique so the equal arm never fires)
383
- if (engine.split("/").pop() !== "comfyui-cordis")
383
+ // (basename: engine is a native fs path — a posix split never
384
+ // matches on win32, so the owner-engine gate misfired and the
385
+ // domains walk came back empty there)
386
+ if (basename(engine) !== "comfyui-cordis")
384
387
  return out.sort((a, b) => (a.cname < b.cname ? -1 : a.cname > b.cname ? 1 : /* v8 ignore next */ 0));
385
388
  for (const genre of ["3d", "audio", "image", "motion", "video"]) {
386
389
  const droot = join(repo, "packages", genre);
@@ -421,6 +424,7 @@ export function cardRows(engine, repo) {
421
424
  let sks;
422
425
  try {
423
426
  sks = readdirSync(join(cdir, "agents", "skills")).sort();
427
+ // a card dir with no agents/skills subtree ships no skills — the empty list lets the walk fall through to the spawn plane
424
428
  }
425
429
  catch {
426
430
  sks = [];
package/lib/vocab.d.ts CHANGED
@@ -3,4 +3,48 @@ export declare const RETIRED_RUNNER_KNOBS: readonly string[];
3
3
  export declare const RETIRED_CARRY_KEYS: readonly string[];
4
4
  /** The door vocabulary _strict_body allows past the `_` gate. */
5
5
  export declare const DOOR_KEYS: readonly string[];
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+ export declare const CARD_ENVELOPE_KEYS: readonly string[];
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+ export declare const SELECTOR_KEYS: readonly string[];
6
50
  //# sourceMappingURL=vocab.d.ts.map
package/lib/vocab.js CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  // ONCE in gateway-core params.ts; that package is dead, and the
4
4
 
5
+ import { WIRE_STAGE_KEYS } from "@melite/contracts/benchStage";
5
6
  export const RETIRED_RUNNER_KNOBS = [
6
7
  "start_from",
7
8
  "stop_after",
@@ -15,4 +16,99 @@ export const RETIRED_RUNNER_KNOBS = [
15
16
  export const RETIRED_CARRY_KEYS = ["pipe", "stage_id"];
16
17
  /** The door vocabulary _strict_body allows past the `_` gate. */
17
18
  export const DOOR_KEYS = ["yaml", "flow", "flow_inline", "model"];
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+ export const CARD_ENVELOPE_KEYS = [
48
+ ...DOOR_KEYS,
49
+ // …every wire coordinate EXCEPT `params` — and the exception is the
50
+ // load-bearing one. `params` is the row's knob CONTAINER: the run
51
+ // body's `{model, params:{…}}` stanza is what liftCardParams
52
+ // unwraps (the stanza law, benchStage's own), and filtering the
53
+ // container BEFORE that unwrap would drop every knob a caller sent
54
+ // — the first cut of this list did exactly that and turned every
55
+ // run into "this lane requires 'prompt'". A coordinate selects the
56
+ // graph; the knobs ride inside `params`, never as a key of it.
57
+ ...WIRE_STAGE_KEYS.filter((k) => k !== "params"),
58
+ "draft_id",
59
+ "test",
60
+ "service",
61
+ // press_key is the submit door's retry-dedup coordinate
62
+ // (queueSubmit names ONE press across retries) — door
63
+ // vocabulary, never a card knob. It rode unregistered and the
64
+ // live Run press refused "unknown param(s) … press_key" while the
65
+
66
+ // no wall drove a press_key-carrying body.
67
+ "press_key",
68
+ // bench_stage_id is the SINGLE-CARD press's bench identity (the
69
+
70
+ // vocabulary — the card never sees it as a knob, and the composed
71
+ // stage stamps it (runsRegistry's card arm) so the run sidecar's
72
+ // digest names the row the operator pressed, which is what the
73
+ // bench read's `last_run` binds to. Unregistered, it would land in
74
+ // every card's params as an unknown knob and refuse the press.
75
+ "bench_stage_id",
76
+ // seeds is the submit door's seed-sweep coordinate (friction #9,
77
+
78
+ // door vocabulary consumed before any card composes, never a card
79
+ // knob. The per-run body carries the SEAT's `seed` (a real knob,
80
+ // deliberately NOT on this list — liftCardParams must carry it
81
+ // into the card's params); the sweep key itself rides the envelope.
82
+ "seeds",
83
+ // the bench row's own non-wire coordinates (benchStage's stage row
84
+ // carries these beside the wire keys; they select, they never ride).
85
+ // The row's authorship coordinate rides the NEW key only (the
86
+ // stored-rows law, CONTRACTS.md §4 debt 6 — the drafts reader heals
87
+ // the legacy spelling before a row serves).
88
+ "author",
89
+ "rev",
90
+ "stage",
91
+ "title",
92
+ "inputOutputs",
93
+ "result",
94
+ "runStatus",
95
+ "expect_rev",
96
+ "authorship",
97
+ "capability",
98
+ ];
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+ export const SELECTOR_KEYS = ["variant", "quant"];
18
114
  //# sourceMappingURL=vocab.js.map
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@melite/estate-queue",
3
- "version": "0.2.2-alpha",
3
+ "version": "0.3.0-alpha",
4
4
  "license": "AGPL-3.0-or-later",
5
5
  "type": "module",
6
6
  "description": "The estate's run core as Cordis services — serial queue, live-run registry, manage and flows seats, the skill plane, and the runs gate vocabulary.",
7
7
  "dependencies": {
8
- "@deepseek-ai/dsh-atomic-write": "0.2.1-rc.2",
9
- "@deepseek-ai/dsh-brand": "0.2.1-rc.2",
10
- "@deepseek-ai/dsh-timeout": "0.2.1-rc.2",
11
- "@deepseek-ai/dsh-typert-protocol": "0.2.1-rc.2",
12
- "@deepseek-ai/dsh-util-values": "0.2.1-rc.2",
13
- "@deepseek-ai/schemastery": "^3.18.5",
14
- "@deepseek-ai/cordis-plugin-timer": "~1.1.3",
15
- "@melite/comfyui-cordis": "0.2.2-alpha",
16
- "@melite/contracts": "0.2.2-alpha",
17
- "@melite/engine-contract": "0.2.2-alpha",
18
- "@melite/estate-drafts": "0.2.2-alpha",
19
- "@melite/comfyui-card-kit": "0.2.2-alpha",
20
- "@melite/estate-provisioning": "0.2.2-alpha"
8
+ "@deepseek-ai/dsh-atomic-write": "0.2.2-rc.5",
9
+ "@deepseek-ai/dsh-brand": "0.2.2-rc.5",
10
+ "@deepseek-ai/dsh-timeout": "0.2.2-rc.5",
11
+ "@deepseek-ai/dsh-typert-protocol": "0.2.2-rc.5",
12
+ "@deepseek-ai/dsh-util-values": "0.2.2-rc.5",
13
+ "@deepseek-ai/schemastery": "^3.19.0",
14
+ "@deepseek-ai/cordis-plugin-timer": "~1.2.0",
15
+ "@melite/comfyui-cordis": "0.3.0-alpha",
16
+ "@melite/comfyui-card-kit": "0.3.0-alpha",
17
+ "@melite/contracts": "0.3.0-alpha",
18
+ "@melite/engine-contract": "0.3.0-alpha",
19
+ "@melite/estate-drafts": "0.3.0-alpha",
20
+ "@melite/estate-provisioning": "0.3.0-alpha"
21
21
  },
22
22
  "exports": {
23
23
  ".": {
@@ -27,7 +27,7 @@
27
27
  "./package.json": "./package.json"
28
28
  },
29
29
  "peerDependencies": {
30
- "@deepseek-ai/cordis": "^4.0.5"
30
+ "@deepseek-ai/cordis": "^4.1.0"
31
31
  },
32
32
  "files": [
33
33
  "lib/index.js",