@vm0/cli 9.143.0 → 9.144.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.
package/index.js CHANGED
@@ -65,7 +65,7 @@ import {
65
65
  source_default,
66
66
  volumeConfigSchema,
67
67
  withErrorHandler
68
- } from "./chunk-FEQSPUBX.js";
68
+ } from "./chunk-CFIYV4PA.js";
69
69
  import {
70
70
  __toESM,
71
71
  init_esm_shims
@@ -249,7 +249,7 @@ var authCommand = new Command().name("auth").description("Authenticate vm0").add
249
249
  // src/commands/info/index.ts
250
250
  init_esm_shims();
251
251
  import { existsSync } from "fs";
252
- import { homedir, release, type } from "os";
252
+ import * as os from "os";
253
253
  import { join } from "path";
254
254
 
255
255
  // src/lib/utils/update-checker.ts
@@ -395,10 +395,10 @@ async function waitForSilentUpgrade(timeout = TIMEOUT_MS) {
395
395
 
396
396
  // src/commands/info/index.ts
397
397
  function getConfigPath() {
398
- return join(homedir(), ".vm0", "config.json");
398
+ return join(os.homedir(), ".vm0", "config.json");
399
399
  }
400
400
  var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
401
- console.log(source_default.bold(`VM0 CLI v${"9.143.0"}`));
401
+ console.log(source_default.bold(`VM0 CLI v${"9.144.1"}`));
402
402
  console.log();
403
403
  const config = await loadConfig();
404
404
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -422,7 +422,7 @@ var infoCommand = new Command().name("info").description("Display environment an
422
422
  console.log(source_default.bold("System:"));
423
423
  console.log(` Node: ${process.version}`);
424
424
  console.log(` Platform: ${process.platform} (${process.arch})`);
425
- console.log(` OS: ${type()} ${release()}`);
425
+ console.log(` OS: ${os.type()} ${os.release()}`);
426
426
  console.log(` Shell: ${process.env.SHELL ?? "unknown"}`);
427
427
  console.log(` Package Manager: ${detectPackageManager()}`);
428
428
  });
@@ -681,7 +681,7 @@ init_esm_shims();
681
681
  init_esm_shims();
682
682
  import * as fs from "fs/promises";
683
683
  import * as path from "path";
684
- import * as os from "os";
684
+ import * as os2 from "os";
685
685
  import { execFile } from "child_process";
686
686
  import { promisify } from "util";
687
687
  var execFileAsync = promisify(execFile);
@@ -737,7 +737,7 @@ async function downloadGitHubDirectory(url) {
737
737
  const safeOwner = sanitizeGitArg(parsed.owner, "repository owner");
738
738
  const safeRepo = sanitizeGitArg(parsed.repo, "repository name");
739
739
  const repoUrl = `https://github.com/${safeOwner}/${safeRepo}.git`;
740
- const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "vm0-github-"));
740
+ const tempDir = await fs.mkdtemp(path.join(os2.tmpdir(), "vm0-github-"));
741
741
  try {
742
742
  try {
743
743
  await execFileAsync("git", ["--version"]);
@@ -790,14 +790,14 @@ async function downloadGitHubDirectory(url) {
790
790
  init_esm_shims();
791
791
  import * as fs5 from "fs/promises";
792
792
  import * as path4 from "path";
793
- import * as os4 from "os";
793
+ import * as os5 from "os";
794
794
 
795
795
  // src/lib/storage/direct-upload.ts
796
796
  init_esm_shims();
797
797
  import { createHash } from "crypto";
798
798
  import * as fs4 from "fs";
799
799
  import * as path3 from "path";
800
- import * as os3 from "os";
800
+ import * as os4 from "os";
801
801
 
802
802
  // ../../node_modules/.pnpm/tar@7.5.13/node_modules/tar/dist/esm/index.min.js
803
803
  init_esm_shims();
@@ -2680,7 +2680,7 @@ var ls = /* @__PURE__ */ Symbol("readdir");
2680
2680
  var ai = /* @__PURE__ */ Symbol("onreaddir");
2681
2681
  var li = /* @__PURE__ */ Symbol("pipe");
2682
2682
  var ir = /* @__PURE__ */ Symbol("entry");
2683
- var os2 = /* @__PURE__ */ Symbol("entryOpt");
2683
+ var os3 = /* @__PURE__ */ Symbol("entryOpt");
2684
2684
  var ci = /* @__PURE__ */ Symbol("writeEntryClass");
2685
2685
  var rr = /* @__PURE__ */ Symbol("write");
2686
2686
  var hs = /* @__PURE__ */ Symbol("ondrain");
@@ -2738,7 +2738,7 @@ var Et = class extends D {
2738
2738
  if (!this.filter(t.path, t)) t.resume();
2739
2739
  else {
2740
2740
  let i = new di(t.path, e);
2741
- i.entry = new ri(t, this[os2](i)), i.entry.on("end", () => this[ns](i)), this[G] += 1, this[W].push(i);
2741
+ i.entry = new ri(t, this[os3](i)), i.entry.on("end", () => this[ns](i)), this[G] += 1, this[W].push(i);
2742
2742
  }
2743
2743
  this[Ft]();
2744
2744
  }
@@ -2804,13 +2804,13 @@ var Et = class extends D {
2804
2804
  }
2805
2805
  }
2806
2806
  }
2807
- [os2](t) {
2807
+ [os3](t) {
2808
2808
  return { onwarn: (e, i, r) => this.warn(e, i, r), noPax: this.noPax, cwd: this.cwd, absolute: t.absolute, preservePaths: this.preservePaths, maxReadSize: this.maxReadSize, strict: this.strict, portable: this.portable, linkCache: this.linkCache, statCache: this.statCache, noMtime: this.noMtime, mtime: this.mtime, prefix: this.prefix, onWriteEntry: this.onWriteEntry };
2809
2809
  }
2810
2810
  [ir](t) {
2811
2811
  this[G] += 1;
2812
2812
  try {
2813
- return new this[ci](t.path, this[os2](t)).on("end", () => this[ns](t)).on("error", (i) => this.emit("error", i));
2813
+ return new this[ci](t.path, this[os3](t)).on("end", () => this[ns](t)).on("error", (i) => this.emit("error", i));
2814
2814
  } catch (e) {
2815
2815
  this.emit("error", e);
2816
2816
  }
@@ -3865,7 +3865,7 @@ async function collectFileMetadata(cwd, files, onProgress) {
3865
3865
  return fileEntries;
3866
3866
  }
3867
3867
  async function createArchive(cwd, files) {
3868
- const tmpDir = fs4.mkdtempSync(path3.join(os3.tmpdir(), "vm0-"));
3868
+ const tmpDir = fs4.mkdtempSync(path3.join(os4.tmpdir(), "vm0-"));
3869
3869
  const tarPath = path3.join(tmpDir, "archive.tar.gz");
3870
3870
  try {
3871
3871
  const relativePaths = files.map((file) => {
@@ -4019,7 +4019,7 @@ async function uploadInstructions(agentName, instructionsFilePath, basePath, fra
4019
4019
  const storageName = getInstructionsStorageName(agentName.toLowerCase());
4020
4020
  const absolutePath = path4.isAbsolute(instructionsFilePath) ? instructionsFilePath : path4.join(basePath, instructionsFilePath);
4021
4021
  const content = await fs5.readFile(absolutePath, "utf8");
4022
- const tmpDir = await fs5.mkdtemp(path4.join(os4.tmpdir(), "vm0-instructions-"));
4022
+ const tmpDir = await fs5.mkdtemp(path4.join(os5.tmpdir(), "vm0-instructions-"));
4023
4023
  const instructionsDir = path4.join(tmpDir, "instructions");
4024
4024
  await fs5.mkdir(instructionsDir);
4025
4025
  const filename = getInstructionsFilename(framework);
@@ -4291,7 +4291,7 @@ var composeCommand = new Command().name("compose").description("Create or update
4291
4291
  options.autoUpdate = false;
4292
4292
  }
4293
4293
  if (options.autoUpdate !== false) {
4294
- await startSilentUpgrade("9.143.0");
4294
+ await startSilentUpgrade("9.144.1");
4295
4295
  }
4296
4296
  try {
4297
4297
  let result;
@@ -4383,7 +4383,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
4383
4383
  withErrorHandler(
4384
4384
  async (identifier, prompt, options) => {
4385
4385
  if (options.autoUpdate !== false) {
4386
- await startSilentUpgrade("9.143.0");
4386
+ await startSilentUpgrade("9.144.1");
4387
4387
  }
4388
4388
  const { name, version } = parseIdentifier(identifier);
4389
4389
  let composeId;
@@ -5019,7 +5019,7 @@ var pushCommand = new Command().name("push").description("Push local files to cl
5019
5019
  init_esm_shims();
5020
5020
  import path7 from "path";
5021
5021
  import * as fs6 from "fs";
5022
- import * as os5 from "os";
5022
+ import * as os6 from "os";
5023
5023
 
5024
5024
  // src/lib/storage/pull-utils.ts
5025
5025
  init_esm_shims();
@@ -5070,7 +5070,7 @@ var pullCommand = new Command().name("pull").description("Pull cloud files to lo
5070
5070
  const arrayBuffer = await s3Response.arrayBuffer();
5071
5071
  const tarBuffer = Buffer.from(arrayBuffer);
5072
5072
  console.log(source_default.green(`\u2713 Downloaded ${formatBytes(tarBuffer.length)}`));
5073
- const tmpDir = fs6.mkdtempSync(path7.join(os5.tmpdir(), "vm0-"));
5073
+ const tmpDir = fs6.mkdtempSync(path7.join(os6.tmpdir(), "vm0-"));
5074
5074
  const tarPath = path7.join(tmpDir, "volume.tar.gz");
5075
5075
  await fs6.promises.writeFile(tarPath, tarBuffer);
5076
5076
  console.log(source_default.dim("Syncing local files..."));
@@ -5198,7 +5198,7 @@ init_esm_shims();
5198
5198
  init_esm_shims();
5199
5199
  import path8 from "path";
5200
5200
  import * as fs7 from "fs";
5201
- import * as os6 from "os";
5201
+ import * as os7 from "os";
5202
5202
  async function cloneStorage(name, type2, destination, options = {}) {
5203
5203
  const typeLabel = type2;
5204
5204
  const dirStatus = checkDirectoryStatus(destination);
@@ -5237,7 +5237,7 @@ async function cloneStorage(name, type2, destination, options = {}) {
5237
5237
  const arrayBuffer = await s3Response.arrayBuffer();
5238
5238
  const tarBuffer = Buffer.from(arrayBuffer);
5239
5239
  console.log(source_default.green(`\u2713 Downloaded ${formatBytes(tarBuffer.length)}`));
5240
- const tmpDir = fs7.mkdtempSync(path8.join(os6.tmpdir(), "vm0-clone-"));
5240
+ const tmpDir = fs7.mkdtempSync(path8.join(os7.tmpdir(), "vm0-clone-"));
5241
5241
  const tarPath = path8.join(tmpDir, "archive.tar.gz");
5242
5242
  await fs7.promises.writeFile(tarPath, tarBuffer);
5243
5243
  const files = await listTarFiles(tarPath);
@@ -5401,7 +5401,7 @@ var pushCommand2 = new Command().name("push").description("Push local files to c
5401
5401
  init_esm_shims();
5402
5402
  import path10 from "path";
5403
5403
  import * as fs8 from "fs";
5404
- import * as os7 from "os";
5404
+ import * as os8 from "os";
5405
5405
  var pullCommand2 = new Command().name("pull").description("Pull cloud artifact to local directory").argument("[versionId]", "Version ID to pull (default: latest)").action(
5406
5406
  withErrorHandler(async (versionId) => {
5407
5407
  const cwd = process.cwd();
@@ -5444,7 +5444,7 @@ var pullCommand2 = new Command().name("pull").description("Pull cloud artifact t
5444
5444
  const arrayBuffer = await s3Response.arrayBuffer();
5445
5445
  const tarBuffer = Buffer.from(arrayBuffer);
5446
5446
  console.log(source_default.green(`\u2713 Downloaded ${formatBytes(tarBuffer.length)}`));
5447
- const tmpDir = fs8.mkdtempSync(path10.join(os7.tmpdir(), "vm0-"));
5447
+ const tmpDir = fs8.mkdtempSync(path10.join(os8.tmpdir(), "vm0-"));
5448
5448
  const tarPath = path10.join(tmpDir, "artifact.tar.gz");
5449
5449
  await fs8.promises.writeFile(tarPath, tarBuffer);
5450
5450
  console.log(source_default.dim("Syncing local files..."));
@@ -6170,13 +6170,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
6170
6170
  if (latestVersion === null) {
6171
6171
  throw new Error("Could not check for updates. Please try again later.");
6172
6172
  }
6173
- if (latestVersion === "9.143.0") {
6174
- console.log(source_default.green(`\u2713 Already up to date (${"9.143.0"})`));
6173
+ if (latestVersion === "9.144.1") {
6174
+ console.log(source_default.green(`\u2713 Already up to date (${"9.144.1"})`));
6175
6175
  return;
6176
6176
  }
6177
6177
  console.log(
6178
6178
  source_default.yellow(
6179
- `Current version: ${"9.143.0"} -> Latest version: ${latestVersion}`
6179
+ `Current version: ${"9.144.1"} -> Latest version: ${latestVersion}`
6180
6180
  )
6181
6181
  );
6182
6182
  console.log();
@@ -6203,7 +6203,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
6203
6203
  const success = await performUpgrade(packageManager);
6204
6204
  if (success) {
6205
6205
  console.log(
6206
- source_default.green(`\u2713 Upgraded from ${"9.143.0"} to ${latestVersion}`)
6206
+ source_default.green(`\u2713 Upgraded from ${"9.144.1"} to ${latestVersion}`)
6207
6207
  );
6208
6208
  return;
6209
6209
  }
@@ -6270,7 +6270,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
6270
6270
 
6271
6271
  // src/index.ts
6272
6272
  var program = new Command();
6273
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.143.0");
6273
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.144.1");
6274
6274
  program.addCommand(authCommand);
6275
6275
  program.addCommand(infoCommand);
6276
6276
  program.addCommand(composeCommand);