@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-discovery/dist/environment.js
@@ -360,9 +360,9 @@ import path4 from "node:path";
360
360
  function referencesNpmBin(shim, name, bin) {
361
361
  if (bin.includes(".."))
362
362
  return false;
363
- const target = `node_modules/${name}/${bin.replace(/^\.\//, "")}`.toLowerCase();
363
+ const target2 = `node_modules/${name}/${bin.replace(/^\.\//, "")}`.toLowerCase();
364
364
  const text = shim.replaceAll("\\", "/").toLowerCase();
365
- return text.includes(`%dp0%/${target}"`) || text.includes(`%~dp0/${target}"`);
365
+ return text.includes(`%dp0%/${target2}"`) || text.includes(`%~dp0/${target2}"`);
366
366
  }
367
367
  async function npmInstallation(command, packages, environment) {
368
368
  let selected = await realpath(command);
@@ -401,8 +401,8 @@ async function npmInstallation(command, packages, environment) {
401
401
  const launchers = await Promise.all(Object.entries(bins).map(async ([bin, entry]) => {
402
402
  if (path4.basename(bin) !== bin || entry.includes(".."))
403
403
  return false;
404
- const target = await realpath(path4.join(directory, entry)).catch(() => "");
405
- if (target.toLowerCase() !== selected.toLowerCase())
404
+ const target2 = await realpath(path4.join(directory, entry)).catch(() => "");
405
+ if (target2.toLowerCase() !== selected.toLowerCase())
406
406
  return false;
407
407
  const shim = await readFile(path4.join(prefix, `${bin}.cmd`), "utf8").catch(() => "");
408
408
  return referencesNpmBin(shim, name, entry);
@@ -1298,8 +1298,8 @@ function defineLazy(object2, key, getter) {
1298
1298
  function objectClone(obj) {
1299
1299
  return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
1300
1300
  }
1301
- function assignProp(target, prop, value) {
1302
- Object.defineProperty(target, prop, {
1301
+ function assignProp(target2, prop, value) {
1302
+ Object.defineProperty(target2, prop, {
1303
1303
  value,
1304
1304
  writable: true,
1305
1305
  enumerable: true,
@@ -1482,35 +1482,35 @@ function normalizeParams(_params) {
1482
1482
  return params;
1483
1483
  }
1484
1484
  function createTransparentProxy(getter) {
1485
- let target;
1485
+ let target2;
1486
1486
  return new Proxy({}, {
1487
1487
  get(_, prop, receiver) {
1488
- target ?? (target = getter());
1489
- return Reflect.get(target, prop, receiver);
1488
+ target2 ?? (target2 = getter());
1489
+ return Reflect.get(target2, prop, receiver);
1490
1490
  },
1491
1491
  set(_, prop, value, receiver) {
1492
- target ?? (target = getter());
1493
- return Reflect.set(target, prop, value, receiver);
1492
+ target2 ?? (target2 = getter());
1493
+ return Reflect.set(target2, prop, value, receiver);
1494
1494
  },
1495
1495
  has(_, prop) {
1496
- target ?? (target = getter());
1497
- return Reflect.has(target, prop);
1496
+ target2 ?? (target2 = getter());
1497
+ return Reflect.has(target2, prop);
1498
1498
  },
1499
1499
  deleteProperty(_, prop) {
1500
- target ?? (target = getter());
1501
- return Reflect.deleteProperty(target, prop);
1500
+ target2 ?? (target2 = getter());
1501
+ return Reflect.deleteProperty(target2, prop);
1502
1502
  },
1503
1503
  ownKeys(_) {
1504
- target ?? (target = getter());
1505
- return Reflect.ownKeys(target);
1504
+ target2 ?? (target2 = getter());
1505
+ return Reflect.ownKeys(target2);
1506
1506
  },
1507
1507
  getOwnPropertyDescriptor(_, prop) {
1508
- target ?? (target = getter());
1509
- return Reflect.getOwnPropertyDescriptor(target, prop);
1508
+ target2 ?? (target2 = getter());
1509
+ return Reflect.getOwnPropertyDescriptor(target2, prop);
1510
1510
  },
1511
1511
  defineProperty(_, prop, descriptor) {
1512
- target ?? (target = getter());
1513
- return Reflect.defineProperty(target, prop, descriptor);
1512
+ target2 ?? (target2 = getter());
1513
+ return Reflect.defineProperty(target2, prop, descriptor);
1514
1514
  }
1515
1515
  });
1516
1516
  }
@@ -11962,15 +11962,15 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
11962
11962
 
11963
11963
  // ../../../node_modules/zod/v4/core/to-json-schema.js
11964
11964
  function initializeContext(params) {
11965
- let target = params?.target ?? "draft-2020-12";
11966
- if (target === "draft-4")
11967
- target = "draft-04";
11968
- if (target === "draft-7")
11969
- target = "draft-07";
11965
+ let target2 = params?.target ?? "draft-2020-12";
11966
+ if (target2 === "draft-4")
11967
+ target2 = "draft-04";
11968
+ if (target2 === "draft-7")
11969
+ target2 = "draft-07";
11970
11970
  return {
11971
11971
  processors: params.processors ?? {},
11972
11972
  metadataRegistry: params?.metadata ?? globalRegistry,
11973
- target,
11973
+ target: target2,
11974
11974
  unrepresentable: params?.unrepresentable ?? "throw",
11975
11975
  override: params?.override ?? (() => {
11976
11976
  }),
@@ -12312,8 +12312,8 @@ var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
12312
12312
  return finalize(ctx, schema);
12313
12313
  };
12314
12314
  var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
12315
- const { libraryOptions, target } = params ?? {};
12316
- const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
12315
+ const { libraryOptions, target: target2 } = params ?? {};
12316
+ const ctx = initializeContext({ ...libraryOptions ?? {}, target: target2, io, processors });
12317
12317
  process2(schema, ctx);
12318
12318
  extractDefs(ctx, schema);
12319
12319
  return finalize(ctx, schema);
@@ -13372,8 +13372,8 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
13372
13372
  catch(params) {
13373
13373
  return _catch2(this, params);
13374
13374
  },
13375
- pipe(target) {
13376
- return pipe(this, target);
13375
+ pipe(target2) {
13376
+ return pipe(this, target2);
13377
13377
  },
13378
13378
  readonly() {
13379
13379
  return readonly(this);
@@ -15603,15 +15603,15 @@ var threadOwnershipListResultSchema = external_exports.object({
15603
15603
  threads: external_exports.array(threadOwnershipSchema).min(1).max(THREAD_OWNERSHIP_LIST_MAX_LENGTH)
15604
15604
  }).strict().superRefine(({ threads }, context) => {
15605
15605
  const seen = /* @__PURE__ */ new Set();
15606
- for (const [index, thread] of threads.entries()) {
15607
- if (seen.has(thread.threadId)) {
15606
+ for (const [index, thread2] of threads.entries()) {
15607
+ if (seen.has(thread2.threadId)) {
15608
15608
  context.addIssue({
15609
15609
  code: "custom",
15610
15610
  message: "Thread ownership-list results must be unique",
15611
15611
  path: ["threads", index, "threadId"]
15612
15612
  });
15613
15613
  }
15614
- seen.add(thread.threadId);
15614
+ seen.add(thread2.threadId);
15615
15615
  }
15616
15616
  });
15617
15617
  var threadSteeringInspectParamsSchema = external_exports.object({
@@ -15820,13 +15820,18 @@ var clientChannelResponseSchema = external_exports.object({
15820
15820
  });
15821
15821
 
15822
15822
  // ../../shared-contracts/dist/thread-catalog.js
15823
- var threadCatalogReadParamsSchema = external_exports.object({ includeArchived: external_exports.boolean().optional() }).strict();
15823
+ var threadCatalogReadParamsSchema = external_exports.object({
15824
+ includeArchived: external_exports.boolean().optional(),
15825
+ /** Absent means first page; null means this branch is exhausted. Native cursors only. */
15826
+ officialCursor: external_exports.object({ live: external_exports.string().nullable(), archived: external_exports.string().nullable().optional() }).strict().optional()
15827
+ }).strict();
15824
15828
  var threadCatalogReadResultSchema = external_exports.object({
15825
15829
  threads: external_exports.array(jsonObjectSchema),
15826
15830
  ownership: external_exports.array(threadOwnershipSchema),
15827
15831
  /** Known archived IDs, including visible local external records even when their rows are
15828
- * excluded. Native archived IDs are complete only when includeArchived is true. */
15829
- archivedThreadIds: external_exports.array(hostThreadIdSchema)
15832
+ * excluded. Native archived IDs describe only the returned page, never a complete set. */
15833
+ archivedThreadIds: external_exports.array(hostThreadIdSchema),
15834
+ officialCursor: external_exports.object({ live: external_exports.string().nullable(), archived: external_exports.string().nullable().optional() }).strict().optional()
15830
15835
  }).strict();
15831
15836
 
15832
15837
  // ../../shared-contracts/dist/voice.js
@@ -16041,7 +16046,7 @@ var idleReleaseSettingsSchema = external_exports.strictObject({
16041
16046
  });
16042
16047
  var DEFAULT_IDLE_RELEASE_SETTINGS = Object.freeze({
16043
16048
  enabled: false,
16044
- timeoutMinutes: 30
16049
+ timeoutMinutes: 10
16045
16050
  });
16046
16051
 
16047
16052
  // ../../shared-contracts/dist/harness-preferences.js
@@ -16944,6 +16949,44 @@ var remoteSshSetupParamsSchema = external_exports.object({
16944
16949
  }).strict();
16945
16950
  var remoteSshSetupResultSchema = external_exports.object({ state: external_exports.enum(["installed", "not-installed"]) }).strict();
16946
16951
 
16952
+ // ../../shared-contracts/dist/remote-sessions.js
16953
+ var REMOTE_CONTROLLER_REQUEST_MAX_BYTES = 16 * 1024;
16954
+ var identity = external_exports.string().min(1).max(1024);
16955
+ var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
16956
+ var thread = { ...target, threadId: identity };
16957
+ var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
16958
+ external_exports.strictObject({ kind: external_exports.literal("hosts") }),
16959
+ external_exports.strictObject({
16960
+ kind: external_exports.literal("list"),
16961
+ ...target,
16962
+ cursor: external_exports.string().nullable(),
16963
+ archived: external_exports.boolean()
16964
+ }),
16965
+ external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
16966
+ external_exports.strictObject({
16967
+ kind: external_exports.literal("prompt"),
16968
+ ...thread,
16969
+ epoch: identity,
16970
+ text: external_exports.string().min(1).max(8e3),
16971
+ requestId: identity.optional()
16972
+ }),
16973
+ external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
16974
+ external_exports.strictObject({
16975
+ kind: external_exports.literal("rename"),
16976
+ ...thread,
16977
+ epoch: identity,
16978
+ name: external_exports.string().min(1).max(512)
16979
+ }),
16980
+ external_exports.strictObject({ kind: external_exports.literal("archive"), ...thread, epoch: identity, archived: external_exports.boolean() }),
16981
+ external_exports.strictObject({
16982
+ kind: external_exports.literal("respond"),
16983
+ ...thread,
16984
+ epoch: identity,
16985
+ requestId: external_exports.union([identity, external_exports.number().int()]),
16986
+ result: external_exports.record(external_exports.string(), external_exports.unknown())
16987
+ })
16988
+ ]);
16989
+
16947
16990
  // ../../shared-contracts/dist/remote-connections.js
16948
16991
  var hostId = external_exports.string().min(1).max(1024);
16949
16992
  var codexSshConnectionSchema = external_exports.object({
@@ -16964,7 +17007,9 @@ var codexSshDraftSchema = external_exports.strictObject({
16964
17007
  identity: external_exports.string().max(4096).nullable()
16965
17008
  });
16966
17009
  var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
17010
+ external_exports.strictObject({ action: external_exports.literal("session"), operation: remoteSessionOperationSchema }),
16967
17011
  external_exports.strictObject({ action: external_exports.literal("list") }),
17012
+ external_exports.strictObject({ action: external_exports.literal("catalog") }),
16968
17013
  external_exports.strictObject({
16969
17014
  action: external_exports.literal("read-thread"),
16970
17015
  hostId: hostId.refine((id) => id !== "local"),
@@ -25757,9 +25802,9 @@ var __returnValue = (v) => v;
25757
25802
  function __exportSetter(name, newValue) {
25758
25803
  this[name] = __returnValue.bind(null, newValue);
25759
25804
  }
25760
- var __export2 = (target, all) => {
25805
+ var __export2 = (target2, all) => {
25761
25806
  for (var name in all)
25762
- __defProp2(target, name, {
25807
+ __defProp2(target2, name, {
25763
25808
  get: all[name],
25764
25809
  enumerable: true,
25765
25810
  configurable: true,
@@ -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-discovery/dist/environment.js
@@ -1298,8 +1298,8 @@ function defineLazy(object3, key, getter) {
1298
1298
  function objectClone(obj) {
1299
1299
  return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
1300
1300
  }
1301
- function assignProp(target, prop, value) {
1302
- Object.defineProperty(target, prop, {
1301
+ function assignProp(target2, prop, value) {
1302
+ Object.defineProperty(target2, prop, {
1303
1303
  value,
1304
1304
  writable: true,
1305
1305
  enumerable: true,
@@ -1482,35 +1482,35 @@ function normalizeParams(_params) {
1482
1482
  return params;
1483
1483
  }
1484
1484
  function createTransparentProxy(getter) {
1485
- let target;
1485
+ let target2;
1486
1486
  return new Proxy({}, {
1487
1487
  get(_, prop, receiver) {
1488
- target ?? (target = getter());
1489
- return Reflect.get(target, prop, receiver);
1488
+ target2 ?? (target2 = getter());
1489
+ return Reflect.get(target2, prop, receiver);
1490
1490
  },
1491
1491
  set(_, prop, value, receiver) {
1492
- target ?? (target = getter());
1493
- return Reflect.set(target, prop, value, receiver);
1492
+ target2 ?? (target2 = getter());
1493
+ return Reflect.set(target2, prop, value, receiver);
1494
1494
  },
1495
1495
  has(_, prop) {
1496
- target ?? (target = getter());
1497
- return Reflect.has(target, prop);
1496
+ target2 ?? (target2 = getter());
1497
+ return Reflect.has(target2, prop);
1498
1498
  },
1499
1499
  deleteProperty(_, prop) {
1500
- target ?? (target = getter());
1501
- return Reflect.deleteProperty(target, prop);
1500
+ target2 ?? (target2 = getter());
1501
+ return Reflect.deleteProperty(target2, prop);
1502
1502
  },
1503
1503
  ownKeys(_) {
1504
- target ?? (target = getter());
1505
- return Reflect.ownKeys(target);
1504
+ target2 ?? (target2 = getter());
1505
+ return Reflect.ownKeys(target2);
1506
1506
  },
1507
1507
  getOwnPropertyDescriptor(_, prop) {
1508
- target ?? (target = getter());
1509
- return Reflect.getOwnPropertyDescriptor(target, prop);
1508
+ target2 ?? (target2 = getter());
1509
+ return Reflect.getOwnPropertyDescriptor(target2, prop);
1510
1510
  },
1511
1511
  defineProperty(_, prop, descriptor) {
1512
- target ?? (target = getter());
1513
- return Reflect.defineProperty(target, prop, descriptor);
1512
+ target2 ?? (target2 = getter());
1513
+ return Reflect.defineProperty(target2, prop, descriptor);
1514
1514
  }
1515
1515
  });
1516
1516
  }
@@ -11962,15 +11962,15 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
11962
11962
 
11963
11963
  // ../../../node_modules/zod/v4/core/to-json-schema.js
11964
11964
  function initializeContext(params) {
11965
- let target = params?.target ?? "draft-2020-12";
11966
- if (target === "draft-4")
11967
- target = "draft-04";
11968
- if (target === "draft-7")
11969
- target = "draft-07";
11965
+ let target2 = params?.target ?? "draft-2020-12";
11966
+ if (target2 === "draft-4")
11967
+ target2 = "draft-04";
11968
+ if (target2 === "draft-7")
11969
+ target2 = "draft-07";
11970
11970
  return {
11971
11971
  processors: params.processors ?? {},
11972
11972
  metadataRegistry: params?.metadata ?? globalRegistry,
11973
- target,
11973
+ target: target2,
11974
11974
  unrepresentable: params?.unrepresentable ?? "throw",
11975
11975
  override: params?.override ?? (() => {
11976
11976
  }),
@@ -12312,8 +12312,8 @@ var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
12312
12312
  return finalize(ctx, schema);
12313
12313
  };
12314
12314
  var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
12315
- const { libraryOptions, target } = params ?? {};
12316
- const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
12315
+ const { libraryOptions, target: target2 } = params ?? {};
12316
+ const ctx = initializeContext({ ...libraryOptions ?? {}, target: target2, io, processors });
12317
12317
  process2(schema, ctx);
12318
12318
  extractDefs(ctx, schema);
12319
12319
  return finalize(ctx, schema);
@@ -13372,8 +13372,8 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
13372
13372
  catch(params) {
13373
13373
  return _catch2(this, params);
13374
13374
  },
13375
- pipe(target) {
13376
- return pipe(this, target);
13375
+ pipe(target2) {
13376
+ return pipe(this, target2);
13377
13377
  },
13378
13378
  readonly() {
13379
13379
  return readonly(this);
@@ -15603,15 +15603,15 @@ var threadOwnershipListResultSchema = external_exports.object({
15603
15603
  threads: external_exports.array(threadOwnershipSchema).min(1).max(THREAD_OWNERSHIP_LIST_MAX_LENGTH)
15604
15604
  }).strict().superRefine(({ threads }, context) => {
15605
15605
  const seen = /* @__PURE__ */ new Set();
15606
- for (const [index, thread] of threads.entries()) {
15607
- if (seen.has(thread.threadId)) {
15606
+ for (const [index, thread2] of threads.entries()) {
15607
+ if (seen.has(thread2.threadId)) {
15608
15608
  context.addIssue({
15609
15609
  code: "custom",
15610
15610
  message: "Thread ownership-list results must be unique",
15611
15611
  path: ["threads", index, "threadId"]
15612
15612
  });
15613
15613
  }
15614
- seen.add(thread.threadId);
15614
+ seen.add(thread2.threadId);
15615
15615
  }
15616
15616
  });
15617
15617
  var threadSteeringInspectParamsSchema = external_exports.object({
@@ -15820,13 +15820,18 @@ var clientChannelResponseSchema = external_exports.object({
15820
15820
  });
15821
15821
 
15822
15822
  // ../../shared-contracts/dist/thread-catalog.js
15823
- var threadCatalogReadParamsSchema = external_exports.object({ includeArchived: external_exports.boolean().optional() }).strict();
15823
+ var threadCatalogReadParamsSchema = external_exports.object({
15824
+ includeArchived: external_exports.boolean().optional(),
15825
+ /** Absent means first page; null means this branch is exhausted. Native cursors only. */
15826
+ officialCursor: external_exports.object({ live: external_exports.string().nullable(), archived: external_exports.string().nullable().optional() }).strict().optional()
15827
+ }).strict();
15824
15828
  var threadCatalogReadResultSchema = external_exports.object({
15825
15829
  threads: external_exports.array(jsonObjectSchema),
15826
15830
  ownership: external_exports.array(threadOwnershipSchema),
15827
15831
  /** Known archived IDs, including visible local external records even when their rows are
15828
- * excluded. Native archived IDs are complete only when includeArchived is true. */
15829
- archivedThreadIds: external_exports.array(hostThreadIdSchema)
15832
+ * excluded. Native archived IDs describe only the returned page, never a complete set. */
15833
+ archivedThreadIds: external_exports.array(hostThreadIdSchema),
15834
+ officialCursor: external_exports.object({ live: external_exports.string().nullable(), archived: external_exports.string().nullable().optional() }).strict().optional()
15830
15835
  }).strict();
15831
15836
 
15832
15837
  // ../../shared-contracts/dist/voice.js
@@ -16041,7 +16046,7 @@ var idleReleaseSettingsSchema = external_exports.strictObject({
16041
16046
  });
16042
16047
  var DEFAULT_IDLE_RELEASE_SETTINGS = Object.freeze({
16043
16048
  enabled: false,
16044
- timeoutMinutes: 30
16049
+ timeoutMinutes: 10
16045
16050
  });
16046
16051
 
16047
16052
  // ../../shared-contracts/dist/harness-preferences.js
@@ -16944,6 +16949,44 @@ var remoteSshSetupParamsSchema = external_exports.object({
16944
16949
  }).strict();
16945
16950
  var remoteSshSetupResultSchema = external_exports.object({ state: external_exports.enum(["installed", "not-installed"]) }).strict();
16946
16951
 
16952
+ // ../../shared-contracts/dist/remote-sessions.js
16953
+ var REMOTE_CONTROLLER_REQUEST_MAX_BYTES = 16 * 1024;
16954
+ var identity = external_exports.string().min(1).max(1024);
16955
+ var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
16956
+ var thread = { ...target, threadId: identity };
16957
+ var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
16958
+ external_exports.strictObject({ kind: external_exports.literal("hosts") }),
16959
+ external_exports.strictObject({
16960
+ kind: external_exports.literal("list"),
16961
+ ...target,
16962
+ cursor: external_exports.string().nullable(),
16963
+ archived: external_exports.boolean()
16964
+ }),
16965
+ external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
16966
+ external_exports.strictObject({
16967
+ kind: external_exports.literal("prompt"),
16968
+ ...thread,
16969
+ epoch: identity,
16970
+ text: external_exports.string().min(1).max(8e3),
16971
+ requestId: identity.optional()
16972
+ }),
16973
+ external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
16974
+ external_exports.strictObject({
16975
+ kind: external_exports.literal("rename"),
16976
+ ...thread,
16977
+ epoch: identity,
16978
+ name: external_exports.string().min(1).max(512)
16979
+ }),
16980
+ external_exports.strictObject({ kind: external_exports.literal("archive"), ...thread, epoch: identity, archived: external_exports.boolean() }),
16981
+ external_exports.strictObject({
16982
+ kind: external_exports.literal("respond"),
16983
+ ...thread,
16984
+ epoch: identity,
16985
+ requestId: external_exports.union([identity, external_exports.number().int()]),
16986
+ result: external_exports.record(external_exports.string(), external_exports.unknown())
16987
+ })
16988
+ ]);
16989
+
16947
16990
  // ../../shared-contracts/dist/remote-connections.js
16948
16991
  var hostId = external_exports.string().min(1).max(1024);
16949
16992
  var codexSshConnectionSchema = external_exports.object({
@@ -16964,7 +17007,9 @@ var codexSshDraftSchema = external_exports.strictObject({
16964
17007
  identity: external_exports.string().max(4096).nullable()
16965
17008
  });
16966
17009
  var remoteConnectionsRequestSchema = external_exports.discriminatedUnion("action", [
17010
+ external_exports.strictObject({ action: external_exports.literal("session"), operation: remoteSessionOperationSchema }),
16967
17011
  external_exports.strictObject({ action: external_exports.literal("list") }),
17012
+ external_exports.strictObject({ action: external_exports.literal("catalog") }),
16968
17013
  external_exports.strictObject({
16969
17014
  action: external_exports.literal("read-thread"),
16970
17015
  hostId: hostId.refine((id) => id !== "local"),
@@ -18518,17 +18563,17 @@ function piHistoryMessageIdentities(sessionId, entries) {
18518
18563
  const timestampCounts = /* @__PURE__ */ new Map();
18519
18564
  const identities = /* @__PURE__ */ new Map();
18520
18565
  for (const entry of entries) {
18521
- const identity = piMessageIdentity(sessionId, entry.message, timestampCounts);
18522
- if (identity)
18523
- identities.set(entry.id, identity);
18566
+ const identity2 = piMessageIdentity(sessionId, entry.message, timestampCounts);
18567
+ if (identity2)
18568
+ identities.set(entry.id, identity2);
18524
18569
  }
18525
18570
  return { identities, timestampCounts };
18526
18571
  }
18527
- function piMessageItemId(identity, kind) {
18528
- if (!identity)
18572
+ function piMessageItemId(identity2, kind) {
18573
+ if (!identity2)
18529
18574
  return null;
18530
- const timestampIdentity = "timestamp" in identity;
18531
- const value = timestampIdentity ? JSON.stringify([identity.sessionId, identity.timestamp, identity.occurrence]) : identity.responseId;
18575
+ const timestampIdentity = "timestamp" in identity2;
18576
+ const value = timestampIdentity ? JSON.stringify([identity2.sessionId, identity2.timestamp, identity2.occurrence]) : identity2.responseId;
18532
18577
  const digest = createHash("sha256").update(value).digest("hex");
18533
18578
  return hostItemIdSchema.parse(`pi-${timestampIdentity ? "message" : "response"}-v1-${digest}-${kind}`);
18534
18579
  }
@@ -20830,7 +20875,7 @@ function record8(value) {
20830
20875
  return typeof value === "object" && value !== null && !Array.isArray(value);
20831
20876
  }
20832
20877
  var MAX_SESSION_BYTES = 8 * 1024 * 1024;
20833
- async function childHistory(file2, parentSessionId, identity, validateParent = false) {
20878
+ async function childHistory(file2, parentSessionId, identity2, validateParent = false) {
20834
20879
  if (!path13.isAbsolute(file2))
20835
20880
  throw new Error("Pi child Session path is not absolute");
20836
20881
  const handle = await open3(file2, constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0) | (constants.O_NONBLOCK ?? 0));
@@ -20861,7 +20906,7 @@ async function childHistory(file2, parentSessionId, identity, validateParent = f
20861
20906
  model: null,
20862
20907
  ...typeof header.cwd === "string" ? { cwd: header.cwd } : {}
20863
20908
  });
20864
- const prefix = createHash6("sha256").update(identity).digest("hex");
20909
+ const prefix = createHash6("sha256").update(identity2).digest("hex");
20865
20910
  return {
20866
20911
  turns: snapshot.turns.map((turn) => {
20867
20912
  const readonlyTurn = {
@@ -21207,7 +21252,7 @@ function nodeOnPath(environment) {
21207
21252
  }
21208
21253
  return process.execPath;
21209
21254
  }
21210
- function npmShim(target, pathExtFix = false) {
21255
+ function npmShim(target2, pathExtFix = false) {
21211
21256
  return `@ECHO off
21212
21257
  GOTO start
21213
21258
  :find_dp0
@@ -21223,7 +21268,7 @@ IF EXIST "%dp0%\\node.exe" (
21223
21268
  SET "_prog=node"
21224
21269
  ${pathExtFix ? "" : " SET PATHEXT=%PATHEXT:;.JS;=;%\n"})
21225
21270
 
21226
- endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & ${pathExtFix ? "set PATHEXT=%PATHEXT:;.JS;=;% & " : ""}"%_prog%" "%dp0%\\${target}" %*`;
21271
+ endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & ${pathExtFix ? "set PATHEXT=%PATHEXT:;.JS;=;% & " : ""}"%_prog%" "%dp0%\\${target2}" %*`;
21227
21272
  }
21228
21273
  var standaloneNodeSetup = 'IF EXIST "%LOCALAPPDATA%\\pi-node\\current\\node.exe" SET "node=%LOCALAPPDATA%\\pi-node\\current\\node.exe"';
21229
21274
  function managedShim(standalone) {
@@ -21253,8 +21298,8 @@ function piUncNodeInvocation(command, arguments_, environment) {
21253
21298
  const manifest = JSON.parse(text3(path15.join(packageDirectory, "package.json")) ?? "");
21254
21299
  if (typeof manifest === "object" && manifest !== null && "name" in manifest && manifest.name === "@earendil-works/pi-coding-agent") {
21255
21300
  const entry = findPiCliEntry(packageDirectory);
21256
- const target = entry && path15.relative(directory, entry).replaceAll("/", "\\");
21257
- if (entry && target && [npmShim(target), npmShim(target, true)].includes(source)) {
21301
+ const target2 = entry && path15.relative(directory, entry).replaceAll("/", "\\");
21302
+ if (entry && target2 && [npmShim(target2), npmShim(target2, true)].includes(source)) {
21258
21303
  const localNode = path15.join(directory, "node.exe");
21259
21304
  return {
21260
21305
  command: isFile(localNode) ? localNode : nodeOnPath(environment),
@@ -23372,15 +23417,15 @@ var PiHarnessSession = class {
23372
23417
  void transport.runTurn(text4, (event) => this.#handleTurnEvent(active, event)).then(async (result) => {
23373
23418
  active.settling = true;
23374
23419
  try {
23375
- const identity = await this.#completedTurnIdentity(active, transport);
23420
+ const identity2 = await this.#completedTurnIdentity(active, transport);
23376
23421
  this.#completeTurn(active, result.cancelled ? {
23377
23422
  status: "cancelled",
23378
23423
  reason: "Cancelled by user",
23379
- ...identity.checkpoint ? { checkpoint: identity.checkpoint } : {}
23424
+ ...identity2.checkpoint ? { checkpoint: identity2.checkpoint } : {}
23380
23425
  } : {
23381
23426
  status: "succeeded",
23382
- ...identity.checkpoint ? { checkpoint: identity.checkpoint } : {}
23383
- }, result.text, identity.nativeTurnRef);
23427
+ ...identity2.checkpoint ? { checkpoint: identity2.checkpoint } : {}
23428
+ }, result.text, identity2.nativeTurnRef);
23384
23429
  } catch (error51) {
23385
23430
  this.#completeTurn(active, {
23386
23431
  status: "failed",
@@ -23389,20 +23434,20 @@ var PiHarnessSession = class {
23389
23434
  }
23390
23435
  }).catch(async (error51) => {
23391
23436
  active.settling = true;
23392
- let identity;
23437
+ let identity2;
23393
23438
  try {
23394
- identity = await this.#completedTurnIdentity(active, transport);
23439
+ identity2 = await this.#completedTurnIdentity(active, transport);
23395
23440
  } catch {
23396
23441
  }
23397
23442
  this.#completeTurn(active, active.cancellationRequested ? {
23398
23443
  status: "cancelled",
23399
23444
  reason: "Cancelled by user",
23400
- ...identity?.checkpoint ? { checkpoint: identity.checkpoint } : {}
23445
+ ...identity2?.checkpoint ? { checkpoint: identity2.checkpoint } : {}
23401
23446
  } : {
23402
23447
  status: "failed",
23403
23448
  error: normalizedError(error51, "nativeFailure"),
23404
- ...identity?.checkpoint ? { checkpoint: identity.checkpoint } : {}
23405
- }, void 0, identity?.nativeTurnRef);
23449
+ ...identity2?.checkpoint ? { checkpoint: identity2.checkpoint } : {}
23450
+ }, void 0, identity2?.nativeTurnRef);
23406
23451
  });
23407
23452
  return { ok: true, value: { turnId: command.turnId } };
23408
23453
  } finally {