@dreamlake/dreamlake-cli 0.93.0 → 0.94.0
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/dist/cli/help-examples.generated.js +5 -0
- package/dist/cli/queues/index.d.ts +11 -0
- package/dist/cli/queues/index.js +71 -0
- package/dist/cli/runnable/bound-target.d.ts +73 -0
- package/dist/cli/runnable/bound-target.js +211 -0
- package/dist/cli/runnable/bound.d.ts +88 -0
- package/dist/cli/runnable/bound.js +347 -0
- package/dist/cli/runnable/index.js +2 -0
- package/dist/cli/version.d.ts +1 -1
- package/dist/cli/version.js +1 -1
- package/package.json +9 -9
|
@@ -8,6 +8,9 @@ export const helpExamples = {
|
|
|
8
8
|
"artifact meta set": "# At push time:\ndreamlake artifact push ./report.html --id q1-dashboard \\\n --description \"Revenue, churn and pipeline for the quarter\" \\\n --cover ./cover.png\n\n# Or after the fact, for an artifact that already exists:\ndreamlake artifact meta set q1-dashboard --description \"Revenue, churn and pipeline\"\ndreamlake artifact meta set q1-dashboard --cover ./cover.png\ndreamlake artifact meta show q1-dashboard\n\n# Back to the automatic description / the generated cover:\ndreamlake artifact meta set q1-dashboard --clear-description --clear-cover",
|
|
9
9
|
"artifact share": "# Find the dashboard you already uploaded; no new version is needed.\ndreamlake artifact list\nARTIFACT=\"q1-dashboard\" # Replace with the id from list.\ndreamlake artifact share get \"$ARTIFACT\"\n\n# Give signed-in recipients read access, then verify the returned link.\ndreamlake artifact share create \"$ARTIFACT\"\ndreamlake artifact share get \"$ARTIFACT\"\n\n# When link access is no longer needed, revoke it and verify.\ndreamlake artifact share revoke \"$ARTIFACT\"\ndreamlake artifact share get \"$ARTIFACT\"",
|
|
10
10
|
"artifact visibility": "ARTIFACT=\"q1-dashboard\" # Your existing artifact id.\ndreamlake artifact visibility \"$ARTIFACT\" public\ndreamlake artifact visibility \"$ARTIFACT\" private",
|
|
11
|
+
"runnable bind": "dreamlake runnable bind udf/acme/recipes.process@FULL_SHA256 \\\n --snapshot CODE_REPO_ID --project recipes \\\n --server \"$LAKESHORE_URL\" --cp-namespace acme --dry-run\ndreamlake runnable bind udf/acme/recipes.process@FULL_SHA256 \\\n --snapshot CODE_REPO_ID --project recipes --server \"$LAKESHORE_URL\" --cp-namespace acme",
|
|
12
|
+
"runnable execute": "dreamlake runnable execute exec/acme/recipes.process@EXECUTION_DIGEST \\\n --queue cpu --inputs record.json --timeout-seconds 600 --json\ndreamlake runnable execute exec/acme/recipes.process@EXECUTION_DIGEST \\\n --queue cpu --inputs record.json --timeout-seconds 600 --attempt 2 --json",
|
|
13
|
+
"runnable execution-receipt": "dreamlake runnable execution-receipt exec/acme/recipes.process@EXECUTION_DIGEST \\\n --queue cpu --inputs record.json --timeout-seconds 600 --wait-seconds 30",
|
|
11
14
|
"hosts": "dreamlake hosts\ndreamlake hosts --all\ndreamlake hosts -h\ndreamlake hosts list -h",
|
|
12
15
|
"nymph": "dreamlake nymph\ndreamlake nymph --json",
|
|
13
16
|
"nymph setup": "dreamlake nymph setup --name alice/computers/laptop --lakeshore-id CONNECTION_ID",
|
|
@@ -127,6 +130,8 @@ export const helpExamples = {
|
|
|
127
130
|
"providers instances logs": "dreamlake providers instances logs team/333333333333333333333333 --instance POD_NAME --tail 100 --json",
|
|
128
131
|
"providers instances terminate": "dreamlake providers instances terminate team/333333333333333333333333 --instance POD_NAME --request-id kube-delete-01 --json",
|
|
129
132
|
"queues worker-claims": "dreamlake queues worker-claims lab WORKER_ID --namespace geyang\ndreamlake queues worker-claims lab WORKER_ID --namespace geyang --disable\ndreamlake queues worker-claims lab WORKER_ID --namespace geyang --enable --json",
|
|
133
|
+
"queues create": "dreamlake queues create lab fixture --namespace geyang",
|
|
134
|
+
"queues worker-pin": "dreamlake queues worker-pin lab WORKER_ID --namespace geyang\ndreamlake queues worker-pin lab WORKER_ID --namespace geyang --queue fixture --host geyang/dev/worker\ndreamlake queues worker-pin lab WORKER_ID --namespace geyang --clear --host geyang/dev/worker --json",
|
|
130
135
|
"queues slurm clusters": "dreamlake queues slurm clusters --namespace geyang",
|
|
131
136
|
"queues slurm jobs": "dreamlake queues slurm jobs CLUSTER_ID --namespace geyang\ndreamlake queues slurm jobs CLUSTER_ID --namespace geyang --details\ndreamlake queues slurm jobs CLUSTER_ID --namespace geyang --json",
|
|
132
137
|
"runnable run": "dreamlake runnable run udf/NAMESPACE/NAME@FULL_SHA256 \\\n --target NAMESPACE/GROUP/HOST --enrollment-id ENROLLMENT_ID \\\n --request-id YOUR_STABLE_REQUEST_ID --inputs inputs.json --json",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Command } from "commander";
|
|
2
|
+
import { resolveTarget } from "../runnable/bound-target.js";
|
|
2
3
|
export interface QueueOpts {
|
|
3
4
|
namespace?: string;
|
|
4
5
|
json?: boolean;
|
|
@@ -35,4 +36,14 @@ export interface WorkerClaimsOpts extends QueueOpts {
|
|
|
35
36
|
disable?: boolean;
|
|
36
37
|
}
|
|
37
38
|
export declare function runQueuesWorkerClaims(prefix: string, workerId: string, opts: WorkerClaimsOpts): Promise<number>;
|
|
39
|
+
export interface WorkerPinOpts extends QueueOpts {
|
|
40
|
+
host?: string;
|
|
41
|
+
enrollment?: string;
|
|
42
|
+
queue?: string[];
|
|
43
|
+
clear?: boolean;
|
|
44
|
+
}
|
|
45
|
+
export declare function runQueuesWorkerPin(prefix: string, workerId: string, opts: WorkerPinOpts, deps?: {
|
|
46
|
+
resolve?: typeof resolveTarget;
|
|
47
|
+
}): Promise<number>;
|
|
48
|
+
export declare function runQueuesCreate(prefix: string, name: string, opts: QueueOpts): Promise<number>;
|
|
38
49
|
export declare function registerQueuesCommand(program: Command): void;
|
package/dist/cli/queues/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { input, password } from "@inquirer/prompts";
|
|
|
4
4
|
import { HttpError, requestJson } from "../client.js";
|
|
5
5
|
import { resolveNamespace, resolveRemote, resolveToken } from "../config.js";
|
|
6
6
|
import { emitJson, fail, renderTable } from "../helpers.js";
|
|
7
|
+
import { resolveTarget } from "../runnable/bound-target.js";
|
|
7
8
|
const mountInput = {
|
|
8
9
|
get interactive() { return !!process.stdin.isTTY; },
|
|
9
10
|
namespace: () => input({ message: "Lakeshore namespace (on the queue server):" }),
|
|
@@ -251,6 +252,68 @@ export async function runQueuesWorkerClaims(prefix, workerId, opts) {
|
|
|
251
252
|
return error(err);
|
|
252
253
|
}
|
|
253
254
|
}
|
|
255
|
+
// Shows or sets one owned worker's queue pin. While pinned, the worker claims
|
|
256
|
+
// queued jobs only from the pinned queues: its poll queue, membership and pool
|
|
257
|
+
// siblings are ignored. Set and clear go through DreamLake with the caller's
|
|
258
|
+
// ownership of the worker's host; the control-plane token stays server-side.
|
|
259
|
+
// Rollback order: disable claims and confirm, then clear the pin.
|
|
260
|
+
export async function runQueuesWorkerPin(prefix, workerId, opts, deps = {}) {
|
|
261
|
+
try {
|
|
262
|
+
const queues = opts.queue ?? [];
|
|
263
|
+
if (opts.clear && queues.length)
|
|
264
|
+
throw new Error("choose one of --queue or --clear");
|
|
265
|
+
if (!/^[a-f0-9]{24}$/.test(workerId))
|
|
266
|
+
throw new Error("worker ID must be the 24-character ID shown by 'dreamlake queues workers'");
|
|
267
|
+
const c = await context(opts);
|
|
268
|
+
const path = `${c.path}/${seg(prefix)}`;
|
|
269
|
+
const mount = await requestJson(c.remote, path, { token: c.token });
|
|
270
|
+
if (queues.length || opts.clear) {
|
|
271
|
+
if (!opts.host)
|
|
272
|
+
throw new Error("--host <namespace/group/host> is required to change a pin: you must own the worker's host");
|
|
273
|
+
const target = await (deps.resolve ?? resolveTarget)(opts.host, opts.enrollment);
|
|
274
|
+
if (target.workerId !== workerId || target.lakeshoreId !== mount.id)
|
|
275
|
+
throw new Error(`${opts.host} is not bound to worker ${workerId} on ${prefix}`);
|
|
276
|
+
await requestJson(c.remote, `${c.path}/${seg(mount.id)}/workers/${seg(workerId)}/queue-pin`, {
|
|
277
|
+
token: c.token, method: "POST",
|
|
278
|
+
json: { hostId: target.hostId, enrollmentId: target.enrollmentId, queues: opts.clear ? null : queues }
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
// Report what the control plane stores, not what was requested.
|
|
282
|
+
const view = await requestJson(c.remote, `${path}/proxy/v1/namespaces/${seg(mount.lakeshoreNs)}/workers/${seg(workerId)}`, { token: c.token });
|
|
283
|
+
if (!Object.hasOwn(view, "queuePin"))
|
|
284
|
+
throw new Error("this Lakeshore control plane does not report queuePin; it predates the worker queue pin");
|
|
285
|
+
const result = { workerId: view.id ?? workerId, label: view.label ?? null, state: view.state ?? null,
|
|
286
|
+
queuePin: view.queuePin ?? null, claimJobs: view.claimJobs ?? null };
|
|
287
|
+
if (opts.json)
|
|
288
|
+
emitJson(result);
|
|
289
|
+
else
|
|
290
|
+
process.stdout.write(`${result.label ?? result.workerId}: ` + (Array.isArray(result.queuePin)
|
|
291
|
+
? `pinned to ${result.queuePin.join(", ")} (no other queue is claimed)` : "not pinned") + "\n");
|
|
292
|
+
return 0;
|
|
293
|
+
}
|
|
294
|
+
catch (err) {
|
|
295
|
+
return error(err);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
// Creates one queue with control-plane defaults (fifo, active, no pool).
|
|
299
|
+
export async function runQueuesCreate(prefix, name, opts) {
|
|
300
|
+
try {
|
|
301
|
+
if (!/^[a-z0-9][a-z0-9-]*$/.test(name) || name === "default")
|
|
302
|
+
throw new Error("queue name must match ^[a-z0-9][a-z0-9-]*$ and not be default");
|
|
303
|
+
const c = await context(opts);
|
|
304
|
+
const path = `${c.path}/${seg(prefix)}`;
|
|
305
|
+
const mount = await requestJson(c.remote, path, { token: c.token });
|
|
306
|
+
const created = await requestJson(c.remote, `${path}/proxy/v1/namespaces/${seg(mount.lakeshoreNs)}/queues`, { token: c.token, method: "POST", json: { name } });
|
|
307
|
+
if (opts.json)
|
|
308
|
+
emitJson(created);
|
|
309
|
+
else
|
|
310
|
+
process.stdout.write(`created queue ${created.name ?? name} (${created.state ?? "active"})\n`);
|
|
311
|
+
return 0;
|
|
312
|
+
}
|
|
313
|
+
catch (err) {
|
|
314
|
+
return error(err);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
254
317
|
export function registerQueuesCommand(program) {
|
|
255
318
|
const queues = program.command("queues").description("mount Lakeshore servers and view live queues through DreamLake");
|
|
256
319
|
registerSlurmCommands(queues);
|
|
@@ -277,6 +340,14 @@ export function registerQueuesCommand(program) {
|
|
|
277
340
|
.option("--disable", "stop claiming new jobs from every queue")
|
|
278
341
|
.option("--enable", "resume claiming jobs"))
|
|
279
342
|
.action(async (prefix, workerId, opts) => { process.exitCode = await runQueuesWorkerClaims(prefix, workerId, opts); });
|
|
343
|
+
common(queues.command("worker-pin <prefix> <worker-id>").description("show or set which queues one owned worker claims from; nothing else is claimed while pinned")
|
|
344
|
+
.option("--queue <name>", "pin to this queue (repeatable, up to 4)", (v, prev = []) => [...prev, v])
|
|
345
|
+
.option("--clear", "remove the pin (disable the worker's job claims first)")
|
|
346
|
+
.option("--host <selector>", "namespace/group/host you own, bound to this worker (required to change the pin)")
|
|
347
|
+
.option("--enrollment <id>", "the host enrollment, when it has more than one"))
|
|
348
|
+
.action(async (prefix, workerId, opts) => { process.exitCode = await runQueuesWorkerPin(prefix, workerId, opts); });
|
|
349
|
+
common(queues.command("create <prefix> <name>").description("create one queue on a mounted server (fifo, active, no pool)"))
|
|
350
|
+
.action(async (prefix, name, opts) => { process.exitCode = await runQueuesCreate(prefix, name, opts); });
|
|
280
351
|
common(queues.command("jobs <prefix>").description("view jobs on a mounted server").option("--limit <count>", "maximum jobs").option("--offset <count>", "pagination offset"))
|
|
281
352
|
.action(async (prefix, opts) => { process.exitCode = await runQueuesResources(prefix, "jobs", opts); });
|
|
282
353
|
common(collectionList(queues, "list <prefix>").description("list live queues on a mounted server"))
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { hostStatus } from "../hosts/enroll.js";
|
|
2
|
+
import { type BridgeDeps } from "../python.js";
|
|
3
|
+
export declare const TASK_PROTOCOL_V2 = "dreamlake-bound-task-v2";
|
|
4
|
+
/** Mirrors the server's caps: the archive travels inline in the submission. */
|
|
5
|
+
export declare const INLINE_ARCHIVE_MAX: number;
|
|
6
|
+
export declare const INLINE_INPUT_MAX: number;
|
|
7
|
+
export interface Target {
|
|
8
|
+
namespace: string;
|
|
9
|
+
hostId: string;
|
|
10
|
+
enrollmentId: string;
|
|
11
|
+
workerId: string;
|
|
12
|
+
lakeshoreId: string;
|
|
13
|
+
lakeshoreSlug: string;
|
|
14
|
+
lakeshoreNs: string;
|
|
15
|
+
worker: Record<string, any>;
|
|
16
|
+
}
|
|
17
|
+
/** Host selector → owned Host, its one (or the selected) enrollment, its connection and the CP worker bound to it. */
|
|
18
|
+
export declare function resolveTarget(selector: string, enrollment?: string, deps?: {
|
|
19
|
+
status?: typeof hostStatus;
|
|
20
|
+
}): Promise<Target>;
|
|
21
|
+
export declare function buildTaskRequestV2(digest: string, o: {
|
|
22
|
+
queue: string;
|
|
23
|
+
target: {
|
|
24
|
+
hostId: string;
|
|
25
|
+
enrollmentId: string;
|
|
26
|
+
workerId: string;
|
|
27
|
+
};
|
|
28
|
+
inputs: unknown;
|
|
29
|
+
timeoutSeconds: number;
|
|
30
|
+
attempt: number;
|
|
31
|
+
}): {
|
|
32
|
+
protocol: string;
|
|
33
|
+
executionDigest: string;
|
|
34
|
+
queue: string;
|
|
35
|
+
target: {
|
|
36
|
+
hostId: string;
|
|
37
|
+
enrollmentId: string;
|
|
38
|
+
workerId: string;
|
|
39
|
+
};
|
|
40
|
+
timeoutSeconds: number;
|
|
41
|
+
inputs: Record<string, any>;
|
|
42
|
+
attempt: number;
|
|
43
|
+
taskKey: string;
|
|
44
|
+
invocationId: string;
|
|
45
|
+
};
|
|
46
|
+
export interface TargetBindOptions {
|
|
47
|
+
target: string;
|
|
48
|
+
enrollment?: string;
|
|
49
|
+
project: string;
|
|
50
|
+
sourcePath?: string;
|
|
51
|
+
python?: string;
|
|
52
|
+
config?: string;
|
|
53
|
+
dryRun?: boolean;
|
|
54
|
+
json?: boolean;
|
|
55
|
+
}
|
|
56
|
+
export declare function runBindViaDreamLake(ref: string, opts: TargetBindOptions, deps?: BridgeDeps & {
|
|
57
|
+
status?: typeof hostStatus;
|
|
58
|
+
}): Promise<number>;
|
|
59
|
+
export interface TargetExecuteOptions {
|
|
60
|
+
target: string;
|
|
61
|
+
enrollment?: string;
|
|
62
|
+
queue?: string;
|
|
63
|
+
inputs?: string;
|
|
64
|
+
attempt?: string;
|
|
65
|
+
timeoutSeconds?: string;
|
|
66
|
+
waitSeconds?: string;
|
|
67
|
+
wait?: boolean;
|
|
68
|
+
json?: boolean;
|
|
69
|
+
}
|
|
70
|
+
export declare function runTargetedCommand(command: "execute" | "receipt", ref: string, opts: TargetExecuteOptions, deps?: {
|
|
71
|
+
status?: typeof hostStatus;
|
|
72
|
+
sleep?: (ms: number) => Promise<void>;
|
|
73
|
+
}): Promise<number>;
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
// DreamLake-mediated bound executions (`--target <namespace/group/host>`).
|
|
2
|
+
//
|
|
3
|
+
// Unlike the `--server` path, no control-plane credential is used here: the
|
|
4
|
+
// DreamLake server holds the target enrollment's connection, uploads the small
|
|
5
|
+
// configured archive, submits to the target worker's pinned queue with the
|
|
6
|
+
// archive inline, and reads the receipt. The caller must own the target host.
|
|
7
|
+
// The task request is v2: its `target` {hostId, enrollmentId, workerId} is part
|
|
8
|
+
// of the task key and invocation ID, so retargeting is a different task.
|
|
9
|
+
import { createHash } from "node:crypto";
|
|
10
|
+
import { mkdtempSync, readFileSync, rmSync } from "node:fs";
|
|
11
|
+
import { tmpdir } from "node:os";
|
|
12
|
+
import { join } from "node:path";
|
|
13
|
+
import { requestJson } from "../client.js";
|
|
14
|
+
import { resolveRemote, resolveToken } from "../config.js";
|
|
15
|
+
import { emitJson, fail, ok } from "../helpers.js";
|
|
16
|
+
import { hostStatus } from "../hosts/enroll.js";
|
|
17
|
+
import { callBridge } from "../python.js";
|
|
18
|
+
import { canonical, checkRegisteredVersion, readBinding, sha256, executionReference, buildBinding } from "./bound.js";
|
|
19
|
+
import { pinnedReference } from "./run.js";
|
|
20
|
+
export const TASK_PROTOCOL_V2 = "dreamlake-bound-task-v2";
|
|
21
|
+
/** Mirrors the server's caps: the archive travels inline in the submission. */
|
|
22
|
+
export const INLINE_ARCHIVE_MAX = 128 * 1024;
|
|
23
|
+
export const INLINE_INPUT_MAX = 16 * 1024;
|
|
24
|
+
const OID = /^[a-f0-9]{24}$/;
|
|
25
|
+
const QUEUE = /^[a-z0-9][a-z0-9-]{0,62}$/;
|
|
26
|
+
const VERSION = /^\d+\.\d+\.\d+$/;
|
|
27
|
+
const seg = encodeURIComponent;
|
|
28
|
+
const object = (v) => !!v && typeof v === "object" && !Array.isArray(v);
|
|
29
|
+
function session() {
|
|
30
|
+
const token = resolveToken();
|
|
31
|
+
if (!token)
|
|
32
|
+
throw new Error("Log in to DreamLake first");
|
|
33
|
+
return { remote: resolveRemote(), token };
|
|
34
|
+
}
|
|
35
|
+
/** Host selector → owned Host, its one (or the selected) enrollment, its connection and the CP worker bound to it. */
|
|
36
|
+
export async function resolveTarget(selector, enrollment, deps = {}) {
|
|
37
|
+
const parts = selector.split("/");
|
|
38
|
+
if (parts.length !== 3 || selector.includes("*"))
|
|
39
|
+
throw new Error("--target must be one host: namespace/group/host");
|
|
40
|
+
const detail = await (deps.status ?? hostStatus)(selector, {});
|
|
41
|
+
const hostId = String(detail?.host?.id ?? "");
|
|
42
|
+
const rows = (detail?.enrollments ?? []).filter((e) => !enrollment || e.id === enrollment);
|
|
43
|
+
if (!OID.test(hostId) || rows.length !== 1 || !OID.test(rows[0].id) || !OID.test(rows[0].lakeshoreId ?? ""))
|
|
44
|
+
throw new Error(enrollment ? `Enrollment ${enrollment} is not on ${selector}` : `${selector} has ${rows.length} enrollments; pass --enrollment`);
|
|
45
|
+
const { remote, token } = session();
|
|
46
|
+
const namespace = parts[0];
|
|
47
|
+
const mounts = await requestJson(remote, `/namespaces/${seg(namespace)}/lakeshores`, { token, query: { pageSize: "200" } });
|
|
48
|
+
const mount = (mounts?.lakeshores ?? []).find((m) => m.id === rows[0].lakeshoreId);
|
|
49
|
+
if (!mount?.slug || !mount?.lakeshoreNs)
|
|
50
|
+
throw new Error(`The connection of ${selector} is not visible in ${namespace}`);
|
|
51
|
+
const workers = await requestJson(remote, `/namespaces/${seg(namespace)}/lakeshores/${seg(mount.slug)}/proxy/v1/namespaces/${seg(mount.lakeshoreNs)}/workers`, { token });
|
|
52
|
+
const matching = (Array.isArray(workers) ? workers : []).filter(w => w?.enrollmentId === rows[0].id && w?.hostId === hostId);
|
|
53
|
+
if (matching.length !== 1 || !OID.test(matching[0].id))
|
|
54
|
+
throw new Error(`No single control-plane worker is bound to ${selector}`);
|
|
55
|
+
return { namespace, hostId, enrollmentId: rows[0].id, workerId: matching[0].id, lakeshoreId: mount.id,
|
|
56
|
+
lakeshoreSlug: mount.slug, lakeshoreNs: mount.lakeshoreNs, worker: matching[0] };
|
|
57
|
+
}
|
|
58
|
+
export function buildTaskRequestV2(digest, o) {
|
|
59
|
+
if (!QUEUE.test(o.queue) || o.queue === "default")
|
|
60
|
+
throw new Error("--queue must be the target's dedicated (pinned) queue");
|
|
61
|
+
if (!Number.isInteger(o.timeoutSeconds) || o.timeoutSeconds < 1 || o.timeoutSeconds > 86400)
|
|
62
|
+
throw new Error("--timeout-seconds must be 1..86400");
|
|
63
|
+
if (!Number.isInteger(o.attempt) || o.attempt < 1 || o.attempt > 1000)
|
|
64
|
+
throw new Error("--attempt must be 1..1000");
|
|
65
|
+
if (!object(o.inputs))
|
|
66
|
+
throw new Error("--inputs must hold one JSON object");
|
|
67
|
+
if (Buffer.byteLength(canonical(o.inputs)) > INLINE_INPUT_MAX)
|
|
68
|
+
throw new Error(`Inputs exceed ${INLINE_INPUT_MAX} bytes`);
|
|
69
|
+
const target = { hostId: o.target.hostId, enrollmentId: o.target.enrollmentId, workerId: o.target.workerId };
|
|
70
|
+
const taskKey = sha256(canonical({ protocol: TASK_PROTOCOL_V2, executionDigest: digest, queue: o.queue, target,
|
|
71
|
+
timeoutSeconds: o.timeoutSeconds, inputs: o.inputs }));
|
|
72
|
+
return { protocol: TASK_PROTOCOL_V2, executionDigest: digest, queue: o.queue, target, timeoutSeconds: o.timeoutSeconds,
|
|
73
|
+
inputs: o.inputs, attempt: o.attempt, taskKey, invocationId: `bx1-${taskKey.slice(0, 40)}-a${o.attempt}` };
|
|
74
|
+
}
|
|
75
|
+
export async function runBindViaDreamLake(ref, opts, deps = {}) {
|
|
76
|
+
const dir = mkdtempSync(join(tmpdir(), "dreamlake-bind-"));
|
|
77
|
+
try {
|
|
78
|
+
const pin = pinnedReference(ref);
|
|
79
|
+
const { remote, token } = session();
|
|
80
|
+
const base = `/namespaces/${seg(pin.namespace)}`;
|
|
81
|
+
const get = (path) => requestJson(remote, path, { token, redirect: "error" });
|
|
82
|
+
const head = await get(`${base}/runnables/${seg(pin.name)}`);
|
|
83
|
+
const version = await get(`${base}/runnables/${seg(pin.name)}/versions/${pin.version}`);
|
|
84
|
+
if (!object(version?.metadata) || !OID.test(version.metadata.repo_id))
|
|
85
|
+
throw new Error("Version has no version-owned repository binding; register it with a .dreamrc repo first");
|
|
86
|
+
const repo = await get(`${base}/repos/${version.metadata.repo_id}`);
|
|
87
|
+
const { meta } = checkRegisteredVersion(ref, head, version, repo);
|
|
88
|
+
const project = opts.project.replace(/\/+$/, "") || ".";
|
|
89
|
+
const sourcePath = opts.sourcePath ?? (project === "." ? meta.source_file : `${project}/${meta.source_file}`);
|
|
90
|
+
const target = await resolveTarget(opts.target, opts.enrollment, deps);
|
|
91
|
+
if (target.namespace !== pin.namespace)
|
|
92
|
+
throw new Error(`--target must be in namespace ${pin.namespace}`);
|
|
93
|
+
// The exact archive bytes, built locally by the SDK; the server re-checks them.
|
|
94
|
+
const file = join(dir, "archive.tar.gz");
|
|
95
|
+
const built = callBridge("build-snapshot", ["--out", file, ...(opts.config ? ["--config", opts.config] : [])], { ...deps, quiet: opts.json ?? deps.quiet });
|
|
96
|
+
if (!built.ok)
|
|
97
|
+
throw new Error(built.message);
|
|
98
|
+
const described = callBridge("describe-archive", ["--file", file, "--project", project, "--source-path", sourcePath], { ...deps, quiet: true });
|
|
99
|
+
if (!described.ok)
|
|
100
|
+
throw new Error(described.message);
|
|
101
|
+
const d = described.data;
|
|
102
|
+
const bytes = readFileSync(file);
|
|
103
|
+
if (bytes.length > INLINE_ARCHIVE_MAX)
|
|
104
|
+
throw new Error(`The configured archive is ${bytes.length} bytes; DreamLake-submitted executions take at most ${INLINE_ARCHIVE_MAX}`);
|
|
105
|
+
const actual = createHash("sha256").update(bytes).digest("hex");
|
|
106
|
+
if (actual !== d.archive?.sha256 || actual !== built.data?.sha256)
|
|
107
|
+
throw new Error("The built archive changed while describing it");
|
|
108
|
+
if (d.files?.[sourcePath] !== pin.version)
|
|
109
|
+
throw new Error(`${sourcePath} in the archive is not the registered source ${pin.version}`);
|
|
110
|
+
const pythonVersion = opts.python ?? d.pythonVersion;
|
|
111
|
+
if (typeof pythonVersion !== "string" || !VERSION.test(pythonVersion))
|
|
112
|
+
throw new Error("The runtime needs an exact X.Y.Z Python version: commit it in <project>/.python-version or pass --python");
|
|
113
|
+
if (d.pythonVersion && d.pythonVersion !== pythonVersion)
|
|
114
|
+
throw new Error(`--python ${pythonVersion} disagrees with .python-version ${d.pythonVersion}`);
|
|
115
|
+
if (opts.dryRun) {
|
|
116
|
+
emitJson({ status: "dry-run", archive: d.archive, target: { hostId: target.hostId, enrollmentId: target.enrollmentId } });
|
|
117
|
+
return 0;
|
|
118
|
+
}
|
|
119
|
+
const up = await requestJson(remote, `${base}/repos/${seg(repo.id)}/configured-snapshots`, { method: "POST", token, json: {
|
|
120
|
+
lakeshoreId: target.lakeshoreId, hostId: target.hostId, enrollmentId: target.enrollmentId,
|
|
121
|
+
sha256: d.archive.sha256, archive: bytes.toString("base64")
|
|
122
|
+
} });
|
|
123
|
+
if (up?.archive?.sha256 !== d.archive.sha256 || !OID.test(up?.repoSnapshot?.id ?? "") || !OID.test(up?.controlPlane?.codeRepoId ?? ""))
|
|
124
|
+
throw new Error("Unexpected configured-snapshot receipt; inspect before retrying");
|
|
125
|
+
for (const rel of [sourcePath, `${project}/uv.lock`, `${project}/pyproject.toml`].map(p => p.replace(/^\.\//, "")))
|
|
126
|
+
if (up.files?.[rel] !== d.files?.[rel] && d.files?.[rel] !== undefined)
|
|
127
|
+
throw new Error(`Server and local digests differ for ${rel}`);
|
|
128
|
+
const cp = up.controlPlane;
|
|
129
|
+
const binding = buildBinding({ head, version, repo, snapshotRow: up.repoSnapshot, sourcePath, project, pythonVersion,
|
|
130
|
+
described: { origin: cp.origin, namespace: cp.namespace, archive: d.archive, files: d.files,
|
|
131
|
+
codeRepo: { id: cp.codeRepoId, commit: cp.commit, archiveKey: cp.archiveKey, storageName: cp.storageName } } });
|
|
132
|
+
const text = canonical(binding);
|
|
133
|
+
const digest = sha256(text);
|
|
134
|
+
const stored = await requestJson(remote, `${base}/runnables/${seg(head.id)}/executions`, { method: "POST", token, json: { binding, executionDigest: digest } });
|
|
135
|
+
if (stored?.executionDigest !== digest || stored?.canonical !== text)
|
|
136
|
+
throw new Error("Unexpected execution-binding receipt; inspect before retrying");
|
|
137
|
+
const execRef = `exec/${pin.namespace}/${pin.name}@${digest}`;
|
|
138
|
+
if (opts.json)
|
|
139
|
+
emitJson({ status: "bound", ref: execRef, executionDigest: digest, binding });
|
|
140
|
+
else {
|
|
141
|
+
ok(`bound ${execRef}`);
|
|
142
|
+
process.stdout.write(` archive: ${binding.archive.sha256} (${bytes.length} bytes, uploaded through DreamLake)\n` +
|
|
143
|
+
` CodeRepo: ${cp.codeRepoId} (${cp.origin} ${cp.namespace})\n runtime: CPython ${pythonVersion}, uv.lock ${binding.runtime.lockSha256}\n`);
|
|
144
|
+
}
|
|
145
|
+
return 0;
|
|
146
|
+
}
|
|
147
|
+
catch (e) {
|
|
148
|
+
fail(e.message);
|
|
149
|
+
return 1;
|
|
150
|
+
}
|
|
151
|
+
finally {
|
|
152
|
+
rmSync(dir, { recursive: true, force: true });
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
const TERMINAL = new Set(["succeeded", "failed", "cancelled", "timed_out"]);
|
|
156
|
+
export async function runTargetedCommand(command, ref, opts, deps = {}) {
|
|
157
|
+
let request;
|
|
158
|
+
try {
|
|
159
|
+
const { binding } = await readBinding(ref);
|
|
160
|
+
const { digest, namespace } = executionReference(ref);
|
|
161
|
+
const target = await resolveTarget(opts.target, opts.enrollment, deps);
|
|
162
|
+
if (target.namespace !== namespace)
|
|
163
|
+
throw new Error(`--target must be in namespace ${namespace}`);
|
|
164
|
+
if (binding.controlPlane?.namespace !== target.lakeshoreNs)
|
|
165
|
+
throw new Error("The binding names another control plane than the target's connection");
|
|
166
|
+
if (!opts.queue || !opts.inputs)
|
|
167
|
+
throw new Error("--queue and --inputs are required");
|
|
168
|
+
request = buildTaskRequestV2(digest, { queue: opts.queue, target, inputs: JSON.parse(readFileSync(opts.inputs, "utf8")),
|
|
169
|
+
timeoutSeconds: Number(opts.timeoutSeconds ?? 3600), attempt: Number(opts.attempt ?? 1) });
|
|
170
|
+
process.stderr.write(`Invocation: ${request.invocationId}\nTask key: ${request.taskKey}\nAttempt: ${request.attempt}\n`);
|
|
171
|
+
const { remote, token } = session();
|
|
172
|
+
const base = `/namespaces/${seg(namespace)}/runnables/${seg(binding.udf.runnableId)}/executions/${digest}/attempts`;
|
|
173
|
+
if (command === "execute") {
|
|
174
|
+
const sent = await requestJson(remote, base, { method: "POST", token, json: { request } });
|
|
175
|
+
if (sent?.invocationId !== request.invocationId || sent?.taskKey !== request.taskKey)
|
|
176
|
+
throw new Error("Submission receipt does not belong to this request");
|
|
177
|
+
}
|
|
178
|
+
const wait = command === "receipt" ? Number(opts.waitSeconds ?? 0) : opts.wait === false ? 0 : Number(opts.waitSeconds ?? request.timeoutSeconds + 60);
|
|
179
|
+
const deadline = Date.now() + wait * 1000;
|
|
180
|
+
let view;
|
|
181
|
+
for (;;) {
|
|
182
|
+
view = await requestJson(remote, `${base}/${seg(request.invocationId)}`, { token,
|
|
183
|
+
query: { hostId: target.hostId, enrollmentId: target.enrollmentId } });
|
|
184
|
+
if (TERMINAL.has(view?.state) || Date.now() >= deadline)
|
|
185
|
+
break;
|
|
186
|
+
await (deps.sleep ?? (ms => new Promise(r => setTimeout(r, ms))))(2000);
|
|
187
|
+
}
|
|
188
|
+
if (view?.invocationId !== request.invocationId || view?.taskKey !== request.taskKey)
|
|
189
|
+
throw new Error("Receipt does not belong to this request");
|
|
190
|
+
const receipt = object(view.receipt) ? view.receipt : null;
|
|
191
|
+
if (receipt && (receipt.invocationId !== request.invocationId || receipt.taskKey !== request.taskKey || receipt.executionDigest !== digest))
|
|
192
|
+
throw new Error("Stored receipt does not belong to this attempt");
|
|
193
|
+
const status = receipt ? String(receipt.status) : command === "execute" && opts.wait === false ? "submitted" : String(view.state ?? "pending");
|
|
194
|
+
const record = { status, ref, invocationId: request.invocationId, taskKey: request.taskKey, attempt: request.attempt,
|
|
195
|
+
executionDigest: digest, queue: request.queue, target: request.target, workerId: view.workerId ?? null, state: view.state, receipt };
|
|
196
|
+
if (opts.json)
|
|
197
|
+
emitJson(record);
|
|
198
|
+
else {
|
|
199
|
+
ok(`${status} ${request.invocationId}`);
|
|
200
|
+
if (receipt)
|
|
201
|
+
process.stdout.write(JSON.stringify(receipt, null, 2) + "\n");
|
|
202
|
+
else if (!TERMINAL.has(view.state))
|
|
203
|
+
process.stdout.write(" still running; repeat the same command to recover — do not change --attempt\n");
|
|
204
|
+
}
|
|
205
|
+
return status === "succeeded" || status === "submitted" ? 0 : 1;
|
|
206
|
+
}
|
|
207
|
+
catch (e) {
|
|
208
|
+
fail(`${e.message}` + (request ? `\nInvocation: ${request.invocationId}; repeat the same command and inputs to recover` : ""));
|
|
209
|
+
return 1;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import { type BridgeDeps } from "../python.js";
|
|
3
|
+
export declare const BINDING_PROTOCOL = "dreamlake-execution-binding-v1";
|
|
4
|
+
export declare const RUNNER_PROTOCOL = "dreamlake-bound-udf-v1";
|
|
5
|
+
export declare const TASK_PROTOCOL = "dreamlake-bound-task-v1";
|
|
6
|
+
export declare const RUNTIME_ENVIRONMENT = "uv-sync-locked-v1";
|
|
7
|
+
export declare const sha256: (text: string) => string;
|
|
8
|
+
/** Same bytes as Python json.dumps(sort_keys=True, separators=(",", ":"), ensure_ascii=True). */
|
|
9
|
+
export declare function canonical(value: unknown, depth?: number): string;
|
|
10
|
+
/** First dreamlake-lakeshore release with the bound bridge commands. */
|
|
11
|
+
export declare const MIN_BOUND_SDK = "0.5.1";
|
|
12
|
+
/** WHATWG origin, the spelling the SDK bridge compares against. */
|
|
13
|
+
export declare function originOf(server: string): string;
|
|
14
|
+
export declare function executionReference(ref: string): {
|
|
15
|
+
namespace: string;
|
|
16
|
+
name: string;
|
|
17
|
+
digest: string;
|
|
18
|
+
};
|
|
19
|
+
export interface BindOptions {
|
|
20
|
+
snapshot: string;
|
|
21
|
+
server?: string;
|
|
22
|
+
cpNamespace?: string;
|
|
23
|
+
project: string;
|
|
24
|
+
sourcePath?: string;
|
|
25
|
+
python?: string;
|
|
26
|
+
dryRun?: boolean;
|
|
27
|
+
json?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/** Registry reads + checks that need no archive. Mirrors server-side rules. */
|
|
30
|
+
export declare function checkRegisteredVersion(ref: string, head: any, version: any, repo: any): {
|
|
31
|
+
pin: {
|
|
32
|
+
namespace: string;
|
|
33
|
+
name: string;
|
|
34
|
+
version: string;
|
|
35
|
+
};
|
|
36
|
+
meta: Record<string, any>;
|
|
37
|
+
};
|
|
38
|
+
export declare function buildBinding(args: {
|
|
39
|
+
head: any;
|
|
40
|
+
version: any;
|
|
41
|
+
repo: any;
|
|
42
|
+
snapshotRow: any;
|
|
43
|
+
described: Record<string, any>;
|
|
44
|
+
sourcePath: string;
|
|
45
|
+
project: string;
|
|
46
|
+
pythonVersion: string;
|
|
47
|
+
}): Record<string, any>;
|
|
48
|
+
export declare function runBind(ref: string, opts: BindOptions, deps?: BridgeDeps): Promise<number>;
|
|
49
|
+
export interface ExecuteOptions {
|
|
50
|
+
queue?: string;
|
|
51
|
+
inputs?: string;
|
|
52
|
+
attempt?: string;
|
|
53
|
+
invocationId?: string;
|
|
54
|
+
timeoutSeconds?: string;
|
|
55
|
+
waitSeconds?: string;
|
|
56
|
+
server?: string;
|
|
57
|
+
cpNamespace?: string;
|
|
58
|
+
wait?: boolean;
|
|
59
|
+
json?: boolean;
|
|
60
|
+
}
|
|
61
|
+
export declare function buildTaskRequest(digest: string, o: {
|
|
62
|
+
queue: string;
|
|
63
|
+
inputs: unknown;
|
|
64
|
+
timeoutSeconds: number;
|
|
65
|
+
attempt: number;
|
|
66
|
+
invocationId?: string;
|
|
67
|
+
}): {
|
|
68
|
+
protocol: string;
|
|
69
|
+
executionDigest: string;
|
|
70
|
+
queue: string;
|
|
71
|
+
timeoutSeconds: number;
|
|
72
|
+
inputs: Record<string, any>;
|
|
73
|
+
attempt: number;
|
|
74
|
+
taskKey: string;
|
|
75
|
+
invocationId: string;
|
|
76
|
+
};
|
|
77
|
+
/** Read the immutable binding and prove it is the digest the ref names. */
|
|
78
|
+
export declare function readBinding(ref: string): Promise<{
|
|
79
|
+
ref: {
|
|
80
|
+
namespace: string;
|
|
81
|
+
name: string;
|
|
82
|
+
digest: string;
|
|
83
|
+
};
|
|
84
|
+
binding: any;
|
|
85
|
+
text: string;
|
|
86
|
+
}>;
|
|
87
|
+
export declare function runBoundCommand(command: "launch-bound" | "bound-receipt", ref: string, opts: ExecuteOptions, deps?: BridgeDeps): Promise<number>;
|
|
88
|
+
export declare function registerRunnableBound(runnable: Command): void;
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
// `dreamlake runnable bind | execute | execution-receipt` — a registered UDF
|
|
2
|
+
// pinned to ONE configured snapshot and ONE locked runtime, executed on a
|
|
3
|
+
// queue through the existing configured-snapshot runner.
|
|
4
|
+
//
|
|
5
|
+
// bind registry UDF version + control-plane CodeRepo → RepoSnapshot +
|
|
6
|
+
// immutable execution binding (exec/NS/NAME@EXECUTION_DIGEST)
|
|
7
|
+
// execute one attempt of one task, under a stable invocation ID
|
|
8
|
+
// execution-receipt read that attempt's durable result; never submits
|
|
9
|
+
//
|
|
10
|
+
// The registry checks ownership and reference consistency; the SDK worker
|
|
11
|
+
// (dreamlake.lakeshore.bound) checks the delivered archive, lock and runtime.
|
|
12
|
+
// This file computes the same canonical bytes as both — parity is pinned by
|
|
13
|
+
// the shared bound_vectors.json fixture.
|
|
14
|
+
//
|
|
15
|
+
// IDENTITIES, three and never interchangeable: the execution digest (what
|
|
16
|
+
// runs), the task key (digest + queue + timeout + inputs: the business task)
|
|
17
|
+
// and the invocation ID (one attempt). A lost response is recovered by
|
|
18
|
+
// repeating the SAME command: same attempt, same ID, same bytes, which the
|
|
19
|
+
// control plane replays. `--attempt N` is a deliberate new attempt.
|
|
20
|
+
import { createHash } from "node:crypto";
|
|
21
|
+
import { readFileSync } from "node:fs";
|
|
22
|
+
import { HttpError, requestJson } from "../client.js";
|
|
23
|
+
import { resolveRemote, resolveToken } from "../config.js";
|
|
24
|
+
import { emitJson, fail, ok } from "../helpers.js";
|
|
25
|
+
import { callBridge, resolveServer } from "../python.js";
|
|
26
|
+
import { pinnedReference } from "./run.js";
|
|
27
|
+
import { runBindViaDreamLake, runTargetedCommand } from "./bound-target.js";
|
|
28
|
+
export const BINDING_PROTOCOL = "dreamlake-execution-binding-v1";
|
|
29
|
+
export const RUNNER_PROTOCOL = "dreamlake-bound-udf-v1";
|
|
30
|
+
export const TASK_PROTOCOL = "dreamlake-bound-task-v1";
|
|
31
|
+
export const RUNTIME_ENVIRONMENT = "uv-sync-locked-v1";
|
|
32
|
+
const OID = /^[a-f0-9]{24}$/;
|
|
33
|
+
const HEX64 = /^[a-f0-9]{64}$/;
|
|
34
|
+
const VERSION = /^\d+\.\d+\.\d+$/;
|
|
35
|
+
const QUEUE = /^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}$/;
|
|
36
|
+
const INVOCATION = /^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$/;
|
|
37
|
+
const seg = encodeURIComponent;
|
|
38
|
+
const object = (v) => !!v && typeof v === "object" && !Array.isArray(v);
|
|
39
|
+
export const sha256 = (text) => createHash("sha256").update(text, "utf8").digest("hex");
|
|
40
|
+
/** Same bytes as Python json.dumps(sort_keys=True, separators=(",", ":"), ensure_ascii=True). */
|
|
41
|
+
export function canonical(value, depth = 0) {
|
|
42
|
+
if (depth > 64)
|
|
43
|
+
throw new Error("JSON nesting is too deep");
|
|
44
|
+
if (value === null || typeof value === "boolean")
|
|
45
|
+
return JSON.stringify(value);
|
|
46
|
+
if (typeof value === "string")
|
|
47
|
+
return ascii(value);
|
|
48
|
+
if (typeof value === "number") {
|
|
49
|
+
if (!Number.isSafeInteger(value))
|
|
50
|
+
throw new Error("Only safe integers are canonical; encode other numbers as strings");
|
|
51
|
+
return String(value);
|
|
52
|
+
}
|
|
53
|
+
if (Array.isArray(value))
|
|
54
|
+
return `[${value.map(v => canonical(v, depth + 1)).join(",")}]`;
|
|
55
|
+
if (object(value)) {
|
|
56
|
+
const keys = Object.keys(value);
|
|
57
|
+
if (keys.some(k => !/^[\x00-\x7f]*$/.test(k)))
|
|
58
|
+
throw new Error("JSON object keys must be ASCII");
|
|
59
|
+
return `{${keys.sort().map(k => `${ascii(k)}:${canonical(value[k], depth + 1)}`).join(",")}}`;
|
|
60
|
+
}
|
|
61
|
+
throw new Error(`${typeof value} is not JSON`);
|
|
62
|
+
}
|
|
63
|
+
const ascii = (s) => JSON.stringify(s).replace(/[\u007f-]/g, c => `\\u${c.charCodeAt(0).toString(16).padStart(4, "0")}`);
|
|
64
|
+
/** First dreamlake-lakeshore release with the bound bridge commands. */
|
|
65
|
+
export const MIN_BOUND_SDK = "0.5.1";
|
|
66
|
+
// An older SDK's argparse rejects the unknown subcommand with exit 2, which the
|
|
67
|
+
// generic bridge reports as a CLI bug. Name the real cause: the installed SDK.
|
|
68
|
+
function boundBridge(command, argv, deps) {
|
|
69
|
+
const out = callBridge(command, argv, deps);
|
|
70
|
+
if (!out.ok && out.kind === "BridgeArgvError" && out.message.includes(`invalid choice: '${command}'`))
|
|
71
|
+
return { ok: false, message: `the installed dreamlake-lakeshore has no bridge command ${command}; bound executions need ` +
|
|
72
|
+
`dreamlake-lakeshore>=${MIN_BOUND_SDK} on this machine and on the worker — ` +
|
|
73
|
+
`pip install -U "dreamlake-lakeshore>=${MIN_BOUND_SDK}" in the interpreter the CLI uses (DREAMLAKE_PYTHON)` };
|
|
74
|
+
return out;
|
|
75
|
+
}
|
|
76
|
+
/** WHATWG origin, the spelling the SDK bridge compares against. */
|
|
77
|
+
export function originOf(server) {
|
|
78
|
+
const url = new URL(server);
|
|
79
|
+
if (!["http:", "https:"].includes(url.protocol))
|
|
80
|
+
throw new Error(`Not an http(s) control-plane URL: ${server}`);
|
|
81
|
+
return url.origin;
|
|
82
|
+
}
|
|
83
|
+
export function executionReference(ref) {
|
|
84
|
+
const m = /^exec\/([^/]+)\/([^/@]+)@([a-f0-9]{64})$/.exec(ref);
|
|
85
|
+
if (!m)
|
|
86
|
+
throw new Error("Use exec/NAMESPACE/NAME@EXECUTION_DIGEST");
|
|
87
|
+
return { namespace: m[1], name: m[2], digest: m[3] };
|
|
88
|
+
}
|
|
89
|
+
/** Registry reads + checks that need no archive. Mirrors server-side rules. */
|
|
90
|
+
export function checkRegisteredVersion(ref, head, version, repo) {
|
|
91
|
+
const pin = pinnedReference(ref);
|
|
92
|
+
if (!object(head) || head.kind !== "udf" || head.name !== pin.name || !OID.test(head.id) || !OID.test(head.namespaceId) ||
|
|
93
|
+
!object(version) || !OID.test(version.id) || version.runnableId !== head.id || version.version !== pin.version)
|
|
94
|
+
throw new Error("Registry identity mismatch");
|
|
95
|
+
if (typeof version.source !== "string" || sha256(version.source) !== pin.version)
|
|
96
|
+
throw new Error("Registered source digest mismatch");
|
|
97
|
+
const meta = version.metadata;
|
|
98
|
+
if (!object(meta) || !OID.test(meta.repo_id) || !object(repo) || repo.id !== meta.repo_id || repo.namespaceId !== head.namespaceId)
|
|
99
|
+
throw new Error("Version needs version-owned repo_id metadata for this namespace's repository");
|
|
100
|
+
if (typeof meta.entrypoint !== "string" || typeof meta.source_file !== "string" ||
|
|
101
|
+
meta.source_file !== meta.entrypoint.split(":")[0].replaceAll(".", "/") + ".py")
|
|
102
|
+
throw new Error("Version needs matching source_file and module:function entrypoint metadata");
|
|
103
|
+
return { pin, meta };
|
|
104
|
+
}
|
|
105
|
+
export function buildBinding(args) {
|
|
106
|
+
const { head, version, repo, snapshotRow, described, sourcePath, project, pythonVersion } = args;
|
|
107
|
+
const cr = described.codeRepo, archive = described.archive, files = described.files;
|
|
108
|
+
const lockPath = project === "." ? "uv.lock" : `${project}/uv.lock`;
|
|
109
|
+
const pyprojectPath = project === "." ? "pyproject.toml" : `${project}/pyproject.toml`;
|
|
110
|
+
return {
|
|
111
|
+
protocol: BINDING_PROTOCOL,
|
|
112
|
+
namespace: { id: head.namespaceId },
|
|
113
|
+
udf: { runnableId: head.id, name: head.name, versionId: version.id, version: version.version,
|
|
114
|
+
sourceFile: version.metadata.source_file, entrypoint: version.metadata.entrypoint, archivePath: sourcePath },
|
|
115
|
+
repo: { id: repo.id, remote: repo.remote },
|
|
116
|
+
repoSnapshot: { id: snapshotRow.id },
|
|
117
|
+
archive: { sha256: archive.sha256, format: archive.format },
|
|
118
|
+
controlPlane: { origin: described.origin, namespace: described.namespace, codeRepoId: cr.id, commit: cr.commit,
|
|
119
|
+
archiveKey: cr.archiveKey, storageName: cr.storageName },
|
|
120
|
+
runtime: { environment: RUNTIME_ENVIRONMENT, implementation: "CPython", pythonVersion, projectPath: project,
|
|
121
|
+
lockSha256: files[lockPath], pyprojectSha256: files[pyprojectPath] },
|
|
122
|
+
runner: { protocol: RUNNER_PROTOCOL },
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
export async function runBind(ref, opts, deps = {}) {
|
|
126
|
+
try {
|
|
127
|
+
const pin = pinnedReference(ref);
|
|
128
|
+
if (!OID.test(opts.snapshot))
|
|
129
|
+
throw new Error("--snapshot must be the 24-hex configured CodeRepo id printed by `dreamlake snapshot`");
|
|
130
|
+
const server = resolveServer(opts.server);
|
|
131
|
+
if (!server)
|
|
132
|
+
throw new Error("no control plane — pass --server or set LAKESHORE_URL");
|
|
133
|
+
const cpNamespace = opts.cpNamespace || process.env.LAKESHORE_NAMESPACE || pin.namespace;
|
|
134
|
+
const token = resolveToken();
|
|
135
|
+
if (!token)
|
|
136
|
+
throw new Error("Log in to DreamLake first");
|
|
137
|
+
const remote = resolveRemote();
|
|
138
|
+
const base = `/namespaces/${seg(pin.namespace)}`;
|
|
139
|
+
const get = (path) => requestJson(remote, path, { token, redirect: "error" });
|
|
140
|
+
const head = await get(`${base}/runnables/${seg(pin.name)}`);
|
|
141
|
+
const version = await get(`${base}/runnables/${seg(pin.name)}/versions/${pin.version}`);
|
|
142
|
+
if (!object(version?.metadata) || !OID.test(version.metadata.repo_id))
|
|
143
|
+
throw new Error("Version has no version-owned repository binding; register it with a .dreamrc repo first");
|
|
144
|
+
const repo = await get(`${base}/repos/${version.metadata.repo_id}`);
|
|
145
|
+
const { meta } = checkRegisteredVersion(ref, head, version, repo);
|
|
146
|
+
const project = opts.project.replace(/\/+$/, "") || ".";
|
|
147
|
+
const sourcePath = opts.sourcePath ?? (project === "." ? meta.source_file : `${project}/${meta.source_file}`);
|
|
148
|
+
// Content comes from the STORED archive, downloaded and verified by the SDK.
|
|
149
|
+
const out = boundBridge("describe-snapshot", ["--server", server, "--namespace", cpNamespace, "--snapshot", opts.snapshot,
|
|
150
|
+
"--project", project, "--source-path", sourcePath], { ...deps, quiet: opts.json ?? deps.quiet });
|
|
151
|
+
if (!out.ok)
|
|
152
|
+
throw new Error(out.message);
|
|
153
|
+
const described = out.data;
|
|
154
|
+
if (described.files?.[sourcePath] !== pin.version)
|
|
155
|
+
throw new Error(`${sourcePath} in snapshot ${opts.snapshot} is not the registered source ${pin.version}`);
|
|
156
|
+
const pythonVersion = opts.python ?? described.pythonVersion;
|
|
157
|
+
if (typeof pythonVersion !== "string" || !VERSION.test(pythonVersion))
|
|
158
|
+
throw new Error("The runtime needs an exact X.Y.Z Python version: commit it in <project>/.python-version or pass --python");
|
|
159
|
+
if (described.pythonVersion && described.pythonVersion !== pythonVersion)
|
|
160
|
+
throw new Error(`--python ${pythonVersion} disagrees with the snapshot's .python-version ${described.pythonVersion}`);
|
|
161
|
+
const cr = described.codeRepo;
|
|
162
|
+
const snapshotBody = { commit: described.archive.sha256, backend: "s3", archiveKey: cr.archiveKey,
|
|
163
|
+
storageName: cr.storageName, sizeBytes: described.archive.sizeBytes,
|
|
164
|
+
metadata: { controlPlane: { origin: described.origin, namespace: described.namespace, codeRepoId: cr.id } } };
|
|
165
|
+
if (opts.dryRun) {
|
|
166
|
+
const preview = buildBinding({ head, version, repo, snapshotRow: { id: "(registered on bind)" }, described,
|
|
167
|
+
sourcePath, project, pythonVersion });
|
|
168
|
+
emitJson({ status: "dry-run", repoSnapshot: snapshotBody, binding: preview });
|
|
169
|
+
return 0;
|
|
170
|
+
}
|
|
171
|
+
const snapshotRow = await requestJson(remote, `${base}/repos/${repo.id}/snapshots`, { method: "POST", token, json: snapshotBody });
|
|
172
|
+
if (!object(snapshotRow) || !OID.test(snapshotRow.id) || snapshotRow.commit !== snapshotBody.commit ||
|
|
173
|
+
snapshotRow.backend !== "s3" || snapshotRow.archiveKey !== cr.archiveKey || snapshotRow.storageName !== cr.storageName)
|
|
174
|
+
throw new Error("An existing RepoSnapshot for this archive differs from the control-plane CodeRepo; inspect it before binding");
|
|
175
|
+
const binding = buildBinding({ head, version, repo, snapshotRow, described, sourcePath, project, pythonVersion });
|
|
176
|
+
const text = canonical(binding);
|
|
177
|
+
const digest = sha256(text);
|
|
178
|
+
const stored = await requestJson(remote, `${base}/runnables/${seg(head.id)}/executions`, { method: "POST", token, json: { binding, executionDigest: digest } });
|
|
179
|
+
if (stored?.executionDigest !== digest || stored?.canonical !== text)
|
|
180
|
+
throw new Error("Unexpected execution-binding receipt; inspect before retrying");
|
|
181
|
+
const execRef = `exec/${pin.namespace}/${pin.name}@${digest}`;
|
|
182
|
+
if (opts.json)
|
|
183
|
+
emitJson({ status: "bound", ref: execRef, executionDigest: digest, binding });
|
|
184
|
+
else {
|
|
185
|
+
ok(`bound ${execRef}`);
|
|
186
|
+
process.stdout.write(` archive: ${binding.archive.sha256}\n CodeRepo: ${cr.id} (${described.origin} ${described.namespace})\n` +
|
|
187
|
+
` runtime: CPython ${pythonVersion}, uv.lock ${binding.runtime.lockSha256}\n`);
|
|
188
|
+
}
|
|
189
|
+
return 0;
|
|
190
|
+
}
|
|
191
|
+
catch (e) {
|
|
192
|
+
fail(e instanceof HttpError ? e.message : e.message);
|
|
193
|
+
return 1;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
export function buildTaskRequest(digest, o) {
|
|
197
|
+
if (!QUEUE.test(o.queue))
|
|
198
|
+
throw new Error("--queue must be a queue name");
|
|
199
|
+
if (!Number.isInteger(o.timeoutSeconds) || o.timeoutSeconds < 1 || o.timeoutSeconds > 86400)
|
|
200
|
+
throw new Error("--timeout-seconds must be 1..86400");
|
|
201
|
+
if (!Number.isInteger(o.attempt) || o.attempt < 1 || o.attempt > 1000)
|
|
202
|
+
throw new Error("--attempt must be 1..1000");
|
|
203
|
+
if (!object(o.inputs))
|
|
204
|
+
throw new Error("--inputs must hold one JSON object");
|
|
205
|
+
if (Buffer.byteLength(canonical(o.inputs)) > 256 * 1024)
|
|
206
|
+
throw new Error("Inputs exceed 256 KiB");
|
|
207
|
+
const taskKey = sha256(canonical({ protocol: TASK_PROTOCOL, executionDigest: digest, queue: o.queue,
|
|
208
|
+
timeoutSeconds: o.timeoutSeconds, inputs: o.inputs }));
|
|
209
|
+
const invocationId = o.invocationId ?? `bx1-${taskKey.slice(0, 40)}-a${o.attempt}`;
|
|
210
|
+
if (!INVOCATION.test(invocationId))
|
|
211
|
+
throw new Error("--invocation-id must match [A-Za-z0-9][A-Za-z0-9_.:-]{0,127}");
|
|
212
|
+
return { protocol: TASK_PROTOCOL, executionDigest: digest, queue: o.queue, timeoutSeconds: o.timeoutSeconds,
|
|
213
|
+
inputs: o.inputs, attempt: o.attempt, taskKey, invocationId };
|
|
214
|
+
}
|
|
215
|
+
/** Read the immutable binding and prove it is the digest the ref names. */
|
|
216
|
+
export async function readBinding(ref) {
|
|
217
|
+
const r = executionReference(ref);
|
|
218
|
+
const token = resolveToken();
|
|
219
|
+
if (!token)
|
|
220
|
+
throw new Error("Log in to DreamLake first");
|
|
221
|
+
const row = await requestJson(resolveRemote(), `/namespaces/${seg(r.namespace)}/runnables/${seg(r.name)}/executions/${r.digest}`, { token, redirect: "error" });
|
|
222
|
+
if (typeof row?.canonical !== "string" || sha256(row.canonical) !== r.digest)
|
|
223
|
+
throw new Error("Registry returned a binding that does not hash to its digest");
|
|
224
|
+
const binding = JSON.parse(row.canonical);
|
|
225
|
+
if (canonical(binding) !== row.canonical || binding.protocol !== BINDING_PROTOCOL || binding.udf?.name !== r.name)
|
|
226
|
+
throw new Error("Registry binding is not a canonical binding for this runnable");
|
|
227
|
+
return { ref: r, binding, text: row.canonical };
|
|
228
|
+
}
|
|
229
|
+
function target(binding, opts) {
|
|
230
|
+
const cp = binding.controlPlane;
|
|
231
|
+
// Never default to the binding's origin: the bridge attaches the caller's
|
|
232
|
+
// control-plane token, so the caller must choose the server explicitly and
|
|
233
|
+
// the binding can only be checked against it, not redirect it.
|
|
234
|
+
const server = resolveServer(opts.server);
|
|
235
|
+
if (!server)
|
|
236
|
+
throw new Error(`no control plane — pass --server or set LAKESHORE_URL (this binding targets ${cp.origin})`);
|
|
237
|
+
if (originOf(server) !== cp.origin)
|
|
238
|
+
throw new Error(`Binding targets control plane ${cp.origin}, not ${originOf(server)}`);
|
|
239
|
+
const ns = opts.cpNamespace || cp.namespace;
|
|
240
|
+
if (ns !== cp.namespace)
|
|
241
|
+
throw new Error(`Binding targets control-plane namespace ${cp.namespace}, not ${ns}`);
|
|
242
|
+
return { server, ns };
|
|
243
|
+
}
|
|
244
|
+
function requestFrom(digest, opts) {
|
|
245
|
+
if (!opts.queue)
|
|
246
|
+
throw new Error("--queue is required: a bound execution names its queue explicitly");
|
|
247
|
+
if (!opts.inputs)
|
|
248
|
+
throw new Error("--inputs <file> is required (one JSON object)");
|
|
249
|
+
return buildTaskRequest(digest, { queue: opts.queue, inputs: JSON.parse(readFileSync(opts.inputs, "utf8")),
|
|
250
|
+
timeoutSeconds: Number(opts.timeoutSeconds ?? 3600), attempt: Number(opts.attempt ?? 1), invocationId: opts.invocationId });
|
|
251
|
+
}
|
|
252
|
+
export async function runBoundCommand(command, ref, opts, deps = {}) {
|
|
253
|
+
let request;
|
|
254
|
+
try {
|
|
255
|
+
const { binding, text } = await readBinding(ref);
|
|
256
|
+
const { server, ns } = target(binding, opts);
|
|
257
|
+
request = requestFrom(executionReference(ref).digest, opts);
|
|
258
|
+
// The recoverable identity is printed BEFORE anything is submitted.
|
|
259
|
+
process.stderr.write(`Invocation: ${request.invocationId}\nTask key: ${request.taskKey}\nAttempt: ${request.attempt}\n`);
|
|
260
|
+
const wait = command === "bound-receipt" ? Number(opts.waitSeconds ?? 0) : Number(opts.waitSeconds ?? request.timeoutSeconds + 60);
|
|
261
|
+
const out = boundBridge(command, ["--server", server, "--namespace", ns, "--binding", text,
|
|
262
|
+
"--request", canonical(request), "--timeout", String(wait),
|
|
263
|
+
...(command === "launch-bound" && opts.wait === false ? ["--no-wait"] : [])], { ...deps, quiet: opts.json ?? deps.quiet });
|
|
264
|
+
if (!out.ok)
|
|
265
|
+
throw new Error(out.message);
|
|
266
|
+
const d = out.data;
|
|
267
|
+
if (d.invocationId !== request.invocationId || d.executionDigest !== request.executionDigest || d.taskKey !== request.taskKey)
|
|
268
|
+
throw new Error("Bridge result does not belong to this request");
|
|
269
|
+
const receipt = object(d.receipt) ? d.receipt : null;
|
|
270
|
+
const status = receipt ? String(receipt.status) : command === "launch-bound" && opts.wait === false ? "submitted" : "pending";
|
|
271
|
+
const record = { status, ref, invocationId: request.invocationId, taskKey: request.taskKey, attempt: request.attempt,
|
|
272
|
+
executionDigest: request.executionDigest, queue: request.queue, receipt };
|
|
273
|
+
if (opts.json)
|
|
274
|
+
emitJson(record);
|
|
275
|
+
else {
|
|
276
|
+
ok(`${status} ${request.invocationId}`);
|
|
277
|
+
if (receipt)
|
|
278
|
+
process.stdout.write(JSON.stringify(receipt, null, 2) + "\n");
|
|
279
|
+
if (status === "pending")
|
|
280
|
+
process.stdout.write(` still running; repeat the same command to recover — do not change --attempt\n`);
|
|
281
|
+
}
|
|
282
|
+
return status === "succeeded" || status === "submitted" ? 0 : 1;
|
|
283
|
+
}
|
|
284
|
+
catch (e) {
|
|
285
|
+
fail(`${e.message}` + (request ? `\nInvocation: ${request.invocationId}; repeat the same command and inputs to recover` : ""));
|
|
286
|
+
return 1;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
// ─── registration ────────────────────────────────────────────────────────────
|
|
290
|
+
export function registerRunnableBound(runnable) {
|
|
291
|
+
runnable.command("bind <ref>")
|
|
292
|
+
.description("bind a registered UDF version to one configured snapshot and locked runtime (immutable execution binding)")
|
|
293
|
+
.option("--snapshot <id>", "24-hex configured CodeRepo id from `dreamlake snapshot` (control-plane path)")
|
|
294
|
+
.option("--target <host>", "namespace/group/host you own: build this checkout's configured archive and upload it through DreamLake (no control-plane credential)")
|
|
295
|
+
.option("--enrollment <id>", "with --target: the host enrollment, when it has more than one")
|
|
296
|
+
.option("--config <path>", "with --target: explicit .dreamrc (default: walk up from the current directory)")
|
|
297
|
+
.requiredOption("--project <path>", "snapshot code path holding pyproject.toml, uv.lock and .python-version")
|
|
298
|
+
.option("--source-path <path>", "snapshot code path of the registered source (default: <project>/<source_file>)")
|
|
299
|
+
.option("--python <X.Y.Z>", "exact CPython version (default: <project>/.python-version in the snapshot)")
|
|
300
|
+
.option("--server <url>", "control plane base URL (default: $LAKESHORE_URL)")
|
|
301
|
+
.option("--cp-namespace <slug>", "control-plane namespace (default: $LAKESHORE_NAMESPACE, else the registry namespace)")
|
|
302
|
+
.option("--dry-run", "verify and print the binding without registry writes")
|
|
303
|
+
.option("--json", "emit JSON")
|
|
304
|
+
.action(async (ref, opts) => {
|
|
305
|
+
if (opts.target && (opts.snapshot || opts.server || opts.cpNamespace)) {
|
|
306
|
+
fail("--target uploads through DreamLake; do not combine it with --snapshot, --server or --cp-namespace");
|
|
307
|
+
process.exitCode = 1;
|
|
308
|
+
}
|
|
309
|
+
else if (opts.target)
|
|
310
|
+
process.exitCode = await runBindViaDreamLake(ref, opts);
|
|
311
|
+
else if (!opts.snapshot) {
|
|
312
|
+
fail("pass --snapshot <CodeRepo id> (control-plane path) or --target <namespace/group/host>");
|
|
313
|
+
process.exitCode = 1;
|
|
314
|
+
}
|
|
315
|
+
else
|
|
316
|
+
process.exitCode = await runBind(ref, opts);
|
|
317
|
+
});
|
|
318
|
+
for (const [name, command, description] of [
|
|
319
|
+
["execute", "launch-bound", "submit one attempt of a bound execution to a queue and wait for its receipt"],
|
|
320
|
+
["execution-receipt", "bound-receipt", "read one attempt's durable receipt without submitting"],
|
|
321
|
+
]) {
|
|
322
|
+
const c = runnable.command(`${name} <ref>`).description(description)
|
|
323
|
+
.requiredOption("--queue <name>", "queue the attempt runs on (part of the task key)")
|
|
324
|
+
.requiredOption("--inputs <file>", "one JSON object passed to the UDF (part of the task key)")
|
|
325
|
+
.option("--attempt <n>", "attempt number; a new number is a deliberate new attempt", "1")
|
|
326
|
+
.option("--invocation-id <id>", "explicit attempt ID instead of the derived bx1-<task key>-a<attempt>")
|
|
327
|
+
.option("--timeout-seconds <s>", "worker execution timeout (part of the task key)", "3600")
|
|
328
|
+
.option("--wait-seconds <s>", name === "execute" ? "client wait (default: timeout + 60)" : "client wait (default: 0, read once)")
|
|
329
|
+
.option("--server <url>", "control plane base URL (default: $LAKESHORE_URL; must equal the binding's origin)")
|
|
330
|
+
.option("--cp-namespace <slug>", "control-plane namespace (default: the binding's)")
|
|
331
|
+
.option("--target <host>", "namespace/group/host you own: run through DreamLake on that host's pinned queue (no control-plane credential)")
|
|
332
|
+
.option("--enrollment <id>", "with --target: the host enrollment, when it has more than one")
|
|
333
|
+
.option("--json", "emit JSON");
|
|
334
|
+
if (name === "execute")
|
|
335
|
+
c.option("--no-wait", "return after durable submission");
|
|
336
|
+
c.action(async (ref, opts) => {
|
|
337
|
+
if (opts.target && (opts.server || opts.cpNamespace || opts.invocationId)) {
|
|
338
|
+
fail("--target runs through DreamLake; do not combine it with --server, --cp-namespace or --invocation-id");
|
|
339
|
+
process.exitCode = 1;
|
|
340
|
+
}
|
|
341
|
+
else if (opts.target)
|
|
342
|
+
process.exitCode = await runTargetedCommand(name === "execute" ? "execute" : "receipt", ref, opts);
|
|
343
|
+
else
|
|
344
|
+
process.exitCode = await runBoundCommand(command, ref, opts);
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
}
|
|
@@ -31,6 +31,7 @@ import { resolveNamespace, resolveRemote, resolveToken } from "../config.js";
|
|
|
31
31
|
import { emitJson, fail, ok, renderTable, warn } from "../helpers.js";
|
|
32
32
|
import { namespaceFromPath, resolveRunnablePath } from "./path.js";
|
|
33
33
|
import { registerRunnableRun } from "./run.js";
|
|
34
|
+
import { registerRunnableBound } from "./bound.js";
|
|
34
35
|
// ─── shared context resolution ───────────────────────────────────────────────
|
|
35
36
|
async function ctx(nsFlag) {
|
|
36
37
|
const token = resolveToken();
|
|
@@ -457,6 +458,7 @@ export function registerRunnableCommand(program) {
|
|
|
457
458
|
.command("runnable")
|
|
458
459
|
.description("browse runnables (udf | session | agent), their versions, and import them");
|
|
459
460
|
registerRunnableRun(runnable);
|
|
461
|
+
registerRunnableBound(runnable);
|
|
460
462
|
collectionList(runnable, "list")
|
|
461
463
|
.description("list runnables in a namespace")
|
|
462
464
|
.option("--kind <kind>", "filter by lifetime: udf | session | agent")
|
package/dist/cli/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.94.0";
|
package/dist/cli/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dreamlake/dreamlake-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.94.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dreamlake-ai/dreamlake-cli.git"
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
"node": ">=18"
|
|
36
36
|
},
|
|
37
37
|
"optionalDependencies": {
|
|
38
|
-
"@dreamlake/dreamlake-cli-darwin-arm64": "0.
|
|
39
|
-
"@dreamlake/dreamlake-cli-darwin-x64": "0.
|
|
40
|
-
"@dreamlake/dreamlake-cli-linux-x64": "0.
|
|
41
|
-
"@dreamlake/dreamlake-cli-linux-arm64": "0.
|
|
42
|
-
"@dreamlake/dreamlake-cli-linux-x64-musl": "0.
|
|
43
|
-
"@dreamlake/dreamlake-cli-linux-arm64-musl": "0.
|
|
44
|
-
"@dreamlake/dreamlake-cli-win32-x64": "0.
|
|
45
|
-
"@dreamlake/dreamlake-cli-win32-arm64": "0.
|
|
38
|
+
"@dreamlake/dreamlake-cli-darwin-arm64": "0.94.0",
|
|
39
|
+
"@dreamlake/dreamlake-cli-darwin-x64": "0.94.0",
|
|
40
|
+
"@dreamlake/dreamlake-cli-linux-x64": "0.94.0",
|
|
41
|
+
"@dreamlake/dreamlake-cli-linux-arm64": "0.94.0",
|
|
42
|
+
"@dreamlake/dreamlake-cli-linux-x64-musl": "0.94.0",
|
|
43
|
+
"@dreamlake/dreamlake-cli-linux-arm64-musl": "0.94.0",
|
|
44
|
+
"@dreamlake/dreamlake-cli-win32-x64": "0.94.0",
|
|
45
|
+
"@dreamlake/dreamlake-cli-win32-arm64": "0.94.0"
|
|
46
46
|
}
|
|
47
47
|
}
|