@vm0/cli 4.35.0 → 4.35.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 +123 -13
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2760,7 +2760,7 @@ var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
2760
2760
  function isValidBase64URL(data) {
2761
2761
  if (!base64url.test(data))
2762
2762
  return false;
2763
- const base643 = data.replace(/[-_]/g, (c11) => c11 === "-" ? "+" : "/");
2763
+ const base643 = data.replace(/[-_]/g, (c12) => c12 === "-" ? "+" : "/");
2764
2764
  const padded = base643.padEnd(Math.ceil(base643.length / 4) * 4, "=");
2765
2765
  return isValidBase64(padded);
2766
2766
  }
@@ -11672,9 +11672,9 @@ var ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => {
11672
11672
  ZodType.init(inst, def);
11673
11673
  inst.min = (value, params) => inst.check(_gte(value, params));
11674
11674
  inst.max = (value, params) => inst.check(_lte(value, params));
11675
- const c11 = inst._zod.bag;
11676
- inst.minDate = c11.minimum ? new Date(c11.minimum) : null;
11677
- inst.maxDate = c11.maximum ? new Date(c11.maximum) : null;
11675
+ const c12 = inst._zod.bag;
11676
+ inst.minDate = c12.minimum ? new Date(c12.minimum) : null;
11677
+ inst.maxDate = c12.maximum ? new Date(c12.maximum) : null;
11678
11678
  });
11679
11679
  function date3(params) {
11680
11680
  return _date(ZodDate, params);
@@ -12302,7 +12302,17 @@ var agentDefinitionSchema = external_exports.object({
12302
12302
  * Array of GitHub tree URLs for agent skills.
12303
12303
  * Each skill is auto-downloaded and mounted at /home/user/.claude/skills/{skillName}/
12304
12304
  */
12305
- skills: external_exports.array(external_exports.string()).optional()
12305
+ skills: external_exports.array(external_exports.string()).optional(),
12306
+ /**
12307
+ * Route this agent to a self-hosted runner instead of E2B.
12308
+ * When specified, runs will be queued for the specified runner group.
12309
+ */
12310
+ experimental_runner: external_exports.object({
12311
+ group: external_exports.string().regex(
12312
+ /^[a-z0-9-]+\/[a-z0-9-]+$/,
12313
+ "Runner group must be in scope/name format (e.g., acme/production)"
12314
+ )
12315
+ }).optional()
12306
12316
  });
12307
12317
  var agentComposeContentSchema = external_exports.object({
12308
12318
  version: external_exports.string().min(1, "Version is required"),
@@ -13602,6 +13612,106 @@ var checkpointsByIdContract = c10.router({
13602
13612
  }
13603
13613
  });
13604
13614
 
13615
+ // ../../packages/core/src/contracts/runners.ts
13616
+ var c11 = initContract();
13617
+ var runnerGroupSchema = external_exports.string().regex(
13618
+ /^[a-z0-9-]+\/[a-z0-9-]+$/,
13619
+ "Runner group must be in scope/name format (e.g., acme/production)"
13620
+ );
13621
+ var jobSchema = external_exports.object({
13622
+ runId: external_exports.string().uuid(),
13623
+ prompt: external_exports.string(),
13624
+ agentComposeVersionId: external_exports.string(),
13625
+ vars: external_exports.record(external_exports.string(), external_exports.string()).nullable(),
13626
+ secretNames: external_exports.array(external_exports.string()).nullable(),
13627
+ checkpointId: external_exports.string().uuid().nullable()
13628
+ });
13629
+ var runnersPollContract = c11.router({
13630
+ poll: {
13631
+ method: "POST",
13632
+ path: "/api/runners/poll",
13633
+ body: external_exports.object({
13634
+ group: runnerGroupSchema
13635
+ }),
13636
+ responses: {
13637
+ 200: external_exports.object({
13638
+ job: jobSchema.nullable()
13639
+ }),
13640
+ 400: apiErrorSchema,
13641
+ 401: apiErrorSchema,
13642
+ 500: apiErrorSchema
13643
+ },
13644
+ summary: "Poll for pending jobs (long-polling with 30s timeout)"
13645
+ }
13646
+ });
13647
+ var storageEntrySchema = external_exports.object({
13648
+ mountPath: external_exports.string(),
13649
+ archiveUrl: external_exports.string().nullable()
13650
+ });
13651
+ var artifactEntrySchema = external_exports.object({
13652
+ mountPath: external_exports.string(),
13653
+ archiveUrl: external_exports.string().nullable(),
13654
+ vasStorageName: external_exports.string(),
13655
+ vasVersionId: external_exports.string()
13656
+ });
13657
+ var storageManifestSchema = external_exports.object({
13658
+ storages: external_exports.array(storageEntrySchema),
13659
+ artifact: artifactEntrySchema.nullable()
13660
+ });
13661
+ var resumeSessionSchema = external_exports.object({
13662
+ sessionId: external_exports.string(),
13663
+ sessionHistory: external_exports.string()
13664
+ });
13665
+ var storedExecutionContextSchema = external_exports.object({
13666
+ workingDir: external_exports.string(),
13667
+ storageManifest: storageManifestSchema.nullable(),
13668
+ environment: external_exports.record(external_exports.string(), external_exports.string()).nullable(),
13669
+ resumeSession: resumeSessionSchema.nullable(),
13670
+ encryptedSecrets: external_exports.string().nullable(),
13671
+ // AES-256-GCM encrypted secrets
13672
+ cliAgentType: external_exports.string(),
13673
+ experimentalNetworkSecurity: external_exports.boolean().optional()
13674
+ });
13675
+ var executionContextSchema = external_exports.object({
13676
+ runId: external_exports.string().uuid(),
13677
+ prompt: external_exports.string(),
13678
+ agentComposeVersionId: external_exports.string(),
13679
+ vars: external_exports.record(external_exports.string(), external_exports.string()).nullable(),
13680
+ secretNames: external_exports.array(external_exports.string()).nullable(),
13681
+ checkpointId: external_exports.string().uuid().nullable(),
13682
+ sandboxToken: external_exports.string(),
13683
+ apiUrl: external_exports.string(),
13684
+ // New fields for E2B parity:
13685
+ workingDir: external_exports.string(),
13686
+ storageManifest: storageManifestSchema.nullable(),
13687
+ environment: external_exports.record(external_exports.string(), external_exports.string()).nullable(),
13688
+ resumeSession: resumeSessionSchema.nullable(),
13689
+ secretValues: external_exports.array(external_exports.string()).nullable(),
13690
+ cliAgentType: external_exports.string()
13691
+ });
13692
+ var runnersJobClaimContract = c11.router({
13693
+ claim: {
13694
+ method: "POST",
13695
+ path: "/api/runners/jobs/:id/claim",
13696
+ pathParams: external_exports.object({
13697
+ id: external_exports.string().uuid()
13698
+ }),
13699
+ body: external_exports.object({}),
13700
+ responses: {
13701
+ 200: executionContextSchema,
13702
+ 400: apiErrorSchema,
13703
+ 401: apiErrorSchema,
13704
+ 403: apiErrorSchema,
13705
+ // Job does not belong to user
13706
+ 404: apiErrorSchema,
13707
+ 409: apiErrorSchema,
13708
+ // Already claimed
13709
+ 500: apiErrorSchema
13710
+ },
13711
+ summary: "Claim a pending job for execution"
13712
+ }
13713
+ });
13714
+
13605
13715
  // ../../packages/core/src/scope-reference.ts
13606
13716
  function getLegacySystemTemplateWarning(legacyFormat) {
13607
13717
  if (!isLegacySystemTemplate(legacyFormat)) {
@@ -15381,9 +15491,9 @@ var CodexEventParser = class {
15381
15491
  }
15382
15492
  }
15383
15493
  if (itemType === "file_change" && item.changes && item.changes.length > 0) {
15384
- const changes = item.changes.map((c11) => {
15385
- const action = c11.kind === "add" ? "Created" : c11.kind === "modify" ? "Modified" : "Deleted";
15386
- return `${action}: ${c11.path}`;
15494
+ const changes = item.changes.map((c12) => {
15495
+ const action = c12.kind === "add" ? "Created" : c12.kind === "modify" ? "Modified" : "Deleted";
15496
+ return `${action}: ${c12.path}`;
15387
15497
  }).join("\n");
15388
15498
  return {
15389
15499
  type: "text",
@@ -15724,9 +15834,9 @@ var CodexEventRenderer = class {
15724
15834
  return;
15725
15835
  }
15726
15836
  if (itemType === "file_change" && item.changes && item.changes.length > 0) {
15727
- const summary = item.changes.map((c11) => {
15728
- const icon = c11.kind === "add" ? "+" : c11.kind === "delete" ? "-" : "~";
15729
- return `${icon}${c11.path}`;
15837
+ const summary = item.changes.map((c12) => {
15838
+ const icon = c12.kind === "add" ? "+" : c12.kind === "delete" ? "-" : "~";
15839
+ return `${icon}${c12.path}`;
15730
15840
  }).join(", ");
15731
15841
  console.log(chalk4.green("[files]") + ` ${summary}`);
15732
15842
  return;
@@ -17624,7 +17734,7 @@ async function autoPullArtifact(runOutput, artifactDir) {
17624
17734
  }
17625
17735
  var cookCmd = new Command17().name("cook").description("One-click agent preparation and execution from vm0.yaml");
17626
17736
  cookCmd.argument("[prompt]", "Prompt for the agent").option("-y, --yes", "Skip confirmation prompts").action(async (prompt, options) => {
17627
- const shouldExit = await checkAndUpgrade("4.35.0", prompt);
17737
+ const shouldExit = await checkAndUpgrade("4.35.1", prompt);
17628
17738
  if (shouldExit) {
17629
17739
  process.exit(0);
17630
17740
  }
@@ -19252,7 +19362,7 @@ var setupGithubCommand = new Command28().name("setup-github").description("Initi
19252
19362
 
19253
19363
  // src/index.ts
19254
19364
  var program = new Command29();
19255
- program.name("vm0").description("VM0 CLI - A modern build tool").version("4.35.0");
19365
+ program.name("vm0").description("VM0 CLI - A modern build tool").version("4.35.1");
19256
19366
  program.command("info").description("Display environment information").action(async () => {
19257
19367
  console.log(chalk31.bold("System Information:"));
19258
19368
  console.log(`Node Version: ${process.version}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "4.35.0",
3
+ "version": "4.35.1",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",