@norskvideo/ctl-commands 0.1.3 → 0.1.4
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/commands.d.ts +28 -1
- package/commands.js +2 -1
- package/format.js +3 -1
- package/package.json +1 -1
package/commands.d.ts
CHANGED
|
@@ -59,6 +59,24 @@ export interface ProductAddOpts {
|
|
|
59
59
|
licenseFile?: string;
|
|
60
60
|
marketplaceProvider?: string;
|
|
61
61
|
}
|
|
62
|
+
export interface ProductPullOpts {
|
|
63
|
+
/** Also fetch the product's CUDA sideload bundles. Opt-in: a host having a GPU
|
|
64
|
+
* is not consent to use it, so ctl never infers this. */
|
|
65
|
+
sideload?: boolean;
|
|
66
|
+
/** Report what would be pulled — including the media image ref
|
|
67
|
+
* `sideload fetch --image` takes — without downloading anything. */
|
|
68
|
+
dryRun?: boolean;
|
|
69
|
+
}
|
|
70
|
+
export interface SideloadFetchOpts {
|
|
71
|
+
/** Registered product whose default template names the media image. */
|
|
72
|
+
product?: string;
|
|
73
|
+
/** Media image ref; needs nothing pulled, so a builder can seed for another host. */
|
|
74
|
+
image?: string;
|
|
75
|
+
/** Exactly which bundles to fetch, overriding the selector's default. */
|
|
76
|
+
bundle?: ("gpu-video" | "gpu-inference")[];
|
|
77
|
+
/** Fetch locally into this directory instead of through the daemon. */
|
|
78
|
+
cacheDir?: string;
|
|
79
|
+
}
|
|
62
80
|
export interface TemplateImportOpts {
|
|
63
81
|
name: string;
|
|
64
82
|
}
|
|
@@ -130,6 +148,9 @@ export type Command = {
|
|
|
130
148
|
kind: "shm.list";
|
|
131
149
|
} | {
|
|
132
150
|
kind: "sideload.status";
|
|
151
|
+
} | {
|
|
152
|
+
kind: "sideload.fetch";
|
|
153
|
+
opts: SideloadFetchOpts;
|
|
133
154
|
} | {
|
|
134
155
|
kind: "template.list";
|
|
135
156
|
} | {
|
|
@@ -165,6 +186,7 @@ export type Command = {
|
|
|
165
186
|
} | {
|
|
166
187
|
kind: "product.pull";
|
|
167
188
|
name: string;
|
|
189
|
+
opts: ProductPullOpts;
|
|
168
190
|
} | {
|
|
169
191
|
kind: "mcp";
|
|
170
192
|
} | {
|
|
@@ -309,9 +331,10 @@ export declare const commands: {
|
|
|
309
331
|
readonly kind: "product.reload";
|
|
310
332
|
readonly name: string;
|
|
311
333
|
}>;
|
|
312
|
-
readonly pull: LeafCmd<(name: string) => {
|
|
334
|
+
readonly pull: LeafCmd<(name: string, opts?: ProductPullOpts) => {
|
|
313
335
|
readonly kind: "product.pull";
|
|
314
336
|
readonly name: string;
|
|
337
|
+
readonly opts: ProductPullOpts;
|
|
315
338
|
}>;
|
|
316
339
|
};
|
|
317
340
|
readonly shm: {
|
|
@@ -323,6 +346,10 @@ export declare const commands: {
|
|
|
323
346
|
readonly status: LeafCmd<() => {
|
|
324
347
|
readonly kind: "sideload.status";
|
|
325
348
|
}>;
|
|
349
|
+
readonly fetch: LeafCmd<(opts?: SideloadFetchOpts) => {
|
|
350
|
+
readonly kind: "sideload.fetch";
|
|
351
|
+
readonly opts: SideloadFetchOpts;
|
|
352
|
+
}>;
|
|
326
353
|
};
|
|
327
354
|
readonly template: {
|
|
328
355
|
readonly list: LeafCmd<() => {
|
package/commands.js
CHANGED
|
@@ -50,13 +50,14 @@ export const commands = {
|
|
|
50
50
|
exists: leaf("exists <name>", (name) => ({ kind: "product.exists", name })),
|
|
51
51
|
remove: leaf("remove <name>", (name) => ({ kind: "product.remove", name })),
|
|
52
52
|
reload: leaf("reload <name>", (name) => ({ kind: "product.reload", name })),
|
|
53
|
-
pull: leaf("pull <name>", (name) => ({ kind: "product.pull", name })),
|
|
53
|
+
pull: leaf("pull <name>", (name, opts = {}) => ({ kind: "product.pull", name, opts })),
|
|
54
54
|
},
|
|
55
55
|
shm: {
|
|
56
56
|
list: leaf("list", () => ({ kind: "shm.list" })),
|
|
57
57
|
},
|
|
58
58
|
sideload: {
|
|
59
59
|
status: leaf("status", () => ({ kind: "sideload.status" })),
|
|
60
|
+
fetch: leaf("fetch", (opts = {}) => ({ kind: "sideload.fetch", opts })),
|
|
60
61
|
},
|
|
61
62
|
template: {
|
|
62
63
|
list: leaf("list", () => ({ kind: "template.list" })),
|
package/format.js
CHANGED
|
@@ -77,11 +77,13 @@ export function toArgv(cmd) {
|
|
|
77
77
|
case "product.reload":
|
|
78
78
|
return ["product", "reload", cmd.name];
|
|
79
79
|
case "product.pull":
|
|
80
|
-
return ["product", "pull", cmd.name];
|
|
80
|
+
return ["product", "pull", cmd.name, ...formatOpts(cmd.opts)];
|
|
81
81
|
case "shm.list":
|
|
82
82
|
return ["shm", "list"];
|
|
83
83
|
case "sideload.status":
|
|
84
84
|
return ["sideload", "status"];
|
|
85
|
+
case "sideload.fetch":
|
|
86
|
+
return ["sideload", "fetch", ...formatOpts(cmd.opts)];
|
|
85
87
|
case "template.list":
|
|
86
88
|
return ["template", "list"];
|
|
87
89
|
case "template.show":
|