@karlorz/codexhost-cli-linux-x64 0.20.0-1 → 0.21.0-0

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 (51) hide show
  1. package/README.md +1 -1
  2. package/app/codexhost-distribution.json +1 -1
  3. package/app/console-server.mjs +26 -6
  4. package/app/console-web.js +34 -7
  5. package/app/cpa-live-voice-hook.js +26 -6
  6. package/app/desktop-controller.mjs +164 -51
  7. package/app/host-runtime.mjs +21746 -15276
  8. package/app/plugins/antigravity/assets/icon.svg +1 -1
  9. package/app/plugins/antigravity/plugin.mjs +1112 -822
  10. package/app/plugins/claude-code/plugin.mjs +152 -28
  11. package/app/plugins/codebuddy/plugin.mjs +35 -6
  12. package/app/plugins/codex-usage/plugin.mjs +35 -6
  13. package/app/plugins/copilot/plugin.mjs +27 -6
  14. package/app/plugins/cursor-cli/plugin.mjs +27 -6
  15. package/app/plugins/deepseek-harness/plugin.mjs +52 -11
  16. package/app/plugins/devin/plugin.mjs +27 -6
  17. package/app/plugins/grok/plugin.mjs +63 -15
  18. package/app/plugins/hermes/plugin.mjs +27 -6
  19. package/app/plugins/kimi-code/plugin.mjs +52 -16
  20. package/app/plugins/kiro-cli/plugin.mjs +27 -6
  21. package/app/plugins/omp/plugin.mjs +35 -6
  22. package/app/plugins/opencode/plugin.mjs +53 -15
  23. package/app/plugins/pi/plugin.mjs +35 -6
  24. package/app/plugins/qoder/plugin.mjs +42 -6
  25. package/app/plugins/qoder-cn/plugin.mjs +42 -6
  26. package/app/plugins/qwen-code/plugin.mjs +27 -6
  27. package/app/plugins/workbuddy/plugin.mjs +35 -6
  28. package/app/plugins/zcode/plugin.mjs +35 -6
  29. package/app/renderer-extension.js +26 -6
  30. package/app/web/assets/{index-D6-hvggd.css → index-DJW4bmyx.css} +1 -1
  31. package/app/web/assets/{index-B5OfOGb8.js → index-DLXdvkWR.js} +63 -63
  32. package/app/web/codexhost-settings.js +34 -7
  33. package/app/web/index.html +2 -2
  34. package/app/web/plugins/deepseek-ai__dsh-api-remotes/client.js +1 -1
  35. package/app/web/plugins/deepseek-ai__dsh-api-session-controller/client.js +57 -57
  36. package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +68 -68
  37. package/app/web/plugins/deepseek-ai__dsh-client-ui-codexhost/client.js +6 -6
  38. package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +22 -22
  39. package/app/web/plugins/deepseek-ai__dsh-client-ui-input-trigger/client.js +1 -1
  40. package/app/web/plugins/deepseek-ai__dsh-client-ui-layout/client.js +2 -2
  41. package/app/web/plugins/deepseek-ai__dsh-client-ui-model-selection/client.js +1 -1
  42. package/app/web/plugins/deepseek-ai__dsh-client-ui-settings-general/client.js +1 -1
  43. package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar/client.js +1 -1
  44. package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar-documentpreview/client.js +9 -9
  45. package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +16 -16
  46. package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +2 -2
  47. package/app/web-modules/server.mjs +1017 -672
  48. package/bin/codexhost +0 -0
  49. package/libexec/codexhost-shim +0 -0
  50. package/libexec/codexhost-updater +0 -0
  51. package/package.json +1 -1
@@ -212,13 +212,15 @@ var CdpClient = class _CdpClient {
212
212
  if (listeners.size === 0) this.#listeners.delete(method);
213
213
  };
214
214
  }
215
- #send(method, params, sessionId) {
215
+ #send(method, params, sessionId, timeoutMs = this.#commandTimeoutMs) {
216
216
  if (this.#closed) return Promise.reject(new CdpConnectionClosedError("CDP client is closed"));
217
217
  const id = this.#nextId++;
218
218
  return new Promise((resolve, reject) => {
219
219
  const timeout = setTimeout(() => {
220
+ this.#pending.delete(id);
220
221
  this.#disconnect(new CdpConnectionClosedError(`CDP command '${method}' timed out`));
221
- }, this.#commandTimeoutMs);
222
+ reject(new Error(`CDP command '${method}' timed out`));
223
+ }, timeoutMs);
222
224
  this.#pending.set(id, { resolve, reject, timeout });
223
225
  try {
224
226
  this.#socket.send(
@@ -231,12 +233,13 @@ var CdpClient = class _CdpClient {
231
233
  }
232
234
  });
233
235
  }
234
- async evaluate(expression) {
235
- const response = await this.command("Runtime.evaluate", {
236
- expression,
237
- awaitPromise: true,
238
- returnByValue: true
239
- });
236
+ async evaluate(expression, timeoutMs) {
237
+ const response = await this.#send(
238
+ "Runtime.evaluate",
239
+ { expression, awaitPromise: true, returnByValue: true },
240
+ void 0,
241
+ timeoutMs
242
+ );
240
243
  if (!isRecord(response)) throw new Error("Runtime.evaluate returned an invalid result");
241
244
  try {
242
245
  if (isRecord(response.exceptionDetails)) {
@@ -315,7 +318,10 @@ var CdpClient = class _CdpClient {
315
318
  // packages/desktop-control/src/renderer-remote-sessions.ts
316
319
  async function rendererRemoteSession(target2, operation) {
317
320
  const routing = target2.__codexhostHostRoutingV1;
318
- if (!routing) throw new Error("Desktop remote session routing is unavailable");
321
+ if (!routing)
322
+ throw Object.assign(new Error("Desktop remote session routing is unavailable"), {
323
+ code: -32090
324
+ });
319
325
  const ids = [...new Set(routing.knownHostIds?.() ?? [])].filter(
320
326
  (id) => /^remote-(?:ssh(?:-|:)|control:)/u.test(id)
321
327
  );
@@ -389,49 +395,129 @@ async function rendererRemoteSession(target2, operation) {
389
395
  })
390
396
  );
391
397
  }
398
+ const connectionError = (message, changed = false) => Object.assign(new Error(message), {
399
+ code: changed && routing.forHost(operation.hostId) ? -32095 : -32090
400
+ });
392
401
  if (!ids.includes(operation.hostId))
393
- throw new Error("Remote Host is offline or no longer known to Desktop");
402
+ throw connectionError("Remote Host is offline or no longer known to Desktop");
394
403
  const route = routing.forHost(operation.hostId);
395
404
  const manager = route?.manager;
396
- if (!route || !manager) throw new Error("Remote Host is offline");
405
+ if (!route || !manager) throw connectionError("Remote Host is offline");
406
+ const read = async (request) => {
407
+ let result;
408
+ try {
409
+ result = await request();
410
+ } catch (error51) {
411
+ if (routing.forHost(operation.hostId) !== route)
412
+ throw connectionError("Remote connection changed during read", true);
413
+ throw error51;
414
+ }
415
+ if (routing.forHost(operation.hostId) !== route)
416
+ throw connectionError("Remote connection changed during read", true);
417
+ return result;
418
+ };
397
419
  let generation = state.managers.get(route);
398
420
  if (!generation) {
399
421
  generation = { epoch: crypto.randomUUID(), answered: /* @__PURE__ */ new Set() };
400
422
  state.managers.set(route, generation);
401
423
  }
402
424
  if ("epoch" in operation && operation.epoch !== generation.epoch)
403
- throw new Error("Remote connection changed; refresh before operating");
425
+ throw connectionError("Remote connection changed; refresh before operating", true);
404
426
  if (operation.kind === "list")
405
- return manager.sendRequest("thread/list", {
406
- cursor: operation.cursor,
407
- archived: operation.archived,
408
- limit: 100
409
- });
427
+ return read(
428
+ () => manager.sendRequest("thread/list", {
429
+ cursor: operation.cursor,
430
+ archived: operation.archived,
431
+ limit: 100
432
+ })
433
+ );
410
434
  const threadId = operation.threadId;
435
+ if (operation.kind === "status") {
436
+ const result = await read(
437
+ () => manager.sendRequest("thread/read", {
438
+ threadId,
439
+ includeTurns: false
440
+ })
441
+ );
442
+ if (result.thread?.id !== threadId || typeof result.thread.status?.type !== "string")
443
+ throw new Error("Invalid remote Thread status");
444
+ let turnId = null;
445
+ if (result.thread.status.type === "active") {
446
+ const page = await read(
447
+ () => manager.sendRequest("thread/turns/list", {
448
+ threadId,
449
+ cursor: null,
450
+ limit: 1,
451
+ sortDirection: "desc",
452
+ itemsView: "notLoaded"
453
+ })
454
+ );
455
+ if (!Array.isArray(page.data)) throw new Error("Invalid remote Turn status");
456
+ const latest = page.data[0];
457
+ if (latest?.status === "inProgress" && typeof latest.id === "string") turnId = latest.id;
458
+ }
459
+ return { threadId, status: result.thread.status.type, turnId, epoch: generation.epoch };
460
+ }
411
461
  const pendingRequests = async () => {
412
- const conversation = await manager.getConversation?.(threadId);
413
- if (routing.forHost(operation.hostId) !== route)
414
- throw new Error("Remote connection changed during interaction read");
462
+ const conversation = await read(() => manager.getConversation?.(threadId));
415
463
  return Array.isArray(conversation?.requests) ? conversation.requests : [];
416
464
  };
417
465
  if (operation.kind === "read") {
418
- let result = await manager.sendRequest("thread/read", { threadId, includeTurns: false });
419
- if (routing.forHost(operation.hostId) !== route)
420
- throw new Error("Remote connection changed during read");
466
+ if (operation.page?.epoch !== void 0 && operation.page.epoch !== generation.epoch)
467
+ throw connectionError(
468
+ "Remote connection changed during history pagination; refresh and retry",
469
+ true
470
+ );
471
+ let result = await read(
472
+ () => manager.sendRequest("thread/read", { threadId, includeTurns: false })
473
+ );
421
474
  const header = result;
422
- if (header.thread?.historyMode === "paginated") {
475
+ let nextCursor = null;
476
+ const requestedPage = operation.page;
477
+ if (header.thread?.historyMode === "paginated" && requestedPage) {
478
+ let limit = requestedPage.limit ?? 20;
479
+ for (; ; ) {
480
+ const response = await read(
481
+ () => manager.sendRequest("thread/turns/list", {
482
+ threadId,
483
+ cursor: requestedPage.cursor,
484
+ limit,
485
+ sortDirection: requestedPage.sortDirection ?? "asc",
486
+ itemsView: "full"
487
+ })
488
+ );
489
+ if (!Array.isArray(response.data) || response.nextCursor !== null && (typeof response.nextCursor !== "string" || response.nextCursor.length === 0))
490
+ throw new Error("Invalid remote history page");
491
+ if (new TextEncoder().encode(JSON.stringify(response.data)).byteLength > 14 * 1024 * 1024) {
492
+ if (response.data.length <= 1 || limit === 1)
493
+ throw Object.assign(
494
+ new Error(
495
+ "A remote Turn exceeds the history page limit; open this chat in Codex Desktop."
496
+ ),
497
+ { code: -32094 }
498
+ );
499
+ limit = Math.max(1, Math.floor(Math.min(limit, response.data.length) / 2));
500
+ continue;
501
+ }
502
+ result = { ...result, thread: { ...header.thread, turns: response.data } };
503
+ nextCursor = response.nextCursor;
504
+ break;
505
+ }
506
+ } else if (header.thread?.historyMode === "paginated") {
423
507
  const turns = [], cursors = /* @__PURE__ */ new Set();
424
508
  let cursor = null, bytes = 0, complete = false;
425
509
  for (let page = 0; page < 100; page++) {
426
510
  if (routing.forHost(operation.hostId) !== route)
427
- throw new Error("Remote connection changed during read");
428
- const response = await manager.sendRequest("thread/turns/list", {
429
- threadId,
430
- cursor,
431
- limit: 50,
432
- sortDirection: "asc",
433
- itemsView: "full"
434
- });
511
+ throw connectionError("Remote connection changed during read", true);
512
+ const response = await read(
513
+ () => manager.sendRequest("thread/turns/list", {
514
+ threadId,
515
+ cursor,
516
+ limit: 50,
517
+ sortDirection: "asc",
518
+ itemsView: "full"
519
+ })
520
+ );
435
521
  if (!Array.isArray(response.data) || response.nextCursor !== null && typeof response.nextCursor !== "string")
436
522
  throw new Error("Invalid remote history page");
437
523
  bytes += new TextEncoder().encode(JSON.stringify(response.data)).byteLength;
@@ -447,9 +533,12 @@ async function rendererRemoteSession(target2, operation) {
447
533
  }
448
534
  if (!complete) throw new Error("Remote history exceeds the page limit");
449
535
  result = { ...result, thread: { ...header.thread, turns } };
450
- } else result = await manager.sendRequest("thread/read", { threadId, includeTurns: true });
536
+ } else
537
+ result = await read(
538
+ () => manager.sendRequest("thread/read", { threadId, includeTurns: true })
539
+ );
451
540
  if (routing.forHost(operation.hostId) !== route)
452
- throw new Error("Remote connection changed during read");
541
+ throw connectionError("Remote connection changed during read", true);
453
542
  let metadata = {};
454
543
  if (header.thread) {
455
544
  const cwd = header.thread.cwd;
@@ -458,7 +547,7 @@ async function rendererRemoteSession(target2, operation) {
458
547
  threadId
459
548
  });
460
549
  if (routing.forHost(operation.hostId) !== route)
461
- throw new Error("Remote connection changed during read");
550
+ throw connectionError("Remote connection changed during read", true);
462
551
  metadata = {
463
552
  configuration,
464
553
  ...configuration.owner === "codex" ? {
@@ -472,7 +561,7 @@ async function rendererRemoteSession(target2, operation) {
472
561
  if (configuration.owner === "codex" && manager.getConversation) {
473
562
  const conversation = await Promise.resolve().then(() => manager.getConversation?.(threadId)).catch(() => void 0);
474
563
  if (routing.forHost(operation.hostId) !== route)
475
- throw new Error("Remote connection changed during read");
564
+ throw connectionError("Remote connection changed during read", true);
476
565
  const settings = conversation?.latestThreadSettings;
477
566
  if (settings?.model === header.thread.model && typeof settings?.model === "string")
478
567
  metadata.nativeSettings = {
@@ -489,7 +578,7 @@ async function rendererRemoteSession(target2, operation) {
489
578
  const loading = Promise.all([
490
579
  Promise.resolve().then(() => {
491
580
  if (routing.forHost(operation.hostId) !== route)
492
- throw new Error("Remote connection changed during read");
581
+ throw connectionError("Remote connection changed during read", true);
493
582
  return manager.sendRequest("codexhost/harness/inspect", {
494
583
  harnessId,
495
584
  ...cwd ? { cwd } : {}
@@ -497,7 +586,7 @@ async function rendererRemoteSession(target2, operation) {
497
586
  }),
498
587
  Promise.resolve().then(() => {
499
588
  if (routing.forHost(operation.hostId) !== route)
500
- throw new Error("Remote connection changed during read");
589
+ throw connectionError("Remote connection changed during read", true);
501
590
  return manager.sendRequest("codexhost/harness/plugins/list", {});
502
591
  }).catch(() => null)
503
592
  ]).then(([inspection, catalog]) => {
@@ -532,12 +621,13 @@ async function rendererRemoteSession(target2, operation) {
532
621
  }
533
622
  }
534
623
  if (routing.forHost(operation.hostId) !== route)
535
- throw new Error("Remote connection changed during read");
624
+ throw connectionError("Remote connection changed during read", true);
536
625
  const requests = await pendingRequests();
537
626
  return {
538
627
  result,
539
628
  ...metadata,
540
629
  epoch: generation.epoch,
630
+ ...operation.page ? { nextCursor } : {},
541
631
  interactionsAvailable: !!manager.getConversation && !!manager.replyWithCommandExecutionApprovalDecision && !!manager.replyWithFileChangeApprovalDecision,
542
632
  requests: requests.filter(
543
633
  (request) => (request.params.threadId ?? request.params.conversationId) === threadId && !generation.answered.has(JSON.stringify([threadId, request.id]))
@@ -590,7 +680,7 @@ async function rendererRemoteSession(target2, operation) {
590
680
  }
591
681
  }
592
682
  case "prompt":
593
- await manager.sendRequest("thread/resume", { threadId });
683
+ await manager.sendRequest("thread/resume", { threadId, excludeTurns: true });
594
684
  if (routing.forHost(operation.hostId) !== route)
595
685
  throw new Error("Remote connection changed during resume");
596
686
  return manager.sendRequest("turn/start", {
@@ -15641,7 +15731,7 @@ var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonneg
15641
15731
  var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
15642
15732
  var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
15643
15733
  var usageOutputTimingSchema = external_exports.object({
15644
- version: external_exports.literal(3).optional(),
15734
+ version: external_exports.union([external_exports.literal(3), external_exports.literal(4)]).optional(),
15645
15735
  requestId: external_exports.string().min(1),
15646
15736
  turnId: external_exports.string().min(1).max(1024),
15647
15737
  outputTokens: nonNegativeSafeIntegerSchema,
@@ -15649,16 +15739,16 @@ var usageOutputTimingSchema = external_exports.object({
15649
15739
  completedAtMs: nonNegativeSafeIntegerSchema
15650
15740
  }).strict().refine((value) => value.completedAtMs > value.startedAtMs);
15651
15741
  var usageMeasurementSchema = external_exports.object({
15652
- version: external_exports.union([external_exports.literal(2), external_exports.literal(3)]).optional(),
15742
+ version: external_exports.union([external_exports.literal(2), external_exports.literal(3), external_exports.literal(4)]).optional(),
15653
15743
  value: finiteNonNegativeNumberSchema,
15654
15744
  turnId: external_exports.string().min(1).max(1024),
15655
15745
  at: nonNegativeSafeIntegerSchema
15656
15746
  }).strict();
15657
15747
  var usageMeasurementsSchema = external_exports.object({
15658
- // Unversioned intervals can omit hidden thinking time; do not restore them into averages.
15659
- outputTimings: external_exports.array(usageOutputTimingSchema).transform((values) => values.filter((value) => value.version === 3)).optional(),
15748
+ // Older intervals can omit hidden thinking time; do not restore them into averages.
15749
+ outputTimings: external_exports.array(usageOutputTimingSchema).transform((values) => values.filter((value) => value.version === 4)).optional(),
15660
15750
  // Retain independent TTFT facts when dropping incompatible speed measurements.
15661
- outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 3).optional().catch(void 0),
15751
+ outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 4).optional().catch(void 0),
15662
15752
  timeToFirstOutputMs: usageMeasurementSchema.extend({ value: nonNegativeSafeIntegerSchema }).optional()
15663
15753
  }).strict();
15664
15754
  var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text) => text.length <= maximum));
@@ -16174,6 +16264,11 @@ var clientChannelEventSchema = external_exports.discriminatedUnion("type", [
16174
16264
  cursor: clientChannelCursorSchema,
16175
16265
  cwd: external_exports.string().optional()
16176
16266
  }),
16267
+ external_exports.object({
16268
+ type: external_exports.literal("harness-inspection-changed"),
16269
+ cursor: clientChannelCursorSchema,
16270
+ harnessId: external_exports.string().min(1)
16271
+ }),
16177
16272
  external_exports.object({ type: external_exports.literal("display-settings-changed"), cursor: clientChannelCursorSchema }),
16178
16273
  external_exports.object({
16179
16274
  type: external_exports.literal("preferences-changed"),
@@ -16245,6 +16340,8 @@ var clientItemTruncationSchema = external_exports.object({
16245
16340
  var clientTurnSchema = external_exports.object({
16246
16341
  id: external_exports.string().min(1),
16247
16342
  status: external_exports.string().min(1),
16343
+ /** Native history has no terminal evidence; Desktop's status vocabulary cannot express this. */
16344
+ codexhostTurnOutcome: external_exports.object({ status: external_exports.literal("unknown"), reason: external_exports.string() }).optional(),
16248
16345
  items: external_exports.array(external_exports.object({ id: external_exports.string().min(1), type: external_exports.string().min(1) }).passthrough()),
16249
16346
  /** Original file operations, independent of the cumulative Desktop fileChange card.
16250
16347
  * Insert before the named non-file Item; null appends at the end of the Turn.
@@ -17516,6 +17613,7 @@ var THREAD_WATCH_NOTICE_OUTCOMES = [
17516
17613
  "completed",
17517
17614
  "failed",
17518
17615
  "interrupted",
17616
+ "needsInput",
17519
17617
  "timedOut",
17520
17618
  "unreadable",
17521
17619
  "notFound"
@@ -17562,13 +17660,25 @@ var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
17562
17660
  var thread = { ...target, threadId: identity };
17563
17661
  var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
17564
17662
  external_exports.strictObject({ kind: external_exports.literal("hosts") }),
17663
+ external_exports.strictObject({ kind: external_exports.literal("status"), ...thread }),
17565
17664
  external_exports.strictObject({
17566
17665
  kind: external_exports.literal("list"),
17567
17666
  ...target,
17568
17667
  cursor: external_exports.string().nullable(),
17569
17668
  archived: external_exports.boolean()
17570
17669
  }),
17571
- external_exports.strictObject({ kind: external_exports.literal("read"), ...thread }),
17670
+ external_exports.strictObject({
17671
+ kind: external_exports.literal("read"),
17672
+ ...thread,
17673
+ page: external_exports.strictObject({
17674
+ cursor: external_exports.string().min(1).max(8192).nullable(),
17675
+ epoch: identity.optional(),
17676
+ sortDirection: external_exports.enum(["asc", "desc"]).optional(),
17677
+ limit: external_exports.number().int().min(1).max(20).optional()
17678
+ }).refine((page) => page.cursor === null || page.epoch !== void 0, {
17679
+ message: "A history continuation requires its connection epoch"
17680
+ }).optional()
17681
+ }),
17572
17682
  external_exports.strictObject({
17573
17683
  kind: external_exports.literal("configure"),
17574
17684
  ...thread,
@@ -17735,7 +17845,7 @@ var MAX_REPLY_BYTES = 1024 * 1024;
17735
17845
  function remoteConnectionsExpression(input) {
17736
17846
  const request = remoteConnectionsRequestSchema.parse(input);
17737
17847
  if (request.action === "session")
17738
- return `(async () => { try { return {result:await (${rendererRemoteSession.toString()})(window,${JSON.stringify(request.operation)})}; } catch(error) {return {error:{code:-32090,message:String(error?.message ?? error)}};} })()`;
17848
+ return `(async () => { try { return {result:await (${rendererRemoteSession.toString()})(window,${JSON.stringify(request.operation)})}; } catch(error) {return {error:{code:typeof error?.code === "number" ? error.code : -32603,message:String(error?.message ?? error)}};} })()`;
17739
17849
  return `(async () => {
17740
17850
  try {
17741
17851
  const api = window.__codexhostRendererBindingProbeV1;
@@ -17879,7 +17989,7 @@ async function startControllerAttachmentServer(options) {
17879
17989
  JSON.stringify({
17880
17990
  error: {
17881
17991
  code: -32094,
17882
- message: input.action === "session" ? "Remote Thread snapshot exceeds the 16 MiB response limit; open this Thread in Codex Desktop. Paged remote snapshots are not supported." : "Thread snapshot exceeds the 16 MiB response limit; reduce the message page size. Oversized individual results are not supported."
17992
+ message: input.action === "session" ? "Remote history reply exceeds the 16 MiB limit; update codexhost on this computer to use paged history, or open this chat in Codex Desktop." : "Thread snapshot exceeds the 16 MiB response limit; reduce the message page size. Oversized individual results are not supported."
17883
17993
  }
17884
17994
  }) + "\n"
17885
17995
  );
@@ -22177,9 +22287,9 @@ var InstalledRendererCdpControlSession = class {
22177
22287
  await this.renderer.command("Page.bringToFront");
22178
22288
  return 1;
22179
22289
  }
22180
- executeRenderer(expression) {
22290
+ executeRenderer(expression, timeoutMs) {
22181
22291
  if (this.#closed) return Promise.reject(new Error("Renderer CDP Control Session is closed"));
22182
- return this.renderer.evaluate(expression);
22292
+ return this.renderer.evaluate(expression, timeoutMs);
22183
22293
  }
22184
22294
  close() {
22185
22295
  if (this.#closed) return;
@@ -22953,7 +23063,10 @@ ${bootstrap}${rendererSource}`,
22953
23063
  remoteConnections: async (request) => {
22954
23064
  const current = await useSession(() => recoverSession());
22955
23065
  return remoteConnectionsReplySchema.parse(
22956
- await current.executeRenderer(remoteConnectionsExpression(request))
23066
+ await current.executeRenderer(
23067
+ remoteConnectionsExpression(request),
23068
+ request.action === "read-thread" || request.action === "session" ? REMOTE_THREAD_CONTROL_TIMEOUT_MS : 3e4
23069
+ )
22957
23070
  );
22958
23071
  },
22959
23072
  openLocalPage: (url2) => openRendererLocalPage(