@codexhost/cli-linux-arm64 0.18.0-beta.3 → 0.18.0-beta.5

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 (53) hide show
  1. package/README.md +1 -1
  2. package/app/codexhost-distribution.json +1 -1
  3. package/app/console-server.mjs +102 -57
  4. package/app/console-web.js +168 -123
  5. package/app/desktop-controller.mjs +292 -117
  6. package/app/host-runtime.mjs +5875 -3270
  7. package/app/plugins/antigravity/plugin.mjs +796 -307
  8. package/app/plugins/claude-code/plugin.mjs +214 -103
  9. package/app/plugins/codebuddy/plugin.mjs +108 -63
  10. package/app/plugins/codex-usage/plugin.mjs +94 -49
  11. package/app/plugins/copilot/plugin.mjs +99 -54
  12. package/app/plugins/cursor-cli/plugin.mjs +122 -77
  13. package/app/plugins/deepseek-harness/plugin.mjs +125 -80
  14. package/app/plugins/devin/plugin.mjs +99 -54
  15. package/app/plugins/grok/plugin.mjs +105 -60
  16. package/app/plugins/hermes/plugin.mjs +86 -41
  17. package/app/plugins/kimi-code/plugin.mjs +103 -58
  18. package/app/plugins/kiro-cli/plugin.mjs +99 -54
  19. package/app/plugins/omp/plugin.mjs +90 -45
  20. package/app/plugins/opencode/plugin.mjs +87 -42
  21. package/app/plugins/pi/plugin.mjs +103 -58
  22. package/app/plugins/qoder/plugin.mjs +115 -70
  23. package/app/plugins/qoder-cn/plugin.mjs +115 -70
  24. package/app/plugins/qwen-code/plugin.mjs +110 -65
  25. package/app/plugins/workbuddy/plugin.mjs +108 -63
  26. package/app/plugins/zcode/plugin.mjs +91 -46
  27. package/app/renderer-extension.js +362 -299
  28. package/app/web/assets/index-C0aXz2jD.js +199 -0
  29. package/app/web/codex-agent.png +0 -0
  30. package/app/web/codexhost-settings.js +163 -118
  31. package/app/web/index.html +1 -1
  32. package/app/web/plugins/deepseek-ai__dsh-api-gateway/client.js +1 -1
  33. package/app/web/plugins/deepseek-ai__dsh-api-remotes/client.js +1 -1
  34. package/app/web/plugins/deepseek-ai__dsh-api-session-controller/client.js +61 -61
  35. package/app/web/plugins/deepseek-ai__dsh-client-connection/client.js +1 -1
  36. package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +8 -8
  37. package/app/web/plugins/deepseek-ai__dsh-client-ui-codexhost/client.js +63 -63
  38. package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +12 -12
  39. package/app/web/plugins/deepseek-ai__dsh-client-ui-layout/client.js +2 -2
  40. package/app/web/plugins/deepseek-ai__dsh-client-ui-permission-presets/client.js +1 -1
  41. package/app/web/plugins/deepseek-ai__dsh-client-ui-settings/client.js +1 -1
  42. package/app/web/plugins/deepseek-ai__dsh-client-ui-settings-general/client.js +2 -2
  43. package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar/client.js +2 -2
  44. package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +18 -18
  45. package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +9 -13
  46. package/app/web/plugins.json +4 -0
  47. package/app/web/sw.js +1 -6
  48. package/app/web-modules/server.mjs +2443 -1345
  49. package/bin/codexhost +0 -0
  50. package/libexec/codexhost-shim +0 -0
  51. package/libexec/codexhost-updater +0 -0
  52. package/package.json +1 -1
  53. package/app/web/assets/index-aKvkfNJN.js +0 -199
@@ -1,8 +1,8 @@
1
1
  import { createRequire as __codexhostCreateRequire } from "node:module"; const require = __codexhostCreateRequire(import.meta.url);
2
2
  var __defProp = Object.defineProperty;
3
- var __export = (target, all) => {
3
+ var __export = (target2, all) => {
4
4
  for (var name in all)
5
- __defProp(target, name, { get: all[name], enumerable: true });
5
+ __defProp(target2, name, { get: all[name], enumerable: true });
6
6
  };
7
7
 
8
8
  // ../../harness-broker/dist/client.js
@@ -758,8 +758,8 @@ function defineLazy(object2, key, getter) {
758
758
  function objectClone(obj) {
759
759
  return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
760
760
  }
761
- function assignProp(target, prop, value) {
762
- Object.defineProperty(target, prop, {
761
+ function assignProp(target2, prop, value) {
762
+ Object.defineProperty(target2, prop, {
763
763
  value,
764
764
  writable: true,
765
765
  enumerable: true,
@@ -942,35 +942,35 @@ function normalizeParams(_params) {
942
942
  return params;
943
943
  }
944
944
  function createTransparentProxy(getter) {
945
- let target;
945
+ let target2;
946
946
  return new Proxy({}, {
947
947
  get(_, prop, receiver) {
948
- target ?? (target = getter());
949
- return Reflect.get(target, prop, receiver);
948
+ target2 ?? (target2 = getter());
949
+ return Reflect.get(target2, prop, receiver);
950
950
  },
951
951
  set(_, prop, value, receiver) {
952
- target ?? (target = getter());
953
- return Reflect.set(target, prop, value, receiver);
952
+ target2 ?? (target2 = getter());
953
+ return Reflect.set(target2, prop, value, receiver);
954
954
  },
955
955
  has(_, prop) {
956
- target ?? (target = getter());
957
- return Reflect.has(target, prop);
956
+ target2 ?? (target2 = getter());
957
+ return Reflect.has(target2, prop);
958
958
  },
959
959
  deleteProperty(_, prop) {
960
- target ?? (target = getter());
961
- return Reflect.deleteProperty(target, prop);
960
+ target2 ?? (target2 = getter());
961
+ return Reflect.deleteProperty(target2, prop);
962
962
  },
963
963
  ownKeys(_) {
964
- target ?? (target = getter());
965
- return Reflect.ownKeys(target);
964
+ target2 ?? (target2 = getter());
965
+ return Reflect.ownKeys(target2);
966
966
  },
967
967
  getOwnPropertyDescriptor(_, prop) {
968
- target ?? (target = getter());
969
- return Reflect.getOwnPropertyDescriptor(target, prop);
968
+ target2 ?? (target2 = getter());
969
+ return Reflect.getOwnPropertyDescriptor(target2, prop);
970
970
  },
971
971
  defineProperty(_, prop, descriptor) {
972
- target ?? (target = getter());
973
- return Reflect.defineProperty(target, prop, descriptor);
972
+ target2 ?? (target2 = getter());
973
+ return Reflect.defineProperty(target2, prop, descriptor);
974
974
  }
975
975
  });
976
976
  }
@@ -11422,15 +11422,15 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
11422
11422
 
11423
11423
  // ../../../node_modules/zod/v4/core/to-json-schema.js
11424
11424
  function initializeContext(params) {
11425
- let target = params?.target ?? "draft-2020-12";
11426
- if (target === "draft-4")
11427
- target = "draft-04";
11428
- if (target === "draft-7")
11429
- target = "draft-07";
11425
+ let target2 = params?.target ?? "draft-2020-12";
11426
+ if (target2 === "draft-4")
11427
+ target2 = "draft-04";
11428
+ if (target2 === "draft-7")
11429
+ target2 = "draft-07";
11430
11430
  return {
11431
11431
  processors: params.processors ?? {},
11432
11432
  metadataRegistry: params?.metadata ?? globalRegistry,
11433
- target,
11433
+ target: target2,
11434
11434
  unrepresentable: params?.unrepresentable ?? "throw",
11435
11435
  override: params?.override ?? (() => {
11436
11436
  }),
@@ -11772,8 +11772,8 @@ var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
11772
11772
  return finalize(ctx, schema);
11773
11773
  };
11774
11774
  var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
11775
- const { libraryOptions, target } = params ?? {};
11776
- const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
11775
+ const { libraryOptions, target: target2 } = params ?? {};
11776
+ const ctx = initializeContext({ ...libraryOptions ?? {}, target: target2, io, processors });
11777
11777
  process2(schema, ctx);
11778
11778
  extractDefs(ctx, schema);
11779
11779
  return finalize(ctx, schema);
@@ -12832,8 +12832,8 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
12832
12832
  catch(params) {
12833
12833
  return _catch2(this, params);
12834
12834
  },
12835
- pipe(target) {
12836
- return pipe(this, target);
12835
+ pipe(target2) {
12836
+ return pipe(this, target2);
12837
12837
  },
12838
12838
  readonly() {
12839
12839
  return readonly(this);
@@ -15063,15 +15063,15 @@ var threadOwnershipListResultSchema = external_exports.object({
15063
15063
  threads: external_exports.array(threadOwnershipSchema).min(1).max(THREAD_OWNERSHIP_LIST_MAX_LENGTH)
15064
15064
  }).strict().superRefine(({ threads }, context) => {
15065
15065
  const seen = /* @__PURE__ */ new Set();
15066
- for (const [index, thread] of threads.entries()) {
15067
- if (seen.has(thread.threadId)) {
15066
+ for (const [index, thread2] of threads.entries()) {
15067
+ if (seen.has(thread2.threadId)) {
15068
15068
  context.addIssue({
15069
15069
  code: "custom",
15070
15070
  message: "Thread ownership-list results must be unique",
15071
15071
  path: ["threads", index, "threadId"]
15072
15072
  });
15073
15073
  }
15074
- seen.add(thread.threadId);
15074
+ seen.add(thread2.threadId);
15075
15075
  }
15076
15076
  });
15077
15077
  var threadSteeringInspectParamsSchema = external_exports.object({
@@ -15280,13 +15280,18 @@ var clientChannelResponseSchema = external_exports.object({
15280
15280
  });
15281
15281
 
15282
15282
  // ../../shared-contracts/dist/thread-catalog.js
15283
- var threadCatalogReadParamsSchema = external_exports.object({ includeArchived: external_exports.boolean().optional() }).strict();
15283
+ var threadCatalogReadParamsSchema = external_exports.object({
15284
+ includeArchived: external_exports.boolean().optional(),
15285
+ /** Absent means first page; null means this branch is exhausted. Native cursors only. */
15286
+ officialCursor: external_exports.object({ live: external_exports.string().nullable(), archived: external_exports.string().nullable().optional() }).strict().optional()
15287
+ }).strict();
15284
15288
  var threadCatalogReadResultSchema = external_exports.object({
15285
15289
  threads: external_exports.array(jsonObjectSchema),
15286
15290
  ownership: external_exports.array(threadOwnershipSchema),
15287
15291
  /** Known archived IDs, including visible local external records even when their rows are
15288
- * excluded. Native archived IDs are complete only when includeArchived is true. */
15289
- archivedThreadIds: external_exports.array(hostThreadIdSchema)
15292
+ * excluded. Native archived IDs describe only the returned page, never a complete set. */
15293
+ archivedThreadIds: external_exports.array(hostThreadIdSchema),
15294
+ officialCursor: external_exports.object({ live: external_exports.string().nullable(), archived: external_exports.string().nullable().optional() }).strict().optional()
15290
15295
  }).strict();
15291
15296
 
15292
15297
  // ../../shared-contracts/dist/voice.js
@@ -15501,7 +15506,7 @@ var idleReleaseSettingsSchema = external_exports.strictObject({
15501
15506
  });
15502
15507
  var DEFAULT_IDLE_RELEASE_SETTINGS = Object.freeze({
15503
15508
  enabled: false,
15504
- timeoutMinutes: 30
15509
+ timeoutMinutes: 10
15505
15510
  });
15506
15511
 
15507
15512
  // ../../shared-contracts/dist/harness-preferences.js
@@ -16404,6 +16409,44 @@ var remoteSshSetupParamsSchema = external_exports.object({
16404
16409
  }).strict();
16405
16410
  var remoteSshSetupResultSchema = external_exports.object({ state: external_exports.enum(["installed", "not-installed"]) }).strict();
16406
16411
 
16412
+ // ../../shared-contracts/dist/remote-sessions.js
16413
+ var REMOTE_CONTROLLER_REQUEST_MAX_BYTES = 16 * 1024;
16414
+ var identity = external_exports.string().min(1).max(1024);
16415
+ var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
16416
+ var thread = { ...target, threadId: identity };
16417
+ var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
16418
+ external_exports.strictObject({ kind: external_exports.literal("hosts") }),
16419
+ external_exports.strictObject({
16420
+ kind: external_exports.literal("list"),
16421
+ ...target,
16422
+ cursor: external_exports.string().nullable(),
16423
+ archived: external_exports.boolean()
16424
+ }),
16425
+ external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
16426
+ external_exports.strictObject({
16427
+ kind: external_exports.literal("prompt"),
16428
+ ...thread,
16429
+ epoch: identity,
16430
+ text: external_exports.string().min(1).max(8e3),
16431
+ requestId: identity.optional()
16432
+ }),
16433
+ external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
16434
+ external_exports.strictObject({
16435
+ kind: external_exports.literal("rename"),
16436
+ ...thread,
16437
+ epoch: identity,
16438
+ name: external_exports.string().min(1).max(512)
16439
+ }),
16440
+ external_exports.strictObject({ kind: external_exports.literal("archive"), ...thread, epoch: identity, archived: external_exports.boolean() }),
16441
+ external_exports.strictObject({
16442
+ kind: external_exports.literal("respond"),
16443
+ ...thread,
16444
+ epoch: identity,
16445
+ requestId: external_exports.union([identity, external_exports.number().int()]),
16446
+ result: external_exports.record(external_exports.string(), external_exports.unknown())
16447
+ })
16448
+ ]);
16449
+
16407
16450
  // ../../shared-contracts/dist/remote-connections.js
16408
16451
  var hostId = external_exports.string().min(1).max(1024);
16409
16452
  var codexSshConnectionSchema = external_exports.object({
@@ -16424,7 +16467,9 @@ var codexSshDraftSchema = external_exports.strictObject({
16424
16467
  identity: external_exports.string().max(4096).nullable()
16425
16468
  });
16426
16469
  var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
16470
+ external_exports.strictObject({ action: external_exports.literal("session"), operation: remoteSessionOperationSchema }),
16427
16471
  external_exports.strictObject({ action: external_exports.literal("list") }),
16472
+ external_exports.strictObject({ action: external_exports.literal("catalog") }),
16428
16473
  external_exports.strictObject({
16429
16474
  action: external_exports.literal("read-thread"),
16430
16475
  hostId: hostId.refine((id) => id !== "local"),
@@ -17486,15 +17531,15 @@ async function startBrokerLaunchAgent(harnessId, environment) {
17486
17531
  const uid = process.getuid?.();
17487
17532
  if (uid === void 0)
17488
17533
  return;
17489
- const target = `gui/${uid}/${harnessBrokerLaunchAgentLabel(harnessId)}`;
17490
- if (await runLaunchctl(["kickstart", target]))
17534
+ const target2 = `gui/${uid}/${harnessBrokerLaunchAgentLabel(harnessId)}`;
17535
+ if (await runLaunchctl(["kickstart", target2]))
17491
17536
  return;
17492
17537
  await runLaunchctl([
17493
17538
  "bootstrap",
17494
17539
  `gui/${uid}`,
17495
17540
  harnessBrokerLaunchAgentPlistPath(environment, harnessId)
17496
17541
  ]);
17497
- await runLaunchctl(["kickstart", target]);
17542
+ await runLaunchctl(["kickstart", target2]);
17498
17543
  }
17499
17544
  var BrokerConnection = class _BrokerConnection {
17500
17545
  #onClose;
@@ -23288,11 +23333,11 @@ var AgentApp = class {
23288
23333
  [runAgentConnectHandlers](connection) {
23289
23334
  runConnectHandlers(connection, this.connectHandlers);
23290
23335
  }
23291
- connect(target, options = {}) {
23292
- return this.connectConnection(target, options).connection;
23336
+ connect(target2, options = {}) {
23337
+ return this.connectConnection(target2, options).connection;
23293
23338
  }
23294
- connectWith(target, op) {
23295
- const { rawConnection, connection } = this.connectConnection(target);
23339
+ connectWith(target2, op) {
23340
+ const { rawConnection, connection } = this.connectConnection(target2);
23296
23341
  return rawConnection.runUntil(() => op(connection.client));
23297
23342
  }
23298
23343
  /**
@@ -23333,22 +23378,22 @@ var AgentApp = class {
23333
23378
  registerAppNotification(this.builder, spec, (params, cx, signal) => agentNotificationContext(params, AgentContext.create(cx), signal), handler);
23334
23379
  return this;
23335
23380
  }
23336
- connectConnection(target, options = {}) {
23337
- if (isStream(target)) {
23338
- const state2 = this.openStreamConnection(target);
23381
+ connectConnection(target2, options = {}) {
23382
+ if (isStream(target2)) {
23383
+ const state2 = this.openStreamConnection(target2);
23339
23384
  if (!options.deferConnectHandlers) {
23340
23385
  this[runAgentConnectHandlers](state2.connection);
23341
23386
  }
23342
23387
  return state2;
23343
23388
  }
23344
23389
  const [thisStream, peerStream] = memoryStreamPair();
23345
- const peerRawConnection = target[appBuilder]().connect(peerStream, stableConnectionOptions);
23390
+ const peerRawConnection = target2[appBuilder]().connect(peerStream, stableConnectionOptions);
23346
23391
  const peerConnection = clientConnection(peerRawConnection);
23347
23392
  const state = this.openStreamConnection(thisStream);
23348
23393
  void state.rawConnection.closed.then(() => peerConnection.close());
23349
23394
  void peerRawConnection.closed.then(() => state.connection.close());
23350
23395
  try {
23351
- target[runClientConnectHandlers](peerConnection);
23396
+ target2[runClientConnectHandlers](peerConnection);
23352
23397
  this[runAgentConnectHandlers](state.connection);
23353
23398
  } catch (error51) {
23354
23399
  peerConnection.close(error51);
@@ -23388,11 +23433,11 @@ var ClientApp = class {
23388
23433
  [runClientConnectHandlers](connection) {
23389
23434
  runConnectHandlers(connection, this.connectHandlers);
23390
23435
  }
23391
- connect(target) {
23392
- return this.connectConnection(target).connection;
23436
+ connect(target2) {
23437
+ return this.connectConnection(target2).connection;
23393
23438
  }
23394
- connectWith(target, op) {
23395
- const { rawConnection, connection } = this.connectConnection(target);
23439
+ connectWith(target2, op) {
23440
+ const { rawConnection, connection } = this.connectConnection(target2);
23396
23441
  return rawConnection.runUntil(() => op(connection.agent));
23397
23442
  }
23398
23443
  /**
@@ -23433,20 +23478,20 @@ var ClientApp = class {
23433
23478
  registerAppNotification(this.builder, spec, (params, cx, signal) => clientNotificationContext(params, ClientContext.create(cx), signal), handler);
23434
23479
  return this;
23435
23480
  }
23436
- connectConnection(target) {
23437
- if (isStream(target)) {
23438
- const state2 = this.openStreamConnection(target);
23481
+ connectConnection(target2) {
23482
+ if (isStream(target2)) {
23483
+ const state2 = this.openStreamConnection(target2);
23439
23484
  this[runClientConnectHandlers](state2.connection);
23440
23485
  return state2;
23441
23486
  }
23442
23487
  const [thisStream, peerStream] = memoryStreamPair();
23443
- const peerRawConnection = target[appBuilder]().connect(peerStream, stableConnectionOptions);
23488
+ const peerRawConnection = target2[appBuilder]().connect(peerStream, stableConnectionOptions);
23444
23489
  const peerConnection = agentConnection(peerRawConnection);
23445
23490
  const state = this.openStreamConnection(thisStream);
23446
23491
  void state.rawConnection.closed.then(() => peerConnection.close());
23447
23492
  void peerRawConnection.closed.then(() => state.connection.close());
23448
23493
  try {
23449
- target[runAgentConnectHandlers](peerConnection);
23494
+ target2[runAgentConnectHandlers](peerConnection);
23450
23495
  this[runClientConnectHandlers](state.connection);
23451
23496
  } catch (error51) {
23452
23497
  peerConnection.close(error51);
@@ -24693,7 +24738,7 @@ async function validateCodeBuddyChildContents(contents, parent, childId, cwd, to
24693
24738
  throw new CodeBuddyError("protocolError", "Inherited Subagent identity changed");
24694
24739
  inheritedEntries = prefixParsed.entries;
24695
24740
  }
24696
- const target = await realpath3(cwd);
24741
+ const target2 = await realpath3(cwd);
24697
24742
  const inheritedCwds = inheritedEntries.flatMap((row) => typeof row.cwd === "string" ? [row.cwd] : []);
24698
24743
  const suffixCwds = parsed.entries.slice(inheritedEntries.length).flatMap((row) => typeof row.cwd === "string" ? [row.cwd] : []);
24699
24744
  const canonical = await canonicalCwds(suffixCwds);
@@ -24705,7 +24750,7 @@ async function validateCodeBuddyChildContents(contents, parent, childId, cwd, to
24705
24750
  }
24706
24751
  for (const value of suffixCwds) {
24707
24752
  const actual = canonical.get(value);
24708
- if (!actual || !equalPath(actual, target))
24753
+ if (!actual || !equalPath(actual, target2))
24709
24754
  throw new CodeBuddyError("invalidRequest", "Subagent workspace differs from parent");
24710
24755
  }
24711
24756
  const bindings = new Map((inherited?.workspaceBindings ?? []).map((binding) => [
@@ -27475,16 +27520,16 @@ function createWorkBuddyInstallation(environment, dependencies = {}) {
27475
27520
  }
27476
27521
  };
27477
27522
  const root = product.applicationName === "workbuddy-ai" && product.updateUrl === "https://www.workbuddy.ai" ? "https://www.workbuddy.ai" : product.applicationName === "workbuddy" && product.updateUrl === "https://www.workbuddy.cn" ? "https://www.workbuddy.cn" : void 0;
27478
- const target = platform === "darwin" && (arch === "arm64" || arch === "x64") ? `darwin-${arch}` : platform === "win32" && arch === "x64" ? "win32-x64-user" : void 0;
27479
- if (!root || !target || environment.WORKBUDDY_UPDATE_URL?.trim() && environment.WORKBUDDY_UPDATE_URL.trim() !== root)
27523
+ const target2 = platform === "darwin" && (arch === "arm64" || arch === "x64") ? `darwin-${arch}` : platform === "win32" && arch === "x64" ? "win32-x64-user" : void 0;
27524
+ if (!root || !target2 || environment.WORKBUDDY_UPDATE_URL?.trim() && environment.WORKBUDDY_UPDATE_URL.trim() !== root)
27480
27525
  return unknown2;
27481
27526
  try {
27482
- const feed = JSON.parse(await (dependencies.fetchText ?? fetchInstallationText)(`${root}/v2/update?platform=workbuddy-${target}`));
27527
+ const feed = JSON.parse(await (dependencies.fetchText ?? fetchInstallationText)(`${root}/v2/update?platform=workbuddy-${target2}`));
27483
27528
  const feedVersion = installationVersion(feed.version);
27484
27529
  const latestVersion = appVersion(feedVersion);
27485
27530
  const download = new URL(typeof feed.url === "string" ? feed.url : "");
27486
27531
  const downloadHost = root.endsWith(".ai") ? "download.codebuddy.ai" : "download.codebuddy.cn";
27487
- if (download.origin !== `https://${downloadHost}` || download.username || download.password || download.search || download.hash || !download.pathname.startsWith(`/workbuddy/saas/${target}/WorkBuddy-${target}-${feedVersion}-`) || !download.pathname.endsWith(platform === "darwin" ? ".zip" : ".exe"))
27532
+ if (download.origin !== `https://${downloadHost}` || download.username || download.password || download.search || download.hash || !download.pathname.startsWith(`/workbuddy/saas/${target2}/WorkBuddy-${target2}-${feedVersion}-`) || !download.pathname.endsWith(platform === "darwin" ? ".zip" : ".exe"))
27488
27533
  throw new Error("WorkBuddy update feed returned an invalid installer URL");
27489
27534
  if (platform === "darwin")
27490
27535
  download.pathname = download.pathname.replace(/\.zip$/u, ".dmg");
@@ -1,8 +1,8 @@
1
1
  import { createRequire as __codexhostCreateRequire } from "node:module"; const require = __codexhostCreateRequire(import.meta.url);
2
2
  var __defProp = Object.defineProperty;
3
- var __export = (target, all) => {
3
+ var __export = (target2, all) => {
4
4
  for (var name in all)
5
- __defProp(target, name, { get: all[name], enumerable: true });
5
+ __defProp(target2, name, { get: all[name], enumerable: true });
6
6
  };
7
7
 
8
8
  // dist/usage-statistics.js
@@ -816,8 +816,8 @@ function defineLazy(object2, key, getter) {
816
816
  function objectClone(obj) {
817
817
  return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
818
818
  }
819
- function assignProp(target, prop, value) {
820
- Object.defineProperty(target, prop, {
819
+ function assignProp(target2, prop, value) {
820
+ Object.defineProperty(target2, prop, {
821
821
  value,
822
822
  writable: true,
823
823
  enumerable: true,
@@ -1000,35 +1000,35 @@ function normalizeParams(_params) {
1000
1000
  return params;
1001
1001
  }
1002
1002
  function createTransparentProxy(getter) {
1003
- let target;
1003
+ let target2;
1004
1004
  return new Proxy({}, {
1005
1005
  get(_, prop, receiver) {
1006
- target ?? (target = getter());
1007
- return Reflect.get(target, prop, receiver);
1006
+ target2 ?? (target2 = getter());
1007
+ return Reflect.get(target2, prop, receiver);
1008
1008
  },
1009
1009
  set(_, prop, value, receiver) {
1010
- target ?? (target = getter());
1011
- return Reflect.set(target, prop, value, receiver);
1010
+ target2 ?? (target2 = getter());
1011
+ return Reflect.set(target2, prop, value, receiver);
1012
1012
  },
1013
1013
  has(_, prop) {
1014
- target ?? (target = getter());
1015
- return Reflect.has(target, prop);
1014
+ target2 ?? (target2 = getter());
1015
+ return Reflect.has(target2, prop);
1016
1016
  },
1017
1017
  deleteProperty(_, prop) {
1018
- target ?? (target = getter());
1019
- return Reflect.deleteProperty(target, prop);
1018
+ target2 ?? (target2 = getter());
1019
+ return Reflect.deleteProperty(target2, prop);
1020
1020
  },
1021
1021
  ownKeys(_) {
1022
- target ?? (target = getter());
1023
- return Reflect.ownKeys(target);
1022
+ target2 ?? (target2 = getter());
1023
+ return Reflect.ownKeys(target2);
1024
1024
  },
1025
1025
  getOwnPropertyDescriptor(_, prop) {
1026
- target ?? (target = getter());
1027
- return Reflect.getOwnPropertyDescriptor(target, prop);
1026
+ target2 ?? (target2 = getter());
1027
+ return Reflect.getOwnPropertyDescriptor(target2, prop);
1028
1028
  },
1029
1029
  defineProperty(_, prop, descriptor) {
1030
- target ?? (target = getter());
1031
- return Reflect.defineProperty(target, prop, descriptor);
1030
+ target2 ?? (target2 = getter());
1031
+ return Reflect.defineProperty(target2, prop, descriptor);
1032
1032
  }
1033
1033
  });
1034
1034
  }
@@ -11480,15 +11480,15 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
11480
11480
 
11481
11481
  // ../../../node_modules/zod/v4/core/to-json-schema.js
11482
11482
  function initializeContext(params) {
11483
- let target = params?.target ?? "draft-2020-12";
11484
- if (target === "draft-4")
11485
- target = "draft-04";
11486
- if (target === "draft-7")
11487
- target = "draft-07";
11483
+ let target2 = params?.target ?? "draft-2020-12";
11484
+ if (target2 === "draft-4")
11485
+ target2 = "draft-04";
11486
+ if (target2 === "draft-7")
11487
+ target2 = "draft-07";
11488
11488
  return {
11489
11489
  processors: params.processors ?? {},
11490
11490
  metadataRegistry: params?.metadata ?? globalRegistry,
11491
- target,
11491
+ target: target2,
11492
11492
  unrepresentable: params?.unrepresentable ?? "throw",
11493
11493
  override: params?.override ?? (() => {
11494
11494
  }),
@@ -11830,8 +11830,8 @@ var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
11830
11830
  return finalize(ctx, schema);
11831
11831
  };
11832
11832
  var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
11833
- const { libraryOptions, target } = params ?? {};
11834
- const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
11833
+ const { libraryOptions, target: target2 } = params ?? {};
11834
+ const ctx = initializeContext({ ...libraryOptions ?? {}, target: target2, io, processors });
11835
11835
  process2(schema, ctx);
11836
11836
  extractDefs(ctx, schema);
11837
11837
  return finalize(ctx, schema);
@@ -12890,8 +12890,8 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
12890
12890
  catch(params) {
12891
12891
  return _catch2(this, params);
12892
12892
  },
12893
- pipe(target) {
12894
- return pipe(this, target);
12893
+ pipe(target2) {
12894
+ return pipe(this, target2);
12895
12895
  },
12896
12896
  readonly() {
12897
12897
  return readonly(this);
@@ -15249,15 +15249,15 @@ var threadOwnershipListResultSchema = external_exports.object({
15249
15249
  threads: external_exports.array(threadOwnershipSchema).min(1).max(THREAD_OWNERSHIP_LIST_MAX_LENGTH)
15250
15250
  }).strict().superRefine(({ threads }, context) => {
15251
15251
  const seen = /* @__PURE__ */ new Set();
15252
- for (const [index, thread] of threads.entries()) {
15253
- if (seen.has(thread.threadId)) {
15252
+ for (const [index, thread2] of threads.entries()) {
15253
+ if (seen.has(thread2.threadId)) {
15254
15254
  context.addIssue({
15255
15255
  code: "custom",
15256
15256
  message: "Thread ownership-list results must be unique",
15257
15257
  path: ["threads", index, "threadId"]
15258
15258
  });
15259
15259
  }
15260
- seen.add(thread.threadId);
15260
+ seen.add(thread2.threadId);
15261
15261
  }
15262
15262
  });
15263
15263
  var threadSteeringInspectParamsSchema = external_exports.object({
@@ -15466,13 +15466,18 @@ var clientChannelResponseSchema = external_exports.object({
15466
15466
  });
15467
15467
 
15468
15468
  // ../../shared-contracts/dist/thread-catalog.js
15469
- var threadCatalogReadParamsSchema = external_exports.object({ includeArchived: external_exports.boolean().optional() }).strict();
15469
+ var threadCatalogReadParamsSchema = external_exports.object({
15470
+ includeArchived: external_exports.boolean().optional(),
15471
+ /** Absent means first page; null means this branch is exhausted. Native cursors only. */
15472
+ officialCursor: external_exports.object({ live: external_exports.string().nullable(), archived: external_exports.string().nullable().optional() }).strict().optional()
15473
+ }).strict();
15470
15474
  var threadCatalogReadResultSchema = external_exports.object({
15471
15475
  threads: external_exports.array(jsonObjectSchema),
15472
15476
  ownership: external_exports.array(threadOwnershipSchema),
15473
15477
  /** Known archived IDs, including visible local external records even when their rows are
15474
- * excluded. Native archived IDs are complete only when includeArchived is true. */
15475
- archivedThreadIds: external_exports.array(hostThreadIdSchema)
15478
+ * excluded. Native archived IDs describe only the returned page, never a complete set. */
15479
+ archivedThreadIds: external_exports.array(hostThreadIdSchema),
15480
+ officialCursor: external_exports.object({ live: external_exports.string().nullable(), archived: external_exports.string().nullable().optional() }).strict().optional()
15476
15481
  }).strict();
15477
15482
 
15478
15483
  // ../../shared-contracts/dist/voice.js
@@ -15687,7 +15692,7 @@ var idleReleaseSettingsSchema = external_exports.strictObject({
15687
15692
  });
15688
15693
  var DEFAULT_IDLE_RELEASE_SETTINGS = Object.freeze({
15689
15694
  enabled: false,
15690
- timeoutMinutes: 30
15695
+ timeoutMinutes: 10
15691
15696
  });
15692
15697
 
15693
15698
  // ../../shared-contracts/dist/harness-preferences.js
@@ -16590,6 +16595,44 @@ var remoteSshSetupParamsSchema = external_exports.object({
16590
16595
  }).strict();
16591
16596
  var remoteSshSetupResultSchema = external_exports.object({ state: external_exports.enum(["installed", "not-installed"]) }).strict();
16592
16597
 
16598
+ // ../../shared-contracts/dist/remote-sessions.js
16599
+ var REMOTE_CONTROLLER_REQUEST_MAX_BYTES = 16 * 1024;
16600
+ var identity = external_exports.string().min(1).max(1024);
16601
+ var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
16602
+ var thread = { ...target, threadId: identity };
16603
+ var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
16604
+ external_exports.strictObject({ kind: external_exports.literal("hosts") }),
16605
+ external_exports.strictObject({
16606
+ kind: external_exports.literal("list"),
16607
+ ...target,
16608
+ cursor: external_exports.string().nullable(),
16609
+ archived: external_exports.boolean()
16610
+ }),
16611
+ external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
16612
+ external_exports.strictObject({
16613
+ kind: external_exports.literal("prompt"),
16614
+ ...thread,
16615
+ epoch: identity,
16616
+ text: external_exports.string().min(1).max(8e3),
16617
+ requestId: identity.optional()
16618
+ }),
16619
+ external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
16620
+ external_exports.strictObject({
16621
+ kind: external_exports.literal("rename"),
16622
+ ...thread,
16623
+ epoch: identity,
16624
+ name: external_exports.string().min(1).max(512)
16625
+ }),
16626
+ external_exports.strictObject({ kind: external_exports.literal("archive"), ...thread, epoch: identity, archived: external_exports.boolean() }),
16627
+ external_exports.strictObject({
16628
+ kind: external_exports.literal("respond"),
16629
+ ...thread,
16630
+ epoch: identity,
16631
+ requestId: external_exports.union([identity, external_exports.number().int()]),
16632
+ result: external_exports.record(external_exports.string(), external_exports.unknown())
16633
+ })
16634
+ ]);
16635
+
16593
16636
  // ../../shared-contracts/dist/remote-connections.js
16594
16637
  var hostId = external_exports.string().min(1).max(1024);
16595
16638
  var codexSshConnectionSchema = external_exports.object({
@@ -16610,7 +16653,9 @@ var codexSshDraftSchema = external_exports.strictObject({
16610
16653
  identity: external_exports.string().max(4096).nullable()
16611
16654
  });
16612
16655
  var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
16656
+ external_exports.strictObject({ action: external_exports.literal("session"), operation: remoteSessionOperationSchema }),
16613
16657
  external_exports.strictObject({ action: external_exports.literal("list") }),
16658
+ external_exports.strictObject({ action: external_exports.literal("catalog") }),
16614
16659
  external_exports.strictObject({
16615
16660
  action: external_exports.literal("read-thread"),
16616
16661
  hostId: hostId.refine((id) => id !== "local"),
@@ -17425,8 +17470,8 @@ var locationSchema = external_exports.object({
17425
17470
  projectId: external_exports.string().trim().min(1),
17426
17471
  apiKeyId: external_exports.string().trim().min(1)
17427
17472
  });
17428
- function readProjectCredential(credential, family, identity, origin) {
17429
- const key = `project-key-location:v1:${encodeURIComponent(JSON.stringify([origin, family, identity, null, 1, "non-team"]))}`;
17473
+ function readProjectCredential(credential, family, identity2, origin) {
17474
+ const key = `project-key-location:v1:${encodeURIComponent(JSON.stringify([origin, family, identity2, null, 1, "non-team"]))}`;
17430
17475
  const raw = credential(key);
17431
17476
  if (!raw)
17432
17477
  return void 0;
@@ -17612,14 +17657,14 @@ var PersonalCodingPlanAccount = class {
17612
17657
  return void 0;
17613
17658
  const profile = recordSchema2.parse(JSON.parse(raw));
17614
17659
  const normalized = external_exports.object({ id: external_exports.string(), username: external_exports.string(), displayName: external_exports.string() }).safeParse(profile).data;
17615
- const identity = normalized ? normalized.id.trim() : family === "zai" && typeof profile.user_id === "string" ? profile.user_id.trim() : "";
17616
- if (!identity || identity === "unknown")
17660
+ const identity2 = normalized ? normalized.id.trim() : family === "zai" && typeof profile.user_id === "string" ? profile.user_id.trim() : "";
17661
+ if (!identity2 || identity2 === "unknown")
17617
17662
  return void 0;
17618
- const project2 = readProjectCredential(credential, family, identity, personalCodingPlanOrigin(family, this.environment));
17663
+ const project2 = readProjectCredential(credential, family, identity2, personalCodingPlanOrigin(family, this.environment));
17619
17664
  if (project2)
17620
- return { identity, current, apiKey: project2.loginToken, project: project2 };
17621
- const key = `account-provider:coding-plan:${providerId}:account:${encodeURIComponent(identity)}:api-key`;
17622
- return { identity, current, apiKey: credential(key).trim() };
17665
+ return { identity: identity2, current, apiKey: project2.loginToken, project: project2 };
17666
+ const key = `account-provider:coding-plan:${providerId}:account:${encodeURIComponent(identity2)}:api-key`;
17667
+ return { identity: identity2, current, apiKey: credential(key).trim() };
17623
17668
  }
17624
17669
  async inspect(providerId, accountType) {
17625
17670
  const family = familySchema.parse(accountType);
@@ -20313,14 +20358,14 @@ var ZcodeSession = class {
20313
20358
  const snapshot = await this.#readNative();
20314
20359
  const usage = record2(await this.transport.request("getTaskTokenUsage", { sessionId: this.sessionId }));
20315
20360
  const fields = { ...sessionUsage(snapshot, this.nativeCatalog) ?? {} };
20316
- for (const [source, target] of [
20361
+ for (const [source, target2] of [
20317
20362
  ["inputTokens", "inputTokens"],
20318
20363
  ["outputTokens", "outputTokens"],
20319
20364
  ["totalTokens", "totalTokens"],
20320
20365
  ["reasoningTokens", "reasoningOutputTokens"]
20321
20366
  ])
20322
20367
  if (typeof usage[source] === "number")
20323
- fields[target] = usage[source];
20368
+ fields[target2] = usage[source];
20324
20369
  this.#emit({
20325
20370
  type: "session.usage.changed",
20326
20371
  usage: parseHostUsage(fields),