@dreamlake/dreamlake-cli 0.125.4 → 0.126.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/api/cict.d.ts +37 -0
- package/dist/api/cict.js +6 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/cli/cict/index.js +16 -0
- package/dist/cli/help-examples.generated.js +1 -0
- package/dist/cli/version.d.ts +1 -1
- package/dist/cli/version.js +1 -1
- package/package.json +9 -9
package/dist/api/cict.d.ts
CHANGED
|
@@ -223,6 +223,37 @@ 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 line and the evidence contract. */
|
|
252
|
+
workflow: string | null;
|
|
253
|
+
github: CictOnboardingStep;
|
|
254
|
+
platform: CictOnboardingStep[];
|
|
255
|
+
ownMachines: CictOnboardingStep[];
|
|
256
|
+
}
|
|
226
257
|
export interface CictUsage {
|
|
227
258
|
month: string;
|
|
228
259
|
gpuSeconds: number;
|
|
@@ -307,6 +338,12 @@ export declare function cictApi(t: Transport, namespace: string, fetchImpl?: typ
|
|
|
307
338
|
sender?: string;
|
|
308
339
|
limit?: number;
|
|
309
340
|
}) => Promise<CictUsage>;
|
|
341
|
+
/**
|
|
342
|
+
* Where the namespace stands on CI/CT: GitHub, DreamLake GPU and the
|
|
343
|
+
* own-machine steps, each done or not, and the next step with UI, CLI
|
|
344
|
+
* and API hints. Only installing the GitHub App needs a person.
|
|
345
|
+
*/
|
|
346
|
+
onboarding: () => Promise<CictOnboarding>;
|
|
310
347
|
github: {
|
|
311
348
|
/** GitHub App installations bound to this namespace. */
|
|
312
349
|
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,
|
package/dist/api/index.d.ts
CHANGED
|
@@ -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<{
|
package/dist/cli/cict/index.js
CHANGED
|
@@ -241,6 +241,22 @@ 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
|
+
"GitHub:",
|
|
254
|
+
line(o.github),
|
|
255
|
+
...(o.platform.length ? ["DreamLake GPU:", ...o.platform.map(line)] : []),
|
|
256
|
+
"Your own machines:",
|
|
257
|
+
...o.ownMachines.map(line),
|
|
258
|
+
].join("\n");
|
|
259
|
+
}));
|
|
244
260
|
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
261
|
.option("--month <YYYY-MM>", "default: this month")
|
|
246
262
|
.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",
|
package/dist/cli/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.126.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.126.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.
|
|
41
|
-
"@dreamlake/dreamlake-cli-darwin-x64": "0.
|
|
42
|
-
"@dreamlake/dreamlake-cli-linux-x64": "0.
|
|
43
|
-
"@dreamlake/dreamlake-cli-linux-arm64": "0.
|
|
44
|
-
"@dreamlake/dreamlake-cli-linux-x64-musl": "0.
|
|
45
|
-
"@dreamlake/dreamlake-cli-linux-arm64-musl": "0.
|
|
46
|
-
"@dreamlake/dreamlake-cli-win32-x64": "0.
|
|
47
|
-
"@dreamlake/dreamlake-cli-win32-arm64": "0.
|
|
40
|
+
"@dreamlake/dreamlake-cli-darwin-arm64": "0.126.0",
|
|
41
|
+
"@dreamlake/dreamlake-cli-darwin-x64": "0.126.0",
|
|
42
|
+
"@dreamlake/dreamlake-cli-linux-x64": "0.126.0",
|
|
43
|
+
"@dreamlake/dreamlake-cli-linux-arm64": "0.126.0",
|
|
44
|
+
"@dreamlake/dreamlake-cli-linux-x64-musl": "0.126.0",
|
|
45
|
+
"@dreamlake/dreamlake-cli-linux-arm64-musl": "0.126.0",
|
|
46
|
+
"@dreamlake/dreamlake-cli-win32-x64": "0.126.0",
|
|
47
|
+
"@dreamlake/dreamlake-cli-win32-arm64": "0.126.0"
|
|
48
48
|
}
|
|
49
49
|
}
|