@vm0/cli 9.154.0 → 9.154.2

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.
@@ -74083,7 +74083,7 @@ if (DSN) {
74083
74083
  init2({
74084
74084
  dsn: DSN,
74085
74085
  environment: process.env.SENTRY_ENVIRONMENT ?? "production",
74086
- release: "9.154.0",
74086
+ release: "9.154.2",
74087
74087
  sendDefaultPii: false,
74088
74088
  tracesSampleRate: 0,
74089
74089
  shutdownTimeout: 500,
@@ -74102,7 +74102,7 @@ if (DSN) {
74102
74102
  }
74103
74103
  });
74104
74104
  setContext("cli", {
74105
- version: "9.154.0",
74105
+ version: "9.154.2",
74106
74106
  command: process.argv.slice(2).join(" ")
74107
74107
  });
74108
74108
  setContext("runtime", {
@@ -74216,10 +74216,10 @@ function decodeZeroTokenPayload(token) {
74216
74216
  return void 0;
74217
74217
  }
74218
74218
 
74219
- // src/commands/zero/remote-agent/index.ts
74219
+ // src/commands/zero/local-agent/index.ts
74220
74220
  init_esm_shims();
74221
74221
 
74222
- // src/commands/zero/remote-agent/host.ts
74222
+ // src/commands/zero/local-agent/host.ts
74223
74223
  init_esm_shims();
74224
74224
  import { hostname as hostname4 } from "os";
74225
74225
 
@@ -74724,7 +74724,7 @@ var chalk = createChalk();
74724
74724
  var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
74725
74725
  var source_default = chalk;
74726
74726
 
74727
- // src/commands/zero/remote-agent/host.ts
74727
+ // src/commands/zero/local-agent/host.ts
74728
74728
  import { Realtime as Realtime2 } from "ably";
74729
74729
 
74730
74730
  // src/lib/command/with-error-handler.ts
@@ -88725,24 +88725,24 @@ async function clearConfig() {
88725
88725
  await unlink(configFile);
88726
88726
  }
88727
88727
  }
88728
- async function saveRemoteAgentHost(host) {
88729
- await saveConfig({ remoteAgentHost: host });
88728
+ async function saveLocalAgentHost(host) {
88729
+ await saveConfig({ localAgentHost: host });
88730
88730
  }
88731
- async function clearRemoteAgentHost(hostId) {
88731
+ async function clearLocalAgentHost(hostId) {
88732
88732
  const existing = await loadConfig();
88733
- if (existing.remoteAgentHost?.id !== hostId) {
88733
+ if (existing.localAgentHost?.id !== hostId) {
88734
88734
  return;
88735
88735
  }
88736
88736
  const nextConfig = { ...existing };
88737
- delete nextConfig.remoteAgentHost;
88737
+ delete nextConfig.localAgentHost;
88738
88738
  const configDir = getConfigDir();
88739
88739
  const configFile = getConfigFile();
88740
88740
  await mkdir(configDir, { recursive: true });
88741
88741
  await writeFile(configFile, JSON.stringify(nextConfig, null, 2), "utf8");
88742
88742
  }
88743
- async function getRemoteAgentHost() {
88743
+ async function getLocalAgentHost() {
88744
88744
  const config4 = await loadConfig();
88745
- return config4.remoteAgentHost;
88745
+ return config4.localAgentHost;
88746
88746
  }
88747
88747
 
88748
88748
  // src/lib/api/core/client-factory.ts
@@ -98877,19 +98877,18 @@ var localBrowser = {
98877
98877
  }
98878
98878
  };
98879
98879
 
98880
- // ../../packages/connectors/src/connectors/remote-agent.ts
98880
+ // ../../packages/connectors/src/connectors/local-agent.ts
98881
98881
  init_esm_shims();
98882
- var remoteAgent = {
98883
- "remote-agent": {
98884
- label: "Remote Agent",
98882
+ var localAgent = {
98883
+ "local-agent": {
98884
+ label: "Local Agent",
98885
98885
  category: "engineering-team-execution",
98886
98886
  environmentMapping: {},
98887
- helpText: "Run local Codex or Claude Code hosts, then call them from chat with `/remote-agent ${host} prompt`",
98887
+ helpText: "Run local Codex or Claude Code hosts, then call them from chat with `/local-agent ${host} prompt`",
98888
98888
  authMethods: {
98889
98889
  api: {
98890
- featureFlag: "remoteAgent" /* RemoteAgent */,
98891
98890
  label: "CLI Host",
98892
- helpText: "1. Run `npx -p @vm0/cli vm0 login`\n2. Start a host with `npx -p @vm0/cli vm0 remote-agent start`\n3. Keep the host process running, then return here and click **Connect** once it appears online\n4. Run a connected host from chat with `/remote-agent ${host} prompt`",
98891
+ helpText: "1. Run `npx -p @vm0/cli vm0 login`\n2. Start a host with `npx -p @vm0/cli vm0 local-agent start`\n3. Keep the host process running, then return here and click **Connect** once it appears online\n4. Run a connected host from chat with `/local-agent ${host} prompt`",
98893
98892
  secrets: {}
98894
98893
  }
98895
98894
  },
@@ -103384,7 +103383,7 @@ var CONNECTOR_TYPES_DEF = {
103384
103383
  ...minimax,
103385
103384
  ...reportei,
103386
103385
  ...localBrowser,
103387
- ...remoteAgent,
103386
+ ...localAgent,
103388
103387
  ...serpapi,
103389
103388
  ...salesforce,
103390
103389
  ...reddit,
@@ -103755,10 +103754,10 @@ var zeroComputerConnectorContract = c16.router({
103755
103754
  summary: "Delete computer connector (zero proxy)"
103756
103755
  }
103757
103756
  });
103758
- var zeroRemoteAgentConnectorContract = c16.router({
103757
+ var zeroLocalAgentConnectorContract = c16.router({
103759
103758
  create: {
103760
103759
  method: "POST",
103761
- path: "/api/zero/connectors/remote-agent",
103760
+ path: "/api/zero/connectors/local-agent",
103762
103761
  headers: authHeadersSchema,
103763
103762
  body: external_exports.object({}).optional(),
103764
103763
  responses: {
@@ -103768,7 +103767,7 @@ var zeroRemoteAgentConnectorContract = c16.router({
103768
103767
  403: apiErrorSchema,
103769
103768
  409: apiErrorSchema
103770
103769
  },
103771
- summary: "Connect remote-agent connector"
103770
+ summary: "Connect local-agent connector"
103772
103771
  }
103773
103772
  });
103774
103773
  var zeroLocalBrowserConnectorContract = c16.router({
@@ -106509,10 +106508,10 @@ async function getComputerUseHost() {
106509
106508
  handleError(result, "Failed to get computer-use host");
106510
106509
  }
106511
106510
 
106512
- // src/lib/api/domains/zero-remote-agent.ts
106511
+ // src/lib/api/domains/zero-local-agent.ts
106513
106512
  init_esm_shims();
106514
106513
 
106515
- // ../../packages/api-contracts/src/contracts/zero-remote-agent.ts
106514
+ // ../../packages/api-contracts/src/contracts/zero-local-agent.ts
106516
106515
  init_esm_shims();
106517
106516
 
106518
106517
  // ../../packages/api-contracts/src/contracts/realtime.ts
@@ -106568,34 +106567,34 @@ var platformRealtimeTokenContract = c25.router({
106568
106567
  }
106569
106568
  });
106570
106569
 
106571
- // ../../packages/api-contracts/src/contracts/zero-remote-agent.ts
106570
+ // ../../packages/api-contracts/src/contracts/zero-local-agent.ts
106572
106571
  var c26 = initContract();
106573
- var remoteAgentBackendSchema = external_exports.enum(["codex", "claude-code"]);
106574
- var remoteAgentJobStatusSchema = external_exports.enum([
106572
+ var localAgentBackendSchema = external_exports.enum(["codex", "claude-code"]);
106573
+ var localAgentJobStatusSchema = external_exports.enum([
106575
106574
  "queued",
106576
106575
  "running",
106577
106576
  "succeeded",
106578
106577
  "failed"
106579
106578
  ]);
106580
- var remoteAgentHostStatusSchema = external_exports.enum(["online", "closed"]);
106579
+ var localAgentHostStatusSchema = external_exports.enum(["online", "closed"]);
106581
106580
  var hostNameSchema = external_exports.string().trim().min(1).max(128);
106582
- var supportedBackendsSchema = external_exports.array(remoteAgentBackendSchema).min(1).max(2);
106581
+ var supportedBackendsSchema = external_exports.array(localAgentBackendSchema).min(1).max(2);
106583
106582
  var promptSchema = external_exports.string().trim().min(1).max(6e4);
106584
- var remoteAgentRealtimeSubscriptionSchema = external_exports.object({
106583
+ var localAgentRealtimeSubscriptionSchema = external_exports.object({
106585
106584
  channelName: external_exports.string(),
106586
106585
  eventName: external_exports.string(),
106587
106586
  tokenRequest: ablyTokenRequestSchema
106588
106587
  });
106589
- var remoteAgentDeviceStartResponseSchema = external_exports.object({
106588
+ var localAgentDeviceStartResponseSchema = external_exports.object({
106590
106589
  deviceCode: external_exports.string(),
106591
106590
  userCode: external_exports.string(),
106592
106591
  verificationPath: external_exports.string(),
106593
106592
  expiresIn: external_exports.number().int().positive(),
106594
106593
  interval: external_exports.number().int().positive(),
106595
106594
  pollToken: external_exports.string(),
106596
- realtime: remoteAgentRealtimeSubscriptionSchema.optional()
106595
+ realtime: localAgentRealtimeSubscriptionSchema.optional()
106597
106596
  });
106598
- var remoteAgentDevicePollResponseSchema = external_exports.discriminatedUnion(
106597
+ var localAgentDevicePollResponseSchema = external_exports.discriminatedUnion(
106599
106598
  "status",
106600
106599
  [
106601
106600
  external_exports.object({ status: external_exports.literal("pending") }),
@@ -106607,23 +106606,23 @@ var remoteAgentDevicePollResponseSchema = external_exports.discriminatedUnion(
106607
106606
  external_exports.object({ status: external_exports.literal("expired") })
106608
106607
  ]
106609
106608
  );
106610
- var remoteAgentDeviceClaimResponseSchema = external_exports.object({
106609
+ var localAgentDeviceClaimResponseSchema = external_exports.object({
106611
106610
  status: external_exports.literal("approved")
106612
106611
  });
106613
- var remoteAgentHeartbeatResponseSchema = external_exports.object({
106612
+ var localAgentHeartbeatResponseSchema = external_exports.object({
106614
106613
  ok: external_exports.literal(true),
106615
106614
  hostId: external_exports.string()
106616
106615
  });
106617
- var remoteAgentRunCreateResponseSchema = external_exports.object({
106616
+ var localAgentRunCreateResponseSchema = external_exports.object({
106618
106617
  jobId: external_exports.string(),
106619
- status: remoteAgentJobStatusSchema
106618
+ status: localAgentJobStatusSchema
106620
106619
  });
106621
- var remoteAgentRunResponseSchema = external_exports.object({
106620
+ var localAgentRunResponseSchema = external_exports.object({
106622
106621
  id: external_exports.string(),
106623
106622
  hostId: external_exports.string().nullable(),
106624
- backend: remoteAgentBackendSchema.nullable(),
106623
+ backend: localAgentBackendSchema.nullable(),
106625
106624
  prompt: external_exports.string(),
106626
- status: remoteAgentJobStatusSchema,
106625
+ status: localAgentJobStatusSchema,
106627
106626
  output: external_exports.string().nullable(),
106628
106627
  error: external_exports.string().nullable(),
106629
106628
  exitCode: external_exports.number().int().nullable(),
@@ -106631,13 +106630,13 @@ var remoteAgentRunResponseSchema = external_exports.object({
106631
106630
  startedAt: external_exports.string().nullable(),
106632
106631
  completedAt: external_exports.string().nullable()
106633
106632
  });
106634
- var remoteAgentRunListItemSchema = remoteAgentRunResponseSchema.omit({ output: true, error: true }).extend({
106633
+ var localAgentRunListItemSchema = localAgentRunResponseSchema.omit({ output: true, error: true }).extend({
106635
106634
  hostName: external_exports.string().nullable()
106636
106635
  });
106637
- var remoteAgentRunListResponseSchema = external_exports.object({
106638
- runs: external_exports.array(remoteAgentRunListItemSchema)
106636
+ var localAgentRunListResponseSchema = external_exports.object({
106637
+ runs: external_exports.array(localAgentRunListItemSchema)
106639
106638
  });
106640
- var remoteAgentHostJobNextResponseSchema = external_exports.discriminatedUnion(
106639
+ var localAgentHostJobNextResponseSchema = external_exports.discriminatedUnion(
106641
106640
  "status",
106642
106641
  [
106643
106642
  external_exports.object({ status: external_exports.literal("idle") }),
@@ -106645,168 +106644,168 @@ var remoteAgentHostJobNextResponseSchema = external_exports.discriminatedUnion(
106645
106644
  status: external_exports.literal("job"),
106646
106645
  job: external_exports.object({
106647
106646
  id: external_exports.string(),
106648
- backend: remoteAgentBackendSchema,
106647
+ backend: localAgentBackendSchema,
106649
106648
  prompt: external_exports.string()
106650
106649
  })
106651
106650
  })
106652
106651
  ]
106653
106652
  );
106654
- var remoteAgentHostJobCompleteResponseSchema = external_exports.object({
106653
+ var localAgentHostJobCompleteResponseSchema = external_exports.object({
106655
106654
  ok: external_exports.literal(true)
106656
106655
  });
106657
- var remoteAgentHostSchema = external_exports.object({
106656
+ var localAgentHostSchema = external_exports.object({
106658
106657
  id: external_exports.string(),
106659
106658
  displayName: external_exports.string(),
106660
- supportedBackends: external_exports.array(remoteAgentBackendSchema),
106661
- status: remoteAgentHostStatusSchema,
106659
+ supportedBackends: external_exports.array(localAgentBackendSchema),
106660
+ status: localAgentHostStatusSchema,
106662
106661
  lastSeenAt: external_exports.string(),
106663
106662
  createdAt: external_exports.string()
106664
106663
  });
106665
- var remoteAgentHostListResponseSchema = external_exports.object({
106666
- hosts: external_exports.array(remoteAgentHostSchema)
106664
+ var localAgentHostListResponseSchema = external_exports.object({
106665
+ hosts: external_exports.array(localAgentHostSchema)
106667
106666
  });
106668
- var remoteAgentHostStartResponseSchema = external_exports.object({
106667
+ var localAgentHostStartResponseSchema = external_exports.object({
106669
106668
  hostId: external_exports.string(),
106670
106669
  hostToken: external_exports.string()
106671
106670
  });
106672
- var remoteAgentHostDeleteResponseSchema = external_exports.object({
106671
+ var localAgentHostDeleteResponseSchema = external_exports.object({
106673
106672
  ok: external_exports.literal(true)
106674
106673
  });
106675
- var zeroRemoteAgentDeviceStartContract = c26.router({
106674
+ var zeroLocalAgentDeviceStartContract = c26.router({
106676
106675
  start: {
106677
106676
  method: "POST",
106678
- path: "/api/zero/remote-agent/device/start",
106677
+ path: "/api/zero/local-agent/device/start",
106679
106678
  body: external_exports.object({
106680
106679
  hostName: hostNameSchema,
106681
106680
  supportedBackends: supportedBackendsSchema
106682
106681
  }),
106683
106682
  responses: {
106684
- 200: remoteAgentDeviceStartResponseSchema,
106683
+ 200: localAgentDeviceStartResponseSchema,
106685
106684
  400: apiErrorSchema
106686
106685
  },
106687
- summary: "Start a remote-agent device pairing flow"
106686
+ summary: "Start a local-agent device pairing flow"
106688
106687
  }
106689
106688
  });
106690
- var zeroRemoteAgentDevicePollContract = c26.router({
106689
+ var zeroLocalAgentDevicePollContract = c26.router({
106691
106690
  poll: {
106692
106691
  method: "POST",
106693
- path: "/api/zero/remote-agent/device/poll",
106692
+ path: "/api/zero/local-agent/device/poll",
106694
106693
  body: external_exports.object({
106695
106694
  deviceCode: external_exports.string().min(1),
106696
106695
  pollToken: external_exports.string().min(1)
106697
106696
  }),
106698
106697
  responses: {
106699
- 200: remoteAgentDevicePollResponseSchema,
106698
+ 200: localAgentDevicePollResponseSchema,
106700
106699
  400: apiErrorSchema
106701
106700
  },
106702
- summary: "Poll a remote-agent device pairing flow"
106701
+ summary: "Poll a local-agent device pairing flow"
106703
106702
  }
106704
106703
  });
106705
- var zeroRemoteAgentDeviceClaimContract = c26.router({
106704
+ var zeroLocalAgentDeviceClaimContract = c26.router({
106706
106705
  claim: {
106707
106706
  method: "POST",
106708
- path: "/api/zero/remote-agent/device/claim",
106707
+ path: "/api/zero/local-agent/device/claim",
106709
106708
  headers: authHeadersSchema,
106710
106709
  body: external_exports.object({
106711
106710
  deviceCode: external_exports.string().min(1)
106712
106711
  }),
106713
106712
  responses: {
106714
- 200: remoteAgentDeviceClaimResponseSchema,
106713
+ 200: localAgentDeviceClaimResponseSchema,
106715
106714
  400: apiErrorSchema,
106716
106715
  401: apiErrorSchema,
106717
106716
  403: apiErrorSchema,
106718
106717
  404: apiErrorSchema,
106719
106718
  409: apiErrorSchema
106720
106719
  },
106721
- summary: "Approve a remote-agent device pairing flow"
106720
+ summary: "Approve a local-agent device pairing flow"
106722
106721
  }
106723
106722
  });
106724
- var zeroRemoteAgentHeartbeatContract = c26.router({
106723
+ var zeroLocalAgentHeartbeatContract = c26.router({
106725
106724
  heartbeat: {
106726
106725
  method: "POST",
106727
- path: "/api/zero/remote-agent/heartbeat",
106726
+ path: "/api/zero/local-agent/heartbeat",
106728
106727
  headers: authHeadersSchema,
106729
106728
  body: external_exports.object({
106730
106729
  hostName: hostNameSchema,
106731
106730
  supportedBackends: supportedBackendsSchema
106732
106731
  }),
106733
106732
  responses: {
106734
- 200: remoteAgentHeartbeatResponseSchema,
106733
+ 200: localAgentHeartbeatResponseSchema,
106735
106734
  400: apiErrorSchema,
106736
106735
  401: apiErrorSchema
106737
106736
  },
106738
- summary: "Refresh a linked remote-agent host heartbeat"
106737
+ summary: "Refresh a linked local-agent host heartbeat"
106739
106738
  }
106740
106739
  });
106741
- var zeroRemoteAgentHostRealtimeContract = c26.router({
106740
+ var zeroLocalAgentHostRealtimeContract = c26.router({
106742
106741
  create: {
106743
106742
  method: "POST",
106744
- path: "/api/zero/remote-agent/host/realtime-token",
106743
+ path: "/api/zero/local-agent/host/realtime-token",
106745
106744
  headers: authHeadersSchema,
106746
106745
  body: external_exports.object({}),
106747
106746
  responses: {
106748
- 200: remoteAgentRealtimeSubscriptionSchema,
106747
+ 200: localAgentRealtimeSubscriptionSchema,
106749
106748
  401: apiErrorSchema
106750
106749
  },
106751
- summary: "Get Ably token for remote-agent host job notifications"
106750
+ summary: "Get Ably token for local-agent host job notifications"
106752
106751
  }
106753
106752
  });
106754
- var zeroRemoteAgentRunContract = c26.router({
106753
+ var zeroLocalAgentRunContract = c26.router({
106755
106754
  list: {
106756
106755
  method: "GET",
106757
- path: "/api/zero/remote-agent/runs",
106756
+ path: "/api/zero/local-agent/runs",
106758
106757
  headers: authHeadersSchema,
106759
106758
  query: external_exports.object({
106760
- status: remoteAgentJobStatusSchema.optional(),
106759
+ status: localAgentJobStatusSchema.optional(),
106761
106760
  hostId: external_exports.string().min(1).optional(),
106762
106761
  hostName: external_exports.string().trim().min(1).max(128).optional(),
106763
106762
  limit: external_exports.coerce.number().int().min(1).max(100).default(20)
106764
106763
  }),
106765
106764
  responses: {
106766
- 200: remoteAgentRunListResponseSchema,
106765
+ 200: localAgentRunListResponseSchema,
106767
106766
  401: apiErrorSchema,
106768
106767
  403: apiErrorSchema
106769
106768
  },
106770
- summary: "List remote-agent jobs"
106769
+ summary: "List local-agent jobs"
106771
106770
  },
106772
106771
  create: {
106773
106772
  method: "POST",
106774
- path: "/api/zero/remote-agent/run",
106773
+ path: "/api/zero/local-agent/run",
106775
106774
  headers: authHeadersSchema,
106776
106775
  body: external_exports.object({
106777
106776
  prompt: promptSchema,
106778
106777
  hostName: external_exports.string().trim().min(1).max(128).optional()
106779
106778
  }),
106780
106779
  responses: {
106781
- 200: remoteAgentRunCreateResponseSchema,
106780
+ 200: localAgentRunCreateResponseSchema,
106782
106781
  400: apiErrorSchema,
106783
106782
  401: apiErrorSchema,
106784
106783
  403: apiErrorSchema,
106785
106784
  404: apiErrorSchema,
106786
106785
  409: apiErrorSchema
106787
106786
  },
106788
- summary: "Create a remote-agent job"
106787
+ summary: "Create a local-agent job"
106789
106788
  },
106790
106789
  get: {
106791
106790
  method: "GET",
106792
- path: "/api/zero/remote-agent/run/:jobId",
106791
+ path: "/api/zero/local-agent/run/:jobId",
106793
106792
  pathParams: external_exports.object({
106794
106793
  jobId: external_exports.string().min(1)
106795
106794
  }),
106796
106795
  headers: authHeadersSchema,
106797
106796
  responses: {
106798
- 200: remoteAgentRunResponseSchema,
106797
+ 200: localAgentRunResponseSchema,
106799
106798
  401: apiErrorSchema,
106800
106799
  403: apiErrorSchema,
106801
106800
  404: apiErrorSchema
106802
106801
  },
106803
- summary: "Get a remote-agent job"
106802
+ summary: "Get a local-agent job"
106804
106803
  }
106805
106804
  });
106806
- var zeroRemoteAgentHostsContract = c26.router({
106805
+ var zeroLocalAgentHostsContract = c26.router({
106807
106806
  start: {
106808
106807
  method: "POST",
106809
- path: "/api/zero/remote-agent/hosts/start",
106808
+ path: "/api/zero/local-agent/hosts/start",
106810
106809
  headers: authHeadersSchema,
106811
106810
  body: external_exports.object({
106812
106811
  hostName: hostNameSchema,
@@ -106814,60 +106813,60 @@ var zeroRemoteAgentHostsContract = c26.router({
106814
106813
  hostId: external_exports.string().min(1).optional()
106815
106814
  }),
106816
106815
  responses: {
106817
- 200: remoteAgentHostStartResponseSchema,
106816
+ 200: localAgentHostStartResponseSchema,
106818
106817
  400: apiErrorSchema,
106819
106818
  401: apiErrorSchema,
106820
106819
  403: apiErrorSchema,
106821
106820
  404: apiErrorSchema
106822
106821
  },
106823
- summary: "Start or reactivate a remote-agent host"
106822
+ summary: "Start or reactivate a local-agent host"
106824
106823
  },
106825
106824
  list: {
106826
106825
  method: "GET",
106827
- path: "/api/zero/remote-agent/hosts",
106826
+ path: "/api/zero/local-agent/hosts",
106828
106827
  headers: authHeadersSchema,
106829
106828
  responses: {
106830
- 200: remoteAgentHostListResponseSchema,
106829
+ 200: localAgentHostListResponseSchema,
106831
106830
  401: apiErrorSchema,
106832
106831
  403: apiErrorSchema
106833
106832
  },
106834
- summary: "List linked remote-agent hosts"
106833
+ summary: "List linked local-agent hosts"
106835
106834
  },
106836
106835
  delete: {
106837
106836
  method: "DELETE",
106838
- path: "/api/zero/remote-agent/hosts/:hostId",
106837
+ path: "/api/zero/local-agent/hosts/:hostId",
106839
106838
  pathParams: external_exports.object({
106840
106839
  hostId: external_exports.string().min(1)
106841
106840
  }),
106842
106841
  headers: authHeadersSchema,
106843
106842
  body: c26.noBody(),
106844
106843
  responses: {
106845
- 200: remoteAgentHostDeleteResponseSchema,
106844
+ 200: localAgentHostDeleteResponseSchema,
106846
106845
  401: apiErrorSchema,
106847
106846
  403: apiErrorSchema,
106848
106847
  404: apiErrorSchema
106849
106848
  },
106850
- summary: "Delete a remote-agent host"
106849
+ summary: "Delete a local-agent host"
106851
106850
  }
106852
106851
  });
106853
- var zeroRemoteAgentHostJobsContract = c26.router({
106852
+ var zeroLocalAgentHostJobsContract = c26.router({
106854
106853
  next: {
106855
106854
  method: "POST",
106856
- path: "/api/zero/remote-agent/host/jobs/next",
106855
+ path: "/api/zero/local-agent/host/jobs/next",
106857
106856
  headers: authHeadersSchema,
106858
106857
  body: external_exports.object({
106859
106858
  supportedBackends: supportedBackendsSchema
106860
106859
  }),
106861
106860
  responses: {
106862
- 200: remoteAgentHostJobNextResponseSchema,
106861
+ 200: localAgentHostJobNextResponseSchema,
106863
106862
  400: apiErrorSchema,
106864
106863
  401: apiErrorSchema
106865
106864
  },
106866
- summary: "Claim the next remote-agent host job"
106865
+ summary: "Claim the next local-agent host job"
106867
106866
  },
106868
106867
  complete: {
106869
106868
  method: "POST",
106870
- path: "/api/zero/remote-agent/host/jobs/:jobId/complete",
106869
+ path: "/api/zero/local-agent/host/jobs/:jobId/complete",
106871
106870
  pathParams: external_exports.object({
106872
106871
  jobId: external_exports.string().min(1)
106873
106872
  }),
@@ -106879,21 +106878,21 @@ var zeroRemoteAgentHostJobsContract = c26.router({
106879
106878
  exitCode: external_exports.number().int().optional()
106880
106879
  }),
106881
106880
  responses: {
106882
- 200: remoteAgentHostJobCompleteResponseSchema,
106881
+ 200: localAgentHostJobCompleteResponseSchema,
106883
106882
  400: apiErrorSchema,
106884
106883
  401: apiErrorSchema,
106885
106884
  404: apiErrorSchema,
106886
106885
  409: apiErrorSchema
106887
106886
  },
106888
- summary: "Complete a remote-agent host job"
106887
+ summary: "Complete a local-agent host job"
106889
106888
  }
106890
106889
  });
106891
106890
 
106892
- // src/lib/api/domains/zero-remote-agent.ts
106891
+ // src/lib/api/domains/zero-local-agent.ts
106893
106892
  function normalizeConfiguredUrl(value) {
106894
106893
  return value.startsWith("http") ? value : `https://${value}`;
106895
106894
  }
106896
- function resolveRemoteAgentApiBaseUrl(baseUrl) {
106895
+ function resolveLocalAgentApiBaseUrl(baseUrl) {
106897
106896
  const override = process.env.VM0_API_BACKEND_URL;
106898
106897
  if (override) {
106899
106898
  return normalizeConfiguredUrl(override).replace(/\/$/, "");
@@ -106915,8 +106914,8 @@ function buildHeaders2(token) {
106915
106914
  }
106916
106915
  return headers;
106917
106916
  }
106918
- async function getRemoteAgentClientConfig() {
106919
- const baseUrl = resolveRemoteAgentApiBaseUrl(await getBaseUrl());
106917
+ async function getLocalAgentClientConfig() {
106918
+ const baseUrl = resolveLocalAgentApiBaseUrl(await getBaseUrl());
106920
106919
  const token = await getActiveToken();
106921
106920
  if (!token) {
106922
106921
  throw new ApiRequestError("Not authenticated", "UNAUTHORIZED", 401);
@@ -106930,9 +106929,9 @@ async function getRemoteAgentClientConfig() {
106930
106929
  function buildBearerHeaders(token) {
106931
106930
  return buildHeaders2(token);
106932
106931
  }
106933
- async function sendRemoteAgentHeartbeat(params) {
106934
- const baseUrl = resolveRemoteAgentApiBaseUrl(await getBaseUrl());
106935
- const client = initClient(zeroRemoteAgentHeartbeatContract, {
106932
+ async function sendLocalAgentHeartbeat(params) {
106933
+ const baseUrl = resolveLocalAgentApiBaseUrl(await getBaseUrl());
106934
+ const client = initClient(zeroLocalAgentHeartbeatContract, {
106936
106935
  baseUrl,
106937
106936
  baseHeaders: buildBearerHeaders(params.hostToken),
106938
106937
  jsonQuery: false
@@ -106946,11 +106945,11 @@ async function sendRemoteAgentHeartbeat(params) {
106946
106945
  if (result.status === 200) {
106947
106946
  return { hostId: result.body.hostId };
106948
106947
  }
106949
- handleError(result, "Failed to send remote-agent heartbeat");
106948
+ handleError(result, "Failed to send local-agent heartbeat");
106950
106949
  }
106951
- async function createRemoteAgentHostRealtimeSubscription(params) {
106952
- const baseUrl = resolveRemoteAgentApiBaseUrl(await getBaseUrl());
106953
- const client = initClient(zeroRemoteAgentHostRealtimeContract, {
106950
+ async function createLocalAgentHostRealtimeSubscription(params) {
106951
+ const baseUrl = resolveLocalAgentApiBaseUrl(await getBaseUrl());
106952
+ const client = initClient(zeroLocalAgentHostRealtimeContract, {
106954
106953
  baseUrl,
106955
106954
  baseHeaders: buildBearerHeaders(params.hostToken),
106956
106955
  jsonQuery: false
@@ -106959,58 +106958,58 @@ async function createRemoteAgentHostRealtimeSubscription(params) {
106959
106958
  if (result.status === 200) {
106960
106959
  return result.body;
106961
106960
  }
106962
- handleError(result, "Failed to create remote-agent realtime subscription");
106961
+ handleError(result, "Failed to create local-agent realtime subscription");
106963
106962
  }
106964
- async function createRemoteAgentRun(params) {
106965
- const config4 = await getRemoteAgentClientConfig();
106966
- const client = initClient(zeroRemoteAgentRunContract, config4);
106963
+ async function createLocalAgentRun(params) {
106964
+ const config4 = await getLocalAgentClientConfig();
106965
+ const client = initClient(zeroLocalAgentRunContract, config4);
106967
106966
  const result = await client.create({ body: params });
106968
106967
  if (result.status === 200) {
106969
106968
  return result.body;
106970
106969
  }
106971
- handleError(result, "Failed to create remote-agent run");
106970
+ handleError(result, "Failed to create local-agent run");
106972
106971
  }
106973
- async function startRemoteAgentHost(params) {
106974
- const config4 = await getRemoteAgentClientConfig();
106975
- const client = initClient(zeroRemoteAgentHostsContract, config4);
106972
+ async function startLocalAgentHost(params) {
106973
+ const config4 = await getLocalAgentClientConfig();
106974
+ const client = initClient(zeroLocalAgentHostsContract, config4);
106976
106975
  const result = await client.start({ body: params });
106977
106976
  if (result.status === 200) {
106978
106977
  return result.body;
106979
106978
  }
106980
- handleError(result, "Failed to start remote-agent host");
106979
+ handleError(result, "Failed to start local-agent host");
106981
106980
  }
106982
- async function listRemoteAgentHosts() {
106983
- const config4 = await getRemoteAgentClientConfig();
106984
- const client = initClient(zeroRemoteAgentHostsContract, config4);
106981
+ async function listLocalAgentHosts() {
106982
+ const config4 = await getLocalAgentClientConfig();
106983
+ const client = initClient(zeroLocalAgentHostsContract, config4);
106985
106984
  const result = await client.list({ headers: {} });
106986
106985
  if (result.status === 200) {
106987
106986
  return result.body;
106988
106987
  }
106989
- handleError(result, "Failed to list remote-agent hosts");
106988
+ handleError(result, "Failed to list local-agent hosts");
106990
106989
  }
106991
- async function deleteRemoteAgentHost(hostId) {
106992
- const config4 = await getRemoteAgentClientConfig();
106993
- const client = initClient(zeroRemoteAgentHostsContract, config4);
106990
+ async function deleteLocalAgentHost(hostId) {
106991
+ const config4 = await getLocalAgentClientConfig();
106992
+ const client = initClient(zeroLocalAgentHostsContract, config4);
106994
106993
  const result = await client.delete({
106995
106994
  params: { hostId }
106996
106995
  });
106997
106996
  if (result.status === 200) {
106998
106997
  return;
106999
106998
  }
107000
- handleError(result, "Failed to delete remote-agent host");
106999
+ handleError(result, "Failed to delete local-agent host");
107001
107000
  }
107002
- async function getRemoteAgentRun(jobId) {
107003
- const config4 = await getRemoteAgentClientConfig();
107004
- const client = initClient(zeroRemoteAgentRunContract, config4);
107001
+ async function getLocalAgentRun(jobId) {
107002
+ const config4 = await getLocalAgentClientConfig();
107003
+ const client = initClient(zeroLocalAgentRunContract, config4);
107005
107004
  const result = await client.get({ params: { jobId } });
107006
107005
  if (result.status === 200) {
107007
107006
  return result.body;
107008
107007
  }
107009
- handleError(result, "Failed to get remote-agent run");
107008
+ handleError(result, "Failed to get local-agent run");
107010
107009
  }
107011
- async function listRemoteAgentRuns(params) {
107012
- const config4 = await getRemoteAgentClientConfig();
107013
- const client = initClient(zeroRemoteAgentRunContract, config4);
107010
+ async function listLocalAgentRuns(params) {
107011
+ const config4 = await getLocalAgentClientConfig();
107012
+ const client = initClient(zeroLocalAgentRunContract, config4);
107014
107013
  const result = await client.list({
107015
107014
  headers: {},
107016
107015
  query: {
@@ -107021,11 +107020,11 @@ async function listRemoteAgentRuns(params) {
107021
107020
  if (result.status === 200) {
107022
107021
  return result.body;
107023
107022
  }
107024
- handleError(result, "Failed to list remote-agent runs");
107023
+ handleError(result, "Failed to list local-agent runs");
107025
107024
  }
107026
- async function claimNextRemoteAgentHostJob(params) {
107027
- const baseUrl = resolveRemoteAgentApiBaseUrl(await getBaseUrl());
107028
- const client = initClient(zeroRemoteAgentHostJobsContract, {
107025
+ async function claimNextLocalAgentHostJob(params) {
107026
+ const baseUrl = resolveLocalAgentApiBaseUrl(await getBaseUrl());
107027
+ const client = initClient(zeroLocalAgentHostJobsContract, {
107029
107028
  baseUrl,
107030
107029
  baseHeaders: buildBearerHeaders(params.hostToken),
107031
107030
  jsonQuery: false
@@ -107036,11 +107035,11 @@ async function claimNextRemoteAgentHostJob(params) {
107036
107035
  if (result.status === 200) {
107037
107036
  return result.body;
107038
107037
  }
107039
- handleError(result, "Failed to claim remote-agent job");
107038
+ handleError(result, "Failed to claim local-agent job");
107040
107039
  }
107041
- async function completeRemoteAgentHostJob(params) {
107042
- const baseUrl = resolveRemoteAgentApiBaseUrl(await getBaseUrl());
107043
- const client = initClient(zeroRemoteAgentHostJobsContract, {
107040
+ async function completeLocalAgentHostJob(params) {
107041
+ const baseUrl = resolveLocalAgentApiBaseUrl(await getBaseUrl());
107042
+ const client = initClient(zeroLocalAgentHostJobsContract, {
107044
107043
  baseUrl,
107045
107044
  baseHeaders: buildBearerHeaders(params.hostToken),
107046
107045
  jsonQuery: false
@@ -107057,7 +107056,7 @@ async function completeRemoteAgentHostJob(params) {
107057
107056
  if (result.status === 200) {
107058
107057
  return;
107059
107058
  }
107060
- handleError(result, "Failed to complete remote-agent job");
107059
+ handleError(result, "Failed to complete local-agent job");
107061
107060
  }
107062
107061
 
107063
107062
  // src/lib/api/domains/zero-local-browser.ts
@@ -108522,7 +108521,7 @@ async function promptPassword(message) {
108522
108521
  return response.value;
108523
108522
  }
108524
108523
 
108525
- // src/lib/remote-agent/backends.ts
108524
+ // src/lib/local-agent/backends.ts
108526
108525
  init_esm_shims();
108527
108526
 
108528
108527
  // src/lib/utils/spawn.ts
@@ -108537,7 +108536,7 @@ function safeSpawn(command, args, options) {
108537
108536
  });
108538
108537
  }
108539
108538
 
108540
- // src/lib/remote-agent/backends.ts
108539
+ // src/lib/local-agent/backends.ts
108541
108540
  var BACKEND_COMMANDS = [
108542
108541
  { backend: "codex", command: "codex" },
108543
108542
  { backend: "claude-code", command: "claude" }
@@ -108587,7 +108586,7 @@ async function probeBackend(backend, command) {
108587
108586
  });
108588
108587
  });
108589
108588
  }
108590
- async function detectRemoteAgentBackends() {
108589
+ async function detectLocalAgentBackends() {
108591
108590
  return Promise.all(
108592
108591
  BACKEND_COMMANDS.map(({ backend, command }) => {
108593
108592
  return probeBackend(backend, command);
@@ -108634,7 +108633,7 @@ function appendLimited(current, chunk) {
108634
108633
  }
108635
108634
  return next.slice(-MAX_OUTPUT_BYTES);
108636
108635
  }
108637
- async function executeRemoteAgentBackend(params) {
108636
+ async function executeLocalAgentBackend(params) {
108638
108637
  const { command, args } = executionCommand(
108639
108638
  params.backend,
108640
108639
  params.prompt,
@@ -108681,7 +108680,7 @@ async function executeRemoteAgentBackend(params) {
108681
108680
  });
108682
108681
  }
108683
108682
 
108684
- // src/commands/zero/remote-agent/host.ts
108683
+ // src/commands/zero/local-agent/host.ts
108685
108684
  var HEARTBEAT_INTERVAL_MS = 3e4;
108686
108685
  var JOB_POLL_INTERVAL_MS = 2e3;
108687
108686
  var ABLY_CONNECT_TIMEOUT_MS2 = 1e4;
@@ -108706,7 +108705,7 @@ function createHostRealtime(hostToken, initialSubscription) {
108706
108705
  callback(null, current.tokenRequest);
108707
108706
  return;
108708
108707
  }
108709
- createRemoteAgentHostRealtimeSubscription({ hostToken }).then(
108708
+ createLocalAgentHostRealtimeSubscription({ hostToken }).then(
108710
108709
  (subscription) => {
108711
108710
  callback(null, subscription.tokenRequest);
108712
108711
  },
@@ -108747,8 +108746,8 @@ function waitForRealtimeConnected2(ably, timeoutMs = ABLY_CONNECT_TIMEOUT_MS2) {
108747
108746
  });
108748
108747
  });
108749
108748
  }
108750
- async function createRemoteAgentJobNotifier(hostToken) {
108751
- const subscription = await createRemoteAgentHostRealtimeSubscription({
108749
+ async function createLocalAgentJobNotifier(hostToken) {
108750
+ const subscription = await createLocalAgentHostRealtimeSubscription({
108752
108751
  hostToken
108753
108752
  });
108754
108753
  const ably = createHostRealtime(hostToken, subscription);
@@ -108921,7 +108920,7 @@ function assertHostNameAvailable(hostName, hosts) {
108921
108920
  return;
108922
108921
  }
108923
108922
  throw new Error(
108924
- `Remote-agent host name already exists: ${hostName}. Use --host-id ${existingHost.id} to reactivate it, or choose another --name.`
108923
+ `Local-agent host name already exists: ${hostName}. Use --host-id ${existingHost.id} to reactivate it, or choose another --name.`
108925
108924
  );
108926
108925
  }
108927
108926
  async function promptNewHostName(params) {
@@ -108947,7 +108946,7 @@ async function promptNewHostName(params) {
108947
108946
  }
108948
108947
  if (!isInteractive()) {
108949
108948
  throw new Error(
108950
- "Remote-agent start requires a host name in non-interactive mode. Use --name <name>."
108949
+ "Local-agent start requires a host name in non-interactive mode. Use --name <name>."
108951
108950
  );
108952
108951
  }
108953
108952
  throw new Error("Host name selection cancelled");
@@ -108956,7 +108955,7 @@ async function chooseHostForStart(params) {
108956
108955
  if (params.requestedHostId && params.createNew) {
108957
108956
  throw new Error("Use either --host-id or --new, not both");
108958
108957
  }
108959
- const { hosts } = await listRemoteAgentHosts();
108958
+ const { hosts } = await listLocalAgentHosts();
108960
108959
  const closedHosts = hosts.filter((host) => {
108961
108960
  return host.status === "closed";
108962
108961
  });
@@ -108966,7 +108965,7 @@ async function chooseHostForStart(params) {
108966
108965
  return item.id === params.requestedHostId;
108967
108966
  });
108968
108967
  if (!host) {
108969
- throw new Error("Remote-agent host not found");
108968
+ throw new Error("Local-agent host not found");
108970
108969
  }
108971
108970
  return restoreHostSelection(host);
108972
108971
  }
@@ -108984,7 +108983,7 @@ async function chooseHostForStart(params) {
108984
108983
  });
108985
108984
  if (matchingNameHosts.length > 1) {
108986
108985
  throw new Error(
108987
- `Multiple remote-agent hosts are named ${requestedHostName}. Use --host-id <id> to choose one.`
108986
+ `Multiple local-agent hosts are named ${requestedHostName}. Use --host-id <id> to choose one.`
108988
108987
  );
108989
108988
  }
108990
108989
  const [host] = matchingNameHosts;
@@ -108995,12 +108994,12 @@ async function chooseHostForStart(params) {
108995
108994
  return restoreHostSelection(host);
108996
108995
  }
108997
108996
  throw new Error(
108998
- `Remote-agent host is already online: ${requestedHostName}. Choose another --name or delete the existing host first.`
108997
+ `Local-agent host is already online: ${requestedHostName}. Choose another --name or delete the existing host first.`
108999
108998
  );
109000
108999
  }
109001
109000
  if (!isInteractive()) {
109002
109001
  throw new Error(
109003
- "Remote-agent start requires a host name in non-interactive mode. Use --name <name> or --host-id <id>."
109002
+ "Local-agent start requires a host name in non-interactive mode. Use --name <name> or --host-id <id>."
109004
109003
  );
109005
109004
  }
109006
109005
  if (closedHosts.length > 0) {
@@ -109026,12 +109025,12 @@ async function chooseHostForStart(params) {
109026
109025
  return host2.id === params.savedHostId;
109027
109026
  });
109028
109027
  const selected = await promptSelect(
109029
- "Start remote-agent host:",
109028
+ "Start local-agent host:",
109030
109029
  choices,
109031
109030
  savedIndex >= 0 ? savedIndex + 1 : 0
109032
109031
  );
109033
109032
  if (!selected) {
109034
- throw new Error("Remote-agent host selection cancelled");
109033
+ throw new Error("Local-agent host selection cancelled");
109035
109034
  }
109036
109035
  if (selected === NEW_HOST_SELECTION) {
109037
109036
  return {
@@ -109045,7 +109044,7 @@ async function chooseHostForStart(params) {
109045
109044
  return item.id === selected;
109046
109045
  });
109047
109046
  if (!host) {
109048
- throw new Error("Remote-agent host not found");
109047
+ throw new Error("Local-agent host not found");
109049
109048
  }
109050
109049
  return restoreHostSelection(host);
109051
109050
  }
@@ -109076,7 +109075,7 @@ async function chooseBackend(probes, requestedBackend) {
109076
109075
  });
109077
109076
  if (available.length === 0) {
109078
109077
  throw new Error(
109079
- "No supported agent CLI found. Install Codex CLI (`codex`) or Claude Code (`claude`) before starting remote-agent."
109078
+ "No supported agent CLI found. Install Codex CLI (`codex`) or Claude Code (`claude`) before starting local-agent."
109080
109079
  );
109081
109080
  }
109082
109081
  if (requestedBackend) {
@@ -109106,7 +109105,7 @@ async function chooseBackend(probes, requestedBackend) {
109106
109105
  if (!selected) {
109107
109106
  if (!isInteractive()) {
109108
109107
  throw new Error(
109109
- "Remote-agent start requires a backend in non-interactive mode. Use --backend codex or --backend claude-code."
109108
+ "Local-agent start requires a backend in non-interactive mode. Use --backend codex or --backend claude-code."
109110
109109
  );
109111
109110
  }
109112
109111
  throw new Error("Backend selection cancelled");
@@ -109131,7 +109130,7 @@ function chooseRestoredBackend(params) {
109131
109130
  }
109132
109131
  if (!params.host.supportedBackends.includes(backend)) {
109133
109132
  throw new Error(
109134
- `Remote-agent host "${params.host.displayName}" was configured for ${formatSupportedBackends(
109133
+ `Local-agent host "${params.host.displayName}" was configured for ${formatSupportedBackends(
109135
109134
  params.host.supportedBackends
109136
109135
  )}.`
109137
109136
  );
@@ -109157,7 +109156,7 @@ async function choosePermissionMode(backend, requestedPermissionMode) {
109157
109156
  if (!selected) {
109158
109157
  if (!isInteractive()) {
109159
109158
  throw new Error(
109160
- "Remote-agent start requires a permission mode in non-interactive mode. Use --permission-mode default or another supported mode."
109159
+ "Local-agent start requires a permission mode in non-interactive mode. Use --permission-mode default or another supported mode."
109161
109160
  );
109162
109161
  }
109163
109162
  throw new Error("Permission mode selection cancelled");
@@ -109189,12 +109188,12 @@ async function runHostLoop(params) {
109189
109188
  };
109190
109189
  const sendHeartbeat = async () => {
109191
109190
  try {
109192
- await sendRemoteAgentHeartbeat(params);
109191
+ await sendLocalAgentHeartbeat(params);
109193
109192
  nextHeartbeatAt = Date.now() + HEARTBEAT_INTERVAL_MS;
109194
109193
  latestError = null;
109195
109194
  } catch (error49) {
109196
109195
  if (isInvalidHostTokenError(error49)) {
109197
- console.log(source_default.yellow("Remote-agent host was deleted; stopping."));
109196
+ console.log(source_default.yellow("Local-agent host was deleted; stopping."));
109198
109197
  onStop();
109199
109198
  return;
109200
109199
  }
@@ -109206,7 +109205,7 @@ async function runHostLoop(params) {
109206
109205
  }
109207
109206
  };
109208
109207
  try {
109209
- jobNotifier = await createRemoteAgentJobNotifier(params.hostToken);
109208
+ jobNotifier = await createLocalAgentJobNotifier(params.hostToken);
109210
109209
  } catch (error49) {
109211
109210
  console.log(
109212
109211
  source_default.yellow(
@@ -109224,13 +109223,13 @@ async function runHostLoop(params) {
109224
109223
  }
109225
109224
  let nextJob;
109226
109225
  try {
109227
- nextJob = await claimNextRemoteAgentHostJob({
109226
+ nextJob = await claimNextLocalAgentHostJob({
109228
109227
  hostToken: params.hostToken,
109229
109228
  supportedBackends: params.supportedBackends
109230
109229
  });
109231
109230
  } catch (error49) {
109232
109231
  if (isInvalidHostTokenError(error49)) {
109233
- console.log(source_default.yellow("Remote-agent host was deleted; stopping."));
109232
+ console.log(source_default.yellow("Local-agent host was deleted; stopping."));
109234
109233
  onStop();
109235
109234
  continue;
109236
109235
  }
@@ -109252,13 +109251,13 @@ async function runHostLoop(params) {
109252
109251
  `Running ${backendLabel(nextJob.job.backend)} job ${nextJob.job.id}`
109253
109252
  )
109254
109253
  );
109255
- const result = await executeRemoteAgentBackend({
109254
+ const result = await executeLocalAgentBackend({
109256
109255
  backend: nextJob.job.backend,
109257
109256
  prompt: nextJob.job.prompt,
109258
109257
  workdir: params.workdir,
109259
109258
  permissionMode: params.permissionMode
109260
109259
  });
109261
- await completeRemoteAgentHostJob({
109260
+ await completeLocalAgentHostJob({
109262
109261
  hostToken: params.hostToken,
109263
109262
  jobId: nextJob.job.id,
109264
109263
  status: result.exitCode === 0 ? "succeeded" : "failed",
@@ -109275,14 +109274,14 @@ async function runHostLoop(params) {
109275
109274
  process.removeListener("SIGTERM", onStop);
109276
109275
  }
109277
109276
  }
109278
- var startCommand = new Command().name("start").description("Start the remote-agent host daemon").option("--name <name>", "New host name, or a closed host name to reactivate").option("--workdir <path>", "Working directory for Codex/Claude jobs").option("--backend <backend>", "codex or claude-code for a new host").option("--permission-mode <mode>", "Permission mode for Codex/Claude jobs").option(
109277
+ var startCommand = new Command().name("start").description("Start the local-agent host daemon").option("--name <name>", "New host name, or a closed host name to reactivate").option("--workdir <path>", "Working directory for Codex/Claude jobs").option("--backend <backend>", "codex or claude-code for a new host").option("--permission-mode <mode>", "Permission mode for Codex/Claude jobs").option(
109279
109278
  "--host-id <id>",
109280
- "Reactivate a closed host from vm0 remote-agent list"
109279
+ "Reactivate a closed host from vm0 local-agent list"
109281
109280
  ).option("--new", "Create a new host registration").action(
109282
109281
  withErrorHandler(async (options) => {
109283
109282
  const requestedHostName = options.name?.trim();
109284
109283
  const workdir = options.workdir?.trim() || process.cwd();
109285
- const savedHost = await getRemoteAgentHost();
109284
+ const savedHost = await getLocalAgentHost();
109286
109285
  const selection = await chooseHostForStart({
109287
109286
  requestedHostName,
109288
109287
  requestedHostId: options.hostId?.trim(),
@@ -109290,7 +109289,7 @@ var startCommand = new Command().name("start").description("Start the remote-age
109290
109289
  savedHostId: savedHost?.id
109291
109290
  });
109292
109291
  console.log(source_default.cyan("Detecting local agent CLIs..."));
109293
- const probes = await detectRemoteAgentBackends();
109292
+ const probes = await detectLocalAgentBackends();
109294
109293
  const available = probes.filter((probe) => {
109295
109294
  return probe.available;
109296
109295
  });
@@ -109319,14 +109318,14 @@ var startCommand = new Command().name("start").description("Start the remote-age
109319
109318
  console.log(`Using ${backendLabel(selectedBackend)}`);
109320
109319
  console.log(`Permission mode: ${permissionModeLabel(permissionMode)}`);
109321
109320
  const baseUrl = await getBaseUrl();
109322
- console.log(source_default.cyan("Starting remote-agent host..."));
109321
+ console.log(source_default.cyan("Starting local-agent host..."));
109323
109322
  const startParams = {
109324
109323
  hostName: selection.hostName,
109325
109324
  supportedBackends,
109326
109325
  ...selection.hostId ? { hostId: selection.hostId } : {}
109327
109326
  };
109328
- const started = await startRemoteAgentHost(startParams);
109329
- await saveRemoteAgentHost({
109327
+ const started = await startLocalAgentHost(startParams);
109328
+ await saveLocalAgentHost({
109330
109329
  id: started.hostId,
109331
109330
  token: started.hostToken,
109332
109331
  apiUrl: baseUrl,
@@ -109335,7 +109334,7 @@ var startCommand = new Command().name("start").description("Start the remote-age
109335
109334
  permissionMode,
109336
109335
  linkedAt: (/* @__PURE__ */ new Date()).toISOString()
109337
109336
  });
109338
- console.log(source_default.green(`Remote-agent host active: ${started.hostId}`));
109337
+ console.log(source_default.green(`Local-agent host active: ${started.hostId}`));
109339
109338
  console.log(`Workdir: ${workdir}`);
109340
109339
  console.log(source_default.dim("Press ^C to stop"));
109341
109340
  console.log();
@@ -109347,14 +109346,14 @@ var startCommand = new Command().name("start").description("Start the remote-age
109347
109346
  workdir
109348
109347
  });
109349
109348
  console.log();
109350
- console.log(source_default.green("Remote-agent host stopped"));
109349
+ console.log(source_default.green("Local-agent host stopped"));
109351
109350
  })
109352
109351
  );
109353
109352
 
109354
- // src/commands/zero/remote-agent/delete.ts
109353
+ // src/commands/zero/local-agent/delete.ts
109355
109354
  init_esm_shims();
109356
- async function resolveRemoteAgentHost(target) {
109357
- const { hosts } = await listRemoteAgentHosts();
109355
+ async function resolveLocalAgentHost(target) {
109356
+ const { hosts } = await listLocalAgentHosts();
109358
109357
  const idMatch = hosts.find((host) => {
109359
109358
  return host.id === target;
109360
109359
  });
@@ -109372,24 +109371,22 @@ async function resolveRemoteAgentHost(target) {
109372
109371
  }
109373
109372
  if (nameMatches.length > 1) {
109374
109373
  throw new Error(
109375
- `Multiple remote-agent hosts are named ${target}. Use the host id from vm0 remote-agent list.`
109374
+ `Multiple local-agent hosts are named ${target}. Use the host id from vm0 local-agent list.`
109376
109375
  );
109377
109376
  }
109378
- throw new Error(`Remote-agent host not found: ${target}`);
109377
+ throw new Error(`Local-agent host not found: ${target}`);
109379
109378
  }
109380
- var deleteCommand = new Command().name("delete").description("Delete a remote-agent host").argument("<host>", "Host id or name from vm0 remote-agent list").action(
109379
+ var deleteCommand = new Command().name("delete").description("Delete a local-agent host").argument("<host>", "Host id or name from vm0 local-agent list").action(
109381
109380
  withErrorHandler(async (target) => {
109382
- const host = await resolveRemoteAgentHost(target.trim());
109383
- await deleteRemoteAgentHost(host.id);
109384
- await clearRemoteAgentHost(host.id);
109385
- console.log(
109386
- source_default.green(`Remote-agent host deleted: ${host.displayName}`)
109387
- );
109381
+ const host = await resolveLocalAgentHost(target.trim());
109382
+ await deleteLocalAgentHost(host.id);
109383
+ await clearLocalAgentHost(host.id);
109384
+ console.log(source_default.green(`Local-agent host deleted: ${host.displayName}`));
109388
109385
  console.log(source_default.dim(` Host id: ${host.id}`));
109389
109386
  })
109390
109387
  );
109391
109388
 
109392
- // src/commands/zero/remote-agent/list.ts
109389
+ // src/commands/zero/local-agent/list.ts
109393
109390
  init_esm_shims();
109394
109391
  function formatAge(value) {
109395
109392
  const elapsedSeconds = Math.max(
@@ -109417,8 +109414,8 @@ function statusLabel(host) {
109417
109414
  }
109418
109415
  function printHosts(hosts) {
109419
109416
  if (hosts.length === 0) {
109420
- console.log("No remote-agent hosts found.");
109421
- console.log(source_default.dim(" Run: vm0 remote-agent start --name <name>"));
109417
+ console.log("No local-agent hosts found.");
109418
+ console.log(source_default.dim(" Run: vm0 local-agent start --name <name>"));
109422
109419
  return;
109423
109420
  }
109424
109421
  const rows = hosts.map((host) => {
@@ -109470,14 +109467,14 @@ function printHosts(hosts) {
109470
109467
  );
109471
109468
  }
109472
109469
  }
109473
- var listCommand = new Command().name("list").description("List remote-agent hosts").action(
109470
+ var listCommand = new Command().name("list").description("List local-agent hosts").action(
109474
109471
  withErrorHandler(async () => {
109475
- const result = await listRemoteAgentHosts();
109472
+ const result = await listLocalAgentHosts();
109476
109473
  printHosts(result.hosts);
109477
109474
  })
109478
109475
  );
109479
109476
 
109480
- // src/commands/zero/remote-agent/run.ts
109477
+ // src/commands/zero/local-agent/run.ts
109481
109478
  init_esm_shims();
109482
109479
  function sleep2(ms) {
109483
109480
  return new Promise((resolve2) => {
@@ -109492,7 +109489,7 @@ function parseTimeoutSeconds(value) {
109492
109489
  }
109493
109490
  return seconds;
109494
109491
  }
109495
- var runCommand = new Command().name("run").description("Run on a connected remote-agent host").argument("<prompt...>", "Prompt to send to the remote agent").option("--host <name>", "Run on a named remote-agent host").option("--timeout <seconds>", "Maximum time to wait", "7200").action(
109492
+ var runCommand = new Command().name("run").description("Run on a connected local-agent host").argument("<prompt...>", "Prompt to send to the local agent").option("--host <name>", "Run on a named local-agent host").option("--timeout <seconds>", "Maximum time to wait", "7200").action(
109496
109493
  withErrorHandler(async (promptParts, options) => {
109497
109494
  const timeoutSeconds = parseTimeoutSeconds(options.timeout);
109498
109495
  const prompt = promptParts.join(" ").trim();
@@ -109504,11 +109501,11 @@ var runCommand = new Command().name("run").description("Run on a connected remot
109504
109501
  prompt,
109505
109502
  ...hostName ? { hostName } : {}
109506
109503
  };
109507
- const created = await createRemoteAgentRun(createParams);
109508
- console.log(source_default.cyan(`Remote-agent job queued: ${created.jobId}`));
109504
+ const created = await createLocalAgentRun(createParams);
109505
+ console.log(source_default.cyan(`Local-agent job queued: ${created.jobId}`));
109509
109506
  const deadline = Date.now() + timeoutSeconds * 1e3;
109510
109507
  while (Date.now() <= deadline) {
109511
- const job = await getRemoteAgentRun(created.jobId);
109508
+ const job = await getLocalAgentRun(created.jobId);
109512
109509
  if (job.status === "queued" || job.status === "running") {
109513
109510
  if (process.stdout.isTTY) {
109514
109511
  process.stdout.write(".");
@@ -109530,11 +109527,11 @@ var runCommand = new Command().name("run").description("Run on a connected remot
109530
109527
  }
109531
109528
  return;
109532
109529
  }
109533
- throw new Error(`Remote-agent job timed out: ${created.jobId}`);
109530
+ throw new Error(`Local-agent job timed out: ${created.jobId}`);
109534
109531
  })
109535
109532
  );
109536
109533
 
109537
- // src/commands/zero/remote-agent/runs.ts
109534
+ // src/commands/zero/local-agent/runs.ts
109538
109535
  init_esm_shims();
109539
109536
  var VALID_STATUSES = [
109540
109537
  "queued",
@@ -109581,8 +109578,8 @@ function parseLimit(value) {
109581
109578
  }
109582
109579
  function printRunTable(runs) {
109583
109580
  if (runs.length === 0) {
109584
- console.log(source_default.dim("No remote-agent runs found"));
109585
- console.log(source_default.dim(' Run: zero remote-agent run "your prompt"'));
109581
+ console.log(source_default.dim("No local-agent runs found"));
109582
+ console.log(source_default.dim(' Run: zero local-agent run "your prompt"'));
109586
109583
  return;
109587
109584
  }
109588
109585
  const rows = runs.map((run) => {
@@ -109655,13 +109652,13 @@ function printRunStatus(job) {
109655
109652
  console.log(`Exit code: ${job.exitCode ?? "-"}`);
109656
109653
  if (job.status === "succeeded" || job.status === "failed") {
109657
109654
  console.log();
109658
- console.log(source_default.dim(` Run: zero remote-agent runs result ${job.id}`));
109655
+ console.log(source_default.dim(` Run: zero local-agent runs result ${job.id}`));
109659
109656
  }
109660
109657
  }
109661
109658
  function printRunResult(job) {
109662
109659
  if (job.status === "queued" || job.status === "running") {
109663
- throw new Error(`Remote-agent job is ${job.status}`, {
109664
- cause: new Error(`Run: zero remote-agent runs status ${job.id}`)
109660
+ throw new Error(`Local-agent job is ${job.status}`, {
109661
+ cause: new Error(`Run: zero local-agent runs status ${job.id}`)
109665
109662
  });
109666
109663
  }
109667
109664
  if (job.status === "failed") {
@@ -109675,9 +109672,9 @@ function printRunResult(job) {
109675
109672
  console.log(job.output);
109676
109673
  }
109677
109674
  }
109678
- var listCommand2 = new Command().name("list").alias("ls").description("List remote-agent runs").option("--status <status>", `Filter by status: ${VALID_STATUSES.join(",")}`).option("--host <name>", "Filter by remote-agent host name").option("--host-id <id>", "Filter by remote-agent host id").option("--limit <n>", "Maximum number of results (default: 20, max: 100)").option("--json", "Output JSON").action(
109675
+ var listCommand2 = new Command().name("list").alias("ls").description("List local-agent runs").option("--status <status>", `Filter by status: ${VALID_STATUSES.join(",")}`).option("--host <name>", "Filter by local-agent host name").option("--host-id <id>", "Filter by local-agent host id").option("--limit <n>", "Maximum number of results (default: 20, max: 100)").option("--json", "Output JSON").action(
109679
109676
  withErrorHandler(async (options) => {
109680
- const result = await listRemoteAgentRuns({
109677
+ const result = await listLocalAgentRuns({
109681
109678
  status: parseStatus(options.status),
109682
109679
  hostName: options.host,
109683
109680
  hostId: options.hostId,
@@ -109690,9 +109687,9 @@ var listCommand2 = new Command().name("list").alias("ls").description("List remo
109690
109687
  printRunTable(result.runs);
109691
109688
  })
109692
109689
  );
109693
- var statusCommand = new Command().name("status").description("Show remote-agent run status").argument("<job-id>", "Remote-agent job id").option("--json", "Output JSON").action(
109690
+ var statusCommand = new Command().name("status").description("Show local-agent run status").argument("<job-id>", "Local-agent job id").option("--json", "Output JSON").action(
109694
109691
  withErrorHandler(async (jobId, options) => {
109695
- const job = await getRemoteAgentRun(jobId);
109692
+ const job = await getLocalAgentRun(jobId);
109696
109693
  if (options.json) {
109697
109694
  console.log(JSON.stringify(job));
109698
109695
  return;
@@ -109700,9 +109697,9 @@ var statusCommand = new Command().name("status").description("Show remote-agent
109700
109697
  printRunStatus(job);
109701
109698
  })
109702
109699
  );
109703
- var resultCommand = new Command().name("result").description("Print remote-agent run result").argument("<job-id>", "Remote-agent job id").option("--json", "Output JSON").action(
109700
+ var resultCommand = new Command().name("result").description("Print local-agent run result").argument("<job-id>", "Local-agent job id").option("--json", "Output JSON").action(
109704
109701
  withErrorHandler(async (jobId, options) => {
109705
- const job = await getRemoteAgentRun(jobId);
109702
+ const job = await getLocalAgentRun(jobId);
109706
109703
  if (options.json) {
109707
109704
  console.log(JSON.stringify(job));
109708
109705
  return;
@@ -109710,11 +109707,11 @@ var resultCommand = new Command().name("result").description("Print remote-agent
109710
109707
  printRunResult(job);
109711
109708
  })
109712
109709
  );
109713
- var runsCommand = new Command().name("runs").description("List and inspect remote-agent runs").addCommand(listCommand2).addCommand(statusCommand).addCommand(resultCommand);
109710
+ var runsCommand = new Command().name("runs").description("List and inspect local-agent runs").addCommand(listCommand2).addCommand(statusCommand).addCommand(resultCommand);
109714
109711
 
109715
- // src/commands/zero/remote-agent/index.ts
109716
- var remoteAgentCommand = new Command().name("remote-agent").description("Run local Codex or Claude hosts for vm0").addCommand(startCommand).addCommand(listCommand).addCommand(deleteCommand).addCommand(runCommand).addCommand(runsCommand);
109717
- var zeroRemoteAgentCommand = new Command().name("remote-agent").description("Run jobs on remote-agent hosts").addCommand(listCommand).addCommand(runCommand).addCommand(runsCommand);
109712
+ // src/commands/zero/local-agent/index.ts
109713
+ var localAgentCommand = new Command().name("local-agent").description("Run local Codex or Claude hosts for vm0").addCommand(startCommand).addCommand(listCommand).addCommand(deleteCommand).addCommand(runCommand).addCommand(runsCommand);
109714
+ var zeroLocalAgentCommand = new Command().name("local-agent").description("Run jobs on local-agent hosts").addCommand(listCommand).addCommand(runCommand).addCommand(runsCommand);
109718
109715
 
109719
109716
  // src/lib/command/index.ts
109720
109717
  init_esm_shims();
@@ -127012,11 +127009,6 @@ var FEATURE_SWITCHES = {
127012
127009
  enabled: false,
127013
127010
  enabledOrgIdHashes: STAFF_ORG_ID_HASHES
127014
127011
  },
127015
- ["remoteAgent" /* RemoteAgent */]: {
127016
- maintainer: "lancy@vm0.ai",
127017
- description: "Enable remote-agent device pairing and local Codex/Claude host heartbeat endpoints.",
127018
- enabled: true
127019
- },
127020
127012
  ["lab" /* Lab */]: {
127021
127013
  maintainer: "ethan@vm0.ai",
127022
127014
  description: "Show the Lab page for toggling experimental features",
@@ -127126,11 +127118,6 @@ var FEATURE_SWITCHES = {
127126
127118
  enabled: false,
127127
127119
  enabledOrgIdHashes: STAFF_ORG_ID_HASHES
127128
127120
  },
127129
- ["privateAgents" /* PrivateAgents */]: {
127130
- maintainer: "ethan@vm0.ai",
127131
- description: "Enable private agents. Private agents are visible only to their owner, are excluded from the workspace public-agent limit, and can only be managed or run by their owner.",
127132
- enabled: true
127133
- },
127134
127121
  ["hostedSites" /* HostedSites */]: {
127135
127122
  maintainer: "lancy@vm0.ai",
127136
127123
  description: "Enable static hosted-site deployments from zero host. Staff-only during rollout.",
@@ -128672,8 +128659,8 @@ export {
128672
128659
  showNextSteps,
128673
128660
  parseTime,
128674
128661
  paginate,
128675
- remoteAgentCommand,
128676
- zeroRemoteAgentCommand
128662
+ localAgentCommand,
128663
+ zeroLocalAgentCommand
128677
128664
  };
128678
128665
  /*! Bundled license information:
128679
128666
 
@@ -128683,4 +128670,4 @@ undici/lib/web/fetch/body.js:
128683
128670
  undici/lib/web/websocket/frame.js:
128684
128671
  (*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
128685
128672
  */
128686
- //# sourceMappingURL=chunk-L3DXJXOV.js.map
128673
+ //# sourceMappingURL=chunk-4F34B6ZK.js.map