@dreamlake/dreamlake-cli 0.125.4 → 0.126.1

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.
@@ -223,6 +223,43 @@ export interface CictUsageRun {
223
223
  gpuSeconds: number;
224
224
  completedAt: string;
225
225
  }
226
+ /** One setup step: done or not, and how to do it in the UI, CLI and API. */
227
+ export interface CictOnboardingStep {
228
+ key: string;
229
+ title: string;
230
+ /** null when it cannot be known yet. */
231
+ done: boolean | null;
232
+ detail: string;
233
+ how?: {
234
+ ui?: string;
235
+ cli?: string;
236
+ api?: string;
237
+ human?: string;
238
+ };
239
+ }
240
+ /** Where a namespace stands on CI/CT and the next step. */
241
+ export interface CictOnboarding {
242
+ ready: boolean;
243
+ readyVia: "dreamlake-gpu" | "own-machines" | null;
244
+ /** The route being followed: DreamLake GPU once enabled, else own machines. */
245
+ route: "dreamlake-gpu" | "own-machines";
246
+ next: {
247
+ key: string;
248
+ title: string;
249
+ how: CictOnboardingStep["how"] | null;
250
+ } | null;
251
+ /** Once ready: the runs-on labels and the evidence contract. */
252
+ workflow: string | null;
253
+ /** Person-only steps that can happen alongside `next`; absent from older servers. */
254
+ alsoNeeded?: Array<{
255
+ key: string;
256
+ title: string;
257
+ how: CictOnboardingStep["how"] | null;
258
+ }>;
259
+ github: CictOnboardingStep;
260
+ platform: CictOnboardingStep[];
261
+ ownMachines: CictOnboardingStep[];
262
+ }
226
263
  export interface CictUsage {
227
264
  month: string;
228
265
  gpuSeconds: number;
@@ -307,6 +344,12 @@ export declare function cictApi(t: Transport, namespace: string, fetchImpl?: typ
307
344
  sender?: string;
308
345
  limit?: number;
309
346
  }) => Promise<CictUsage>;
347
+ /**
348
+ * Where the namespace stands on CI/CT: GitHub, DreamLake GPU and the
349
+ * own-machine steps, each done or not, and the next step with UI, CLI
350
+ * and API hints. Only installing the GitHub App needs a person.
351
+ */
352
+ onboarding: () => Promise<CictOnboarding>;
310
353
  github: {
311
354
  /** GitHub App installations bound to this namespace. */
312
355
  installations: () => Promise<CictInstallation[]>;
package/dist/api/cict.js CHANGED
@@ -87,6 +87,12 @@ export function cictApi(t, namespace, fetchImpl) {
87
87
  ...(month ? { month } : {}), ...(options.sender ? { sender: options.sender } : {}), ...(options.limit ? { limit: String(options.limit) } : {}),
88
88
  });
89
89
  },
90
+ /**
91
+ * Where the namespace stands on CI/CT: GitHub, DreamLake GPU and the
92
+ * own-machine steps, each done or not, and the next step with UI, CLI
93
+ * and API hints. Only installing the GitHub App needs a person.
94
+ */
95
+ onboarding: () => call(t, "GET", ns + "/cict/onboarding"),
90
96
  github: {
91
97
  /** GitHub App installations bound to this namespace. */
92
98
  installations: async () => (await call(t, "GET", ns + "/github/installations")).installations,
@@ -1335,6 +1335,7 @@ export declare function createApi(transport: Transport, storageFetch?: typeof fe
1335
1335
  sender?: string;
1336
1336
  limit?: number;
1337
1337
  }) => Promise<import("./cict.js").CictUsage>;
1338
+ onboarding: () => Promise<import("./cict.js").CictOnboarding>;
1338
1339
  github: {
1339
1340
  installations: () => Promise<import("./cict.js").CictInstallation[]>;
1340
1341
  connect: () => Promise<{
@@ -2799,6 +2800,7 @@ export declare function createClient(options: ClientOptions): {
2799
2800
  sender?: string;
2800
2801
  limit?: number;
2801
2802
  }) => Promise<import("./cict.js").CictUsage>;
2803
+ onboarding: () => Promise<import("./cict.js").CictOnboarding>;
2802
2804
  github: {
2803
2805
  installations: () => Promise<import("./cict.js").CictInstallation[]>;
2804
2806
  connect: () => Promise<{
@@ -241,6 +241,23 @@ export function registerCictCommand(program) {
241
241
  throw new Error("--source must be a 24-character Source ID");
242
242
  return api(ns).platform.setSource(opts.source);
243
243
  }, (r) => `Results now go to ${r.source.name}.`));
244
+ group.command("status <namespace>").description("where the namespace stands on CI/CT and the next step: GitHub, DreamLake GPU and your own machines")
245
+ .option("--json")
246
+ .action((ns, opts) => execute(opts, () => api(ns).onboarding(), (o) => {
247
+ const mark = (s) => (s.done === true ? "✓" : s.done === null ? "?" : "·");
248
+ const line = (s) => ` ${mark(s)} ${s.title}${s.done === true ? "" : ` — ${s.detail}`}`;
249
+ return [
250
+ o.ready ? `Ready (${o.readyVia === "dreamlake-gpu" ? "DreamLake GPU" : "your own machines"}).` : `Not ready yet. Next: ${o.next?.title}`,
251
+ ...(o.ready && o.workflow ? [` ${o.workflow}`] : []),
252
+ ...(!o.ready && o.next?.how ? Object.entries(o.next.how).map(([k, v]) => ` ${k}: ${v}`) : []),
253
+ ...((o.alsoNeeded ?? []).length ? ["Meanwhile, a person can also:", ...o.alsoNeeded.map((s) => ` ${s.title}${s.how?.human ? ` — ${s.how.human}` : ""}`)] : []),
254
+ "GitHub:",
255
+ line(o.github),
256
+ ...(o.platform.length ? ["DreamLake GPU:", ...o.platform.map(line)] : []),
257
+ "Your own machines:",
258
+ ...o.ownMachines.map(line),
259
+ ].join("\n");
260
+ }));
244
261
  group.command("usage <namespace>").description("DreamLake GPU time in a month: by who triggered each job, by repository and workflow, or job by job (--jobs)")
245
262
  .option("--month <YYYY-MM>", "default: this month")
246
263
  .option("--jobs", "list the jobs, newest first, instead of the totals")
@@ -26,6 +26,7 @@ export const helpExamples = {
26
26
  "runnable bind": "dl runnable bind udf/acme/recipes.process@FULL_SHA256 \\\n --snapshot CODE_REPO_ID --project recipes \\\n --server \"$LAKESHORE_URL\" --cp-namespace acme --dry-run\ndl runnable bind udf/acme/recipes.process@FULL_SHA256 \\\n --snapshot CODE_REPO_ID --project recipes --server \"$LAKESHORE_URL\" --cp-namespace acme",
27
27
  "runnable execute": "dl runnable execute exec/acme/recipes.process@EXECUTION_DIGEST \\\n --queue cpu --inputs record.json --timeout-seconds 600 --json\ndl runnable execute exec/acme/recipes.process@EXECUTION_DIGEST \\\n --queue cpu --inputs record.json --timeout-seconds 600 --attempt 2 --json",
28
28
  "runnable execution-receipt": "dl runnable execution-receipt exec/acme/recipes.process@EXECUTION_DIGEST \\\n --queue cpu --inputs record.json --timeout-seconds 600 --wait-seconds 30",
29
+ "cict status": "dl cict status my-team\ndl cict status my-team --json",
29
30
  "cict github": "dl cict github connect my-team\ndl cict github installations my-team",
30
31
  "cict github connect": "dl cict github connect my-team",
31
32
  "cict github installations": "dl cict github installations my-team --json",
@@ -43,7 +44,7 @@ export const helpExamples = {
43
44
  "cict platform show": "dl cict platform show my-team --json",
44
45
  "cict platform start": "dl cict platform start my-team\ndl cict platform start my-team --source 1123456789abcdef01234567",
45
46
  "cict platform source": "dl cict platform source my-team --source 1123456789abcdef01234567",
46
- "cict usage": "dl cict usage my-team\ndl cict usage my-team --month 2026-10 --json",
47
+ "cict usage": "dl cict usage my-team\ndl cict usage my-team --month 2026-10 --json\ndl cict usage my-team --jobs --sender octocat --limit 20",
47
48
  "cict platform admin": "dl cict platform admin list\ndl cict platform admin allow robotics-lab --limit 2\ndl cict platform admin pause robotics-lab",
48
49
  "cict platform admin list": "dl cict platform admin list --json",
49
50
  "cict platform admin allow": "dl cict platform admin allow robotics-lab --limit 2",
@@ -1 +1 @@
1
- export declare const VERSION = "0.125.4";
1
+ export declare const VERSION = "0.126.1";
@@ -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.125.4";
9
+ export const VERSION = "0.126.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreamlake/dreamlake-cli",
3
- "version": "0.125.4",
3
+ "version": "0.126.1",
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.125.4",
41
- "@dreamlake/dreamlake-cli-darwin-x64": "0.125.4",
42
- "@dreamlake/dreamlake-cli-linux-x64": "0.125.4",
43
- "@dreamlake/dreamlake-cli-linux-arm64": "0.125.4",
44
- "@dreamlake/dreamlake-cli-linux-x64-musl": "0.125.4",
45
- "@dreamlake/dreamlake-cli-linux-arm64-musl": "0.125.4",
46
- "@dreamlake/dreamlake-cli-win32-x64": "0.125.4",
47
- "@dreamlake/dreamlake-cli-win32-arm64": "0.125.4"
40
+ "@dreamlake/dreamlake-cli-darwin-arm64": "0.126.1",
41
+ "@dreamlake/dreamlake-cli-darwin-x64": "0.126.1",
42
+ "@dreamlake/dreamlake-cli-linux-x64": "0.126.1",
43
+ "@dreamlake/dreamlake-cli-linux-arm64": "0.126.1",
44
+ "@dreamlake/dreamlake-cli-linux-x64-musl": "0.126.1",
45
+ "@dreamlake/dreamlake-cli-linux-arm64-musl": "0.126.1",
46
+ "@dreamlake/dreamlake-cli-win32-x64": "0.126.1",
47
+ "@dreamlake/dreamlake-cli-win32-arm64": "0.126.1"
48
48
  }
49
49
  }