@norskvideo/ctl-commands 0.1.3 → 0.1.5

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
  }
@@ -70,6 +88,10 @@ export interface InstanceLaunchTemplateOpts {
70
88
  hostPorts?: string[];
71
89
  hardware?: HardwareProfile;
72
90
  sidecars?: string[];
91
+ /** Operator environment overrides — compose files setting `environment` /
92
+ * `env_file` on services that already exist. Separate from `sidecars`,
93
+ * which adds services that run. */
94
+ overrides?: string[];
73
95
  cpuPinning?: number[];
74
96
  cpuCount?: number;
75
97
  containerUser?: string;
@@ -130,6 +152,9 @@ export type Command = {
130
152
  kind: "shm.list";
131
153
  } | {
132
154
  kind: "sideload.status";
155
+ } | {
156
+ kind: "sideload.fetch";
157
+ opts: SideloadFetchOpts;
133
158
  } | {
134
159
  kind: "template.list";
135
160
  } | {
@@ -165,6 +190,7 @@ export type Command = {
165
190
  } | {
166
191
  kind: "product.pull";
167
192
  name: string;
193
+ opts: ProductPullOpts;
168
194
  } | {
169
195
  kind: "mcp";
170
196
  } | {
@@ -309,9 +335,10 @@ export declare const commands: {
309
335
  readonly kind: "product.reload";
310
336
  readonly name: string;
311
337
  }>;
312
- readonly pull: LeafCmd<(name: string) => {
338
+ readonly pull: LeafCmd<(name: string, opts?: ProductPullOpts) => {
313
339
  readonly kind: "product.pull";
314
340
  readonly name: string;
341
+ readonly opts: ProductPullOpts;
315
342
  }>;
316
343
  };
317
344
  readonly shm: {
@@ -323,6 +350,10 @@ export declare const commands: {
323
350
  readonly status: LeafCmd<() => {
324
351
  readonly kind: "sideload.status";
325
352
  }>;
353
+ readonly fetch: LeafCmd<(opts?: SideloadFetchOpts) => {
354
+ readonly kind: "sideload.fetch";
355
+ readonly opts: SideloadFetchOpts;
356
+ }>;
326
357
  };
327
358
  readonly template: {
328
359
  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":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@norskvideo/ctl-commands",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {