@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,142 @@
|
|
|
1
|
+
// toolProjection.ts — the registry-native card-tool projection,
|
|
2
|
+
|
|
3
|
+
// gateway's doors/toolProjection.ts (killed with the gateway app).
|
|
4
|
+
// THE CARD EMITS THE TOOL: one source end to end (the primed card
|
|
5
|
+
// registry); refusal law — a registered card without authored
|
|
6
|
+
// prose throws LOUD.
|
|
7
|
+
|
|
8
|
+
// dies).
|
|
9
|
+
//
|
|
10
|
+
// ONE source end to end: the primed card registry.
|
|
11
|
+
|
|
12
|
+
// TOOLS_JSON (the hand-owned frozen prose table) dies now.
|
|
13
|
+
// The emitted tool row derives from the card unit itself.
|
|
14
|
+
// Name comes from the id (hyphens to underscores plus _card, the wire spelling the walls pin).
|
|
15
|
+
// The primary model is the first served style value (the same one source the served model enum defaults to).
|
|
16
|
+
// The authored prose comes from the card identity (label and description, the identity rung).
|
|
17
|
+
// Live params_schema comes from emitParamsSchema over the card carrier (the toolsEmit and flowsCard carrier mirror).
|
|
18
|
+
//
|
|
19
|
+
// Refusal law: a registered card without authored prose throws
|
|
20
|
+
// LOUD — never a silent drop, never a generated title.
|
|
21
|
+
import { emitParamsSchema } from "@melite/comfyui-cordis";
|
|
22
|
+
import { cardWireName } from "@melite/comfyui-cordis";
|
|
23
|
+
import { modelsBooted, modelsService } from "@melite/comfyui-cordis";
|
|
24
|
+
import { semanticModelEntries } from "@melite/comfyui-cordis/semanticModelKnob";
|
|
25
|
+
/** Py-era card dir names (underscores) -> registry ids (hyphens).
|
|
26
|
+
* The three dirs predate the registry; the mapping is closed (a
|
|
27
|
+
* fourth mismatch refuses LOUD at the walk, never a silent skip).
|
|
28
|
+
* A future dir rename deletes the row here. */
|
|
29
|
+
export const DIR_ID_ALIASES = {
|
|
30
|
+
img_to_mesh: "img-to-mesh",
|
|
31
|
+
input_prep: "input-prep",
|
|
32
|
+
mask_studio: "mask-studio",
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Derive the served style entries for a boarded list.
|
|
36
|
+
* An unbooted table yields undefined.
|
|
37
|
+
* An unresolvable boarded id yields undefined.
|
|
38
|
+
*/
|
|
39
|
+
function semanticEntriesFor(boarded) {
|
|
40
|
+
// The table read needs a booted registry.
|
|
41
|
+
// A cold test process keeps the bare boarded fallback.
|
|
42
|
+
if (!modelsBooted())
|
|
43
|
+
return undefined;
|
|
44
|
+
try {
|
|
45
|
+
const svc = modelsService();
|
|
46
|
+
const decls = [];
|
|
47
|
+
for (const id of boarded) {
|
|
48
|
+
try {
|
|
49
|
+
decls.push(svc.getModel(id));
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
// An unresolvable boarded id keeps the bare fallback.
|
|
53
|
+
// The compose door refuses it loud with its own voice.
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
// The one spelling lives in semanticModelKnob.
|
|
58
|
+
// No second derivation is spelled here.
|
|
59
|
+
const entries = semanticModelEntries(decls);
|
|
60
|
+
if (entries.length === 0)
|
|
61
|
+
return undefined;
|
|
62
|
+
return entries;
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
// A table failure keeps the bare fallback.
|
|
66
|
+
// The caller never throws for a missing style.
|
|
67
|
+
return undefined;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/** The emitted base table, derived from the card registry (parsed
|
|
71
|
+
* per call, never transcribed, never cached at module scope —
|
|
72
|
+
* stroke 2a law; the derivation is cheap beside the schema
|
|
73
|
+
* emission each row already pays). */
|
|
74
|
+
export function toolBaseRows(defs) {
|
|
75
|
+
const out = new Map();
|
|
76
|
+
for (const [id, def] of defs) {
|
|
77
|
+
const identity = def.identity;
|
|
78
|
+
if (identity === undefined ||
|
|
79
|
+
identity.label === "" ||
|
|
80
|
+
identity.description === "") {
|
|
81
|
+
throw new Error(`[tool_projection] registered card ${id} carries no identity ` +
|
|
82
|
+
"(label/description are the authored prose the emitted tool " +
|
|
83
|
+
"serves — declare identity on the card; a generated title " +
|
|
84
|
+
"is the silent drop this fence exists to refuse)");
|
|
85
|
+
}
|
|
86
|
+
out.set(id, {
|
|
87
|
+
name: cardWireName(id),
|
|
88
|
+
version: 1,
|
|
89
|
+
kind: "card-compose",
|
|
90
|
+
card: id,
|
|
91
|
+
// The served default is the first style value.
|
|
92
|
+
// A missing derivation keeps the bare boarded fallback.
|
|
93
|
+
model: semanticEntriesFor(def.boarded)?.[0]?.value ?? def.boarded[0] ?? null,
|
|
94
|
+
stageTitle: identity.label,
|
|
95
|
+
description: identity.description,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
return out;
|
|
99
|
+
}
|
|
100
|
+
/** Emitted base row for a registered card — LOUD when the card
|
|
101
|
+
* carries no authored prose or no registry entry (the identity
|
|
102
|
+
* fence fires inside the derivation; this throw is the map
|
|
103
|
+
* fence). */
|
|
104
|
+
export function baseRowFor(defs, card) {
|
|
105
|
+
const base = toolBaseRows(defs).get(card);
|
|
106
|
+
if (base === undefined) {
|
|
107
|
+
throw new Error(`[tool_projection] card ${card} has no registry entry ` +
|
|
108
|
+
"(the emission walks defs only — a card id the map lacks " +
|
|
109
|
+
"cannot serve a tool)");
|
|
110
|
+
}
|
|
111
|
+
return base;
|
|
112
|
+
}
|
|
113
|
+
/** Project one registered card to its served manifest row: the
|
|
114
|
+
* emitted base fields + live params_schema from the registry. */
|
|
115
|
+
export function projectCardRow(def, base) {
|
|
116
|
+
const carrier = def.schemaCarrier ?? def.schema;
|
|
117
|
+
// The model knob serves the same style entries as the base row.
|
|
118
|
+
// A missing derivation keeps the bare boarded enum.
|
|
119
|
+
const semantic = semanticEntriesFor(def.boarded);
|
|
120
|
+
const paramsSchema = emitParamsSchema(carrier, def.boarded, semantic);
|
|
121
|
+
return {
|
|
122
|
+
name: base.name,
|
|
123
|
+
version: base.version,
|
|
124
|
+
kind: base.kind,
|
|
125
|
+
card: base.card,
|
|
126
|
+
flow: "",
|
|
127
|
+
model: base.model,
|
|
128
|
+
stageTitle: base.stageTitle,
|
|
129
|
+
description: base.description,
|
|
130
|
+
// Verbatim emitter output (an empty required is OMITTED, not
|
|
131
|
+
// [] — the /v1/tools overlay serves the same object).
|
|
132
|
+
paramsSchema: {
|
|
133
|
+
type: paramsSchema.type,
|
|
134
|
+
properties: paramsSchema.properties,
|
|
135
|
+
...(paramsSchema.required !== undefined
|
|
136
|
+
? { required: paramsSchema.required }
|
|
137
|
+
: {}),
|
|
138
|
+
},
|
|
139
|
+
hidden: null,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=toolProjection.js.map
|
package/lib/vocab.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const RETIRED_RUNNER_KNOBS: readonly string[];
|
|
2
|
+
|
|
3
|
+
export declare const RETIRED_CARRY_KEYS: readonly string[];
|
|
4
|
+
/** The door vocabulary _strict_body allows past the `_` gate. */
|
|
5
|
+
export declare const DOOR_KEYS: readonly string[];
|
|
6
|
+
//# sourceMappingURL=vocab.d.ts.map
|
package/lib/vocab.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// vocab.ts — the submit-body vocabulary (Vocab SSOT, ledger row 27
|
|
2
|
+
|
|
3
|
+
// ONCE in gateway-core params.ts; that package is dead, and the
|
|
4
|
+
|
|
5
|
+
export const RETIRED_RUNNER_KNOBS = [
|
|
6
|
+
"start_from",
|
|
7
|
+
"stop_after",
|
|
8
|
+
"reuse_run_id",
|
|
9
|
+
"partial_run",
|
|
10
|
+
"overrides",
|
|
11
|
+
"since",
|
|
12
|
+
"from_index",
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
export const RETIRED_CARRY_KEYS = ["pipe", "stage_id"];
|
|
16
|
+
/** The door vocabulary _strict_body allows past the `_` gate. */
|
|
17
|
+
export const DOOR_KEYS = ["yaml", "flow", "flow_inline", "model"];
|
|
18
|
+
//# sourceMappingURL=vocab.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,49 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@melite/estate-queue",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.4-alpha",
|
|
4
|
+
"license": "SSPL-1.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "The serial run queue as a host Cordis service (REBUILD-5 of the gateway kill): lock-first single-writer, sidecar/ledger I/O, reproduce/resume refusal arms, run-status probe slot. No doors, no routes, no port — the runs remote exposes the lanes over this seat.",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@deepseek-ai/cordis-plugin-timer": "1.1.6",
|
|
9
|
+
"@deepseek-ai/dsh-atomic-write": "0.2.0-rc.1",
|
|
10
|
+
"@deepseek-ai/dsh-brand": "0.2.0-rc.1",
|
|
11
|
+
"@deepseek-ai/dsh-home-paths": "0.2.0-rc.1",
|
|
12
|
+
"@deepseek-ai/dsh-timeout": "0.2.0-rc.1",
|
|
13
|
+
"@deepseek-ai/dsh-typert-protocol": "0.2.0-rc.1",
|
|
14
|
+
"@deepseek-ai/schemastery": "^3.18.4",
|
|
15
|
+
"@melite/comfyui-card-kit": "0.1.4-alpha",
|
|
16
|
+
"@melite/comfyui-cordis": "0.1.4-alpha",
|
|
17
|
+
"@melite/engine-contract": "0.1.4-alpha",
|
|
18
|
+
"@melite/contracts": "0.1.4-alpha",
|
|
19
|
+
"@melite/estate-drafts": "0.1.4-alpha",
|
|
20
|
+
"@melite/estate-provisioning": "0.1.4-alpha"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@types/node": "^22.20.0",
|
|
24
|
+
"typescript": "^5.9.3",
|
|
25
|
+
"@deepseek-ai/cordis": "^4.0.4"
|
|
26
|
+
},
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./lib/index.d.ts",
|
|
30
|
+
"default": "./lib/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./package.json": "./package.json"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"@deepseek-ai/cordis": "^4.0.4"
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"lib/index.js",
|
|
39
|
+
"lib/**/*.js",
|
|
40
|
+
"lib/**/*.d.ts"
|
|
41
|
+
],
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "tsc -p tsconfig.build.json",
|
|
44
|
+
"typecheck": "tsc --noEmit"
|
|
45
|
+
},
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public"
|
|
48
|
+
}
|
|
49
|
+
}
|
package/README.md
DELETED