@vm0/runner 3.11.0 → 3.11.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.
Files changed (2) hide show
  1. package/index.js +7 -34
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -878,7 +878,7 @@ import { promisify as promisify2 } from "util";
878
878
  var execAsync2 = promisify2(exec2);
879
879
  var logger2 = createLogger("OverlayPool");
880
880
  var OVERLAY_SIZE = 2 * 1024 * 1024 * 1024;
881
- async function defaultCreateFile(filePath) {
881
+ async function createOverlayFile(filePath) {
882
882
  const fd = fs2.openSync(filePath, "w");
883
883
  fs2.ftruncateSync(fd, OVERLAY_SIZE);
884
884
  fs2.closeSync(fd);
@@ -894,7 +894,7 @@ var OverlayPool = class {
894
894
  size: config.size,
895
895
  replenishThreshold: config.replenishThreshold,
896
896
  poolDir: config.poolDir,
897
- createFile: config.createFile ?? defaultCreateFile
897
+ createFile: config.createFile ?? createOverlayFile
898
898
  };
899
899
  }
900
900
  /**
@@ -903,19 +903,6 @@ var OverlayPool = class {
903
903
  generateFileName() {
904
904
  return `overlay-${randomUUID()}.ext4`;
905
905
  }
906
- /**
907
- * Ensure the pool directory exists
908
- */
909
- async ensurePoolDir() {
910
- const parentDir = path3.dirname(this.config.poolDir);
911
- if (!fs2.existsSync(parentDir)) {
912
- await execAsync2(`sudo mkdir -p ${parentDir}`);
913
- await execAsync2(`sudo chmod 777 ${parentDir}`);
914
- }
915
- if (!fs2.existsSync(this.config.poolDir)) {
916
- fs2.mkdirSync(this.config.poolDir, { recursive: true });
917
- }
918
- }
919
906
  /**
920
907
  * Scan pool directory for overlay files
921
908
  */
@@ -969,7 +956,7 @@ var OverlayPool = class {
969
956
  logger2.log(
970
957
  `Initializing overlay pool (size=${this.config.size}, threshold=${this.config.replenishThreshold})...`
971
958
  );
972
- await this.ensurePoolDir();
959
+ fs2.mkdirSync(this.config.poolDir, { recursive: true });
973
960
  const existing = this.scanPoolDir();
974
961
  if (existing.length > 0) {
975
962
  logger2.log(`Cleaning up ${existing.length} stale overlay(s)`);
@@ -8931,7 +8918,7 @@ var FEATURE_SWITCHES = {
8931
8918
  },
8932
8919
  ["platformAgents" /* PlatformAgents */]: {
8933
8920
  maintainer: "ethan@vm0.ai",
8934
- enabled: false
8921
+ enabled: true
8935
8922
  },
8936
8923
  ["platformSecrets" /* PlatformSecrets */]: {
8937
8924
  maintainer: "ethan@vm0.ai",
@@ -10277,24 +10264,11 @@ async function isPortInUse(port) {
10277
10264
  }
10278
10265
 
10279
10266
  // src/lib/runner/runner-lock.ts
10280
- import { exec as exec4 } from "child_process";
10281
10267
  import fs9 from "fs";
10282
10268
  import path5 from "path";
10283
- import { promisify as promisify4 } from "util";
10284
- var execAsync4 = promisify4(exec4);
10285
10269
  var logger11 = createLogger("RunnerLock");
10286
10270
  var DEFAULT_PID_FILE = runtimePaths.runnerPid;
10287
10271
  var currentPidFile = null;
10288
- async function ensureRunDir(dirPath, skipSudo) {
10289
- if (!fs9.existsSync(dirPath)) {
10290
- if (skipSudo) {
10291
- fs9.mkdirSync(dirPath, { recursive: true });
10292
- } else {
10293
- await execAsync4(`sudo mkdir -p ${dirPath}`);
10294
- await execAsync4(`sudo chmod 777 ${dirPath}`);
10295
- }
10296
- }
10297
- }
10298
10272
  function isProcessRunning(pid) {
10299
10273
  try {
10300
10274
  process.kill(pid, 0);
@@ -10306,11 +10280,10 @@ function isProcessRunning(pid) {
10306
10280
  return false;
10307
10281
  }
10308
10282
  }
10309
- async function acquireRunnerLock(options = {}) {
10283
+ function acquireRunnerLock(options = {}) {
10310
10284
  const pidFile = options.pidFile ?? DEFAULT_PID_FILE;
10311
- const skipSudo = options.skipSudo ?? false;
10312
10285
  const runDir = path5.dirname(pidFile);
10313
- await ensureRunDir(runDir, skipSudo);
10286
+ fs9.mkdirSync(runDir, { recursive: true });
10314
10287
  if (fs9.existsSync(pidFile)) {
10315
10288
  const pidStr = fs9.readFileSync(pidFile, "utf-8").trim();
10316
10289
  const pid = parseInt(pidStr, 10);
@@ -11205,7 +11178,7 @@ var benchmarkCommand = new Command4("benchmark").description(
11205
11178
  });
11206
11179
 
11207
11180
  // src/index.ts
11208
- var version = true ? "3.11.0" : "0.1.0";
11181
+ var version = true ? "3.11.1" : "0.1.0";
11209
11182
  program.name("vm0-runner").version(version).description("Self-hosted runner for VM0 agents");
11210
11183
  program.addCommand(startCommand);
11211
11184
  program.addCommand(doctorCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/runner",
3
- "version": "3.11.0",
3
+ "version": "3.11.1",
4
4
  "description": "Self-hosted runner for VM0 agents",
5
5
  "repository": {
6
6
  "type": "git",