@dreamlake/dreamlake-cli 0.123.0 → 0.124.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.
@@ -91,8 +91,10 @@ export interface CictRun {
91
91
  reason: string;
92
92
  };
93
93
  /** A DreamLake GPU job waiting for a slot: 1 is next. */
94
+ /** A waiting DreamLake GPU job; `held` says why it cannot start yet. */
94
95
  queue?: {
95
96
  position: number;
97
+ held?: string;
96
98
  } | null;
97
99
  /** GPU time a finished DreamLake GPU run used. */
98
100
  usage?: {
@@ -192,10 +194,18 @@ export interface CictPlatformAccess {
192
194
  } | null;
193
195
  authorizedByUserId: string | null;
194
196
  }
197
+ /** Whose edit right admits evidence writes; jobs wait while `writable` is false. */
198
+ export interface CictAuthorizer {
199
+ userId: string;
200
+ name: string | null;
201
+ writable: boolean;
202
+ }
195
203
  export interface CictPlatformStatus {
196
204
  available: boolean;
197
205
  machines: CictPlatformMachine[];
198
206
  access: CictPlatformAccess | null;
207
+ /** Absent from older servers. */
208
+ authorizer?: CictAuthorizer | null;
199
209
  running: number;
200
210
  waiting: number;
201
211
  monthGpuSeconds: number;
@@ -74,7 +74,7 @@ function runLine(run) {
74
74
  const where = run.routing.kind === "matched" ? run.routing.pool.name
75
75
  : run.routing.kind === "platform" ? run.routing.machine.label
76
76
  : run.routing.kind === "rejected" || run.routing.kind === "refused" ? `${run.routing.kind}:${run.routing.reason}` : run.routing.kind;
77
- const state = run.queue ? `queued #${run.queue.position}` : outcome(run);
77
+ const state = run.queue?.held ? "held: re-authorize" : run.queue ? `queued #${run.queue.position}` : outcome(run);
78
78
  return [run.id, state.padEnd(11), run.repository.fullName, run.name ?? "", run.headSha?.slice(0, 7) ?? "", where, run.evidence?.state ?? "-"].join(" ");
79
79
  }
80
80
  function runText(run) {
@@ -83,7 +83,7 @@ function runText(run) {
83
83
  ` status ${outcome(run)}`,
84
84
  ` commit ${run.headSha ?? "-"}${run.headBranch ? ` on ${run.headBranch}` : ""}`,
85
85
  ` github ${run.githubUrl}`,
86
- ` routing ${run.routing.kind === "matched" ? `pool ${run.routing.pool.name}` : run.routing.kind === "platform" ? `DreamLake GPU ${run.routing.machine.label}${run.queue ? ` · queued #${run.queue.position}` : ""}` : run.routing.kind === "refused" ? `not started: ${run.routing.reason}` : run.routing.kind}`,
86
+ ` routing ${run.routing.kind === "matched" ? `pool ${run.routing.pool.name}` : run.routing.kind === "platform" ? `DreamLake GPU ${run.routing.machine.label}${run.queue?.held ? " · waiting for re-authorization (dl cict platform source)" : run.queue ? ` · queued #${run.queue.position}` : ""}` : run.routing.kind === "refused" ? `not started: ${run.routing.reason}` : run.routing.kind}`,
87
87
  ...(run.sender ? [` by ${run.sender}`] : []),
88
88
  ...(run.usage ? [` GPU time ${gpuMinutes(run.usage.gpuSeconds)}`] : []),
89
89
  ...(run.comparison ? [` baseline ${run.comparison.baseline ? `${run.comparison.regressions} regressed, ${run.comparison.fixes} fixed vs ${run.comparison.baseline.branch}` : "none yet"}`] : []),
@@ -216,7 +216,9 @@ export function registerCictCommand(program) {
216
216
  return [
217
217
  `DreamLake GPU: ${state}`,
218
218
  ...(a?.state === "active" ? [` running ${st.running} of ${a.maxConcurrent} · queued ${st.waiting} · this month ${gpuMinutes(st.monthGpuSeconds)}`,
219
- ` results: source ${a.evidence?.sourceId} / ${a.evidence?.prefix}`] : []),
219
+ ` results: source ${a.evidence?.sourceId} / ${a.evidence?.prefix}`,
220
+ ...(st.authorizer ? [` authorized by ${st.authorizer.name ?? st.authorizer.userId}${st.authorizer.writable ? ""
221
+ : ` — can no longer write; jobs wait until a namespace admin runs: dl cict platform source ${ns} --source ${a.evidence?.sourceId}`}`] : [])] : []),
220
222
  "Machines:",
221
223
  ...st.machines.map((m) => ` ${m.label} ${m.spec.gpus}x ${m.spec.gpu} · ${m.spec.cpus} CPU · ${m.spec.memGiB} GB · ${m.spec.timeLimit}`),
222
224
  ].join("\n");
@@ -229,7 +231,7 @@ export function registerCictCommand(program) {
229
231
  throw new Error("--source must be a 24-character Source ID");
230
232
  return api(ns).platform.start(opts.source);
231
233
  }, (r) => `DreamLake GPU in use; results go to ${r.source.name}.`));
232
- platform.command("source <namespace>").description("change where DreamLake GPU runs save results")
234
+ platform.command("source <namespace>").description("change where DreamLake GPU runs save results; the same Source re-authorizes (you become the authorizer)")
233
235
  .requiredOption("--source <id>", "a Source you can edit")
234
236
  .option("--json")
235
237
  .action((ns, opts) => execute(opts, () => {
@@ -249,7 +251,7 @@ export function registerCictCommand(program) {
249
251
  .option("--json")
250
252
  .action((opts) => execute(opts, () => adminApi().overview(), (o) => [
251
253
  "Namespaces:",
252
- ...o.namespaces.map((n) => ` ${n.slug ?? n.namespaceId} ${n.state} limit ${n.maxConcurrent} running ${n.running} queued ${n.waiting} ${gpuMinutes(n.monthGpuSeconds)}`),
254
+ ...o.namespaces.map((n) => ` ${n.slug ?? n.namespaceId} ${n.state}${n.authorizer && !n.authorizer.writable ? " (needs re-authorization)" : ""} limit ${n.maxConcurrent} running ${n.running} queued ${n.waiting} ${gpuMinutes(n.monthGpuSeconds)}`),
253
255
  "Machines:",
254
256
  ...o.machines.map((m) => ` ${m.id} ${m.label} ${m.enabled ? "enabled" : "disabled"} limit ${m.maxConcurrent} provider ${m.providerId}`),
255
257
  ].join("\n")));
@@ -1 +1 @@
1
- export declare const VERSION = "0.123.0";
1
+ export declare const VERSION = "0.124.0";
@@ -6,4 +6,4 @@
6
6
  // value means a binary that re-installs the same version forever.
7
7
  //
8
8
  // Editing this by hand does nothing for a release; bump package.json.
9
- export const VERSION = "0.123.0";
9
+ export const VERSION = "0.124.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreamlake/dreamlake-cli",
3
- "version": "0.123.0",
3
+ "version": "0.124.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dreamlake-ai/dreamlake-cli.git"
@@ -37,13 +37,13 @@
37
37
  "node": ">=18"
38
38
  },
39
39
  "optionalDependencies": {
40
- "@dreamlake/dreamlake-cli-darwin-arm64": "0.123.0",
41
- "@dreamlake/dreamlake-cli-darwin-x64": "0.123.0",
42
- "@dreamlake/dreamlake-cli-linux-x64": "0.123.0",
43
- "@dreamlake/dreamlake-cli-linux-arm64": "0.123.0",
44
- "@dreamlake/dreamlake-cli-linux-x64-musl": "0.123.0",
45
- "@dreamlake/dreamlake-cli-linux-arm64-musl": "0.123.0",
46
- "@dreamlake/dreamlake-cli-win32-x64": "0.123.0",
47
- "@dreamlake/dreamlake-cli-win32-arm64": "0.123.0"
40
+ "@dreamlake/dreamlake-cli-darwin-arm64": "0.124.0",
41
+ "@dreamlake/dreamlake-cli-darwin-x64": "0.124.0",
42
+ "@dreamlake/dreamlake-cli-linux-x64": "0.124.0",
43
+ "@dreamlake/dreamlake-cli-linux-arm64": "0.124.0",
44
+ "@dreamlake/dreamlake-cli-linux-x64-musl": "0.124.0",
45
+ "@dreamlake/dreamlake-cli-linux-arm64-musl": "0.124.0",
46
+ "@dreamlake/dreamlake-cli-win32-x64": "0.124.0",
47
+ "@dreamlake/dreamlake-cli-win32-arm64": "0.124.0"
48
48
  }
49
49
  }