@norskvideo/ctl-commands 0.1.2 → 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 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
  }
@@ -128,6 +146,11 @@ export type Command = {
128
146
  id: string;
129
147
  } | {
130
148
  kind: "shm.list";
149
+ } | {
150
+ kind: "sideload.status";
151
+ } | {
152
+ kind: "sideload.fetch";
153
+ opts: SideloadFetchOpts;
131
154
  } | {
132
155
  kind: "template.list";
133
156
  } | {
@@ -163,6 +186,7 @@ export type Command = {
163
186
  } | {
164
187
  kind: "product.pull";
165
188
  name: string;
189
+ opts: ProductPullOpts;
166
190
  } | {
167
191
  kind: "mcp";
168
192
  } | {
@@ -307,9 +331,10 @@ export declare const commands: {
307
331
  readonly kind: "product.reload";
308
332
  readonly name: string;
309
333
  }>;
310
- readonly pull: LeafCmd<(name: string) => {
334
+ readonly pull: LeafCmd<(name: string, opts?: ProductPullOpts) => {
311
335
  readonly kind: "product.pull";
312
336
  readonly name: string;
337
+ readonly opts: ProductPullOpts;
313
338
  }>;
314
339
  };
315
340
  readonly shm: {
@@ -317,6 +342,15 @@ export declare const commands: {
317
342
  readonly kind: "shm.list";
318
343
  }>;
319
344
  };
345
+ readonly sideload: {
346
+ readonly status: LeafCmd<() => {
347
+ readonly kind: "sideload.status";
348
+ }>;
349
+ readonly fetch: LeafCmd<(opts?: SideloadFetchOpts) => {
350
+ readonly kind: "sideload.fetch";
351
+ readonly opts: SideloadFetchOpts;
352
+ }>;
353
+ };
320
354
  readonly template: {
321
355
  readonly list: LeafCmd<() => {
322
356
  readonly kind: "template.list";
package/commands.js CHANGED
@@ -50,11 +50,15 @@ 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
+ sideload: {
59
+ status: leaf("status", () => ({ kind: "sideload.status" })),
60
+ fetch: leaf("fetch", (opts = {}) => ({ kind: "sideload.fetch", opts })),
61
+ },
58
62
  template: {
59
63
  list: leaf("list", () => ({ kind: "template.list" })),
60
64
  show: leaf("show <name>", (name) => ({ kind: "template.show", name })),
package/format.js CHANGED
@@ -77,9 +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
+ case "sideload.status":
84
+ return ["sideload", "status"];
85
+ case "sideload.fetch":
86
+ return ["sideload", "fetch", ...formatOpts(cmd.opts)];
83
87
  case "template.list":
84
88
  return ["template", "list"];
85
89
  case "template.show":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@norskvideo/ctl-commands",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {