@vm0/runner 3.10.3 → 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 +21 -37
  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)`);
@@ -7665,14 +7652,20 @@ var modelProviderTypeSchema = z18.enum([
7665
7652
  "anthropic-api-key",
7666
7653
  "openrouter-api-key",
7667
7654
  "moonshot-api-key",
7668
- "minimax-api-key"
7655
+ "minimax-api-key",
7656
+ "aws-bedrock"
7669
7657
  ]);
7670
7658
  var modelProviderFrameworkSchema = z18.enum(["claude-code", "codex"]);
7671
7659
  var modelProviderResponseSchema = z18.object({
7672
7660
  id: z18.string().uuid(),
7673
7661
  type: modelProviderTypeSchema,
7674
7662
  framework: modelProviderFrameworkSchema,
7675
- credentialName: z18.string(),
7663
+ credentialName: z18.string().nullable(),
7664
+ // Legacy single-credential (deprecated for multi-auth)
7665
+ authMethod: z18.string().nullable(),
7666
+ // For multi-auth providers
7667
+ credentialNames: z18.array(z18.string()).nullable(),
7668
+ // For multi-auth providers
7676
7669
  isDefault: z18.boolean(),
7677
7670
  selectedModel: z18.string().nullable(),
7678
7671
  createdAt: z18.string(),
@@ -7683,7 +7676,12 @@ var modelProviderListResponseSchema = z18.object({
7683
7676
  });
7684
7677
  var upsertModelProviderRequestSchema = z18.object({
7685
7678
  type: modelProviderTypeSchema,
7686
- credential: z18.string().min(1, "Credential is required"),
7679
+ credential: z18.string().min(1).optional(),
7680
+ // Legacy single credential
7681
+ authMethod: z18.string().optional(),
7682
+ // For multi-auth providers
7683
+ credentials: z18.record(z18.string(), z18.string()).optional(),
7684
+ // For multi-auth providers
7687
7685
  convert: z18.boolean().optional(),
7688
7686
  selectedModel: z18.string().optional()
7689
7687
  });
@@ -8920,7 +8918,7 @@ var FEATURE_SWITCHES = {
8920
8918
  },
8921
8919
  ["platformAgents" /* PlatformAgents */]: {
8922
8920
  maintainer: "ethan@vm0.ai",
8923
- enabled: false
8921
+ enabled: true
8924
8922
  },
8925
8923
  ["platformSecrets" /* PlatformSecrets */]: {
8926
8924
  maintainer: "ethan@vm0.ai",
@@ -10266,24 +10264,11 @@ async function isPortInUse(port) {
10266
10264
  }
10267
10265
 
10268
10266
  // src/lib/runner/runner-lock.ts
10269
- import { exec as exec4 } from "child_process";
10270
10267
  import fs9 from "fs";
10271
10268
  import path5 from "path";
10272
- import { promisify as promisify4 } from "util";
10273
- var execAsync4 = promisify4(exec4);
10274
10269
  var logger11 = createLogger("RunnerLock");
10275
10270
  var DEFAULT_PID_FILE = runtimePaths.runnerPid;
10276
10271
  var currentPidFile = null;
10277
- async function ensureRunDir(dirPath, skipSudo) {
10278
- if (!fs9.existsSync(dirPath)) {
10279
- if (skipSudo) {
10280
- fs9.mkdirSync(dirPath, { recursive: true });
10281
- } else {
10282
- await execAsync4(`sudo mkdir -p ${dirPath}`);
10283
- await execAsync4(`sudo chmod 777 ${dirPath}`);
10284
- }
10285
- }
10286
- }
10287
10272
  function isProcessRunning(pid) {
10288
10273
  try {
10289
10274
  process.kill(pid, 0);
@@ -10295,11 +10280,10 @@ function isProcessRunning(pid) {
10295
10280
  return false;
10296
10281
  }
10297
10282
  }
10298
- async function acquireRunnerLock(options = {}) {
10283
+ function acquireRunnerLock(options = {}) {
10299
10284
  const pidFile = options.pidFile ?? DEFAULT_PID_FILE;
10300
- const skipSudo = options.skipSudo ?? false;
10301
10285
  const runDir = path5.dirname(pidFile);
10302
- await ensureRunDir(runDir, skipSudo);
10286
+ fs9.mkdirSync(runDir, { recursive: true });
10303
10287
  if (fs9.existsSync(pidFile)) {
10304
10288
  const pidStr = fs9.readFileSync(pidFile, "utf-8").trim();
10305
10289
  const pid = parseInt(pidStr, 10);
@@ -11194,7 +11178,7 @@ var benchmarkCommand = new Command4("benchmark").description(
11194
11178
  });
11195
11179
 
11196
11180
  // src/index.ts
11197
- var version = true ? "3.10.3" : "0.1.0";
11181
+ var version = true ? "3.11.1" : "0.1.0";
11198
11182
  program.name("vm0-runner").version(version).description("Self-hosted runner for VM0 agents");
11199
11183
  program.addCommand(startCommand);
11200
11184
  program.addCommand(doctorCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/runner",
3
- "version": "3.10.3",
3
+ "version": "3.11.1",
4
4
  "description": "Self-hosted runner for VM0 agents",
5
5
  "repository": {
6
6
  "type": "git",